/* NasdaqistanIntel — responsive trading terminal design system */
:root {
  color-scheme: dark;
  --bg: #070a0f;
  --bg-raised: #0c1119;
  --surface: rgba(16, 22, 32, 0.88);
  --surface-strong: #121a25;
  --surface-soft: #0e151f;
  --line: rgba(149, 169, 194, 0.14);
  --line-strong: rgba(149, 169, 194, 0.28);
  --text: #f3f7fb;
  --muted: #8f9caf;
  --faint: #8794a6;
  --accent: #a6ff4d;
  --accent-strong: #8be635;
  --accent-soft: rgba(166, 255, 77, 0.11);
  --cyan: #5de2ff;
  --cyan-soft: rgba(93, 226, 255, 0.1);
  --positive: #4ee5a2;
  --positive-soft: rgba(78, 229, 162, 0.11);
  --negative: #ff6b76;
  --negative-soft: rgba(255, 107, 118, 0.11);
  --warning: #ffc85a;
  --warning-soft: rgba(255, 200, 90, 0.12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 4%, rgba(93, 226, 255, 0.08), transparent 31rem),
    radial-gradient(circle at 90% 8%, rgba(166, 255, 77, 0.08), transparent 28rem),
    linear-gradient(180deg, #080c12 0%, var(--bg) 45%, #06090d 100%);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
select,
textarea { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { color: #c8ff91; }

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

strong { color: var(--text); }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 8px;
  color: #081006;
  background: var(--accent);
  font-weight: 800;
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.shell {
  width: min(100%, 1460px);
  margin: 0 auto;
  padding: 0 28px 74px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0 -28px;
  padding: 15px 28px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 15, 0.83);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, 1404px);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
}

.brand:hover { color: var(--text); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(166, 255, 77, 0.42);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(166, 255, 77, 0.15), rgba(93, 226, 255, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 30px rgba(166, 255, 77, 0.08);
}

.brand-mark svg { width: 25px; height: 25px; }

.brand-copy { min-width: 0; }

.brand-copy strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy strong span { color: var(--accent); }

.brand-copy small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.live-chip,
.meta-chip,
.status-badge,
.eyebrow,
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.live-chip,
.meta-chip { min-height: 34px; padding: 7px 11px; }

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(166, 255, 77, 0.1), 0 0 14px rgba(166, 255, 77, 0.75);
  animation: pulse 1.8s ease-in-out infinite;
}

.mast-clock b,
.auth-badge b { color: var(--text); font-weight: 700; }

.auth-badge { white-space: nowrap; }

.auth-badge a { margin-left: 5px; }

.tabnav {
  display: flex;
  align-items: center;
  gap: 4px;
  width: min(100%, 1404px);
  margin: 11px auto 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabnav::-webkit-scrollbar { display: none; }

.tabnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 9px 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.tabnav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.tabnav a.active,
.tabnav a[aria-current="page"] {
  color: var(--accent);
  background: rgba(166, 255, 77, 0.06);
}

.tabnav a.active::after,
.tabnav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: -1px;
  left: 13px;
  height: 2px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(166, 255, 77, 0.5);
}

/* Content */
main { padding-top: 34px; }

section { margin-bottom: 34px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 48px;
}

.hero-copy {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 66px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(115deg, rgba(18, 26, 37, 0.96), rgba(11, 16, 24, 0.82)),
    radial-gradient(circle at 100% 0, rgba(166, 255, 77, 0.18), transparent 42%);
  box-shadow: var(--shadow);
}

.eyebrow {
  align-self: flex-start;
  margin-bottom: 23px;
  padding: 7px 11px;
  border-color: rgba(166, 255, 77, 0.25);
  color: var(--accent);
  background: var(--accent-soft);
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.auth-copy h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-copy h1 span,
.page-hero h1 span,
.auth-copy h1 span { color: var(--accent); }

.hero-copy > p,
.page-hero > p,
.auth-copy > p {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
}

.hero-actions,
.action-row,
.toolbar,
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-actions { margin-top: 30px; }

.owner-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
}

.owner-line::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--line-strong);
}

.terminal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(13, 19, 28, 0.97), rgba(9, 14, 21, 0.97));
  box-shadow: var(--shadow);
}

