/* ==========================================================================
   MASKED HANMA · legal.css — Impressum, Datenschutz, 404
   Quiet reading pages on the same newsprint system.
   ========================================================================== */
.legal-hero {
  position: relative;
  overflow: hidden;
  border-bottom: var(--bw) solid var(--line);
  background: var(--paper-2);
  --tone: rgba(21, 18, 18, 0.12);
}
.legal-hero__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(48px, 7vw, 96px) clamp(28px, 4vw, 48px);
}
.legal-hero h1 { font-size: clamp(2rem, 1rem + 5vw, 4.4rem); text-transform: uppercase; hyphens: manual; }
.legal-hero__inner > div { min-width: 0; }
.legal-hero p { margin-top: 12px; color: var(--muted); }
.legal-hero .hanko { --hanko-size: clamp(3.6rem, 6vw, 5.4rem); --hanko-rot: 6deg; }

.legal {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 46rem);
  gap: clamp(28px, 5vw, 80px);
  padding-block: clamp(40px, 6vw, 88px) clamp(72px, 9vw, 128px);
}
.legal__toc {
  position: sticky;
  top: calc(var(--header-h) + 24px + env(safe-area-inset-top, 0px));
  align-self: start;
  display: grid;
  gap: 6px;
  font-size: var(--t-s);
}
.legal__toc p { margin-bottom: 8px; }
.legal__toc a { text-decoration: none; color: var(--muted); padding: 3px 0 3px 12px; border-left: 3px solid var(--paper-2); }
.legal__toc a:hover { color: var(--fg); border-color: var(--accent); }
.legal__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; min-width: 0; }
.legal__body section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.legal__body h2 {
  font-size: 1.35rem;
  text-transform: uppercase;
  padding-top: 18px;
  border-top: 3px solid var(--line);
  hyphens: auto;
  overflow-wrap: break-word;
}
.legal__body h3 { font-size: 1.05rem; margin-top: 6px; }
.legal__body p, .legal__body li { color: var(--ink-soft); overflow-wrap: anywhere; }
.legal__body ul { display: grid; gap: 6px; padding-left: 1.2em; list-style: square; }
.legal__body a { color: var(--fg); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legal__body strong { color: var(--fg); }
mark.ph {
  background: #ffe38a;
  color: var(--ink);
  padding: 0 0.25em;
  outline: 2px dashed #b48a00;
  outline-offset: 1px;
}
.legal__callout {
  padding: 16px 18px;
  border: 3px solid var(--line);
  background: var(--white);
}

@media (max-width: 860px) {
  .legal { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .legal-hero__inner { flex-wrap: nowrap; align-items: center; }
  .legal-hero .hanko { --hanko-size: 3.2rem; }
  /* table of contents as a swipeable chip row */
  .legal__toc {
    position: static;
    display: flex;
    gap: 8px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 2px var(--gutter) 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .legal__toc::-webkit-scrollbar { display: none; }
  .legal__toc p { display: none; }
  .legal__toc a {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border: 3px solid var(--line);
    background: var(--white);
    color: var(--fg);
    font-weight: 650;
    white-space: nowrap;
  }
}

/* ---------- 404 ---------- */
.ko {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--white);
  border-bottom: var(--bw) solid var(--line);
}
.ko .focus-lines { z-index: -1; }
.ko__inner { display: grid; gap: 18px; justify-items: center; padding: 64px var(--gutter); }
.ko .ko__code { font-family: var(--f-display); font-size: clamp(6rem, 22vw, 16rem); line-height: 0.8; color: var(--red); text-shadow: 0.05em 0.05em 0 var(--ink); }
.ko h1 { font-size: var(--t-xl); text-transform: uppercase; }
.ko .ko__text { color: var(--muted); max-width: 40ch; }
.ko .btn-row { justify-content: center; }
.ko .sfx { position: static; transform: rotate(-8deg); margin-bottom: 8px; --sfx-fill: var(--ink); --sfx-stroke: var(--white); }
