/* ═══════════════════════════════════════════════════════════════
   THE LAGOM LICENSE — styles
   Not too much CSS, not too little. (It is slightly too much.)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --paper: #F3EEE4;
  --paper-2: #EAE2D3;
  --card: #FBF8F2;
  --ink: #1A1F2B;
  --ink-2: #474C58;
  --ink-3: #5F6067;
  --rule: rgba(26, 31, 43, 0.13);
  --rule-strong: rgba(26, 31, 43, 0.28);
  --falu: #9E2B25;
  --falu-deep: #7A1F1A;
  --falu-ink: #FBF3EA;
  --sun: #E2AE34;
  --pine: #2F4A3A;
  --pine-2: #5D7A62;
  --berry: #3C3F8F;
  --vial-a: #E8D57A;
  --vial-b: #C9C35A;
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 1px 2px rgba(26,31,43,.05), 0 12px 32px -12px rgba(26,31,43,.18);
  --grain-opacity: .07;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --hand: "Caveat", "Comic Sans MS", cursive;

  --ease: cubic-bezier(.2, .7, .1, 1);
  --radius: 22px;
  --gutter: clamp(16px, 4vw, 48px);

  color-scheme: light;
}

/* Midvinter */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12151C;
    --paper-2: #181C25;
    --card: #1A1F29;
    --ink: #EDE6D8;
    --ink-2: #BDB6A8;
    --ink-3: #8C877C;
    --rule: rgba(237, 230, 216, 0.12);
    --rule-strong: rgba(237, 230, 216, 0.26);
    --falu: #E36A5E;
    --falu-deep: #C9564B;
    --falu-ink: #1A0E0C;
    --sun: #F0C55A;
    --pine: #8FB59B;
    --pine-2: #5E7F69;
    --berry: #8C90E8;
    --vial-a: #B9AE52;
    --vial-b: #8E8B3B;
    --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px -12px rgba(0,0,0,.6);
    --grain-opacity: .05;
    --grain-filter: invert(1);
    --moose-tint: 5%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12151C;
  --paper-2: #181C25;
  --card: #1A1F29;
  --ink: #EDE6D8;
  --ink-2: #BDB6A8;
  --ink-3: #8C877C;
  --rule: rgba(237, 230, 216, 0.12);
  --rule-strong: rgba(237, 230, 216, 0.26);
  --falu: #E36A5E;
  --falu-deep: #C9564B;
  --falu-ink: #1A0E0C;
  --sun: #F0C55A;
  --pine: #8FB59B;
  --pine-2: #5E7F69;
  --berry: #8C90E8;
  --vial-a: #B9AE52;
  --vial-b: #8E8B3B;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px -12px rgba(0,0,0,.6);
  --grain-opacity: .05;
  --grain-filter: invert(1);
  --moose-tint: 5%;
  color-scheme: dark;
}

/* ─────────────── Base ─────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
/* paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: var(--grain-opacity);
  filter: var(--grain-filter, none);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button { font: inherit; color: inherit; }
::selection { background: var(--falu); color: var(--falu-ink); }
:focus-visible { outline: 2px solid var(--falu); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.08; font-variation-settings: "SOFT" 50, "opsz" 72; }
h2 em, h3 em, h4 em, p em { font-style: italic; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.muted { color: var(--ink-3); }
.falu { color: var(--falu); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow--light { color: color-mix(in srgb, var(--falu-ink) 85%, transparent); }

/* ─────────────── Buttons ─────────────── */
.btn {
  --b-bg: var(--card); --b-fg: var(--ink); --b-bd: var(--rule-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 50px; padding: 0 24px;
  border: 1px solid var(--b-bd); border-radius: 999px;
  background: var(--b-bg); color: var(--b-fg);
  font-weight: 600; font-size: 15.5px; letter-spacing: -0.005em; text-decoration: none;
  cursor: pointer;
  transition: transform .35s var(--ease), background-color .25s, box-shadow .35s var(--ease), border-color .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(26,31,43,.35); }
.btn:active { transform: translateY(0); }
.btn span { transition: transform .35s var(--ease); }
.btn:hover span { transform: translateX(3px); }
.btn--primary { --b-bg: var(--falu); --b-fg: var(--falu-ink); --b-bd: var(--falu); }
.btn--primary:hover { --b-bg: var(--falu-deep); --b-bd: var(--falu-deep); }
.btn--ghost { --b-bg: transparent; }
.btn--paper { --b-bg: var(--falu-ink); --b-fg: var(--falu); --b-bd: transparent; }
.btn--small { min-height: 40px; padding: 0 18px; font-size: 14px; }

.pill-btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--rule-strong); background: transparent;
  font-size: 14px; cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .3s var(--ease);
}
.pill-btn:hover { background: var(--card); border-color: var(--ink-3); }
.pill-btn strong { font-weight: 700; }
.pill-btn--small { padding: 6px 13px; font-size: 13px; }

.link-btn { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; color: var(--falu); font-size: inherit; }

.chip {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--ink-2);
}
.chip--req { background: var(--falu); color: var(--falu-ink); border-color: var(--falu); }

