/* TockRelay landing — palette sampled from the app icon:
   ink field #0B0D14, clock casing cream #E8E2DB,
   left face blue #015CA0, right face amber #EB9A04.
   Motif: a two-faced chess clock — blue side, amber side, a pause band between. */

:root {
  --paper: #f3efe8;
  --casing: #e8e2db;
  --card: #fbf9f5;
  --ink: #0b0d14;
  --ink-soft: #4a4d57;
  --line: #d6cfc4;
  --blue: #015ca0;
  --blue-fill: #015ca0;
  --amber: #7a4e00;
  --amber-fill: #eb9a04;
  --amber-wash: #f7e3bb;
  --blue-wash: #d9e6f1;
  --band: #0b0d14;
  --band-ink: #ede8e0;
  --focus: #015ca0;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b0d14;
    --casing: #151823;
    --card: #121521;
    --ink: #ede8e0;
    --ink-soft: #a3a6b1;
    --line: #262a38;
    --blue: #5aa8e6;
    --amber: #f2b23a;
    --amber-wash: #2a2210;
    --blue-wash: #0f2233;
    --band: #151823;
    --focus: #f2b23a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
code, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.wrap { max-width: 70rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 1rem; padding-top: 0.85rem; padding-bottom: 0.85rem; }
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 750; font-size: 1.15rem; color: var(--ink); text-decoration: none;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 550; font-size: 0.95rem; }
.site-nav a:hover { color: var(--blue); text-decoration: underline; }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .site-head .wrap { flex-wrap: wrap; }
  .nav-toggle {
    display: inline-flex; margin-left: auto; min-height: 44px; align-items: center;
    background: none; border: 1px solid var(--line); border-radius: 8px;
    color: var(--ink); font: inherit; font-size: 0.92rem; padding: 0.3rem 0.8rem; cursor: pointer;
  }
  .site-nav { display: none; width: 100%; margin: 0; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.4rem 0; }
  .site-nav a { display: block; padding: 0.65rem 0; border-top: 1px solid var(--line); }
  .no-js .site-nav { display: block; }
  .no-js .nav-toggle { display: none; }
}

/* ---------- hero ---------- */
.hero { padding: 3.5rem 0 4rem; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
.readout { display: inline-flex; gap: 0.35rem; margin: 0 0 1.1rem; padding: 0.35rem; border-radius: 12px; background: var(--casing); border: 1px solid var(--line); }
.face {
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600;
  font-size: 1rem; padding: 0.2rem 0.7rem; border-radius: 7px;
}
.face-w { background: var(--blue-fill); color: #fff; }
.face-b { background: var(--amber-fill); color: #0b0d14; }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 3.9rem); letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--blue); }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 36rem; }
.launch-line { font-size: 0.95rem; color: var(--ink-soft); }
.launch-line .dot { display: inline-block; vertical-align: 0.05em; margin-right: 0.45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--amber-fill); box-shadow: 0 0 0 3px var(--amber-wash); }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.5rem 0 1rem; }
.store-badge { display: inline-block; line-height: 0; border-radius: 10px; }
.store-badge svg { width: 180px; height: auto; }

.casing {
  position: relative; margin: 1.4rem auto 0; max-width: 21rem;
  background: var(--casing); border: 1px solid var(--line);
  border-radius: 28px; padding: 1rem;
}
.casing::before, .casing::after {
  content: ""; position: absolute; top: -12px; width: 26%; height: 12px;
  background: var(--casing); border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0;
}
.casing::before { left: 16%; }
.casing::after { right: 16%; }
.casing img { display: block; border-radius: 18px; width: 100%; }
.casing figcaption { font-size: 0.85rem; color: var(--ink-soft); text-align: center; padding-top: 0.7rem; }

/* ---------- sections ---------- */
section { padding: 4.25rem 0; }
.sec-head { max-width: 44rem; margin-bottom: 2.2rem; }
.sec-head p { color: var(--ink-soft); font-size: 1.08rem; }
.tick {
  display: inline-block; font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--amber); border-bottom: 2px solid var(--amber-fill); margin-bottom: 0.9rem;
}
.rule-top { border-top: 1px solid var(--line); }

/* relay: how it works */
.relay { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--card); }
.relay li { padding: 1.6rem 1.5rem 1.4rem; position: relative; }
.relay li + li { border-left: 1px solid var(--line); }
.relay li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--line); }
.relay li:first-child::before { background: var(--blue-fill); }
.relay li:last-child::before { background: var(--amber-fill); }
.relay .step { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); display: block; margin-bottom: 0.4rem; }
.relay p { color: var(--ink-soft); margin: 0; }

