@font-face {
  font-family: "Inter";
  src: url("https://www.sparen.digital/fonts/Inter.woff2") format("woff2"),
       url("https://www.sparen.digital/fonts/Inter.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --accent: #1d4ed8;
  --accent-h: #1e40af;
  --accent-light: #eff6ff;
  --border: #e5e7eb;
  --th-bg: #f9fafb;
  --max-w: 1100px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: underline; }
a:hover { color: var(--accent-h); }
img { max-width: 100%; height: auto; display: block; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: .5rem 1rem;
  background: var(--accent);
  color: #fff;
  font-size: .875rem;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

header {
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .5rem 0;
}
.logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.01em;
  flex-shrink: 0;
}
.logo:hover { color: var(--accent); }

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .75rem;
}
nav a {
  font-size: .875rem;
  color: var(--muted);
  text-decoration: none;
  padding: .25rem 0;
  font-weight: 500;
  white-space: nowrap;
}
nav a:hover { color: var(--text); }
nav a[aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  font-style: normal;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: .75rem;
}
h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.375rem);
  font-weight: 600;
  font-style: normal;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: .75rem;
}
h3 {
  font-size: 1rem;
  font-weight: 600;
  font-style: normal;
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
.intro { font-size: 1.0625rem; color: var(--muted); margin-bottom: 1.5rem; max-width: 72ch; }

.page-image {
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--th-bg);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-image img { width: 100%; object-fit: cover; }

.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
}
th {
  background: var(--th-bg);
  border: 1px solid var(--border);
  padding: .625rem .875rem;
  text-align: left;
  font-weight: 600;
  font-size: .875rem;
}
td {
  border: 1px solid var(--border);
  padding: .625rem .875rem;
  vertical-align: top;
}
tr:nth-child(even) td { background: var(--th-bg); }

.tool-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2rem 0;
}
.tool-box h2 { margin-top: 0; font-size: 1.125rem; font-weight: 700; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
}
.form-group { display: flex; flex-direction: column; gap: .375rem; }
label { font-size: .875rem; font-weight: 500; }
.label-hint { font-size: .75rem; color: var(--muted); }

input[type="number"] {
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--th-bg);
  color: var(--text);
  width: 100%;
}
input[type="number"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.btn {
  display: inline-block;
  padding: .625rem 1.5rem;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover, .btn:focus {
  background: var(--accent-h);
  color: #fff;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-sm {
  font-size: .875rem;
  padding: .4rem 1rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-sm:hover, .btn-sm:focus { background: var(--accent-light); color: var(--accent-h); }

.result-hidden { display: none; }

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 1rem;
}
.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.result-card.primary { background: var(--accent-light); border-color: #bfdbfe; }
.result-card .card-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .25rem;
}
.result-card .card-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
}
.result-card.primary .card-value { color: var(--accent); }

.table-years { margin-top: 1.25rem; }
.toggle-wrap { margin-top: .75rem; }

.breadcrumb {
  font-size: .8125rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .375rem;
  align-items: center;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb .sep { color: var(--border); }
.breadcrumb [aria-current] { color: var(--text); font-weight: 500; }

.cta-box {
  margin: 2.5rem 0;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-light);
}
.cta-box p { margin-bottom: .75rem; }
.cta-box p:last-child { margin-bottom: 0; }

.info-box {
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  padding: 1.125rem 1.5rem;
  border-radius: var(--radius);
  background: var(--th-bg);
  font-size: .9375rem;
}
.info-box p { margin-bottom: .5rem; }

ul.content-list {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
ul.content-list li { margin-bottom: .375rem; }

dl.def-list { margin-bottom: 1rem; }
dl.def-list dt { font-weight: 600; margin-top: .75rem; }
dl.def-list dd { color: var(--muted); padding-left: 1rem; margin-top: .125rem; }

#consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1f2937;
  color: #f9fafb;
  padding: 1rem 1.5rem;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: .875rem;
}
#consent-banner p { margin: 0; flex: 1 1 280px; line-height: 1.5; }
#consent-banner a { color: #93c5fd; }
.consent-btns { display: flex; gap: .75rem; flex-shrink: 0; }
#consent-accept {
  background: var(--accent);
  color: #fff;
  padding: .5rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
}
#consent-accept:hover { background: var(--accent-h); }
#consent-reject {
  background: transparent;
  color: #d1d5db;
  padding: .5rem 1.25rem;
  border: 1px solid #4b5563;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .875rem;
  font-family: inherit;
}
#consent-reject:hover { border-color: #9ca3af; color: #fff; }

footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  font-size: .8125rem;
  color: var(--muted);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; gap: 1.25rem; }
footer a { color: var(--muted); text-decoration: underline; }
footer a:hover { color: var(--text); }

@media (max-width: 640px) {
  main { padding: 1.5rem 1rem 3rem; }
  .tool-box { padding: 1.25rem 1rem; }
  .result-cards { grid-template-columns: 1fr 1fr; }
  #consent-banner { padding: 1rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: .25rem; }
}
