/*
 * Jerusalem AI site theme for the NDS table explorer.
 * Loaded after explorer.css so the upstream file can be replaced as-is when NDS-data updates.
 */
:root {
  --page: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceef1;
  --ink: #121316;
  --ink-2: #3a3d44;
  --muted: #60656d;
  --grid: #e1e4e8;
  --baseline: #c9cdd3;
  --border: #e1e4e8;
  /* Fills use ink like the site's solid buttons; orange is kept for text links and highlights (AA on white). */
  --accent: #121316;
  --accent-ink: #c2410c;
  --accent-wash: #fff4ea;
  --meter-track: #ffe2cc;
  --meter-fill: #ff7a1a;
  --shadow: 0 1px 0 rgba(18, 19, 22, 0.03), 0 18px 50px -20px rgba(18, 19, 22, 0.25);
  --radius: 18px;
  --glow: linear-gradient(100deg, #ff7a1a 0%, #ff4f8b 45%, #7c5cff 75%, #2f8bff 100%);
  font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
}
:root[data-theme="dark"] {
  --page: #0e0f11;
  --surface: #17181b;
  --surface-2: #212328;
  --ink: #f4f5f7;
  --ink-2: #c9ccd2;
  --muted: #9aa0a8;
  --grid: #2a2c31;
  --baseline: #3a3d44;
  --border: #2a2c31;
  --accent: #f4f5f7;
  --accent-ink: #ffa463;
  --accent-wash: #2a1a0e;
  --meter-track: #4a2a12;
  --meter-fill: #ff7a1a;
}

body { font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; }
.mono, .tab .count, .tile .label, thead th, .kv dt, .facet-head h3, .chip, .btn {
  font-family: "Geist Mono", ui-monospace, monospace;
}
::selection { background: #ff7a1a; color: #fff; }
:focus-visible { outline: 2px solid #ff7a1a; outline-offset: 2px; }
a { color: var(--accent-ink); }

/* Buttons: pill shaped, like the site */
.btn {
  border-radius: 999px; min-height: 40px; padding: 0 16px;
  font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
  color: var(--page); transition: background-color .25s, color .25s, border-color .25s;
}
.btn:hover { filter: none; background: var(--ink-2); border-color: var(--ink-2); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface); border-color: var(--ink); }
.btn.icon { width: 40px; height: 40px; min-height: 40px; font-family: inherit; text-transform: none; letter-spacing: 0; }
.link { color: var(--accent-ink); font-weight: 500; }

/* Top bar */
.topbar { padding: 14px 28px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 40; }
.brand { gap: 14px; }
.brand-logo { width: 40px; height: 40px; flex: none; }
:root[data-theme="dark"] .brand-logo { filter: invert(1); }
.brand h1 { font-size: 20px; letter-spacing: -0.02em; }
.brand p { font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.brand a { color: inherit; text-decoration: none; }

/* Dataset tabs */
.tabs { padding: 0 28px; gap: 6px; }
.tab { padding: 14px 14px 12px; font-size: 15px; color: var(--muted); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: #ff7a1a; border-bottom-width: 2px; }
.tab .count { font-size: 11px; }
.tab[aria-selected="true"] .count { background: var(--ink); color: var(--page); }

/* Layout and cards */
.layout { padding: 28px; gap: 24px; grid-template-columns: 290px minmax(0, 1fr); }
.sidebar { border: 0; box-shadow: var(--shadow); padding: 18px 20px; top: 92px; max-height: calc(100vh - 110px); }
.sidebar-head h2 { font-size: 17px; }
.facet-head h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.opt { font-size: 14.5px; padding: 5px 6px; }
.opt input { accent-color: #ff7a1a; width: 16px; height: 16px; }
.facet-search, .search input, select { border-radius: 12px; }
.dataset-intro h2 { font-size: clamp(26px, 3vw, 40px); letter-spacing: -0.03em; line-height: 1.05; }
.dataset-intro p { font-size: 16px; color: var(--ink-2); margin: 10px 0 20px; }
.tile { border: 0; box-shadow: var(--shadow); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); }
.tile .label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile .value { font-weight: 500; letter-spacing: -0.02em; }
.search input { min-height: 44px; font-size: 15px; background: var(--surface); }
@media (min-width: 701px) {
  .table-wrap { border: 0; box-shadow: var(--shadow); border-radius: var(--radius); background: var(--surface); }
}
thead th { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
thead th .arrow { color: #ff7a1a; }
tbody td { font-size: 14.5px; }
tbody tr:hover td { background: var(--accent-wash); }
.chip { background: var(--ink); color: var(--page); font-size: 11px; letter-spacing: .04em; }
.pager .page-btn[aria-current="page"] { background: var(--ink); color: var(--page); border-color: var(--ink); }
.drawer { border-radius: 22px 0 0 22px; }
.drawer-head h2 { font-size: 24px; letter-spacing: -0.02em; }
.kv dt { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.footer { padding: 20px 28px 40px; font-size: 13px; line-height: 1.6; }

@media (max-width: 700px) {
  .topbar { padding: 10px 14px; }
  .brand-logo { width: 34px; height: 34px; }
  .brand h1 { font-size: 17px; }
  .tabs { padding: 0 8px; }
  .layout { padding: 14px; }
  .sidebar { top: auto; max-height: none; }
  .btn { min-height: 44px; }
  .classic-link { display: inline-flex; }
  tbody tr { border-radius: var(--radius); box-shadow: var(--shadow); border: 0 !important; }
}
