:root {
  color-scheme: light dark;

  /* Radix Gray (light) */
  --gray-1: #fcfcfd;
  --gray-2: #f9f9fb;
  --gray-3: #eff0f3;
  --gray-4: #e7e8ec;
  --gray-5: #e0e1e6;
  --gray-6: #d8d9e0;
  --gray-7: #cdced7;
  --gray-8: #b9bbc6;
  --gray-9: #8b8d98;
  --gray-10: #80828d;
  --gray-11: #62636c;
  --gray-12: #1e1f24;

  /* Radix Green (light) */
  --green-3: #e9f9ee;
  --green-4: #ddf3e4;
  --green-5: #ccebd7;
  --green-6: #b4dfc4;
  --green-7: #92ceac;
  --green-8: #5bb98b;
  --green-9: #30a46c;
  --green-10: #2b9a66;
  --green-11: #218358;
  --green-12: #193b2d;

  /* Radix Red (light) */
  --red-3: #feebec;
  --red-4: #ffdbdc;
  --red-5: #ffcdce;
  --red-6: #fdbdbe;
  --red-7: #f4a9aa;
  --red-9: #e5484d;
  --red-10: #dc3e42;
  --red-11: #cd2b31;
  --red-12: #381316;

  /* Radix Amber (light) */
  --amber-3: #fff4d5;
  --amber-4: #ffecbc;
  --amber-5: #ffe3a2;
  --amber-6: #ffd386;
  --amber-9: #ffb224;
  --amber-11: #ad5700;
  --amber-12: #4e2009;

  /* Radix Blue (light) */
  --blue-3: #edf6ff;
  --blue-4: #e1f0ff;
  --blue-5: #cfe5ff;
  --blue-6: #b7d9f8;
  --blue-9: #0091ff;
  --blue-11: #006adc;
  --blue-12: #00254d;

  /* Radix Orange (light, for fallback semantic) */
  --orange-3: #ffeed1;
  --orange-4: #ffdfb5;
  --orange-6: #ffc182;
  --orange-9: #f76808;
  --orange-11: #bd4b00;

  /* Surface tokens */
  --surface-app: var(--gray-2);
  --surface-panel: #ffffff;
  --surface-panel-alpha: var(--surface-panel-alpha);
  --surface-elevated: #ffffff;
  --surface-soft: var(--gray-3);
  --surface-deep: var(--gray-4);
  --surface-glass: var(--surface-glass);
  --surface-toolbar: var(--surface-toolbar);

  /* Text tokens */
  --text: var(--gray-12);
  --text-secondary: var(--gray-11);
  --text-muted: var(--gray-10);

  /* Border tokens */
  --border-subtle: var(--gray-5);
  --border-strong: var(--gray-7);

  /* Legacy aliases — every selector below still uses these names */
  --bg: var(--surface-app);
  --ink: var(--text);
  --muted: var(--text-secondary);
  --line: var(--border-subtle);
  --panel: var(--surface-panel-alpha);
  --panel-soft: var(--surface-soft);
  --panel-deep: var(--surface-deep);
  --green: var(--green-11);
  --green-bg: var(--green-3);
  --amber: var(--amber-11);
  --amber-bg: var(--amber-3);
  --red: var(--red-11);
  --red-bg: var(--red-3);
  --gray: var(--text-muted);
  --gray-bg: var(--surface-soft);
  --blue: var(--blue-11);
  --blue-bg: var(--blue-3);
  --cyan: var(--blue-11);
  --purple: var(--text-secondary);

  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --soft-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);

  /* Semantic status tokens (Radix scale-driven 4-step) */
  --status-live: var(--green-11);
  --status-live-bg: var(--green-3);
  --status-live-border: var(--green-6);
  --status-delayed: var(--amber-11);
  --status-delayed-bg: var(--amber-3);
  --status-delayed-border: var(--amber-6);
  --status-fallback: var(--orange-11);
  --status-fallback-bg: var(--orange-3);
  --status-fallback-border: var(--orange-6);
  --status-missing: var(--text-muted);
  --status-missing-bg: var(--surface-soft);
  --status-missing-border: var(--gray-6);
}

