/* Mein Steuerhelfer landing page.
   Idea: the German tax form, translated. White paper; the pale green of German income tax forms for whatever
   is "the form"; pen blue for whatever a person adds to it (entries, the result stamp, links, buttons).
   German form words are set in a DIN face, the lettering of German signs and standards, wherever the device
   has one. No font files and nothing from other servers: the page promises that nothing leaves the device. */
:root {
  /* layout: one left edge inside 72rem; the estimate is a tinted form sheet beside the headline;
     every other section is plain text on paper, separated by a printed rule */
  --paper: #ffffff;
  --tint: #e7f1e1;   /* form paper */
  --rule: #b9d4ad;   /* printed rules */
  --field: #5f8f6b;  /* box borders that have to be seen */
  --print: #2b6a3f;  /* printed form ink */
  --pen: #1c3fa8;    /* written or stamped by a person */
  --pen-dark: #152f80;
  --alert: #b3261e;
  --text: #18241c;
  --muted: #55645a;
  --display: "DIN Alternate", Bahnschrift, "DIN Next LT Pro", "sans-serif-condensed", "Fira Sans", "Helvetica Neue", Arial, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Fira Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--text); font: 1.0625rem/1.55 var(--body); }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.12; text-wrap: balance; }
p { margin: 0; }
a { color: var(--pen); text-underline-offset: 0.2em; }
[id] { scroll-margin-top: 1rem; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }
.wrap { width: min(100% - 2 * var(--gutter), 72rem); margin-inline: auto; }
.note { font-size: 0.875rem; line-height: 1.45; color: var(--muted); }

.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 2; padding: 0.5rem 0.8rem; background: var(--paper); border: 2px solid var(--pen); border-radius: 3px; font-weight: 600; }
.skip:focus { top: 0.5rem; }

/* ---- header ---- */
.top { border-bottom: 1px solid var(--rule); }
.top__in { display: flex; align-items: center; gap: 0.75rem 2rem; padding-block: 0.85rem; }
.brand { display: grid; gap: 0.1rem; color: inherit; text-decoration: none; }
.brand__name { font: 700 1.3125rem/1.1 var(--display); color: var(--print); }
.brand__gloss { font-size: 0.8125rem; line-height: 1.2; font-style: italic; color: var(--muted); }
.nav { display: flex; gap: 1.6rem; margin-left: auto; font-size: 0.9375rem; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.lang { padding: 0.3rem 0.75rem; font: 700 0.9375rem/1.3 var(--display); color: var(--pen); text-decoration: none; border: 1px solid currentColor; border-radius: 3px; }
.lang:hover { background: var(--pen); color: var(--paper); }

/* ---- hero: a dictionary headword, then the headline beside the form ---- */
.hero { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2.5rem, 6vw, 5rem); }
.headword { font: 700 clamp(1.25rem, 5.6vw, 4rem)/1.02 var(--display); letter-spacing: -0.005em; color: var(--print); hyphens: manual; overflow-wrap: break-word; }
.entry { margin-top: 0.5rem; font-size: 0.9375rem; font-style: italic; color: var(--muted); }
.entry__syllables { margin-right: 0.4rem; font: 700 0.9375rem/1.3 var(--display); font-style: normal; letter-spacing: 0.03em; color: var(--print); }
.hero__grid { display: grid; gap: 1.5rem clamp(1.75rem, 4vw, 3.5rem); align-items: start; margin-top: clamp(1.5rem, 3.5vw, 2.75rem); }
.hero__text, .outcome { min-width: 0; max-width: 34rem; }
h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); letter-spacing: -0.01em; }
.lead { margin-top: 1rem; font-size: 1.3125rem; line-height: 1.4; }
.hero__note { margin-top: 1.1rem; font-weight: 600; }
.outcome { display: grid; gap: 1rem; }
.outcome__noscript { font-weight: 600; }
.hero__stat { font-size: 0.875rem; line-height: 1.45; color: var(--muted); }

