:root {
  color-scheme: dark;
  --bg: #070a10;
  --bg-soft: #0b1018;
  --surface: #121923;
  --surface-raised: #18212d;
  --glass: rgba(24, 31, 42, .68);
  --glass-strong: rgba(25, 33, 45, .84);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .15);
  --text: #f6f8fb;
  --muted: #b0bac8;
  --dim: #8793a3;
  --accent: #ff453a;
  --accent-2: #ff6961;
  --blue: #4da3ff;
  --green: #32d583;
  --amber: #ffb547;
  --steel: #66aaf9;
  --teal: #4cc9b0;
  --plum: #b78cff;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 14% -8%, rgba(255, 69, 58, .15), transparent 62%),
    radial-gradient(800px 600px at 92% 12%, rgba(77, 163, 255, .11), transparent 64%),
    linear-gradient(180deg, #0a0e15 0%, #070a10 46%, #090d14 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.site-nav {
  position: sticky;
  top: 10px;
  z-index: 100;
  width: min(1480px, calc(100% - 28px));
  min-height: 56px;
  margin: 10px auto 0;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(35, 43, 56, .78), rgba(15, 20, 29, .63));
  box-shadow: 0 12px 40px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.09);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
}

.site-nav__brand { gap: 10px; }
.site-nav__brand img { box-shadow: 0 7px 20px rgba(255,69,58,.24); }
.site-nav__brand span { letter-spacing: -.01em; }

.site-nav__back, .data-button {
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.055);
  color: #dbe3ee;
  box-shadow: inset 0 1px rgba(255,255,255,.07);
}

.data-button.primary {
  border-color: rgba(255,69,58,.42);
  background: linear-gradient(180deg, #ff5147, #ed3129);
  color: white;
  box-shadow: 0 8px 22px rgba(255,69,58,.22), inset 0 1px rgba(255,255,255,.25);
}

.site-nav__back:hover { background: rgba(255,255,255,.1); }
.data-button.primary:hover { filter: brightness(1.07); transform: translateY(-1px); }

header {
  padding: 24px 0 16px;
  border: 0;
  background: transparent;
}

.head-in, .wrap, footer { width: min(1480px, calc(100% - 32px)); max-width: none; }
.site-nav { max-width: none; }

.eyebrow {
  margin-bottom: 11px;
  color: var(--accent-2);
  font-size: 11px;
  letter-spacing: .16em;
}

.head-in h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: .98;
  letter-spacing: -.045em;
}

.head-in .sub {
  max-width: 780px;
  margin-top: 12px;
  color: #aeb8c5;
  font-size: 13px;
  line-height: 1.55;
}

.meta, .stamp {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(20,27,37,.7);
  box-shadow: inset 0 1px rgba(255,255,255,.05);
}

main { padding-bottom: 56px; }

.tabs {
  position: sticky;
  top: 80px;
  z-index: 80;
  gap: 5px;
  margin: 0 0 14px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(34,43,57,.78), rgba(15,21,30,.69));
  box-shadow: var(--shadow-soft), inset 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(26px) saturate(155%);
  -webkit-backdrop-filter: blur(26px) saturate(155%);
}

.tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 0 auto;
  min-height: 45px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  color: var(--muted);
  font-weight: 700;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.tab:hover { color: var(--text); background: rgba(255,255,255,.055); }
.tab[aria-selected="true"] {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  background: rgba(255,255,255,.1);
  box-shadow: inset 0 1px rgba(255,255,255,.1), 0 8px 24px rgba(0,0,0,.18);
}