[data-theme="dark"] {
  /* Radix Gray (dark) */
  --gray-1: #111113;
  --gray-2: #19191b;
  --gray-3: #222325;
  --gray-4: #292a2e;
  --gray-5: #303136;
  --gray-6: #393a40;
  --gray-7: #46484f;
  --gray-8: #5f606a;
  --gray-9: #6c6e79;
  --gray-10: #797b86;
  --gray-11: #b2b3bd;
  --gray-12: #eeeef0;

  /* Radix Green (dark) */
  --green-3: #1b311e;
  --green-4: #1d3a24;
  --green-5: #25482d;
  --green-6: #2d5736;
  --green-7: #366740;
  --green-8: #3e7949;
  --green-9: #30a46c;
  --green-10: #33b074;
  --green-11: #4cc38a;
  --green-12: #c5f4d1;

  /* Radix Red (dark) */
  --red-3: #3b1219;
  --red-4: #500f1c;
  --red-5: #611623;
  --red-6: #72232d;
  --red-9: #e5484d;
  --red-11: #ff9592;
  --red-12: #ffd1d9;

  /* Radix Amber (dark) */
  --amber-3: #2d2305;
  --amber-4: #362a06;
  --amber-5: #443505;
  --amber-6: #5f3e08;
  --amber-9: #ffc53d;
  --amber-11: #ffca16;
  --amber-12: #ffe7b3;

  /* Radix Blue (dark) */
  --blue-3: #0d2847;
  --blue-4: #0d3868;
  --blue-5: #0f4582;
  --blue-6: #1f5da6;
  --blue-9: #0091ff;
  --blue-11: #52a9ff;
  --blue-12: #c2e6ff;

  /* Radix Orange (dark) */
  --orange-3: #2b1400;
  --orange-4: #391a03;
  --orange-6: #6d3500;
  --orange-9: #f76808;
  --orange-11: #ff8b3e;

  /* Surface tokens (dark) */
  --surface-app: var(--gray-1);
  --surface-panel: var(--gray-2);
  --surface-panel-alpha: rgba(25, 25, 27, 0.92);
  --surface-elevated: var(--gray-3);
  --surface-soft: var(--gray-3);
  --surface-deep: var(--gray-4);
  --surface-glass: rgba(25, 25, 27, 0.72);
  --surface-toolbar: rgba(34, 35, 37, 0.86);

  --text: var(--gray-12);
  --text-secondary: var(--gray-11);
  --text-muted: var(--gray-10);

  --border-subtle: var(--gray-5);
  --border-strong: var(--gray-7);

  --shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  --soft-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", sans-serif;
  line-height: 1.45;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.top-shell {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(1.2);
}

.site-nav,
main,
.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-nav {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-cluster {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.brand strong {
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

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

.brand small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links > a {
  min-width: 96px;
}

.nav-links a,
.button,
.language-toggle button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface-glass);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-links > a {
  min-height: 34px;
  gap: 6px;
  padding: 0 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
  background: transparent;
  border-color: var(--line);
}

.nav-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.nav-links > a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.language-toggle,
.theme-toggle {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-toolbar);
}

.theme-toggle {
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
}

.language-toggle button,
.theme-toggle button {
  min-width: 30px;
  min-height: 30px;
  border-color: transparent;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: var(--muted);
  font-weight: 700;
  box-shadow: none;
}

.theme-toggle button {
  min-width: 32px;
  min-height: 32px;
  border-radius: 999px;
}

.language-toggle button.active,
.theme-toggle button.active {
  background: var(--ink);
  color: var(--surface-panel);
}

.language-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 13px;
  line-height: 1;
}

.theme-glyph {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle button.active .theme-glyph {
  stroke-width: 2.2;
}

.brand-clock {
  display: inline-flex;
  min-height: 0;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  border: 0;
  margin-top: 2px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  white-space: nowrap;
}

.session-pill {
  align-items: center;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  border-left: 6px solid var(--gray);
}

.session-pill.open,
.light-green {
  border-color: var(--green);
}

.session-pill.post,
.light-yellow {
  border-color: var(--amber);
}

.session-pill.closed,
.light-red {
  border-color: var(--red);
}

.session-pill.gray,
.light-gray {
  border-color: var(--gray);
}

.next-event,
.freshness {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

main {
  margin-top: 20px;
  padding: 0 0 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.executive-summary {
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-panel);
}

.summary-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.session-status-icon {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--gray-bg);
  margin-top: 1px;
}

.session-status-icon::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  background: var(--gray);
  box-shadow: 0 0 0 5px var(--gray-bg);
}

.session-status-icon.open {
  background: var(--green-bg);
}

.session-status-icon.open::before {
  background: var(--green);
  box-shadow: 0 0 0 5px var(--green-bg);
}

.session-status-icon.post {
  background: var(--amber-bg);
}

.session-status-icon.post::before {
  background: var(--amber);
  box-shadow: 0 0 0 5px var(--amber-bg);
}

.session-status-icon.closed {
  background: var(--red-bg);
}

.session-status-icon.closed::before {
  background: var(--red);
  box-shadow: 0 0 0 5px var(--red-bg);
}

.executive-summary .summary-copy,
.executive-summary p {
  max-width: 980px;
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.38;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.executive-summary .summary-lead {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--ink);
  line-height: 1.28;
}

.executive-summary .summary-rest {
  display: inline-block;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.45;
}

.summary-bullets {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.summary-bullets li {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 6px 0 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
}

.summary-bullets li::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: none;
}

.summary-bullets strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.summary-bullets span {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.summary-links-block {
  margin-top: 14px;
  max-width: 940px;
}

.summary-links-title {
  display: inline-block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.summary-bullets.summary-links {
  margin-top: 6px;
}

.summary-bullets.summary-links li {
  display: block;
  padding-top: 4px;
}

.summary-bullets.summary-links li::before {
  background: var(--blue);
}

.summary-bullets.summary-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  text-decoration: none;
}

.summary-bullets.summary-links a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.summary-links-empty {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 920px) {
  .executive-summary .summary-lead {
    font-size: 22px;
  }
  .executive-summary .summary-rest {
    font-size: 15px;
  }
  .summary-bullets li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.fear-greed-strip {
  margin: 12px 20px 14px;
}

.fear-greed-strip:empty {
  display: none;
  margin: 0;
}

.fg-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fg-card {
  position: relative;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-panel);
  box-shadow: none;
  overflow: hidden;
}

.fg-card::before {
  display: none;
}

.fg-card-head,
.fg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fg-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fg-card-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.fg-index-label {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.fg-score-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}

.fg-score {
  color: var(--ink);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 22px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.fg-score-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fg-gauge {
  position: relative;
  display: block;
  width: 100%;
  height: 8px;
  margin: 12px 0 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red-4) 0%, var(--amber-4) 50%, var(--green-4) 76%, var(--amber-4) 100%);
}

.fg-gauge-empty {
  background: var(--gray-bg);
}

.fg-gauge-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 22%, transparent);
}

