/* Husam Abdallah · BJJ: one calm column in Wuduh navy and sky blue. Light and dark. */
:root {
  --bg: #F3F6FA; --surface: #FFFFFF; --fill: rgb(16 48 106 / 0.045); --fill-hover: rgb(16 48 106 / 0.08);
  --line: rgb(16 48 106 / 0.11); --border: rgb(16 48 106 / 0.2);
  --text: #0E2245; --text-2: #4A5B76; --text-3: #7D8AA0;
  --accent: #10306A; --accent-text: #10306A; --on-accent: #FFFFFF;
  --sky: #48B1E4; --sky-soft: rgb(72 177 228 / 0.16);
  --ok: #067647; --ok-soft: rgb(18 183 106 / 0.12);
  --warn: #B54708; --warn-soft: rgb(247 144 9 / 0.13);
  --bad: #B42318; --bad-soft: rgb(217 45 32 / 0.09);
  --gold: #8A6100; --gold-soft: rgb(234 179 8 / 0.18);
  --bar: #10306A; --bar-ink: #FFFFFF;
  --font: "Figtree", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09121F; --surface: #0F1B2E; --fill: rgb(255 255 255 / 0.05); --fill-hover: rgb(255 255 255 / 0.09);
    --line: rgb(255 255 255 / 0.09); --border: rgb(255 255 255 / 0.18);
    --text: #E6ECF5; --text-2: #A3B1C7; --text-3: #75839A;
    --accent: #48B1E4; --accent-text: #7CC5EC; --on-accent: #06182F;
    --ok: #47CD89; --ok-soft: rgb(71 205 137 / 0.14); --warn: #FDB022; --warn-soft: rgb(253 176 34 / 0.13);
    --bad: #F97066; --bad-soft: rgb(249 112 102 / 0.13); --gold: #FACC15; --gold-soft: rgb(250 204 21 / 0.14);
    --bar: #0C1A33; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09121F; --surface: #0F1B2E; --fill: rgb(255 255 255 / 0.05); --fill-hover: rgb(255 255 255 / 0.09);
  --line: rgb(255 255 255 / 0.09); --border: rgb(255 255 255 / 0.18);
  --text: #E6ECF5; --text-2: #A3B1C7; --text-3: #75839A;
  --accent: #48B1E4; --accent-text: #7CC5EC; --on-accent: #06182F;
  --ok: #47CD89; --ok-soft: rgb(71 205 137 / 0.14); --warn: #FDB022; --warn-soft: rgb(253 176 34 / 0.13);
  --bad: #F97066; --bad-soft: rgb(249 112 102 / 0.13); --gold: #FACC15; --gold-soft: rgb(250 204 21 / 0.14);
  --bar: #0C1A33; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--accent-text); }
img { max-width: 100%; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }

/* Top bar and tabs */
.top { background: var(--bar); color: var(--bar-ink); position: sticky; top: 0; z-index: 5; }
.top-inner { max-width: 860px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-left)) 0; display: flex; flex-direction: column; gap: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.belt-mark { width: 30px; height: 10px; border-radius: 2px; background: linear-gradient(90deg, #1F5FBF 0 62%, #0B0F14 62% 86%, #1F5FBF 86%); box-shadow: inset 20px 0 0 0 transparent; position: relative; }
.belt-mark::after { content: ""; position: absolute; left: 68%; top: 0; width: 2px; height: 100%; background: #fff; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tab { color: rgb(255 255 255 / 0.75); text-decoration: none; font-weight: 600; font-size: 14px; padding: 9px 12px 11px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab:hover { color: #fff; }
.tab.on { color: #fff; border-bottom-color: var(--sky); }

.page { max-width: 860px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-left)) 72px; display: flex; flex-direction: column; gap: 22px; }
.page > * { min-width: 0; }
.foot { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 0 16px 32px; }
.empty { color: var(--text-2); padding: 14px 16px; border: 1px dashed var(--border); border-radius: 12px; }

/* Type */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
h1 { font-family: var(--font-display); font-size: clamp(26px, 5.5vw, 36px); line-height: 1.1; letter-spacing: -0.02em; }
.lead { color: var(--text-2); font-size: 16px; max-width: 62ch; }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.intro { display: flex; flex-direction: column; gap: 8px; }

/* Chips and buttons */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 14px var(--font); padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--fill-hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.link-btn { background: none; border: 0; color: var(--accent-text); font: inherit; cursor: pointer; padding: 4px; }
.music { display: inline-flex; align-items: center; gap: 8px; font: 600 14px var(--font); padding: 9px 14px; border-radius: 999px; border: 0; background: var(--sky-soft); color: var(--accent-text); cursor: pointer; }
.music-icon { font-size: 11px; width: 14px; text-align: center; }
.music-title { font-weight: 500; color: var(--text-2); }

/* Hero */
.hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--sky); }
.avatar-empty { display: grid; place-items: center; background: var(--fill-hover); color: var(--accent-text); font: 700 38px var(--font-display); }
.hero-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; align-items: center; }
@media (max-width: 560px) { .hero { grid-template-columns: 1fr; text-align: left; } .avatar { width: 96px; height: 96px; } }

