/* The help pages: one answer per page, for a keeper who has just hit a wall in HI-Tier and searched
   for it. Same ground as the start page (the icon's green stage, the register's hairlines), but a
   reading page: the stage shrinks to a header, and what was searched for comes first - the short
   answer, and on an error page the message itself, word for word as HI-Tier shows it. */

@font-face { font-family: "Inter"; src: url("/fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/fonts/InterDisplay-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/fonts/InterDisplay-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --stage-top: #0b5c46;
  --stage: #064e3b;
  --cream: #f8e7c9;
  --cream-muted: #d6d1b3;
  --tag: #f4c20d;
  --tag-ink: #1d1a0e;
  --ground: #f5fbf6;
  --surface: #ffffff;
  --ink: #171d1a;
  --ink-muted: #404944;
  --hairline: #bfc9c3;
  --green: #186b53;
  --answer: #fdf4e3;          /* the icon's cream, let down onto the page */
  --answer-edge: #ead7b2;
  /* The two weights a HI-Tier message comes in. Material's static error red, the ear tag's amber. */
  --refused: #ba1a1a;
  --refused-soft: #ffdad6;
  --warned: #8a6400;
  --warned-soft: #fbedc4;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 1160px;
  --read: 42rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0f1512;
    --surface: #171d1a;
    --ink: #dee4df;
    --ink-muted: #bfc9c3;
    --hairline: #3a4540;
    --green: #89d6b8;
    --answer: #1e2620;
    --answer-edge: #3d4a3f;
    --refused: #ffb4ab;
    --refused-soft: #3b1512;
    --warned: #f0c54e;
    --warned-soft: #2f2710;
  }
}

