/* Hackathon portal – colours taken from the executive guide (الدليل التنفيذي). */
:root {
  --ink: #17333c;
  --ink-2: #21474f;
  --green: #266a57;
  --green-d: #1d5546;
  --green-50: #eaf3ef;
  --gold: #b48a4a;
  --gold-d: #9a6e2d;
  --gold-50: #f8f1e6;
  --bg: #f7faf7;
  --surface: #ffffff;
  --tint: #f1f6f4;
  --line: #dae3de;
  --text: #17333c;
  --muted: #5d6f69;
  --ok: #266a57;
  --ok-bg: #e6f2ec;
  --warn: #8a6224;
  --warn-bg: #fbf3e4;
  --bad: #a03a3a;
  --bad-bg: #fbecec;
  --info: #2c5b70;
  --info-bg: #e9f2f6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(23, 51, 60, .05), 0 4px 16px rgba(23, 51, 60, .05);
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
}
img { max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-d); }
h1, h2, h3, h4, h5 { line-height: 1.4; margin: 0 0 .5em; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); }
h3, .h3 { font-size: 1.15rem; }
.h4 { font-size: 1.02rem; margin-top: 1.2em; }
.h5 { font-size: .95rem; color: var(--green); margin-bottom: .2em; }
p { margin: 0 0 1em; }
code { font-size: .85em; background: var(--tint); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--muted); }
.small, small { font-size: .85rem; }
.danger { color: var(--bad); }
.center { text-align: center; }
.req { color: var(--bad); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 10px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.container.narrow { max-width: 760px; }
.container.wide { max-width: 1320px; }
.page-pad { padding-block: 32px 56px; }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; margin-inline-end: auto; }
.brand img { width: 34px; height: auto; }
.brand span { font-size: 1.02rem; }
.main-nav { display: flex; align-items: center; gap: 18px; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: var(--green); }
.main-nav .btn { color: #fff; }
.who { color: var(--muted); font-size: .9rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font: inherit; color: var(--ink); cursor: pointer; }
.sub-nav { border-top: 1px solid var(--line); background: var(--surface); }
.sub-nav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.sub-nav a { padding: 10px 12px; white-space: nowrap; color: var(--muted); text-decoration: none; font-size: .92rem; border-bottom: 2px solid transparent; }
.sub-nav a:hover { color: var(--ink); }
.sub-nav a[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; position: absolute; inset-inline: 0; top: 68px; background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav > a, .main-nav > form, .main-nav > .who { padding: 10px 0; border-bottom: 1px solid var(--tint); }
  .main-nav .btn { margin-top: 10px; text-align: center; }
  .brand span { font-size: .92rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--green); color: #fff; border: 1px solid var(--green);
  padding: 10px 20px; border-radius: 999px; font: inherit; font-weight: 600; font-size: .95rem;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--green-d); border-color: var(--green-d); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 6px 14px; font-size: .88rem; }