.fg-gauge-pin {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid var(--surface-panel);
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
  box-shadow: var(--soft-shadow);
}

.fg-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.fg-meta strong {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.fg-source {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 20px 18px;
}

.market-table-toolbar p {
  margin: 0;
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.strip-primary {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px;
  padding: 6px 4px 0;
}

.strip-tile {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: none;
  position: relative;
}

.strip-tile + .strip-tile::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--line);
}

.strip-tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.strip-tile-title h3 {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.strip-tile-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.strip-tile-summary {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.strip-tile-summary.move-up {
  color: var(--green);
  background: var(--green-bg);
  border-color: var(--green-6);
}

.strip-tile-summary.move-down {
  color: var(--red);
  background: var(--red-bg);
  border-color: var(--red-6);
}

/* Strength tile */
.strength-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.strength-block {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  position: relative;
}

.strength-block + .strength-block {
  padding-left: 18px;
}

.strength-block + .strength-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--line);
}

.strength-block-empty {
  opacity: 0.6;
}

.strength-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.strength-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.strength-light {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
}

.strength-numbers {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.strength-move {
  font-size: 22px;
  font-weight: 800;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.strength-score {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.strength-score.move-up {
  color: var(--green);
}

.strength-score.move-down {
  color: var(--red);
}

.strength-bar {
  position: relative;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--red-4) 0%,
    var(--red-3) 30%,
    var(--gray-3) 50%,
    var(--green-3) 70%,
    var(--green-4) 100%
  );
}

.strength-bar-empty {
  background: var(--status-missing-bg);
}

.strength-bar-axis {
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 50%;
  width: 1px;
  background: var(--border-strong);
}

.strength-bar-fill {
  position: absolute;
  top: 1px;
  bottom: 1px;
  border-radius: 999px;
  opacity: 0.92;
}

/* Composite tile */
.composite-line {
  display: flex;
  align-items: center;
  gap: 14px;
}

.composite-value {
  font-size: 32px;
  font-weight: 800;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  min-width: 84px;
}

.composite-gauge {
  flex: 1;
}

.composite-drivers {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.composite-drivers-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.composite-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.composite-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--gray-bg);
}

