/* Layout and type only. Every colour is a token from tokens.css (the app's own). */

/* ---- Fonts: the app's four faces, self-hosted (latin subset). ---------------- */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/newsreader-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/newsreader-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/newsreader-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Special Elite'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/special-elite-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); }

/* ---- Base --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--line-strong) var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-dim); color: var(--ink); }
a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.15s;
}
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 6px var(--accent-dim); border-radius: 2px; }
.skip {
  position: absolute; left: 16px; top: -48px;
  background: var(--surface); color: var(--ink);
  font-family: var(--font-mono); font-size: 13px;
  padding: 8px 12px; border: 2px solid var(--line-strong); z-index: 20;
}
.skip:focus { top: 12px; }

/* ---- Brand pieces (mirrors packages/ui Wordmark + JarMark) --------------------- */
.jar { display: block; flex-shrink: 0; }
.wordmark {
  display: inline-flex; align-items: baseline; gap: 0.28em;
  white-space: nowrap; line-height: 1;
}
.wordmark .pickled {
  font-family: var(--font-display); color: var(--ink);
  font-size: 25px; font-weight: 400; letter-spacing: 0.01em;
}
.wordmark .lore {
  font-family: var(--font-serif); color: var(--accent-text);
  font-size: 26px; font-weight: 600; letter-spacing: -0.01em;
}
/* Hero: "Lore" tracked out to the measure of "Pickled", the second line of a printed label. */
.wordmark.hero { flex-direction: column; align-items: center; gap: 1px; }
.wordmark.hero .pickled { font-size: 40px; }
.wordmark.hero .lore { font-size: 52px; letter-spacing: 0.36em; margin-right: -0.36em; }

.kicker {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.17em; text-transform: uppercase; color: var(--ink);
}

/* ---- The label: double rule, no shadow, minimal radius (as the app's sign-in door) */
.label {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: 3px;
}
.label::before {
  content: '';
  position: absolute; inset: 6px;
  border: 1px solid var(--line);
  border-radius: 1px;
  pointer-events: none;
}

.button {
  display: inline-block;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  color: var(--accent-on); background: var(--accent);
  border-radius: 6px; padding: 13px 30px;
  transition: filter 0.15s, transform 0.15s;
}
.button:hover { color: var(--accent-on); filter: brightness(1.06); }
.button:active { transform: translateY(1px); }

/* ---- Homepage ----------------------------------------------------------------- */
.door {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 16px 24px;
}
.door .jar { width: 84px; height: 124px; margin-bottom: 22px; }
.door .label {
  width: 100%; max-width: 540px;
  padding: 48px 44px 40px;
  text-align: center;
}
.door h1 { margin: 0; font-weight: inherit; }
.door .kicker { margin: 18px 0 0; }
.door .lede {
  margin: 28px auto 0; max-width: 36ch;
  font-size: 18px; line-height: 1.55; color: var(--ink);
}
.door .lede strong { color: var(--ink); font-weight: 600; }
.door .actions { margin-top: 28px; }
.door .fine {
  margin: 20px 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink);
}
.door .fine a { color: var(--ink); text-decoration-color: var(--accent); }
.door .fine a:hover { color: var(--accent-text); }

/* How a recipe is put up: a ruled ledger, the label's back panel. */
.ledger {
  width: 100%; max-width: 540px;
  margin: 72px 0 0;
}
.ledger h2 {
  margin: 0 0 14px;
  font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em;
  text-align: center;
}
.ledger ol {
  list-style: none; margin: 0; padding: 0;
  border-top: 2px solid var(--line-strong);
  border-bottom: 2px solid var(--line-strong);
}
.ledger li {
  padding: 16px 2px;
}
.ledger li + li { border-top: 1px solid var(--line); }
.ledger p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink); }
.ledger p b { color: var(--ink); font-weight: 600; }

/* ---- Legal pages -------------------------------------------------------------- */
.masthead {
  border-bottom: 2px solid var(--line-strong);
  background: var(--header-bg);
}
.masthead .inner {
  max-width: 44rem; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.masthead .brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.masthead .brand .jar { width: 24px; height: 36px; }
.masthead .brand .pickled { font-size: 21px; }
.masthead .brand .lore { font-size: 22px; }
.masthead nav { display: flex; gap: 18px; }
.masthead nav a {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
}
.masthead nav a:hover { color: var(--accent-text); }
.masthead nav a[aria-current='page'] {
  color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}

.doc {
  flex: 1;
  width: 100%; max-width: 44rem; margin: 0 auto;
  padding: 48px 16px 64px;
}
.doc h1 {
  margin: 0;
  font-size: 40px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em;
  text-wrap: balance;
}
.doc .updated { margin: 12px 0 0; font-style: italic; color: var(--ink); }
.doc a { color: var(--ink); text-decoration-color: var(--accent-text); }
.doc a:hover { color: var(--accent-text); }
.doc .intro { margin-top: 28px; }
.doc h2 {
  margin: 2.4em 0 0.5em;
  font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em;
  text-wrap: balance;
  scroll-margin-top: 24px;
}
.doc h3 { margin: 1.8em 0 0.4em; font-size: 19px; font-weight: 600; line-height: 1.3; }
.doc p, .doc li { max-width: 68ch; }
.doc p { margin: 0 0 1em; }
.doc ul, .doc ol { margin: 0 0 1em; padding-left: 1.3em; }
.doc li { margin-bottom: 0.45em; }
.doc li::marker { color: var(--ink-soft); }
.doc strong { font-weight: 600; }

.contents {
  margin: 32px 0 0; padding: 20px 24px 18px;
}
.contents h2 { margin: 0 0 8px; font-size: 13px; }
.contents h2.kicker { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.17em; }
.contents ol { margin: 0; padding-left: 1.4em; columns: 2 16rem; column-gap: 32px; }
.contents li { margin: 0 0 4px; font-size: 16px; break-inside: avoid; }


.conspicuous { padding-left: 1em; border-left: 1px solid var(--line-strong); }

/* ---- Footer (every page) ------------------------------------------------------ */
.site-foot {
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--ink);
}
.site-foot .inner {
  max-width: 44rem; margin: 0 auto; padding: 20px 16px 28px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
}
.site-foot nav { display: flex; gap: 18px; text-transform: uppercase; }
.site-foot a { color: var(--ink); text-decoration-color: var(--accent); }
.site-foot a:hover { color: var(--accent-text); }
.site-foot .mail { font-family: var(--font-serif); font-size: 15px; letter-spacing: 0; }
.site-foot p { margin: 0; }
.site-foot .credit {
  flex-basis: 100%; font-family: var(--font-serif); font-size: 14px; letter-spacing: 0;
  line-height: 1.5; color: var(--ink);
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .door { padding-top: 40px; }
  .door .jar { width: 64px; height: 94px; margin-bottom: 16px; }
  .door .label { padding: 40px 22px 32px; }
  .wordmark.hero .pickled { font-size: 32px; }
  .wordmark.hero .lore { font-size: 42px; }
  .door .lede { font-size: 17px; }
  .ledger { margin-top: 56px; }
  .masthead .brand .wordmark { display: none; }
  .doc { padding-top: 36px; }
  .doc h1 { font-size: 32px; }
  }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.doc code { font-family: var(--font-mono); font-size: 0.82em; background: var(--surface-2); padding: 1px 5px; border-radius: 3px; }
.door .fine a, .door .fine span { white-space: nowrap; }
.door + .site-foot .inner { max-width: calc(540px + 32px); }
.ledger a { color: var(--ink); text-decoration-color: var(--accent-text); }
.ledger a:hover { color: var(--accent-text); }