/* ─────────────── Nav ─────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .5s;
}
.nav.is-scrolled { border-bottom-color: var(--rule); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.nav__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 22px; font-style: italic; letter-spacing: -0.02em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.nav__mark { position: relative; width: 34px; height: 16px; border-radius: 999px; background: linear-gradient(180deg, var(--vial-a), var(--vial-b)); box-shadow: inset 0 0 0 1.5px var(--ink); overflow: hidden; }
.nav__mark i { position: absolute; top: 3px; left: 50%; width: 12px; height: 10px; margin-left: -6px; border-radius: 50%; background: rgba(255,255,255,.85); transition: transform .8s var(--ease); }
.nav__brand:hover .nav__mark i { animation: settle 1.4s var(--ease); }
@keyframes settle { 0% { transform: translateX(0) } 20% { transform: translateX(7px) } 45% { transform: translateX(-5px) } 70% { transform: translateX(2px) } 100% { transform: translateX(0) } }
.nav__links { display: flex; gap: 4px; }
.nav__links a { text-decoration: none; font-size: 14.5px; color: var(--ink-2); padding: 8px 14px; border-radius: 999px; transition: background-color .2s, color .2s; }
.nav__links a:hover { background: var(--paper-2); color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__cta { display: none; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--falu); color: var(--falu-ink); font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav__gh { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink-2); transition: background-color .2s, color .2s; }
.nav__gh:hover { background: var(--paper-2); color: var(--ink); }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 14px 0 10px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--card); cursor: pointer;
  font-size: 13.5px; font-weight: 600;
}
.theme-toggle__icon { position: relative; width: 20px; height: 20px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 30%, transparent); transition: background-color .5s, box-shadow .5s; overflow: hidden; }
.theme-toggle__icon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--card); transform: translate(120%, -120%); transition: transform .6s var(--ease); }
.is-dark .theme-toggle__icon { background: var(--ink); box-shadow: 0 0 0 3px var(--rule); }
.is-dark .theme-toggle__icon::after { transform: translate(35%, -25%); }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta { display: inline-flex; }
}
@media (max-width: 420px) {
  .theme-toggle__label { display: none; }
  .theme-toggle { padding: 0 10px; }
}

/* ─────────────── Reveal ─────────────── */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ─────────────── Hero ─────────────── */
.js .rise { animation: rise 1.1s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
.hero { position: relative; isolation: isolate; padding: clamp(28px, 6vw, 64px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  left: 50%; top: 10%; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sun) 22%, transparent), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; margin: 0 0 clamp(8px, 2vw, 20px); padding: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.hero__meta li { display: inline-flex; align-items: center; gap: 10px; }
.hero__meta li + li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--falu); margin-right: 4px; }
.hero__meta .muted { text-transform: none; letter-spacing: 0; font-family: var(--sans); font-style: italic; }

.hero__title { margin: 0; line-height: .8; }
.hero__word {
  display: flex; justify-content: center;
  font-family: var(--serif);
  font-size: clamp(7rem, 30vw, 26rem);
  font-weight: 340;
  font-style: italic;
  letter-spacing: -0.055em;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  color: var(--falu);
  padding: .04em .06em .12em 0;
  user-select: none;
}
.hero__word span { display: inline-block; transform-origin: 50% 90%; }
.js .hero__word span { opacity: 0; transform: translateY(.18em) rotate(4deg); animation: letterIn 1.3s var(--ease) forwards; animation-delay: calc(.15s + var(--i) * .07s); }
@keyframes letterIn { to { opacity: 1; transform: none; } }

.hero__sub { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 40px; padding-top: 8px; border-top: 1px solid var(--rule); padding-top: 28px; }
.hero__tagline { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.35rem); line-height: 1.15; letter-spacing: -0.02em; max-width: 22ch; font-variation-settings: "SOFT" 50, "opsz" 72; }
.hero__tagline em { color: var(--falu); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ─────────────── Lagom-o-meter (spirit level) ─────────────── */
.level {
  --v: 50;
  margin: clamp(48px, 7vw, 88px) 0 0;
  padding: clamp(22px, 3.5vw, 40px);
  border-radius: calc(var(--radius) + 8px);
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.level__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; align-items: baseline; }
.level__hint { font-size: 14px; color: var(--ink-3); font-style: italic; font-family: var(--serif); }
.level__readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; margin: 18px 0 clamp(26px, 4vw, 40px); min-height: 2.3em; }
.level__word {
  font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.035em;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; font-weight: 400;
  transition: color .4s var(--ease);
}
.level[data-state="lagom"] .level__word { color: var(--falu); font-style: italic; }
.level__quip { color: var(--ink-2); font-size: clamp(15px, 1.6vw, 18px); max-width: 44ch; }

.level__body { transform: rotate(calc((50 - var(--v)) * 0.07deg)); transition: transform .5s var(--ease); }
.level__instrument {
  position: relative;
  height: 64px; padding: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2B303C, #1A1F2B);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), inset 0 0 0 1px rgba(255,255,255,.06), 0 14px 28px -14px rgba(0,0,0,.55);
}
.level__input {
  -webkit-appearance: none; appearance: none;
  position: relative; z-index: 1;
  display: block; width: 100%; height: 44px; margin: 0;
  background: transparent; cursor: grab;
  touch-action: pan-y;
}
.level__input:active { cursor: grabbing; }
.level__input:focus-visible { outline: none; }
.level__input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--sun), inset 0 -3px 6px rgba(0,0,0,.18); }
.level__input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--sun), inset 0 -3px 6px rgba(0,0,0,.18); }