.terminal-panel::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -90px;
  width: 280px;
  height: 280px;
  border: 55px solid rgba(93, 226, 255, 0.025);
  border-radius: 50%;
}

.terminal-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
}

.session-kicker {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.session-name {
  margin-top: 7px;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.04em;
}

.session-countdown {
  margin-top: 10px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
}

.overview-grid,
.stat-grid,
.grid-fit {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 28px; }

.overview-card,
.out-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

.overview-card .label,
.out-card .lbl {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.overview-card .value,
.out-card .val {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.out-card.good .val { color: var(--positive); }
.out-card.warn .val { color: var(--negative); }
.out-card.info .val { color: var(--cyan); }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.section-heading h2,
.section-heading h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -0.035em;
}

.section-heading p {
  max-width: 620px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-index {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.panel-body { padding: 22px; }
.panel.compact .panel-body { padding: 18px; }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.75fr);
  gap: 18px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card-stack { display: grid; gap: 16px; }

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.field.wide { grid-column: 1 / -1; }

.field label,
.input-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-soft);
  padding: 10px 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

textarea { min-height: 104px; resize: vertical; line-height: 1.5; }

input::placeholder,
textarea::placeholder { color: #8592a4; }

input:hover,
select:hover,
textarea:hover { border-color: var(--line-strong); }

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(93, 226, 255, 0.7);
  outline: none;
  box-shadow: 0 0 0 3px rgba(93, 226, 255, 0.09);
  background: #111a25;
}

input[type="checkbox"],
input[type="radio"] {
  width: 17px;
  min-height: 17px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

button,
.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

button:hover,
.btn:hover {
  color: var(--text);
  border-color: rgba(166, 255, 77, 0.42);
  background: rgba(166, 255, 77, 0.07);
  transform: translateY(-1px);
}

button:active,
.btn:active { transform: translateY(0); }

button:disabled,
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

button.primary,
.btn.primary {
  border-color: var(--accent);
  color: #081006;
  background: var(--accent);
  box-shadow: 0 8px 26px rgba(166, 255, 77, 0.14);
}

button.primary:hover,
.btn.primary:hover { color: #081006; background: #bdff7a; }

button.danger,
.btn.danger { border-color: rgba(255, 107, 118, 0.38); color: var(--negative); }

button.ghost,
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }

.icon-btn {
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 9px;
}

.form-note,
.micro-note,
.sync-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.form-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.error-line,
.success-line {
  min-height: 21px;
  margin: 8px 0;
  font-size: 12px;
}

.error-line { color: var(--negative); }
.success-line { color: var(--positive); }

.status-badge { padding: 5px 9px; text-transform: uppercase; }
.status-badge.good { border-color: rgba(78, 229, 162, 0.27); color: var(--positive); background: var(--positive-soft); }
.status-badge.warn { border-color: rgba(255, 200, 90, 0.3); color: var(--warning); background: var(--warning-soft); }
.status-badge.stop { border-color: rgba(255, 107, 118, 0.35); color: var(--negative); background: var(--negative-soft); }

/* Sessions */
.session-strip {
  position: relative;
  height: 66px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a1018;
}

.session-block {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid rgba(7, 10, 15, 0.8);
  color: rgba(243, 247, 251, 0.68);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
}

.session-block.active {
  color: #071006;
  font-weight: 800;
  filter: brightness(1.2);
}

.session-now {
  position: absolute;
  z-index: 3;
  top: -5px;
  bottom: -5px;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(166, 255, 77, 0.85);
}

.session-now::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -1px);
}

.session-hours {
  display: flex;
  justify-content: space-between;
  padding: 8px 2px 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
}

.pill-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}

.pill-row .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: middle;
}

/* Plan / playbook */
.plan-summary {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(166, 255, 77, 0.07), rgba(93, 226, 255, 0.025));
}

.plan-bias {
  display: inline-flex;
  align-self: flex-start;
  margin: 12px 0 18px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--warning);
  background: var(--warning-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.level-list,
.checklist-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.level-row strong { font-family: var(--font-mono); font-size: 12px; }
.level-row small { color: var(--faint); }

.playbook-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.playbook-step {
  position: relative;
  min-height: 170px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.03), transparent);
}

.playbook-step .number {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
}

