/* TRITON site: the watch app's look on the web, in two colourways: Dark (the
   default, below) and Light (html[data-theme="light"], at the end; theme.js).
   Black ground, hairline cards, pills, tracked capitals, the 60-tick ring.
   Colours are tokens; the same values as the watch app (see the shared reference)
   (Tide, Reef, Dusk, Slate) and remembers the choice in this browser. */
:root{
  color-scheme:dark;
  --black:#000000;
  --surface:#12181E; --line:#2B343C; --text:#F2F6F9; --muted:#93A3B1;
  --accent:#45B0E6; --hold:#FF9F43;
  --good:#4ADE80; --warn:#FFC24D; --alert:#FF5C5C;
  --brand:var(--accent); --brand-sub:#9AA4B2;
  --bg:var(--black); --ink:var(--text); --buoy:var(--hold);
  --accent-soft:color-mix(in srgb,var(--accent) 14%,var(--black));
  --shift:color-mix(in srgb,var(--warn) 16%,var(--black));
  --risk:color-mix(in srgb,var(--alert) 20%,var(--black));
  --dim:color-mix(in srgb,var(--line) 60%,var(--muted));
  /* System fonts: nothing is fetched from another server. */
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --cond:"Roboto Condensed","Arial Narrow","Avenir Next Condensed","sans-serif-condensed",system-ui,sans-serif;
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--black);color:var(--text);font-family:var(--sans);font-size:16px;line-height:1.55}
a{color:var(--accent);text-underline-offset:3px}
a:hover{color:var(--text)}
a:focus-visible,button:focus-visible,summary:focus-visible{outline:2px solid var(--hold);outline-offset:3px;border-radius:6px}
[hidden]{display:none!important}

.site-header,.site-header *,.site-footer,.site-footer *,.t-page,.t-page *{box-sizing:border-box}
.container{max-width:1240px;margin:0 auto;padding-inline:max(16px,env(safe-area-inset-left,0px)) max(16px,env(safe-area-inset-right,0px))}
.skip{position:absolute;left:-999px;top:8px;background:var(--accent);color:var(--black);padding:8px 14px;border-radius:999px;z-index:10;font-weight:500}
.skip:focus{left:12px}

/* ---------- header ---------- */
.site-header{border-bottom:1px solid var(--line)}
.site-header .bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 24px;padding-block:14px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--brand);font:500 16px var(--cond);letter-spacing:.34em}
.brand:hover{color:var(--brand)}
.brand svg{width:26px;height:26px;display:block}
.site-header nav{display:flex;flex-wrap:wrap;gap:4px 22px;order:3;flex:1 1 100%}
.site-header nav a,.site-header nav span{font:500 12px var(--cond);letter-spacing:.2em;text-transform:uppercase;text-decoration:none;color:var(--muted);padding:8px 0;position:relative}
.site-header nav a:hover{color:var(--text)}
.site-header nav a[aria-current="page"]{color:var(--text)}
.site-header nav a[aria-current="page"]::after{content:"";position:absolute;left:0;bottom:1px;width:22px;height:3px;border-radius:2px;background:var(--accent)}
.site-header nav span{opacity:.6;cursor:default}
.site-header nav small{font:500 9px var(--cond);letter-spacing:.14em;border:1px solid var(--line);border-radius:999px;padding:1px 6px;margin-left:6px;vertical-align:1px}
@media (min-width:760px){
  .site-header nav{order:0;flex:0 1 auto;margin-right:auto;margin-left:12px;column-gap:16px}
  .site-header .bar{column-gap:16px}
}

/* ---------- type ---------- */
.eyebrow{font:500 12px var(--cond);letter-spacing:.24em;text-transform:uppercase;color:var(--accent);margin:0 0 14px}
h1.t-h1{font:300 clamp(34px,5.6vw,60px)/1.04 var(--sans);letter-spacing:-.01em;margin:0;text-wrap:balance}
h1.t-h1 b,h2.t-h2 b{font-weight:500;color:var(--accent)}
h2.t-h2{font:300 clamp(26px,3.4vw,36px)/1.12 var(--sans);margin:0 0 12px;text-wrap:balance}
h3.t-h3{font:500 12px var(--cond);letter-spacing:.2em;text-transform:uppercase;color:var(--accent);margin:0 0 10px}
.t-lead{font-size:clamp(17px,1.6vw,20px);color:var(--muted);max-width:56ch;margin:18px 0 0}
.t-muted{color:var(--muted)}

