/* mindestlohn-2027.de – „Die Stunde“
   Big Shoulders Display (schmal, Schilder- und Stempeluhr-Anmutung) für Überschriften und Zahlen, Work Sans für Text.
   Graphit und Signalgelb. Ein Merkmal: die 60-Minuten-Uhr, die zeigt, wie viel von jeder Arbeitsstunde netto bleibt. */

@font-face {
  font-family: "Big Shoulders"; src: url("/fonts/big-shoulders-var.woff2") format("woff2");
  font-weight: 600 900; font-display: swap;
}
@font-face {
  font-family: "Work Sans"; src: url("/fonts/work-sans-var.woff2") format("woff2");
  font-weight: 400 700; font-display: swap;
}
@font-face {
  font-family: "Work Sans Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 108%; ascent-override: 86%; descent-override: 23%;
}

:root {
  --tinte-l: #23272e;   --tinte-d: #eceef1;
  --leise-l: #5b616b;   --leise-d: #a9afb9;
  --papier-l: #f4f5f4;  --papier-d: #15171b;
  --flaeche-l: #ffffff; --flaeche-d: #1e2127;
  --linie-l: #dcdfe3;   --linie-d: #30343c;
  --gelb-l: #ffcd1f;    --gelb-d: #ffd23f;
  --gelb-tief-l: #8a6400; --gelb-tief-d: #ffd23f;
  --link-l: #1f5a96;    --link-d: #8fbcf0;
  --grau-l: #c3c8cf;    --grau-d: #4a505a;
  --minus-l: #b42318;   --minus-d: #ff9d92;
  --plus-l: #11784a;    --plus-d: #74d6a4;
  --fehler-bg-l: #fcebea; --fehler-bg-d: #3a1f22;

  --tinte: var(--tinte-l); --leise: var(--leise-l); --papier: var(--papier-l); --flaeche: var(--flaeche-l);
  --linie: var(--linie-l); --gelb: var(--gelb-l); --gelb-tief: var(--gelb-tief-l); --link: var(--link-l); --grau: var(--grau-l);
  --minus: var(--minus-l); --plus: var(--plus-l); --fehler-bg: var(--fehler-bg-l);
  --logo-bg: #23272e; --logo-fg: #ffffff; --logo-flame: #ffcd1f;

  @media (prefers-color-scheme: dark) {
    --tinte: var(--tinte-d); --leise: var(--leise-d); --papier: var(--papier-d); --flaeche: var(--flaeche-d);
    --linie: var(--linie-d); --gelb: var(--gelb-d); --gelb-tief: var(--gelb-tief-d); --link: var(--link-d); --grau: var(--grau-d);
    --minus: var(--minus-d); --plus: var(--plus-d); --fehler-bg: var(--fehler-bg-d);
    --logo-bg: #ffcd1f; --logo-fg: #23272e; --logo-flame: #23272e;
  }

  --s-0: 1.125rem;
  --s-1: 1.406rem;
  --s-2: clamp(1.9rem, 1.6rem + 1vw, 2.3rem);
  --s-3: clamp(2.6rem, 1.9rem + 3vw, 3.8rem);
  --mass: 68ch;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --display: "Big Shoulders", "Arial Narrow", sans-serif;

  color-scheme: light dark;
  accent-color: var(--tinte);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Work Sans", "Work Sans Fallback", system-ui, sans-serif;
  font-size: var(--s-0);
  font-weight: 400;
  line-height: 1.6;
  color: var(--tinte);
  background: var(--papier);
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: .07em; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { a:hover { color: var(--tinte); } }
a, button, summary, select, label { touch-action: manipulation; }
h1, h2, h3, .brand, nav.main, th, .netto-betrag { hyphens: manual; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--flaeche); padding: .5rem 1rem; z-index: 10; }

.wrap { max-width: 74rem; margin: 0 auto; padding: 0 1.5rem; }

header.site { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-block: .9rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: .01em; color: var(--tinte); text-decoration: none; }
.brand .logo { inline-size: 2.1rem; block-size: 2.1rem; flex: none; }
nav.main ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.3rem; font-size: 1.02rem; }
nav.main a { color: var(--tinte); text-decoration: none; text-underline-offset: .45em; text-decoration-thickness: 2px; }
@media (hover: hover) and (pointer: fine) { nav.main a:hover { color: var(--link); } }
nav.main a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--link); font-weight: 650; }

