/* ============================================================
   PINNACLE DOMINION — MASTER DESIGN SYSTEM
   Aesthetic: PDS Terminal (modern minimalist + terminal influences)
   Derived from Google Stitch "Interactive Data Dashboard" design system
   ============================================================ */

:root {
  /* Surfaces */
  --bg: #0f1115;
  --surface-dim: #0c0e12;
  --panel: #1a1d24;
  --panel2: #22262f;
  --inset: #13171f;
  --line: #2a2f3a;
  --line-soft: #20262f;

  /* Ink */
  --ink: #e8e8ec;
  --ink2: #a8acb8;
  --ink3: #6b7280;

  /* Semantic */
  --accent: #e6c200;          /* gold — PDS brand */
  --accent-bright: #ffdf5c;
  --accent2: #cf7530;         /* burnt orange — secondary accent */
  --green: #3fb950;
  --red: #f85149;
  --amber: #d29922;
  --blue: #58a6ff;

  /* Fonts */
  --serif: Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', 'Menlo', monospace;
  --sans: 'Inter', system-ui, sans-serif;

  /* Geometry */
  --radius-sm: 2px;
  --radius: 5px;
  --radius-lg: 8px;

  /* Layout */
  --container: 1280px;
  --container-narrow: 1080px;
  --pad-x: 56px;
  --pad-y: 48px;
  --nav-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Subtle grain overlay for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(at 12% 8%, rgba(230, 194, 0, 0.04) 0px, transparent 50%),
    radial-gradient(at 88% 90%, rgba(207, 117, 48, 0.03) 0px, transparent 50%);
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  height: var(--nav-h);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand .mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-sm);
  letter-spacing: 0;
}
.nav-brand .name { color: var(--ink); }
.nav-brand .gold { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--ink2);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.nav-links a:hover {
  color: var(--ink);
  background: var(--panel);
}
.nav-links a.active {
  color: var(--accent);
  background: rgba(230, 194, 0, 0.08);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--accent);
  color: #000;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.nav-cta:hover {
  background: var(--accent-bright);
  color: #000;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.shell {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
}

.shell-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: normal;
  color: var(--ink);
  letter-spacing: 0.2px;
}

.hero-title {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.5px;
}
.hero-title .gold { color: var(--accent); }

h1 { font-size: 36px; line-height: 1.1; margin-bottom: 16px; }
h2 {
  font-size: 22px;
  margin: 40px 0 16px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
h2 .num {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 1px;
  margin-right: 12px;
  vertical-align: 2px;
}
h3 { font-size: 16px; margin: 22px 0 10px 0; }

.kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink2);
  margin-bottom: 8px;
}
.kicker .gold { color: var(--accent); }

.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  margin: 18px 0 28px;
}

p { margin: 10px 0; color: var(--ink); }
p.muted { color: var(--ink2); }

.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
.upper { text-transform: uppercase; letter-spacing: 1px; }

/* Semantic colors */
.green { color: var(--green); }
.red { color: var(--red); }
.amber { color: var(--amber); }
.blue { color: var(--blue); }
.gold, .acc { color: var(--accent); }
.muted { color: var(--ink2); }
.dim { color: var(--ink3); }

/* ============================================================
   HERO (landing)
   ============================================================ */

.hero {
  position: relative;
  padding: 100px 0 80px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(230, 194, 0, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink2);
  margin-top: 24px;
  max-width: 560px;
}
.hero-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink2);
  text-align: right;
  line-height: 1.9;
  border-left: 1px dashed var(--line);
  padding-left: 24px;
}
.hero-meta .v { color: var(--ink); }
.hero-meta .gold { color: var(--accent); }
.hero-meta .green { color: var(--green); }

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-bright);
  color: #000;
  border-color: var(--accent-bright);
}

/* ============================================================
   PANELS / CARDS
   ============================================================ */

