/* css/base.css: Overwork's print system. Paper and ink with safety orange; shared by every page. */

@font-face { font-family: 'Big Shoulders'; src: url('/fonts/BigShoulders.woff2') format('woff2'); font-weight: 800 900; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/fonts/Archivo.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/JetBrainsMono.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Baloo 2'; src: url('/fonts/Baloo2.woff2') format('woff2'); font-weight: 600 800; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/Nunito.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Shantell Sans'; src: url('/fonts/Shantell.woff2') format('woff2'); font-weight: 500 700; font-display: swap; }

:root {
  --paper: #F2EADB;
  --paper-2: #E7DCC8;
  --paper-3: #DCCFB6;
  --ink: #171B26;
  --ink-2: #2A3040;
  --ink-soft: #4A4F5C;
  --orange: #FF5A1F;
  --orange-ink: #C93D0B; /* orange dark enough for small text on paper */
  --amber: #FFB629;
  --teal: #1F6F6B;
  --steel: #8C93A1;
  --night: #0D111B;
  --rule: rgba(23, 27, 38, 0.16);
  --rule-strong: rgba(23, 27, 38, 0.55);

  --display: 'Big Shoulders', 'Arial Narrow', 'Helvetica Neue Condensed', Impact, sans-serif;
  --text: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r: 3px;
  --pad: clamp(18px, 4.2vw, 56px);
  --maxw: 1280px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--orange-ink); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip:focus { top: 8px; }
[hidden] { display: none !important; }

/* --- type --- */
.display {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.86;
}
.mono { font-family: var(--mono); font-weight: 500; }
.label {
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.num { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.fig { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }

/* --- buttons --- */
.btn {
  --bg: var(--ink); --fg: var(--paper); --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--bg); color: var(--fg);
  border: 2px solid var(--bd); border-radius: var(--r);
  font: 600 16px/1 var(--text); letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  box-shadow: 0 3px 0 0 rgba(23, 27, 38, 0.9);
}
.btn:hover { color: var(--fg); transform: translateY(-1px); box-shadow: 0 4px 0 0 rgba(23, 27, 38, 0.9); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 0 rgba(23, 27, 38, 0.9); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-hot { --bg: var(--orange); --fg: var(--ink); --bd: var(--ink); }
.btn-line { --bg: transparent; --fg: var(--ink); --bd: var(--ink); box-shadow: none; }
.btn-line:hover { background: var(--ink); --fg: var(--paper); box-shadow: none; }
.btn-paper { --bg: var(--paper); --fg: var(--ink); --bd: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn .ico { width: 20px; height: 20px; flex: none; }

.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --- rubber stamps --- */
.stamp {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 4px;
  border: 2.5px solid currentColor; border-radius: 4px;
  font: 500 12px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  transform: rotate(-2deg);
  mix-blend-mode: multiply;
  white-space: nowrap;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='40'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 2.2'/%3E%3C/filter%3E%3Crect width='90' height='40' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='40'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 2.2'/%3E%3C/filter%3E%3Crect width='90' height='40' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stamp-orange { color: var(--orange-ink); }
.stamp-teal { color: var(--teal); }
.stamp-steel { color: #5d6472; }
.stamp-ink { color: var(--ink); }
.stamp-on-dark { mix-blend-mode: normal; }

/* --- hazard stripe divider --- */
.hazard {
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 12px, var(--amber) 12px 24px);
}
.hazard-thin { height: 8px; background: repeating-linear-gradient(-45deg, var(--ink) 0 8px, var(--amber) 8px 16px); }

/* --- registration mark --- */
.reg { position: absolute; width: 22px; height: 22px; color: var(--ink); opacity: .7; pointer-events: none; }
.reg::before, .reg::after { content: ''; position: absolute; background: currentColor; }
.reg::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.reg::after { top: 50%; left: 0; right: 0; height: 1px; }
.reg i { position: absolute; inset: 5px; border: 1px solid currentColor; border-radius: 50%; }

/* --- paper card --- */
.card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r);
  box-shadow: 4px 4px 0 0 rgba(23, 27, 38, 0.9);
}

/* paper grain, very light (a data URL, no request) */
.grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .1 0 0 0 0 .15 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.reg-tl { left: -11px; top: -11px; } .reg-tr { right: -11px; top: -11px; }
.reg-bl { left: -11px; bottom: -11px; } .reg-br { right: -11px; bottom: -11px; }

/* --- music toggle (js/music.js), on both pages --- */
.music-btn { width: 44px; padding: 0 !important; flex: none; position: relative; }
.music-btn .ico { width: 22px; height: 22px; }
.music-btn.is-on { --bg: var(--amber, #FFC93C); }
.music-btn.is-on .ico { animation: music-bob .9s ease-in-out infinite alternate; }
.music-btn:not(.is-on)::after {
  /* a slash across the note while it is off */
  content: ''; position: absolute; left: 11px; right: 11px; top: 50%; height: 2.5px; border-radius: 2px;
  background: currentColor; transform: rotate(-38deg);
}
@keyframes music-bob { from { transform: translateY(1px) rotate(-6deg); } to { transform: translateY(-2px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .music-btn.is-on .ico { animation: none; } }
