/*
 * thedispositor.com, one stylesheet for every page.
 *
 * The palette is the app's own (theme/tokens.ts): paper #FAFAFA, ink #0E0B17,
 * the single accent #5C16C5 and its wash. The app sets everything in Inter;
 * the site asks for Inter first and otherwise takes the system face (SF Pro on
 * an iPhone), so no page downloads a font or calls a font service.
 */

:root {
  --paper:      #FAFAFA;
  --raised:     #FFFFFF;
  --ink:        #0E0B17;
  --muted:      #404040;
  --dim:        #6C6C6C;
  --rule:       #E4E0EB;
  --rule-soft:  #EEEBF3;
  --accent:     #5C16C5;
  --accent-ink: #FFFFFF;
  --accent-wash:#F3EBFE;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 66ch;
  --gutter: 16px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #120E1C;
    --raised:     #1A1527;
    --ink:        #EDEAF3;
    --muted:      #C2BCCF;
    --dim:        #9D96AE;
    --rule:       #2C2640;
    --rule-soft:  #221D33;
    --accent:     #B69CF7;
    --accent-ink: #120E1C;
    --accent-wash:#261D3D;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper:      #120E1C;
  --raised:     #1A1527;
  --ink:        #EDEAF3;
  --muted:      #C2BCCF;
  --dim:        #9D96AE;
  --rule:       #2C2640;
  --rule-soft:  #221D33;
  --accent:     #B69CF7;
  --accent-ink: #120E1C;
  --accent-wash:#261D3D;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; }

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter) 72px;
}

@media (min-width: 700px) {
  :root { --gutter: 28px; }
  .shell { padding-bottom: 96px; }
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* ── Site header ──────────────────────────────────────── */

.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.brand svg {
  width: 26px;
  height: 26px;
  flex: none;
  fill: var(--accent);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site-nav li { margin: 0; max-width: none; }

.site-nav a {
  display: inline-block;
  padding: 6px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
}

.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* ── Masthead (legal and support pages) ───────────────── */

.masthead {
  padding: 56px 0 30px;
  border-bottom: 2px solid var(--ink);
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

h1 {
  font-weight: 800;
  font-size: clamp(2.1rem, 7vw, 3.3rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}

h1 em, .hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.standfirst {
  max-width: var(--measure);
  margin: 20px 0 0;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--muted);
}

.dateline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

.dateline b {
  font-weight: 500;
  color: var(--ink);
}

/* ── Layout with a contents column ────────────────────── */

.columns { display: block; }

.index { display: none; }

@media (min-width: 1100px) {
  .columns {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 60px;
    align-items: start;
  }
  .index {
    display: block;
    position: sticky;
    top: 34px;
    padding-top: 52px;
  }
}

.index h2 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  counter-reset: idx;
}

.index li { margin: 0; }

.index a {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 4px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
  text-decoration: none;
  padding: 2px 0;
}

.index a:hover { color: var(--accent); }

.index a::before {
  counter-increment: idx;
  content: "§" counter(idx);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  padding-top: 2px;
}

/* ── Numbered sections ────────────────────────────────── */

.doc { padding-top: 52px; counter-reset: sec; }

.doc section {
  padding-bottom: 44px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--rule-soft);
  counter-increment: sec;
  scroll-margin-top: 24px;
}

.doc section:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
}

h2.sec {
  font-weight: 700;
  font-size: 1.42rem;
  letter-spacing: -0.015em;
  line-height: 1.22;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: baseline;
  text-wrap: balance;
}

h2.sec::before {
  content: "§" counter(sec);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0;
}

h3 {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0;
  margin: 30px 0 10px;
  color: var(--ink);
}

p, li { max-width: var(--measure); }

.doc section > p,
.doc section > ul,
.doc section > ol,
.doc section > .note,
.doc section > .callout,
.doc section > h3,
.doc section > .scroller,
.doc section > .never { margin-left: 46px; }

@media (max-width: 640px) {
  h2.sec { grid-template-columns: 34px 1fr; }
  .doc section > p,
  .doc section > ul,
  .doc section > ol,
  .doc section > .note,
  .doc section > .callout,
  .doc section > h3,
  .doc section > .scroller,
  .doc section > .never { margin-left: 0; }
}

p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 14px; padding-left: 20px; }
li { margin-bottom: 7px; }
li:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

strong { font-weight: 650; }

code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: var(--accent-wash);
  color: var(--ink);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── Summary panel ────────────────────────────────────── */

.summary {
  background: var(--raised);
  border: 1px solid var(--rule);
  padding: 26px 20px;
  margin: 40px 0 0;
}

@media (min-width: 700px) { .summary { padding: 30px 32px; } }

.summary h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 18px;
}

.summary ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 13px;
}

.summary li {
  max-width: none;
  display: grid;
  grid-template-columns: 15px 1fr;
  gap: 12px;
  margin: 0;
  font-size: 1.02rem;
}

.summary li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 10px;
  background: var(--accent);
  border-radius: 50%;
}