.composite-dot.light-green {
  background: var(--green-bg);
  border-color: var(--green-6);
}

.composite-dot.light-yellow {
  background: var(--amber-bg);
  border-color: var(--amber-6);
}

.composite-dot.light-red {
  background: var(--red-bg);
  border-color: var(--red-6);
}

.composite-dot.light-gray {
  background: var(--gray-bg);
}

/* Reference bar (demoted) */
.strip-reference {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 4px 0;
  margin-top: 6px;
  border: 0;
  border-top: 1px dashed var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.strip-reference-label {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.78;
}

.strip-reference-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.strip-reference-key {
  color: var(--muted);
  font-weight: 700;
}

.strip-reference-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-weight: 700;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.strip-reference-value.data-age-fresh {
  color: var(--green-11);
}

.strip-reference-value.data-age-stale {
  color: var(--amber-11);
}

.strip-reference-value.data-age-very-stale {
  color: var(--red-11);
  font-weight: 800;
}

.strip-reference-value.data-age-unknown {
  color: var(--text-muted);
}

.ref-pip {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray);
  margin-right: 2px;
}

.ref-pip.light-green {
  background: var(--green);
}

.ref-pip.light-yellow {
  background: var(--amber);
}

.ref-pip.light-red {
  background: var(--red);
}

.ticker-panels-head {
  grid-column: 1 / -1;
  margin: 0 0 -4px;
}

.ticker-panels-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.driver-grid-section {
  margin: 24px 20px 0;
}

.driver-grid-head {
  margin: 0 0 12px;
}

.driver-grid-head h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.driver-grid-section .driver-grid {
  margin: 0;
}

.source-health-strip {
  margin: 0 20px 14px;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.source-health-strip:empty {
  display: none;
  margin: 0;
}

.source-health-foot {
  margin: 32px 20px 16px;
  padding: 14px 0 0;
  border-top: 1px dashed var(--line);
  background: transparent;
  color: var(--text-muted);
  opacity: 0.95;
}

.source-health-foot .source-health-label {
  font-size: 10px;
  letter-spacing: 0.08em;
}

.source-health-foot .source-health-hint {
  font-size: 11px;
}

.source-health-foot .status-chip {
  font-size: 11px;
  padding: 2px 8px;
  min-height: 24px;
}

.source-health-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
}

.source-health-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}

.status-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--status-delayed);
  color: var(--surface-panel);
  font-size: 11px;
  font-weight: 700;
}

.source-health-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.source-health-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  justify-content: flex-start;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 80ms ease, border-color 120ms ease;
  font-family: inherit;
}

.status-chip:hover {
  transform: translateY(-1px);
}

.status-chip .status-name {
  letter-spacing: 0.02em;
}

.status-chip .status-count {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.status-chip .status-share {
  color: var(--muted);
  font-size: 11px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px var(--surface-glass);
  flex: 0 0 auto;
}

.status-chip.status-live {
  color: var(--status-live);
  background: var(--status-live-bg);
  border-color: var(--status-live-border);
}

.status-chip.status-delayed {
  color: var(--status-delayed);
  background: var(--status-delayed-bg);
  border-color: var(--status-delayed-border);
}

.status-chip.status-fallback {
  color: var(--status-fallback);
  background: var(--status-fallback-bg);
  border-color: var(--status-fallback-border);
}

.status-chip.status-missing {
  color: var(--status-missing);
  background: var(--status-missing-bg);
  border-color: var(--status-missing-border);
}

.status-chip.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--border-strong);
}

.status-dot.status-live {
  color: var(--status-live);
  background: var(--status-live);
}

.status-dot.status-delayed {
  color: var(--status-delayed);
  background: var(--status-delayed);
}

.status-dot.status-fallback {
  color: var(--status-fallback);
  background: var(--status-fallback);
}

.status-dot.status-missing {
  color: var(--status-missing);
  background: var(--status-missing);
}

.section-context {
  margin-top: 4px;
  max-width: 720px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.market-tabs-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.market-table-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.instrument-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-glass);
  color: var(--ink);
}

.instrument-search .search-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.instrument-search input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
  width: 220px;
  padding: 0;
  font-family: inherit;
}

.instrument-search input::placeholder {
  color: var(--muted);
  font-weight: 700;
}

.source-filter {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-toolbar);
}

.source-filter button {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
}