.playbook-step h3 { margin: 28px 0 7px; font-size: 18px; }
.playbook-step p { margin: 0; color: var(--muted); font-size: 12px; }

.rule-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.rule-item { padding: 15px; background: #0e151e; }
.rule-item strong { display: block; font-size: 12px; }
.rule-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }

/* Chart */
.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 390px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #090f16;
}

#chartCanvas { display: block; width: 100%; height: 390px; }

.chart-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.chart-stats b { color: var(--text); }

/* Tables / journal */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 12px;
}

caption {
  padding: 12px 14px;
  color: var(--muted);
  text-align: left;
  font-size: 11px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.018); }

.result-positive { color: var(--positive); }
.result-negative { color: var(--negative); }
.empty-state { padding: 28px !important; color: var(--muted); text-align: center; }

.journal-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr auto;
  gap: 10px;
  margin: 18px 0 12px;
}

/* Risk guard / checklist */
.risk-banner {
  display: none;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 107, 118, 0.35);
  border-radius: 12px;
  color: var(--negative);
  background: var(--negative-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.result-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.result-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--font-mono); font-size: 11px; }

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 48px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.checklist-item:last-child { border-bottom: 0; }
.checklist-item:has(input:checked) { color: var(--text); }
.checklist-item input { margin-top: 1px; }

.progress-track {
  height: 6px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  transition: width 220ms ease;
}

/* News */
.page-hero {
  position: relative;
  margin-bottom: 38px;
  padding: clamp(36px, 6vw, 74px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(125deg, rgba(17, 25, 36, 0.98), rgba(10, 15, 22, 0.94));
  box-shadow: var(--shadow);
}

.page-hero h1,
.auth-copy h1 { font-size: clamp(40px, 6vw, 74px); }

.news-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  margin-bottom: 17px;
}

.news-list { display: grid; gap: 12px; }

.cable {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 150ms ease, transform 150ms ease;
}

.cable:hover { border-color: var(--line-strong); transform: translateY(-1px); }

.cable .meta { display: grid; gap: 8px; color: var(--faint); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; }
.tag-chip { justify-self: start; padding: 4px 8px; }
.tag-chip.down { border-color: rgba(255, 107, 118, 0.35); color: var(--negative); background: var(--negative-soft); }
.tag-chip.up { border-color: rgba(78, 229, 162, 0.35); color: var(--positive); background: var(--positive-soft); }
.cable .headline { margin: 0; font-size: 18px; font-weight: 760; letter-spacing: -0.015em; }
.cable .body { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.cable .src { padding-top: 2px; font-family: var(--font-mono); font-size: 10px; white-space: nowrap; }

/* Auth */
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 490px);
  gap: 24px;
  min-height: calc(100vh - 235px);
  align-items: stretch;
}

.auth-copy,
.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.auth-copy {
  padding: clamp(34px, 6vw, 78px);
  background:
    radial-gradient(circle at 85% 20%, rgba(166, 255, 77, 0.13), transparent 34%),
    linear-gradient(140deg, rgba(17, 25, 36, 0.96), rgba(10, 15, 22, 0.96));
}

.auth-card { padding: clamp(24px, 4vw, 46px); }
.auth-card h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.035em; }
.auth-card > p { margin: 0 0 25px; color: var(--muted); font-size: 13px; }
.auth-card form { display: grid; gap: 15px; }

.security-note {
  margin-top: 22px;
  padding: 13px;
  border: 1px solid rgba(255, 200, 90, 0.2);
  border-radius: 10px;
  color: var(--muted);
  background: var(--warning-soft);
  font-size: 11px;
}

/* Privacy */
.doc-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.doc-nav {
  position: sticky;
  top: 150px;
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.doc-nav a { padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 12px; }
.doc-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.doc { padding: clamp(22px, 4vw, 44px); }
.doc h2 { margin: 38px 0 10px; scroll-margin-top: 155px; font-size: 23px; letter-spacing: -0.025em; }
.doc h2:first-of-type { margin-top: 18px; }
.doc p,
.doc li { color: var(--muted); font-size: 14px; line-height: 1.8; }
.doc .updated { margin-bottom: 22px; color: var(--accent); font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; }
.callout { padding: 15px 17px; border: 1px solid var(--line); border-left: 3px solid var(--warning); border-radius: 10px; background: var(--warning-soft); }

/* Footer */
footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  margin-top: 56px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
}

