:root {
  color-scheme: light;
  --bg: #f4f4ef;
  --surface: #fbfbf7;
  --surface-strong: #ffffff;
  --ink: #171916;
  --muted: #6f736a;
  --soft: #a6aa9f;
  --line: #dedfd7;
  --line-strong: #c8cac0;
  --lime: #d6ff68;
  --lime-deep: #a9d534;
  --green: #167a53;
  --green-bg: #e0f4e9;
  --red: #d6493f;
  --red-bg: #fbe6e2;
  --amber: #ad7412;
  --amber-bg: #fbefca;
  --shadow: 0 24px 70px rgba(26, 31, 22, .08);
  --sidebar: 228px;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  scroll-behavior: smooth;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121410;
  --surface: #191c17;
  --surface-strong: #20241d;
  --ink: #f4f5ed;
  --muted: #a7ada0;
  --soft: #737a6d;
  --line: #31362d;
  --line-strong: #454c40;
  --green-bg: #17382a;
  --red-bg: #40231f;
  --amber-bg: #3b3119;
  --shadow: 0 24px 70px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }

html { scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 28px 20px 22px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 38px; }
.brand img { filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .12)); }
.brand span { display: flex; flex-direction: column; }
.brand strong { font-size: 17px; line-height: 1.1; letter-spacing: .16em; }
.brand small { margin-top: 4px; font: 500 9px/1 "DM Mono", monospace; letter-spacing: .18em; color: var(--muted); }

.side-nav { display: grid; gap: 6px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  height: 46px;
  padding: 0 13px;
  color: var(--muted);
  border-radius: 12px;
  font-weight: 600;
  transition: .2s ease;
}
.nav-link svg { width: 19px; height: 19px; }
.nav-link:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.nav-link.active { color: var(--ink); background: var(--lime); }

.sidebar-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.safety-note { display: flex; flex-direction: column; gap: 3px; padding-left: 8px; }
.safety-note span { color: var(--green); font-size: 11px; font-weight: 700; }
.safety-note strong { font-size: 11px; font-weight: 500; color: var(--muted); }
.icon-button {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface-strong); border-radius: 50%; cursor: pointer;
}
.icon-button svg { width: 17px; height: 17px; }

.main-content { margin-left: var(--sidebar); overflow: hidden; }
.topbar {
  height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(20px);
}
.mobile-brand { display: none; }
.market-state { display: flex; align-items: center; gap: 11px; }
.market-state > span:last-child { display: flex; flex-direction: column; }
.market-state strong { font-size: 12px; font-weight: 700; }
.market-state small { color: var(--muted); font-size: 10px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--soft); box-shadow: 0 0 0 5px color-mix(in srgb, var(--soft) 14%, transparent); }
.status-dot.live { background: var(--green); box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 14%, transparent); }
.status-dot.warning { background: var(--amber); box-shadow: 0 0 0 5px color-mix(in srgb, var(--amber) 14%, transparent); }
.status-dot.error { background: var(--red); box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 14%, transparent); }
.status-dot.loading { animation: pulse 1.4s infinite; }

.top-actions { display: flex; align-items: center; gap: 18px; }
.utc-clock { font: 500 10px/1 "DM Mono", monospace; color: var(--muted); letter-spacing: .08em; }
.refresh-button {
  height: 36px; padding: 0 14px; display: flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 600;
}
.refresh-button:hover { border-color: var(--line-strong); }
.refresh-button svg { width: 15px; height: 15px; }
.refresh-button.spinning svg { animation: spin 1s linear infinite; }

.hero {
  position: relative;
  min-height: 560px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .72fr); align-items: center; gap: clamp(45px, 7vw, 110px);
  padding: clamp(60px, 8vw, 112px) clamp(24px, 6vw, 92px) 74px;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; width: 390px; height: 390px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--lime) 30%, transparent), transparent 68%);
  right: 8%; top: 5%; pointer-events: none; filter: blur(10px);
}
.hero-copy, .hero-card { position: relative; z-index: 1; }
.eyebrow, .section-index { font: 500 10px/1.2 "DM Mono", monospace; letter-spacing: .13em; color: var(--muted); }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 21px; height: 2px; background: var(--lime-deep); }
.hero h1 { margin: 22px 0 22px; font-size: clamp(44px, 5.5vw, 78px); line-height: 1.08; letter-spacing: -.07em; font-weight: 800; }
.hero h1 strong { position: relative; font-weight: 800; white-space: nowrap; }
.hero h1 strong::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 9px; background: var(--lime); z-index: -1; }
.hero-copy > p { max-width: 560px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 34px; }
.primary-button {
  min-height: 46px; padding: 0 21px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--surface); border-radius: 12px; font-weight: 700; box-shadow: 0 12px 24px color-mix(in srgb, var(--ink) 15%, transparent); transition: transform .2s;
}
.primary-button:hover { transform: translateY(-2px); }
.text-button { padding: 8px 0; border: 0; background: transparent; cursor: pointer; font-weight: 600; }
.text-button span { color: var(--green); margin-left: 4px; }

