:root {
  color-scheme: light;
  --ink: #071d35;
  --muted: #63758a;
  --line: #d8e1eb;
  --bg: #f3f7fb;
  --panel: #ffffff;
  --blue: #2463eb;
  --violet: #7557ff;
  --green: #008b65;
  --amber: #bd6a00;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
.topbar { height: 72px; display: flex; justify-content: space-between; align-items: center; padding: 0 max(24px, calc((100vw - 1240px)/2)); background: #09243f; color: white; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand > span { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #2d6cf0; font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand small { color: #aebed0; margin-top: 2px; }
main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.hero { background: linear-gradient(135deg, #0c2d4e, #10233c); color: white; padding: 52px; margin: 34px 0 22px; border-radius: 24px; display: flex; justify-content: space-between; gap: 40px; align-items: flex-end; }
.eyebrow, .panel-label { color: #67b7ff; letter-spacing: .13em; font-weight: 800; font-size: 12px; }
h1 { font-size: clamp(36px, 4vw, 60px); line-height: 1.04; letter-spacing: -.04em; margin: 12px 0 18px; max-width: 820px; }
.hero p:last-child { max-width: 780px; color: #c4d5e7; line-height: 1.65; margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.badges span { border: 1px solid #5786b2; color: #b8d7f5; border-radius: 999px; padding: 7px 10px; font-size: 10px; font-weight: 800; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metrics article, .market-panel, .control-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgba(31, 55, 82, .05); }
.metrics article { padding: 19px; }
.metrics span { color: var(--muted); font-size: 12px; }
.metrics strong { display: block; font-size: 26px; margin: 10px 0 4px; }
.metrics small { color: #8292a4; }
.panels { display: grid; grid-template-columns: minmax(0, 2fr) 340px; gap: 14px; margin-top: 14px; }
.market-panel { padding: 22px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.panel-head span:first-child { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.panel-head h2 { font-size: 17px; margin: 5px 0 0; }
.live-dot { color: var(--green); font-size: 11px; font-weight: 800; }
#chart { width: 100%; height: 330px; margin-top: 10px; overflow: visible; }
.grid line { stroke: #e5ebf2; stroke-width: 1; }
#chart path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.price { stroke: #0c2743; stroke-width: 4; }
.fast { stroke: var(--blue); stroke-width: 2.5; }
.slow { stroke: var(--violet); stroke-width: 2.5; }
.band { stroke: #98a9bd; stroke-width: 2; stroke-dasharray: 6 7; }
.legend { display: flex; gap: 18px; color: var(--muted); font-size: 11px; }
.legend span::before { content: ""; display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; background: #0c2743; }
.legend .fast-key::before { background: var(--blue); }
.legend .slow-key::before { background: var(--violet); }
.legend .band-key::before { background: #98a9bd; }
.control-panel { padding: 22px; }
.control-panel label:not(.toggle) { display: flex; justify-content: space-between; margin: 20px 0 8px; color: #52667b; font-size: 12px; }
input[type="range"] { width: 100%; accent-color: var(--blue); }
select { width: 100%; padding: 11px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 10px; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.toggle { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 9px; font-size: 13px; margin: 16px 0; cursor: pointer; }
.toggle input { display: none; }
.toggle span { width: 38px; height: 22px; border-radius: 99px; background: #c6d0dc; padding: 3px; transition: .2s; }
.toggle span::after { content: ""; display: block; width: 16px; height: 16px; background: white; border-radius: 50%; transition: .2s; }
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { transform: translateX(16px); }
.toggle input:disabled + span { opacity: .45; }
.notice { padding: 12px; border-radius: 10px; background: #eef4fa; color: var(--muted); font-size: 12px; line-height: 1.5; }
.method { padding: 54px 0 70px; }
.method .eyebrow { color: var(--blue); }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.method-grid article { border-top: 2px solid #bfd0e2; padding-top: 18px; }
.method-grid b { color: var(--blue); }
.method-grid h2 { font-size: 16px; margin: 12px 0 7px; }
.method-grid p { color: var(--muted); font-size: 13px; line-height: 1.55; }
footer { border-top: 1px solid var(--line); text-align: center; color: var(--muted); padding: 28px; font-size: 12px; }

@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: flex-start; padding: 36px; }
  .badges { justify-content: flex-start; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .panels { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .topbar { padding: 0 18px; }
  .topbar > a { display: none; }
  main { width: calc(100% - 24px); }
  .hero { padding: 28px 22px; margin-top: 18px; }
  .metrics, .method-grid { grid-template-columns: 1fr; }
  #chart { height: 230px; }
}
