/* FXSize — forex calculators. One stylesheet, light and dark themes.
   Fonts: Inter (UI) and JetBrains Mono (numbers), self-hosted, SIL OFL 1.1. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(../fonts/jbmono-lat.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f6f7fb;
  --bg2: #eef1f7;
  --card: #ffffff;
  --ink: #0d1526;
  --ink2: #334155;
  --mut: #64748b;
  --line: #e3e8f0;
  --line2: #d5dce8;
  --accent: #1d4ed8;
  --accent2: #2563eb;
  --accent-soft: #e8efff;
  --accent-ink: #1e40af;
  --pos: #059669;
  --pos-soft: #e6f6f0;
  --neg: #dc2626;
  --neg-soft: #fdecec;
  --warn: #b45309;
  --warn-soft: #fff6e5;
  --focus: 0 0 0 3px rgba(37, 99, 235, .28);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, .05), 0 18px 48px rgba(15, 23, 42, .10);
  --r: 14px;
  --r-sm: 10px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --wrap: 1180px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a0f1c;
  --bg2: #0e1526;
  --card: #111a2e;
  --ink: #e8edf6;
  --ink2: #c3cbda;
  --mut: #8b97ad;
  --line: #1e2a44;
  --line2: #283656;
  --accent: #5b8cff;
  --accent2: #7aa2ff;
  --accent-soft: #17254a;
  --accent-ink: #a9c1ff;
  --pos: #34d399;
  --pos-soft: #0f2d26;
  --neg: #f87171;
  --neg-soft: #34161b;
  --warn: #fbbf24;
  --warn-soft: #2e2410;
  --focus: 0 0 0 3px rgba(122, 162, 255, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, .35), 0 20px 50px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.mut { color: var(--mut); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------ header */
.hdr { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.hdr .wrap { display: flex; align-items: center; gap: 22px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; font-size: 19px; letter-spacing: -.03em; }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.logo b { color: var(--accent); font-weight: 750; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.nav > a, .nav .dd > button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9px;
  color: var(--ink2); font-size: 15px; font-weight: 520; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.nav > a:hover, .nav .dd > button:hover, .nav .dd.open > button { background: var(--bg2); color: var(--ink); text-decoration: none; }
.nav > a[aria-current="page"] { color: var(--accent); }
.dd { position: relative; }
.dd > button svg { width: 14px; height: 14px; transition: transform .15s; }
.dd.open > button svg { transform: rotate(180deg); }
.dd-menu { position: absolute; top: calc(100% + 8px); left: -8px; width: 560px; padding: 10px; display: none;
  grid-template-columns: 1fr 1fr; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
.dd.open .dd-menu { display: grid; }
.dd-menu a { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.dd-menu a:hover { background: var(--bg2); text-decoration: none; }
.dd-menu a .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.dd-menu a b { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.dd-menu a small { display: block; color: var(--mut); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.status { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); font-size: 13px; color: var(--ink2); white-space: nowrap; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mut); }
.status.open .dot { background: var(--pos); box-shadow: 0 0 0 0 color-mix(in srgb, var(--pos) 60%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pos) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink2); cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: var(--line2); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-dark { display: none; }
:root[data-theme="dark"] .theme-dark { display: block; }
:root[data-theme="dark"] .theme-light { display: none; }
.burger { display: none; }

/* mobile menu */
.mnav { display: none; }
@media (max-width: 920px) {
  .nav, .status .txt-long { display: none; }
  .burger { display: grid; }
  .mnav.open { display: block; position: fixed; inset: 64px 0 0 0; z-index: 49; background: var(--bg); overflow: auto; padding: 12px 20px 40px; }
  .mnav a { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 550; }
  .mnav a .ic { color: var(--accent); }
  .mnav h4 { margin: 18px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); }
}

/* ------------------------------------------------------------ page hero */
.hero { padding: 34px 0 22px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; padding: 0; list-style: none; font-size: 13.5px; color: var(--mut); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line2); }
.crumbs a { color: var(--mut); }
.hero h1 { margin: 0; font-size: clamp(30px, 4.2vw, 44px); line-height: 1.1; letter-spacing: -.035em; font-weight: 760; }
.hero .lead { margin: 12px 0 0; max-width: 760px; color: var(--ink2); font-size: 17.5px; line-height: 1.55; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 13px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink2); }
.chip svg { width: 14px; height: 14px; }
.chip.live { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 30%, var(--line)); background: var(--pos-soft); }
.chip.closed { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); background: var(--warn-soft); }