/* ---- the form sheet ---- */
.sheet { min-width: 0; background: var(--tint); border: 1px solid var(--rule); border-radius: 4px; }
.sheet__band { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.9rem; padding: 0.6rem 1rem; color: #fff; background: var(--print); border-radius: 3px 3px 0 0; }
.sheet__form { font: 700 1.3125rem/1.15 var(--display); }
.sheet__formtitle { font-size: 0.875rem; line-height: 1.35; }
.sheet__gloss { font-style: italic; }
.sheet__gloss::before { content: "\00b7\00a0"; font-style: normal; }
.sheet__body { padding: 1.1rem 1rem 1.25rem; }
.sheet h2 { font-size: 1.75rem; }
.sheet__sub { margin: 0.3rem 0 1rem; font-size: 0.9375rem; }

.line { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) minmax(0, 11.5rem); gap: 0.35rem 0.75rem; align-items: start; padding-block: 0.75rem; border-top: 1px solid var(--rule); }
.line__no { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-top: 0.1rem; font: 700 0.8125rem/1 var(--display); font-variant-numeric: tabular-nums; color: var(--print); background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; }
.line__text, .line__field { min-width: 0; }
.term { display: block; font: 700 0.8125rem/1.3 var(--display); letter-spacing: 0.02em; color: var(--print); }
.line label, .line__label { display: block; font-weight: 600; line-height: 1.3; }
.hint { margin-top: 0.25rem; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }
.error { grid-column: 2 / -1; font-size: 0.875rem; font-weight: 600; line-height: 1.4; color: var(--alert); }
.error--form { margin-bottom: 0.75rem; }
[hidden] { display: none !important; }