.hero-card {
  padding: 25px;
  background: color-mix(in srgb, var(--surface-strong) 91%, transparent);
  border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden;
}
.hero-card::after { content: ""; position: absolute; width: 140px; height: 140px; right: -50px; bottom: -60px; background: var(--lime); border-radius: 50%; filter: blur(25px); opacity: .3; }
.hero-card-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; }
.live-tag { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 600; }
.live-tag i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--soft); }
.live-tag.live { color: var(--green); }
.live-tag.live i { background: var(--green); animation: pulse 1.8s infinite; }
.live-tag.warning { color: var(--amber); }
.live-tag.warning i { background: var(--amber); }
.live-tag.error { color: var(--red); }
.live-tag.error i { background: var(--red); }

.market-pulse { min-height: 180px; display: flex; align-items: center; justify-content: center; gap: 25px; }
.pulse-orbit { position: relative; width: 66px; height: 66px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; }
.pulse-orbit::before, .pulse-orbit::after { content: ""; position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.pulse-orbit::before { inset: -9px; opacity: .65; }
.pulse-orbit::after { inset: -18px; opacity: .25; }
.pulse-orbit span { width: 20px; height: 20px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 25px var(--lime-deep); }
.pulse-orbit i { position: absolute; width: 7px; height: 7px; background: var(--ink); border-radius: 50%; top: 0; left: 7px; animation: orbit 7s linear infinite; }
.market-pulse > div:last-child { display: flex; flex-direction: column; }
.market-pulse small { color: var(--muted); font-size: 10px; }
.market-pulse strong { font-size: 27px; letter-spacing: -.04em; }
.market-pulse p { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.snapshot-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.snapshot-grid div { padding: 16px 8px; border-right: 1px solid var(--line); min-width: 0; }
.snapshot-grid div:first-child { padding-left: 0; }
.snapshot-grid div:last-child { border: 0; }
.snapshot-grid small { display: block; color: var(--muted); font-size: 9px; margin-bottom: 5px; white-space: nowrap; }
.snapshot-grid strong { display: block; font: 500 13px/1.2 "DM Mono", monospace; overflow: hidden; text-overflow: ellipsis; }
.data-stamp { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding-top: 13px; color: var(--soft); font-size: 8px; }
.data-stamp span { font-family: "DM Mono", Consolas, monospace; text-align: right; }
.data-stamp .data-source { grid-row: 1 / 3; align-self: center; text-align: left; color: var(--muted); }

.ticker-strip { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--surface); }
.ticker-track { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1160px; margin: 0 auto; }
.ticker-item {
  min-height: 70px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 0 25px; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer;
}
.ticker-item:last-child { border-right: 0; }
.ticker-item:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.ticker-item span { font-weight: 800; }
.ticker-item strong { font: 500 13px/1 "DM Mono", monospace; }
.ticker-item em { font: normal 500 11px/1 "DM Mono", monospace; }
.ticker-item.placeholder { cursor: default; }
.ticker-item.placeholder strong, .ticker-item.placeholder em { color: var(--soft); }
.up { color: var(--green) !important; }
.down { color: var(--red) !important; }
.neutral { color: var(--muted) !important; }

.content-section { padding: 94px clamp(24px, 6vw, 92px); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 36px; }
.section-heading h2 { margin: 9px 0 7px; font-size: clamp(28px, 3vw, 42px); line-height: 1.15; letter-spacing: -.045em; }
.section-heading p { margin: 0; color: var(--muted); }
.filter-group { display: flex; align-items: center; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.filter { height: 32px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.filter.active { background: var(--ink); color: var(--surface); }

.radar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 258px; gap: 18px; }
.candidate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.candidate-card {
  min-height: 284px; display: flex; flex-direction: column; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 17px; cursor: pointer; transition: .22s ease; outline: none;
}
.candidate-card:hover, .candidate-card:focus, .candidate-card.selected { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 16px 36px rgba(25, 30, 21, .07); }
.candidate-card.selected { box-shadow: inset 0 -3px 0 var(--lime-deep), 0 16px 36px rgba(25, 30, 21, .07); }
.candidate-top { display: flex; justify-content: space-between; align-items: center; }
.rank { font: 500 10px/1 "DM Mono", monospace; color: var(--soft); }
.observe-pill { padding: 4px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 5%, transparent); font-size: 9px; color: var(--muted); }
.candidate-coin { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.small-coin-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: var(--ink); color: var(--lime); font: 600 13px/1 "DM Mono", monospace; }
.candidate-coin h3 { margin: 0; font-size: 15px; }
.candidate-coin h3 small { margin-left: 3px; font-size: 9px; color: var(--muted); font-weight: 500; }
.candidate-coin p { margin: 1px 0 0; font-size: 9px; color: var(--soft); }
.candidate-price { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 23px 0 18px; }
.candidate-price strong { font: 500 23px/1 "DM Mono", monospace; letter-spacing: -.04em; overflow: hidden; text-overflow: ellipsis; }
.candidate-price span { font: 500 10px/1 "DM Mono", monospace; }
.candidate-meta { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.candidate-meta div { min-width: 0; }
.candidate-meta span { display: block; color: var(--soft); font-size: 8px; margin-bottom: 4px; }
.candidate-meta strong { display: block; font: 500 9px/1.4 "DM Mono", monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.candidate-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 15px; font-size: 9px; color: var(--muted); }
.candidate-foot i { font-style: normal; font-size: 15px; color: var(--ink); }
.empty-card { grid-column: 1 / -1; min-height: 310px; align-items: center; justify-content: center; text-align: center; cursor: default; }
.empty-card:hover { transform: none; box-shadow: none; }
.empty-card h3 { margin: 20px 0 6px; }
.empty-card p { margin: 0; color: var(--muted); }
.empty-visual { position: relative; width: 70px; height: 70px; border: 1px dashed var(--line-strong); border-radius: 50%; display: grid; place-items: center; }
.empty-visual span { width: 25px; height: 25px; border-radius: 50%; background: var(--lime); }
.empty-visual i { position: absolute; inset: 10px; border: 1px solid var(--line); border-radius: 50%; }

.watch-panel { min-height: 100%; padding: 20px; background: var(--ink); color: #f5f6ef; border-radius: 17px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 15px; border-bottom: 1px solid #363a32; }
.panel-head span { font-weight: 700; }
.panel-head small { color: #8e9587; }
.watch-list { display: grid; }
.watch-empty { padding: 30px 5px; color: #858d7e; font-size: 11px; text-align: center; }
.watch-row { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 10px; padding: 14px 0; border: 0; border-bottom: 1px solid #30342d; color: #f5f6ef; background: transparent; cursor: pointer; text-align: left; }
.watch-row:hover { color: var(--lime); }
.watch-rank { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: #2d312a; font: 500 9px/1 "DM Mono", monospace; }
.watch-row > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.watch-row strong { font-size: 11px; }
.watch-row small { font: 400 9px/1.4 "DM Mono", monospace; color: #858d7e; overflow: hidden; text-overflow: ellipsis; }
.watch-row em { font: normal 500 9px/1 "DM Mono", monospace; }
.watch-foot { margin-top: 22px; padding: 15px; background: #232620; border-radius: 12px; }
.watch-foot span, .watch-foot small { display: block; color: #858d7e; font-size: 8px; }
.watch-foot strong { display: block; margin: 5px 0 4px; font-size: 10px; }

.detail-section { padding: 0 clamp(24px, 6vw, 92px) 92px; }
.detail-header { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 26px 0; border-top: 1px solid var(--line-strong); }
.coin-heading { display: flex; align-items: center; gap: 13px; }
.coin-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--ink); color: var(--lime); font: 600 16px/1 "DM Mono", monospace; }
.coin-heading > div:nth-child(2) { display: flex; flex-direction: column; }
.coin-heading span { color: var(--muted); font-size: 10px; font-weight: 600; }
.coin-heading h2 { margin: 0; font: 500 25px/1.2 "DM Mono", monospace; }
.change-badge { padding: 5px 8px; border-radius: 7px; background: color-mix(in srgb, var(--ink) 5%, transparent); font: 500 9px/1 "DM Mono", monospace; }
.change-badge.up { background: var(--green-bg); }
.change-badge.down { background: var(--red-bg); }
.detail-verdict { display: grid; grid-template-columns: auto auto; column-gap: 12px; align-items: center; padding-left: 23px; border-left: 1px solid var(--line); }
.detail-verdict small { grid-row: 1; color: var(--muted); font-size: 9px; }
.detail-verdict strong { grid-row: 2; font-size: 18px; }
.detail-verdict span { grid-row: 1 / 3; padding: 8px 11px; border-radius: 8px; background: var(--amber-bg); color: var(--amber); font-size: 10px; }

.period-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; }
.period-table { width: 100%; min-width: 840px; border-collapse: collapse; text-align: left; }
.period-table th { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--soft); font-size: 8px; font-weight: 600; letter-spacing: .04em; }
.period-table td { padding: 17px 16px; border-bottom: 1px solid var(--line); font-size: 11px; }
.period-table tr:last-child td { border-bottom: 0; }
.period-table td:first-child strong { display: block; font-size: 12px; }
.period-table td:first-child small { display: block; color: var(--soft); font-size: 8px; }
.table-state { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.table-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.table-state.waiting { background: color-mix(in srgb, var(--muted) 12%, transparent); color: var(--muted); }
.table-state.disabled { background: var(--red-bg); color: var(--red); }
.unavailable { color: var(--soft); }
.period-mobile { display: none; }
.guardrail-callout { display: flex; gap: 13px; margin-top: 15px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--amber) 28%, var(--line)); border-radius: 13px; background: color-mix(in srgb, var(--amber-bg) 60%, transparent); }
.guardrail-callout svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--amber); }
.guardrail-callout strong { font-size: 11px; }
.guardrail-callout p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }

.compact-heading { margin-bottom: 30px; }
.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.module-card { position: relative; min-height: 300px; display: flex; flex-direction: column; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; }
.module-number { font: 500 9px/1 "DM Mono", monospace; color: var(--soft); }
.module-icon { width: 39px; height: 39px; display: grid; place-items: center; margin-top: 26px; border: 1px solid var(--line); border-radius: 12px; font-size: 21px; }
.module-state { position: absolute; top: 20px; right: 20px; padding: 4px 7px; border-radius: 999px; font-size: 8px; font-weight: 700; }
.module-state.connecting { color: var(--amber); background: var(--amber-bg); }
.module-state.ready { color: var(--green); background: var(--green-bg); }
.module-state.pending, .module-state.off { color: var(--muted); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.module-state.isolated { color: #78589c; background: #f1e8f7; }
:root[data-theme="dark"] .module-state.isolated { background: #352642; color: #c79be4; }
.module-card h3 { margin: 20px 0 7px; font-size: 17px; }
.module-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.module-meter { margin-top: auto; height: 3px; background: var(--line); }
.module-meter span { display: block; height: 100%; background: var(--lime-deep); }
.module-meter .meter-34 { width: 34%; }
.module-meter .meter-0 { width: 0; }
.module-card > small { margin-top: 8px; color: var(--soft); font-size: 8px; }
.accent-dark { background: var(--ink); color: #f4f5ed; border-color: var(--ink); }
.accent-dark .module-icon { border-color: #3c4138; color: var(--lime); }
.accent-dark p, .accent-dark > small, .accent-dark .module-number { color: #8d9586; }
.accent-dark .module-meter { background: #353a31; }
.experiment-card::after { content: "✧"; position: absolute; right: -5px; bottom: -53px; color: color-mix(in srgb, #9a6abd 15%, transparent); font-size: 170px; line-height: 1; }
.experiment-label { position: relative; z-index: 1; margin-top: auto; color: #8f68ae; font: 500 8px/1 "DM Mono", monospace; letter-spacing: .14em; }
.decision-rule { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: auto; padding: 11px; background: color-mix(in srgb, var(--ink) 4%, transparent); border-radius: 10px; font-size: 8px; color: var(--muted); }
.decision-rule i { font-style: normal; color: var(--soft); }
.decision-rule b { padding: 4px 6px; border-radius: 5px; background: var(--ink); color: var(--surface); font-weight: 600; }

.risk-section { display: grid; grid-template-columns: 1fr minmax(370px, .75fr); gap: clamp(40px, 8vw, 120px); padding: 90px clamp(24px, 6vw, 92px); background: #171916; color: #f4f5ed; }
.light-index { color: #788072; }
.risk-copy h2 { margin: 13px 0 17px; font-size: clamp(30px, 4vw, 48px); line-height: 1.2; letter-spacing: -.055em; }
.risk-copy > p { max-width: 580px; color: #9da497; line-height: 1.85; }
.risk-limits { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 38px; border-top: 1px solid #363a32; }
.risk-limits div { padding: 18px 15px 0 0; }
.risk-limits span { display: block; color: #7d8577; font-size: 9px; }
.risk-limits strong { font: 500 20px/1.8 "DM Mono", monospace; color: var(--lime); }
.risk-calculator { padding: 25px; background: #22251f; border: 1px solid #383d34; border-radius: 20px; box-shadow: 0 30px 60px rgba(0, 0, 0, .22); }
.calculator-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.calculator-head span { font-weight: 700; }
.calculator-head small { padding: 4px 7px; border-radius: 6px; background: #33382e; color: #939b8d; font-size: 8px; }
.risk-calculator label { display: grid; gap: 7px; margin-bottom: 14px; color: #9da497; font-size: 9px; }
.risk-calculator input { width: 100%; height: 42px; padding: 0 13px; color: #f4f5ed; background: #191b17; border: 1px solid #383d34; border-radius: 9px; outline: none; font: 500 12px/1 "DM Mono", monospace; }
.risk-calculator input:focus { border-color: var(--lime-deep); }
.risk-calculator input::placeholder { color: #596054; }
.input-suffix { position: relative; }
.input-suffix span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: #7d8577; }
.split-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calculation-result { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; padding: 17px; background: #191b17; border-radius: 12px; }
.calculation-result div:last-child { padding-left: 12px; border-left: 1px solid #353a31; }
.calculation-result span { display: block; color: #747c70; font-size: 8px; margin-bottom: 5px; }
.calculation-result strong { display: block; color: var(--lime); font: 500 13px/1.35 "DM Mono", monospace; }
.formula { margin: 12px 0 0; color: #697065; font: 400 8px/1.6 "DM Mono", monospace; text-align: center; }

.site-footer { min-height: 100px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 25px; padding: 25px clamp(24px, 6vw, 92px); background: var(--surface); border-top: 1px solid var(--line); }
.site-footer > div { display: flex; align-items: center; gap: 8px; }
.site-footer strong { font-size: 12px; }
.site-footer p { margin: 0; text-align: center; color: var(--muted); font-size: 10px; }
.site-footer > span { color: var(--soft); font: 400 9px/1 "DM Mono", monospace; }

.mobile-nav { display: none; }
.method-dialog { width: min(92vw, 570px); padding: 34px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.method-dialog::backdrop { background: rgba(13, 16, 11, .58); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; right: 18px; top: 15px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; }
.dialog-kicker { font: 500 9px/1 "DM Mono", monospace; color: var(--green); letter-spacing: .15em; }
.method-dialog h2 { margin: 10px 0 22px; font-size: 27px; letter-spacing: -.04em; }
.method-dialog ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.method-dialog li { display: flex; gap: 14px; padding: 13px; background: color-mix(in srgb, var(--ink) 4%, transparent); border-radius: 12px; }
.method-dialog li > span { color: var(--green); font: 500 10px/1.5 "DM Mono", monospace; }
.method-dialog li strong { font-size: 12px; }
.method-dialog li p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.dialog-note { margin: 17px 0 0; padding: 12px; border-left: 3px solid var(--lime-deep); color: var(--muted); background: color-mix(in srgb, var(--lime) 12%, transparent); font-size: 10px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 30px; transform: translate(-50%, 20px); padding: 11px 17px; border-radius: 10px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: .25s; font-size: 11px; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.error { background: var(--red); color: #fff; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbit { to { transform: rotate(360deg); transform-origin: 26px 33px; } }

@media (max-width: 1180px) {
  :root { --sidebar: 190px; }
  .hero { grid-template-columns: 1fr 350px; gap: 40px; padding-left: 50px; padding-right: 50px; }
  .hero h1 { font-size: 52px; }
  .content-section, .detail-section { padding-left: 50px; padding-right: 50px; }
  .candidate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .risk-section { padding-left: 50px; padding-right: 50px; gap: 50px; }
}

@media (max-width: 920px) {
  :root { --sidebar: 0px; }
  html { scroll-padding-top: 72px; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .topbar { position: sticky; top: 0; z-index: 20; height: 64px; padding: 0 20px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
  .mobile-brand span { font-size: 14px; }
  .mobile-brand small { color: var(--muted); font: 500 8px/1 "DM Mono", monospace; }
  .market-state { margin-left: auto; margin-right: 13px; }
  .market-state small { display: none; }
  .utc-clock { display: none; }
  .refresh-button { width: 36px; padding: 0; justify-content: center; }
  .refresh-button { font-size: 0; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 48px; padding: 65px 42px 58px; }
  .hero-copy > p { max-width: 620px; }
  .hero-card { max-width: 600px; width: 100%; }
  .ticker-track { grid-template-columns: repeat(4, 210px); overflow-x: auto; scrollbar-width: none; }
  .ticker-track::-webkit-scrollbar { display: none; }
  .content-section { padding: 72px 42px; }
  .detail-section { padding: 0 42px 72px; }
  .radar-layout { grid-template-columns: 1fr; }
  .watch-panel { display: none; }
  .risk-section { grid-template-columns: 1fr; padding: 72px 42px; }
  .risk-calculator { max-width: 620px; width: 100%; }
  .mobile-nav {
    position: fixed; z-index: 30; inset: auto 0 0; height: calc(62px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(20px);
  }
  .mobile-nav a { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; color: var(--soft); }
  .mobile-nav a::after { content: ""; position: absolute; top: 0; width: 23px; height: 2px; border-radius: 0 0 2px 2px; background: transparent; }
  .mobile-nav a.active { color: var(--ink); }
  .mobile-nav a.active::after { background: var(--lime-deep); }
  .mobile-nav svg { width: 18px; height: 18px; }
  .mobile-nav span { font-size: 8px; font-weight: 600; }
}

@media (max-width: 640px) {
  .topbar { padding: 0 14px; }
  .mobile-brand span { display: none; }
  .market-state { margin-left: 0; margin-right: auto; padding-left: 12px; }
  .market-state strong { font-size: 10px; }
  .hero { padding: 50px 18px 44px; gap: 38px; }
  .eyebrow { font-size: 8px; }
  .hero h1 { margin-top: 18px; font-size: clamp(38px, 12vw, 53px); line-height: 1.12; }
  .hero h1 strong { display: inline-block; }
  .hero-copy > p { font-size: 13px; line-height: 1.8; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 10px; margin-top: 27px; }
  .primary-button { width: 100%; }
  .text-button { align-self: center; }
  .hero-card { padding: 20px 18px; border-radius: 19px; }
  .market-pulse { min-height: 150px; gap: 20px; }
  .snapshot-grid div { padding: 13px 7px; }
  .snapshot-grid strong { font-size: 10px; }
  .ticker-track { grid-template-columns: repeat(4, 175px); }
  .ticker-item { min-height: 62px; padding: 0 16px; gap: 9px; }
  .content-section { padding: 62px 18px; }
  .section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 25px; }
  .section-heading h2 { font-size: 32px; }
  .section-heading p { font-size: 12px; }
  .filter-group { width: 100%; overflow-x: auto; }
  .filter { flex: 1; white-space: nowrap; padding: 0 8px; }
  .candidate-grid { grid-template-columns: 1fr; }
  .candidate-card { min-height: 270px; }
  .candidate-price strong { font-size: 25px; }
  .detail-section { padding: 0 18px 62px; }
  .detail-header { align-items: flex-start; flex-direction: column; gap: 18px; padding: 22px 0; }
  .detail-verdict { width: 100%; padding: 13px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .detail-verdict span { justify-self: end; text-align: right; }
  .period-table-wrap { display: none; }
  .period-mobile { display: grid; gap: 8px; }
  .period-card { padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
  .period-card > div { display: flex; align-items: center; justify-content: space-between; }
  .period-card > div > strong { font-size: 13px; }
  .period-card p { display: flex; justify-content: space-between; margin: 15px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
  .period-card p b { color: var(--soft); font-weight: 500; }
  .period-card > small { color: var(--soft); font-size: 8px; }
  .guardrail-callout { padding: 14px; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 270px; }
  .risk-section { padding: 62px 18px; }
  .risk-copy h2 { font-size: 34px; }
  .risk-limits { gap: 5px; }
  .risk-limits span { min-height: 28px; }
  .risk-limits strong { font-size: 16px; }
  .risk-calculator { padding: 19px; border-radius: 17px; }
  .split-inputs { grid-template-columns: 1fr; }
  .calculation-result { grid-template-columns: 1fr; }
  .calculation-result div:last-child { padding: 10px 0 0; border-left: 0; border-top: 1px solid #353a31; }
  .site-footer { grid-template-columns: 1fr; justify-items: center; gap: 10px; padding: 32px 18px; text-align: center; }
  .method-dialog { padding: 28px 18px 22px; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); width: calc(100% - 36px); text-align: center; }
}

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