.source-filter button.active[data-source-filter="live"] {
  background: var(--status-live-bg);
  color: var(--status-live);
  border-color: var(--status-live-border);
}

.source-filter button.active[data-source-filter="delayed"] {
  background: var(--status-delayed-bg);
  color: var(--status-delayed);
  border-color: var(--status-delayed-border);
}

.source-filter button.active[data-source-filter="fallback"] {
  background: var(--status-fallback-bg);
  color: var(--status-fallback);
  border-color: var(--status-fallback-border);
}

.source-filter button.active[data-source-filter="missing"] {
  background: var(--status-missing-bg);
  color: var(--status-missing);
  border-color: var(--status-missing-border);
}

.provider-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.provider-cell .status-dot {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 1.5px var(--surface-glass);
}

.instrument-empty td {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.signal-map,
.company-card,
.driver-card,
.info-grid article,
.instrument-table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: none;
}

.hero-copy {
  padding: 32px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 52px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

h2 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.16;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button.primary {
  border-color: var(--blue-9);
  background: var(--blue-9);
  color: var(--surface-panel);
}

.button.secondary {
  background: var(--panel-deep);
}

.signal-map {
  padding: 18px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 7px;
  min-height: 260px;
}

.map-cell {
  border-radius: 6px;
  background: var(--gray-bg);
  border: 1px solid var(--line);
}

.map-cell.green {
  background: var(--green-bg);
}

.map-cell.yellow {
  background: var(--amber-bg);
}

.map-cell.red {
  background: var(--red-bg);
}

.map-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.ticker-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 20px;
}

.company-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.company-card.light-green {
  border-color: var(--line);
}

.company-card.light-yellow {
  border-color: var(--line);
}

.company-card.light-red {
  border-color: var(--line);
}

.company-card.light-gray {
  border-color: var(--line);
}

.company-card > * {
  position: relative;
}

.company-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.company-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.company-logo {
  width: 126px;
  height: 40px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-panel);
}

.company-name {
  margin-bottom: 4px;
  font-size: 23px;
  font-weight: 800;
}

.company-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.light-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  min-height: 42px;
  border-radius: 8px;
  padding: 8px 13px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
  border: 1px solid var(--line);
}

.badge-green {
  color: var(--green);
  background: var(--green-bg);
  border-color: var(--green-6);
}

.badge-yellow {
  color: var(--amber);
  background: var(--amber-bg);
  border-color: var(--amber-6);
}

.badge-red {
  color: var(--red);
  background: var(--red-bg);
  border-color: var(--red-6);
}