.sheet input[type="text"], .sheet select { width: 100%; min-height: 2.75rem; padding: 0.5rem 0.65rem; font: 600 1.0625rem/1.2 var(--body); font-variant-numeric: tabular-nums; color: var(--pen); background: var(--paper); border: 1px solid var(--field); border-radius: 3px; }
.sheet input[aria-invalid="true"], .sheet select[aria-invalid="true"] { border: 2px solid var(--alert); }
.money { position: relative; display: block; }
.money input { text-align: right; }
.sheet .money--eur input { padding-right: 1.9rem; }
.sheet .money--km input { padding-right: 2.7rem; }
.unit { position: absolute; right: 0.7rem; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--muted); pointer-events: none; }
.line--days .line__field { grid-column: 2 / -1; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; align-items: end; }
.line .pair__item { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.pair__item select { margin-top: 0.25rem; }
.line .check { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.2rem; }
.check input { width: 1.3rem; height: 1.3rem; margin: 0; accent-color: var(--pen); }

.more { border-top: 1px solid var(--rule); }
.more > summary { padding: 0.8rem 0; font-weight: 600; color: var(--pen); cursor: pointer; }
.more[open] > summary { padding-bottom: 0.6rem; }

.btn { display: block; width: 100%; min-height: 3.1rem; margin-top: 0.4rem; padding: 0.75rem 1.5rem; font: 700 1.1875rem/1.2 var(--display); letter-spacing: 0.01em; color: #fff; background: var(--pen); border: 0; border-radius: 3px; cursor: pointer; }
.btn:hover { background: var(--pen-dark); }
.btn:focus-visible { outline-color: var(--text); }

/* ---- the result: a slip torn off the form ---- */
.result:empty { display: none; }
.result { padding: 1.1rem 1rem 1.25rem; background: var(--tint); border: 1px solid var(--rule); border-top: 2px dashed var(--print); border-radius: 0 0 4px 4px; }
.result__inner { display: grid; gap: 0.85rem; }
.result__example { font-size: 0.875rem; font-weight: 600; line-height: 1.45; }
.stamp { justify-self: start; display: grid; gap: 0.2rem; margin: 0.35rem 0 0.25rem 0.3rem; padding: 0.6rem 1.1rem 0.65rem; font-family: var(--display); font-weight: 700; color: var(--pen); background: rgba(255, 255, 255, 0.6); border: 3px solid currentColor; border-radius: 7px; outline: 1px solid currentColor; outline-offset: -7px; transform: rotate(-2.5deg); }
.stamp__label { font-size: 0.9375rem; line-height: 1.2; letter-spacing: 0.04em; }
.stamp__amount { font-size: clamp(2.5rem, 9vw, 3.5rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stamp--press { animation: press 0.3s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
@keyframes press {
  0% { opacity: 0; transform: rotate(-2.5deg) scale(1.45); }
  65% { opacity: 1; transform: rotate(-2.5deg) scale(0.97); }
  100% { opacity: 1; transform: rotate(-2.5deg) scale(1); }
}
.result__title { font-size: 1.3125rem; }
.result__line:first-of-type { font-weight: 600; }
.slip { margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.slip__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.35rem 0; border-top: 1px dotted var(--field); }
.slip__row:first-child { border-top: 0; }
.slip__row dd, .slip__value { margin: 0; font-weight: 600; white-space: nowrap; }
.slip__row--total { font-weight: 700; border-top: 1px solid var(--text); border-bottom: 3px double var(--text); }
.slip__row--total dd { font-weight: 700; }
.notice { padding: 0.6rem 0.8rem; font-weight: 600; line-height: 1.4; background: var(--paper); border-left: 4px solid var(--alert); }
.result__hint { padding: 0.55rem 0.8rem; line-height: 1.4; background: var(--paper); border-left: 4px solid var(--pen); }

/* ---- every line that moves the number, explained ---- */
.why:empty { display: none; }
.why { margin-top: clamp(1.75rem, 4vw, 3rem); padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.why__title { font-size: 1.75rem; }
.why__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); column-gap: clamp(2rem, 5vw, 4.5rem); margin: 1rem 0 0; padding: 0; list-style: none; }
.why__item { padding: 0.9rem 0 1rem; border-top: 1px solid var(--rule); }
.why__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.why__label { display: block; font-weight: 600; line-height: 1.3; }
.why__amount { font: 700 1.3125rem/1.2 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.why__text { max-width: 58ch; margin-top: 0.35rem; font-size: 0.9375rem; line-height: 1.5; }
.why .note { margin-top: 0.9rem; }
.why__item .slip { max-width: 26rem; margin-top: 0.5rem; font-size: 0.9375rem; }

/* ---- sections ---- */
.section { padding-block: clamp(2.75rem, 6vw, 5rem); border-top: 1px solid var(--rule); }
.section h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
.section h3 { font-size: 1.3125rem; }
.section__lead { max-width: 62ch; margin-top: 0.8rem; font-size: 1.1875rem; line-height: 1.5; }
.section .note { max-width: 62ch; margin-top: 1rem; }

.words { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); column-gap: clamp(2rem, 5vw, 4.5rem); margin: 2rem 0 0; }
.word { padding: 1.1rem 0 1.25rem; border-top: 1px solid var(--rule); }
.word dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.7rem; }
.word__term { font: 700 1.4375rem/1.15 var(--display); color: var(--print); }
.word__gloss { font-style: italic; color: var(--muted); }
.word dd { max-width: 54ch; margin: 0.45rem 0 0; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3rem); margin: 2rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.step { padding-top: 0.9rem; border-top: 3px solid var(--print); counter-increment: step; }
.step::before { content: counter(step); display: block; margin-bottom: 0.5rem; font: 700 2.25rem/1 var(--display); color: var(--print); }
.step p { margin-top: 0.5rem; }
.step .chip { display: inline-block; margin-top: 0.85rem; padding: 0.15rem 0.6rem; font: 700 0.8125rem/1.45 var(--display); letter-spacing: 0.03em; border: 1px solid currentColor; border-radius: 3px; }
.chip--live { color: var(--pen); }
.chip--building { color: var(--muted); border-style: dashed; }

.fees { max-width: 54rem; margin: 2rem 0 0; padding: 0; list-style: none; border-top: 3px solid var(--print); }
.fee { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.3rem 2rem; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.fee h3 { font: 600 1.0625rem/1.35 var(--body); text-wrap: pretty; }
.fee__what p { max-width: 58ch; margin-top: 0.2rem; font-size: 0.9375rem; color: var(--muted); }
.fee__price { text-align: right; white-space: nowrap; }
.fee__amount { font: 700 1.75rem/1 var(--display); font-variant-numeric: tabular-nums; }
.fee__once { display: block; font-size: 0.8125rem; color: var(--muted); }

.twolists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 2rem clamp(2rem, 5vw, 4.5rem); margin-top: 1.75rem; }
.marks { display: grid; gap: 0.7rem; margin: 0.8rem 0 0; padding: 0; list-style: none; }
.marks li { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr); gap: 0.6rem; max-width: 52ch; }
.marks li::before { font-weight: 700; }
.marks--yes li::before { content: "\2713"; color: var(--print); }
.marks--no li::before { content: "\2715"; color: var(--alert); }

.faq { max-width: 46rem; margin-top: 1.5rem; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { padding: 0.9rem 0; font: 700 1.1875rem/1.3 var(--display); cursor: pointer; }
.faq summary::marker { color: var(--print); }
.faq details p { max-width: 62ch; margin: 0 0 1.15rem; }

.section__more { margin-top: 1.5rem; font-weight: 600; }

/* ---- the checklist: every question, its effect and its rule ---- */
.check { padding-block: clamp(2rem, 5vw, 4rem); }
.check h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); letter-spacing: -0.01em; }
.check .note, #checklist .note { max-width: 62ch; margin-top: 0.8rem; }
.topics { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 1.4rem 0 0; padding: 0; list-style: none; font-weight: 600; }
.topic { padding-top: clamp(2rem, 4vw, 3rem); }
.topic__title { padding-bottom: 0.6rem; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); border-bottom: 3px solid var(--print); }
.ask { max-width: 50rem; padding: 1.2rem 0 1.3rem; border-bottom: 1px solid var(--rule); }
.ask__term { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.8rem; font: 700 1.1875rem/1.2 var(--display); color: var(--print); }
.ask__form { font: 400 0.8125rem/1.3 var(--body); color: var(--muted); }
.ask .ask__q { margin-top: 0.35rem; font: 600 1.1875rem/1.35 var(--body); text-wrap: pretty; }
.ask__facts { display: grid; gap: 0.6rem; margin: 0.7rem 0 0; }
.ask__facts dt { font: 700 0.8125rem/1.3 var(--display); letter-spacing: 0.02em; color: var(--muted); }
.ask__facts dd { max-width: 64ch; margin: 0.1rem 0 0; }

