/* Archive: the app's own material. Every colour is from ios/Archive/Sources/Theme.swift.
   Dark only, nothing rounded, no cards: a change of material is the boundary. */
:root {
  --ground: #1A2128;   /* canvas, Theme.swift:35 */
  --surface: #222A32;  /* Theme.swift:53 */
  --line: #303C46;     /* Theme.swift:55 */
  --edge: #4A5866;     /* Theme.swift:57 */
  --chalk: #EFE9DC;    /* the seam: what stays, Theme.swift:60 */
  --ash: #8E9AA4;      /* Theme.swift:62 */
  --vermilion: #E8532F;/* yours to decide, and nothing else, Theme.swift:65 */
  --s0: #364451; --s1: #5B6A78; --s2: #8492A2; --s3: #AEBDCD; /* shale, Theme.swift:45 */
  --empty: #222B33;    /* Theme.swift:100 */
  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--chalk);
  font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: var(--chalk); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; }
::selection { background: var(--chalk); color: var(--ground); }
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 10; padding: 12px 16px;
  background: var(--chalk); color: var(--ground); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }

/* The heavy, narrow face the app sets its numbers in (SF Compressed on Apple devices). */
.xl { font-family: var(--sans); font-weight: 900; font-stretch: 62.5%; letter-spacing: -.02em; }

/* Header */
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font: 900 22px/1 var(--sans); font-stretch: 62.5%; letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; display: block; }
.top nav { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 15px; text-decoration: none; color: var(--ash); }
.top nav a:hover, .top nav a[aria-current] { color: var(--chalk); text-decoration: underline; }
.top nav a:last-child { padding-right: 0; }

/* Hero */
.hero { display: grid; gap: 20px; grid-template-areas: "eye" "h1" "k" "lede"; padding-top: 20px; padding-bottom: 64px; }
.eye { grid-area: eye; margin: 0; font: 500 13px/1.4 var(--mono); color: var(--ash); }
.hero h1 { grid-area: h1; margin: 0; font-size: clamp(44px, 7.2vw, 84px); line-height: .94; text-wrap: balance; }
.lede { grid-area: lede; }
.lede p { margin: 0 0 14px; font-size: 19px; line-height: 1.55; max-width: 34em; }
.lede .note { font: 500 13px/1.5 var(--mono); color: var(--ash); }
@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px); column-gap: 72px; row-gap: 24px;
    grid-template-areas: "eye k" "h1 k" "lede k" ". k"; grid-template-rows: auto auto auto 1fr;
    padding-top: 40px;
  }
  .lede { margin-top: 8px; }
}

/* The exhibit: Results.swift's "All" screen, drawn with Karot.swift's rules. */
.k { grid-area: k; margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.k legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; font: 500 13px/1.4 var(--mono); color: var(--ash); }
.k .kh { clear: both; }
.k input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.kn { margin: 0; font-size: clamp(64px, 21vw, 92px); line-height: .9; letter-spacing: -2px; }
.kr { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 8px; }
.kl { margin: 0; font-size: 15px; line-height: 1.35; }
.sw { display: grid; margin-top: 4px; font: 500 12px/1.4 var(--mono); color: var(--ash); }
.sw > span { grid-area: 1 / 1; }
.tense { display: flex; gap: 2px; flex: none; }
.tense label {
  display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--edge); font: 500 13px/1 var(--mono); color: var(--chalk); cursor: pointer; user-select: none;
}
.tense label:hover { border-color: var(--chalk); }
#now:checked ~ .kh label[for="now"], #after:checked ~ .kh label[for="after"] { background: var(--chalk); border-color: var(--chalk); color: var(--ground); }
#now:focus-visible ~ .kh label[for="now"], #after:focus-visible ~ .kh label[for="after"] { outline: 2px solid var(--chalk); outline-offset: 3px; }

/* Three tracks, read across: the depth log, the core, the months (Results.swift core(_:)). */
.tracks { position: relative; height: calc(var(--T) * 1px); margin-top: 22px; overflow: hidden; }
.log { position: absolute; left: 0; top: 0; width: 80px; margin: 0; padding: 0; list-style: none; }
.log li {
  position: absolute; right: 0; top: calc(var(--y) * 1px); display: flex; flex-direction: column; align-items: flex-end;
  font: 500 11px/13px var(--mono); color: var(--ash); white-space: nowrap;
}
.log b { font: 400 13px/15.5px var(--mono); color: var(--chalk); }
.log em { font-style: normal; color: var(--chalk); }
.log em::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 5px 1px 0; background: var(--vermilion); vertical-align: middle; }
.core { position: absolute; left: 88px; top: 0; display: block; overflow: visible; }
.months { position: absolute; left: 174px; top: 0; width: calc(100% - 174px); display: block; }
.core .shale { transform-box: fill-box; transform-origin: 50% 0; }

