/*
  site.css — the one stylesheet for every page on the site.
  Arial; Ink for text; Form blue only for the figure that matters; a grey ramp;
  rules and borders for structure. See the Design section of CLAUDE.md.
*/

:root {
  --ink: #0b0c0c;
  --mark: #1d4f91;
  --paper: #ffffff;
  --panel: #f3f2f1;
  --rule: #b1b4b6;
  --muted: #505a5f;
  --fs-0: 0.875rem;   /* 14px footnotes, hints */
  --fs-1: 1rem;       /* 16px body */
  --fs-2: 1.1875rem;  /* 19px section headings */
  --fs-3: 1.5rem;     /* 24px page title */
  --fs-4: 1.75rem;    /* 28px the key figure */
}
html {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
body { margin: 0; line-height: 1.5; font-size: var(--fs-1); }
main, footer, .site-header { max-width: 44rem; margin: 0 auto; padding: 0 1rem; }
.site-header { padding-top: 0.75rem; font-size: var(--fs-0); }
.site-name { font-weight: bold; }
.back-link { display: block; margin-top: 0.25rem; }
h1 { font-size: var(--fs-3); line-height: 1.2; margin: 1.25rem 0 0.25rem; }
h2 { font-size: var(--fs-2); line-height: 1.25; margin: 0 0 0.5rem; }
h3 { font-size: var(--fs-1); line-height: 1.3; margin: 1.25rem 0 0.25rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--ink); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
hr.heavy { border: 0; border-top: 2px solid var(--ink); margin: 0.75rem 0 1rem; }
section, footer { border-top: 1px solid var(--rule); padding-top: 0.75rem; margin-top: 1.25rem; }
footer { padding-bottom: 2rem; font-size: var(--fs-0); color: var(--muted); }
footer a { color: var(--ink); }
footer ul { margin: 0 0 0.75rem; padding-left: 1.25rem; }
.hint { color: var(--muted); font-size: var(--fs-0); margin: 0 0 0.35rem; }
.result-status { min-height: 3em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Form */
form { margin: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
legend { font-weight: bold; padding: 0; margin: 0 0 0.25rem; }
.field { margin: 0 0 1.1rem; }
label.block { display: block; font-weight: bold; margin-bottom: 0.25rem; }
input[type="text"], input[type="date"], select {
  font: inherit; color: inherit; background: var(--paper);
  border: 2px solid var(--ink); border-radius: 0;
  padding: 0.35rem 0.5rem; min-height: 2.75rem; box-sizing: border-box;
  width: 10rem; max-width: 100%;
}
input[type="text"] { font-variant-numeric: tabular-nums; }
input.short { width: 6rem; }
select { width: auto; padding-right: 0.5rem; }
.prefix { display: inline-flex; max-width: 100%; }
.prefix span {
  display: flex; align-items: center; min-height: 2.75rem; box-sizing: border-box;
  border: 2px solid var(--ink); border-right: 0; background: var(--panel); padding: 0 0.6rem;
}
.inline { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: flex-start; }
.inline .field { margin-bottom: 0; }
.working-days .field { flex: 1 1 15rem; }
.radios { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.radios label { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.5rem; cursor: pointer; }
input[type="radio"] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 1.5rem; height: 1.5rem; border: 2px solid var(--ink); border-radius: 50%;
  background: var(--paper); display: grid; place-content: center;
}
input[type="radio"]:checked::before { content: ""; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--ink); }
.error { font-weight: bold; margin: 0.25rem 0 0; }
input[aria-invalid="true"] { border-width: 4px; }

/* Tables */
.tablewrap { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  font-size: 0.9375rem; line-height: 1.35; font-variant-numeric: tabular-nums;
}
th, td { padding: 0.4rem 0.3rem; border-bottom: 1px solid var(--rule); vertical-align: top; text-align: left; font-weight: normal; }
thead th { background: var(--panel); font-weight: bold; border-bottom: 1px solid var(--ink); }
th.n, td.n { text-align: right; white-space: nowrap; width: 1%; }
thead th.n { white-space: normal; }
tr.total th, tr.total td { border-top: 2px solid var(--ink); font-weight: bold; }
tr.net th, tr.net td { border-bottom: 2px solid var(--ink); }
tr.muted { color: var(--muted); }
td.note { color: var(--muted); font-size: 0.8125rem; }
.sub { display: block; font-size: 0.8125rem; color: var(--muted); font-weight: normal; white-space: normal; }
.key { color: var(--mark); font-size: var(--fs-4); font-weight: bold; line-height: 1.1; }
#result-wrap { min-height: 9rem; }
#working-wrap { min-height: 30rem; }
#summary { margin-top: 0.75rem; }
.checks p { margin: 0 0 0.5rem; padding-left: 0.75rem; border-left: 4px solid var(--rule); }
.checks p.warn { border-left-color: var(--ink); }
p.note { border-left: 4px solid var(--ink); padding-left: 0.75rem; }
.period { margin: 0 0 0.5rem; }
.period .radios label { min-height: 2rem; }

/* Index page: the list of calculators */
.calc-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.calc-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.calc-list .status { color: var(--muted); font-size: var(--fs-0); margin-left: 0.5rem; }

/* Cookie consent bar: a plain bar at the foot of the window, two equal buttons */
.consent { position: fixed; left: 0; right: 0; bottom: 0; background: var(--paper); border-top: 2px solid var(--ink); padding: 0.75rem 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; justify-content: space-between; font-size: var(--fs-0); }
.consent p { margin: 0; max-width: 44rem; }
.consent-actions { display: flex; gap: 0.5rem; }
.consent button { font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 0; min-height: 2.5rem; padding: 0.25rem 1.25rem; cursor: pointer; }
.consent button:hover { background: var(--panel); }
body.has-consent { padding-bottom: 7rem; }