.panel {
  padding: 22px 26px;
  margin: 18px 0;
  border-radius: var(--radius);
  background: var(--panel);
  border-left: 3px solid var(--line);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.panel.warn { border-left-color: var(--amber); background: #1f1c14; }
.panel.crit { border-left-color: var(--red); background: #211517; }
.panel.ok { border-left-color: var(--green); background: #15201a; }
.panel.info { border-left-color: var(--blue); background: #15191f; }
.panel.gold { border-left-color: var(--accent); background: #1f1c12; }

.panel .kicker { margin-bottom: 12px; }
.panel p { margin: 8px 0; }

.card {
  padding: 22px 24px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover {
  border-color: var(--line);
}
.card.interactive {
  cursor: pointer;
}
.card.interactive:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card .head {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.card .head .ticker { letter-spacing: 1px; }
.card .head .track {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink2);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.card .head .track.pop { color: var(--amber); }
.card .head .track.hold { color: var(--green); }
.card .head .track.crit { color: var(--red); }

.card .line {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-family: var(--mono);
  font-size: 12px;
  border-bottom: 1px dotted var(--line-soft);
}
.card .line:last-child { border-bottom: none; }
.card .line .lk { color: var(--ink2); }

/* card grids */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 18px 0;
}
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 18px 0;
}
.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 18px 0;
}

/* ============================================================
   STAT TILES (KPI strip)
   ============================================================ */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 20px 0 32px;
}
.stat {
  padding: 18px 20px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.stat .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink2);
  margin-bottom: 10px;
}
.stat .value {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}
.stat .value.pos { color: var(--green); }
.stat .value.neg { color: var(--red); }
.stat .value.acc { color: var(--accent); }
.stat .delta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink2);
  margin-top: 6px;
}

/* ============================================================
   TABLES
   ============================================================ */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 22px;
  font-family: var(--mono);
  font-size: 12px;
}
th, td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  background: var(--inset);
  color: var(--ink2);
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 10.5px;
}
tbody tr:hover td { background: #15181f; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================
   PILLS / TAGS
   ============================================================ */

.pill {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-weight: 500;
  vertical-align: 1px;
}
.pill.g { color: var(--green); border-color: rgba(63, 185, 80, 0.4); background: rgba(63, 185, 80, 0.08); }
.pill.r { color: var(--red); border-color: rgba(248, 81, 73, 0.4); background: rgba(248, 81, 73, 0.08); }
.pill.a { color: var(--accent); border-color: rgba(230, 194, 0, 0.4); background: rgba(230, 194, 0, 0.08); }
.pill.b { color: var(--blue); border-color: rgba(88, 166, 255, 0.4); background: rgba(88, 166, 255, 0.08); }
.pill.m { color: var(--ink2); border-color: var(--line); background: var(--panel); }
.pill.am { color: var(--amber); border-color: rgba(210, 153, 34, 0.4); background: rgba(210, 153, 34, 0.08); }

/* ============================================================
   SECTION HEADERS w/ rule
   ============================================================ */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 48px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  margin: 0;
  padding: 0;
  border: none;
}
.section-head .meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink2);
  letter-spacing: 1px;
}

/* ============================================================
   PROBABILITY BLOCKS (signal pages)
   ============================================================ */

.prob {
  padding: 20px 24px;
  margin: 16px 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
}
.prob .tkr {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.prob .tkr .sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink2);
  margin-left: 14px;
  letter-spacing: 0.5px;
}
.prob .row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px dotted var(--line-soft);
}
.prob .row:last-of-type { border-bottom: none; }
.prob .row .k { color: var(--ink2); }
.prob .row .v { color: var(--ink); text-align: right; }
.prob .row .v.pos { color: var(--green); }
.prob .row .v.neg { color: var(--red); }
.prob .row .v.am { color: var(--amber); }
.prob .formula {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink2);
}
.prob .formula .out {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  position: relative;
  z-index: 2;
  margin-top: 80px;
  padding: 48px var(--pad-x) 32px;
  border-top: 1px solid var(--line);
  background: var(--inset);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink2);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin: 6px 0; }
.footer-col a {
  color: var(--ink2);
  font-size: 13px;
}
.footer-col a:hover { color: var(--accent); }
.footer-brand {
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 12px;
}
.footer-brand .gold { color: var(--accent); }
.footer-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink2);
  max-width: 360px;
  line-height: 1.6;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink3);
  letter-spacing: 0.5px;
}
.footer-bottom .legal { display: flex; gap: 24px; }

/* ============================================================
   PAGE HEADER (interior pages)
   ============================================================ */

.page-head {
  padding: 60px 0 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.page-head .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.page-head h1 {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.page-head .desc {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink2);
  max-width: 720px;
  line-height: 1.6;
}

/* ============================================================
   REGIME / STATUS BANNERS
   ============================================================ */

.regime-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 16px 22px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-family: var(--mono);
}
.regime-bar .label {
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink2);
}
.regime-bar .val {
  font-size: 13px;
  color: var(--amber);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.regime-bar .live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--green);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.regime-bar .live::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================
   UTILITIES
   ============================================================ */

.divider {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 40px 0;
}
.divider-dashed {
  border: none;
  border-top: 1px dashed var(--line);
  margin: 32px 0;
}
.hide { display: none; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 32px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 32px; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  :root { --pad-x: 32px; }
  .hero-title { font-size: 44px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-meta { border-left: none; border-top: 1px dashed var(--line); padding: 18px 0 0; text-align: left; }
  .stat-strip, .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 720px) {
  :root { --pad-x: 18px; --pad-y: 32px; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-block; }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--panel);
    padding: 12px;
    border-bottom: 1px solid var(--line);
    gap: 4px;
  }
  .nav.open .nav-links a { padding: 10px 14px; }
  .hero { padding: 60px 0 40px; }
  .hero-title { font-size: 32px; }
  .page-head { padding: 40px 0 24px; }
  .page-head h1 { font-size: 30px; }
  .stat-strip, .cards, .cards-3, .cards-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  table { font-size: 11px; }
  th, td { padding: 8px 10px; }
  /* horizontal scroll for tables on mobile */
  .table-wrap { overflow-x: auto; }
}
