/* AI Opportunity Scout · AI SkillBridge design system (docs/AISB-DESIGN.md).
   Light only: warm canvas, ink text, orange as the one accent, teal as the quiet secondary,
   exactly one dark panel per page (the stats band on the dashboard). */
:root {
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bg: #faf8f6;
  --card: #ffffff;
  --light: #f5f1ef;
  --ink: #232b2b;
  --soft: #454f4e;
  --muted: #6f6f6b;
  --line: rgba(35, 43, 43, 0.12);
  --line-hover: rgba(35, 43, 43, 0.28);
  --orange: #ff791a;
  --orange-hi: #ffb866;
  --orange-light: #ffa64d;
  --orange-deep: #e05e00;
  --orange-text: #c25400;
  --orange-tint: rgba(255, 121, 26, 0.1);
  --orange-edge: rgba(255, 121, 26, 0.35);
  --teal: #26707a;
  --teal-2: #2e8791;
  --teal-3: #1d5a63;
  --teal-tint: rgba(38, 112, 122, 0.09);
  --teal-edge: rgba(38, 112, 122, 0.28);
  --green: #2eb872;
  --brick: #c0392b;
  --shadow-sm: 0 1px 2px rgba(35, 43, 43, 0.04), 0 6px 20px rgba(35, 43, 43, 0.05);
  --shadow-lg: 0 20px 48px rgba(35, 43, 43, 0.12), 0 0 44px rgba(255, 121, 26, 0.1);
  --side: clamp(16px, 5vw, 60px);
  --max: 1160px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(255, 121, 26, 0.25); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #d9d2cd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-3); }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
em { font-style: italic; color: var(--orange); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--side); }

