/* OptionView - mobile first; >= 900 px shows all sections at once. Colours as tokens, dark mode via prefers-color-scheme. */
:root {
  --bg: #f5f6f8; --surface: #fff; --border: #dde1e7; --text: #1b2330; --muted: #637083; --accent: #1f5fd1;
  --ok: #1a7f45; --s0: #1a7f45; --s1: #b7791f; --s2: #d9660b; --s3: #c0262d; --sn: #8a94a3;
  --track: #e6e9ee; --radius: 10px; --tabs-h: 3.6rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1420; --surface: #171e2d; --border: #29344a; --text: #e6eaf2; --muted: #97a3b6; --accent: #6ea0ff;
    --ok: #4cc27f; --s0: #4cc27f; --s1: #e0a43a; --s2: #f08a3c; --s3: #ff6b6b; --sn: #6f7b8f; --track: #26314a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0f1420; --surface: #171e2d; --border: #29344a; --text: #e6eaf2; --muted: #97a3b6; --accent: #6ea0ff;
    --ok: #4cc27f; --s0: #4cc27f; --s1: #e0a43a; --s2: #f08a3c; --s3: #ff6b6b; --sn: #6f7b8f; --track: #26314a; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
       padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }
h1, h2 { margin: 0; font-weight: 650; }
h1 { font-size: 1.1rem; } h2 { font-size: 1rem; margin-bottom: .5rem; } h2 small { color: var(--muted); font-weight: 500; margin-left: .4rem; }
.muted { color: var(--muted); } .fine { font-size: .8rem; margin: .6rem 0 0; } .r { text-align: right; }
button { font: inherit; color: inherit; cursor: pointer; }

.top { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .6rem 1rem; padding-top: calc(.6rem + env(safe-area-inset-top));
       background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.accounts { display: flex; gap: .4rem; flex: 1; }
.acc { text-decoration: none; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: .25rem .6rem; display: flex; flex-direction: column; line-height: 1.15; min-width: 5.5rem; }
.acc span { font-size: .7rem; color: var(--muted); }
.acc.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.acc.live b::before { content: "● "; color: var(--s3); } .acc.paper b::before { content: "● "; color: var(--sn); }
.ghost { background: none; border: 1px solid var(--border); border-radius: 8px; padding: .3rem .6rem; color: var(--muted); }

main { padding: .75rem 1rem 1rem; max-width: 1400px; margin: 0 auto; }
.status { margin: .6rem 0; font-size: .85rem; color: var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; gap: .45rem; }
.status em { font-style: normal; }

.sec { display: none; } body[data-tab="overview"] #sec-overview, body[data-tab="positions"] #sec-positions, body[data-tab="iv"] #sec-iv, body[data-tab="profile"] #sec-profile { display: block; }
.top-out { display: none; } body[data-tab="profile"] #app > .status { display: none; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); z-index: 6; }
.tabs button { flex: 1; height: var(--tabs-h); background: none; border: 0; color: var(--muted); font-weight: 600; font-size: .75rem;
               display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; }
.tabs svg { width: 1.4rem; height: 1.4rem; }
.tabs svg circle { fill: currentColor; stroke: none; }
.tabs button.on { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }

.card, .kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: .75rem; }
.kpi span { display: block; color: var(--muted); font-size: .78rem; } .kpi b { font-size: 1.5rem; display: block; line-height: 1.2; } .kpi small { color: var(--muted); }
.kpi.prem { grid-column: 1 / -1; }
.pm { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .55rem; }
.kpi .pm em { font-style: normal; color: var(--muted); font-size: .72rem; margin-right: .2rem; }
.pmb { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .15rem .6rem; font-size: .75rem; color: var(--muted); }
.pmb.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pbar { position: relative; display: block; height: .6rem; margin: .45rem 0 .3rem; border-radius: 999px; background: var(--track); overflow: hidden; }
.pbar u { position: absolute; inset: 0 auto 0 0; width: calc(var(--f) * 100%); border-radius: 999px; text-decoration: none;
          background: linear-gradient(90deg, var(--s0), var(--s1) 50%, var(--s3)); background-size: calc(100% / var(--f)) 100%; }
