/* ==========================================================================
   NettoLab — shared stylesheet
   One stylesheet, three locales. Accent colour is the only per-market variable.
   ========================================================================== */

:root {
  color-scheme: light;

  --paper: #f8f5ef;
  --paper-2: #f1ece1;
  --card: #ffffff;
  --ink: #15181c;
  --ink-2: #4d555d;
  --ink-3: #818a92;
  --line: #e4ddcf;
  --line-soft: #efeade;

  --accent: #b4432d;
  --accent-ink: #8d3221;
  --accent-soft: #f7e9e4;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(21, 24, 28, 0.04), 0 12px 32px -12px rgba(21, 24, 28, 0.14);
  --shadow-sm: 0 1px 2px rgba(21, 24, 28, 0.05);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

html[data-locale="de"] { --accent: #b4432d; --accent-ink: #8d3221; --accent-soft: #f8eae5; }
html[data-locale="it"] { --accent: #1a6b57; --accent-ink: #145445; --accent-soft: #e6f0ec; }
html[data-locale="fr"] { --accent: #2f4d8f; --accent-ink: #25406f; --accent-soft: #e8ecf5; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain: two very soft radial washes, no image request. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(255, 255, 255, 0.9), transparent 70%),
    radial-gradient(900px 520px at 92% 4%, var(--accent-soft), transparent 68%);
  opacity: 0.85;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 8px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: -0.01em;
}

.brand__mark b { font-weight: 600; }

.brand__mark em {
  font-style: normal;
  color: var(--accent);
}

.brand__tag {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.locales {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--paper-2);
  border-radius: 999px;
  border: 1px solid var(--line);
}

.locales a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink-2);
}

.locales a[aria-current="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.locales a:hover { color: var(--ink); }

.locales .flag { font-size: 13px; line-height: 1; }

/* -------------------------------------------------------------------- hero */

.hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 46px;
  align-items: start;
  padding: 34px 0 8px;
}

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 30px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 0 0 16px;
  text-wrap: balance;
}

h1 em {
  font-style: italic;
  color: var(--accent-ink);
}

.lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 44ch;
  margin: 0 0 24px;
}

.fact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 26px;
}

.fact {
  background: rgba(255, 255, 255, 0.66);
  padding: 13px 14px;
}

.fact dt {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 3px;
}

.fact dd {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- calculator */

.calc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.calc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.calc__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.calc__badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 3px 7px;
}

.calc__form { padding: 18px 20px 20px; }

.field { margin-bottom: 16px; }

.field:last-child { margin-bottom: 0; }

.field > label,
.field__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.input-money {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 2px 12px 2px 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-money:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #fff;
}

.input-money input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 11px 4px;
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: none;
  appearance: textfield;
}

.input-money input::-webkit-outer-spin-button,
.input-money input::-webkit-inner-spin-button { appearance: none; margin: 0; }

.input-money .unit {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-3);
}

input[type="range"] {
  width: 100%;
  margin: 12px 0 0;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  appearance: none;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
  cursor: grab;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--accent);
  cursor: grab;
}

select {
  width: 100%;
  padding: 10px 34px 10px 12px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23818a92' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  appearance: none;
  outline: none;
  cursor: pointer;
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---------------------------------------------------------------- payslip */

.payslip {
  margin-top: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.payslip__hero {
  padding: 22px 22px 18px;
  border-bottom: 2px dashed var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--paper) 140%);
}

.payslip__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.payslip__value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.payslip__value strong {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.payslip__value span {
  font-size: 13.5px;
  color: var(--ink-3);
  font-weight: 500;
}

.payslip__gross {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-2);
}

.payslip__gross b {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--ink);
}

.bar {
  display: flex;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper-2);
  margin-top: 16px;
}

.bar__seg { height: 100%; transition: width 0.28s ease; }
.bar__seg--contrib { background: #b9b0a1; }
.bar__seg--tax { background: var(--accent); opacity: 0.72; }
.bar__seg--net { background: #2f6f4f; }

.bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--ink-2);
}

.bar-legend span { display: inline-flex; align-items: center; gap: 5px; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  display: inline-block;
}