.badge-gray {
  color: var(--gray);
  background: var(--gray-bg);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
  padding-top: 16px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.metric {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.metric strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  white-space: nowrap;
}

.metric-ytd {
  background: transparent;
}

.metric strong.ytd-up {
  color: var(--blue);
}

.metric strong.ytd-down {
  color: var(--red);
}

.nxt-panel {
  margin-top: 16px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.nxt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nxt-head strong {
  color: var(--muted);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  text-transform: none;
  letter-spacing: 0;
}

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

.nxt-grid div {
  min-width: 0;
}

.nxt-grid span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nxt-grid strong {
  color: var(--ink);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.flow-panel {
  margin-top: 16px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.flow-live {
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, var(--accent-soft));
  box-shadow: none;
}

.flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.flow-head strong {
  color: var(--muted);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

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

.flow-grid div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.flow-grid span {
  display: -webkit-box;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  min-height: 30px;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.flow-grid strong {
  display: block;
  color: var(--ink);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-grid .flow-up {
  color: var(--green);
}

.flow-grid .flow-down {
  color: var(--red);
}

.flow-note {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.flow-note strong {
  color: var(--ink);
  font-weight: 800;
}

.flow-disclaimer {
  opacity: 0.82;
}

.flow-empty strong {
  color: var(--muted);
  font-size: 13px;
}

.valuation-panel {
  margin-top: 20px;
  padding-top: 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  overflow: visible;
}

.valuation-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.valuation-head strong {
  color: var(--blue);
  line-height: 1.35;
  max-width: 68%;
  text-align: right;
  text-transform: none;
  letter-spacing: 0;
}

.valuation-summary {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
  max-width: 76%;
}

.valuation-summary span {
  display: block;
}

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

.valuation-grid > div {
  min-width: 0;
  padding: 0;
  border: 0;
}

.valuation-grid span,
.valuation-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.valuation-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
}

.valuation-grid small {
  margin-top: 2px;
}

.valuation-grid small.ratio-note {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.01em;
}

.reason-list {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.reason-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 34px 20px 14px;
}

.section-head h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0;
}

.section-head p {
  max-width: 560px;
  color: var(--muted);
}

.market-table-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 34px 20px 12px;
}

.market-table-toolbar h2 {
  margin-bottom: 4px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0;
}

.market-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.market-tabs button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--surface-glass);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.market-tabs button.active {
  border-color: var(--blue-6);
  background: var(--blue-bg);
  color: var(--blue);
}

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

.driver-card {
  padding: 18px;
  min-height: 226px;
}

.driver-card.light-green,
.driver-card.light-yellow,
.driver-card.light-red,
.driver-card.light-gray {
  border-color: var(--line);
}

.driver-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.driver-top h3 {
  font-size: 16px;
  line-height: 1.25;
}

.score-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}

.score-line > span {
  min-width: 48px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.score-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--gray-5);
  overflow: hidden;
}

.score-fill {
  height: 100%;
  width: 50%;
  background: var(--gray);
}

.sparkline {
  width: 100%;
  height: 46px;
  display: block;
  margin-top: 12px;
}

.inline-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.inline-status-chip .status-dot {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 1.5px var(--surface-glass);
}

.inline-status-chip.status-live {
  background: var(--status-live-bg);
  color: var(--status-live);
  border-color: var(--status-live-border);
}

.inline-status-chip.status-delayed {
  background: var(--status-delayed-bg);
  color: var(--status-delayed);
  border-color: var(--status-delayed-border);
}

.inline-status-chip.status-fallback {
  background: var(--status-fallback-bg);
  color: var(--status-fallback);
  border-color: var(--status-fallback-border);
}

.inline-status-chip.status-missing {
  background: var(--status-missing-bg);
  color: var(--status-missing);
  border-color: var(--status-missing-border);
}

.company-source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.company-source-time {
  color: var(--muted);
  font-size: 12px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.driver-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.driver-breadth {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.driver-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.score-line .score-value {
  min-width: 48px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 18px;
}

.score-gauge {
  position: relative;
  flex: 1;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--red-4) 0%,
    var(--red-3) 30%,
    var(--gray-3) 50%,
    var(--green-3) 70%,
    var(--green-4) 100%
  );
  overflow: visible;
}

.score-axis {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--border-strong);
}

.score-bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 999px;
  opacity: 0.8;
}

.score-marker {
  position: absolute;
  top: -3px;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  transform: translateX(-2px);
  box-shadow: 0 0 0 2px var(--surface-panel);
}

.score-history {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: var(--text-secondary);
}

.score-history .score-history-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.score-history svg {
  flex: 1;
  height: 24px;
  color: var(--text-secondary);
  min-width: 0;
}

.driver-footnote {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.driver-footnote-strong {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 6px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 10%, transparent);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
}

.move-unit {
  margin-left: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.score-history-empty {
  min-height: 18px;
}

.score-history-empty .score-history-empty-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tracker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 14px;
}

.tracker-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: transform 80ms ease;
  cursor: default;
}

.tracker-chip:hover {
  transform: translateY(-1px);
}

.tracker-chip-symbol {
  color: var(--text-secondary);
  max-width: 9ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracker-chip-value {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-weight: 700;
}

.tracker-chip.tracker-up {
  background: var(--green-3);
  border-color: var(--green-6);
}

.tracker-chip.tracker-up .tracker-chip-symbol {
  color: var(--green-12);
}

.tracker-chip.tracker-up .tracker-chip-value {
  color: var(--green-11);
}

.tracker-chip.tracker-down {
  background: var(--red-3);
  border-color: var(--red-6);
}

.tracker-chip.tracker-down .tracker-chip-symbol {
  color: var(--red-12);
}

.tracker-chip.tracker-down .tracker-chip-value {
  color: var(--red-11);
}

.tracker-chip.tracker-flat {
  background: var(--surface-soft);
  border-color: var(--line);
}

.tracker-chip.tracker-flat .tracker-chip-value {
  color: var(--text-muted);
}

.tracker.tracker-empty {
  min-height: 26px;
  border-radius: 4px;
  background: var(--surface-soft);
  border: 1px dashed var(--line);
}

.driver-list {
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}

.driver-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-top: 1px solid var(--line);
}

.driver-list strong {
  color: var(--ink);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.instrument-table-wrap {
  overflow: auto;
  margin: 0 20px;
}

.instrument-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1040px;
  background: var(--panel);
}