main { padding: 1.5rem 0 4rem; }
main .wrap > * { max-width: var(--mass); }
main .wrap > :is(.rechner, .breit) { max-width: none; }
main .wrap > .table-wrapper { max-width: 62rem; }
h1 { font-family: var(--display); font-size: var(--s-3); line-height: 1; font-weight: 850; letter-spacing: .005em; margin: .6rem 0 .8rem; text-wrap: balance; }
h2 { font-family: var(--display); font-size: var(--s-2); line-height: 1.1; font-weight: 800; letter-spacing: .01em; margin: 2.8rem 0 .7rem; text-wrap: balance; }
h3 { font-size: var(--s-1); line-height: 1.3; font-weight: 600; margin: 2rem 0 .4rem; }
p, li { text-wrap: pretty; }
.lead { font-size: var(--s-1); line-height: 1.45; color: var(--leise); margin-top: 0; hyphens: manual; }
.breadcrumb { font-size: .98rem; color: var(--leise); margin-top: .5rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "›"; margin: 0 .5rem; }
.stand { font-size: .98rem; color: var(--leise); margin-top: 3rem; }
.note { border-left: 3px solid var(--gelb); padding: .1rem 0 .1rem 1.1rem; margin: 2rem 0; }
.note p { margin: .4rem 0; }
.sources li { margin: .4rem 0; }
.links-raster { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .35rem 1.2rem; max-width: none; }
.links-raster a { font-weight: 550; }
.weiter { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 2rem; }

/* ── Rechner: Formular links, Ergebnis rechts ── */
.rechner { display: grid; gap: 2rem; align-items: start; margin-block: 1.2rem 2.5rem; }
@media (width >= 60rem) {
  .rechner { grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); gap: 3rem; }
  .rechner #result { position: sticky; top: 1.5rem; }
}
form.calc { background: var(--flaeche); border: 1px solid var(--linie); padding: 1.3rem 1.4rem 1.5rem; border-radius: .75rem; }
form.calc .feld, form.calc fieldset, form.calc .check { margin-top: 1.05rem; }
form.calc > .feld:first-of-type { margin-top: 0; }
form.calc label, form.calc legend { font-weight: 600; }
form.calc .feld > label { display: block; }
form.calc .hint { display: block; color: var(--leise); font-size: .93rem; line-height: 1.4; }
form.calc fieldset { border: 0; padding: 0; margin-inline: 0; min-inline-size: 0; }
form.calc legend { padding: 0; margin-bottom: .3rem; }
.eingabe { position: relative; display: block; margin-top: .3rem; }
.eingabe input { font: inherit; font-weight: 600; inline-size: 100%; padding: .55rem 2.2rem .55rem .7rem;
  border: 2px solid var(--linie); border-radius: .45rem; background: var(--flaeche); color: var(--tinte); }
.eingabe .einheit { position: absolute; inset-inline-end: .8rem; inset-block: 0; display: grid; place-items: center; color: var(--leise); pointer-events: none; }
#brutto, #netto, #brutto1 { font-size: 1.4rem; }
form.calc select { font: inherit; inline-size: 100%; margin-top: .3rem; padding: .5rem .6rem; border: 2px solid var(--linie);
  border-radius: .45rem; background: var(--flaeche); color: var(--tinte); }
form.calc :is(input, select):focus-visible { border-color: var(--link); outline-offset: 1px; }

/* Umschalter (Radiogruppe als Leiste) */
.umschalter > div { display: flex; border: 2px solid var(--linie); border-radius: .5rem; padding: 2px; gap: 2px; background: var(--papier); }
.umschalter label { flex: 1 1 0; position: relative; display: grid; cursor: pointer; font-weight: 500; }
.umschalter input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.umschalter span { display: grid; place-items: center; min-block-size: 2.5rem; padding: .2rem .5rem; border-radius: .35rem; text-align: center; line-height: 1.2; }
.umschalter input:checked + span { background: var(--tinte); color: var(--papier); font-weight: 650; }
.umschalter input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 2px; }
.umschalter.stkl span { font-family: var(--display); font-weight: 800; font-size: 1.35rem; }
@media (prefers-reduced-motion: no-preference) { .umschalter span { transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out); } }