.level__input::-webkit-slider-runnable-track {
  height: 44px; border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.55) 0, rgba(255,255,255,0) 38%, rgba(0,0,0,0) 70%, rgba(0,0,0,.18) 100%),
    linear-gradient(90deg, var(--vial-b), var(--vial-a) 30%, var(--vial-a) 70%, var(--vial-b));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), inset 0 3px 8px rgba(0,0,0,.18);
}
.level__input::-moz-range-track {
  height: 44px; border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.55) 0, rgba(255,255,255,0) 38%, rgba(0,0,0,0) 70%, rgba(0,0,0,.18) 100%),
    linear-gradient(90deg, var(--vial-b), var(--vial-a) 30%, var(--vial-a) 70%, var(--vial-b));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), inset 0 3px 8px rgba(0,0,0,.18);
}
.level__input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 76px; height: 30px; margin-top: 7px;
  border: 0; border-radius: 50%;
  background: radial-gradient(ellipse 60% 55% at 40% 32%, rgba(255,255,255,1), rgba(255,255,255,.75) 45%, rgba(255,255,255,.35) 75%, rgba(255,255,255,.15));
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.14), 0 0 0 1px rgba(255,255,255,.5);
  transition: transform .2s var(--ease);
}
.level__input::-moz-range-thumb {
  width: 76px; height: 30px;
  border: 0; border-radius: 50%;
  background: radial-gradient(ellipse 60% 55% at 40% 32%, rgba(255,255,255,1), rgba(255,255,255,.75) 45%, rgba(255,255,255,.35) 75%, rgba(255,255,255,.15));
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.14), 0 0 0 1px rgba(255,255,255,.5);
}
.level__input:active::-webkit-slider-thumb { transform: scaleX(1.08) scaleY(.94); }

.level__marks { position: absolute; z-index: 2; inset: 10px; pointer-events: none; }
.level__marks i { position: absolute; top: 3px; bottom: 3px; width: 2px; border-radius: 2px; background: #1A1F2B; opacity: .7; transition: background-color .4s, box-shadow .4s, opacity .4s; }
.level__marks i:first-child { left: calc(50% - 44px); }
.level__marks i:last-child { left: calc(50% + 42px); }
.level[data-state="lagom"] .level__marks i { background: var(--falu); opacity: 1; box-shadow: 0 0 10px color-mix(in srgb, var(--falu) 60%, transparent); }
.level__glint { position: absolute; z-index: 2; left: 34px; right: 34px; top: 14px; height: 6px; border-radius: 99px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55) 20%, rgba(255,255,255,.2) 80%, transparent); pointer-events: none; }

.level__ticks { position: relative; list-style: none; margin: 16px 10px 0; padding: 0; height: 38px; }
.level__ticks li {
  position: absolute; top: 0;
  left: calc(38px + (100% - 76px) * var(--p) / 100);
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
  white-space: nowrap; padding-top: 12px;
}
.level__ticks li::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 7px; background: var(--rule-strong); }
.level__ticks li:first-child { transform: translateX(-38px); }
.level__ticks li:first-child::before { left: 38px; }
.level__ticks li:last-child { transform: translateX(calc(-100% + 38px)); }
.level__ticks li:last-child::before { left: auto; right: 38px; }
.level__ticks .is-center { color: var(--falu); font-weight: 600; }
.level__ticks .is-center::before { background: var(--falu); height: 9px; }
.level__ticks .short { display: none; }
@media (max-width: 760px) {
  .level__ticks .opt, .level__ticks .long { display: none; }
  .level__ticks .short { display: inline; }
}

.level__confetti { margin-top: 10px; font-size: 13px; font-family: var(--serif); font-style: italic; color: var(--ink-3); text-align: center; opacity: 0; transform: translateY(4px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.level__confetti.show { opacity: 1; transform: none; }

/* ─────────────── Marquee ─────────────── */
.marquee { overflow: hidden; border-block: 1px solid var(--rule); background: var(--ink); color: var(--paper); padding: 18px 0; }
.marquee__track { display: flex; width: max-content; gap: 28px; align-items: center; animation: marquee 48s linear infinite; font-family: var(--serif); font-size: clamp(22px, 3vw, 34px); font-style: italic; letter-spacing: -0.01em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.marquee__track b { color: var(--sun); font-style: normal; font-size: .7em; font-weight: 400; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 14px)); } }