.footer-owner strong { display: block; margin-bottom: 3px; color: var(--text); font-size: 12px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.footer-links a { color: var(--muted); }

/* Motion */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.82); }
}

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

@media (max-width: 1120px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { min-height: 390px; }
  .terminal-panel { min-height: 350px; }
  .form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .playbook-grid { grid-template-columns: 1fr 1fr; }
  .rule-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .shell { padding-right: 18px; padding-left: 18px; }
  .site-header { margin-right: -18px; margin-left: -18px; padding-right: 18px; padding-left: 18px; }
  .header-meta .auth-badge { display: inline-flex; }
  .header-meta .auth-badge b,
  .header-meta .auth-badge .auth-separator { display: none; }
  .two-col,
  .auth-layout,
  .doc-layout { grid-template-columns: 1fr; }
  .auth-layout { min-height: auto; }
  .auth-copy { min-height: 360px; }
  .doc-nav { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .three-col { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid,
  .grid-fit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cable { grid-template-columns: 105px minmax(0, 1fr); }
  .cable .src { grid-column: 2; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 90px; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .shell { padding-bottom: 30px; }
  .site-header { padding-top: 10px; padding-bottom: 9px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-copy small { display: none; }
  .header-meta .meta-chip { display: none; }
  .live-chip { min-height: 32px; padding: 6px 9px; font-size: 9px; }
  .tabnav {
    position: fixed;
    z-index: 100;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    width: auto;
    margin: 0;
    padding: 4px 5px calc(4px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-strong);
    background: rgba(8, 12, 18, 0.96);
    backdrop-filter: blur(18px);
  }
  .tabnav a { min-height: 54px; padding: 0 3px; border-radius: 9px; font-size: 9px; }
  .tabnav a.active::after,
  .tabnav a[aria-current="page"]::after { right: 24%; bottom: 4px; left: 24%; border-radius: 2px; }
  main { padding-top: 22px; }
  section { margin-bottom: 28px; }
  .hero-grid { gap: 14px; margin-bottom: 38px; }
  .hero-copy { min-height: 410px; padding: 28px 23px; }
  .hero-copy h1 { font-size: clamp(40px, 13.5vw, 62px); }
  .hero-copy > p { font-size: 15px; }
  .terminal-body { padding: 22px; }
  .section-heading { align-items: flex-start; }
  .section-index { display: none; }
  .panel-body { padding: 17px; }
  .form-grid,
  .form-grid.two,
  .form-grid.four,
  .three-col,
  .playbook-grid,
  .journal-filters { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
  .rule-strip { grid-template-columns: 1fr; }
  .toolbar > button,
  .toolbar > .btn,
  .action-row > button,
  .action-row > .btn { flex: 1 1 auto; }
  .chart-wrap { min-height: 310px; }
  #chartCanvas { height: 310px; }
  .news-toolbar { grid-template-columns: 1fr; }
  .cable { grid-template-columns: 1fr; gap: 10px; }
  .cable .meta { display: flex; align-items: center; }
  .cable .src { grid-column: auto; }
  .page-hero { padding: 36px 23px; }
  .doc-nav { grid-template-columns: 1fr 1fr; }
  .doc h2 { scroll-margin-top: 90px; }
  footer { grid-template-columns: 1fr; padding-bottom: 12px; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .shell { padding-right: 14px; padding-left: 14px; }
  .site-header { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
  .brand-copy strong { max-width: 180px; font-size: 13px; }
  .header-meta .mast-clock { display: none; }
  .overview-grid,
  .stat-grid,
  .grid-fit { grid-template-columns: 1fr 1fr; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .owner-line { align-items: flex-start; }
  .terminal-panel { min-height: 380px; }
  .session-strip { height: 58px; }
  .session-block { font-size: 0; white-space: normal; }
  .session-block::after { content: attr(data-short); font-size: 8px; }
  .session-hours span:nth-child(even) { display: none; }
  .playbook-step { min-height: 150px; }
  .doc-nav { grid-template-columns: 1fr; }
  input,
  select,
  textarea { font-size: 16px; }
}