/* ------------------------------------------------------------ calculator layout */
.calc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; }
.calc.wide { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-h h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.card-b { padding: 20px; }
.results { position: sticky; top: 84px; }
@media (max-width: 900px) { .results { position: static; } }

/* fields */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.fields .full { grid-column: 1 / -1; }
.fields > * { min-width: 0; }
@media (max-width: 480px) { .fields { grid-template-columns: 1fr; } }
.f label, .f .lbl { display: flex; align-items: baseline; justify-content: flex-start; gap: 0 5px; flex-wrap: wrap; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.f label small, .f .lbl small { font-weight: 450; color: var(--mut); font-size: 12.5px; margin-left: auto; }
.inp { position: relative; display: flex; align-items: stretch; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--card); transition: border-color .15s, box-shadow .15s; }
.inp:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line2)); }
.inp:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.inp input, .inp select { flex: 1 1 auto; width: 100%; min-width: 0; height: 44px; padding: 0 12px; border: 0; background: transparent; outline: none; font-family: var(--mono); font-size: 15.5px; font-variant-numeric: tabular-nums; }
.inp select { font-family: var(--font); font-size: 15px; font-weight: 500; cursor: pointer; appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.inp select option, .inp select optgroup { background: var(--card); color: var(--ink); }
.inp .ad { display: flex; align-items: center; padding: 0 12px; color: var(--mut); font-size: 13.5px; font-weight: 550; white-space: nowrap; background: var(--bg2); }
.inp .ad:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); border-right: 1px solid var(--line); }
.inp .ad:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; border-left: 1px solid var(--line); }
.inp .ad select { width: auto; flex: none; height: 100%; padding: 0 24px 0 2px; background-position: right 4px center; font-size: 13.5px; color: var(--ink2); }
.inp .ad:has(select) { padding: 0 6px 0 10px; }
.inp.err { border-color: var(--neg); }
.help { margin-top: 6px; font-size: 12.5px; color: var(--mut); line-height: 1.45; }
.help .num { color: var(--ink2); }
.err-msg { margin-top: 6px; font-size: 12.5px; color: var(--neg); }

/* segmented control */
.seg { display: flex; padding: 3px; gap: 3px; border-radius: 11px; background: var(--bg2); border: 1px solid var(--line); }
.seg label, .f .seg label { flex: 1; display: block; margin: 0; position: relative; cursor: pointer; font-weight: inherit; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 14px; font-weight: 560; color: var(--ink2); white-space: nowrap; transition: background .12s, color .12s; }
.seg input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 0 0 1px var(--line); }
.seg input:focus-visible + span { box-shadow: var(--focus); }
.seg.buy-sell input[value="buy"]:checked + span { color: var(--pos); }
.seg.buy-sell input[value="sell"]:checked + span { color: var(--neg); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick button { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; font-family: var(--mono); color: var(--ink2); cursor: pointer; }
.quick button:hover { border-color: var(--accent); color: var(--accent); }
.quick button.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent-ink); }
.more { margin-top: 16px; border-top: 1px dashed var(--line2); padding-top: 14px; }
.more > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary svg { width: 14px; height: 14px; transition: transform .15s; }
.more[open] > summary svg { transform: rotate(90deg); }
.more .fields { margin-top: 14px; }