/* ---------- Shared bits ---------- */
.kicker {
  margin: 0; font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted);
}
.kicker::before { content: '◆'; color: var(--orange); font-size: 9px; margin-right: 10px; vertical-align: 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; background: var(--muted); }
.dot.green { background: var(--green); }
.dot.orange { background: var(--orange); }
.dot.teal { background: var(--teal); }
.dot.brick { background: var(--brick); }
.dot.idle { background: #cfc8c2; }
.dot.live { animation: dot-pulse-green 2s ease-in-out infinite; }
.dot.hot { animation: dot-pulse-orange 2s ease-in-out infinite; }
@keyframes dot-pulse-green { 0%, 100% { box-shadow: 0 0 0 0 rgba(46, 184, 114, 0.45); } 50% { box-shadow: 0 0 0 6px rgba(46, 184, 114, 0); } }
@keyframes dot-pulse-orange { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 121, 26, 0.5); } 50% { box-shadow: 0 0 0 5px rgba(255, 121, 26, 0); } }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 13px; padding: 10px 18px; min-height: 40px;
  font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer;
  text-decoration: none; overflow: hidden;
  transition: transform 200ms, box-shadow 250ms, border-color 200ms, background 200ms, color 200ms;
}
.btn::after {
  content: ''; position: absolute; top: 0; left: -130%; width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg); transition: left 600ms ease; pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn-orange {
  border: 0; color: #fff;
  background: linear-gradient(180deg, var(--orange-light) 0%, var(--orange) 100%);
  box-shadow: 0 8px 32px rgba(255, 121, 26, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-orange:hover { transform: translateY(-2px); box-shadow: 0 12px 44px rgba(255, 121, 26, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-orange .btn-arrow { transition: transform 200ms; }
.btn-orange:hover .btn-arrow { transform: translateX(3px); }
.btn-ghost { background: var(--card); color: var(--soft); border: 1px solid var(--line); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--line-hover); color: var(--ink); }
.btn-sm { min-height: 34px; padding: 7px 13px; font-size: 13px; border-radius: 11px; }
.btn-orange.btn-sm { box-shadow: 0 6px 18px rgba(255, 121, 26, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-orange.btn-sm:hover { box-shadow: 0 10px 28px rgba(255, 121, 26, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.linkbtn { border: 0; background: none; color: var(--orange-text); font-weight: 600; cursor: pointer; padding: 4px 0; font-size: 13px; }
.linkbtn:hover { color: var(--orange-deep); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Top bar ---------- */
.topbar {
  background: rgba(250, 248, 246, 0.85);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; flex: none; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(35, 43, 43, 0.15)); }
.brand-word { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.brand-app { display: none; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.brand-app::before { content: ''; display: inline-block; width: 1px; height: 18px; background: var(--line-hover); margin: 0 12px 0 4px; vertical-align: -4px; }
@media (min-width: 560px) { .brand-app { display: inline; } .brand-mark { width: 40px; height: 40px; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(28px, 6vw, 56px); padding-bottom: clamp(20px, 3vw, 28px); }
.hero::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  width: min(520px, 90vw); aspect-ratio: 1; right: -6%; top: -55%;
  background: radial-gradient(circle, rgba(255, 121, 26, 0.12), transparent 65%);
}
.hero h1 {
  margin: 14px 0 10px; font-size: clamp(34px, 5.6vw, 64px); font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.04; color: var(--ink);
}
.hero h1 em { padding-right: 0.06em; }
.hero .lede { margin: 0; max-width: 620px; font-size: clamp(15px, 1.6vw, 17px); color: var(--soft); line-height: 1.6; }

/* ---------- Stats band: the one dark panel ---------- */
.stats {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  background: linear-gradient(180deg, #262f2f 0%, #1d2424 100%);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 22px;
  box-shadow: 0 10px 26px rgba(35, 43, 43, 0.14);
  margin-bottom: clamp(30px, 4vw, 40px);
}
.stats::before {
  content: ''; position: absolute; inset: auto -10% -60% auto; width: 420px; height: 420px; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 121, 26, 0.16), transparent 65%);
}
.stat {
  position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0;
  padding: 18px 18px 16px; border: 0; background: none; text-align: left; color: #f0ebe8;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.stat:nth-child(odd) { border-right: 1px solid rgba(255, 255, 255, 0.07); }
.stat:nth-child(-n+2) { border-top: 0; }
.stat:last-child { grid-column: 1 / -1; border-right: 0; flex-direction: row; align-items: baseline; gap: 10px; }
.stat .n { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: #fff; font-variant-numeric: tabular-nums; }
.stat .n em { color: var(--orange-light); }
.stat .lbl { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; color: rgba(240, 235, 232, 0.6); }
.stat:last-child .n { font-size: clamp(18px, 2vw, 22px); letter-spacing: -0.02em; }
button.stat { cursor: pointer; font: inherit; transition: background 200ms; }
button.stat:hover { background: rgba(255, 255, 255, 0.04); }
button.stat:hover .lbl { color: var(--orange-light); }
button.stat:focus-visible { outline-offset: -3px; }
@media (min-width: 760px) {
  .stat .lbl { font-size: 12px; letter-spacing: 0.1em; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.2fr); }
  .stat { padding: 24px 24px 22px; border-top: 0; border-right: 1px solid rgba(255, 255, 255, 0.07); }
  .stat:nth-child(odd) { border-right: 1px solid rgba(255, 255, 255, 0.07); }
  .stat:last-child { grid-column: auto; border-right: 0; flex-direction: column; justify-content: flex-end; gap: 4px; }
}

/* ---------- Tabs (site-nav style) ---------- */
.tabs {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 248, 246, 0.97);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 250ms;
}
.tabs .wrap { display: flex; gap: clamp(2px, 1.6vw, 20px); overflow-x: auto; scrollbar-width: none; }
.tabs .wrap::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: none; border: 0; background: none; cursor: pointer;
  padding: 15px 5px 14px; font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color 200ms;
}
.tab:hover { color: var(--orange-text); }
.tab::after {
  content: ''; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--orange); transform: scaleX(0); transition: transform 250ms;
}
.tab[aria-selected='true'] { color: var(--ink); font-weight: 700; }
.tab .long { display: none; }
@media (min-width: 480px) { .tab .long { display: inline; } .tab { padding-left: 6px; padding-right: 6px; } }
.tab[aria-selected='true']::after { transform: scaleX(1); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 8px; }
.filters .search { position: relative; flex: 1 1 100%; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filters input[type='search'], .src-tools input[type='search'] {
  width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--card);
  border-radius: 13px; padding: 10px 14px 10px 40px; font-size: 15px;
  transition: border-color 200ms, box-shadow 200ms;
}
.filters input[type='search']:hover, .src-tools input[type='search']:hover { border-color: var(--line-hover); }
.filters input[type='search']:focus, .src-tools input[type='search']:focus { outline: none; border-color: var(--orange-edge); box-shadow: 0 0 0 4px rgba(255, 121, 26, 0.12); }
.filters select, .pill-select {
  appearance: none; -webkit-appearance: none; cursor: pointer; flex: 0 1 auto; min-width: 0; max-width: 100%;
  min-height: 38px; border: 1px solid var(--line); background-color: var(--light); border-radius: 25px;
  padding: 7px 32px 7px 14px; font-size: 13px; font-weight: 600; color: var(--soft);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
  transition: border-color 200ms, background-color 200ms, color 200ms, transform 200ms;
}
.filters select:hover, .pill-select:hover { border-color: var(--line-hover); color: var(--ink); }
.filters select.on {
  border-color: var(--orange-edge); background-color: var(--orange-tint); color: var(--orange-text);
  background-image: linear-gradient(45deg, transparent 50%, var(--orange-text) 50%), linear-gradient(135deg, var(--orange-text) 50%, transparent 50%);
}
.filter-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 6px 0 14px; }
.filter-meta .count { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.filter-meta .left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-sm svg { flex: none; }
#export-btn:not([hidden]), #export-src { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; text-transform: none; letter-spacing: 0; }
.filter-meta .right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.pill-select { background-color: var(--card); min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
/* Seven selects don't fit beside the search: search gets its own row, selects wrap below it at every width. */

/* ---------- Cards ---------- */
.list { display: grid; gap: 14px; padding-bottom: 40px; }
.card {
  position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 15px;
  padding: 18px 16px 16px;
  transition: transform 350ms, border-color 350ms, box-shadow 350ms, opacity 200ms;
}
.card::after {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 300ms; pointer-events: none;
  background: radial-gradient(230px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 121, 26, 0.13), transparent 65%);
}
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); border-color: rgba(255, 121, 26, 0.45); box-shadow: var(--shadow-lg); }
  .card:hover::after { opacity: 1; }
}
@media (min-width: 640px) { .card { padding: 24px 26px 20px; } }
.card.is-shortlisted { border-color: rgba(255, 121, 26, 0.55); box-shadow: 0 0 0 1px rgba(255, 121, 26, 0.25), var(--shadow-sm); }
.card.is-dismissed { opacity: 0.6; }
.card.leaving { opacity: 0; transform: translateX(12px); }

.meta-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 25px; padding: 4px 11px;
  font-size: 12px; font-weight: 600; line-height: 1.45; white-space: nowrap;
  background: var(--light); border: 1px solid var(--line); color: var(--muted);
}
.pill .dot { width: 7px; height: 7px; }
.pill.p-high { background: var(--orange-tint); border-color: var(--orange-edge); color: var(--orange-text); font-weight: 700; }
.pill.p-medium { background: var(--teal-tint); border-color: var(--teal-edge); color: var(--teal); font-weight: 700; }
.pill.p-low { background: var(--light); color: var(--muted); }
.pill.st-closing { background: var(--card); border-color: var(--orange-edge); color: var(--orange-text); }
.pill.st-closed { text-decoration: line-through; }
.pill.st-updated { background: var(--card); border-color: var(--teal-edge); color: var(--teal); }
.pill.st-confirmed { background: var(--card); color: var(--soft); }
.pill.st-new { background: var(--card); color: var(--soft); }
.pill.unconfirmed { background: transparent; border-style: dashed; color: var(--muted); font-weight: 500; font-size: 11.5px; }

/* "Who can apply" row: eligibility scope + AISB fit. Orange stays for priority; teal = good news, brick only for the hard no. */
.who-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.who-row .k { margin-right: -2px; }
.who-row .k-fit { margin-left: 8px; }
.pill.tag { gap: 6px; padding: 3px 10px 3px 8px; }
.pill.tag svg { flex: none; }
.pill.sc-pk { background: var(--card); border-color: var(--line-hover); color: var(--ink); }
.pill.sc-pk svg { color: var(--orange-text); }
.pill.sc-open { background: var(--teal-tint); border-color: var(--teal-edge); color: var(--teal-3); }
.pill.sc-unclear, .pill.fit-unclear { background: transparent; border-style: dashed; color: var(--muted); font-weight: 500; }
.pill.fit-yes { background: var(--teal); border-color: var(--teal); color: #fff; }
.pill.fit-partner { background: var(--orange-tint); border-color: var(--orange-edge); color: var(--orange-text); }
.pill.fit-no { background: var(--light); color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(192, 57, 43, 0.6); }
.pill.fit-no svg { color: var(--brick); }

.card h2 { position: relative; margin: 0 0 4px; font-size: 18px; line-height: 1.35; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.card h2 a { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--orange), var(--orange)); background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 300ms, color 200ms; }
.card h2 a:hover { color: var(--ink); background-size: 100% 2px; }
.org { font-size: 14px; font-weight: 600; color: var(--soft); }

.facts { display: grid; gap: 8px; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--soft); }
.fact { display: grid; grid-template-columns: 1fr; gap: 1px; min-width: 0; line-height: 1.55; }
.fact > span:not(.k) { overflow-wrap: anywhere; }
.k { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); line-height: 1.6; }
@media (min-width: 560px) {
  .fact { grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; }
  .fact .k { padding-top: 2px; }
}
.fact.deadline .v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fact.deadline .date { font-weight: 700; color: var(--ink); }
.countdown { font-weight: 700; font-size: 13px; color: var(--teal); }
.countdown.urgent { color: var(--brick); }
.countdown.past { color: var(--muted); font-weight: 500; }
.notes { margin: 12px 0 0; color: var(--soft); font-size: 14px; line-height: 1.7; }