/* After: the shale drains away and the seams and faults close up (Karot.collapsed). */
#after:checked ~ .tracks .band { transform: translateY(calc(var(--dy) * 1px)); }
#after:checked ~ .tracks .shale { transform: scaleY(0); }
#after:checked ~ .tracks .fault { transform: translateY(calc(var(--sh) * -1px)); }
#after:checked ~ .tracks .mrow, #after:checked ~ .tracks .log li { transform: translateY(calc(var(--dy) * 1px)); opacity: 0; visibility: hidden; }
#after:checked ~ .cap { opacity: 0; }
.sw .later, .aft { opacity: 0; visibility: hidden; }
#after:checked ~ .kh .sw .now { opacity: 0; visibility: hidden; }
#after:checked ~ .kh .sw .later, #after:checked ~ .tracks .aft { opacity: 1; visibility: visible; }

.aft { position: absolute; inset: 0; }
.an { position: absolute; left: 174px; top: 0; margin: 0; display: grid; gap: 2px; }
.an b { font-size: 26px; line-height: 1; }
.an span { font-size: 14px; }
.an small { font: 500 11px/1.4 var(--mono); color: var(--ash); }
.aft .why { position: absolute; left: 0; right: 0; top: 104px; }
.wt { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.sum { margin: 10px 0 0; font: 500 11px/1.5 var(--mono); color: var(--ash); }

/* The key: the hatches tell the reasons apart and are never painted on the core (Results.swift reasonKey). */
.why ul { margin: 0; padding: 0; list-style: none; }
.why li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.why li:last-child { border-bottom: 0; }
.why li b { font: 400 13px/1 var(--mono); }
.hx { display: block; width: 16px; height: 16px; background-color: var(--surface); }
.hx.h0 { background-image: repeating-linear-gradient(0deg, var(--s3) 0 1px, transparent 1px 4px); }
.hx.h1 { background-image: radial-gradient(circle, var(--s3) 1px, transparent 1.4px); background-size: 4px 4px; }
.hx.h2 { background-image: repeating-linear-gradient(45deg, var(--s3) 0 1px, transparent 1px 4px); }
.hx.h3 { background-image: repeating-linear-gradient(90deg, var(--s3) 0 1px, transparent 1px 4px); }

.cap { margin: 12px 0 0; font: 500 12px/1.5 var(--mono); color: var(--ash); }
.facts { margin: 20px 0 0; padding: 0; list-style: none; }
.facts li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts li:last-child { border-bottom: 0; }
.facts b { font-size: 24px; line-height: 1; }
.facts span { font-size: 17px; font-weight: 600; }
.facts small { font: 400 13px/1 var(--mono); color: var(--ash); }
.facts .yo b { color: var(--vermilion); }

@media (prefers-reduced-motion: no-preference) {
  /* Extruded once on load, top first, then still. */
  .tracks::after { content: ""; position: absolute; inset: 0; background: var(--ground); transform: translateY(101%); animation: extrude 1.1s var(--ease) .15s both; }
  @keyframes extrude { from { transform: translateY(0); } }
  .band, .fault, .core .shale { transition: transform .8s var(--ease); }
  .mrow, .log li { transition: transform .8s var(--ease), opacity .35s linear, visibility 0s .35s; }
  .aft, .sw > span, .cap { transition: opacity .35s linear, visibility 0s .35s; }
  #after:checked ~ .tracks .aft, #after:checked ~ .kh .sw .later { transition: opacity .4s linear .45s, visibility 0s .45s; }
  #now:checked ~ .kh .sw .now, #now:checked ~ .cap { transition: opacity .4s linear .35s, visibility 0s .35s; }
  #now:checked ~ .tracks .mrow, #now:checked ~ .tracks .log li { transition: transform .8s var(--ease), opacity .4s linear .4s, visibility 0s .4s; }
}

/* Sections */
.sec { border-top: 1px solid var(--line); }
.sec > .wrap { padding-top: 64px; padding-bottom: 64px; }
.sec h2 { margin: 0 0 20px; font-size: clamp(36px, 5.4vw, 60px); line-height: .98; text-wrap: balance; }
.sec h3 { margin: 0 0 6px; font-size: 19px; line-height: 1.3; font-weight: 600; }
.sec p { margin: 0 0 16px; max-width: 38em; }
@media (min-width: 960px) {
  .sec > .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 72px; padding-top: 88px; padding-bottom: 88px; }
  .sec > .wrap > h2 { grid-column: 1; }
  .sec > .wrap > .body { grid-column: 2; }
}
.body > :last-child { margin-bottom: 0; }
.key { margin: 8px 0 32px; padding: 0; list-style: none; }
.key li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.key li:first-child { border-top: 1px solid var(--line); }
.sw-seam, .sw-shale, .sw-fault, .sw-months { display: block; width: 44px; }
.sw-seam { height: 30px; background: linear-gradient(var(--chalk) 0 5px, var(--s2) 5px); }
.sw-shale { height: 30px; background: var(--s2); }
.sw-fault { height: 30px; background: linear-gradient(var(--s2) 0 26px, var(--vermilion) 26px); }
.sw-months { height: 12px; background: linear-gradient(90deg, var(--s0) 0 10px, transparent 10px 11px, var(--s1) 11px 21px, transparent 21px 22px, var(--s2) 22px 32px, transparent 32px 33px, var(--s3) 33px); }
.body .why { margin-top: 8px; }
.body .why li { padding: 12px 0; }
.body .why li span { font-size: 17px; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 22px 0 22px 56px; border-bottom: 1px solid var(--line); counter-increment: s; }
.steps li:first-child { border-top: 1px solid var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 25px; font: 500 13px/1 var(--mono); color: var(--ash); }
.steps p { margin: 0; }

