/* Pranvera: "colour chapters". Each of the six steps owns one flat colour,
   used full-bleed wherever that step begins. Tokens and reasons: DESIGN.md. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --ground: #eeeeea;
  --surface: #e2e2dc;
  --surface-2: #d5d5ce;
  --ink: #000000;
  --muted: #56564f;
  --signal: #c8231a;
  --signal-text: #b81f17;
  --on-signal: #ffffff;

  --step-1: #ff7a1f; --step-1-ink: #0a0a0a;
  --step-2: #163a26; --step-2-ink: #f4d96c;
  --step-3: #7cbdf0; --step-3-ink: #0b1620;
  --step-4: #1a2039; --step-4-ink: #f9a3c0;
  --step-5: #e5b21a; --step-5-ink: #0a0a0a;
  --step-6: #3a1830; --step-6-ink: #f2cfc2;

  --kind-lexo: var(--step-3); --kind-lexo-ink: var(--step-3-ink);
  --kind-degjo: var(--step-5); --kind-degjo-ink: var(--step-5-ink);
  --kind-shiko: var(--step-1); --kind-shiko-ink: var(--step-1-ink);

  /* memorial */
  --flame: #ff9f0a;
  --flame-core: #fff4d6;
  --wax: #4a443d;
  --wax-lit: #e2cfb8;

  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --col: 720px;
  --gutter: 20px;
  --edge: max(var(--gutter), calc((100cqw - var(--col)) / 2));   /* column edge, from the page width */
  --section: 72px;

  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='square'/%3E%3C/svg%3E");
  --i-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v14M1 8h14' fill='none' stroke='%23000' stroke-width='2.4'/%3E%3C/svg%3E");
  --i-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 8h14' fill='none' stroke='%23000' stroke-width='2.4'/%3E%3C/svg%3E");
}
@media (min-width: 900px) { :root { --gutter: 40px; --section: 112px; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #151513;
    --surface: #22221f;
    --surface-2: #2e2e2a;
    --ink: #ececE6;
    --muted: #a6a69e;
    --signal-text: #ff6b5e;
  }
}
:root[data-theme="dark"] {
  --ground: #151513;
  --surface: #22221f;
  --surface-2: #2e2e2a;
  --ink: #ececE6;
  --muted: #a6a69e;
  --signal-text: #ff6b5e;
}

/* The step a page belongs to colours its opening field */
[data-step="1"], .c1 { --field: var(--step-1); --field-ink: var(--step-1-ink); }
[data-step="2"], .c2 { --field: var(--step-2); --field-ink: var(--step-2-ink); }
[data-step="3"], .c3 { --field: var(--step-3); --field-ink: var(--step-3-ink); }
[data-step="4"], .c4 { --field: var(--step-4); --field-ink: var(--step-4-ink); }
[data-step="5"], .c5 { --field: var(--step-5); --field-ink: var(--step-5-ink); }
[data-step="6"], .c6 { --field: var(--step-6); --field-ink: var(--step-6-ink); }

/* The memorial is the one page set at night */
body[data-page="kujtim"] {
  --ground: #12100e;
  --surface: #1f1b17;
  --surface-2: #2a241e;
  --ink: #ece6dc;
  --muted: #b3aa9d;
  --signal-text: #ff6b5e;
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 24px; }

body {
  container-type: inline-size;
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.5;
  letter-spacing: -0.005em;
  font-kerning: normal;
}
::selection { background: var(--ink); color: var(--ground); }

