/* ==========================================================================
   Ahmed Haitham — official website
   ========================================================================== */
:root {
  --ink: #0b1b2b;
  --ink-2: #26384a;
  --muted: #5d6b79;
  --line: #e4ddd1;
  --line-2: #d6cdbd;
  --paper: #fbf8f3;
  --sand: #f3ede3;
  --white: #ffffff;
  --navy: #0a2540;
  --navy-2: #12355b;
  --ocean: #0f6e78;
  --ocean-2: #0b5961;
  --coral: #d9573a;
  --gold: #b8893b;
  --live: #1d7a46;
  --live-bg: #e3f3e9;
  --removed: #b42318;
  --removed-bg: #fdecea;
  --unverified: #8a5a00;
  --unverified-bg: #fdf3dc;
  --pending: #5d6b79;
  --pending-bg: #eef0f2;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --thaana: "Noto Sans Thaana", "MV Faseyha", "Faruma", sans-serif;

  --wrap: 1200px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 27, 43, .06), 0 8px 24px rgba(11, 27, 43, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ocean); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ocean-2); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 500; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.dv, [lang="dv"] { font-family: var(--thaana); direction: rtl; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 40px); margin-inline: auto; }
.eyebrow {
  display: inline-block; font: 600 .76rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--ocean); margin-bottom: 18px;
}
.eyebrow.light { color: #8fd3d9; }
.lede { font-size: 1.22rem; color: var(--ink-2); line-height: 1.6; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(251, 248, 243, .92);
  backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-name { font: 600 1.3rem/1 var(--serif); letter-spacing: -.01em; }
.brand-dv { font: 500 1rem/1 var(--thaana); color: var(--muted); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem; padding: 9px 14px; border-radius: 999px;
}
.nav a:hover { background: var(--sand); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--sand); }
.nav .btn { margin-left: 8px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; background: var(--navy); }
.nav a.btn-primary:hover { background: var(--navy-2); }
.menu-btn { display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink); }
.menu-btn svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .brand-dv { display: none; }
  .nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 20px 22px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s ease;
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px 12px; font-size: 1.05rem; }
  .nav .btn { margin: 10px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font: 600 .95rem/1 var(--sans);
  padding: 14px 22px; border-radius: 999px; text-decoration: none; border: 1.5px solid transparent;
  cursor: pointer; transition: .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--sand); color: var(--navy); }
