/* Invoici — shared styles */
:root {
  --ink: #14365d;        /* blue-black ink */
  --ink-soft: #3d5a80;
  --text: #1f2a36;
  --muted: #5b6774;
  --paper: #ffffff;
  --ground: #eef2f0;     /* cool ledger grey-green */
  --rule: #d5ddd9;
  --paid: #1f7a4d;
  --stamp: #c0392b;
  --focus: #f2b705;
  --radius-lg: 14px;
  --radius-sm: 6px;
  --max: 1080px;
  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

img, svg { max-width: 100%; }

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--ink-soft); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip-link:focus { left: 16px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: var(--ink);
  color: #fff;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.brand:hover { color: #fff; }
.brand svg { width: 28px; height: 28px; flex: none; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.site-nav a {
  color: #dbe5f1;
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; text-decoration: underline; }

/* Headings */
h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 0 0 12px; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 14px; font-weight: 700; }
h3 { font-size: 1.2rem; margin: 24px 0 8px; font-weight: 700; }

.lede { font-size: 1.12rem; color: var(--muted); max-width: 60ch; margin: 0; }

/* Hero / calculator */
.hero { padding: 40px 0 48px; }
.hero-head { margin-bottom: 28px; }

.calc {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field label, .field .label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.hint { display: block; font-size: 0.88rem; color: var(--muted); margin-top: 4px; }

input[type="number"], input[type="date"], input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  padding: 11px 12px;
  border: 1.5px solid #b9c4c0;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  min-height: 48px;
}
input:focus { border-color: var(--ink); }

.money { position: relative; }
.money span {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
}
.money input { padding-left: 30px; }

.choice {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.choice label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1.5px solid #b9c4c0;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
}
.choice input { accent-color: var(--ink); margin: 0; }
.choice label:has(input:checked) { border-color: var(--ink); background: #e7eef7; }

.error {
  color: var(--stamp);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 12px 0 0;
}

/* The claim slip — the memorable piece */
.slip {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  padding: 26px 24px 22px;
  overflow: hidden;
}
.slip::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 22px);
}
.slip h2 { font-size: 1.25rem; margin-bottom: 4px; }
.slip .slip-sub { color: var(--muted); font-size: 0.95rem; margin: 0 0 18px; }

.stamp {
  position: absolute;
  top: 22px;
  right: 18px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--stamp);
  border: 2.5px solid var(--stamp);
  border-radius: 6px;
  padding: 3px 9px;
  transform: rotate(-8deg);
  opacity: 0.85;
}
.stamp.is-paid { color: var(--paid); border-color: var(--paid); }
.stamp.is-hidden { display: none; }

.lines { margin: 0; padding: 0; list-style: none; }
.lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule);
  font-variant-numeric: tabular-nums;
}
.lines li span:last-child { font-weight: 600; text-align: right; }

.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 16px;
  margin-top: 6px;
  border-top: 2px solid var(--ink);
}
.total .t-label { font-weight: 700; color: var(--ink); }
.total .t-value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 2.7rem);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.slip .note { font-size: 0.88rem; color: var(--muted); margin: 14px 0 0; }
.slip .note.warn { color: #8a5a00; font-weight: 600; }

.slip-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 600;
  padding: 11px 18px;
  min-height: 46px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: #fff; }
.btn.secondary { background: #fff; color: var(--ink); }
.btn.secondary:hover { background: #e7eef7; color: var(--ink); }

/* Content sections */
main section.content { padding: 44px 0; border-top: 1px solid var(--rule); }
main section.content.alt { background: var(--paper); }
.prose { max-width: 70ch; }
.prose p, .prose li { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 22px; }

.rates {
  width: 100%;
  max-width: 560px;
  border-collapse: collapse;
  margin: 12px 0 8px;
  font-variant-numeric: tabular-nums;
  background: #fff;
}
.rates th, .rates td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
}
.rates th { color: var(--ink); font-family: var(--font-head); }
.table-scroll { overflow-x: auto; }

.example {
  background: var(--ground);
  border-left: 4px solid var(--ink);
  padding: 16px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  max-width: 70ch;
}
.example p { margin: 0 0 8px; }
.example p:last-child { margin: 0; }

.letter {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 20px;
  max-width: 70ch;
  white-space: pre-wrap;
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 14px;
}

details {
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  max-width: 70ch;
}
summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.08rem;
}
details p { margin: 10px 0 0; }

.disclaimer {
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 70ch;
}

/* Simple pages */
.page { padding: 44px 0 56px; }
.page .panel { max-width: 780px; }

/* Ad slots: empty until AdSense is approved, so they take no space */
.ad-slot:empty { display: none; }
.ad-slot { margin: 24px auto; text-align: center; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #c9d6e6;
  padding: 32px 0;
  font-size: 0.92rem;
}
.site-footer a { color: #fff; }
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.site-footer p { margin: 0 0 8px; max-width: 75ch; }

.copied { color: var(--paid); font-weight: 600; align-self: center; }

@media (max-width: 820px) {
  .calc { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; }
  .panel, .slip { padding: 20px 16px; }
}

@media print {
  .site-header, .site-footer, .calc .panel, .slip-actions, .ad-slot { display: none; }
  body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