h1, h2, h3, h4 { margin: 0; color: inherit; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 9vw, 6.5rem); line-height: 0.92; letter-spacing: -0.045em; }
h2 { margin: var(--section) 0 16px; font-size: clamp(1.75rem, 4.5vw, 2.75rem); line-height: 1; letter-spacing: -0.03em; }
h3 { margin: 40px 0 8px; font-size: 1.5rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
h4 { margin: 0 0 4px; font-size: 1.125rem; font-weight: 700; }
p, li { text-wrap: pretty; }
p { margin: 0 0 16px; }
ul, ol { padding-left: 1.25em; }
li { margin: 6px 0; }
strong { font-weight: 700; }
.lead { font-size: 1.5rem; line-height: 1.3; letter-spacing: -0.015em; }
.muted { color: var(--muted); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.16em;
}
a:hover { text-decoration-thickness: 3px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
input[type="radio"] { accent-color: var(--ink); }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 1001;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 10px; }

/* ---------- Quick exit: always visible, always on top ---------- */
.exit {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  max-width: min(260px, 60vw);
  padding: 8px 16px;
  border: 0;
  border-radius: 0;
  background: var(--signal);
  color: var(--on-signal);
  font: 700 16px/1.1 var(--font);   /* fixed: grows with zoom, never pushes into the page */
  text-align: left;
  cursor: pointer;
}
.exit:hover { background: #a51b13; }
.exit:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.exit small { padding: 1px 6px; background: rgba(255, 255, 255, 0.22); font-size: 12px; font-weight: 700; }
@media (hover: none), (max-width: 600px) { .exit small { display: none; } }

/* ---------- Header: wordmark, the six chapters, menu ---------- */
.top {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px var(--edge) 0;
}
.brand { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1; text-decoration: none; padding: 8px 0; }
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin-left: auto;
  margin-right: max(0px, calc(172px - var(--edge)));   /* room for the exit button */
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 600 1rem/1 var(--font);
  cursor: pointer;
}
@media (min-width: 601px) { .menu-btn { margin-right: max(0px, calc(224px - var(--edge))); } }
.menu-btn svg { width: 22px; height: 22px; flex: none; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }

.chapters {
  order: 3;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  flex: 1 1 100%;
}
.chapters a {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 48px;
  padding: 6px 8px;
  background: var(--field);
  color: var(--field-ink);
  text-decoration: none;
  line-height: 1.1;
}
.chapters b { font-size: 1.25rem; font-weight: 800; }
.chapters span { display: none; font-size: 0.875rem; font-weight: 600; }
.chapters a:hover { text-decoration: underline; }
.chapters a[aria-current] { box-shadow: inset 0 -6px 0 var(--field-ink); }
@media (min-width: 900px) {
  .chapters a { min-height: 76px; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 8px 10px 10px; }
  .chapters span { display: block; }
}

/* Phones: the menu button closes the colour strip as a square */
@media (max-width: 599px) {
  .top { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px 4px; }
  .brand { grid-column: 1 / -1; justify-self: start; }
  .chapters { grid-column: 1; grid-row: 2; }
  .menu-btn { grid-column: 2; grid-row: 2; justify-content: center; margin: 0; padding: 0; background: var(--surface); }
  .menu-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html:not(.js) .nav { grid-column: 1 / -1; }
}

/* Full menu: the six chapters as colour bands, then the other pages */
.nav .list { margin: 0; padding: 0; list-style: none; }
.nav li { margin: 0; }
.nav .steps-list a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px var(--edge);
  background: var(--field);
  color: var(--field-ink);
  font-size: clamp(1.5rem, 6vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-decoration: none;
}
.nav .steps-list b { min-width: 1ch; }
.nav .more-list { padding: 16px var(--edge) 32px; columns: 2 200px; column-gap: 24px; }
.nav .more-list a { display: inline-flex; align-items: center; min-height: 48px; font-size: 1.25rem; font-weight: 600; text-decoration: none; }
.nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 3px; }
.js .nav { display: none; }
.js .nav.open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 900;
  margin-top: 8px;
  background: var(--ground);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}
html:not(.js) .nav { order: 4; flex: 1 1 100%; margin: 8px calc(var(--edge) * -1) 0; }