.btn-outline-light { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-outline-light:hover { border-color: #fff; color: #fff; }
.btn-sm { padding: 9px 14px; font-size: .85rem; }
.btn svg { width: 18px; height: 18px; }
.arrow-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.arrow-link::after { content: "→"; transition: transform .18s; }
.arrow-link:hover::after { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 48px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 10px; }
.hero h1 em { font-style: italic; color: var(--ocean); font-weight: 400; }
.hero .dv-name { font: 500 1.6rem/1.4 var(--thaana); color: var(--muted); margin-bottom: 24px; display: block; text-align: left; }
.hero .lede { max-width: 560px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-figure { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--shadow); }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; object-position: 54% 30%; }
.hero-figure figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 22px 18px; color: #fff; font-size: .82rem;
  background: linear-gradient(transparent, rgba(5, 18, 32, .75));
}
.hero-meta { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-meta div { font-size: .88rem; color: var(--muted); }
.hero-meta strong { display: block; font: 600 1.05rem/1.3 var(--sans); color: var(--ink); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-figure { aspect-ratio: 4/4.2; order: -1; }
}

/* ---------- Sections ---------- */
section { padding: 104px 0; }
section.tight { padding: 72px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head p { max-width: 560px; margin: 0; color: var(--muted); }
.bg-sand { background: var(--sand); }
.bg-navy { background: var(--navy); color: #dbe6f1; }
.bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy .muted { color: #9fb3c8; }
@media (max-width: 700px) { section { padding: 72px 0; } }

/* Quote band */
.quote-band { padding: 96px 0; background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.quote-band::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background: radial-gradient(60% 80% at 85% 20%, rgba(15,110,120,.55), transparent 60%),
              radial-gradient(50% 70% at 0% 100%, rgba(18,53,91,.9), transparent 70%);
}
.quote-band blockquote { position: relative; margin: 0; font: 400 clamp(1.6rem, 3vw, 2.5rem)/1.3 var(--serif); letter-spacing: -.01em; max-width: 960px; }
.quote-band blockquote::before { content: "“"; display: block; font-size: 5rem; line-height: .6; color: #8fd3d9; margin-bottom: 18px; }
.quote-band cite { display: block; margin-top: 24px; font: 500 .95rem var(--sans); color: #9fb3c8; font-style: normal; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 34px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .num { font: 500 clamp(2.2rem, 4vw, 3.2rem)/1 var(--serif); color: var(--navy); margin-bottom: 10px; }
.stat .label { color: var(--muted); font-size: .93rem; line-height: 1.45; }
@media (max-width: 800px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* Priority cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  display: flex; flex-direction: column; transition: .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 22px;
  background: #e2f1f2; color: var(--ocean);
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .97rem; flex: 1; }
.card .tag { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }

/* Feature split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 3/2; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media.tall { aspect-ratio: 4/5; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } .split.reverse .split-media { order: 0; } }

.checklist { list-style: none; padding: 0; margin: 24px 0; }
.checklist li { position: relative; padding-left: 32px; margin-bottom: 14px; color: var(--ink-2); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ocean) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* Timeline */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 118px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.timeline li { display: grid; grid-template-columns: 100px 1fr; gap: 40px; padding: 0 0 34px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 112px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--ocean);
}
.bg-sand .timeline li::before { background: var(--sand); }
.timeline .when { font: 600 .9rem/1.6 var(--sans); color: var(--ocean); text-align: right; }
.timeline h4 { font: 600 1.08rem/1.35 var(--sans); margin: 0 0 4px; }
.timeline p { margin: 0; color: var(--muted); font-size: .96rem; }
@media (max-width: 640px) {
  .timeline::before { left: 7px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; padding-left: 34px; }
  .timeline li::before { left: 1px; }
  .timeline .when { text-align: left; }
}

/* Press list (home) */
.press-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.press-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 12px; transition: .2s;
}
.press-item:hover { box-shadow: var(--shadow); }
.press-item .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .83rem; color: var(--muted); }
.press-item .pub { font-weight: 600; color: var(--ink-2); }
.press-item h3 { font: 600 1.08rem/1.4 var(--sans); margin: 0; }
.press-item h3 a { color: var(--ink); text-decoration: none; }
.press-item h3 a:hover { color: var(--ocean); }
.press-item h3.dv { font-family: var(--thaana); font-size: 1.15rem; line-height: 1.8; text-align: right; }
.press-item .sub { font-size: .86rem; color: var(--muted); margin: -4px 0 0; font-style: italic; }
.press-item .excerpt { font-size: .92rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.press-item .excerpt.dv { text-align: right; }
.press-item .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.press-item .thumb { aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--sand); margin: -6px -6px 4px; }
.press-item .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Status badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font: 600 .74rem/1.3 var(--sans); letter-spacing: .02em; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.online { color: var(--live); background: var(--live-bg); }
.badge.online::before { box-shadow: 0 0 0 3px rgba(29,122,70,.18); }
.badge.removed { color: var(--removed); background: var(--removed-bg); }
.badge.unverified { color: var(--unverified); background: var(--unverified-bg); }
.badge.pending { color: var(--pending); background: var(--pending-bg); }
.badge.archived { color: var(--navy); background: #e5ecf4; }
.badge.archived::before { display: none; }
.badge.type { color: var(--ink-2); background: var(--sand); }
.badge.type::before { display: none; }
.chip-action {
  display: inline-flex; align-items: center; gap: 6px; font: 600 .82rem/1 var(--sans); text-decoration: none;
  padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--ink-2); background: #fff;
}
.chip-action:hover { border-color: var(--ink); color: var(--ink); }
.chip-action.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip-action.primary:hover { background: var(--navy-2); color: #fff; }
.chip-action svg { width: 14px; height: 14px; }

/* Archive callout */
.archive-callout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.archive-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.archive-stats .box { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 22px; }
.archive-stats .n { font: 500 2.4rem/1 var(--serif); color: #fff; margin-bottom: 8px; }
.archive-stats .l { font-size: .88rem; color: #9fb3c8; display: flex; align-items: center; gap: 8px; }
.archive-stats .dot { width: 8px; height: 8px; border-radius: 50%; }
@media (max-width: 900px) { .archive-callout { grid-template-columns: 1fr; } }

/* ---------- Page header ---------- */
.page-head { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.3rem, 4.6vw, 3.8rem); margin-bottom: 18px; }
.page-head .lede { max-width: 720px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* ---------- Prose (biography) ---------- */
.prose-layout { display: grid; grid-template-columns: 240px 1fr; gap: 72px; align-items: start; }
.toc { position: sticky; top: 100px; font-size: .92rem; }
.toc strong { display: block; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.toc a { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.active { color: var(--ink); border-color: var(--ocean); }
.prose { max-width: 720px; }
.prose h2 { font-size: 2rem; margin-top: 2.2em; scroll-margin-top: 100px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--sans); font-size: 1.12rem; font-weight: 700; margin-top: 1.8em; }
.prose p { color: var(--ink-2); }
.prose figure { margin: 36px 0; }
.prose figure img { border-radius: 14px; }
.prose figcaption { font-size: .84rem; color: var(--muted); margin-top: 10px; }
.prose .pull { border-left: 3px solid var(--ocean); padding: 4px 0 4px 22px; margin: 32px 0; font: 400 1.35rem/1.45 var(--serif); color: var(--ink); }
.fact-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .95rem; }
.fact-table th, .fact-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fact-table th { font-weight: 600; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.cert-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; padding: 0; list-style: none; }
.cert-list li { background: #fff; border: 1px solid var(--line); padding: 7px 12px; border-radius: 8px; font-size: .88rem; font-weight: 500; }
@media (max-width: 900px) { .prose-layout { grid-template-columns: 1fr; gap: 0; } .toc { display: none; } }

/* Election bar chart */
.bars { display: grid; gap: 12px; margin: 22px 0; }
.bar-row { display: grid; grid-template-columns: 190px 1fr 86px; align-items: center; gap: 14px; font-size: .92rem; }
.bar-track { height: 12px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--line-2); border-radius: 999px; }
.bar-row.win .bar-fill { background: var(--ocean); }
.bar-row.win { font-weight: 600; }
.bar-row .v { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .bar-row { grid-template-columns: 1fr 64px; } .bar-row .bar-track { grid-column: 1 / -1; order: 3; } }

/* Record grid */
.record-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.record-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.record-card .when { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ocean); margin-bottom: 10px; }
.record-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.record-card p { color: var(--muted); font-size: .95rem; margin-bottom: .6em; }
.record-card .outcome { font-size: .88rem; color: var(--ink-2); background: var(--sand); padding: 10px 12px; border-radius: 8px; margin-top: 12px; }
.record-card .outcome b { color: var(--ink); }

.committee-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; padding: 0; list-style: none; margin: 0; }
.committee-list li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.committee-list b { display: block; font-weight: 600; margin-bottom: 4px; }
.committee-list span { color: var(--muted); font-size: .9rem; }

/* ---------- Press archive page ---------- */
.archive-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 36px; }
.sum-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; text-align: left; cursor: pointer; font: inherit; color: inherit; transition: .15s; }
.sum-box:hover { border-color: var(--ink-2); }
.sum-box.active { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.sum-box .n { font: 500 2rem/1 var(--serif); margin-bottom: 6px; }
.sum-box .l { font-size: .84rem; color: var(--muted); display: flex; gap: 7px; align-items: center; }
.sum-box .l i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
@media (max-width: 900px) { .archive-summary { grid-template-columns: repeat(2, 1fr); } .archive-summary .sum-box:first-child { grid-column: 1/-1; } }

.toolbar {
  position: sticky; top: 74px; z-index: 20; background: rgba(251,248,243,.95); backdrop-filter: blur(10px);
  padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 28px;
}
.toolbar .wrap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { flex: 1 1 280px; position: relative; }
.search input {
  width: 100%; padding: 12px 16px 12px 42px; border-radius: 10px; border: 1px solid var(--line-2);
  font: inherit; font-size: .95rem; background: #fff; color: var(--ink);
}
.search input:focus, .toolbar select:focus { outline: 2px solid var(--ocean); outline-offset: 1px; border-color: transparent; }
.search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); }
.toolbar select {
  padding: 12px 34px 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff;
  font: inherit; font-size: .92rem; color: var(--ink); appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6b79' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.result-count { font-size: .9rem; color: var(--muted); margin: 0 0 18px; }
.archive-table { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 110px 1fr 220px; gap: 28px; padding: 24px 4px; border-bottom: 1px solid var(--line);
  align-items: start;
}
.row .date { font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 3px; }
.row .date b { display: block; color: var(--ink); font-size: 1rem; font-weight: 600; }
.row h3 { font: 600 1.08rem/1.45 var(--sans); margin: 0 0 6px; }
.row h3 a { color: var(--ink); text-decoration: none; }
.row h3 a:hover { color: var(--ocean); }
.row h3.dv { font-family: var(--thaana); font-size: 1.15rem; line-height: 1.9; text-align: right; }
.row .sub { font-size: .87rem; color: var(--muted); font-style: italic; margin: 0 0 6px; }
.row .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .84rem; color: var(--muted); }
.row .meta .pub { font-weight: 600; color: var(--ink-2); }
.row .status-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.row .status-note { font-size: .78rem; color: var(--muted); text-align: right; line-height: 1.4; }
.row .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 800px) {
  .row { grid-template-columns: 1fr; gap: 10px; }
  .row .date b { display: inline; margin-right: 6px; }
  .row .status-col { align-items: flex-start; }
  .row .status-note { text-align: left; }
  .row .actions { justify-content: flex-start; }
}
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 18px; }
.legend div { font-size: .9rem; color: var(--muted); }
.legend .badge { margin-bottom: 8px; }
.pager { display: flex; justify-content: center; margin: 36px 0 0; }