* { box-sizing: border-box; }
html { background: var(--stage); -webkit-text-size-adjust: 100%; scrollbar-color: var(--green) var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--tag); color: var(--tag-ink); }
a { color: var(--green); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
h1, h2, h3 { font-family: "Inter Display", "Inter", -apple-system, sans-serif; text-wrap: balance; margin: 0; }
/* HI-Tier's wording has words longer than a phone is wide ("Zugangs-/Entstehungsmeldung"): break
   them rather than run off the edge - at the slash first, by hyphenation where the language allows. */
h1, h2, h3 { overflow-wrap: anywhere; hyphens: auto; }
p { margin: 0; text-wrap: pretty; }

/* ---------- Header: the stage, shrunk to a band ---------- */
.stage {
  background: linear-gradient(var(--stage-top), var(--stage));
  color: var(--cream);
  padding-bottom: clamp(36px, 6vw, 64px);
}
.stage a { color: var(--cream); }
.stage :focus-visible { outline-color: var(--cream); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 700 21px/1 "Inter Display", "Inter", sans-serif; letter-spacing: -0.01em; }
.brand svg { width: 34px; height: 34px; flex: none; }
.topbar nav { display: flex; gap: 22px; font-size: 15px; }
.topbar nav a { text-decoration: none; color: var(--cream-muted); }
.topbar nav a:hover, .topbar nav a[aria-current] { color: var(--cream); }
.topbar nav a[aria-current] { text-decoration: underline; text-underline-offset: 0.35em; }

.crumbs { margin-top: clamp(12px, 3vw, 28px); font-size: 14px; color: var(--cream-muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; padding: 0 8px; opacity: 0.7; }
.crumbs a { color: var(--cream-muted); text-decoration: none; }
.crumbs a:hover { color: var(--cream); text-decoration: underline; }

.stage h1 {
  margin-top: 14px;
  font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 17em;
}
.stage .lead { margin-top: 16px; font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 34em; color: var(--cream-muted); }
/* An error page's title is the number first: that is what the screen showed. */
.stage h1 .no { display: block; font: 600 0.42em/1.2 "Inter", sans-serif; letter-spacing: 0; color: var(--cream-muted); font-variant-numeric: tabular-nums; margin-bottom: 8px; }

/* ---------- The page: a reading column and a rail ---------- */
.page {
  display: grid;
  grid-template-columns: minmax(0, var(--read)) minmax(240px, 300px);
  justify-content: space-between;
  gap: 48px clamp(32px, 6vw, 96px);
  padding-top: clamp(32px, 5vw, 56px);
  padding-bottom: clamp(64px, 8vw, 104px);
}
article > * + * { margin-top: 20px; }
article h2 {
  margin-top: 52px;
  font-weight: 700;
  font-size: clamp(1.45rem, 2.2vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
article h3 { margin-top: 32px; font: 600 1.1rem/1.35 "Inter", sans-serif; }
article h2 + *, article h3 + * { margin-top: 12px; }
article ul { padding-left: 1.2em; }
article li + li { margin-top: 6px; }
article strong { font-weight: 600; }

/* The short answer: what a search snippet would quote, and all most visitors need. */
.answer {
  background: var(--answer);
  border: 1px solid var(--answer-edge);
  border-radius: 14px;
  padding: 20px 24px 22px;
}
.answer .label { display: block; font: 600 13px/1.2 "Inter", sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
.answer p { font-size: 1.12rem; line-height: 1.55; }
.answer p + p { margin-top: 10px; font-size: 1rem; color: var(--ink-muted); }

/* The message, as HI-Tier showed it. Not a screenshot of HI-Tier (no logo, no layout of theirs):
   the words and the number, which is what people type into a search. */
.message {
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  overflow: hidden;
}
.message .head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  padding: 10px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--hairline);
}
.message .head .no { font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.message .weight { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.message .weight::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.message.refused .head { background: var(--refused-soft); }
.message.refused .weight { color: var(--refused); }
.message.warned .head { background: var(--warned-soft); }
.message.warned .weight { color: var(--warned); }
.message blockquote {
  margin: 0;
  padding: 16px 16px 18px;
  font: 500 1.08rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: -0.01em;
}
.message.asked .head { background: var(--refused-soft); }
.message.asked .weight { color: var(--refused); }
.message.info .head, .message.open .head { background: var(--answer); }
.message.info .weight, .message.open .weight { color: var(--green); }
.message .variant { padding: 0 16px 14px; margin-top: -6px; font-size: 14px; color: var(--ink-muted); }
.message .variant q { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.message .also { border-top: 1px solid var(--hairline); padding: 10px 16px 12px; font-size: 14px; color: var(--ink-muted); }
.message .also ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 3px; }
.message .also li { margin: 0; }
.message .also b { display: inline-block; min-width: 3.4em; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.message .copy { font: inherit; font-size: 13px; color: var(--green); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }

/* Steps: numbered, the number big enough to find your place again after a look at the other screen. */
.steps { list-style: none; padding: 0; counter-reset: step; border-top: 1px solid var(--hairline); }
.steps > li {
  counter-increment: step;
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 4px 12px;
  padding: 16px 0 17px;
  border-bottom: 1px solid var(--hairline);
  margin: 0;
}
.steps > li::before {
  content: counter(step);
  font: 700 1.5rem/1.1 "Inter Display", "Inter", sans-serif;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.steps > li > * { grid-column: 2; }
.steps > li > :first-child { grid-row: 1; }
.steps strong { display: block; font-size: 1.04rem; }
.steps span { color: var(--ink-muted); }

/* Causes on an error page: the register grammar of the start page, a term and what it means. */
.rows { list-style: none; padding: 0; border-top: 1px solid var(--hairline); }
.rows li { display: grid; grid-template-columns: minmax(9em, 0.4fr) minmax(0, 1fr); gap: 4px 24px; padding: 14px 0 15px; border-bottom: 1px solid var(--hairline); margin: 0; }
.rows strong { font-weight: 600; }
.rows span { color: var(--ink-muted); }

/* Where it differs by state. */
.states { width: 100%; border-collapse: collapse; font-size: 15px; }
.states th, .states td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hairline); }
.states thead th { font-weight: 600; color: var(--ink-muted); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; border-bottom-color: var(--ink-muted); }
.states tbody th { font-weight: 600; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

.aside-note { font-size: 15px; color: var(--ink-muted); border-left: 3px solid var(--hairline); padding: 2px 0 2px 14px; }

/* Sources and the date: a page about legal duties is only worth what it can point to. */
.sources { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--hairline); font-size: 15px; color: var(--ink-muted); }
.sources h2 { margin: 0 0 10px; font: 600 15px/1.3 "Inter", sans-serif; letter-spacing: 0.01em; color: var(--ink); }
.sources ol { margin: 0; padding-left: 1.3em; }
.sources li + li { margin-top: 6px; }
.sources a { word-break: break-word; }
.sources .checked { margin-top: 16px; }

/* ---------- Rail ---------- */
.rail { display: grid; gap: 28px; align-content: start; position: sticky; top: 24px; }
.rail h2 { font: 600 13px/1.2 "Inter", sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.rail .related { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--hairline); font-size: 15px; }
.rail .related li { border-bottom: 1px solid var(--hairline); }
.rail .related a { display: block; padding: 10px 0; text-decoration: none; color: var(--ink); }
.rail .related a:hover { color: var(--green); }

/* Peku, offered once and plainly: what the app does about this very problem. */
.peku {
  background: linear-gradient(var(--stage-top), var(--stage));
  color: var(--cream);
  border-radius: 16px;
  padding: 20px 20px 22px;
}
/* Opened from inside the app (?app=1): no advertising the app it was opened from. */
.in-app .peku { display: none; }
.peku .mark { display: flex; align-items: center; gap: 10px; font: 700 17px/1 "Inter Display", "Inter", sans-serif; }
.peku .mark svg { width: 26px; height: 26px; }
.peku p { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--cream-muted); }
.peku p strong { color: var(--cream); font-weight: 600; }
.peku .stores { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; }
.peku .stores a { display: block; line-height: 0; }
.peku .stores .app-store img { height: 40px; width: auto; }
.peku .stores .google-play img { height: 54px; width: auto; margin: -7px -5px; }
.peku :focus-visible { outline-color: var(--cream); }

/* ---------- The hub ---------- */
.find { margin-top: 28px; max-width: 34rem; position: relative; }
.find input {
  width: 100%;
  font: 400 17px/1.3 "Inter", sans-serif;
  padding: 15px 18px 15px 46px;
  border-radius: 12px;
  border: 1px solid rgba(248, 231, 201, 0.35);
  background: rgba(248, 231, 201, 0.1);
  color: var(--cream);
}
.find input::placeholder { color: var(--cream-muted); opacity: 0.85; }
.find input:focus { outline: 2px solid var(--cream); outline-offset: 2px; background: rgba(248, 231, 201, 0.16); }
.find svg { position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; stroke: var(--cream-muted); pointer-events: none; }
.find .hint { margin-top: 10px; font-size: 14px; color: var(--cream-muted); }

.topics { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(64px, 8vw, 104px); display: grid; gap: 56px; }
.topic { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 16px clamp(32px, 6vw, 96px); align-items: start; }
.topic h2 { font-weight: 700; font-size: clamp(1.45rem, 2.2vw, 1.8rem); line-height: 1.15; letter-spacing: -0.02em; }
.topic > div > p { margin-top: 10px; color: var(--ink-muted); font-size: 15px; }
.qs { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--hairline); }
.qs li { border-bottom: 1px solid var(--hairline); }
.qs a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 16px; padding: 14px 0 15px; text-decoration: none; color: var(--ink); }
.qs a:hover strong { color: var(--green); }
.qs a::after { content: "›"; color: var(--ink-muted); grid-column: 2; grid-row: 1; }
.qs strong { font-weight: 600; font-size: 1.04rem; }
.qs span { grid-column: 1; color: var(--ink-muted); font-size: 15px; }
/* An error is found by its number: the number leads, in its own column. */
.qs.errors a { grid-template-columns: 3.6rem minmax(0, 1fr) auto; }
.qs.errors a::after { grid-column: 3; }
.qs.errors .no { grid-row: 1 / span 2; font: 700 1.05rem/1.4 "Inter Display", "Inter", sans-serif; font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.qs.errors .no.refused { color: var(--refused); }
.qs.errors .no.warned { color: var(--warned); }
.qs.errors .no.asked { color: var(--refused); }
.qs.errors .no.info, .qs.errors .no.open { color: var(--green); }
.qs.errors span { grid-column: 2; }
.none { color: var(--ink-muted); }
[hidden] { display: none !important; }

/* ---------- Footer ---------- */
.foot { background: linear-gradient(var(--stage-top), var(--stage)); color: var(--cream-muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-top: 28px; padding-bottom: 32px; font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--cream-muted); }
.foot a:hover { color: var(--cream); }
.foot p { max-width: 38em; }

/* ---------- Narrow ---------- */
@media (max-width: 880px) {
  .page { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .topic { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  /* A wide table becomes one block per row, each cell under its column's name. */
  .states.stack thead { display: none; }
  .states.stack tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
  .states.stack th, .states.stack td { display: block; border: 0; padding: 2px 0; white-space: normal; }
  .states.stack tbody th { font-size: 16px; margin-bottom: 4px; }
  .states.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-muted); font-weight: 600; }
  .rows li { grid-template-columns: 1fr; }
  .answer { padding: 16px 18px 18px; }
}
@media print {
  .stage, .foot, .rail .peku { background: none; color: #000; }
  .stage a, .stage h1, .stage .lead, .crumbs { color: #000; }
  .topbar nav, .find { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