.pbar s { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--text); opacity: .55; text-decoration: none; }
.kpi.prem .pl { display: block; font-variant-numeric: tabular-nums; } .kpi.prem.gain .pl { color: var(--s0); } .kpi.prem.loss .pl { color: var(--s3); }
.kpi.rtile { display: flex; flex-direction: column; } .kpi.rtile b { color: var(--muted); font-variant-numeric: tabular-nums; }
.kpi.rtile > span:first-child { font-weight: 700; margin-bottom: .2rem; }  /* font size and grey come from ".kpi span", like "Premium received" */
.kpi.ltile { display: flex; flex-direction: column; gap: .1rem; }
.kpi.ltile { border-width: 2px; } .kpi.ltile.band-green { border-color: var(--s0); } .kpi.ltile.band-yellow { border-color: var(--s1); } .kpi.ltile.band-red { border-color: var(--s3); }
.kpi.ltile.band-green .sv { color: var(--s0); } .kpi.ltile.band-yellow .sv { color: var(--s1); } .kpi.ltile.band-red .sv { color: var(--s3); }
.kpi.itile { grid-column: 1 / -1; display: flex; flex-direction: column; gap: .1rem; }
.kpi.itile .un { font-size: 1.05rem; font-weight: 700; color: var(--muted); margin-bottom: .2rem; }
.kpi.itile .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: .8rem; } .kpi.itile .cell.r { text-align: right; }
.kpi.itile .cell > * { display: block; } .kpi.itile .cell b { text-align: center; }  .kpi.itile .cell .rg { display: flex; justify-content: space-between; }
.hbar { position: relative; display: block; height: .9rem; margin-top: .45rem; }
.hbar .trk { position: absolute; left: 0; right: 0; top: .175rem; height: .55rem; border-radius: 999px; overflow: hidden;
             background: linear-gradient(90deg, var(--s3), var(--s1) 50%, var(--s0)); }
.hbar .trk::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--surface); opacity: .6; }
.hbar .dl, .hbar .dr { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--surface) 72%, transparent); }
.hbar .dl { left: 0; } .hbar .dr { right: 0; }
.hbar .now { position: absolute; top: 50%; border-radius: 50%; text-decoration: none; transform: translate(-50%, -50%); }
.hbar .now { width: .9rem; height: .9rem; background: var(--text); border: 2px solid var(--surface); }
.kpi.itile .rg { color: var(--muted); font-size: .7rem; }
.kpi.itile .lb { font-size: clamp(.7rem, 3.3vw, .85rem); white-space: nowrap; } .kpi.itile b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kpi.ltile .un { font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: .2rem; }  /* heading style of "Premium received" */
.kpi.ltile .lbrow, .kpi.ltile .vrow { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.kpi.ltile .lb { font-size: clamp(.6rem, 2.9vw, .72rem); white-space: nowrap; }
.kpi.ltile .sv { font-size: 1.65rem; line-height: 1.1; } .kpi.ltile .dv { font-size: 1rem; text-align: right; } .kpi.ltile b.dv { color: var(--muted); }
.kpi.ltile .sp { margin-top: .3rem; }
button.kpi { font: inherit; color: inherit; text-align: left; width: 100%; }
.go { cursor: pointer; } .go:hover, .go:focus-visible { border-color: var(--accent); outline: none; }
.kpi.bad { border-color: var(--s3); }
.kpi.s0 b { color: var(--s0); } .kpi.s1 b { color: var(--s1); } .kpi.s2 b { color: var(--s2); } .kpi.s3 b { color: var(--s3); }

.filters { display: grid; gap: .45rem; margin-bottom: .2rem; } .filters .seg { justify-self: start; }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .3rem .9rem; white-space: nowrap; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ivbar { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .4rem 0 .7rem; font-size: .85rem; }
.ivs { display: inline-flex; gap: .7rem; } .ivs b { font-variant-numeric: tabular-nums; }

.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pos { background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--sn); border-radius: var(--radius); padding: .6rem .75rem; }
.pos.s0 { border-left-color: var(--s0); } .pos.s1 { border-left-color: var(--s1); } .pos.s2 { border-left-color: var(--s2); } .pos.s3 { border-left-color: var(--s3); }
.l1, .l2 { display: flex; align-items: center; gap: .7rem; } .l1 { justify-content: space-between; } .l1 span { color: var(--muted); } .l1 .x { color: var(--text); font-weight: 650; }
.l2 { margin-top: .3rem; font-variant-numeric: tabular-nums; font-size: .9rem; } .l2 .bar { flex: 1; } .sc { font-weight: 650; }
.fl em, .ptable em { font-style: normal; font-size: .72rem; border: 1px solid var(--s1); color: var(--s1); border-radius: 4px; padding: 0 .3rem; margin-right: .3rem; }
details { margin-top: .3rem; font-size: .75rem; } summary { color: var(--muted); cursor: pointer; }
dl { display: grid; grid-template-columns: auto auto; gap: .15rem 1rem; margin: .4rem 0 0; } dt { color: var(--muted); } dd { margin: 0; text-align: right; }