/* ---------- Emergency line ---------- */
.strip { padding: 14px var(--edge) 18px; }
.strip-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.strip-label { margin: 0; font-weight: 700; }
.strip-numbers { display: flex; flex-wrap: wrap; gap: 0 20px; }
.strip-numbers a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 44px;
  padding: 6px 0;
  color: var(--signal-text);
  text-decoration: none;
}
.strip-numbers a:hover { text-decoration: underline; }
.strip-numbers b { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.strip-numbers small { font-size: 0.9375rem; font-weight: 600; }

/* ---------- Page frame ---------- */
main { padding: 0 var(--edge) 24px; }
main:focus { outline: none; }

/* The opening field, in the colour of the page's step */
main > .hero {
  margin: 0 calc(var(--edge) * -1) 40px;
  padding: 48px var(--edge) 56px;
  background: var(--field, var(--surface));
  color: var(--field-ink, var(--ink));
}
.hero h1 { margin: 0 0 20px; }
.hero .lead { max-width: 34ch; margin: 0; }
.hero a { color: inherit; }
@media (min-width: 900px) { main > .hero { padding-top: 80px; padding-bottom: 88px; } }

.progress { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; font-weight: 600; }
.progress .bar { display: flex; gap: 5px; }
.progress .bar i { display: block; width: 14px; height: 14px; border: 2.5px solid currentColor; }
.progress .bar i.on { background: currentColor; }
.parent-step { margin: 0 0 28px; font-weight: 600; }

/* ---------- Panels ---------- */
.card { margin: 24px 0; padding: 20px 24px; background: var(--surface); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 { margin-top: 0; }
.card.urgent { background: var(--ink); color: var(--ground); }
.tiles { display: grid; gap: 8px; margin: 24px auto; }
@media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tiles > .card { margin: 0; }

/* ---------- Phone numbers: solid blocks ---------- */
.numbers { display: grid; gap: 8px; margin: 20px auto; }
@media (min-width: 560px) { .numbers.two { grid-template-columns: 1fr 1fr; } }
.call {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 104px;
  padding: 16px 20px 18px;
  background: var(--ink);
  color: var(--ground);
  text-decoration: none;
}
.call:hover { text-decoration: none; outline: 3px solid var(--ink); outline-offset: 3px; }
.call .num { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.call .what { font-size: 0.9375rem; line-height: 1.3; }
.call .what strong { display: block; font-size: 1.0625rem; font-weight: 700; }
.call .what span { display: block; opacity: 0.85; }
.call.danger { background: var(--signal); color: var(--on-signal); }
.hero .call { background: var(--field-ink, var(--ink)); color: var(--field, var(--ground)); }
.card.urgent .call:not(.danger) { background: var(--ground); color: var(--ink); }
.card .numbers { margin: 16px 0; }

/* ---------- Rows of links: tone steps, no lines ---------- */
.links, .subpages-list, .org-list { display: grid; gap: 4px; margin: 20px auto; padding: 0; list-style: none; }
.links li, .org-list li { margin: 0; }
.links a, .subpages-list a {
  display: block;
  padding: 16px 20px;
  background: var(--surface);
  text-decoration: none;
}
.links a:hover, .subpages-list a:hover { background: var(--surface-2); }
.links strong, .subpages-list strong { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.16em; }
.links span, .subpages-list span { display: block; margin-top: 2px; color: var(--muted); font-size: 0.9375rem; }
.subpages { margin: 0 auto 8px; }
.subpages-title { margin: 0 0 8px; font-weight: 700; }

.toc { margin: 24px auto; }
.toc-title { margin: 0 0 8px; font-weight: 700; }
.toc ul { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.toc li { margin: 0; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; background: var(--surface); font-weight: 600; text-decoration: none; }
.toc a:hover { background: var(--surface-2); }

/* Previous / next step */
.flow { display: grid; gap: 8px; margin: var(--section) auto 0; }
@media (min-width: 560px) { .flow { grid-template-columns: 1fr 1fr; } .flow .next { grid-column: 2; } }
.flow a { display: block; padding: 18px 20px 20px; background: var(--surface); text-decoration: none; }
.flow a:hover { background: var(--surface-2); }
.flow small { display: block; font-size: 0.9375rem; font-weight: 600; }
.flow strong { display: block; margin-top: 4px; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.flow .next { background: var(--ink); color: var(--ground); }
.flow .next:hover { background: var(--ink); text-decoration: underline; }

/* ---------- Lists inside text ---------- */
ol.steps { margin: 20px auto; padding: 0; list-style: none; counter-reset: step; }
ol.steps > li { position: relative; margin: 0 0 16px; padding-left: 48px; counter-increment: step; }
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.12em;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* The cycle of violence: four stages that come round again */
ol.cycle { display: grid; gap: 4px; margin: 20px auto 8px; padding: 0; list-style: none; }
ol.cycle > li { margin: 0; padding: 14px 20px; background: var(--surface); }
.cycle-again { font-weight: 700; }

ul.check { padding-left: 0; list-style: none; }
ul.check li { position: relative; padding-left: 24px; }
ul.check li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 9px; height: 9px; background: currentColor; }

/* Disclosure panels */
details { margin: 4px auto; padding: 0 20px; background: var(--surface); }
details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--i-plus) center / contain no-repeat;
  mask: var(--i-plus) center / contain no-repeat;
}
details[open] > summary::after { -webkit-mask-image: var(--i-minus); mask-image: var(--i-minus); }
details > summary:hover { text-decoration: underline; }
details > :last-child { margin-bottom: 18px; }
h2 + details, p + details { margin-top: 16px; }

details.group { padding: 0; background: transparent; }
.group > summary { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; letter-spacing: -0.02em; }

.lang { font-size: 0.875rem; color: var(--muted); }
details.sq { margin: 12px 0 0; padding: 0 16px; background: var(--ground); }
details.sq > summary { min-height: 48px; font-size: 1rem; }
details.sq p { font-size: 1rem; }

/* ---------- Organisations ---------- */
.org-list li { padding: 16px 20px; background: var(--surface); }
.org-list .where { display: block; font-size: 0.9375rem; color: var(--muted); }
.org-list strong { font-size: 1.125rem; }
.org-list p { margin: 6px 0; font-size: 1rem; }
.contact { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 4px 0 0; }
.contact a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; overflow-wrap: anywhere; }
.org-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.org-head h3 { margin: 0; }
.city { font-size: 0.9375rem; color: var(--muted); white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.tags span { padding: 3px 10px; background: var(--ground); font-size: 0.875rem; font-weight: 600; }
.src { font-size: 0.9375rem; color: var(--muted); }
.src a { overflow-wrap: anywhere; }

/* ---------- Country and library switch ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 16px auto 24px; }
.tab {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 16px;
  background: var(--surface);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.tab:hover { background: var(--surface-2); }
.tab[aria-current="true"] { background: var(--ink); color: var(--ground); }
.country[hidden], .media-section[hidden], .result[hidden] { display: none; }

/* ---------- Self-check and danger check ---------- */
label.check-item {
  display: flex;
  gap: 16px;
  align-items: center;
  min-height: 60px;
  margin: 4px 0;
  padding: 14px 20px;
  background: var(--surface);
  line-height: 1.35;
  cursor: pointer;
}
label.check-item:hover { background: var(--surface-2); }
label.check-item input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 26px;
  height: 26px;
  margin: 0;
  border: 2.5px solid var(--ink);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
label.check-item input:checked { background: var(--ink); }
label.check-item input:checked::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ground);
  -webkit-mask: var(--i-check) center / 16px no-repeat;
  mask: var(--i-check) center / 16px no-repeat;
}