/* results */
.big { padding: 22px 20px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--accent-soft), transparent 140%); border-radius: var(--r) var(--r) 0 0; }
.big .k { font-size: 13px; font-weight: 600; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }
.big .v { margin-top: 4px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(36px, 5vw, 50px); line-height: 1.05; font-weight: 650; letter-spacing: -.04em; color: var(--ink); }
.big .v small { font-size: .42em; font-weight: 550; color: var(--mut); letter-spacing: -.01em; margin-left: 4px; }
.big .sub { margin-top: 6px; color: var(--ink2); font-size: 14.5px; }
.big.neg-bg { background: linear-gradient(180deg, var(--neg-soft), transparent 140%); }
.big.neg-bg .k { color: var(--neg); }
.big.pos-bg { background: linear-gradient(180deg, var(--pos-soft), transparent 140%); }
.big.pos-bg .k { color: var(--pos); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .stats.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { padding: 14px 20px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 0; }
.stats .stat:nth-child(2n) { border-right: 0; }
.stats.three .stat { border-right: 1px solid var(--line); }
.stats.three .stat:nth-child(3n) { border-right: 0; }
@media (max-width: 520px) { .stats.three .stat:nth-child(3n) { border-right: 1px solid var(--line); } .stats.three .stat:nth-child(2n) { border-right: 0; } }
.stat .k { font-size: 12.5px; color: var(--mut); font-weight: 550; }
.stat .v { margin-top: 2px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v small { font-size: 12.5px; color: var(--mut); font-weight: 500; }
.actions { display: flex; gap: 8px; padding: 14px 20px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 580; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent2); color: #fff; }
.btn.ok { color: var(--pos); border-color: var(--pos); }
.math { margin: 0 20px 18px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg2); border: 1px solid var(--line); font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--ink2); overflow-x: auto; }
.math .eq { color: var(--mut); }
.math b { color: var(--ink); font-weight: 600; }
.warnbox { margin: 0 20px 16px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: 13.5px; border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.warnbox:empty { display: none; }

/* lot breakdown */
.lots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-bottom: 1px solid var(--line); }
.lots > div { padding: 12px 20px; border-right: 1px solid var(--line); min-width: 0; }
.lots > div:last-child { border-right: 0; }
.lots .k { font-size: 12px; color: var(--mut); font-weight: 550; }
.lots .v { font-family: var(--mono); font-size: 16px; font-weight: 600; }

/* tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th, table.t td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t th:first-child, table.t td:first-child { text-align: left; }
table.t thead th { font-size: 12.5px; font-weight: 600; color: var(--mut); background: var(--bg2); position: sticky; top: 0; }
table.t td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.t td.l { font-family: var(--font); }
table.t tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
table.t tr.hl td { background: var(--accent-soft); font-weight: 600; }
table.t tr.pp td { background: var(--bg2); font-weight: 650; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 650; font-family: var(--font); }
.tag.r { background: var(--neg-soft); color: var(--neg); }
.tag.s { background: var(--pos-soft); color: var(--pos); }
.tag.p { background: var(--accent-soft); color: var(--accent-ink); }

/* ------------------------------------------------------------ content */
.section { padding: 28px 0; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; padding: 40px 0 20px; }
@media (max-width: 980px) { .content-grid { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.prose { max-width: 760px; color: var(--ink2); font-size: 16.5px; line-height: 1.72; }
.prose h2 { margin: 2.1em 0 .6em; color: var(--ink); font-size: 26px; line-height: 1.25; letter-spacing: -.025em; font-weight: 720; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.7em 0 .5em; color: var(--ink); font-size: 19px; letter-spacing: -.015em; font-weight: 680; }
.prose p { margin: 0 0 1.05em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose code, .prose .formula { font-family: var(--mono); font-size: .9em; background: var(--bg2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--ink); }
.prose .formula { display: block; padding: 14px 16px; margin: 0 0 1.2em; font-size: 15px; line-height: 1.6; overflow-x: auto; border-radius: var(--r-sm); }
.prose .callout { margin: 1.4em 0; padding: 16px 18px; border-radius: var(--r-sm); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); color: var(--ink2); }
.prose .callout b { color: var(--accent-ink); }
.prose .example { margin: 1.2em 0 1.5em; padding: 18px 20px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.prose .example h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-ink); }
.prose .example ol { margin-bottom: 0; }
.prose table.t { margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--card); font-size: 14px; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.toc { position: sticky; top: 90px; font-size: 14px; }
.toc h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--mut); line-height: 1.4; }
.toc li a:hover { color: var(--ink); text-decoration: none; }
.toc li a.on { color: var(--accent); border-left-color: var(--accent); }
.toc .side-card { margin-top: 24px; padding: 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.toc .side-card b { display: block; color: var(--ink); margin-bottom: 4px; }
.toc .side-card p { margin: 0 0 10px; color: var(--mut); font-size: 13.5px; line-height: 1.5; }

/* FAQ */
.faq { margin-top: 2.4em; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 15px 18px; font-weight: 620; color: var(--ink); display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; color: var(--mut); transition: transform .15s; flex: none; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details > div { padding: 0 18px 16px; color: var(--ink2); }

/* related / cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tcard { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s, box-shadow .15s; }
.tcard:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-lg); }
.tcard .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tcard .ic svg { width: 22px; height: 22px; }
.tcard b { font-size: 16.5px; letter-spacing: -.015em; font-weight: 650; }
.tcard span { color: var(--mut); font-size: 14px; line-height: 1.5; }
.tcard .go { margin-top: auto; color: var(--accent); font-size: 14px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.h2 { margin: 0 0 16px; font-size: 22px; letter-spacing: -.02em; font-weight: 700; }

/* symbol links */
.symgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.symgrid a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.symgrid a:hover { border-color: var(--accent); text-decoration: none; }
.symgrid a b { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.symgrid a small { color: var(--mut); font-size: 12px; }
.symgrid a.on { border-color: var(--accent); background: var(--accent-soft); }

/* ------------------------------------------------------------ home */
.home-hero { padding: 64px 0 40px; position: relative; overflow: hidden; }
.home-hero::before { content: ""; position: absolute; inset: -40% -10% auto -10%; height: 520px; z-index: -1;
  background: radial-gradient(60% 60% at 30% 40%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
              radial-gradient(40% 50% at 80% 30%, color-mix(in srgb, var(--pos) 10%, transparent), transparent 70%); }
.home-hero h1 { margin: 0; max-width: 820px; font-size: clamp(36px, 5.6vw, 62px); line-height: 1.04; letter-spacing: -.045em; font-weight: 780; }
.home-hero h1 em { font-style: normal; color: var(--accent); }
.home-hero p { margin: 18px 0 0; max-width: 640px; font-size: 19px; color: var(--ink2); line-height: 1.55; }
.home-hero .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.home-hero .cta .btn { height: 46px; padding: 0 20px; font-size: 15.5px; border-radius: 12px; }
.ticker { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px; margin-top: 34px; scrollbar-width: none; }
.ticker::-webkit-scrollbar { display: none; }
.ticker a { flex: none; display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); min-width: 124px; }
.ticker a:hover { text-decoration: none; border-color: var(--line2); }
.ticker b { font-size: 12.5px; color: var(--mut); font-weight: 600; }
.ticker .px { font-family: var(--mono); font-size: 16px; font-weight: 600; }
.ticker .ch { font-family: var(--mono); font-size: 12.5px; }
.panel-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }
@media (max-width: 900px) { .panel-grid { grid-template-columns: 1fr; } }

/* strength bars */
.sbars { display: grid; gap: 8px; }
.sbar { display: grid; grid-template-columns: 54px 1fr 72px; gap: 12px; align-items: center; }
.sbar .cur { display: flex; align-items: center; gap: 8px; font-weight: 650; font-family: var(--mono); font-size: 14px; }
.sbar .flag { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sbar .track { position: relative; height: 26px; border-radius: 7px; background: var(--bg2); overflow: hidden; }
.sbar .track::after { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1px; background: var(--line2); }
.sbar .track.noaxis::after { display: none; }
.sbar .fill { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; transition: left .5s, width .5s, background .3s; }
.sbar .fill.up { background: linear-gradient(90deg, color-mix(in srgb, var(--pos) 55%, transparent), var(--pos)); }
.sbar .fill.dn { background: linear-gradient(270deg, color-mix(in srgb, var(--neg) 55%, transparent), var(--neg)); }
.sbar .pct { text-align: right; font-family: var(--mono); font-size: 13.5px; font-weight: 600; }

/* heatmap */
.heat { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: 12.5px; }
.heat th { font-family: var(--mono); font-weight: 650; color: var(--ink2); padding: 4px; font-size: 12.5px; }
.heat td { font-family: var(--mono); text-align: center; padding: 8px 2px; border-radius: 6px; font-variant-numeric: tabular-nums; color: var(--ink); min-width: 52px; }
.heat td.self { background: var(--bg2); color: var(--mut); }

/* timeframe tabs */
.tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.tabs button { height: 30px; padding: 0 11px; border: 0; border-radius: 7px; background: none; font-size: 13px; font-weight: 600; color: var(--ink2); cursor: pointer; font-family: var(--mono); }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 0 0 1px var(--line); }
.chart { height: 380px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px 0; }
.chart-legend button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-family: var(--mono); font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink); }
.chart-legend button i { width: 10px; height: 3px; border-radius: 2px; }
.chart-legend button.off { opacity: .4; }
.chart-legend button .v { color: var(--mut); font-weight: 500; }