.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; font-weight: 500 !important; line-height: 1.4; }
.check input { inline-size: 1.2rem; block-size: 1.2rem; margin: .12rem 0 0; flex: none; }
.nur-kinderlos { display: none; }
form:has(#kinder option[value="0"]:checked) .nur-kinderlos { display: flex; }
.nur-privat { display: none; }
form:has(input[name="kv"][value="privat"]:checked) .nur-privat { display: block; }
form:has(input[name="kv"][value="privat"]:checked) .nur-gesetzlich { display: none; }

details.weitere { margin-top: 1.2rem; border-top: 1px solid var(--linie); padding-top: .8rem; }
details.weitere > summary { font-size: 1.05rem; font-weight: 650; }
.weitere-inhalt { padding-bottom: .2rem; }

form.calc button {
  font: inherit; font-weight: 650; inline-size: 100%; margin-top: 1.4rem; padding: .8rem 1.3rem; border: 0;
  border-radius: .5rem; background: var(--gelb); color: #23272e; cursor: pointer; transition: background-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { form.calc button:hover { background: color-mix(in srgb, var(--gelb) 85%, black); } }
@media (prefers-reduced-motion: no-preference) {
  form.calc button { transition: transform 160ms var(--ease-out), background-color 150ms ease; }
  form.calc button:active { transform: scale(0.97); }
}
form.calc .error-msg { display: none; color: var(--minus); font-size: .93rem; margin-top: .25rem; }
form.calc input:user-invalid { border-color: var(--minus); background-color: var(--fehler-bg); }
form.calc .feld:has(input:user-invalid) .error-msg { display: block; }
form.calc .user-invalid-fallback { border-color: var(--minus); background-color: var(--fehler-bg); }
form.calc .feld:has(.user-invalid-fallback) .error-msg { display: block; }

/* ── Ergebnis: die Stunde ── */
#result { container-type: inline-size; }
#result:focus-visible { outline-offset: 6px; }
.ergebnis { background: var(--flaeche); border: 1px solid var(--linie); border-radius: .75rem; padding: 1.4rem 1.5rem 1.2rem; }
.ergebnis .kopf { margin: 0 0 .8rem; font-weight: 600; color: var(--leise); }
.uhr-block { display: grid; grid-template-columns: minmax(8rem, 11rem) 1fr; gap: 1.3rem; align-items: center; }
@container (width < 26rem) { .uhr-block { grid-template-columns: 1fr; justify-items: start; } .uhr { max-inline-size: 11rem; } }
.uhr { display: block; inline-size: 100%; block-size: auto; }
.uhr .blatt { fill: var(--papier); stroke: var(--linie); stroke-width: 1; }
.uhr .tick { stroke: var(--leise); stroke-width: .8; }
.uhr .tick.gross { stroke: var(--tinte); stroke-width: 1.8; }
.uhr .rest { fill: none; stroke: var(--grau); stroke-width: 14; }
.uhr .netto { fill: none; stroke: var(--gelb); stroke-width: 14; }
.uhr .zahl { font-family: var(--display); font-weight: 900; font-size: 30px; text-anchor: middle; fill: var(--tinte); }
.uhr .einheit { font-size: 10px; font-weight: 600; text-anchor: middle; fill: var(--leise); }
.uhr-text { margin: 0; font-size: 1.15rem; line-height: 1.45; }
.uhr-text b { font-weight: 700; background: linear-gradient(transparent 55%, color-mix(in srgb, var(--gelb) 70%, transparent) 55%); }
.kennzahlen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1.2rem; margin: 1.3rem 0 0; }
@container (width >= 40rem) { .kennzahlen { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kennzahlen div { border-top: 3px solid var(--linie); padding-top: .45rem; }
.kennzahlen div.netto { border-top-color: var(--gelb); }
.kennzahlen dt { font-size: .93rem; color: var(--leise); }
.kennzahlen dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.9rem; line-height: 1.1; letter-spacing: .01em; }
.warnung { margin: 1.2rem 0 0; padding: .7rem .9rem; border-radius: .45rem; background: var(--fehler-bg); }
.warnung b { color: var(--minus); }
table.abzuege { margin-top: 1.2rem; font-size: 1.02rem; }
table.abzuege caption { caption-side: top; text-align: left; font-size: .95rem; color: var(--leise); padding: 0 0 .35rem; }
table.abzuege th { font-weight: 400; padding-inline-end: 1rem; }
table.abzuege td { text-align: right; white-space: nowrap; padding-inline-end: 0; }
table.abzuege .z-brutto :is(th, td) { font-weight: 600; }
table.abzuege .z-netto :is(th, td) { font-weight: 700; border-top: 2px solid var(--tinte); border-bottom: 0; font-size: 1.1rem; }
.ergebnis .hinweis { font-size: .95rem; color: var(--leise); margin: .8rem 0 0; }
#calc > fieldset:first-of-type { margin-top: 0; }
#calc > .feld { margin-top: 1.05rem; }
.nur-monat { display: none; }
form:has(input[name="art"][value="monat"]:checked) .nur-monat { display: inline; }
form:has(input[name="art"][value="monat"]:checked) .nur-stunde { display: none; }

/* Mitlaufende Ergebniszeile auf schmalen Bildschirmen */
.netto-leiste { display: none; }
@media (width < 60rem) {
  .netto-leiste {
    display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; position: sticky; bottom: .75rem; z-index: 2;
    margin-block: -1rem -.5rem; padding: .65rem 1rem; border-radius: .6rem; background: var(--gelb); color: #23272e;
    text-decoration: none; box-shadow: 0 6px 20px -6px rgb(30 30 20 / .45);
  }
  .netto-leiste .leiste-text { font-size: .95rem; font-weight: 600; }
  .netto-leiste b { font-family: var(--display); font-weight: 900; font-size: 1.6rem; white-space: nowrap; }
}

/* Große Zahl als Aufmacher */
.grosszahl { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; margin: .4rem 0 1rem; }
.grosszahl b { font-family: var(--display); font-weight: 900; font-size: clamp(4rem, 2.6rem + 7vw, 7.5rem); line-height: .9; letter-spacing: .005em; }
.grosszahl b::after { content: ""; display: block; block-size: .14em; margin-top: .08em; background: var(--gelb); }
.grosszahl span { color: var(--leise); font-size: 1.15rem; }

/* ── Tabellen (modern-web-guidance: responsive-table) ── */
table { border-collapse: collapse; width: 100%; font-size: 1.02rem; }
th, td { text-align: left; vertical-align: top; padding: .5rem .8rem .5rem 0; border-bottom: 1px solid var(--linie); }
thead th { font-weight: 700; border-bottom: 2px solid var(--tinte); }
caption { text-align: left; caption-side: bottom; padding-top: .6rem; font-size: .95rem; color: var(--leise); }
.table-wrapper { overflow: auto; max-inline-size: 100%; container-type: inline-size; margin: 1.2rem 0; }
.table-wrapper table { margin: 0; border-collapse: separate; border-spacing: 0; }
.table-wrapper tbody th { font-weight: 600; background: var(--papier); position: sticky; inset-inline-start: 0; }
.table-wrapper td.zahl, .table-wrapper th.zahl { text-align: right; white-space: nowrap; }
.table-wrapper .betont { font-weight: 700; color: var(--link); }
.table-wrapper .plus { color: var(--plus); }
.table-wrapper .minus { color: var(--minus); }
.table-wrapper:focus-visible { outline-offset: 4px; }
@container (width < 30rem) {
  .table-wrapper table, .table-wrapper tbody, .table-wrapper tr, .table-wrapper th, .table-wrapper td { display: block; }
  .table-wrapper thead { display: none; }
  .table-wrapper caption { display: block; padding: .6rem 0 0; }
  .table-wrapper tr { padding: .5rem 0; border-bottom: 1px solid var(--linie); }
  .table-wrapper th, .table-wrapper td { border: 0; padding: .1rem 0; }
  .table-wrapper td.zahl { text-align: left; }
  .table-wrapper tbody th { position: static; }
  .table-wrapper td[data-label]::before { content: attr(data-label) ": "; color: var(--leise); }
  .table-wrapper tbody th[data-label]::before { content: attr(data-label) ": "; color: var(--leise); font-weight: 400; }
}

/* ── Häufige Fragen (modern-web-guidance: accordion) ── */
details { border-bottom: 1px solid var(--linie); padding: .9rem 0; }
.faq details:first-of-type { border-top: 1px solid var(--linie); }
details.weitere { border-bottom: 0; padding-bottom: 0; }
summary { list-style: none; display: flex; align-items: baseline; gap: .6ch; cursor: pointer; font-weight: 700; font-size: 1.22rem; line-height: 1.35; }
summary::-webkit-details-marker { display: none; }
summary::before {
  content: ""; inline-size: .6em; block-size: .6em; flex-shrink: 0; background-color: var(--link); translate: 0 .05em;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 8l8 8 8-8' fill='none' stroke='black' stroke-width='3.5'/%3E%3C/svg%3E") no-repeat center / contain;
  rotate: -90deg;
}
details[open] > summary::before { rotate: 0deg; }
details > p { margin: .7rem 0 .2rem; }
details::details-content { interpolate-size: allow-keywords; overflow: clip; contain: layout; }
details:not([open])::details-content { block-size: 0; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  summary::before { transition: rotate 200ms var(--ease-out); }
  details::details-content {
    transition: block-size 220ms var(--ease-out), opacity 220ms var(--ease-out), content-visibility 220ms;
    transition-behavior: allow-discrete;
  }
}
@media (prefers-reduced-motion: reduce) {
  details::details-content { transition: opacity 150ms var(--ease-out), content-visibility 150ms; transition-behavior: allow-discrete; }
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important; clip-path: inset(50%) !important; overflow: hidden !important;
  width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
  border: 0 !important; white-space: nowrap !important;
}

footer.site { background: var(--flaeche); border-top: 1px solid var(--linie); font-size: .98rem; color: var(--leise); padding: 2rem 0 2.5rem; }
footer.site p { max-width: var(--mass); margin: 0; }
footer.site ul { list-style: none; padding: 0; margin: .7rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }

/* ── Bewegung: ein Moment ──
   Nach einer Eingabe läuft der gelbe Bogen der Uhr von 12 Uhr bis zu Ihren Netto-Minuten.
   Nur als Antwort auf eine Aktion. Bei reduzierter Bewegung: nur Einblenden. */
@keyframes aufziehen { from { stroke-dasharray: 0 60; } }
@keyframes einblenden { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .ergebnis.animate .uhr .netto { animation: aufziehen 700ms var(--ease-out) both; }
  .ergebnis.animate .kennzahlen dd { animation: einblenden 260ms var(--ease-out) both; }
}
@media (prefers-reduced-motion: reduce) {
  .ergebnis.animate .uhr { animation: einblenden 200ms ease both; }
}

/* Navigation auf schmalen Bildschirmen: eine Zeile, seitlich scrollbar, weiche Ränder nur dort, wo mehr kommt
   (modern-web-guidance: scrollability-affordance-hints; Scrollbalken bleibt sichtbar) */
@property --fade-start { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fade-end { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes reveal-fade-start { to { --fade-start: var(--fade-size); } }
@keyframes hide-fade-end { from { --fade-end: var(--fade-size); } }
@media (width < 52rem) {
  header.site .wrap { row-gap: .3rem; }
  nav.main {
    inline-size: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin;
    padding-block: .45rem .55rem; scroll-padding-inline: 2rem;
    --fade-size: 2rem;
    mask:
      linear-gradient(black, black) no-clip subtract,
      linear-gradient(to right, black, transparent) 0 0 / var(--fade-start) 100% no-repeat no-clip,
      linear-gradient(to right, transparent, black) 100% 0 / var(--fade-end) 100% no-repeat no-clip;
    animation: reveal-fade-start linear both, hide-fade-end linear both;
    animation-timeline: scroll(self inline);
    animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%;
  }
  nav.main ul { flex-wrap: nowrap; }
  nav.main li { flex: none; white-space: nowrap; }
}
@media (width < 30rem) {
  .wrap { padding: 0 1rem; }
  form.calc, .ergebnis { padding-inline: 1rem; }
}
