/* =============================================================================
   Writeoff — public site.

   One stylesheet for every page. A legal site is four documents that must look
   like one source; separate styles per page is how a "last updated" line ends
   up in two different greys and the whole thing starts reading as assembled
   rather than published.

   Fonts are system stacks on purpose. A webfont here means either a network
   request to a font CDN on a page whose entire subject is "this app makes no
   network requests", or a 40KB base64 blob in a document nobody reads twice.
   ========================================================================== */

:root {
  --paper: #fbfafc;
  --panel: #f2f0f6;
  --ink: #16141f;
  --muted: #6a6478;
  --rule: #ddd9e6;
  --accent: #5b34e8;
  --accent-soft: #eee9ff;
  --flag: #b44700;
  --flag-soft: #fff1e6;

  --measure: 64ch;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e0d14;
    --panel: #17151f;
    --ink: #eceaf2;
    --muted: #9a94ab;
    --rule: #2a2734;
    --accent: #a48cff;
    --accent-soft: #1d1733;
    --flag: #ffb27a;
    --flag-soft: #2a1b10;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 3rem) 5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

@media (min-width: 900px) {
  .wrap { grid-template-columns: 14rem minmax(0, var(--measure)); }
}

/* ------------------------------------------------------------------ masthead */

.masthead {
  grid-column: 1 / -1;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1.4rem;
}

.wordmark {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0;
}
.wordmark a { color: inherit; text-decoration: none; }
.wordmark .dot { color: var(--accent); }

.standfirst { margin: 0.85rem 0 0; max-width: 52ch; color: var(--muted); font-size: 1.0625rem; }

.stamp {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}

/* ------------------------------------------------------------------ index
   The markers are anchor targets, not a sequence — these documents have no
   order, and what a reader (or a Play reviewer) needs is a direct link. */

.index { font-family: var(--sans); }

@media (min-width: 900px) {
  .index { position: sticky; top: 2rem; align-self: start; }
}

.index h2 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 0.85rem;
}

.index ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }

.index a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9375rem;
  display: block;
  padding: 0.3rem 0 0.3rem 0.85rem;
  border-left: 2px solid var(--rule);
  transition: border-color 120ms ease, color 120ms ease;
}
.index a:hover { border-left-color: var(--accent); color: var(--accent); }
.index a[aria-current="page"] { border-left-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ------------------------------------------------------------------ document */

.doc-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

h1 {
  font-family: var(--sans);
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0 0 1.6rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

h2 {
  font-family: var(--sans);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-wrap: balance;
  margin: 2.4rem 0 0.7rem;
}

h3 { font-family: var(--sans); font-size: 1rem; margin: 1.7rem 0 0.5rem; }

p { margin: 0 0 1rem; }
p.lead { font-size: 1.125rem; }

ul.body, ol.body { margin: 0 0 1rem; padding-left: 1.1rem; }
ul.body li, ol.body li { margin-bottom: 0.4rem; }
ul.body li::marker, ol.body li::marker { color: var(--accent); }

strong { font-weight: 700; }

/* ------------------------------------------------------------------ devices */

/* The load-bearing claim of the whole site: what is kept, and what is never
   touched. Both readers — a driver and a Play reviewer — arrive looking for
   exactly this pair, so it is set apart rather than buried in prose. */
.ledger { display: grid; gap: 1rem; margin: 1.7rem 0; }

@media (min-width: 640px) { .ledger { grid-template-columns: 1fr 1fr; } }

.ledger section {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.2rem 1.2rem 1rem;
}

.ledger h3 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.7rem;
  font-weight: 500;
}

.ledger ul { margin: 0; padding-left: 1rem; }
.ledger li { font-size: 0.9375rem; line-height: 1.5; margin-bottom: 0.4rem; }
.ledger li::marker { color: var(--accent); }

.pull {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 1.05rem 1.2rem;
  margin: 1.7rem 0;
  border-radius: 0 3px 3px 0;
}
.pull p { margin: 0; font-size: 1.0625rem; }
.pull p + p { margin-top: 0.6rem; }

/* Deletion is a real procedure in order, so the numbers carry information. */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.2rem 0 0; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 0.9rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
}

/* Anything still to fill in before this goes public. Marked loudly on purpose:
   a legal page that ships with a bracketed placeholder as its contact address
   is worse than one with no contact section at all. */
.todo {
  font-family: var(--mono);
  font-size: 0.8125rem;
  background: var(--flag-soft);
  color: var(--flag);
  border: 1px dashed var(--flag);
  border-radius: 3px;
  padding: 0.15rem 0.45rem;
}

.cards { display: grid; gap: 1rem; margin: 1.75rem 0 0; }

@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.2rem;
  transition: border-color 120ms ease;
}
.card:hover { border-color: var(--accent); }
.card strong { display: block; font-family: var(--sans); font-size: 1.05rem; margin-bottom: 0.3rem; }
.card span { color: var(--muted); font-size: 0.9375rem; }

.notice {
  margin-top: 3.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.2rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}

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