/* ---- footer, legal page, preview bar ---- */
.foot { padding-block: 2rem 2.5rem; font-size: 0.9375rem; background: var(--tint); border-top: 1px solid var(--rule); }
.foot__in { display: grid; gap: 0.9rem; }
.foot__claim { max-width: 62ch; font-weight: 600; }
.foot__legal { display: grid; gap: 0.6rem; max-width: 62ch; padding-top: 1rem; border-top: 1px solid var(--rule); }
.foot__legal h2 { font-size: 1.0625rem; }
.legal { display: grid; gap: 1rem; max-width: 44rem; padding-block: clamp(2rem, 5vw, 4rem); }
.legal h1 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
.previewbar { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem var(--gutter); font-size: 0.875rem; color: #fff; background: var(--text); }
.previewbar span { margin-right: 0.4rem; }
.previewbar button { padding: 0.15rem 0.7rem; font: inherit; color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, 0.65); border-radius: 3px; cursor: pointer; }
.previewbar button[aria-pressed="true"] { color: var(--text); background: #fff; border-color: #fff; }
.previewbar button:focus-visible { outline-color: #fff; }

/* ---- wider and narrower screens ---- */
@media (min-width: 60rem) {
  /* the result stays beside the form while the lines are filled in */
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto 1fr; grid-template-areas: "text sheet" "outcome sheet"; }
  .hero__text { grid-area: text; }
  .sheet { grid-area: sheet; }
  .outcome { grid-area: outcome; position: sticky; top: 1.25rem; }
}
@media (max-width: 52rem) {
  .nav { display: none; }
  .lang { margin-left: auto; }
}
@media (max-width: 34rem) {
  .line { grid-template-columns: 1.6rem minmax(0, 1fr); }
  .line__field { grid-column: 2; }
  .fee { grid-template-columns: minmax(0, 1fr); }
  .fee__price { text-align: left; }
  .fee__once { display: inline; margin-left: 0.4rem; }
  .lead { font-size: 1.1875rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stamp--press { animation: none; }
}