.result-bar {
  position: sticky;
  bottom: 12px;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  margin: 20px auto;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--ground);
}
.result-bar:empty { display: none; }
.result-bar[data-level="high"], .result-bar[data-level="veryhigh"] { background: var(--signal); color: var(--on-signal); }
.result-bar p { margin: 0; font-weight: 700; }
.result-bar a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

.plain-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font: 700 1rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
}
.plain-btn:hover { background: var(--surface-2); }
.card .plain-btn { background: var(--ground); }

input[type="text"], input[type="email"], textarea, select {
  font: inherit;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
}

/* ---------- Home ---------- */
main.home > .home-hero { padding-top: 56px; background: var(--ground); color: var(--ink); }
.home-hero h1 { font-size: clamp(3.25rem, 15vw, 10rem); line-height: 0.86; letter-spacing: -0.055em; }
.home-hero .lead { max-width: 30ch; }
.home-about { max-width: 52ch; margin: 20px 0 0; font-size: 1.125rem; }
.home-go { margin-top: 12px; }
.home-hero .call-intro { margin: 40px 0 0; font-weight: 700; }
.home-hero .call { background: var(--ink); color: var(--ground); }
.safety-note { max-width: 60ch; margin: 24px 0 0; font-size: 1rem; color: var(--muted); }
.safety-note strong, .safety-note a { color: var(--ink); }
.spring { margin-top: 40px; margin-bottom: var(--section); }
.spring h2 { margin-top: 0; }
.spring-lead { max-width: 30ch; font-size: clamp(1.5rem, 3.6vw, 2.125rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; }
.spring p:last-child { max-width: 52ch; }
.path-title { margin-top: 0; margin-bottom: 24px; }

main > .chapter {
  margin: 0 calc(var(--edge) * -1);
  padding: 56px var(--edge) 64px;
  background: var(--field);
  color: var(--field-ink);
}
@media (min-width: 900px) { main > .chapter { min-height: 70vh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 96px; padding-bottom: 96px; } }
.chapter h2 { margin: 0 0 20px; font-size: clamp(2.5rem, 10vw, 7rem); line-height: 0.92; letter-spacing: -0.045em; }
.chapter-n { display: block; font-size: 0.5em; letter-spacing: -0.03em; }
.chapter p { max-width: 34ch; font-size: 1.375rem; line-height: 1.3; }
.go {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 52px;
  margin-top: 8px;
  padding: 12px 22px;
  background: var(--field-ink, var(--ink));
  color: var(--field, var(--ground));
  font-weight: 700;
  text-decoration: none;
}
.go:hover { text-decoration: underline; }
.hero .go { color: var(--field, var(--ground)); }
.home-more h2 { margin-top: var(--section); }
.faq h2 { margin-top: var(--section); }
.faq-item { margin: 4px 0; padding: 18px 20px 4px; background: var(--surface); }
.faq-item h3 { margin: 0 0 8px; }
.faq-item p { font-size: 1.0625rem; }
.home-memorial {
  margin: var(--section) calc(var(--edge) * -1) 0;
  padding: 64px var(--edge) 72px;
  background: #12100e;
  color: #ece6dc;
}
.home-memorial h2 { margin-top: 0; }
.home-memorial .go { background: #ece6dc; color: #12100e; }

/* ---------- Library ---------- */
.kind { display: inline-block; padding: 2px 10px; font-size: 0.875rem; font-weight: 700; line-height: 1.5; vertical-align: middle; letter-spacing: 0; }
.kind.lexo { background: var(--kind-lexo); color: var(--kind-lexo-ink); }
.kind.degjo { background: var(--kind-degjo); color: var(--kind-degjo-ink); }
.kind.shiko { background: var(--kind-shiko); color: var(--kind-shiko-ink); }
.media-section h2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.media-section h3.group-title { margin: 48px 0 12px; }
.media-item { margin: 4px 0; }
.media-item h3, .media-item h4 { margin: 0 0 4px; font-size: 1.25rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.media-item .meta { margin: 0 0 8px; color: var(--muted); font-size: 0.9375rem; }
.media-choice { display: flex; flex-wrap: wrap; gap: 4px; }
.media-choice a { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; background: var(--surface); font-weight: 700; text-decoration: none; }

/* ---------- Memorial ---------- */
.wall { display: flex; flex-wrap: wrap; gap: 10px 6px; margin: 16px 0 8px; padding: 20px; background: var(--surface); }
.candle { position: relative; display: inline-block; width: 18px; height: 40px; flex: none; }
.candle::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 10px;
  height: 15px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, var(--flame-core) 0, var(--flame) 55%, transparent 100%);
  opacity: 0.4;
}
.candle::after { content: ""; position: absolute; left: 5px; top: 15px; width: 8px; height: 25px; background: var(--wax); }
a.candle { width: 24px; }
a.candle::before { left: 6px; opacity: 1; filter: drop-shadow(0 -1px 5px var(--flame)); }
a.candle::after { left: 7px; background: var(--wax-lit); }
@media (prefers-reduced-motion: no-preference) {
  a.candle::before { animation: flicker 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
  a.candle:nth-child(3n)::before { animation-delay: -1.1s; }
  a.candle:nth-child(3n+1)::before { animation-delay: -2.3s; }
}
@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.06, 0.96) rotate(-2deg); }
  70% { transform: scale(0.97, 1.04) rotate(1.5deg); }
}
.wall-caption { color: var(--muted); font-size: 1rem; }
.story { display: flex; gap: 16px; align-items: flex-start; }
.story .candle { margin-top: 4px; }
.story .candle::before { opacity: 1; }
.story .candle::after { background: var(--wax-lit); }
.story-body { min-width: 0; }
.story h3 { margin: 0; }
.story .meta { color: var(--muted); font-size: 0.9375rem; margin: 2px 0 8px; }
.story:target { background: var(--surface-2); }
.portrait { flex: none; width: 76px; height: 76px; object-fit: cover; }