details { margin-top: 12px; }
summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 600; color: var(--teal); padding: 3px 0;
}
summary::-webkit-details-marker { display: none; }
summary::before { content: ''; width: 6px; height: 6px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(-45deg); transition: transform 200ms; margin-right: 2px; }
details[open] summary::before { transform: rotate(45deg) translate(-1px, -1px); }
summary:hover { color: var(--teal-3); }
.detail-block { margin: 8px 0 0; padding: 12px 14px; background: var(--light); border-radius: 12px; font-size: 13.5px; color: var(--soft); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-block .k { display: block; margin-bottom: 2px; }

.card-foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 16px; }
.sources { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 13px; min-width: 0; flex: 1 1 260px; }
.sources a { font-weight: 600; overflow-wrap: anywhere; }
.sources .k { margin-right: 2px; }
.actions { display: flex; gap: 8px; margin-left: auto; }
.act.shortlist[aria-pressed='true'] {
  background: var(--orange-tint); color: var(--orange-text); border: 1px solid var(--orange-edge); box-shadow: none;
}
.act.shortlist[aria-pressed='true']:hover { box-shadow: none; transform: translateY(-2px); }
.act.dismiss[aria-pressed='true'] { background: var(--light); }

/* ---------- Empty / states ---------- */
.empty {
  text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 15px;
  padding: 40px 22px; color: var(--soft);
}
.empty .icon {
  width: 54px; height: 54px; border-radius: 14px; display: inline-grid; place-items: center; color: var(--orange);
  background: linear-gradient(150deg, rgba(255, 121, 26, 0.22), rgba(255, 121, 26, 0.06));
  border: 1px solid var(--orange-edge);
}
.empty h3 { margin: 16px 0 6px; color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.empty p { margin: 0 auto; max-width: 460px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.empty .btn { margin-top: 16px; }
.pulse { animation: soft-pulse 1.6s ease-in-out infinite; }
@keyframes soft-pulse { 50% { opacity: 0.5; } }
.more { display: flex; justify-content: center; padding: 4px 0 40px; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 30; max-width: calc(100vw - 32px);
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--orange);
  padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: 0 16px 40px rgba(35, 43, 43, 0.16);
}

/* ---------- Sources ---------- */
.src-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 25px; padding: 6px 14px;
  background: var(--card); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted);
}
.chip b { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.src-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 14px; }
.src-tools .search { position: relative; flex: 1 1 240px; }
.src-tools label.check { font-size: 13px; font-weight: 600; color: var(--soft); display: flex; gap: 8px; align-items: center; cursor: pointer; }
.src-tools input[type='checkbox'] { width: 16px; height: 16px; accent-color: var(--orange); margin: 0; }
.table-wrap {
  overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 15px;
  margin: 16px 0 40px; box-shadow: var(--shadow-sm);
}
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; color: var(--soft); }
th, td { padding: 12px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th {
  position: sticky; top: 0; background: var(--light); cursor: pointer; user-select: none; white-space: nowrap;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
}
th:hover { color: var(--ink); }
th[aria-sort] { color: var(--ink); }
th[aria-sort='ascending']::after { content: ' ↑'; color: var(--orange); }
th[aria-sort='descending']::after { content: ' ↓'; color: var(--orange); }
tbody tr { transition: background 150ms; }
tbody tr:hover td { background: #fcfaf8; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.org-cell { min-width: 200px; }
td.org-cell a { font-weight: 600; }
td.org-cell .id { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
td.nowrap { white-space: nowrap; }
td.status-cell { min-width: 130px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.status-err { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); max-width: 220px; overflow-wrap: anywhere; }
tr.failing .status { color: var(--brick); }
tr.local .status { color: var(--orange-text); }
tr.failing td.fails { color: var(--brick); font-weight: 700; }
tr.disabled td { color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); overflow: hidden; margin-top: 8px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; padding-top: 22px; font-size: 12.5px; color: var(--muted); }
.footer-wordmark {
  margin: 18px 0 -0.14em; text-align: center; white-space: nowrap; user-select: none;
  font-size: clamp(40px, 11vw, 150px); font-weight: 800; letter-spacing: -0.04em; line-height: 0.9;
  background: linear-gradient(180deg, rgba(255, 121, 26, 0.3) 0%, rgba(35, 43, 43, 0.04) 85%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Login ---------- */
.login-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; position: relative; }
.login-page::before, .login-page::after { content: ''; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; }
.login-page::before { width: 620px; height: 620px; right: -200px; top: -220px; background: radial-gradient(circle, rgba(255, 121, 26, 0.16), transparent 65%); }
.login-page::after { width: 420px; height: 420px; left: -180px; bottom: -160px; background: radial-gradient(circle, rgba(38, 112, 122, 0.07), transparent 65%); }
.login-top { padding: 22px var(--side) 0; }
.login-main { flex: 1; display: grid; place-items: center; padding: 28px var(--side) 40px; }
.login-box { width: 100%; max-width: 440px; }
.login-box h1 { margin: 14px 0 10px; font-size: clamp(36px, 7vw, 54px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; }
.login-box .lede { margin: 0 0 26px; font-size: 15.5px; color: var(--soft); line-height: 1.6; }
.login-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px 22px 22px;
  box-shadow: 0 20px 48px rgba(35, 43, 43, 0.08);
}
.login-card label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; }
.login-card input {
  width: 100%; min-height: 50px; border: 1px solid var(--line); background: var(--bg); border-radius: 13px;
  padding: 12px 14px; font-size: 16px; transition: border-color 200ms, box-shadow 200ms, background 200ms;
}
.login-card input:focus { outline: none; background: var(--card); border-color: var(--orange-edge); box-shadow: 0 0 0 4px rgba(255, 121, 26, 0.12); }
.login-card .btn-orange { width: 100%; min-height: 52px; margin-top: 16px; font-size: 15px; }
.login-card .btn-orange:disabled { opacity: 0.75; cursor: progress; transform: none; }
.login-card .err { color: var(--brick); font-size: 13px; font-weight: 600; min-height: 20px; margin-top: 10px; }
.login-box .hint { color: var(--muted); font-size: 12.5px; margin: 18px 0 0; text-align: center; }
.login-page .site-footer { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