.dot--contrib { background: #b9b0a1; }
.dot--tax { background: var(--accent); opacity: 0.72; }
.dot--net { background: #2f6f4f; }

/* breakdown table */

.breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.breakdown caption {
  padding: 14px 22px 4px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.breakdown th,
.breakdown td { padding: 8px 22px; }

.breakdown th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-2);
}

.breakdown th .row__rate {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.breakdown td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.breakdown tr + tr th,
.breakdown tr + tr td { border-top: 1px dotted var(--line); }

.breakdown .row--muted td { color: var(--ink-2); font-weight: 500; }

.breakdown .row--strong th,
.breakdown .row--strong td { font-weight: 700; color: var(--ink); }

.breakdown .row--strong:last-child th,
.breakdown .row--strong:last-child td {
  border-top: 2px solid var(--ink);
  padding-top: 11px;
  padding-bottom: 16px;
  font-size: 15.5px;
}

/* summary kv */

.kv-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-soft);
  border-top: 1px solid var(--line);
  margin: 0;
}

.kv {
  background: var(--paper);
  padding: 11px 16px;
}

.kv dt {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.kv dd {
  margin: 1px 0 0;
  font-size: 15.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.note {
  padding: 10px 22px 14px;
  font-size: 12px;
  color: var(--ink-3);
  border-top: 1px solid var(--line-soft);
  margin: 0;
}

/* ------------------------------------------------------------------ blocks */

.section { padding: 54px 0 0; }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(23px, 2.6vw, 30px);
  letter-spacing: -0.018em;
  margin: 0;
}

.section__head p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
  max-width: 46ch;
}

h3 {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.005em;
  margin: 0 0 6px;
}

p { margin: 0 0 14px; }

.prose { max-width: 68ch; }
.prose p { color: var(--ink-2); }

/* tariff table */

.tariff {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tariff th,
.tariff td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.tariff thead th {
  font-size: 10.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 650;
  background: var(--paper-2);
}

.tariff td:last-child,
.tariff th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

.tariff tbody tr:last-child td { border-bottom: 0; }

.tariff td b { font-variant-numeric: tabular-nums; }

/* static data tables on generated pages */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 20px;
}

.table-wrap .tariff { min-width: 520px; }

.tariff caption {
  caption-side: top;
  text-align: left;
  padding: 0 2px 9px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.tariff td.num,
.tariff th.num { text-align: right; }

.tariff tr.is-current th,
.tariff tr.is-current td {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
}

/* ladder */

.ladder {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.ladder th,
.ladder td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); }

.ladder th { font-weight: 600; font-variant-numeric: tabular-nums; }
.ladder td { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.ladder td:last-child { text-align: right; color: var(--ink-3); }
.ladder tr.is-current { background: var(--accent-soft); }
.ladder tr.is-current th,
.ladder tr.is-current td { color: var(--accent-ink); font-weight: 700; }

/* variant cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.card-link {
  display: block;
  padding: 15px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.card-link:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.card-link strong { display: block; font-size: 14.5px; font-weight: 650; }

.card-link span { font-size: 12.5px; color: var(--ink-3); }

/* faq */

.faq { border-top: 1px solid var(--line); }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 17px;
  color: var(--accent);
  flex: none;
}

.faq details[open] summary::after { content: "−"; }

.faq .answer {
  padding: 0 2px 18px;
  color: var(--ink-2);
  font-size: 14.5px;
  max-width: 74ch;
}

.faq .answer p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ footer */

.site-footer {
  margin-top: 68px;
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.site-footer .cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
}

.site-footer a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line); }
.site-footer a:hover { color: var(--accent-ink); border-color: var(--accent); }

.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }

.legal { max-width: 70ch; margin: 26px 0 0; line-height: 1.65; }
.legal h2 { font-size: 21px; margin: 26px 0 8px; }
.legal h3 { margin-top: 20px; }
.legal p, .legal li { color: var(--ink-2); font-size: 14.5px; }

/* consent */

[data-consent-bar] {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--ink);
  color: #f4f1ea;
  border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55);
  font-size: 13px;
  max-width: 720px;
  margin: 0 auto;
}

[data-consent-bar][hidden] { display: none; }

[data-consent-bar] p { margin: 0; color: #cfc9bd; }

[data-consent-bar] a { color: #f4f1ea; }

.consent-actions { display: flex; gap: 8px; flex: none; }

.btn {
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: #f4f1ea;
}

.btn:hover { filter: brightness(1.06); }

/* utilities */

[hidden] { display: none !important; }

.disclaimer {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 12px;
}

.crumbs {
  font-size: 12px;
  color: var(--ink-3);
  padding-top: 14px;
}

.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }

@media (max-width: 620px) {
  .wrap { width: calc(100% - 28px); }
  .fact-row { grid-template-columns: 1fr 1fr; }
  .fact:last-child { display: none; }
  .kv-list { grid-template-columns: 1fr; }
  .kv-list .kv:last-child { grid-column: auto; }
  .site-header { padding-top: 16px; }
  .brand__tag { display: none; }
  h1 { font-size: 32px; }
}