.tab--primary { padding-right: 18px; }
.tab--primary::after {
  content: attr(data-badge);
  position: static;
  flex: none;
  padding: 4px 7px;
  border-radius: 999px;
  transform: none;
  color: #ffd5d2;
  background: rgba(255,69,58,.17);
  border: 1px solid rgba(255,69,58,.28);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tab--primary[aria-selected="true"] {
  background: linear-gradient(180deg, rgba(255,81,71,.96), rgba(227,43,35,.94));
  box-shadow: 0 9px 25px rgba(255,69,58,.26), inset 0 1px rgba(255,255,255,.24);
}
.tab--primary[aria-selected="true"]::after { color: #fff; -webkit-text-fill-color: #fff; background: rgba(65,0,0,.2); border-color: rgba(255,255,255,.2); }

.panel { animation: panelIn .34s ease both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.intro {
  margin: 0 0 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 15px;
  color: #b8c3d1;
  background: linear-gradient(145deg, #151d27, #111821);
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.intro p { margin: 0; }
.intro b { color: #fff; }
.intro .warn { color: #ff7770; }

.point-a {
  position: relative;
  margin: 0 0 14px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 21px;
  background:
    radial-gradient(720px 330px at 4% 0%, rgba(255,69,58,.20), transparent 65%),
    linear-gradient(150deg, #1a222e, #111821 68%);
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.08);
}

.point-a::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 20%, rgba(255,255,255,.035) 44%, transparent 66%);
}

.point-a__head, .point-a__metrics, .point-a__ratios, .target-path, .point-a__note { position: relative; z-index: 1; }
.point-a__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.point-a__head p { max-width: 800px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.section-kicker { margin-bottom: 7px; color: var(--accent-2); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.point-a h2 { margin: 0; font-size: clamp(25px, 3vw, 36px); line-height: 1; letter-spacing: -.035em; }
.source-pill { flex: none; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.055); font-size: 10px; }

.point-a__metrics { display: grid; grid-template-columns: 1.2fr .9fr 1fr; gap: 10px; }
.state-card {
  min-height: 92px;
  padding: 13px 15px;
  border: 0;
  border-radius: 15px;
  background: rgba(6,10,16,.56);
  box-shadow: inset 0 1px rgba(255,255,255,.04), 0 8px 22px rgba(0,0,0,.12);
}
.state-card > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.state-card > strong { display: block; margin: 7px 0 5px; color: #fff; font-size: clamp(27px, 2.7vw, 36px); font-weight: 800; line-height: .95; letter-spacing: -.045em; }
.state-card > small { color: #9ea9b7; font-size: 11px; line-height: 1.35; }
.state-card--main > strong { color: #ff665e; }
.state-card--good > strong { color: var(--green); }
.state-card--risk > strong { color: var(--amber); }

.point-a__ratios { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 9px; }
.point-a__ratios > div { padding: 9px 12px; border-radius: 12px; background: rgba(8,12,18,.36); }
.point-a__ratios strong { display: block; margin: 4px 0 2px; color: #fff; font-size: 17px; }
.point-a__ratios span, .point-a__ratios small { display: block; color: var(--muted); font-size: 10px; line-height: 1.35; }

.target-path {
  display: grid;
  grid-template-columns: 1fr minmax(90px, .55fr) 1fr minmax(90px, .55fr) 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  padding: 9px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(8,12,18,.5);
  border: 1px solid var(--line);
}
.target-step { min-width: 0; padding: 7px 10px; border-radius: 11px; background: rgba(255,255,255,.035); }
.target-step span { display: block; margin-bottom: 4px; color: var(--dim); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.target-step strong { display: block; color: white; font-size: 17px; }
.target-step small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.target-step--quarter { background: rgba(255,69,58,.075); }
.target-step--year { background: rgba(255,181,71,.1); box-shadow: inset 0 0 0 1px rgba(255,181,71,.18); }
.target-arrow { display: grid; grid-template-rows: auto auto; align-content: center; gap: 5px; text-align: center; }
.target-arrow i { position: relative; display: block; height: 2px; background: linear-gradient(90deg, var(--accent), var(--amber)); }
.target-arrow i::after { content: ""; position: absolute; right: 0; top: 50%; width: 7px; height: 7px; border-top: 2px solid var(--amber); border-right: 2px solid var(--amber); transform: translateY(-50%) rotate(45deg); }
.target-arrow em { color: #ffc56d; font-size: 10px; font-style: normal; font-weight: 800; }
.point-a__note { margin: 9px 3px 0; color: #a7b2c0; font-size: 11px; line-height: 1.45; }
.point-a__note strong { color: #fff; }

.trust-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 18px;
  align-items: center;
  margin-bottom: 12px;
  padding: 9px 13px;
  border: 1px solid rgba(48,209,88,.18);
  border-radius: 15px;
  color: var(--muted);
  background: rgba(18,29,30,.58);
  box-shadow: inset 0 1px rgba(255,255,255,.04);
}
.trust-panel > div:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trust-panel strong { color: #e8fff0; }
.trust-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 15px rgba(48,209,88,.7); }
.trust-panel button { padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 9px; color: #dfe7f1; background: rgba(255,255,255,.05); cursor: pointer; }
.trust-details { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding-top: 8px; border-top: 1px solid var(--line); }
.trust-details[hidden] { display: none; }
.trust-source { padding: 8px 10px; border-radius: 10px; background: rgba(4,8,12,.32); }
.trust-source span, .trust-source small { display: block; }
.trust-source span { color: #fff; font-size: 11px; font-weight: 700; }
.trust-source small { margin-top: 3px; color: var(--dim); }

.attention-panel {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255,181,71,.17);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,181,71,.055), rgba(17,24,33,.88));
}
.attention-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 8px; }
.attention-head h3 { margin: 0; font-size: 15px; }
.attention-head > span { color: var(--dim); font-size: 10px; }
.attention-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.attention-item { padding: 9px 11px; border-radius: 12px; background: rgba(6,10,16,.45); border-left: 3px solid var(--amber); }
.attention-item--critical { border-left-color: var(--accent); }
.attention-item span, .attention-item small { display: block; color: var(--muted); font-size: 10px; line-height: 1.35; }
.attention-item strong { display: block; margin: 4px 0 3px; color: #fff; font-size: 17px; }

.decision-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; margin-bottom: 12px; }
.decision-card { min-width: 0; border: 1px solid var(--line); border-radius: 19px; background: linear-gradient(150deg, #151d27, #111821); box-shadow: inset 0 1px rgba(255,255,255,.045); }
.decision-card > [id] { padding: 10px 16px 17px; }
.backlog-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; padding-bottom: 0 !important; }
.backlog-summary div { padding: 9px 10px; border-radius: 10px; background: rgba(6,10,16,.38); }
.backlog-summary span, .backlog-summary small { display: block; color: var(--muted); font-size: 9px; line-height: 1.3; }
.backlog-summary strong { display: block; margin: 4px 0 2px; color: #fff; font-size: 17px; }

.fbar, .import-panel {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--glass);
  box-shadow: inset 0 1px rgba(255,255,255,.075), var(--shadow-soft);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}
.fbar { padding: 10px 12px; margin-bottom: 14px; }
.fbar select, .fbar button, .seg button {
  border-color: rgba(255,255,255,.1);
  border-radius: 10px;
  background: rgba(255,255,255,.055);
}

.kpis { gap: 10px; margin-bottom: 12px; }
.kpi {
  min-height: 102px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(145deg, #151d27, #111821);
  box-shadow: inset 0 1px rgba(255,255,255,.045);
}
.kpi:first-child { border-color: rgba(255,69,58,.26); background: linear-gradient(145deg, rgba(255,69,58,.1), #141b25 68%); }
.primary-panel .kpis .kpi:nth-child(3) { background: transparent; box-shadow: none; }
.kpi .lbl { color: var(--muted); letter-spacing: .075em; }
.kpi .val { margin-top: 10px; font-size: clamp(22px, 2.5vw, 31px); letter-spacing: -.035em; }
.kpi .note { color: var(--dim); line-height: 1.35; }

.grid { gap: 12px; }
.card {
  border: 1px solid var(--line);
  border-radius: 19px;
  background: linear-gradient(150deg, #151d27, #111821);
  box-shadow: inset 0 1px rgba(255,255,255,.045), 0 14px 38px rgba(0,0,0,.16);
}
.card:hover { border-color: rgba(255,255,255,.14); }
.card-head { padding: 18px 18px 0; }
.card-head h3 { font-size: 14px; letter-spacing: -.01em; }
.card-head .cap { margin-top: 5px; color: var(--dim); }
.card > [id], .card > .heat, .card > .routes { padding-left: 16px; padding-right: 16px; padding-bottom: 17px; }
.empty { color: var(--muted); }

.primary-panel .card:first-of-type { border-color: rgba(255,69,58,.2); }
.primary-panel .kpis .kpi:first-child .val { color: var(--accent-2); }

.import-panel { top: 80px; }
.import-drop { border-radius: 15px; border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.035); }
.import-drop:hover, .import-drop.is-dragover { border-color: rgba(255,69,58,.58); background: rgba(255,69,58,.08); }

footer { border-top-color: var(--line); color: var(--muted); }

@media (max-width: 860px) {
  .site-nav { top: 6px; width: calc(100% - 16px); margin-top: 6px; }
  .tabs { top: 70px; }
  header { padding-top: 38px; }
  .head-in { align-items: flex-start; }
  .point-a { padding: 20px; border-radius: 21px; }
  .point-a__metrics { grid-template-columns: 1fr 1fr; }
  .state-card--main { grid-column: 1 / -1; }
  .point-a__ratios { grid-template-columns: 1fr 1fr; }
  .target-path { grid-template-columns: 1fr auto 1fr; }
  .target-step--start { grid-column: 1; }
  .target-arrow:nth-of-type(2) { grid-column: 2; }
  .target-step--quarter { grid-column: 3; }
  .target-arrow:nth-of-type(4) { display: none; }
  .target-step--year { grid-column: 1 / -1; }
  .decision-grid { grid-template-columns: 1fr; }
  .attention-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .head-in, .wrap, footer { width: min(100% - 20px, 1480px); }
  .site-nav__back { display: none; }
  .head-in h1 { font-size: 38px; }
  .meta { width: 100%; }
  .tabs { border-radius: 15px; }
  .tab { padding: 0 14px; }
  .tab--primary { padding-right: 14px; }
  .point-a { padding: 17px; }
  .point-a__head { align-items: flex-start; flex-direction: column; }
  .point-a__metrics { grid-template-columns: 1fr; }
  .state-card--main { grid-column: auto; }
  .state-card { min-height: 118px; }
  .point-a__ratios { grid-template-columns: 1fr; }
  .target-path { grid-template-columns: 1fr; }
  .target-step--start, .target-step--quarter, .target-step--year { grid-column: auto; }
  .target-arrow { min-height: 30px; transform: rotate(90deg); }
  .target-arrow em { transform: rotate(-90deg); }
  .target-arrow:nth-of-type(4) { display: grid; }
  .kpi { min-height: 100px; }
  .trust-panel { grid-template-columns: 1fr; }
  .trust-panel button { justify-self: start; }
  .trust-details { grid-template-columns: 1fr; }
  .backlog-summary { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
