/* lohnblick.de - one stylesheet. Tokens first; the payslip ("Abrechnung") and the wage strip are the only bold parts. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-sc-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-sc-700.woff2") format("woff2"); }

:root {
  --paper: #f1f4ee;
  --sheet: #fbfcf9;
  --ink: #183230;
  --ink-soft: #4a615d;
  --rule: #cbd5c8;
  --net: #e2a82e;
  --net-ink: #3b2a05;
  --seg-tax: #183230;
  --seg-kv: #3f6b64;
  --seg-pv: #6f9089;
  --seg-rv: #93ada6;
  --seg-alv: #b9cbc5;
  --focus: #1d6fd1;
  --warn-bg: #fdf3dc;
  --radius-field: 6px;
  --font: "Barlow", system-ui, sans-serif;
  --font-display: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #142624;
    --sheet: #1b302d;
    --ink: #e6ede8;
    --ink-soft: #a9bcb6;
    --rule: #34504b;
    --net: #f0b845;
    --net-ink: #2a1d02;
    --seg-tax: #d9e6e1;
    --seg-kv: #8fb3ab;
    --seg-pv: #6d9189;
    --seg-rv: #4f716a;
    --seg-alv: #3a5650;
    --focus: #7db3ff;
    --warn-bg: #3a3218;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 12px; }
.brand { font: 700 1.5rem/1 var(--font-display); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--ink-soft); font-weight: 600; }
.site-nav { display: flex; gap: 18px; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--ink-soft); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 1.6rem; font-weight: 700; margin-top: 2.2rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.2rem; font-weight: 600; margin-top: 1.4rem; margin-bottom: 0.3rem; }
p { margin: 0 0 0.9rem; max-width: 68ch; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; margin-top: 0.6rem; }

main { padding: 28px 0 56px; }

/* Calculator layout: form left, payslip right (stacked on phones). */
.calc { display: grid; gap: 24px; margin-top: 22px; }
@media (min-width: 860px) {
  .calc { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  .slip { position: sticky; top: 16px; }
}

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 4px; }
.field label, .field .label { font-weight: 600; font-size: 0.98rem; }
.field .hint { font-size: 0.88rem; color: var(--ink-soft); }
.field input[type="number"], .field input[type="text"], .field select {
  font: 500 1.1rem/1.2 var(--font);
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-field);
  padding: 10px 12px;
  width: 100%;
  min-height: 46px;
}
.field input:hover, .field select:hover { border-color: var(--ink-soft); }
.money { position: relative; }
.money input { padding-right: 2.2rem; font-size: 1.35rem; font-weight: 600; }
.money::after { content: "€"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); }
details.more { border-top: 1px solid var(--rule); padding-top: 10px; }
details.more > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
details.more[open] > summary { margin-bottom: 10px; }
details.more .form { gap: 14px; }

/* The payslip. */
.slip { background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 20px 20px 16px; }
.slip-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 600; color: var(--ink-soft); font-size: 0.95rem; }
.netto-figure { font: 700 clamp(2.6rem, 8vw, 3.6rem)/1 var(--font-display); margin: 10px 0 2px; letter-spacing: -0.02em; }
.netto-figure .unit { font-size: 0.55em; font-weight: 600; margin-left: 0.15em; }
.netto-note { color: var(--ink-soft); margin: 0 0 14px; font-size: 0.95rem; }

.strip { display: flex; height: 30px; border-radius: 3px; overflow: hidden; margin: 6px 0 4px; }
.strip > span { display: block; height: 100%; min-width: 2px; transition: flex-basis 260ms ease; }
.strip .s-net { background: var(--net); }
.strip .s-tax { background: var(--seg-tax); }
.strip .s-kv { background: var(--seg-kv); }
.strip .s-pv { background: var(--seg-pv); }
.strip .s-rv { background: var(--seg-rv); }
.strip .s-alv { background: var(--seg-alv); }
@media (prefers-reduced-motion: reduce) { .strip > span { transition: none; } }
.strip-caption { font-size: 0.88rem; color: var(--ink-soft); margin: 0 0 12px; }

table.lines { width: 100%; border-collapse: collapse; font-size: 1rem; }
table.lines th, table.lines td { padding: 7px 0; border-bottom: 1px dotted var(--rule); text-align: left; font-weight: 400; }
table.lines td.amt { text-align: right; white-space: nowrap; font-weight: 500; }
table.lines tr.sum th, table.lines tr.sum td { font-weight: 600; border-bottom: 1px solid var(--ink); }
table.lines tr.total th, table.lines tr.total td { font-weight: 700; font-size: 1.15rem; border-bottom: 0; padding-top: 10px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }
.slip-foot { font-size: 0.85rem; color: var(--ink-soft); margin: 12px 0 0; }
.notice { background: var(--warn-bg); border-radius: 4px; padding: 12px 14px; margin: 8px 0; }
.notice[hidden] { display: none; }

/* Content below the calculator. */
.prose { max-width: 72ch; }
.prose ul { padding-left: 1.2em; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.35rem; }
.sources { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 0.6rem 0 1rem; }
.sources th, .sources td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--rule); }
.sources th { font-weight: 600; }
.sources td.num { white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.checked { color: var(--ink-soft); font-size: 0.92rem; }
.faq h3 { margin-top: 1.2rem; }

/* Home. */
.home-hero { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .home-hero { grid-template-columns: 6fr 5fr; } }
.tools { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 10px; max-width: 640px; }
.tools a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--ink); border-radius: 4px; text-decoration: none; background: var(--sheet); }
.tools a strong { font-family: var(--font-display); font-size: 1.25rem; }
.tools a span { color: var(--ink-soft); }
.tools a:hover { background: var(--paper); }

.site-foot { border-top: 1px solid var(--rule); padding: 18px 0 28px; font-size: 0.92rem; color: var(--ink-soft); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-foot a { color: var(--ink-soft); }

/* Phones: the net figure stays in view while filling in the form; tapping it jumps to the payslip. */
.netbar { display: none; }
@media (max-width: 859px) {
  .netbar {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--net); color: var(--net-ink); text-decoration: none; font-weight: 600;
    box-shadow: 0 -1px 0 var(--rule);
  }
  .netbar strong { font: 700 1.6rem/1 var(--font-display); }
  body:has(.netbar) { padding-bottom: 64px; }
  .lede-more { display: none; }
}

@media (max-width: 520px) {
  .site-nav { gap: 12px; font-size: 0.9rem; }
  .row2 { grid-template-columns: 1fr; }
}
