/* The look shared by the welcome and Settings pages: a printed poster, with one fixed
   palette, so it doesn't follow the browser's dark mode. The display type uses condensed
   fonts people already have, because loading one from the web would break the promise
   that nothing is fetched. */
:root {
  --ink: #2b2d31;
  --paper: #edece8;
  --amber: #fdae17;
  --red: #c80000;
  --rule: rgba(43, 45, 49, .85);
  --muted: #5a5a56;
  --display: "DIN Condensed", Bahnschrift, "Arial Narrow", Impact, "Roboto Condensed", sans-serif;
  /* DIN Condensed's capitals sit high in their line box. This moves them to its middle. */
  --cap-nudge: .14em;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ink); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, sans-serif; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button.link, a.link { all: unset; color: var(--red); cursor: pointer; font-weight: 600; text-decoration: underline; }
button.link:focus-visible, a.link:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
button.primary { background: var(--red); border: 0; border-radius: 4px; color: #fff; font-weight: 700; letter-spacing: .02em; padding: 12px 24px; }
button.primary:hover:not(:disabled) { background: #a80000; }
button.primary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.sheet { max-width: 880px; margin: 40px auto; background: var(--paper); }

/* The amber plate. Keep it flat: dotted textures have become an AI slop tell. */
.plate { padding: 24px 40px 38px; background: var(--amber); }
h1 { margin: 0; font: 700 clamp(46px, 12.4vw, 112px)/.95 var(--display); font-stretch: condensed; letter-spacing: .01em; text-transform: uppercase; transform: translateY(var(--cap-nudge)); }

.notice { margin: 0; padding: 18px 40px; background: var(--ink); color: var(--paper); }
.notice p { margin: 0 0 10px; }
.notice button { background: var(--paper); border: 0; border-radius: 4px; color: var(--ink); font-weight: 600; padding: 8px 14px; }

/* Each row: one big word, then the small print beside it, split by a thin rule. */
.line { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; margin: 0 40px; padding: 22px 0 20px; border-top: 2px solid var(--rule); }
.plate + .line, .notice + .line { border-top: 0; }
/* --text-cap-top is how far down the text beside the word starts, so their tops line up. */
.line h2 { margin: calc(var(--text-cap-top, 0px) + .045em) 0 0; font: 700 clamp(60px, 9vw, 84px)/.9 var(--display); font-stretch: condensed; letter-spacing: .01em; text-transform: uppercase; }

.after { margin: 0 40px; padding: 18px 0 30px; border-top: 2px solid var(--rule); }
.after p { margin: 4px 0; }
/* The signature at the foot of the page, like a printer's mark on a poster. */
.after .credit { margin-top: 16px; font-size: 13px; font-style: italic; letter-spacing: .13em; text-align: center; text-transform: uppercase; }
.credit a { color: var(--ink); text-decoration: none; }
/* Drawn here rather than Buy Me a Coffee's own widget, which would load their script on
   every visit, and an extension page can't run it anyway. */
.coffee { margin: 4px 0 18px; text-align: center; }
.coffee a { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 15px; text-align: left; text-decoration: none; }
.coffee svg { flex: none; width: 40px; height: 40px; transform-origin: 50% 90%; transition: transform .2s ease-out; }
.coffee .mug { fill: var(--amber); }
.coffee b { color: var(--red); text-decoration: underline; }
.coffee a:hover svg, .coffee a:focus-visible svg { transform: rotate(-8deg); }
.coffee a:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .coffee svg { transition: none; } }
.credit a:hover { color: var(--red); text-decoration: underline; }
.credit a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* On/off switches. Drawn with a gradient rather than ::before, which Firefox doesn't
   render on inputs. */
.switch-input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 50px; height: 30px; border-radius: 30px; cursor: pointer;
  background: radial-gradient(circle, #fff 0 10.5px, transparent 11.5px) no-repeat 0 0 / 30px 30px, #8d8c88;
  transition: background-position .15s, background-color .15s;
}
.switch-input:checked { background-color: var(--red); background-position: 20px 0; }
.switch-input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.switch-input:disabled { cursor: default; opacity: .5; }

@media (max-width: 720px) {
  .sheet { margin: 0; }
  .plate { padding: 26px 18px 28px; }
  .notice { padding: 16px 18px; }
  .line { grid-template-columns: 1fr; gap: 8px; margin: 0 18px; }
  .line h2 { margin-top: 0; }
  .after { margin: 0 18px; }
}
