/* status.ix.net: the exchange sites' look (tokens from the portal's site.css), plus status colors that always come
   with an icon and a label (dataviz status palette: good / warning / critical; maintenance in the brand blue). */
:root {
  --navy: #072644; --blue: #0160AE; --blue-bright: #3C8DE0; --red: #D30D0D;
  --bg: #F4F7FA; --surface: #FFFFFF; --ink: #0A2140; --ink-soft: #4B5E75; --rule: #D3DDE8; --link: #0160AE;
  --grid: #E3E9F0; --axis: #C3CEDA;
  --good: #0ca30c; --warn: #fab219; --warn-edge: rgb(0 0 0 / .28); --crit: #d03b3b; --maint: #0160AE; --none: #b7c2ce; --nomon: #9aa7b5;
  --line: #0160AE; --wash: rgb(1 96 174 / .10);
  --preview: #FFF4D6; --preview-ink: #5A4100; --stale: #FDE8E8; --stale-ink: #8A1111;
  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #041A30; --surface: #072644; --ink: #E8EFF7; --ink-soft: #A9BCD3; --rule: #1B3C62; --link: #6FB0F5;
    --grid: #13365C; --axis: #24486F;
    --warn-edge: transparent; --maint: #5AA0E8; --none: #2B4C70; --nomon: #5f6f80;
    --line: #5AA0E8; --wash: rgb(90 160 232 / .12);
    --preview: #3B2E05; --preview-ink: #FFE7A3; --stale: #3D0D0D; --stale-ink: #FFC2C2; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #041A30; --surface: #072644; --ink: #E8EFF7; --ink-soft: #A9BCD3; --rule: #1B3C62; --link: #6FB0F5;
  --grid: #13365C; --axis: #24486F;
  --warn-edge: transparent; --maint: #5AA0E8; --none: #2B4C70; --nomon: #5f6f80;
  --line: #5AA0E8; --wash: rgb(90 160 232 / .12);
  --preview: #3B2E05; --preview-ink: #FFE7A3; --stale: #3D0D0D; --stale-ink: #FFC2C2; color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 3px; border-radius: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-soft); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; }
h2 { font-size: 19px; margin: 34px 0 12px; }
.skip { position: absolute; left: 12px; top: -80px; background: var(--surface); padding: 10px 16px; border-radius: 6px; z-index: 10; }
.skip:focus { top: 12px; }

/* header: navy band in both themes, white logo */
header.top { background: var(--navy); color: #fff; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 20px; }
.brand img { display: block; width: 120px; height: auto; }
.brand span { padding-left: 10px; border-left: 1px solid rgb(255 255 255 / .35); }
header nav { display: flex; align-items: center; gap: 4px; }
header nav a { color: #DCE6F2; text-decoration: none; padding: 8px 10px; border-radius: 6px; font-weight: 600; font-size: 15px; }
header nav a[aria-current] { color: #fff; background: rgb(255 255 255 / .12); }
.theme { background: none; border: 1px solid rgb(255 255 255 / .35); color: #fff; border-radius: 6px; width: 36px; height: 34px; cursor: pointer; font-size: 16px; }

.preview { background: var(--preview); color: var(--preview-ink); padding: 10px 0; font-size: 14.5px; }
.stale { background: var(--stale); color: var(--stale-ink); padding: 12px 0; font-size: 15px; }
.problems { background: var(--stale); color: var(--stale-ink); padding: 6px 0; font-size: 14.5px; }
.problems p { margin: 6px 0; }

.hero { padding-top: 28px; }
.hero h1 { margin: 0; font-size: 28px; }
.sub { color: var(--ink-soft); margin: 8px 0 0; }
.crumbs { margin: 0 0 8px; font-size: 14px; color: var(--ink-soft); }

/* status icon: the filled shape takes the status color; the mark inside is white */
.ic { width: 18px; height: 18px; flex: none; }
.ic > :not(.mark) { fill: var(--c, var(--nomon)); }
.ic .mark { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.s-operational, .d-ok { --c: var(--good); }
.s-incident, .k-incident { --c: var(--crit); }
.s-maintenance, .k-maintenance { --c: var(--maint); }
.s-possible { --c: var(--warn); }
.s-possible .ic .mark { stroke: #0b0b0b; }
.s-unavailable, .s-not_monitored { --c: var(--nomon); }

.overall { display: flex; align-items: center; gap: 12px; }
.overall .ic { width: 30px; height: 30px; }
.badge, .kind { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; white-space: nowrap;
  padding: 4px 10px 4px 7px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); }

/* exchanges */
.exlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ex { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--c, var(--rule)); border-radius: 10px; padding: 14px 16px; }
.ex.solo { border-left-width: 1px; }
.exhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.exhead.big h1 { display: flex; align-items: center; gap: 14px; font-size: 24px; flex-wrap: wrap; }
.exname { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.exname:hover span { text-decoration: underline; }
.exname img, .exhead h1 img { height: 30px; width: auto; }
.logo-d { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-l { display: none; } :root:not([data-theme="light"]) .logo-d { display: block; } }
:root[data-theme="dark"] .logo-l { display: none; }
:root[data-theme="dark"] .logo-d { display: block; }
.facts { margin: 10px 0 0; font-size: 15px; }
.note { margin: 10px 0 0; font-size: 14.5px; padding: 8px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--rule); }

/* 90-day strip: one mark per day, 2px gaps, tooltip from data-tip (status.js) */
.strip { display: flex; gap: 2px; height: 30px; margin-top: 14px; }
.strip .d { flex: 1; border-radius: 2px; min-width: 0; }
.d { display: inline-block; background: var(--c, var(--none)); }
.d-ok { --c: var(--good); }
.d-incident { --c: var(--crit); }
.d-maintenance { --c: var(--maint); }
.d-possible { --c: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-edge); }
.d-not_monitored, .d-unavailable { --c: var(--nomon); }
.d-none { --c: var(--none); }
.strip-axis { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.strip-axis .near { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-soft); margin: 12px 0 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .d { width: 12px; height: 12px; border-radius: 2px; }
@media (max-width: 640px) {
  .strip .d:nth-child(-n+60) { display: none; }
  .strip-axis .far { display: none; }
  .strip-axis .near { display: inline; }
}

/* notices */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; margin: 0 0 10px; }
.card.open { border-left: 4px solid var(--c); }
.card header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card h3 { margin: 0; font-size: 17px; }
.card h3 a { color: var(--ink); }
.card .meta { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.card .latest { margin: 8px 0 0; font-size: 15px; }
.kind { font-size: 13px; padding: 2px 9px 2px 6px; }
.kind .ic { width: 15px; height: 15px; }
.ntitle { margin: 10px 0 0; font-size: 26px; }
.facts-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 14px 0 0; }
.facts-dl dt { color: var(--ink-soft); }
.facts-dl dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--rule); }
.timeline li { margin: 0 0 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--axis); }
.timeline p { margin: 0; }
.timeline .when { font-size: 14.5px; color: var(--ink-soft); }
.timeline .when b { color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }
.filters button { font: inherit; font-size: 14px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.history { margin-top: 16px; }
.hrow[hidden] { display: none; }

/* traffic chart: 2px line, 10% wash, hairline grid; crosshair + tooltip from status.js */
.chartbox { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 12px 8px; position: relative; }
.chart { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart.narrow { display: none; }
@media (max-width: 640px) { .chart.wide { display: none; } .chart.narrow { display: block; } }
.chart .line { fill: none; stroke: var(--line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--wash); }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--ink-soft); font-size: 11.5px; font-family: var(--body); }
.chart .cross { stroke: var(--axis); stroke-width: 1; }
.chart circle { fill: var(--line); stroke: var(--surface); stroke-width: 2; }
.chartbox figcaption { font-size: 13px; margin-top: 4px; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.35; padding: 6px 9px; border-radius: 6px; white-space: nowrap; z-index: 5; }
.tip b { display: block; }
.striptip { position: fixed; }

footer { border-top: 1px solid var(--rule); margin-top: 44px; padding: 20px 0 36px; color: var(--ink-soft); font-size: 14px; }
footer p { margin: 4px 0; }
@media (max-width: 640px) {
  .hero h1 { font-size: 23px; }
  .brand { font-size: 17px; }
  .brand img { width: 96px; }
  header nav a { padding: 8px 7px; font-size: 14px; }
}
