:root {
  --ink: #132030; --ink-2: #3b4a5c; --muted: #6b7a8c;
  --paper: #f7f5ef; --surface: #fff; --surface-2: #efece3;
  --line: #ddd8cc; --line-2: #c9c2b2;
  --navy: #0d1b2a; --navy-2: #152a40;
  --accent: #0f766e; --accent-soft: #e2f1ed; --accent-ink: #0b5a54;
  --amber: #a35b0a; --amber-soft: #fbf0dc;
  --danger: #b42318; --danger-soft: #fde8e6;
  --radius: 10px; --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(19, 32, 48, .05), 0 14px 34px -20px rgba(19, 32, 48, .35);
  --shadow-sm: 0 1px 2px rgba(19, 32, 48, .04), 0 8px 20px -16px rgba(19, 32, 48, .28);
  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  background-image: radial-gradient(1100px 420px at 50% -180px, #fffdf7 0%, rgba(255, 253, 247, 0) 72%);
  background-repeat: no-repeat;
  font: 15px/1.55 var(--sans); font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); color: var(--accent-ink); }
a { color: var(--accent-ink); }
h1, h2, h3, .serif { font-family: var(--serif); letter-spacing: -.02em; }
h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.05; margin: 6px 0 12px; }
h2 { font-size: 24px; margin: 0 0 8px; }
h3 { font-size: 17px; margin: 0; }
p { margin: 0 0 10px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 60;
  background: var(--surface); padding: 10px 14px; border-radius: var(--radius);
}
.skip:focus { left: 16px; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff;
  height: 64px; display: flex; align-items: center; gap: 24px; padding: 0 24px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .07), 0 12px 28px -22px #000;
}
.brand {
  font: 600 22px var(--serif); color: #fff; text-decoration: none; letter-spacing: -.02em;
  white-space: nowrap;
}
.brand span { color: #83dfbf; }
.nav { display: flex; gap: 20px; flex: 1; }
.nav a {
  color: #cfd9e4; text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active { color: #fff; border-color: #83dfbf; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--navy-2); color: #dfe7ef; border: 1px solid #2b405a;
  border-radius: 999px; padding: 7px 12px; font-size: 12px;
}
.search-trigger kbd {
  font: 11px var(--mono); background: #0a1524; border-radius: 4px; padding: 1px 5px;
  border: 1px solid #2b405a;
}
.language {
  background: var(--navy-2); color: #fff; border: 1px solid #2b405a;
  border-radius: 8px; padding: 7px 8px; font-size: 12px;
}
.account-button {
  background: #fff; color: var(--navy); border: 0; border-radius: 8px;
  padding: 8px 13px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.menu-button {
  display: none; background: transparent; color: #fff; border: 1px solid #2b405a;
  border-radius: 8px; padding: 6px 10px; font-size: 16px; cursor: pointer;
}

/* page + buttons */
.page { max-width: 1200px; margin: 0 auto; padding: 32px 24px 72px; }
.page:focus { outline: none; }
.btn, .btn-secondary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 9px 15px; border-radius: var(--radius);
  font-size: 13px; font-weight: 650; cursor: pointer; text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn:hover { background: var(--accent-ink); }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn:disabled, .btn-secondary:disabled { opacity: .55; cursor: wait; }
.icon-btn, .star {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  text-decoration: none; font-size: 15px;
}
.star[aria-pressed="true"] { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); }
.icon-btn:hover, .star:hover { background: var(--surface-2); }

/* hero */
.hero { margin-bottom: 30px; max-width: 980px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent-ink); font-size: 11px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); }
.hero h1 { max-width: 900px; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.02; }
.hero p { max-width: 700px; color: var(--ink-2); font-size: 17px; line-height: 1.6; }
.hero-search { display: flex; gap: 8px; margin: 22px 0 12px; max-width: 780px; }
.hero-search input {
  flex: 1; min-width: 0; min-height: 52px; padding: 14px 18px; font-size: 16px;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow-sm); transition: border-color 150ms ease, box-shadow 150ms ease;
}
.hero-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, .14); outline: none; }
.hero-search .btn { min-height: 52px; padding: 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px;
  font-size: 12px; color: var(--ink-2); cursor: pointer; text-decoration: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0; }

/* KPI */
.kpi-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.kpi { position: relative; background: var(--surface); padding: 22px 22px 18px; }
.kpi::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent); opacity: .9;
}
.kpi:nth-child(2)::before { background: var(--amber); }
.kpi:nth-child(3)::before { background: var(--navy); }
.kpi:nth-child(4)::before { background: var(--line-2); }
.kpi-value { font: 500 38px/1 var(--serif); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 8px; }
.kpi-note { font-size: 11px; color: var(--muted); margin-top: 10px; }

/* panels + content grid */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--line);
  background: #fcfaf5; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.panel-title { font: 600 18px var(--serif); }