.bar { display: inline-block; height: .55rem; min-width: 3.5rem; background: var(--track); border-radius: 999px; overflow: hidden; vertical-align: middle; }
.bar i { display: block; height: 100%; background: var(--sn); }
.bar.s0 i { background: var(--s0); } .bar.s1 i { background: var(--s1); } .bar.s2 i { background: var(--s2); } .bar.s3 i { background: var(--s3); }
.ptable { display: none; }

.ivcards { display: grid; gap: .75rem; }
.rng { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; font-size: .8rem; color: var(--muted); }
.rng i { position: relative; flex: 1; height: .4rem; background: var(--track); border-radius: 999px; }
.rng b { position: absolute; top: -.25rem; width: .9rem; height: .9rem; margin-left: -.45rem; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.ivgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.ivgrid span { display: block; color: var(--muted); font-size: .78rem; } .ivgrid b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.gauge { display: block; height: .35rem; background: var(--track); border-radius: 999px; overflow: hidden; margin-top: .2rem; } .gauge u { display: block; height: 100%; background: var(--accent); }

.profile-in { display: grid; gap: .75rem; padding: .75rem 1rem 1rem; max-width: 40rem; margin: 0 auto; }
.who { display: flex; align-items: center; gap: .9rem; } .who p { margin: 0; } .who h2 { margin-bottom: .1rem; }
.avatar { width: 3rem; height: 3rem; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); display: grid; place-items: center; color: var(--accent); flex: none; }
.avatar svg, .tabs svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } .avatar svg { width: 1.6rem; height: 1.6rem; }
.row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .45rem 0; border-top: 1px solid var(--border); }
.row:first-of-type { border-top: 0; } .row > span { color: var(--muted); font-size: .9rem; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; padding: .35rem .8rem; color: var(--muted); font-size: .9rem; } .seg button + button { border-left: 1px solid var(--border); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.danger { width: 100%; margin-top: .6rem; padding: .7rem; background: none; color: var(--s3); border: 1px solid var(--s3); border-radius: 8px; font-weight: 600; }
code { font-size: .85em; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0 .25rem; }
.login { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.login-box { width: min(22rem, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.login-box h1 { margin-bottom: 1rem; } .login-box label { display: block; margin-bottom: .8rem; color: var(--muted); font-size: .85rem; }
.login-box input { display: block; width: 100%; margin-top: .25rem; padding: .6rem; font-size: 1rem; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
.login-box button { width: 100%; padding: .7rem; background: var(--accent); color: #fff; border: 0; border-radius: 8px; font-weight: 600; }
.err { color: var(--s3); margin: 0 0 .8rem; }

@media (min-width: 900px) and (min-height: 501px) {
  body { padding-bottom: 0; } .tabs { display: none; } .top-out { display: block; } .mob-out { display: none; }
  #sec-profile { max-width: 1400px; margin: 0 auto; padding: 0 2rem 2rem; } .profile-in { max-width: none; padding: 0; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); align-items: start; } .top { padding-inline: 2rem; } main { padding: 1rem 2rem 2rem; }
  .sec, body[data-tab] .sec { display: block !important; margin-bottom: 1rem; }
  main { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 0 1.25rem; align-items: start; }
  .status { grid-column: 1 / -1; grid-row: 3; }
  #sec-overview { grid-column: 1; grid-row: 1; margin-bottom: 0; } #sec-positions { grid-column: 1; grid-row: 2; } #sec-iv { grid-column: 2; grid-row: 1 / span 2; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 44rem; }
  .ivbar, .plist { display: none; }
  .filters { grid-auto-flow: column; justify-content: start; align-items: center; gap: 1.2rem; margin-bottom: .6rem; } .chips { padding-bottom: 0; }
  .ptable { display: table; width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-variant-numeric: tabular-nums; }
  .ptable th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 600; padding: .5rem .6rem; border-bottom: 1px solid var(--border); position: sticky; top: 3.4rem; background: var(--surface); }
  .ptable th.r { text-align: right; } .ptable td { padding: .4rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
  .ptable tbody tr.s0 td:first-child { box-shadow: inset 4px 0 var(--s0); } .ptable tbody tr.s1 td:first-child { box-shadow: inset 4px 0 var(--s1); }
  .ptable tbody tr.s2 td:first-child { box-shadow: inset 4px 0 var(--s2); } .ptable tbody tr.s3 td:first-child { box-shadow: inset 4px 0 var(--s3); }
  .ptable tr.tot td { font-weight: 650; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
  .ptable .bar { width: 5rem; margin-right: .4rem; }
  .ptable tbody:hover tr:not(.tot):hover td { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
}
@media (prefers-reduced-motion: no-preference) { .bar i, .gauge u { transition: width .4s; } }

.hrow { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .2rem; } .hrow .un { margin: 0; }
.pchips { display: flex; gap: .25rem; } .pcb, .lcb { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .1rem .5rem; font-size: .72rem; color: var(--muted); }
.pcb.on, .lcb.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.kpi.itile[data-open-tab] { cursor: pointer; }
.kpi.itile .pv { display: block; } .kpi.itile .rg .mid { display: none; } .kpi.itile.all .rg .mid { display: inline; }
.kpi.itile .pv b { line-height: 1; } .kpi.itile .pv .hbar { margin-top: .15rem; }
.kpi.itile.all .pv + .pv { margin-top: .9rem; }
body[data-market="open"] .acc.live b::before { color: var(--s0); }  /* LIVE dot: red = market closed (default), green = open; PAPER stays grey */
.hscroll { grid-column: 1 / -1; display: flex; gap: .6rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: .15rem; }
.hscroll > .kpi { flex: 0 0 calc((100% - .6rem) / 2); min-width: 0; width: auto; scroll-snap-align: start; }
.hscroll > .ucol { flex: 0 0 calc((100% - .6rem) / 2); min-width: 0; display: flex; flex-direction: column; gap: .6rem; scroll-snap-align: start; } .ucol > .kpi { flex: none; width: 100%; }
.kpi.ltile .mx { font-weight: 650; font-variant-numeric: tabular-nums; } .kpi.ltile .mx-green { color: var(--s0); } .kpi.ltile .mx-yellow { color: var(--s1); } .kpi.ltile .mx-red { color: var(--s3); }
.kpi.ltile.dred { border-color: var(--s3); }  /* |delta| of the contract at or above tile_red_delta */

/* IV tab: line chart IV / Hist. Vol. */
.lchart { display: block; margin-top: .6rem; }
.lkey { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .8rem; margin: .1rem 0 .3rem; }
.lkey span::before { content: ""; display: inline-block; width: .9rem; height: 3px; border-radius: 2px; margin-right: .3rem; vertical-align: middle; background: currentColor; }
.lkey b { font-weight: 650; }
.k0 { color: var(--accent); } .k1 { color: var(--s2); } .k2 { color: var(--s0); }
.lc svg { width: 100%; height: auto; display: block; overflow: visible; }
.lc .gl { stroke: var(--border); stroke-width: .5; } .lc .ref { stroke: var(--muted); stroke-width: .7; stroke-dasharray: 3 2; }
.lc .gt { fill: var(--muted); font-size: 5px; }
.lc .ln { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lc .ax { display: flex; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .7rem; }

/* Grip to move a tile of the IV tab (made by app.js, same look as the p2pDashboard) */
.kpi { position: relative; }
.kpi-grip { display: flex; position: absolute; top: .05rem; right: .05rem; align-items: flex-start; justify-content: flex-end; width: 2rem; height: 2rem; padding: .4rem .4rem 0 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: grab; touch-action: none; }
.kpi-grip:hover, .kpi-grip:focus-visible { color: var(--text); background: var(--track); }
.kpi.moving { opacity: .35; }
.kpi-ghost { position: fixed; z-index: 50; margin: 0; pointer-events: none; opacity: .92; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.lchart { grid-column: 1 / -1; margin-top: 0; }
.kpis[data-tiles] .hrow { padding-right: 1.6rem; }

/* Positions filters: three selects in one row */
.filters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.filters label { font-size: .68rem; color: var(--muted); display: block; min-width: 0; }
.filters select { width: 100%; margin-top: .1rem; font: inherit; font-size: .9rem; padding: .35rem .4rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
@media (min-width: 900px) and (min-height: 501px) { .filters { grid-template-columns: repeat(3, 10rem); gap: 1rem; margin-bottom: .6rem; } }

/* Profile > Security: session length slider */
.row.sess { gap: 1rem; } .row.sess input[type=range] { flex: 1; min-width: 0; max-width: 16rem; accent-color: var(--accent); }

/* Positions: the risk score is one step larger and coloured by its band, like the number on the Overview tiles */
.pos .sc { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pos.s0 .sc { color: var(--s0); } .pos.s1 .sc { color: var(--s1); } .pos.s3 .sc { color: var(--s3); }

/* Delta of a contract: green below tile_yellow_delta, yellow from there, red from tile_red_delta */
.d0 { color: var(--s0) !important; } .d1 { color: var(--s1) !important; } .d3 { color: var(--s3) !important; }

/* Positions: premium multiple coloured like the tiles (below 1.00 green, 1.00-1.99 yellow, from 2.00 red) */
.mxv.mx-green { color: var(--s0); } .mxv.mx-yellow { color: var(--s1); } .mxv.mx-red { color: var(--s3); }

/* Positions: delta by DTE chart. Axis labels and dots are HTML (the filters hide them by attribute), only grid and curves are SVG. */
.dchart { margin: .5rem 0 .6rem; }
.dplot { position: relative; margin: .5rem .6rem 1.5rem 1.9rem; aspect-ratio: 2 / 1; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.dplot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dplot .gl { stroke: var(--border); stroke-width: .5; vector-effect: non-scaling-stroke; }
.dplot .ln { fill: none; stroke: currentColor; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.dplot .yt { position: absolute; left: -1.9rem; width: 1.6rem; text-align: right; transform: translateY(50%); font-size: .68rem; color: var(--muted); }
.dplot .xt { position: absolute; top: 100%; margin-top: .25rem; transform: translateX(-50%); font-size: .68rem; color: var(--muted); }
.dot { position: absolute; width: .7rem; height: .7rem; margin: 0 0 -.35rem -.35rem; border-radius: 50%; background: var(--sn); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--muted); }
.dot.s0 { background: var(--s0); } .dot.s1 { background: var(--s1); } .dot.s3 { background: var(--s3); }
.c0 { color: var(--s1); } .c1 { color: var(--s2); } .c2 { color: var(--s3); }
.dkey small { flex-basis: 100%; }
@media (min-width: 900px) and (min-height: 501px) { .dchart { max-width: 44rem; } }

/* risk score by DTE: tinted band zones behind the dots (same colours as the tiles) */
.dplot .zone { position: absolute; left: 0; right: 0; bottom: 0; opacity: .12; } .zone.z0 { background: var(--s0); } .zone.z1 { background: var(--s1); } .zone.z3 { background: var(--s3); }
.dplot .ln { color: var(--muted); stroke-width: 1.2; opacity: .8; } .dplot .cl { position: absolute; right: 0; transform: translateY(-110%); font-size: .62rem; color: var(--muted); }
.dplot .ln { stroke-width: 1.6; opacity: 1; } .dplot .ln.c0, .dplot .cl.c0 { color: var(--s1); } .dplot .ln.c1, .dplot .cl.c1 { color: var(--s2); } .dplot .ln.c2, .dplot .cl.c2 { color: var(--s3); }

/* Positions: page 1 = filters and list/table, page 2 = chart (swipe left); two dots under the title bar show the page.
   Desktop shows both below each other. Turned sideways the chart page fills the screen (body[data-full]). */
.pdots { display: flex; justify-content: center; gap: .5rem; margin: -.2rem 0 .5rem; }
.pdots i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--border); cursor: pointer; } .pdots i.on { background: var(--accent); }
.pager { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; margin: 0 -1rem; }
.pager::-webkit-scrollbar { display: none; }
.page { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; padding: 0 1rem; }
@media (min-width: 900px) and (min-height: 501px) {
  .pdots { display: none; } .pager { display: block; overflow: visible; margin: 0; } .page { padding: 0; }
}
body[data-full] .top, body[data-full] .tabs, body[data-full] .pdots, body[data-full] .status, body[data-full] .filters { display: none; }
body[data-full] main { padding: .4rem .6rem; } body[data-full] { padding-bottom: 0; }
body[data-full] .pager { margin: 0; } body[data-full] .page { padding: 0; }
body[data-full] .dchart { margin: 0; padding: .4rem .6rem; border: 0; max-width: none; }
body[data-full] .dplot { aspect-ratio: auto; height: calc(100vh - 5.2rem); }
.dplot .half { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.dplot .hl { position: absolute; left: 0; transform: translateY(-110%); margin-left: .2rem; font-size: .62rem; color: var(--muted); }