/* ─────────────── Sections ─────────────── */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section--alt { background: var(--paper-2); }
.sec-head { display: flex; align-items: baseline; gap: 22px; padding-top: 18px; border-top: 1px solid var(--rule-strong); margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head__num { font-family: var(--mono); font-size: 13px; color: var(--falu); letter-spacing: .08em; font-weight: 600; }
.sec-head__title { font-size: clamp(2rem, 4.6vw, 3.6rem); letter-spacing: -0.03em; font-variation-settings: "SOFT" 100, "opsz" 144; }
.sec-head__title em { color: var(--ink-3); }

/* ─────────────── Definition ─────────────── */
.def { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.def__entry { position: sticky; top: 110px; }
.def__word { font-family: var(--serif); font-size: clamp(4rem, 9vw, 7.5rem); line-height: .9; letter-spacing: -0.045em; font-weight: 600; font-variation-settings: "SOFT" 0, "opsz" 144; }
.def__phon { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin: 16px 0 22px; color: var(--ink-2); }
.def__pos { font-family: var(--serif); font-style: italic; }
.def__senses { margin: 28px 0 0; padding: 22px 0 0 1.4em; border-top: 1px solid var(--rule); font-family: var(--serif); font-size: 20px; line-height: 1.45; }
.def__senses li { padding-left: .3em; margin-bottom: 6px; }
.def__senses li::marker { font-family: var(--mono); font-size: 13px; color: var(--falu); }
.def__etym { margin-top: 26px; font-size: 15px; color: var(--ink-2); max-width: 46ch; }
.def__etym .eyebrow { display: block; margin-bottom: 6px; }

.def__lead { font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--falu); font-weight: 600; margin-bottom: 14px; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li {
  font-family: var(--serif); font-size: clamp(1.45rem, 2.6vw, 2.2rem); line-height: 1.22; letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 60, "opsz" 72;
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.lines li em { color: var(--ink-3); }
.lines__bun { display: flex; flex-direction: column; gap: 14px; }
.def__coda { margin-top: 34px; font-size: 18px; color: var(--ink-2); max-width: 48ch; }
.def__coda q { font-family: var(--serif); font-style: italic; color: var(--ink); }

.bun { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-family: var(--sans); font-size: 15px; letter-spacing: 0; }
.bun__plate { display: inline-flex; gap: 4px; min-width: 28px; min-height: 30px; align-items: center; }
.bun__plate svg { width: 30px; height: 30px; animation: bunIn .5s var(--ease) both; }
@keyframes bunIn { from { transform: scale(.4) rotate(-90deg); opacity: 0; } }
.bun__msg { font-family: var(--serif); font-style: italic; color: var(--ink-2); }
.bun.is-refused .pill-btn { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ─────────────── The deal ─────────────── */
.deal { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 90px); align-items: center; }
.deal__intro { position: relative; }
.deal__two {
  font-family: var(--serif); font-size: clamp(14rem, 30vw, 24rem); line-height: .72; font-weight: 300;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; font-style: italic;
  color: var(--falu); letter-spacing: -0.06em; margin-bottom: 18px;
}
.deal__headline { font-size: clamp(2rem, 3.8vw, 3rem); letter-spacing: -0.03em; }
.deal__headline em { color: var(--ink-3); }
.deal__lede { margin-top: 14px; color: var(--ink-2); }
.deal__rules { display: grid; gap: 18px; }
.rule {
  position: relative;
  padding: clamp(26px, 3.4vw, 40px);
  border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow);
}
.rule h4 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 18px 0 12px; letter-spacing: -0.025em; font-variation-settings: "SOFT" 100, "opsz" 144; }
.rule p { color: var(--ink-2); max-width: 46ch; }
.big-bold { font-weight: 800; font-size: 1.25em; font-family: var(--sans); color: var(--ink); text-decoration: line-through; text-decoration-color: var(--falu); text-decoration-thickness: 2px; }

.grants { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: clamp(48px, 7vw, 80px); }
.grant { padding: 26px 24px; border-top: 2px solid var(--ink); }
.grant__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--pine); color: var(--paper); margin-bottom: 18px; }
.grant__icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.grant--no { border-top-color: var(--rule-strong); }
.grant--no .grant__icon { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1.5px var(--rule-strong); }
.grant h4 { font-size: 1.6rem; margin-bottom: 10px; font-variation-settings: "SOFT" 100, "opsz" 72; }
.grant p { font-size: 15.5px; color: var(--ink-2); }

.nice { margin-top: clamp(56px, 8vw, 96px); padding: clamp(26px, 4vw, 48px); border-radius: calc(var(--radius) + 6px); border: 1px dashed var(--rule-strong); }
.nice__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 26px; }
.nice__head h3 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); }
.nice__head h3 em { color: var(--ink-3); }
.nice__progress { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.nice__progress.done { color: var(--pine); font-weight: 600; }
.nice__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.nice__list li { border-top: 1px solid var(--rule); }
.nice__list label { display: flex; align-items: center; gap: 16px; padding: 16px 0; cursor: pointer; font-size: 16.5px; transition: color .3s; }
.nice__list input { position: absolute; opacity: 0; pointer-events: none; }
.tick { flex: none; position: relative; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--rule-strong); transition: background-color .3s var(--ease), border-color .3s; }
.tick::after { content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border: solid var(--paper); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .35s var(--ease); }
.nice__list input:checked + .tick { background: var(--pine); border-color: var(--pine); }
.nice__list input:checked + .tick::after { transform: rotate(45deg) scale(1); }
.nice__list label:has(input:checked) { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.nice__list input:focus-visible + .tick { outline: 2px solid var(--falu); outline-offset: 3px; }

/* ─────────────── Bento ─────────────── */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.card:hover { transform: translateY(-3px); }
.card h3 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); letter-spacing: -0.02em; font-variation-settings: "SOFT" 100, "opsz" 72; }
.card h3 em { color: var(--ink-3); }
.card p { color: var(--ink-2); font-size: 15.5px; }
.card__kicker { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--falu); }
.card__small { font-size: 13.5px !important; color: var(--ink-3) !important; }
.card__punch { font-family: var(--serif); font-size: 1.35rem !important; color: var(--ink) !important; line-height: 1.25; }
.card__punch em { color: var(--falu); }
.status { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 12.5px !important; color: var(--ink) !important; display: flex; gap: 10px; align-items: flex-start; }
.status::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--pine); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pine) 22%, transparent); }
.status.is-off::before { background: var(--falu); box-shadow: 0 0 0 4px color-mix(in srgb, var(--falu) 22%, transparent); }