/* ---------- buttons ---------- */
.t-btn{display:inline-flex;align-items:center;gap:8px;border:2px solid var(--accent);background:var(--accent);color:var(--black);font:500 15px var(--sans);padding:11px 22px;border-radius:999px;text-decoration:none;cursor:pointer}
.t-btn:hover{color:var(--black);filter:brightness(1.1)}
.t-btn.ghost{background:transparent;color:var(--accent)}
.t-btn.ghost:hover{color:var(--text);border-color:var(--text)}
.t-row{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}

/* ---------- sections and cards ---------- */
.t-page section{padding-block:clamp(40px,7vw,84px)}
.t-page section + section{border-top:1px solid var(--line)}
.t-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.t-card{border:1px solid color-mix(in srgb,var(--line) 70%,var(--accent));border-radius:22px;padding:24px;background:var(--black);display:flex;flex-direction:column;gap:10px}
.t-card p{margin:0;color:var(--muted)}
.t-card .t-link{margin-top:auto;padding-top:8px;font:500 12px var(--cond);letter-spacing:.2em;text-transform:uppercase;text-decoration:none}
.t-card.soon{border-style:dashed;border-color:var(--line)}
.t-tag{display:inline-block;font:500 10px var(--cond);letter-spacing:.16em;text-transform:uppercase;border:1px solid var(--line);color:var(--muted);border-radius:999px;padding:2px 9px;margin-left:8px;vertical-align:2px}
.t-notice{border:2px solid var(--accent);border-radius:18px;padding:16px 20px;display:flex;flex-direction:column;gap:4px}
.t-notice strong{font-weight:500}
.t-notice span{color:var(--muted)}
.t-notice.quiet{border:1px solid var(--line)}

/* ---------- hero ---------- */
.hero{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:clamp(24px,5vw,72px);align-items:center}
.hero-ring{width:min(100%,380px);justify-self:center}
.hero-ring svg,.hero-ring img{display:block;width:100%;height:auto}
.ring .off{stroke:var(--line)}
.ring .on{stroke:var(--accent);animation:tick .25s ease-out both;animation-delay:calc(var(--i)*38ms)}
.ring text{font-family:var(--sans)}
@keyframes tick{from{stroke:var(--line)}to{stroke:var(--accent)}}
@media (max-width:800px){.hero{grid-template-columns:1fr}.hero-ring{width:min(70%,300px);order:-1}}

.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(24px,5vw,72px);align-items:start}
@media (max-width:800px){.split{grid-template-columns:1fr}}

/* ---------- screens strip (app page) ---------- */
.screens{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:26px 20px}
.screens figure{margin:0;display:flex;flex-direction:column;gap:10px;align-items:center;text-align:center}
.screens img{width:100%;max-width:280px;height:auto;display:block}
.screens figcaption{font-size:14px;color:var(--muted);max-width:26ch}
.screens figcaption strong{display:block;color:var(--text);font:500 12px var(--cond);letter-spacing:.2em;text-transform:uppercase;margin-bottom:4px}

/* ---------- long text pages ---------- */
.prose{max-width:72ch}
.prose h1{font:300 clamp(32px,4.6vw,48px)/1.08 var(--sans);margin:0 0 8px}
.prose h1 b{font-weight:500;color:var(--accent)}
.prose h2{font:500 13px var(--cond);letter-spacing:.2em;text-transform:uppercase;color:var(--accent);margin:40px 0 10px}
.prose h3{font:500 17px var(--sans);margin:26px 0 6px}
.prose p,.prose li{color:var(--text)}
.prose ul{padding-left:20px;display:flex;flex-direction:column;gap:8px}
.prose li::marker{color:var(--accent)}
.prose .meta{color:var(--muted);font-size:14px}
.prose .toc{display:flex;flex-wrap:wrap;gap:10px;margin:22px 0 0;padding:0;list-style:none}
.prose .toc a{display:inline-block;border:2px solid var(--line);border-radius:999px;padding:6px 16px;text-decoration:none;font-size:14px;color:var(--muted)}
.prose .toc a:hover{border-color:var(--accent);color:var(--text)}
.tablewrap{overflow-x:auto;border:1px solid var(--line);border-radius:15px;margin:16px 0}
.tablewrap table{border-collapse:collapse;width:100%;min-width:560px;font-size:14px}
.tablewrap th,.tablewrap td{text-align:left;padding:10px 14px;border-bottom:1px solid var(--line);vertical-align:top}
.tablewrap th{background:var(--surface);color:var(--muted);font:500 11px var(--cond);letter-spacing:.14em;text-transform:uppercase}
.tablewrap tr:last-child td{border-bottom:0}
.todo{background:color-mix(in srgb,var(--warn) 16%,var(--black));border-radius:6px;padding:0 5px}

