/* Kairotick / TradeWarden site system (2026-10-07, v3). One idea carries the identity: your firm draws the red line,
   TradeWarden draws the yellow one. Red dashed = a firm's limit, solid yellow = where TradeWarden acts; nothing else uses
   those two colours. Type: Archivo only, wide for words that lead, narrow for numbers. Built by Alireza. */
:root {
  --paper: #f2f4f7; --sheet: #ffffff; --ink: #0f1b2d; --ink2: #24324a; --graphite: #4f5b6b; --rule: #d3dae3; --rule2: #b8c2cf;
  --red: #d42a1f; --yellow: #f5c400; --yellow-soft: #fff4c2; --teal: #0a7a6c;
  --wide: 116%; --narrow: 72%;
  --font: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--font); font-stretch: 100%; -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--red); }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; color: var(--ink); }
h1 { font-size: clamp(36px, 7.4vw, 74px); line-height: 1.02; font-stretch: var(--wide); letter-spacing: -0.015em; }
h2 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.08; font-stretch: var(--wide); letter-spacing: -0.01em; }
h3 { font-size: 20px; line-height: 1.25; font-weight: 750; }
h4 { font-size: 16px; line-height: 1.3; font-weight: 750; }
.num { font-stretch: var(--narrow); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.005em; }
.lead { font-size: clamp(18px, 2.1vw, 21px); line-height: 1.55; color: var(--ink2); max-width: 62ch; }
.quiet { color: var(--graphite); }
.small { font-size: 14.5px; color: var(--graphite); line-height: 1.5; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 60; background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* the mark: a yellow line above a red dashed one */
.mark { flex: none; display: block; }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: rgba(242,244,247,.92); backdrop-filter: saturate(150%) blur(10px); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand b { font-weight: 800; font-size: 19px; font-stretch: var(--wide); letter-spacing: -0.01em; }
.brand span { font-size: 13px; color: var(--graphite); margin-top: 3px; }
.top nav { display: flex; gap: 22px; }
.top nav a { text-decoration: none; font-size: 15px; font-weight: 600; color: var(--ink2); }
.top nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); }

/* buttons: the yellow one is the action, everything else is a link */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 13px 22px; border-radius: 10px;
  font: 750 17px/1.2 var(--font); font-stretch: 104%; text-decoration: none; cursor: pointer; text-align: center;
  background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); box-shadow: inset 0 -4px 0 rgba(15,27,45,.22); transition: transform .1s, box-shadow .1s; }
.btn:hover { box-shadow: inset 0 -4px 0 rgba(15,27,45,.4); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(15,27,45,.4); }
.btn-sm { min-height: 42px; padding: 9px 16px; font-size: 15px; white-space: nowrap; }
.btn-ink { background: var(--ink); color: #fff; box-shadow: inset 0 -4px 0 rgba(0,0,0,.35); }
.link { font-weight: 700; }

/* radio chips: a choice, filled in ink when picked */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: 10px 14px; border: 1.5px solid var(--rule2); border-radius: 9px; background: var(--sheet); color: var(--ink2);
  font-size: 15px; font-weight: 600; cursor: pointer; line-height: 1.25; }
.chip span:hover { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }

/* the two-line chart (assets/lines.js draws into it) */
.lines { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.lines .plot { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.lines svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lines .lab { position: absolute; font-size: 13.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; transform: translateY(-50%); }
.lines .lab.limit { color: var(--red); padding: 2px 4px; }
.lines .lab.guard { color: var(--ink); background: var(--yellow); padding: 3px 8px; border-radius: 6px; }
.lines .lab.event { font-size: 13px; font-weight: 700; padding: 4px 8px; border-radius: 7px; opacity: 0; transition: opacity .4s; }
.lines .lab.event.safe { background: var(--ink); color: #fff; }
.lines .lab.event.bust { background: #fff; color: var(--red); border: 1.5px solid var(--red); }
.lines.done .lab.event { opacity: 1; }
.lines .axis { display: flex; justify-content: space-between; padding: 6px 12px 10px; font-size: 12.5px; color: var(--graphite); font-variant-numeric: tabular-nums; }
.lines .cap { padding: 12px 14px 0; font-size: 14px; font-weight: 700; color: var(--ink2); }
@media (max-width: 560px) { .lines .plot { aspect-ratio: 5 / 4; } .lines .lab { font-size: 12px; } .lines .lab.event { font-size: 12px; } }

/* legend under a chart */
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font-size: 15px; color: var(--ink2); }
.legend span { display: inline-flex; align-items: center; gap: 10px; }
.legend i { flex: none; width: 30px; height: 0; border-top: 4px solid var(--yellow); border-radius: 2px; }
.legend i.red { border-top: 3px dashed var(--red); }

/* tables */
.tbl { overflow-x: auto; border: 1px solid var(--rule); border-radius: 14px; background: var(--sheet); }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { padding: 12px 14px; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
thead th { border-top: 0; font-size: 14px; font-weight: 700; color: var(--graphite); background: #f7f9fb; }

/* questions */
details { border-top: 1px solid var(--rule2); }
details:last-of-type { border-bottom: 1px solid var(--rule2); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 18px; padding: 18px 0; font-weight: 750; font-size: 18px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 14px; height: 14px; margin-top: 6px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: rotate(45deg); transition: transform .15s; }
details[open] summary::after { transform: rotate(225deg); margin-top: 12px; }
details > p, details > div { padding: 0 0 20px; color: var(--ink2); max-width: 70ch; }

/* footer */
.foot { border-top: 1px solid var(--rule); padding: 30px 0 110px; font-size: 14.5px; color: var(--graphite); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--ink2); }

@media (max-width: 920px) { .top nav { display: none; } }
@media (max-width: 560px) { .brand span { display: none; } .brand b { font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, summary::after, .lines .lab.event { transition: none; } }
