/* Week numbers and working days pages (/weeknummers/, /werkdagen-berekenen/ and their English pages). Builds on site.css tokens. */
.cal-page [hidden] { display: none !important; }
.cal-page .wrap { padding-inline: clamp(16px, 3vw, 48px); }
.cal-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.cal-intro { padding-top: 40px; padding-bottom: 28px; }
.cal-intro h1 { font-size: clamp(32px, 5vw, 54px); margin-bottom: 12px; overflow-wrap: anywhere; }
.cal-intro .lead { max-width: 40em; font-size: clamp(17px, 1.6vw, 20px); }

.cal { padding-bottom: 56px; min-width: 0; }
.cal-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: 28px; align-items: start; }
.cal-form { display: grid; gap: 18px; min-width: 0; }
.cal-example { font-size: 14px; color: var(--muted); }
.cal-small { font-size: 13px; line-height: 1.45; color: var(--muted); }
.cal-checked { margin-top: 12px; }
.cal-problem { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: rgba(20,33,61,.08); font-size: 15px; }

/* inputs */
.cal-card { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px 24px; display: grid; gap: 20px; }
.cal-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 20px; }
.cal-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; min-width: 0; }
.cal-field label { font-size: 14px; font-weight: 600; color: var(--navy); line-height: 1.35; }
.cal-input { display: flex; align-items: center; min-height: 48px; background: var(--white); border: 1.5px solid var(--line-2); border-radius: 12px; transition: border-color .15s; }
.cal-input:hover { border-color: #B3B8C3; }
.cal-input:focus-within { border-color: var(--navy); outline: 3px solid var(--ring); outline-offset: 1px; }
.cal-input input { flex: 1 1 0; width: 0; min-width: 0; height: 45px; padding: 0 14px; border: 0; background: transparent; color: var(--ink); font: 400 16px Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.cal-input input:focus-visible { outline: none; }
.cal-input:has(input[aria-invalid="true"]) { border-color: #b4441f; }
.cal-hint { font-size: 13px; line-height: 1.45; color: var(--muted); }
.cal-error { font-size: 13px; line-height: 1.45; font-weight: 600; color: var(--error); }
.cal-error:empty { display: none; }

.cal-seg, .cal-group { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 10px; }
.cal-seg legend, .cal-group legend { float: left; width: 100%; padding: 0; margin: 0 0 8px; font: 600 21px/1.2 Outfit, Inter, sans-serif; letter-spacing: -0.01em; color: var(--navy); }
.cal-seg legend + *, .cal-group legend + * { clear: both; }
.cal-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.cal-choice { position: relative; display: block; }
.cal-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.cal-choice > span { display: block; height: 100%; padding: 9px 8px; border-radius: 10px; font-size: 15px; line-height: 1.35; color: var(--muted); text-align: center; cursor: pointer; transition: background .15s, color .15s; }
.cal-choice > span:hover { color: var(--navy); }
.cal-choice input:checked + span { background: var(--white); color: var(--navy); box-shadow: 0 1px 2px rgba(20,33,61,.12), 0 0 0 1px var(--line); }
.cal-choice input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 2px; }
.cal-choice strong { display: block; font-weight: 600; }
.cal-choice small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }

.cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-day-box { position: relative; display: block; }
.cal-day-box input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.cal-day-box span { display: grid; place-items: center; min-height: 44px; border: 1.5px solid var(--line-2); border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--muted); background: var(--white); cursor: pointer; }
.cal-day-box input:checked + span { background: var(--brand-navy); border-color: var(--navy); color: #fff; }
.cal-day-box input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 2px; }
.cal-presets { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.cal-link { min-height: 44px; padding: 0; border: 0; background: none; font: 600 15px Inter, system-ui, sans-serif; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cal-check { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; cursor: pointer; }
.cal-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); }
.cal-check small { display: block; font-size: 13px; line-height: 1.45; color: var(--muted); }
.cal-group-plain { display: grid; }

.cal-own-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 16px; }
.cal-own-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.cal-own-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 4px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; font-size: 15px; }

.cal-keep { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 4px 4px 0; }
.cal-remember { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.cal-remember input { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); }
.cal-keep .cal-hint { flex-basis: 100%; order: 3; padding-left: 30px; }
.cal-reset { margin-left: auto; cursor: pointer; font-family: inherit; }