/* ---------- Archived article reader ---------- */
.archive-banner { border-radius: 14px; padding: 18px 22px; display: flex; gap: 16px; align-items: flex-start; margin: 0 0 36px; font-size: .94rem; }
.archive-banner svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.archive-banner.removed { background: var(--removed-bg); color: #7a1a12; border: 1px solid #f5c6c0; }
.archive-banner.online { background: var(--live-bg); color: #14532d; border: 1px solid #bfe3cc; }
.archive-banner.unverified, .archive-banner.pending { background: var(--unverified-bg); color: #5c3d00; border: 1px solid #f0dca8; }
.archive-banner b { display: block; margin-bottom: 2px; }
.reader h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 18px; }
.reader h1.dv { font-family: var(--thaana); line-height: 1.7; text-align: right; font-weight: 600; }
.reader .byline { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .92rem; padding-bottom: 24px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.reader .lead-img { border-radius: 14px; margin-bottom: 32px; width: 100%; }
.reader .body p { font-size: 1.08rem; line-height: 1.8; color: var(--ink-2); }
.reader .body.dv p, .reader .body.dv h2, .reader .body.dv h3 { font-family: var(--thaana); text-align: right; font-size: 1.15rem; line-height: 2.1; }
.reader .body h2 { font-size: 1.5rem; margin-top: 1.6em; }
.reader .body h3 { font-size: 1.2rem; margin-top: 1.4em; }
.reader .body blockquote { margin: 1.4em 0; padding-left: 20px; border-left: 3px solid var(--ocean); font-style: italic; }
.provenance { margin-top: 48px; padding: 24px; background: var(--sand); border-radius: 14px; font-size: .9rem; }
.provenance h4 { font: 700 .8rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.provenance dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0; }
.provenance dt { color: var(--muted); }
.provenance dd { margin: 0; word-break: break-word; }
.history-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.history-dots span { width: 12px; height: 12px; border-radius: 3px; }
@media (max-width: 600px) { .provenance dl { grid-template-columns: 1fr; } .provenance dt { margin-top: 8px; } }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery figure { margin: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--sand); }
.gallery figure.wide { grid-column: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery figure:hover img { transform: scale(1.04); }
@media (max-width: 800px) { .gallery { grid-template-columns: 1fr 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact-links { display: grid; gap: 12px; }
.contact-links a {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px; color: #fff; text-decoration: none; transition: .18s;
}
.contact-links a:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.35); }
.contact-links svg { width: 22px; height: 22px; flex: none; }
.contact-links small { display: block; color: #9fb3c8; font-size: .82rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: #061627; color: #9fb3c8; padding: 64px 0 36px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.site-footer h4 { color: #fff; font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: #c9d6e3; text-decoration: none; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .f-brand { font: 500 1.6rem/1.2 var(--serif); color: #fff; margin-bottom: 4px; }
.site-footer .f-dv { font: 500 1.1rem var(--thaana); color: #9fb3c8; margin-bottom: 16px; }
.signature { width: 160px; opacity: .85; filter: invert(1); margin-top: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1/-1; } }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* fixes */
[hidden] { display: none !important; }
.toolbar select { flex: 1 1 150px; min-width: 0; }
@media (max-width: 640px) { .toolbar { position: static; } .toolbar select { flex-basis: calc(50% - 5px); } }

/* ---------- Speeches & documents ---------- */
.dv-title { font-family: var(--thaana); direction: rtl; text-align: right; color: var(--muted); font-size: 1.1rem; line-height: 1.8; margin: 0 0 8px; }
.tag { display: inline-block; font-size: .76rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #e3f0f1; color: var(--ocean); }
.empty-state { text-align: center; padding: 64px 24px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: #fff; color: var(--muted); }
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }
.empty-state p { max-width: 560px; margin: 0 auto; }

.speech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.speech-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s; }
.speech-card:hover { box-shadow: var(--shadow); }
.speech-thumb { position: relative; display: block; aspect-ratio: 16/9; background: var(--navy); }
.speech-thumb img { width: 100%; height: 100%; object-fit: cover; }
.speech-thumb .dur { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.78); color: #fff; font-size: .78rem; font-weight: 600; padding: 2px 7px; border-radius: 5px; }
.play { position: absolute; inset: 0; display: grid; place-items: center; }
.play svg { width: 64px; height: 46px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); transition: transform .15s; }
.speech-thumb:hover .play svg, .yt-btn:hover .play svg { transform: scale(1.08); }
.speech-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.speech-body .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .83rem; color: var(--muted); }
.speech-body h3 { font: 600 1.1rem/1.4 var(--sans); margin: 0; }
.speech-body h3 a { color: var(--ink); text-decoration: none; }
.speech-body h3 a:hover { color: var(--ocean); }
.speech-body .excerpt { font-size: .92rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.doc-list { border-top: 1px solid var(--line); }
.doc-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 24px; align-items: start; padding: 22px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; transition: background .15s; }
.doc-row:hover { background: #fff; }
.doc-row:hover b { color: var(--ocean); }
.doc-date { font-size: .88rem; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.doc-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.doc-main b { font-size: 1.06rem; font-weight: 600; line-height: 1.4; color: var(--ink); }
.doc-main .excerpt { font-size: .92rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-type { font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ocean); display: flex; gap: 8px; align-items: center; }
.pdf-flag { font-size: .68rem; letter-spacing: .04em; background: #fde8e6; color: #b42318; padding: 1px 6px; border-radius: 4px; }
.doc-status { display: inline-block; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--pending-bg); color: var(--ink-2); white-space: nowrap; }
.doc-status.s-ratified, .doc-status.s-passed, .doc-status.s-adopted { background: var(--live-bg); color: var(--live); }
.doc-status.s-committee, .doc-status.s-accepted, .doc-status.s-answered { background: #e3f0f1; color: var(--ocean); }
.doc-status.s-rejected, .doc-status.s-withdrawn { background: var(--removed-bg); color: var(--removed); }
@media (max-width: 700px) { .doc-row { grid-template-columns: 1fr; gap: 6px; } .doc-row .doc-status { justify-self: start; } }

.detail h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 10px 0 12px; }
.detail .byline { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; color: var(--muted); font-size: .92rem; margin: 6px 0 28px; }
.detail .summary p { font-size: 1.12rem; line-height: 1.75; color: var(--ink-2); }
.detail .dv, .transcript .dv { font-family: var(--thaana); direction: rtl; text-align: right; font-size: 1.15rem; line-height: 2.1; }
.yt { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.yt iframe, .yt-btn { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-btn { padding: 0; cursor: pointer; background: #000; }
.yt-btn img { width: 100%; height: 100%; object-fit: cover; }
.yt-btn .play svg { width: 84px; height: 60px; }
.yt-note { font-size: .84rem; color: var(--muted); margin: 10px 0 30px; }
.outcome-box { background: var(--sand); border-radius: 12px; padding: 16px 20px; margin: 22px 0; }
.outcome-box b { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.outcome-box p { margin: 0; }
.doc-facts { display: grid; grid-template-columns: 160px 1fr; gap: 10px 18px; margin: 26px 0; padding: 22px 0; border-block: 1px solid var(--line); font-size: .94rem; }
.doc-facts dt { color: var(--muted); }
.doc-facts dd { margin: 0; }
@media (max-width: 600px) { .doc-facts { grid-template-columns: 1fr; gap: 2px; } .doc-facts dd { margin-bottom: 10px; } }
.pdf-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pdf-view { width: 100%; height: 80vh; min-height: 480px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pdf-missing { padding: 18px 20px; border: 1px dashed var(--line-2); border-radius: 12px; }
.transcript { margin-top: 44px; }
.transcript h2 { font-size: 1.5rem; margin-bottom: 14px; }
.transcript p { line-height: 1.8; color: var(--ink-2); }
.related { margin-top: 44px; padding: 22px 24px; background: var(--sand); border-radius: 14px; display: flex; flex-direction: column; gap: 4px; }
.related h4 { font: 700 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.related a { display: flex; flex-direction: column; padding: 10px 0; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-weight: 600; }
.related a span { font-size: .8rem; color: var(--muted); font-weight: 500; }
.related a:hover { color: var(--ocean); }
