/* The standalone /newsletter/ page (newsletter-account.php). Tokens and faces match style.css. */
@font-face { font-family: "Space Grotesk"; src: url("fonts/SpaceGrotesk.ttf") format("truetype"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f8f2e7;
  --ink: #201b16;
  --muted: #74695e;
  --line: rgb(67 53 40 / 22%);
  --accent: #a44f35;
  --well: #fffaf2;
  --danger: #9b2d1f;
  --font-body: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Literata", Georgia, serif;
}
:root[data-theme="dark"] { color-scheme: dark; --bg: #090806; --ink: #f5eddf; --muted: #b3a696; --line: rgb(235 219 197 / 22%); --accent: #e19572; --well: #17130f; --danger: #f0907d; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --bg: #090806; --ink: #f5eddf; --muted: #b3a696; --line: rgb(235 219 197 / 22%); --accent: #e19572; --well: #17130f; --danger: #f0907d; }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.nl-masthead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; max-width: 46rem; margin: 0 auto; padding: 1.5rem max(16px, 4vw) 1rem; border-bottom: 2px solid var(--ink); }
.nl-wordmark { font: 700 2rem/1 var(--font-serif); letter-spacing: -.04em; text-decoration: none; }
.nl-wordmark span { color: var(--accent); }
.nl-masthead__label { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.nl-main { max-width: 46rem; margin: 0 auto; padding: clamp(2rem, 6vh, 4rem) max(16px, 4vw) 4rem; }
.nl-title { max-width: 14ch; margin: 0 0 1rem; font-size: clamp(2.4rem, 7vw, 4.2rem); font-weight: 650; letter-spacing: -.06em; line-height: .98; }
.nl-lede { max-width: 36rem; margin: 0 0 1.75rem; color: var(--muted); font: 420 1.12rem/1.65 var(--font-serif); }
.nl-status { margin: 0 0 1.5rem; padding: .8rem 1rem; border-left: 4px solid var(--accent); background: var(--well); font-size: .9rem; }
.nl-error { margin: 0 0 1.5rem; padding: .8rem 1rem; border: 2px solid var(--danger); color: var(--danger); font-weight: 600; }

.nl-form { display: grid; gap: 1.75rem; }
.nl-field { display: grid; gap: .4rem; font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.nl-field input, .nl-field select { width: 100%; min-height: 3rem; padding: .7rem .85rem; border: 2px solid var(--ink); border-radius: 0; background: var(--well); color: var(--ink); font: 1rem var(--font-body); }
.nl-field--inline { min-width: 10rem; }
.nl-field[hidden] { display: none; }
.nl-trap { position: absolute; left: -9999px; }

.nl-group { margin: 0; padding: 0; border: 0; }
.nl-group legend { margin-bottom: .6rem; padding: 0; font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.nl-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .5rem; }
.nl-choice { position: relative; display: flex; align-items: center; gap: .6rem; min-height: 3rem; padding: .6rem .85rem; border: 2px solid var(--line); background: var(--well); cursor: pointer; font-weight: 600; }
.nl-choice:has(:checked) { border-color: var(--ink); box-shadow: 3px 3px 0 var(--accent); }
.nl-choice input, .nl-topic input, .nl-check input { margin: 0; accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: none; }
.nl-when__row { display: flex; flex-wrap: wrap; gap: .75rem; }
.nl-hint { margin: .6rem 0 0; color: var(--muted); font-size: .82rem; }

.nl-topic-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.25rem 1.5rem; margin-top: 1rem; padding: 1.1rem; border: 2px solid var(--ink); background: var(--well); }
.nl-topic-list[hidden] { display: none; }
.nl-topic label { display: flex; align-items: center; gap: .55rem; min-height: 2.25rem; cursor: pointer; }
.nl-topic__parent { font-weight: 700; }
.nl-topic__children { margin-left: 1.6rem; color: var(--muted); font-size: .92rem; }
.nl-topic__children label:has(:disabled) { opacity: .65; cursor: default; }

.nl-check { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; cursor: pointer; font-size: .92rem; }
.nl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.nl-button { min-height: 3.1rem; padding: .8rem 1.6rem; border: 2px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--bg); font: 700 .95rem var(--font-body); letter-spacing: .02em; cursor: pointer; }
.nl-button:hover { background: var(--accent); border-color: var(--accent); color: #fffaf2; }
.nl-button--danger { background: var(--danger); border-color: var(--danger); color: #fffaf2; }
.nl-link { padding: 0; border: 0; background: none; color: var(--ink); font: 600 .92rem var(--font-body); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.nl-link--quiet { color: var(--muted); }
.nl-link:hover { color: var(--accent); }
.nl-small { margin: 1.75rem 0 0; color: var(--muted); font-size: .82rem; }

@media (max-width: 480px) {
  .nl-choices--frequency { grid-template-columns: 1fr 1fr; }
  .nl-actions .nl-button { width: 100%; }
}