.instrument-table th,
.instrument-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

.instrument-table td:nth-child(4) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
}

.rank-cell {
  width: 46px;
  color: var(--muted);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.asset-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.asset-avatar {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--gray-bg);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
}

.asset-avatar.section-korea,
.asset-avatar.section-us,
.asset-avatar.section-etf,
.asset-avatar.section-memory,
.asset-avatar.section-asia,
.asset-avatar.section-risk {
  color: var(--text);
  background: var(--surface-soft);
  border-color: var(--border-subtle);
}

.instrument-last-value {
  color: var(--ink);
  font-weight: 700;
}

.sparkline-cell {
  width: 92px;
}

.mini-trend {
  display: block;
  width: 76px;
  height: 28px;
}

.mini-trend-up {
  color: var(--green);
}

.mini-trend-down {
  color: var(--red);
}

.mini-trend-empty {
  color: var(--muted);
  font-weight: 700;
}

.instrument-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.instrument-section-row td {
  padding: 11px 14px 9px;
  border-left: 4px solid var(--gray);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.instrument-row {
  background: transparent;
}

.instrument-row:hover {
  background: var(--surface-soft);
}

.instrument-row td:first-child {
  border-left: 4px solid var(--gray);
}

.instrument-section-row.section-korea td,
.instrument-section-row.section-us td,
.instrument-section-row.section-etf td,
.instrument-section-row.section-memory td,
.instrument-section-row.section-asia td,
.instrument-section-row.section-risk td {
  border-left-color: var(--border-strong);
  background: var(--surface-soft);
}

.instrument-row.section-korea td:first-child,
.instrument-row.section-us td:first-child,
.instrument-row.section-etf td:first-child,
.instrument-row.section-memory td:first-child,
.instrument-row.section-asia td:first-child,
.instrument-row.section-risk td:first-child {
  border-left-color: var(--border-subtle);
}

.group-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.group-chip.section-korea,
.group-chip.section-us,
.group-chip.section-etf,
.group-chip.section-memory,
.group-chip.section-asia,
.group-chip.section-risk {
  color: var(--text-secondary);
  background: var(--surface-soft);
  border-color: var(--border-subtle);
}

.move-up {
  color: var(--green-11);
  font-weight: 700;
}

.move-down {
  color: var(--red);
  font-weight: 700;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 20px 0;
}

.info-grid article {
  padding: 20px;
}

.source-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.news-pulse-section {
  margin: 42px 0 8px;
}

.news-head {
  align-items: flex-start;
}

.news-meta {
  margin-top: 8px;
  color: var(--muted);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.news-stale {
  color: var(--amber);
  font-weight: 700;
}

.news-pulse-list {
  margin: 0 20px;
}

.news-summary-card,
.news-empty {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: none;
}

.news-summary-card {
  margin-bottom: 10px;
  padding: 12px 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.news-empty {
  padding: 20px;
}

.news-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
}

.news-empty p {
  color: var(--muted);
}

.news-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}

.news-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.news-item:last-child {
  border-bottom: 0;
}

.news-item-impact {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--gray-9);
}

.news-item.impact-positive .news-item-impact {
  background: var(--green-9);
}

.news-item.impact-negative .news-item-impact {
  background: var(--red-9);
}

.news-item.impact-watch .news-item-impact {
  background: var(--amber-9);
}

.news-item-body {
  min-width: 0;
}

.news-item-body h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.news-item-body h3 a {
  color: inherit;
  text-decoration: none;
}

.news-item-body h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-item-body p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.news-item-foot {
  margin-top: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--text-muted);
  font-size: 11px;
}

.news-source {
  font-weight: 700;
}

.news-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--text-muted);
}

.news-tags em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-muted);
}

.news-time {
  color: var(--text-muted);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  white-space: nowrap;
  text-align: right;
  margin-top: 2px;
}

.comments-section {
  margin: 42px 0 12px;
}

.comments-head {
  align-items: flex-start;
}

.comments-meta {
  margin-top: 8px;
  color: var(--muted);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.comments-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin: 0 20px;
}

.comment-form,
.comments-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.comment-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
}

.comment-form input {
  min-height: 42px;
  padding: 0 12px;
}

.comment-form textarea {
  resize: vertical;
  min-height: 116px;
  padding: 11px 12px;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-4);
}