/* Blocks */
.block { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.block p { max-width: 68ch; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.block-head h2 { font-family: var(--font-display); font-size: 19px; letter-spacing: -0.01em; }
.block-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.facts > div { background: var(--fill); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.facts dt { font-size: 12px; color: var(--text-3); font-weight: 600; }
.facts dd { font-weight: 600; }
.facts.small dd { font-size: 14px; }

.belts { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.belts li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; background: var(--fill); border-radius: 10px; }
.belt-swatch { width: 44px; height: 12px; border-radius: 2px; background: #ddd; box-shadow: inset -12px 0 0 #0B0F14; }
.belt-white { background: #F4F4F4; outline: 1px solid var(--border); }
.belt-blue { background: #1F5FBF; } .belt-purple { background: #6B3FA0; } .belt-brown { background: #6B4226; }
.belt-black { background: #111; box-shadow: inset -12px 0 0 #B42318; }
.belt-name { font-weight: 600; }
.belt-note { color: var(--text-2); flex-basis: 100%; font-size: 14px; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); padding: 0 12px 8px 0; }
td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 700; border-top: 2px solid var(--border); }
.tag { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: var(--accent-text); background: var(--sky-soft); border-radius: 999px; padding: 1px 8px; }

.ticks { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li::before { content: "✓"; color: var(--sky); font-weight: 700; }
.ticks li > span { flex: 1; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.gallery figure { display: flex; flex-direction: column; gap: 4px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--fill); }
.gallery.docs img { object-fit: contain; background: #fff; border: 1px solid var(--line); }
.gallery figcaption { font-size: 13px; color: var(--text-2); }
.links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.links a { font-weight: 600; }

.sponsors { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.sponsor { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--fill); border-radius: 12px; }
.sponsor > div { flex: 1; min-width: 0; }
.sponsor-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 10px; background: #fff; padding: 4px; }
.sponsor-blank { display: grid; place-items: center; font-weight: 700; color: var(--accent); }
.sponsor a { color: inherit; }

.contact { display: flex; flex-wrap: wrap; gap: 8px; }
.contact a { display: inline-flex; gap: 8px; padding: 9px 14px; border-radius: 10px; background: var(--fill); text-decoration: none; color: var(--text); font-weight: 600; }
.contact a:hover { background: var(--fill-hover); }

/* Cards (wanted and done) */
.stack { display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px; color: inherit; text-decoration: none; }
.card-top, .trip-row { display: flex; gap: 14px; align-items: flex-start; }
.trip-row { flex-direction: row; }
a.card:hover { border-color: color-mix(in srgb, var(--sky) 55%, var(--line)); }
.card-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.card h3 { font-size: 17px; line-height: 1.3; }
.date-block { flex: none; width: 62px; text-align: center; border-radius: 12px; background: var(--fill); padding: 8px 4px; display: flex; flex-direction: column; font-size: 12px; color: var(--text-2); font-weight: 600; }
.date-block b { font: 700 20px var(--font-display); color: var(--text); }
.trip-paid { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; font-size: 13px; }
.trip-paid b { font-size: 16px; }
.trip-paid .go { color: var(--accent-text); font-weight: 600; }
@media (max-width: 560px) { .trip-row { flex-wrap: wrap; } .trip-paid { align-items: flex-start; text-align: left; flex-basis: 100%; } }
.answers ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.answers li { padding: 8px 10px; background: var(--fill); border-radius: 10px; }
.note { color: var(--text-2); font-size: 14px; }

.totals { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 10px; }
.totals > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.total-main b { font: 700 26px var(--font-display); }
.total-main .muted { font-size: 13px; }
.stat b { font: 700 24px var(--font-display); }
.stat span { font-size: 13px; color: var(--text-2); }
@media (max-width: 700px) { .totals { grid-template-columns: repeat(2, 1fr); } .total-main { grid-column: 1 / -1; } }

.back { font-weight: 600; text-decoration: none; }
.result-body { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.result-photo { width: 200px; max-width: 100%; border-radius: 12px; }
.result-text { font: 700 22px var(--font-display); color: var(--gold); }
.timeline { list-style: none; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline .when { color: var(--text-2); font-weight: 600; font-size: 14px; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }
.private { border-style: dashed; border-color: var(--warn); }
.note-box { background: var(--fill); border-radius: 10px; padding: 12px 14px; }
.note-box ul { margin-top: 6px; padding-left: 18px; color: var(--text-2); font-size: 14px; }

/* Phone: tables become stacked lines instead of squeezed columns. */
@media (max-width: 560px) {
  table.record thead, table.costs thead { display: none; }
  table.record tr, table.costs tbody tr, table.costs tfoot tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
  table.record td, table.costs td { display: block; border: 0; padding: 0; }
  table.record td:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  table.record td:nth-child(1) { color: var(--text-2); font-size: 13px; }
  table.record td:nth-child(3) { grid-column: 1 / -1; color: var(--text-2); font-size: 13px; }
  table.record td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; }
  table.costs td:first-child { grid-column: 1; }
  table.costs td.num { grid-column: 2; grid-row: 1; }
  table.costs td:not(:first-child):not(.num) { grid-column: 1 / -1; font-size: 13px; }
  table.costs tfoot td[colspan] { grid-column: 1; }
}