/* result */
.cal-result { position: sticky; top: 84px; min-width: 0; background: var(--brand-navy); color: #ECEEF4; border-radius: 22px; padding: 22px 26px 20px; box-shadow: var(--shadow); }
.cal-result-heading { font-size: 19px; color: #fff; }
.cal-head-label { margin-top: 10px; font-size: 14px; color: #C3CADA; }
.cal-big { font: 600 clamp(30px, 3.4vw, 44px)/1.1 Outfit, Inter, sans-serif; letter-spacing: -0.02em; color: var(--orange); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cal-sub { margin-top: 2px; font-size: 14px; color: #C3CADA; }
.cal-result .cal-problem { background: rgba(255,255,255,.08); color: #fff; }
.cal-breakdown { margin: 20px 0 0; }
.cal-breakdown > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.14); }
.cal-breakdown dt { font-size: 15px; color: #DFDCD6; }
.cal-breakdown dd { margin: 0; text-align: right; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.cal-formula { padding-top: 9px; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; line-height: 1.55; color: #DFDCD6; overflow-wrap: anywhere; }
.cal-skipped-heading { margin-top: 18px; font-size: 16px; color: #fff; }
.cal-skipped { margin: 8px 0 0; padding: 0; list-style: none; max-height: 260px; overflow-y: auto; }
.cal-skipped li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; color: #DFDCD6; }
.cal-skipped li span:first-child { color: #fff; font-weight: 600; }
.cal-result .cal-small { margin-top: 10px; color: #C3CADA; }
.cal-disclaimer { margin-top: 14px; font-size: 14px; font-weight: 600; color: #fff; }
.cal-privacy { margin-top: 4px; font-size: 13px; color: #C3CADA; }
.cal-checked.cal-disclaimer { margin-top: 4px; font-weight: 400; }

/* week numbers */
.cal-years { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cal-tab { min-height: 44px; min-width: 76px; padding: 0 18px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--white); font: 600 17px Outfit, Inter, sans-serif; color: var(--navy); cursor: pointer; font-variant-numeric: tabular-nums; }
.cal-tab.is-on { background: var(--brand-navy); border-color: var(--navy); color: #fff; }
.cal-tab:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.cal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 20px; }
.cal-actions .cal-small { flex-basis: 100%; }
.cal-year h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 6px; }
.cal-year h3 { font-size: 22px; margin: 28px 0 10px; }
.cal-facts { color: var(--muted); margin-bottom: 14px; }
.cal-table-wrap { max-width: 640px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cal-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.cal-table thead th { padding: 8px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--paper); }
.cal-table thead th:first-child { width: 12%; }
.cal-table tbody th { width: 12%; padding: 0; font-size: 14px; font-weight: 700; color: var(--navy); background: var(--paper); border-top: 1px solid var(--line); }
.cal-day { position: relative; height: 40px; padding: 0; text-align: center; font-size: 15px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-num { position: relative; z-index: 1; }
.cal-mon { position: absolute; top: 1px; left: 0; right: 0; font-size: 9px; line-height: 1.1; font-weight: 700; text-transform: uppercase; color: var(--navy); }
.cal-weekend { background: var(--surface-2); color: var(--muted); }
.cal-out { color: #A3A9B7; }
.cal-holiday { background: var(--orange); color: var(--brand-navy); font-weight: 700; }
.cal-soft { background: repeating-linear-gradient(135deg, var(--orange), var(--orange) 4px, #FDE3B0 4px, #FDE3B0 8px); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.cal-legend li { display: flex; align-items: center; gap: 6px; }
.cal-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); }
.cal-key-holiday { background: var(--orange); }
.cal-key-soft { background: repeating-linear-gradient(135deg, var(--orange), var(--orange) 3px, #FDE3B0 3px, #FDE3B0 6px); }
.cal-key-weekend { background: var(--surface-2); }
.cal-key-out { background: var(--surface); color: #A3A9B7; }
.cal-year .cal-small { margin-top: 8px; }
.cal-holidays { margin: 0; padding: 0; list-style: none; max-width: 640px; display: grid; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.cal-holidays li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 11px 18px; border-top: 1px solid var(--line); }
.cal-holidays li:first-child { border-top: 0; }
.cal-hname { font-weight: 600; color: var(--navy); }
.cal-hdate { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.cal-holidays small { grid-column: 1 / -1; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* shared lower sections */
.cal-more { max-width: 820px; display: grid; gap: 52px; padding-bottom: 88px; }
.cal-section h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 14px; }
.cal-section p { color: var(--muted); }
.cal-section p + p { margin-top: 12px; }
.cal-sources { margin: 0 0 10px; padding-left: 1.2em; color: var(--muted); }
.cal-sources a, .cal-related a, .cal-cta a { color: var(--navy); font-weight: 600; }
.cal-faq details:last-child { margin-bottom: 0; }
.cal-related { text-align: center; font-size: 17px; color: var(--muted); }
.cal-cta { padding-top: 28px; border-top: 1px solid var(--line); text-align: center; font-size: 17px; color: var(--muted); }

@media (max-width: 920px) {
  .cal-split { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .cal-result { position: static; }
}
@media (max-width: 560px) {
  .cal-intro { padding-top: 28px; }
  .cal-card { padding: 18px 16px 20px; border-radius: 18px; }
  .cal-seg legend, .cal-group legend { font-size: 19px; }
  .cal-choices { grid-template-columns: minmax(0, 1fr); }
  .cal-choice > span { padding: 9px 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; text-align: left; }
  .cal-reset { margin-left: 0; }
  .cal-result { padding: 20px 18px 18px; border-radius: 18px; }
  .cal-more { gap: 44px; }
  .cal-days { gap: 4px; }
  .cal-day { height: 42px; font-size: 14px; }
  .cal-holidays li { padding: 11px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .cal-input, .cal-choice > span { transition: none; }
}
@media print {
  .cal-page .top, .cal-page footer, .cal-page .cal-years, .cal-page .cal-actions, .cal-page .cal-more, .cal-page .cal-intro .lead, .cal-page .cal-intro .eyebrow, .cal-page .cal-checked, .cal-page .cal-small:last-child { display: none !important; }
  .cal-page .cal-intro { padding: 0 0 8px; }
  .cal-page .cal-intro h1 { font-size: 20px; }
  .cal-page .cal { padding: 0; }
  .cal-table-wrap, .cal-holidays { max-width: none; break-inside: avoid; }
  .cal-day { height: 22px; font-size: 11px; }
  .cal-holiday { background: var(--surface-2) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cal-year h3 { margin-top: 12px; }
}
