:root {
  --paper: #f6f3ec;
  --paper-2: #efeae0;
  --card: #fbf9f4;
  --ink: #17150f;
  --ink-2: #3b372e;
  --muted: #6f695d;
  --rule: #ddd5c6;
  --accent: #0f5c4a;
  --active: #0f5c4a;
  --planned: #b07a1c;
  --done: #4f5b55;
  --hold: #a23b2a;
  --track: #e4ddcf;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --arabic: "IBM Plex Sans Arabic", "Noto Naskh Arabic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14130f;
    --paper-2: #1b1a15;
    --card: #1c1b16;
    --ink: #efe9dc;
    --ink-2: #d4cdbd;
    --muted: #9b9484;
    --rule: #34312a;
    --accent: #5cc3a4;
    --active: #5cc3a4;
    --planned: #e0a948;
    --done: #a3ada7;
    --hold: #e07a66;
    --track: #2c2a23;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  font-feature-settings: "tnum" 1, "cv11" 1;
}
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.ar { font-family: var(--arabic); direction: rtl; unicode-bidi: isolate; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--ink); }
.masthead .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 14px; }
.wordmark { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.wordmark span { font-style: italic; font-weight: 400; }
.masthead nav { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }

/* Hero */
.hero { padding: 56px 0 28px; border-bottom: 1px solid var(--rule); }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 6vw, 60px); line-height: 1.04; letter-spacing: -0.025em; margin: 0 0 18px; max-width: 16ch; }
.hero h1 em { color: var(--accent); }
.hero p { font-size: 18px; color: var(--ink-2); max-width: 56ch; margin: 0; }
.promise { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; font-size: 14px; color: var(--ink-2); }
.promise span::before { content: "✓"; color: var(--accent); margin-right: 7px; font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--rule); }
.stat { padding: 20px 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--rule); }
.stat b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; }
.stat small { color: var(--muted); font-size: 13px; }

/* Filters */
.filters { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 18px 0 14px; border-bottom: 1px solid var(--rule); }
.search { width: 100%; font: 18px var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 13px 16px; outline: none; }
.search:focus { border-color: var(--ink); }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 13px var(--sans); color: var(--ink-2); background: transparent; border: 1px solid var(--rule); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
select { font: 13px var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 7px 10px; max-width: 220px; }
.count { margin-left: auto; font-size: 13px; color: var(--muted); }

/* Results */
.results { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 210px 90px; gap: 24px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.row:hover .row-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.row-name { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
.row-meta { font-size: 14px; color: var(--muted); margin-top: 3px; }
.row-progress { display: grid; gap: 6px; }
.row-progress .line { display: flex; justify-content: space-between; font-size: 13px; }
.row-year { text-align: right; font-size: 13px; color: var(--muted); }
.row-year b { display: block; font-family: var(--serif); font-size: 19px; font-weight: 500; color: var(--ink); }
.row-year.late { color: var(--hold); }
.row-year.late b { color: var(--muted); }
.more { display: block; margin: 28px auto 60px; font: 500 14px var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 999px; padding: 11px 26px; cursor: pointer; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* Status + progress */
.status { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.status.active { color: var(--active); }
.status.planned { color: var(--planned); }
.status.done { color: var(--done); }
.status.hold { color: var(--hold); }
.progress { height: 6px; background: var(--track); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; background: var(--active); }
.progress-bar.planned { background: var(--planned); }
.progress-bar.done { background: var(--done); }
.progress-bar.hold { background: var(--hold); }

/* Project page */
.crumbs { padding: 22px 0 0; font-size: 14px; color: var(--muted); }
.project-head { padding: 26px 0 30px; border-bottom: 1px solid var(--rule); }
.eyebrow { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.project-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 6vw, 58px); line-height: 1.05; letter-spacing: -0.025em; margin: 10px 0 6px; }
.project-head .ar { font-size: 20px; color: var(--muted); display: block; text-align: left; }
.project-head .by { font-size: 17px; color: var(--ink-2); margin-top: 14px; }

.progress-panel { display: grid; grid-template-columns: auto 1fr; gap: 10px 28px; align-items: end; padding: 30px 0; border-bottom: 1px solid var(--rule); }
.big-pct { font-family: var(--serif); font-size: clamp(56px, 10vw, 92px); font-weight: 400; line-height: 0.9; letter-spacing: -0.04em; }
.progress-panel .progress { height: 10px; }
.progress-panel .note { grid-column: 2; font-size: 14px; color: var(--muted); }
.progress-panel .label { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }

.block { padding: 30px 0; border-bottom: 1px solid var(--rule); }
.block h2 { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; margin: 0; }
.fact { padding: 12px 0; border-top: 1px solid var(--rule); }
.fact dt { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.fact dd { margin: 3px 0 0; font-size: 16px; }
.desc { max-width: 68ch; font-size: 17px; color: var(--ink-2); margin: 0; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; background: var(--paper-2); border-radius: 14px; padding: 28px; }
.plans p { margin: 0 0 8px; color: var(--ink-2); }
.plan-sketch { width: 100%; max-width: 320px; justify-self: end; aspect-ratio: 4 / 3; border: 1.5px solid var(--rule); border-radius: 6px; position: relative; background:
  linear-gradient(var(--rule), var(--rule)) 38% 0 / 1.5px 62% no-repeat,
  linear-gradient(var(--rule), var(--rule)) 0 62% / 100% 1.5px no-repeat,
  linear-gradient(var(--rule), var(--rule)) 70% 100% / 1.5px 38% no-repeat; }

footer { padding: 34px 0 60px; font-size: 13px; color: var(--muted); }
footer p { margin: 0 0 6px; max-width: 80ch; }

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .masthead nav { display: none; }
  .hero { padding-top: 36px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .row { grid-template-columns: minmax(0, 1fr) 64px; gap: 10px 16px; }
  .row-progress { grid-column: 1 / -1; grid-row: 2; }
  .facts { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .progress-panel { grid-template-columns: 1fr; }
  .progress-panel .note { grid-column: 1; }
  .count { margin-left: 0; width: 100%; }
  select { max-width: 100%; flex: 1 1 140px; }
}