.card--roam { grid-column: span 4; padding-top: 0; }
.card--queue { grid-column: span 2; grid-row: span 2; }
.card--july { grid-column: span 4; }
.card--moose { grid-column: span 3; }
.card--note { grid-column: span 3; }
.card--jante, .card--assembly, .card--candy { grid-column: span 2; }
.card--fish { grid-column: span 3; }
.card--pause { grid-column: span 3; }
/* Supporting clauses: same voice, less volume */
.card--quiet { background: transparent; box-shadow: none; border-style: dashed; border-color: var(--rule-strong); }
.card--quiet:hover { transform: none; }
.card--quiet h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }

/* Forest */
.card--roam .forest { width: calc(100% + 2 * clamp(24px, 3vw, 34px)); margin: 0 calc(-1 * clamp(24px, 3vw, 34px)) 8px; height: 150px; }
.forest__far path { fill: var(--pine-2); opacity: .55; }
.forest__near path { fill: var(--pine); }
.forest__path { stroke: var(--sun); stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }
.forest__gate path { stroke: var(--ink); stroke-width: 3; fill: none; stroke-linecap: round; transform-origin: 262px 140px; transition: transform .8s var(--ease); }
.card--roam:hover .forest__gate path { transform: perspective(200px) rotateY(-55deg); }
.forest__berry { fill: var(--berry); }
.card--roam h3 { max-width: 26ch; }
.card--roam p { max-width: 62ch; }
.card--roam strong { color: var(--ink); }