.panel-sub { font-size: 12px; color: var(--muted); }
.panel-body { padding: 16px 20px; }
.panel-body.tight { padding: 4px 12px; }
.link-more { font-size: 12px; font-weight: 650; text-decoration: none; white-space: nowrap; }

/* result rows */
.row {
  display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 16px;
  padding: 16px 18px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent;
  transition: background 150ms ease;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: #fbf9f3; }
.row[data-urgency="critical"] { border-left-color: var(--danger); }
.row[data-urgency="soon"] { border-left-color: var(--amber); }
.row[data-urgency="normal"] { border-left-color: var(--accent); }
.row[data-urgency="closed"] { border-left-color: var(--line-2); }
.row-day {
  align-self: start; text-align: center; padding: 9px 4px 7px;
  background: #f1eee6; border-radius: 9px;
}
.row[data-urgency="critical"] .row-day { background: var(--danger-soft); }
.row[data-urgency="soon"] .row-day { background: var(--amber-soft); }
.row[data-urgency="normal"] .row-day { background: var(--accent-soft); }
.day-num { font: 500 23px/1 var(--serif); font-variant-numeric: tabular-nums; }
.day-month { font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-top: 2px; }
.day-rel { display: block; margin-top: 6px; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; }
.row[data-urgency="critical"] .day-rel { color: var(--danger); }
.row[data-urgency="soon"] .day-rel { color: var(--amber); }
.row[data-urgency="normal"] .day-rel { color: var(--accent-ink); }
.row[data-urgency="closed"] .day-rel { color: var(--muted); }
.row-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 5px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 5px;
  padding: 2px 7px; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; background: var(--surface-2); color: var(--ink-2);
}
.badge.source { background: var(--navy); color: #fff; }
.badge.category { background: var(--accent-soft); color: var(--accent-ink); }
.badge.open { background: var(--accent-soft); color: var(--accent-ink); }
.badge.closed { background: var(--surface-2); color: var(--muted); }
.badge.award { background: var(--amber-soft); color: var(--amber); }
.row-title { font: 600 16px/1.35 var(--serif); margin: 0 0 4px; }
.row-title a { color: var(--ink); text-decoration: none; }
.row-title a:hover { color: var(--accent-ink); }
.row-summary { color: var(--ink-2); font-size: 13px; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 11.5px; }
.row-meta strong { color: var(--ink-2); font-weight: 650; }
.row-actions { display: flex; gap: 6px; align-items: start; }

/* bars, sources */
.bar-list { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 42px; gap: 10px; align-items: center; font-size: 12px; }
.bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar-count { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.sources { display: grid; gap: 8px; }
.source { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.source-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.source-dot.stale { background: var(--amber); }
.source-dot.error { background: var(--danger); }
.source-name { font-weight: 700; width: 38px; }
.source-meta { color: var(--muted); margin-left: auto; text-align: right; }
.source-error { color: var(--danger); font-size: 11px; }

/* filters */
.filters { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px 12px; align-items: end; padding: 16px 18px 18px; }
.field { display: grid; gap: 4px; grid-column: span 2; min-width: 0; }
.field > label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.field input, .field select {
  width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line-2);
  border-radius: 8px; background: var(--surface); font-size: 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, .12); outline: none; }
.field.grow { grid-column: span 4; }
.filter-actions { grid-column: span 10; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.filters-inline, .inline-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filters-inline { padding: 12px 0 0; }
.filters-inline .field.grow, .inline-search .field.grow { flex: 1; min-width: 200px; }
.inline-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 14px 18px; margin-bottom: 16px; }
.filters-toggle { display: none; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px; background: #fcfaf5; border-bottom: 1px solid var(--line); }
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.result-head h1 { font-size: clamp(26px, 3vw, 34px); margin: 0; }
.result-count { font-size: 13px; color: var(--muted); }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: #fcfaf5; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* detail */
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.detail-aside { display: grid; gap: 16px; position: sticky; top: 84px; }
.detail-head { margin-bottom: 16px; }
.detail-head h1 { margin: 10px 0 8px; }
.detail-title-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 4px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.fact dt { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fact dd { margin: 4px 0 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.prose { color: var(--ink-2); line-height: 1.65; white-space: pre-wrap; }
.aside-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.aside-panel h2 { font-size: 16px; margin-bottom: 8px; }
.aside-panel p, .aside-panel li { font-size: 12.5px; }
.ai-section { margin-top: 14px; }
.ai-section h3 { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.ai-section ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.ai-section li { margin-bottom: 4px; }
.lock-note { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 14px; background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table a { color: var(--ink); text-decoration: none; font-weight: 600; }
.table a:hover { color: var(--accent-ink); }

/* plans */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.plan-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; position: relative; box-shadow: var(--shadow-sm); }
.plan.featured { border-color: var(--accent); box-shadow: 0 26px 50px -34px rgba(15, 118, 110, .65); }
.plan-badge {
  position: absolute; top: 16px; right: 16px; background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 999px; padding: 4px 9px; font-size: 9.5px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
}
.plan h2 { font-size: 21px; }
.plan-price { font: 500 34px var(--serif); margin: 10px 0 4px; letter-spacing: -.02em; }
.plan ul { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.plan li::before { content: "✓"; color: var(--accent); margin-right: 7px; font-weight: 700; }
.plan-note { font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.cycle { display: flex; gap: 6px; margin: 6px 0 10px; }
.cycle-select { min-height: 36px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); font-size: 12px; }
.compare { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.compare th, .compare td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.compare th:not(:first-child), .compare td:not(:first-child) { text-align: center; }
.compare td:not(:first-child) { font-weight: 700; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 13.5px; }
.faq p { margin: 8px 0 0; color: var(--ink-2); font-size: 13px; }

/* api page */
.api-list { display: grid; gap: 8px; }
.endpoint { display: flex; gap: 10px; align-items: baseline; font-size: 13px; flex-wrap: wrap; }
.method { font: 700 10px var(--mono); background: var(--accent-soft); color: var(--accent-ink); border-radius: 4px; padding: 2px 6px; }
code, pre { font-family: var(--mono); font-size: 12px; }
pre { background: var(--navy); color: #e7eef6; padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; }
.endpoint code { color: var(--ink); }
.params { color: var(--muted); font-size: 12px; }

/* states */
.empty, .error-panel {
  padding: 40px 22px; text-align: center; color: var(--muted); font-size: 14px;
}
.empty h2, .error-panel h2 { color: var(--ink); font-size: 20px; }
.error-panel { color: var(--danger); }
.error-panel .btn-secondary { margin-top: 10px; }
.skeleton { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.skeleton span {
  display: block; height: 12px; border-radius: 5px; margin-bottom: 8px;
  background: linear-gradient(90deg, var(--surface-2) 0%, #f6f3ec 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s ease infinite;
}
.skeleton span:first-child { width: 62%; }
.skeleton span:nth-child(2) { width: 92%; }
.skeleton span:last-child { width: 38%; margin-bottom: 0; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.spinner::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  display: inline-block; margin-right: 6px; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* toast + dialog */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 11px 16px; border-radius: var(--radius);
  font-size: 13px; opacity: 0; pointer-events: none; transition: opacity 150ms ease, transform 150ms ease;
  max-width: calc(100% - 32px); z-index: 40;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#account-dialog {
  border: 0; border-radius: var(--radius-lg); padding: 24px; max-width: 460px;
  width: calc(100% - 32px); background: var(--surface); color: var(--ink);
  box-shadow: 0 24px 80px rgba(13, 27, 42, .35);
}
#account-dialog::backdrop { background: rgba(13, 27, 42, .55); }
#account-dialog h2 { margin: 0 0 8px; }
#account-status { font-size: 13px; color: var(--ink-2); min-height: 18px; }
#account-form { display: grid; gap: 8px; margin-top: 12px; }
#account-dialog label { font-size: 12px; font-weight: 700; }
#account-dialog input {
  border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; background: var(--surface);
}
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.account-close { margin-top: 6px; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 28px 24px 40px;
  display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}
.footer-brand { display: block; font: 600 17px var(--serif); color: var(--ink); margin-bottom: 6px; }
.footer-note { max-width: 460px; line-height: 1.6; margin: 0; }
.footer-links { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--accent-ink); }

@media (max-width: 980px) {
  .grid-2, .detail { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: 1fr; }
  .field { grid-column: span 4; }
  .field.grow { grid-column: span 12; }
  .filter-actions { grid-column: 1 / -1; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; gap: 0; background: var(--navy); padding: 8px 24px 16px;
    border-top: 1px solid #223549;
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 0; border-bottom: 1px solid #1b2d42; }
  .menu-button { display: inline-block; }
  .search-trigger-label { display: none; }
}
@media (max-width: 640px) {
  .page { padding: 22px 14px 52px; }
  .topbar { padding: 0 14px; gap: 8px; }
  .brand { font-size: 19px; }
  .language { padding: 6px; }
  .account-button { padding: 7px 9px; }
  .search-trigger { display: none; }
  .row { grid-template-columns: 48px minmax(0, 1fr); padding: 13px 12px; }
  .row-actions { grid-column: 2; justify-content: flex-end; }
  .filters-toggle { display: inline-flex; }
  .filters.collapsed .field, .filters.collapsed .filter-actions { display: none; }
  .field { grid-column: span 12; }
  .filter-actions { grid-column: span 12; }
  .filter-actions .btn, .filter-actions .btn-ghost { flex: 1; }
  .facts { grid-template-columns: 1fr; }
  .row-meta { gap: 4px 10px; }
  .hero-search { flex-direction: column; }
  .detail-title-actions .btn, .detail-title-actions .btn-secondary { width: 100%; }
  .footer-inner { flex-direction: column; gap: 18px; padding: 24px 16px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .skeleton span { background: var(--surface-2); }
}