.comment-website {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.comment-turnstile {
  min-height: 0;
}

.comment-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.comment-submit {
  cursor: pointer;
}

.comment-submit:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.comment-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.comment-status.ok {
  color: var(--green);
}

.comment-status.warn {
  color: var(--amber);
}

.comment-status.error {
  color: var(--red);
}

.comment-rule {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.comments-list {
  min-height: 224px;
  padding: 10px;
}

.comment-empty,
.comment-disabled,
.comment-card {
  padding: 14px;
  border-radius: 10px;
}

.comment-empty,
.comment-disabled {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.comment-card {
  border-bottom: 1px solid var(--line);
}

.comment-card:last-child {
  border-bottom: 0;
}

.comment-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.comment-card strong {
  color: var(--ink);
  font-size: 14px;
}

.comment-card time {
  color: var(--muted);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  white-space: nowrap;
}

.comment-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.page-tail-shelf {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.page-tail-shelf-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-tail-shelf-slot {
  position: relative;
  width: 100%;
  max-width: 970px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-tail-shelf-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  background: var(--surface-panel);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 0;
  pointer-events: none;
}

.page-tail-shelf-slot ins.adsbygoogle {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 90px;
  background: transparent;
  border-radius: 6px;
}

.page-tail-shelf-slot:has(ins.adsbygoogle[data-ad-status="filled"]) .page-tail-shelf-placeholder {
  display: none;
}

@media (max-width: 920px) {
  .page-tail-shelf {
    width: calc(100% - 20px);
    margin-top: 24px;
  }
  .page-tail-shelf-slot,
  .page-tail-shelf-slot ins.adsbygoogle {
    min-height: 100px;
  }
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footnote {
  flex: 1 1 420px;
  color: var(--muted);
}

.visitor-counter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.visitor-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-bg);
}

.visitor-counter.is-unavailable .visitor-dot {
  background: var(--gray);
  box-shadow: 0 0 0 3px var(--gray-bg);
}

.footer a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (max-width: 920px) {
  .site-nav,
  .section-head,
  .market-table-toolbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero-grid,
  .ticker-panels,
  .driver-grid,
  .fg-card-grid,
  .comments-shell,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .news-item {
    grid-template-columns: 8px minmax(0, 1fr);
    row-gap: 6px;
  }

  .news-time {
    grid-column: 2;
    text-align: left;
    margin-top: 0;
  }

  .strip-primary {
    grid-template-columns: 1fr;
  }

  .composite-line {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .composite-value {
    min-width: 0;
  }

  .market-tabs {
    justify-content: flex-start;
  }

  .source-health-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .source-health-chips {
    justify-content: flex-start;
  }

  .market-tabs-wrap {
    align-items: flex-start;
    width: 100%;
  }

  .market-table-controls {
    justify-content: flex-start;
    width: 100%;
  }

  .instrument-search input {
    width: 100%;
  }

  .hero-grid {
    gap: 16px;
  }

  h1 {
    font-size: 40px;
  }

  .executive-summary .summary-copy,
  .executive-summary p {
    font-size: 20px;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .metric {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .valuation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nxt-grid,
  .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .site-nav,
  main,
  .footer {
    width: min(100% - 20px, 1180px);
  }

  .brand-cluster {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .brand-clock {
    font-size: 14px;
    padding: 0;
  }

  .nav-links {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 6px;
  }

  .nav-links > a {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }

  .nav-links a,
  .button,
  .language-toggle button {
    padding: 0 12px;
  }

  .hero-copy,
  .company-card,
  .driver-card,
  .info-grid article {
    padding: 16px;
  }

  .executive-summary {
    padding: 18px 16px;
  }

  .ticker-panels,
  .driver-grid,
  .news-pulse-list,
  .comments-shell,
  .instrument-table-wrap,
  .market-strip,
  .fear-greed-strip,
  .info-grid {
    margin-left: 12px;
    margin-right: 12px;
  }

  .section-head,
  .market-table-toolbar {
    margin-left: 12px;
    margin-right: 12px;
  }

  .company-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .valuation-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .valuation-head strong,
  .valuation-summary {
    max-width: 100%;
    text-align: left;
    align-items: flex-start;
  }

  .company-logo {
    width: 116px;
    height: 38px;
  }

  .valuation-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 16px;
  }

  .executive-summary .summary-copy,
  .executive-summary p {
    font-size: 18px;
  }

  .fg-meta {
    flex-direction: column;
    align-items: flex-start;
  }

}
