/*
 * sublime.zone — shared stylesheet.
 *
 * Values are lifted from the app's own token system (apps/mobile/src/design/tokens.ts,
 * the "Depth" direction): near-black screen, warm off-white text, amber accent. Keep
 * them in step with that file by hand — the site has no build step and imports nothing.
 *
 * Deliberately no web fonts, no analytics, no third-party requests of any kind. The
 * privacy page says so in as many words, so this file has to stay true to it: the brand
 * faces (Newsreader / Instrument Sans) would each cost an outside request or a vendored
 * binary, so the site runs on a system stack until those are self-hosted.
 */

:root {
  color-scheme: dark;

  --screen: #050505;
  --card: #0d0c0b;
  --card-fav: #0e0d0c;

  --text-primary: #ede6db;
  --text-wordmark: #f6efe4;
  --text-title: #d6cfc4;
  --text-secondary: #c9bfae;
  --text-muted: #a89f92;
  --text-meta: #93897a;
  --text-dim: #8d8477;

  --accent: #e5a06a;
  --accent-dark: #c9814f;
  --accent-light: #f0c69c;
  --on-accent: #1c1207;
  --accent-fill: rgba(229, 160, 106, 0.1);
  --accent-border: rgba(229, 160, 106, 0.4);

  --hairline: rgba(237, 230, 219, 0.09);
  --card-border: rgba(237, 230, 219, 0.11);

  --serif: ui-serif, Newsreader, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --measure: 42rem;
  --gutter: 1.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--screen);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Skip link ───────────────────────────────────────────────────────── */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip:focus {
  left: var(--gutter);
  top: var(--gutter);
  z-index: 10;
  padding: 0.5rem 0.875rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 6px;
  text-decoration: none;
}

/* ── Layout ──────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-head {
  border-bottom: 1px solid var(--hairline);
}

.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--text-wordmark);
  text-decoration: none;
}

.wordmark:hover,
.wordmark:focus-visible {
  color: var(--accent-light);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--text-meta);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text-primary);
}

.site-nav a[aria-current="page"] {
  color: var(--text-primary);
}

main {
  display: block;
  padding: 3.5rem 0 1rem;
}

section {
  margin: 0 0 3.5rem;
}

.site-foot {
  border-top: 1px solid var(--hairline);
  margin-top: 2rem;
  padding: 2rem 0 3rem;
  color: var(--text-dim);
  font-size: 0.875rem;
}

.site-foot .wrap > * + * {
  margin-top: 0.75rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-foot a {
  color: var(--text-meta);
}

.site-foot a:hover,
.site-foot a:focus-visible {
  color: var(--text-primary);
}

/* ── Type ────────────────────────────────────────────────────────────── */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.25;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 7vw, 2.875rem);
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}

h2 {
  font-size: clamp(1.375rem, 4.5vw, 1.75rem);
  margin: 0 0 1rem;
  color: var(--text-title);
}

h3 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1.125rem;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.lede {
  font-size: 1.1875rem;
  color: var(--text-primary);
}

.overline {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.175em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 0.75rem;
}

.meta {
  font-size: 0.875rem;
  color: var(--text-meta);
}

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

a:hover,
a:focus-visible {
  color: var(--accent-light);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 2.5rem 0;
}

ul,
ol {
  color: var(--text-secondary);
  padding-left: 1.25rem;
  margin: 0 0 1.125rem;
}

li + li {
  margin-top: 0.5rem;
}

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  padding-bottom: 0.5rem;
}

.hero h1 {
  max-width: 24ch;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
  padding: 0.3125rem 0.75rem;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--accent);
}

/* ── Steps ───────────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  margin: 0 0 1.75rem;
}

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

.steps h3 {
  margin-bottom: 0.25rem;
}

.steps p:last-child {
  margin-bottom: 0;
}

/* ── Cards ───────────────────────────────────────────────────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.5rem;
}

.card > :last-child {
  margin-bottom: 0;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.8125rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(var(--accent), var(--accent-dark));
  color: var(--on-accent);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
  color: var(--on-accent);
  filter: brightness(1.07);
}

/* ── Legal / long-form pages ─────────────────────────────────────────── */

.doc h2 {
  margin-top: 2.75rem;
}

.doc h2:first-of-type {
  margin-top: 0;
}

.doc h3 {
  margin-top: 1.75rem;
  color: var(--text-title);
}

.doc dl {
  margin: 0 0 1.125rem;
}

.doc dt {
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 1.125rem;
}

.doc dd {
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.125rem;
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

table {
  width: 100%;
  /* Below this the four columns squeeze into a word-per-line column rather than
     scrolling, which is harder to read than the sideways scroll .table-scroll gives. */
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--hairline);
}

th {
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
}

td {
  color: var(--text-secondary);
}

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

/*
 * An unresolved fact that a person has to supply before this page is published.
 * Loud on purpose: a placeholder that ships unnoticed is the failure mode.
 */
.todo {
  background: rgba(224, 122, 98, 0.16);
  border-bottom: 1px dashed #e07a62;
  color: #e07a62;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
  padding: 0 0.25em;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