/* ---------- footer ---------- */
.site-footer{border-top:1px solid var(--line);padding-block:36px 48px;margin-top:0}
.foot-grid{display:flex;flex-wrap:wrap;justify-content:space-between;gap:20px 40px}
.foot-grid p{margin:6px 0 0;color:var(--muted);font-size:14px;max-width:44ch}
.foot-grid nav{display:flex;flex-wrap:wrap;gap:8px 22px;align-self:flex-start}
.foot-grid nav a{font:500 12px var(--cond);letter-spacing:.2em;text-transform:uppercase;text-decoration:none;color:var(--muted);padding:6px 0}
.foot-grid nav a:hover{color:var(--text)}
.foot-safety{margin:26px 0 0;color:var(--muted);font-size:13.5px;max-width:84ch}
.foot-small{margin:10px 0 0;color:var(--muted);font-size:12.5px;opacity:.85;max-width:84ch}

@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ---------- the colour switch (theme.js) ---------- */
.theme-pick{display:inline-flex;border:1px solid var(--line);border-radius:999px;padding:2px;gap:2px}
.theme-pick button{display:inline-grid;place-items:center;width:32px;height:28px;border:0;background:transparent;color:var(--muted);border-radius:999px;padding:0;cursor:pointer}
.theme-pick button svg{width:15px;height:15px;fill:currentColor}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.theme-pick button:hover{color:var(--text)}
.theme-pick button[aria-pressed="true"]{background:var(--surface);color:var(--text)}

/* ---------- Light: the white of the store pictures ----------
   The same tokens with light values; cards turn white with a soft shadow, as the
   store's tiles. A watch screen stays black: the drawings, faces and canvases that
   show one keep the dark tokens (.on-dark). */
html[data-theme="light"]{
  color-scheme:light;
  --black:#F5F5F7;
  --surface:#ECEEF1; --line:#D8DCE1; --text:#1D1D1F; --muted:#6E6E73;
  --accent:#1786C5; --hold:#E07B12;
  --good:#15A34A; --warn:#B7791F; --alert:#D93036;
  --brand-sub:#6E6E73;
}
html[data-theme="light"] .on-dark,
html[data-theme="light"] .cl-face{
  --black:#000000;
  --surface:#12181E; --line:#2B343C; --text:#F2F6F9; --muted:#93A3B1;
  --accent:#45B0E6; --hold:#FF9F43;
  --good:#4ADE80; --warn:#FFC24D; --alert:#FF5C5C;
  --accent-soft:color-mix(in srgb,#45B0E6 14%,#000);
  --dim:color-mix(in srgb,#2B343C 60%,#93A3B1);
}
html[data-theme="light"] .t-card,
html[data-theme="light"] .t-notice,
html[data-theme="light"] .cl-card,
html[data-theme="light"] .cl-res,
html[data-theme="light"] .sm-card,
html[data-theme="light"] .card,
html[data-theme="light"] .bb-card,
html[data-theme="light"] .g-fig,
html[data-theme="light"] .g-next,
html[data-theme="light"] .tablewrap{background:#FFFFFF;box-shadow:0 6px 24px rgba(20,28,40,.07)}
html[data-theme="light"] .t-card,
html[data-theme="light"] .cl-card,
html[data-theme="light"] .sm-card,
html[data-theme="light"] .card,
html[data-theme="light"] .bb-card,
html[data-theme="light"] .g-fig{border-color:#E4E7EB}
html[data-theme="light"] .t-card.soon{background:transparent;box-shadow:none;border-color:var(--line)}
html[data-theme="light"] .tablewrap th{background:#F3F4F6}
html[data-theme="light"] .site-header{background:rgba(255,255,255,.72);backdrop-filter:saturate(1.4) blur(10px)}
html[data-theme="light"] .site-footer{background:#FFFFFF}
html[data-theme="light"] h1.t-h1 b,html[data-theme="light"] h2.t-h2 b,html[data-theme="light"] .prose h1 b{color:#2A9AD8}
/* the simulator's deck and card */
html[data-theme="light"] .w-time{color:#55636F}
html[data-theme="light"] .w-judge{color:#A47F00}
html[data-theme="light"] .sm-cardfill{box-shadow:0 0 0 1px #DADDE2,0 14px 30px rgba(0,0,0,.18)}
html[data-theme="light"] .sm-key.sign{box-shadow:inset 0 0 0 2px rgba(196,150,0,.55)}