/* ---------- Templates ---------- */
.template { margin-top: 48px; }
.paper { overflow-x: auto; padding: 20px 24px; background: var(--surface); color: var(--ink); }
.paper p { line-height: 2; overflow-wrap: anywhere; }
.paper ul.check li::before { top: 0.45em; width: 14px; height: 14px; background: transparent; border: 2px solid currentColor; left: 0; }
table.diary { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 1rem; }
table.diary th, table.diary td { border: 1.5px solid var(--muted); padding: 6px; text-align: left; vertical-align: top; }
table.diary td { height: 64px; }

/* ---------- Social media kit ---------- */
.posts { display: grid; gap: 8px; margin: 24px auto; }
@media (min-width: 700px) { .posts { grid-template-columns: 1fr 1fr; } }
.post { margin: 0; padding: 16px; background: var(--surface); }
.post img { display: block; width: 100%; height: auto; }
.post .caption { font-size: 1rem; color: var(--muted); }

/* ---------- Legal pages ---------- */
mark.todo { background: var(--step-5); color: var(--step-5-ink); padding: 0 4px; font-weight: 700; }

/* ---------- Footer: the links, then the name at full width ---------- */
footer { margin-top: var(--section); padding: 0 var(--edge); overflow: hidden; color: var(--ink); font-size: 1rem; }
footer p { max-width: var(--col); margin: 0 0 12px; }
footer p:not(.foot-name) { color: var(--muted); }
footer p.foot-spring { margin-top: 24px; color: var(--ink); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.to-top { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 700; }
.foot-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 24px; max-width: var(--col); margin: 8px 0 24px; padding: 0; list-style: none; }
.foot-links li { margin: 0; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0 0 12px; padding: 0; list-style: none; }
.foot-legal li { margin: 0; }
.foot-legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
footer .foot-name {
  max-width: none;
  margin: 32px 0 -0.14em;
  color: var(--ink);
  font-size: min(18rem, calc((100cqw - 2 * var(--edge)) / 4.3));   /* the whole name fits the column */
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.07em;
  white-space: nowrap;
}

/* ---------- Print: only the content ---------- */
@media print {
  .exit, .skip, .top, .strip, footer, .flow, .menu-btn, .no-print, .toc, .subpages, .progress, .parent-step, .result-bar { display: none !important; }
  body { background: #ffffff; color: #000000; font-size: 11pt; }
  main { padding: 0; }
  main > .hero { margin: 0 0 12pt; padding: 0; background: none; color: #000000; }
  .card, .paper, details, label.check-item { break-inside: avoid; background: #ffffff; color: #000000; border: 1px solid #999999; }
  table.diary th, table.diary td { border-color: #999999; }
  a { color: #000000; }
  body.printing-one main > *:not(.printing) { display: none !important; }
  body.printing-one .template.printing { margin: 0; }
}