/* band */
.band { background: var(--band); color: var(--band-ink); }
.band .sec-head p, .band p { color: #b9b6b0; }
.band .tick { color: var(--amber-fill); }
.band a { color: #f2b23a; }

/* spec table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
th, td { text-align: left; vertical-align: top; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); background: var(--casing); }
tbody th { font-weight: 650; white-space: nowrap; }
td code { white-space: nowrap; background: var(--casing); padding: 0.1rem 0.4rem; border-radius: 5px; font-size: 0.92em; }
.spec { min-width: 40rem; }
.fineprint { font-size: 0.9rem; color: var(--ink-soft); margin-top: 1rem; }

/* screenshot strip */
.strip {
  list-style: none; margin: 0; padding: 0 0 1rem; display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(15rem, 1fr); gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory;
}
.strip li { scroll-snap-align: start; }
.strip figure { margin: 0; }
.strip img { display: block; width: 100%; border-radius: 16px; border: 1px solid #2a2e3c; background: #121520; }
.strip figcaption { padding-top: 0.8rem; font-size: 0.95rem; }
.strip strong { display: block; color: var(--band-ink); }
.strip span { color: #b9b6b0; }

/* table details */
.details { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3rem; align-items: start; }
.details dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 2px solid var(--ink); }
.details dl > div { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); }
.details dl > div:nth-child(odd) { padding-right: 1.25rem; }
.details dt { font-weight: 650; margin-bottom: 0.2rem; }
.details dd { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.pull { font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.35; letter-spacing: -0.015em; border-left: 6px solid var(--blue-fill); padding-left: 1.1rem; }

/* games */
.games { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.2rem; }
.game { border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; background: var(--card); }
.game-main { grid-row: span 2; border-top: 8px solid var(--blue-fill); }
.game-go { border-left: 8px solid var(--amber-fill); }
.game ul { margin: 0.6rem 0 0; padding-left: 1.1rem; color: var(--ink-soft); }
.game li { margin-bottom: 0.3rem; }
.game .mono { color: var(--amber); font-weight: 600; }

/* free vs pro */
.ledger th[scope="row"] { white-space: normal; font-weight: 550; }
.ledger td { text-align: center; font-family: var(--mono); white-space: nowrap; }
.ledger .yes { color: var(--blue); font-weight: 700; }
.ledger .pro { color: var(--amber); font-weight: 700; }
.ledger { min-width: 30rem; }
.ledger thead th + th { text-align: center; }

/* honest list */
.honest { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2.5rem; list-style: none; padding: 0; margin: 0; }
.honest li { padding: 0.9rem 0 0.9rem 2rem; border-bottom: 1px solid var(--line); position: relative; }
.honest li::before { content: "II"; position: absolute; left: 0; top: 0.95rem; font-family: var(--mono); font-weight: 700; color: var(--amber); }

/* guides as a scoresheet */
.scoresheet { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); counter-reset: mv; }
.scoresheet li { counter-increment: mv; border-bottom: 1px solid var(--line); }
.scoresheet a { display: grid; grid-template-columns: 3.2rem 1fr; gap: 0.2rem 1rem; padding: 1.1rem 0; text-decoration: none; color: var(--ink); }
.scoresheet a::before { content: counter(mv) "."; font-family: var(--mono); font-weight: 700; color: var(--amber); grid-row: span 2; font-size: 1.1rem; }
.scoresheet .g-title { font-weight: 650; font-size: 1.12rem; }
.scoresheet .g-desc { color: var(--ink-soft); font-size: 0.97rem; }
.scoresheet a:hover .g-title { color: var(--blue); text-decoration: underline; }

/* faq */
.faq { max-width: 50rem; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 650; padding: 1.05rem 2.2rem 1.05rem 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.3rem; top: 0.95rem; font-family: var(--mono); font-size: 1.25rem; color: var(--amber); }
.faq details[open] summary::after { content: "\2212"; }
.faq-a { padding: 0 0 1.1rem; color: var(--ink-soft); }
.faq-a p { margin: 0; }

/* cta */
.cta { text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.cta .badge-row { margin: 0; }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 3rem 0 2.5rem; font-size: 0.95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-foot h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 0.7rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 0.35rem; }
.site-foot p { color: var(--ink-soft); }
.disclaimer { font-size: 0.85rem; color: var(--ink-soft); margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }

/* ---------- guides ---------- */
.crumbs.wrap { max-width: 46rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 1.2rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line); }
.article { padding: 1.5rem 0 3rem; }
.article .wrap { max-width: 46rem; }
.meta-line { font-family: var(--mono); font-size: 0.85rem; color: var(--amber); margin-bottom: 0.6rem; }
.article h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.03em; }
.standfirst { font-size: 1.2rem; color: var(--ink-soft); }
.article h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); margin-top: 2.6rem; }
.article h3 { margin-top: 1.8rem; }
.article li { margin-bottom: 0.45rem; }
.article .table-scroll { margin: 1.2rem 0 1.5rem; }
.answer-box {
  background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--blue-fill);
  border-radius: 12px; padding: 1.1rem 1.25rem; margin: 1.6rem 0 2rem;
}
.answer-box p { margin: 0; }
.note { background: var(--amber-wash); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.5rem 0; }
.note p:last-child { margin: 0; }
.app-tie { margin-top: 2.8rem; padding: 1.5rem; border-radius: 16px; background: var(--band); color: var(--band-ink); }
.app-tie h2 { margin-top: 0; }
.app-tie p { color: #c9c6bf; }
.app-tie a { color: #f2b23a; }
.app-tie .badge-row { margin-bottom: 0; }
.src-note { font-size: 0.88rem; color: var(--ink-soft); margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.src-note ul { padding-left: 1.1rem; }
.more-guides { margin-top: 2rem; }
.more-guides h2 { font-size: 1.1rem; margin-top: 0; }
.more-guides ul { padding-left: 1.1rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .details, .cta { grid-template-columns: 1fr; }
  .hero { padding-top: 2.2rem; }
  .casing { max-width: 17rem; }
  .games { grid-template-columns: 1fr; }
  .game-main { grid-row: auto; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  section { padding: 3.2rem 0; }
  .relay { grid-template-columns: 1fr; }
  .relay li + li { border-left: 0; border-top: 1px solid var(--line); }
  .details dl { grid-template-columns: 1fr; }
  .details dl > div, .details dl > div:nth-child(odd) { padding-right: 0; }
  .honest { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .strip { grid-auto-columns: 72%; }
  .store-badge svg { width: 160px; }
}