.btn-outline { background: transparent; color: var(--green); }
.btn-outline:hover { background: var(--green-50); color: var(--green-d); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-d); border-color: var(--gold-d); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn-ghost-dark { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: #862f2f; border-color: #862f2f; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--green); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: var(--bad); }
.inline { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(180, 138, 74, .18), transparent 60%),
    linear-gradient(135deg, var(--ink) 0%, #1c434a 55%, var(--green) 130%);
  color: #fff; padding: 64px 0 72px; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem); margin: 18px 0 6px; }
.hero .tagline { color: #e9d3ae; font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem); font-weight: 600; }
.hero .lead { color: rgba(255, 255, 255, .86); max-width: 60ch; }
.hero .actions { margin-top: 24px; }
.hero-mark { display: flex; justify-content: center; }
.mark-circle {
  width: min(300px, 70vw); aspect-ratio: 1; border-radius: 50%; background: #fff;
  display: grid; place-items: center; box-shadow: 0 0 0 14px rgba(255, 255, 255, .07), 0 0 0 30px rgba(255, 255, 255, .04);
}
.mark-circle img { width: 50%; }
@media (max-width: 820px) {
  .hero { padding: 40px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { order: -1; }
  .mark-circle { width: 150px; box-shadow: 0 0 0 10px rgba(255, 255, 255, .07); }
}

.reg-pill { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 14px; border-radius: 999px; font-size: .9rem;
  background: var(--tint); color: var(--ink); border: 1px solid var(--line); }
.reg-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.reg-ok .dot { background: #2fb37d; box-shadow: 0 0 0 4px rgba(47, 179, 125, .2); }
.reg-info .dot { background: var(--gold); }
.hero .reg-pill { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .2); }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section.tint { background: var(--tint); }
.eyebrow { color: var(--gold-d); font-weight: 700; font-size: .9rem; margin-bottom: 4px; letter-spacing: 0; }
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px; }
@media (max-width: 820px) { .two-col, .cards-2 { grid-template-columns: 1fr; } .section { padding: 44px 0; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card.soft { background: var(--green-50); border-color: #cfe2d8; box-shadow: none; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.warn-card { border-inline-start: 4px solid var(--gold); }
.track { position: relative; border-top: 4px solid var(--green); }
.track .num { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid var(--gold); color: var(--gold-d); border-radius: 50%; font-weight: 700; margin-bottom: 10px; }
.track h4 { font-size: .95rem; margin-top: 14px; color: var(--green); }
.notes { margin-top: 24px; }
.note { background: var(--surface); border-inline-start: 4px solid var(--green); border-radius: var(--radius-sm); padding: 16px 18px; }
.note.gold { border-color: var(--gold); background: var(--gold-50); }
.note h3 { font-size: 1rem; }
.note p { margin: 0; }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-inline-start: 22px; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .7em; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); border-radius: 1px; }

.journey { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.journey li { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.journey .step { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; }
.journey h3 { font-size: 1rem; margin-bottom: 2px; }
.journey p { margin: 0; font-size: .9rem; color: var(--muted); }
.journey .when { color: var(--gold-d); font-weight: 600; margin-top: 4px; }

.criteria { display: grid; gap: 14px; }
.crit-head { display: flex; justify-content: space-between; font-weight: 600; }
.bar { height: 10px; background: #dfe9e4; border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #3a8a72); border-radius: inherit; }
.bar .w10 { width: 40%; } .bar .w20 { width: 80%; } .bar .w25 { width: 100%; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details[open] summary { margin-bottom: 8px; color: var(--green); }

.cta { background: var(--ink); color: #fff; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .8); margin: 0; }
.cta-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { margin-top: 0; }
.partners { background: var(--surface); border-top: 1px solid var(--line); padding: 22px 0; }
.partners-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px 44px; }
.partners-row img { height: 56px; width: auto; }
.footer-bar { background: var(--ink); color: rgba(255, 255, 255, .78); font-size: .9rem; padding: 16px 0; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-row nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-row a { color: #fff; text-decoration: none; }
.footer-row a:hover { text-decoration: underline; }

/* ---------- alerts, badges ---------- */
.flashes { padding-top: 16px; }
.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 14px; border: 1px solid transparent; }
.alert ul { margin: 6px 0 0; padding-inline-start: 20px; }
.alert-ok { background: var(--ok-bg); border-color: #c6e0d3; color: #1b4d3f; }
.alert-info { background: var(--info-bg); border-color: #cde0e9; color: #20475a; }
.alert-warn { background: var(--warn-bg); border-color: #efdcb8; color: #6c4c19; }
.alert-bad { background: var(--bad-bg); border-color: #f0cccc; color: #7d2a2a; }
.alert a { color: inherit; font-weight: 600; }

.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: #c6e0d3; }
.badge-info { background: var(--info-bg); color: var(--info); border-color: #cde0e9; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: #efdcb8; }
.badge-bad { background: var(--bad-bg); color: var(--bad); border-color: #f0cccc; }
.badge-muted { background: var(--tint); color: var(--muted); border-color: var(--line); }
.tag { display: inline-block; padding: 0 8px; border-radius: 6px; font-size: .78rem; background: var(--green-50); color: var(--green); font-weight: 600; vertical-align: middle; }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form label, .filters label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form fieldset { border: 0; padding: 0; margin: 0 0 8px; display: grid; gap: 14px; }
.form legend { font-size: 1.1rem; font-weight: 700; color: var(--ink); padding: 0 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; width: 100%; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; font: inherit; font-weight: 400; color: var(--text); background: #fff;
  border: 1px solid #c9d6cf; border-radius: var(--radius-sm); padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(38, 106, 87, .18); }
input:disabled { background: var(--tint); color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--green); flex: none; margin-top: 4px; }
.form label.check, label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.radio-row { display: flex; gap: 24px; flex-wrap: wrap; }
.hint { color: var(--muted); font-weight: 400; font-size: .85rem; }
.counter { color: var(--muted); font-weight: 400; font-size: .8rem; text-align: end; margin-top: -2px; }
.counter.over { color: var(--bad); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-invite { grid-template-columns: 1.3fr 1fr auto; align-items: end; }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-invite { grid-template-columns: 1fr; } }
.form-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; font-size: .92rem; }
.inline-form { margin-top: 12px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 4px; border-top: 1px solid var(--line); }
.narrow-form { max-width: 760px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 16px; }
.filters label { min-width: 160px; flex: 1; font-size: .85rem; }
.filters .btn { min-height: 44px; }

/* ---------- account & admin ---------- */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9rem; }
.tabs a[aria-current="page"] { background: var(--green); border-color: var(--green); color: #fff; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 16px 0; }
.choice { display: grid; gap: 6px; text-align: start; background: var(--tint); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px; font: inherit; color: var(--text); cursor: pointer; }
.choice:hover { border-color: var(--green); background: var(--green-50); }
.choice strong { color: var(--green); font-size: 1.1rem; }
.choice span { color: var(--muted); font-size: .92rem; }
.app-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.app-card-head h2 { margin: 0; }
.app-card-head p { margin: 0; }
.invite-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-inline-start: 4px solid var(--gold); }
.invite-row p { margin: 0; }
.invite-box { text-align: center; background: var(--tint); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.invite-box p { margin: 0; }
.invite-box .team-name { font-size: 1.4rem; font-weight: 700; color: var(--green); margin: 4px 0; }
.checklist { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 10px; align-items: baseline; }
.checklist .mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 700; }
.checklist li.ok .mark { background: var(--ok-bg); color: var(--ok); }
.checklist li.no .mark { background: var(--warn-bg); color: var(--warn); border: 1px solid #efdcb8; }
.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.people li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--tint); }
.people li:last-child { border-bottom: 0; }
.danger-zone { margin-top: 10px; background: var(--surface); border: 1px dashed #e3c0c0; border-radius: var(--radius); padding: 12px 18px; }
.danger-zone summary { cursor: pointer; color: var(--bad); font-weight: 600; }
.danger-zone form { margin-top: 12px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 24px; margin: 0; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: 0; font-weight: 600; }
.field-block { padding: 12px 0; border-bottom: 1px solid var(--tint); }
.field-block:last-child { border-bottom: 0; }
.field-block p { margin-bottom: .4em; }
.prose p { max-width: 75ch; }

.admin-main { padding-top: 24px; padding-bottom: 56px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .admin-grid { grid-template-columns: 1fr; } }
.status-stack { display: grid; justify-items: end; gap: 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; }
.stat span { color: var(--muted); font-size: .88rem; }
.stat strong { font-size: 1.8rem; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); }
.stat-bad strong { color: var(--bad); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { background: var(--green); color: #fff; font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
.table tbody tr:nth-child(even) { background: #fafcfb; }
.table tbody tr:hover { background: var(--green-50); }
.table.compact th, .table.compact td { padding: 7px 10px; }
.table .num { text-align: end; font-variant-numeric: tabular-nums; }
.table td input { min-height: 36px; padding: 6px 10px; }
.clip { max-width: 260px; overflow-wrap: anywhere; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 20px; }
.pager a { min-width: 36px; text-align: center; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.pager a[aria-current="page"] { background: var(--green); color: #fff; border-color: var(--green); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { border-inline-start: 2px solid var(--line); padding-inline-start: 12px; }
.timeline p { margin: 4px 0 0; font-size: .9rem; }
.note-int { color: var(--muted); }
.note-ext { color: var(--green-d); }
.policy-edit { border-bottom: 1px solid var(--line); padding: 10px 0; }
.policy-edit:last-child { border-bottom: 0; }
.policy-edit summary { cursor: pointer; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.policy-edit form { margin-top: 12px; }
.faq-edit { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--tint); }
@media (max-width: 680px) { .faq-edit { grid-template-columns: 1fr; } }
.mail-body { white-space: pre-wrap; font-family: inherit; background: var(--tint); padding: 10px; border-radius: 8px; margin: 8px 0 0; direction: rtl; unicode-bidi: plaintext; }
.page-plain { padding: 32px 0; }