/* ── Tables ───────────────────────────────────────────── */

.scroller {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 16px;
  border: 1px solid var(--rule);
  background: var(--raised);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 600px;
  font-size: 0.92rem;
}

thead th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
  line-height: 1.5;
}

tbody tr:last-child td { border-bottom: 0; }

td.field {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  white-space: nowrap;
}

td.field span {
  display: block;
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--dim);
  white-space: normal;
  margin-top: 3px;
  max-width: 22ch;
}

td .note { display: block; margin-top: 2px; }

/* ── Callouts and notes ───────────────────────────────── */

.callout {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 20px 0;
}

.callout p { font-size: 1.02rem; }

.note {
  font-size: 0.9rem;
  color: var(--dim);
  max-width: var(--measure);
}

/* ── Do-not list ──────────────────────────────────────── */

.never {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 11px;
}

.never li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  margin: 0;
  max-width: var(--measure);
}

.never li::before {
  content: "";
  height: 1px;
  width: 14px;
  margin-top: 14px;
  background: var(--ink);
}

/* ── Home ─────────────────────────────────────────────── */

.hero {
  display: grid;
  gap: 40px;
  padding: 64px 0 56px;
  border-bottom: 2px solid var(--ink);
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 64px;
    padding: 96px 0 84px;
  }
}

.hero h1 {
  font-size: clamp(2.4rem, 9vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.hero .standfirst { font-size: 1.18rem; }

/* The app icon itself, so its colours stay put in both themes. */
.hero-mark {
  justify-self: center;
  width: min(100%, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #5C16C5;
  border-radius: 22.5%;
}

.hero-mark svg {
  width: 64%;
  height: auto;
  fill: #FAFAFA;
}

@media (max-width: 899px) {
  .hero-mark { width: min(56%, 220px); order: -1; justify-self: start; }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 32px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
}

.cta:hover { filter: brightness(1.08); }

/* Before the store listing exists: the same shape, washed, and not a link. */
.cta.soon {
  margin: 0;
  background: var(--accent-wash);
  color: var(--accent);
  cursor: default;
  filter: none;
}

.cta-aside {
  font-size: 0.94rem;
  color: var(--dim);
  margin: 0;
}

.band {
  padding: 56px 0;
  border-bottom: 1px solid var(--rule);
}

.band:last-of-type { border-bottom: 0; }

.band > h2 {
  font-size: clamp(1.5rem, 4.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0 0 12px;
  text-wrap: balance;
}

.band > .lede {
  max-width: var(--measure);
  color: var(--muted);
  font-size: 1.06rem;
  margin: 0 0 32px;
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: feat;
}

@media (min-width: 760px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
}

.features li {
  max-width: none;
  margin: 0;
  padding: 20px 0 22px;
  border-top: 1px solid var(--rule);
  counter-increment: feat;
}

.features h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.features h3::before {
  content: counter(feat, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--accent);
}

.features p { color: var(--muted); margin: 0; }

.explainer {
  display: grid;
  gap: 18px 64px;
}

@media (min-width: 900px) {
  .explainer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.explainer p { color: var(--muted); }

.chain {
  margin: 0;
  padding: 22px 20px;
  background: var(--raised);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--ink);
  align-self: start;
}

.chain ol { margin: 0; padding: 0; list-style: none; }
.chain li { margin: 0; max-width: none; }
.chain .to { color: var(--accent); }
.chain figcaption {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--dim);
}

.promises {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.promises li {
  display: grid;
  grid-template-columns: 15px 1fr;
  gap: 12px;
  margin: 0;
}

.promises li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.more {
  font-weight: 600;
  text-decoration: none;
}
.more::after { content: " →"; }

/* ── Support ──────────────────────────────────────────── */

.contact-card {
  margin: 40px 0 0;
  padding: 26px 20px;
  background: var(--raised);
  border: 1px solid var(--rule);
  display: grid;
  gap: 8px;
}

@media (min-width: 700px) { .contact-card { padding: 30px 32px; } }

.contact-card .big {
  font-size: clamp(1.15rem, 4.6vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.contact-card .big a { text-decoration: none; }
.contact-card .big a:hover { text-decoration: underline; }

/* ── Not found ────────────────────────────────────────── */

.lost {
  padding: 96px 0 72px;
  max-width: 40rem;
}

.lost ul {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 8px;
}

/* ── Site footer ──────────────────────────────────────── */

.site-foot {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
  font-size: 0.86rem;
  color: var(--dim);
  display: grid;
  gap: 12px;
}

.site-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}

.site-foot li { margin: 0; }
.site-foot a { color: var(--muted); }
.site-foot p { margin: 0; max-width: none; }

/* ── Focus and motion ─────────────────────────────────── */

a:focus-visible,
.cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

@media print {
  .site-head, .index, .site-foot ul, .skip { display: none; }
  body { background: #fff; color: #000; }
  .doc section { break-inside: avoid-page; }
}