/* ------------------------------------------------------------ market hours */
.clock-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.clock-now .time { font-family: var(--mono); font-size: clamp(40px, 6vw, 60px); font-weight: 650; letter-spacing: -.04em; line-height: 1; }
.clock-now .date { color: var(--mut); }
.sess-rows { position: relative; margin-top: 8px; }
.sess-row { display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: center; height: 46px; }
.sess-row .nm { display: flex; flex-direction: column; line-height: 1.2; }
.sess-row .nm b { font-size: 14.5px; }
.sess-row .nm small { color: var(--mut); font-size: 12px; }
.sess-row .lane { position: relative; height: 30px; border-radius: 8px; background: var(--bg2); }
.sess-row .blk { position: absolute; top: 0; bottom: 0; border-radius: 8px; display: flex; align-items: center; padding: 0 10px; font-size: 12px; font-weight: 650; color: #fff; overflow: hidden; white-space: nowrap; font-family: var(--mono); }
.sess-row .blk.off { opacity: .45; }
.hours-axis { display: grid; grid-template-columns: 128px 1fr; gap: 14px; }
.hours-axis .ticks { position: relative; height: 22px; font-family: var(--mono); font-size: 11.5px; color: var(--mut); }
.hours-axis .ticks span { position: absolute; transform: translateX(-50%); top: 4px; }
.now-line { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--neg); border-radius: 2px; z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; top: -5px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--neg); }
.sess-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .sess-cards { grid-template-columns: repeat(2, 1fr); } }
.sess-card { padding: 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.sess-card .top { display: flex; justify-content: space-between; align-items: center; }
.sess-card b { font-size: 15.5px; }
.sess-card .st { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .05em; }
.sess-card .st.on { background: var(--pos-soft); color: var(--pos); }
.sess-card .st.offs { background: var(--bg2); color: var(--mut); }
.sess-card .tm { margin-top: 10px; font-family: var(--mono); font-size: 18px; font-weight: 600; }
.sess-card .lc { margin-top: 2px; color: var(--mut); font-size: 13px; }
.sess-card .cd { margin-top: 10px; font-size: 13px; color: var(--ink2); }
.sess-card .bar { height: 4px; border-radius: 2px; margin-top: 8px; background: var(--bg2); overflow: hidden; }
.sess-card .bar i { display: block; height: 100%; border-radius: 2px; }

/* mobile result bar */
.mbar { display: none; }
@media (max-width: 900px) {
  .mbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); cursor: pointer;
    transform: translateY(140%); transition: transform .25s; border: 0; width: auto; font: inherit; text-align: left; }
  .mbar.on { transform: translateY(0); }
  .mbar .k { font-size: 12px; opacity: .7; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
  .mbar .v { font-family: var(--mono); font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
  .mbar .go { font-size: 13px; font-weight: 600; opacity: .85; white-space: nowrap; }
}
@media (max-width: 600px) {
  .hero { padding: 20px 0 16px; }
  .hero .lead { font-size: 15.5px; }
  .chips .chip:not(:first-child) { display: none; }
  .card-b { padding: 16px; }
  .stat { padding: 12px 16px; }
  .lots > div { padding: 10px 14px; }
  .big { padding: 18px 16px 14px; }
  .actions { padding: 12px 16px; }
  .actions .btn { flex: 1; }
  .math { margin: 0 16px 16px; }
  .home-hero { padding: 36px 0 24px; }
  .home-hero p { font-size: 16.5px; }
}

/* ------------------------------------------------------------ footer */
.ftr { margin-top: 56px; border-top: 1px solid var(--line); background: var(--card); }
.ftr .wrap { padding-top: 40px; padding-bottom: 28px; }
.ftr-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .ftr-grid { grid-template-columns: 1fr 1fr; } }
.ftr h4 { margin: 0 0 10px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); }
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr li { margin: 6px 0; font-size: 14.5px; }
.ftr li a { color: var(--ink2); }
.ftr p { color: var(--mut); font-size: 14px; margin: 10px 0 0; max-width: 340px; }
.risk { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--mut); line-height: 1.6; }
.copy { margin-top: 12px; font-size: 13px; color: var(--mut); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 550; z-index: 99; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 404 */
.nf { text-align: center; padding: 90px 0 40px; }
.nf h1 { font-size: 46px; letter-spacing: -.04em; margin: 0; }
.nf p { color: var(--mut); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .hdr, .ftr, .actions, .toc, .related, .mnav { display: none !important; } body { background: #fff; } .card { box-shadow: none; } }