.trio { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.trio li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.trio li:first-child { border-top: 1px solid var(--line); }
.trio p { margin: 0; }

.plain { margin: 0; padding: 0; list-style: none; }
.plain li { padding: 14px 0 14px 22px; border-bottom: 1px solid var(--line); position: relative; }
.plain li:first-child { border-top: 1px solid var(--line); }
.plain li::before { content: ""; position: absolute; left: 0; top: 24px; width: 10px; height: 3px; background: var(--chalk); }
.body .more { margin: 20px 0 0; }

.soon .wrap { padding-top: 72px; padding-bottom: 80px; }
.soon h2 { margin: 0 0 16px; font-size: clamp(40px, 6.4vw, 72px); line-height: .95; }
.soon p { margin: 0 0 12px; font-size: 19px; }
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; margin-top: 12px;
  background: var(--chalk); color: var(--ground); font-weight: 600; font-size: 17px; text-decoration: none;
}
.btn:hover { background: #fff; color: var(--ground); }

/* Footer */
.foot { border-top: 1px solid var(--line); color: var(--ash); font-size: 15px; }
.foot .wrap { display: grid; gap: 10px; padding-top: 32px; padding-bottom: 40px; }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; column-gap: 22px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* Support and privacy pages */
.doc { max-width: 46rem; margin: 0 auto; padding: 24px var(--gutter) 88px; }
.doc h1 { margin: 16px 0 12px; font-size: clamp(40px, 7vw, 64px); line-height: .98; text-wrap: balance; }
.doc h2 { margin: 52px 0 12px; font-size: 24px; line-height: 1.25; font-weight: 700; text-wrap: balance; }
.doc h3 { margin: 28px 0 8px; font-size: 19px; line-height: 1.3; font-weight: 700; }
.doc p, .doc ul, .doc dl, .doc address { margin: 0 0 16px; }
.doc ul { padding-left: 1.25em; }
.doc li { margin: 6px 0; }
.doc address { font-style: normal; }
.meta, .note { color: var(--ash); font-size: 15px; }
.lede-s { font-size: 19px; }
.short { margin: 28px 0 8px; padding: 20px 22px 4px; background: var(--surface); border-left: 2px solid var(--chalk); }
.short h2 { margin-top: 0; font-size: 20px; }
.card { border-top: 1px solid var(--line); }
.card div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.card dt { font: 500 13px/1.6 var(--mono); color: var(--ash); }
.card dd { margin: 0; }
@media (min-width: 640px) { .card div { grid-template-columns: 150px 1fr; gap: 16px; } }
.bases { border-top: 1px solid var(--line); }
.bases div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.bases dt { font-weight: 700; }
.bases dd { margin: 2px 0 0; }
.doc .bent { list-style: none; padding-left: 0; }
.bent li { display: grid; grid-template-columns: 1.8em 1fr; }
.bent li span:first-child { font-weight: 700; }
.contact { margin: 24px 0 8px; padding: 20px 22px; background: var(--surface); border-left: 2px solid var(--chalk); }
.contact p { margin: 12px 0 0; }
.contact .btn { margin-top: 0; }
.faq section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.faq section:last-child { border-bottom: 0; }
.faq h3 { margin: 0 0 6px; }
.faq p:last-child, .faq ul:last-child { margin-bottom: 0; }

/* karot:start (written by work/karot.py) */
.tracks { --T: 450.97; --L: 33.24; }
.b0 { --y: 0; --h: 40.06; --dy: 0; --sh: 38.21; }
.b1 { --y: 40.06; --h: 59.11; --dy: -38.21; --sh: 56.27; }
.b2 { --y: 99.17; --h: 56.01; --dy: -94.48; --sh: 53.15; }
.b3 { --y: 155.18; --h: 50.66; --dy: -147.64; --sh: 47.82; }
.b4 { --y: 205.83; --h: 44.53; --dy: -195.46; --sh: 40.75; }
.b5 { --y: 250.37; --h: 44.27; --dy: -236.2; --sh: 41.35; }
.b6 { --y: 294.64; --h: 37.45; --dy: -277.55; --sh: 34.68; }
.b7 { --y: 332.08; --h: 30.71; --dy: -312.23; --sh: 27.3; }
.b8 { --y: 362.79; --h: 26.65; --dy: -339.52; --sh: 24.17; }
.b9 { --y: 389.44; --h: 21.53; --dy: -363.7; --sh: 19.29; }
.b10 { --y: 410.97; --h: 20; --dy: -382.99; --sh: 17.58; }
.b11 { --y: 430.97; --h: 20; --dy: -400.57; --sh: 17.16; }
/* karot:end */