/* Queue */
.queue { display: grid; gap: 14px; margin: 6px 0 4px; }
.queue__display { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-radius: 14px; background: #121212; color: #FF5B3A; font-family: var(--mono); box-shadow: inset 0 2px 10px rgba(0,0,0,.6); }
.queue__label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #FF5B3A; }
.queue__now { font-size: 40px; font-weight: 600; letter-spacing: .06em; text-shadow: 0 0 12px rgba(255,91,58,.7); font-variant-numeric: tabular-nums; }
.queue__machine { display: grid; justify-items: center; padding: 22px 18px 0; border-radius: 120px 120px 18px 18px; background: linear-gradient(180deg, #C9372C, #9E2B25); box-shadow: inset 0 2px 0 rgba(255,255,255,.25), inset 0 -10px 20px rgba(0,0,0,.2); }
.queue__take { display: grid; gap: 2px; text-align: center; padding: 12px 18px; border-radius: 14px; border: 0; background: #FBF3EA; color: #9E2B25; cursor: pointer; font-weight: 700; font-size: 14px; box-shadow: 0 3px 0 #6a1b17; transition: transform .1s, box-shadow .1s; }
.queue__take span { font-weight: 500; font-size: 12px; opacity: .7; }
.queue__take:active { transform: translateY(3px); box-shadow: 0 0 0 #6a1b17; }
.queue__machine { position: relative; z-index: 1; }
.queue__slot { width: 78%; margin-top: 18px; height: 10px; border-radius: 4px 4px 0 0; background: #4a120f; }
.ticket[hidden] { display: none; }
.ticket {
  position: relative; z-index: 0; margin: -16px auto 0; width: 66%;
  display: grid; justify-items: center; gap: 2px; padding: 12px 10px 14px;
  background: #FFFDF6; color: #1A1F2B; border-radius: 2px;
  -webkit-mask: radial-gradient(circle 5px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 5px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  box-shadow: 0 8px 18px -6px rgba(0,0,0,.35);
  animation: print .9s var(--ease);
}
@keyframes print { from { clip-path: inset(0 0 100% 0); transform: translateY(-14px); } to { clip-path: inset(0 0 0 0); transform: none; } }
.ticket__label { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #5F6067; }
.ticket__num { font-family: var(--serif); font-size: 46px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.ticket__note { font-size: 12px; color: #474C58; font-style: italic; font-family: var(--serif); text-align: center; }
.card--queue .card__small { margin-top: 24px; }
.queue__guilt { font-family: var(--serif); font-style: italic; font-size: 15px !important; color: var(--falu) !important; }

/* Jante */
.card--jante { justify-content: space-between; }
.jante { font-family: var(--serif); font-size: 15.5px !important; line-height: 1.6; color: var(--ink) !important; }

/* Assembly */
.flatpack { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: s; }
.flatpack li { counter-increment: s; position: relative; aspect-ratio: 5 / 4; border: 1.5px solid var(--ink); border-radius: 8px; display: grid; place-items: center; padding: 8px; }
.flatpack li::before { content: counter(s); position: absolute; top: 4px; left: 7px; font-family: var(--mono); font-size: 11px; font-weight: 600; }
.flatpack svg { width: 100%; height: auto; }
.flatpack path, .flatpack circle { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.screw { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px dashed var(--rule-strong); background: transparent; cursor: pointer; font-size: 13.5px; color: var(--ink-2); transition: border-color .2s; }
.screw:hover { border-color: var(--falu); }
.screw svg { width: 52px; height: auto; transition: transform .7s var(--ease); }
.screw circle, .screw .screw__shaft { fill: color-mix(in srgb, var(--ink) 12%, var(--card)); stroke: var(--ink-2); stroke-width: 1.4; stroke-linejoin: round; }
.screw .screw__slot { stroke: var(--ink-2); stroke-width: 1.4; }
.screw.spin svg { transform: rotate(720deg); }
.screw__msg { font-family: var(--serif); font-style: italic; font-size: 15px !important; color: var(--ink) !important; min-height: 1.5em; }

/* July */
.july { display: grid; grid-template-columns: minmax(0, 340px) 120px; justify-content: space-between; gap: 18px; align-items: end; }
.july__cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-family: var(--mono); font-size: 10.5px; }
.july__cal .m { grid-column: 1 / -1; display: flex; justify-content: space-between; font-weight: 600; letter-spacing: .14em; color: var(--ink); margin-bottom: 4px; font-size: 11px; }
.july__cal .m span:last-child { color: var(--falu); }
.july__cal .dn { text-align: center; color: var(--ink-3); }
.july__cal .d { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 6px; color: var(--ink-3); background: repeating-linear-gradient(-45deg, transparent 0 4px, color-mix(in srgb, var(--falu) 16%, transparent) 4px 5px); }
.july__cal .d::after { content: ""; position: absolute; left: 18%; right: 18%; top: 50%; height: 1.5px; background: var(--falu); transform: rotate(-20deg); opacity: .8; }
.house { width: 120px; }
.house__roof { fill: var(--ink); }
.house__body { fill: #9E2B25; }
.house__trim { stroke: #FBF8F2; stroke-width: 3; fill: none; stroke-linejoin: round; }
.house__win { fill: #FBF8F2; }
.house__door { fill: #FBF8F2; stroke: #FBF8F2; }
.house__chim { fill: var(--ink); }

/* Candy */
.bags { display: flex; align-items: flex-end; gap: 18px; margin-top: 4px; }
.bag path, .bag circle { stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.bag path { fill: color-mix(in srgb, var(--sun) 35%, var(--card)); }
.bag .bag__top { fill: none; }
.bag circle { fill: var(--falu); stroke: none; }
.bag--small { width: 46px; transform-origin: bottom; animation: wiggle 3s ease-in-out infinite; }
.bag--big { width: 70px; opacity: .45; }
.bag--big .bag__no { stroke: var(--falu); stroke-width: 4; stroke-linecap: round; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-6deg); } 90% { transform: rotate(5deg); } 95% { transform: rotate(-3deg); } }

/* Moose */
.card--moose { background: color-mix(in srgb, var(--sun) var(--moose-tint, 12%), var(--card)); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 28px; align-items: center; }
.card--moose .moose-sign { grid-row: span 3; }
.card--moose .card__punch { font-size: clamp(1.5rem, 2.4vw, 2rem) !important; }
.moose-sign { position: relative; width: clamp(110px, 14vw, 160px); }
.moose-sign svg { width: 100%; }
.moose-sign__edge { fill: #C9372C; stroke: #C9372C; stroke-width: 6; stroke-linejoin: round; }
.moose-sign__face { fill: #F2C230; stroke: #F2C230; stroke-width: 4; stroke-linejoin: round; }
.moose-sign__moose { fill: #1A1F2B; }
.card--moose:hover .moose-sign { animation: wobble .8s var(--ease); }
@keyframes wobble { 30% { transform: rotate(-5deg); } 60% { transform: rotate(3deg); } }

/* Hazard */
.hazard { position: relative; display: grid; place-items: center; height: 52px; border-radius: 12px; background: repeating-linear-gradient(-45deg, #F2C230 0 14px, #1A1F2B 14px 28px); }
.hazard span { background: var(--card); color: var(--ink); padding: 6px 14px; border-radius: 6px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.hazard__rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hazard__rules li { font-size: 14px; padding: 8px 12px; border-radius: 10px; background: var(--paper-2); color: var(--ink); }
.hazard__rules li:last-child { background: var(--falu); color: var(--falu-ink); }

/* Note */
.note { position: relative; margin: 6px 6px 4px; padding: 26px 22px 18px; background: #FFF6B8; color: #2A2A2A; transform: rotate(-1.6deg); box-shadow: 0 10px 20px -10px rgba(0,0,0,.4); font-family: var(--hand); font-size: 23px; line-height: 1.15; transition: transform .5s var(--ease); }
.card--note:hover .note { transform: rotate(.6deg); }
.note p { color: #2A2A2A !important; font-size: inherit !important; }
.note__sig { margin-top: 8px; text-align: right; }
.note__tape { position: absolute; top: -10px; left: 50%; width: 86px; height: 22px; transform: translateX(-50%) rotate(3deg); background: rgba(255,255,255,.55); box-shadow: 0 1px 2px rgba(0,0,0,.12); backdrop-filter: blur(2px); }

/* Pause */
.pause { display: flex; gap: 10px; }
.pause i { width: 10px; height: 34px; border-radius: 4px; background: var(--falu); }

@media (max-width: 1020px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--roam, .card--july, .card--moose { grid-column: span 2; }
  .card--queue { grid-column: span 1; grid-row: span 2; }
  .card--jante, .card--assembly, .card--candy, .card--fish, .card--note, .card--pause { grid-column: span 1; }
}
@media (max-width: 680px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento > .card { grid-column: auto; grid-row: auto; }
  .card--moose { grid-template-columns: minmax(0, 1fr); }
  .card--moose .moose-sign { grid-row: auto; }
}

/* ─────────────── Fika band ─────────────── */
.fika-band { background: var(--falu); color: var(--falu-ink); padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.fika-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 85% 50%, rgba(255,255,255,.12), transparent 60%); pointer-events: none; }
.fika-band__inner { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(24px, 4vw, 56px); align-items: center; }
.fika-band h2 { font-size: clamp(1.9rem, 4vw, 3.3rem); margin: 10px 0 14px; letter-spacing: -0.03em; font-variation-settings: "SOFT" 100, "opsz" 144; max-width: 22ch; }
.fika-band h2 em { color: color-mix(in srgb, var(--falu-ink) 85%, transparent); }
.fika-band p:not(.eyebrow) { color: color-mix(in srgb, var(--falu-ink) 88%, transparent); max-width: 56ch; }
.cup { width: 120px; height: 120px; flex: none; }
.cup__body { fill: var(--falu-ink); }
.cup__handle, .cup__saucer { fill: none; stroke: var(--falu-ink); stroke-width: 6; stroke-linecap: round; }
.cup__steam { fill: none; stroke: var(--falu-ink); stroke-width: 4; stroke-linecap: round; opacity: 0; animation: steam 3.2s ease-in-out infinite; }
.cup__steam:nth-child(2) { animation-delay: .6s; }
.cup__steam:nth-child(3) { animation-delay: 1.2s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-12px); } }
@media (max-width: 860px) {
  .fika-band__inner { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .fika-band .cup { width: 84px; height: 84px; }
}

/* ─────────────── Use it ─────────────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step { position: relative; display: flex; flex-direction: column; gap: 12px; padding: clamp(24px, 3vw, 34px); border-radius: var(--radius); background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.step__n { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--ink); font-family: var(--serif); font-size: 26px; font-variation-settings: "SOFT" 100, "WONK" 1; font-style: italic; margin-bottom: 6px; }
.step h3 { font-size: clamp(1.5rem, 2.3vw, 1.9rem); font-variation-settings: "SOFT" 100, "opsz" 72; }
.step p { color: var(--ink-2); font-size: 15.5px; }
.step p code { background: var(--paper-2); padding: 2px 6px; border-radius: 6px; }
.code { margin-top: auto; display: flex; align-items: stretch; gap: 0; border-radius: 12px; background: var(--ink); color: var(--paper); overflow: hidden; }
.code code { flex: 1; min-width: 0; padding: 14px 14px; font-size: 12.5px; line-height: 1.5; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.copy { flex: none; border: 0; padding: 0 16px; background: color-mix(in srgb, var(--paper) 12%, var(--ink)); color: var(--paper); font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .2s; }
.copy:hover { background: var(--falu); }
.badge-row { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.badge-row .copy { padding: 10px 14px; border-radius: 10px; background: var(--ink); }
.badge-row .copy:hover { background: var(--falu); }
.personal { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 10px; }
.field { display: grid; gap: 6px; }
.field span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.field input { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.field.is-wanted input { border-color: var(--falu); box-shadow: 0 0 0 4px color-mix(in srgb, var(--falu) 18%, transparent); }
.field input:focus { outline: none; border-color: var(--falu); box-shadow: 0 0 0 4px color-mix(in srgb, var(--falu) 18%, transparent); }
@media (max-width: 960px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* License document */
.doc-wrap { margin-top: clamp(56px, 8vw, 96px); }
.doc-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: 20px; }
.doc-bar__line { margin-top: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.doc-bar__line mark { background: color-mix(in srgb, var(--sun) 45%, transparent); color: inherit; border-radius: 3px; padding: 1px 4px; }
.doc-bar__sub { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.02em; margin-top: 6px; }
.doc-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.doc {
  position: relative;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--rule), 0 3px 0 -1px var(--card), 0 4px 0 -1px var(--rule), 0 7px 0 -2px var(--card), 0 8px 0 -2px var(--rule), 0 30px 60px -30px rgba(26,31,43,.35);
  overflow: hidden;
}
.doc::before { content: ""; position: absolute; top: 0; right: 0; width: 44px; height: 44px; background: linear-gradient(225deg, var(--paper) 50%, color-mix(in srgb, var(--ink) 10%, var(--card)) 50%); box-shadow: -2px 2px 6px rgba(0,0,0,.08); }
.doc__text {
  margin: 0; padding: clamp(28px, 5vw, 72px) clamp(20px, 6vw, 88px);
  font-family: var(--mono); font-size: clamp(12px, 1.25vw, 14.5px); line-height: 1.75; color: var(--ink);
  white-space: pre-wrap; word-break: break-word; tab-size: 4;
}
.doc__text .h { color: var(--falu); font-weight: 600; }
.doc__text mark { background: color-mix(in srgb, var(--sun) 45%, transparent); color: inherit; border-radius: 3px; padding: 1px 2px; }
.doc[data-collapsed="true"] .doc__text { max-height: 620px; overflow: hidden; }
.doc__fade { display: flex; justify-content: center; padding: 0 0 28px; }
.doc[data-collapsed="true"] .doc__fade { position: absolute; left: 0; right: 0; bottom: 0; padding: 140px 0 32px; background: linear-gradient(180deg, transparent, var(--card) 70%); }
.doc__fade .pill-btn { background: var(--card); }

/* ─────────────── Footer ─────────────── */
.footer { padding: clamp(80px, 11vw, 140px) 0 40px; background: #1A1F2B; color: #EDE6D8; }
.footer__big { font-family: var(--serif); font-size: clamp(3.6rem, 13vw, 11rem); line-height: .9; letter-spacing: -0.05em; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; font-weight: 350; }
.footer__big em { color: #D9584C; }
.is-dark .footer { background: #0B0D12; }
.footer__lede { margin-top: 22px; font-size: clamp(17px, 1.8vw, 21px); color: rgba(237, 230, 216, .85); max-width: 40ch; }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 40px; margin-top: clamp(56px, 8vw, 96px); padding-top: 22px; border-top: 1px solid rgba(255,255,255,.15); font-size: 14.5px; }
.footer__row p { color: rgba(237, 230, 216, .78); max-width: 52ch; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer__links a { text-decoration: none; opacity: .85; }
.footer__links a:hover { opacity: 1; text-decoration: underline; }
.footer__gate { color: #F0C55A; }
.footer__copy { margin-top: 26px; font-family: var(--mono); font-size: 12px; color: rgba(237, 230, 216, .72); }

/* ─────────────── Fika dialog ─────────────── */
.fika {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px) saturate(.8); -webkit-backdrop-filter: blur(18px) saturate(.8);
  color: var(--ink);
}
.fika::backdrop { background: transparent; }
.fika[open] { display: grid; place-items: center; animation: fadeIn .8s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } }
.fika__inner { display: grid; justify-items: center; gap: 16px; text-align: center; padding: 24px; }
.cup--big { width: 160px; height: 160px; animation: breathe 6s ease-in-out infinite; }
.cup--big .cup__body { fill: var(--falu); }
.cup--big .cup__handle, .cup--big .cup__saucer, .cup--big .cup__steam { stroke: var(--falu); }
@keyframes breathe { 50% { transform: scale(1.06); } }
.fika h2 { font-size: clamp(4rem, 12vw, 8rem); font-style: italic; letter-spacing: -0.05em; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; line-height: .9; }
.fika__line { font-family: var(--serif); font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--ink-2); max-width: 30ch; min-height: 2.6em; transition: opacity .6s; }
.fika__timer { font-size: 14px; color: var(--ink-3); letter-spacing: .1em; }
.fika form { margin-top: 10px; }

/* ─────────────── Toast ─────────────── */
.toast { position: fixed; z-index: 120; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14.5px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.45); transition: opacity .35s var(--ease), transform .35s var(--ease); max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ─────────────── Responsive misc ─────────────── */
@media (max-width: 960px) {
  .def, .deal { grid-template-columns: minmax(0, 1fr); }
  .def__entry { position: static; }
  .grants { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero__meta { gap: 6px 18px; font-size: 11px; margin-bottom: 28px; }
  .grants { grid-template-columns: minmax(0, 1fr); }
  .nice__list { grid-template-columns: minmax(0, 1fr); }
  .hero__ctas, .hero__ctas .btn { width: 100%; }
  .july { grid-template-columns: minmax(0, 1fr) 84px; justify-content: stretch; }
  .house { width: 84px; }
  .level__marks i:first-child { left: calc(50% - 38px); }
  .level__marks i:last-child { left: calc(50% + 36px); }
  .level__input::-webkit-slider-thumb { width: 64px; }
  .level__input::-moz-range-thumb { width: 64px; }
  .level__ticks li { left: calc(32px + (100% - 64px) * var(--p) / 100); }
  .level__ticks li:first-child { transform: translateX(-32px); }
  .level__ticks li:first-child::before { left: 32px; }
  .level__ticks li:last-child { transform: translateX(calc(-100% + 32px)); }
  .level__ticks li:last-child::before { right: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Entrances become plain fades so state changes are still visible */
  .js .reveal { transform: none; transition: opacity .5s ease; }
  .js .rise, .js .hero__word span, .ticket, .bun__plate svg, .fika[open] { animation: fadeOnly .5s ease both; transform: none; }
  @keyframes fadeOnly { from { opacity: 0; } }
  /* Ambient loops stop */
  .marquee__track, .bag--small, .cup--big, .nav__brand:hover .nav__mark i, .card--moose:hover .moose-sign, .bun.is-refused .pill-btn { animation: none; }
  .cup__steam { animation: none; opacity: .6; }
  .level__body, .forest__gate path, .screw svg, .card, .btn, .btn span, .note { transition: none; }
  .card:hover, .btn:hover, .btn:hover span, .card--roam:hover .forest__gate path, .card--note:hover .note { transform: none; }
  .screw.spin svg { transform: none; }
}

@media print {
  .nav, .marquee, .fika-band, .footer, .level, .toast, .doc-bar__actions, .doc__fade { display: none !important; }
  body::before { display: none; }
  .doc[data-collapsed="true"] .doc__text { max-height: none; }
}
