/* Monetina: a plain editorial layout. Headings above their content, one reading column, rules only where they
   separate rows of data, one action colour. */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ink: #141c23; --text: #2a333b; --muted: #5f6a73; --line: #dde1e4; --line-strong: #b3bbc2;
  --bg: #ffffff; --surface: #f5f5f2;
  --primary: #1d4560; --primary-hover: #143246; --primary-tint: #eaf0f4;
  --accent: #b8262f; --success: #2e6b3f; --error: #a3202a;
  --focus: 0 0 0 3px rgba(29, 69, 96, .35);
  --container: 1160px; --gutter: clamp(16px, 4vw, 32px);
  --measure: 70ch;
  --r: 3px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.6 var(--font); color: var(--text); background: var(--bg); font-feature-settings: "cv11" 1; overflow-wrap: break-word; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0 0 14px; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.875rem, 4vw, 2.75rem); letter-spacing: -0.02em; font-weight: 700; max-width: 22ch; line-height: 1.15; }
h2 { font-size: clamp(1.3125rem, 2.2vw, 1.5rem); }
h3 { font-size: 1.0625rem; }
p { margin: 0 0 14px; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 2px; }
img { max-width: 100%; height: auto; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(760px + 2 * var(--gutter)); }
.measure, .container > p, .container > ul, .container > ol, .prose p, .prose ul, .prose ol, .prose blockquote { max-width: var(--measure); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 16px; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header: one row while everything fits */
.site-header { border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 36px; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.0625rem; color: var(--ink); text-decoration: none; margin: 0; }
.mark { display: inline-grid; place-items: center; width: 26px; height: 26px; background: var(--primary); color: #fff; font-size: .875rem; font-weight: 700; border-radius: 2px; position: relative; }
.mark::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 7px; height: 7px; background: var(--accent); }
.primary-nav { display: flex; gap: 26px; flex: 1; }
.primary-nav a { color: var(--text); text-decoration: none; font-size: .9375rem; font-weight: 500; padding: 21px 0 19px; border-bottom: 2px solid transparent; white-space: nowrap; }
.primary-nav a:hover { color: var(--ink); }
.primary-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.account-link { color: var(--text); text-decoration: none; font-size: .9375rem; font-weight: 500; white-space: nowrap; margin-right: -12px; }
.account-link:hover, .account-link[aria-current] { color: var(--ink); }
.lang-switch { display: flex; gap: 12px; font-size: .8125rem; }
.lang-switch a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 6px 0; }
.lang-switch a[aria-current] { color: var(--ink); font-weight: 700; }
.notice { margin: 0; padding: 9px 0; background: var(--surface); border-bottom: 1px solid var(--line); font-size: .875rem; color: var(--text); }
.notice .container { display: block; }
.notice a { font-weight: 600; margin-left: 6px; white-space: nowrap; }

/* page structure: sections follow each other with space, not boxes */
main { padding-bottom: 48px; }
.intro { padding: 48px 0 12px; }
.lede { font-size: 1.1875rem; line-height: 1.55; color: var(--text); max-width: 62ch; margin: 0; }
.section { padding: 28px 0; }
.section > .container > h2:first-child, .section > .container > .prose > h2:first-child { margin-top: 0; }
.container > h2:not(:first-child) { margin-top: 36px; }
.section-lead { padding-bottom: 0; }
.section-tight { padding-top: 0; padding-bottom: 0; }
.more { margin: 16px 0 0; font-weight: 600; }
.table-note { font-size: .875rem; color: var(--muted); max-width: var(--measure); }
/* older markup (account pages): a heading above its content, like every other section */
.band { padding: 28px 0; }
.band-grid { display: block; }
.band-grid > h2 { margin: 0 0 14px; }
.band-more { margin: 16px 0 0; font-weight: 600; }

/* calculators: inputs left, result right */
.calc-section { padding-top: 24px; }
.section-lead + .calc-section { padding-top: 16px; }
.calc-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.calc-h { margin-bottom: 6px; }
.calc-unit { font-size: .875rem; color: var(--muted); margin-bottom: 4px; }
.calc-note { font-size: .875rem; color: var(--muted); margin: 14px 0 0; max-width: var(--measure); }
.calc-h + .calc-note { margin: 0 0 12px; }
.step { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 18px 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; min-width: 0; }
.step legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; }
.step-no { font-size: .8125rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.step-no::after { content: "."; }
.field { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-width: 0; }
.field label { font-size: .875rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.money { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); height: 46px; }
.money span { padding: 0 12px; color: var(--muted); font-size: .8125rem; height: 100%; display: grid; place-items: center; }
.money input { border: 0; height: 100%; width: 100%; min-width: 0; padding: 0 14px 0 4px; font: inherit; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); background: transparent; }
.money:focus-within { border-color: var(--primary); box-shadow: var(--focus); }
.money input:focus { outline: none; box-shadow: none; }
.result-col { position: sticky; top: 20px; }
.result { background: var(--surface); border-radius: var(--r); padding: 24px 28px 20px; }
.result-label { font-size: .875rem; color: var(--muted); margin-bottom: 2px; }
.result-figure { font-size: clamp(2rem, 4vw, 2.5rem); font-weight: 700; color: var(--ink); margin-bottom: 16px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.2; }
.result-figure.neg { color: var(--error); }
.result-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.result-table th, .result-table td { padding: 9px 0; border-top: 1px solid var(--line); font-weight: 400; text-align: left; }
.result-table td { text-align: right; font-weight: 600; color: var(--ink); padding-left: 12px; white-space: nowrap; }
.result-table td.pos { color: var(--success); }
.result-table td.neg { color: var(--error); }
.hint { color: var(--ink); margin-bottom: 0; }
.hint:empty { display: none; }
/* copy link, share, print: one quiet line under the result */
.result-actions { margin: 12px 0 0; font-size: .875rem; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.link-btn + .link-btn { margin-left: 16px; }
.link-btn:hover { color: var(--ink); }
.link-btn[hidden] { display: none; }
.copy-msg { color: var(--success); margin-left: 12px; }
.print-only { display: none; }
/* the paid next step: one sentence and one button below the result, or one line at the end of an article */
.next { margin-top: 20px; }
.next p { font-size: .9375rem; margin-bottom: 10px; }
p.next { margin: 36px 0 0; font-size: 1rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: var(--r); font: 600 .9375rem/1.2 var(--font); text-decoration: none; cursor: pointer; border: 1px solid var(--primary); text-align: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-secondary, .btn.ghost { background: transparent; color: var(--primary); }
.btn-secondary:hover, .btn.ghost:hover { background: var(--primary-tint); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-block { width: 100%; }

/* text beside a picture of the sheet */
.media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.media-text > :last-child { margin-bottom: 0; }
.media-text ul { padding-left: 1.25em; margin: 0 0 18px; }
.media-text li { margin-bottom: 6px; }
.media-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.shot { display: block; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }

/* templates: a plain list */
.catalog { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.catalog li + li { margin-top: 18px; }
.catalog p { margin: 0; }
.catalog-name { font-weight: 600; }
.catalog-name a { color: var(--ink); }
.catalog-name a:hover { color: var(--primary); }
.catalog-price { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; margin-left: 8px; }
.catalog-text { color: var(--muted); font-size: .9375rem; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare { width: 100%; border-collapse: collapse; min-width: 520px; font-size: .9375rem; }
.compare th, .compare td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: .8125rem; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--ink); }
.compare tbody th { font-weight: 600; color: var(--ink); width: 30%; }
.compare .hl { color: var(--ink); }
.compare td.hl { font-weight: 500; }
.media + h3 { margin-top: 40px; }

/* guides: topic index */
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 40px; }
.topic h3 { font-size: .9375rem; margin-bottom: 8px; }
.topic ul { list-style: none; padding: 0; margin: 0; }
.topic li { padding: 4px 0; line-height: 1.4; }
.topic a, .topic-list a, .catalog-name a, .related a, .canton-links a { text-decoration: none; }
.topic a:hover, .topic-list a:hover, .catalog-name a:hover, .related a:hover, .canton-links a:hover { text-decoration: underline; }
.topic-list { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.topic-list li + li { margin-top: 16px; }
.topic-list a { font-weight: 600; line-height: 1.35; }
.topic-list p { color: var(--muted); font-size: .9375rem; line-height: 1.5; margin: 2px 0 0; }

/* articles */
.crumbs ol { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 6px; font-size: .8125rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.article-intro h1 { max-width: 26ch; }
.article-section { padding-top: 20px; }
.prose h2 { font-size: 1.3125rem; margin-top: 40px; }
.prose h3 { margin-top: 28px; }
.prose ol, .prose ul { padding-left: 1.25em; }
.prose li { margin-bottom: 6px; }
.prose blockquote { margin: 0 0 16px; padding-left: 18px; border-left: 2px solid var(--line-strong); }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 4px 0 16px; font-size: .9375rem; }
table.data th, table.data td { text-align: left; padding: 9px 16px 9px 0; border-bottom: 1px solid var(--line); }
table.data thead th { font-size: .8125rem; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--ink); vertical-align: bottom; }
table.data td, table.data thead th { text-align: right; }
table.data td:first-child, table.data thead th:first-child { text-align: left; }
table.data tbody th { font-weight: 500; }
table.data tr.total th, table.data tr.total td { font-weight: 700; border-top: 1px solid var(--ink); }
.narrow-table { max-width: 760px; }
.premium-table td:last-child, .premium-table th:last-child { padding-right: 0; }
.sources { margin-top: 40px; }
.sources h2 { font-size: 1rem !important; margin: 0 0 8px !important; }
.sources ol { font-size: .875rem; padding-left: 1.4em; max-width: var(--measure); }
.sources li { margin-bottom: 6px; }
.related { margin-top: 32px; }
.related h2 { font-size: 1rem; margin-bottom: 8px; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { padding: 3px 0; }
.canton-links { list-style: none; padding: 0; margin: 0; columns: 4 170px; column-gap: 32px; }
.canton-links li { padding: 3px 0; break-inside: avoid; }
.method-calc h3 a { color: var(--ink); }

/* faq */
.faq { border-top: 1px solid var(--line); max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 13px 32px 13px 0; font-weight: 600; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-weight: 400; font-size: 1.25rem; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; }
.faq + .sources { margin-top: 32px; }

/* thank-you and message pages */
.card { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; margin-top: 24px; }
.tag { font-size: .8125rem; font-weight: 700; color: var(--ink); }
.price { font-size: 1.75rem; font-weight: 700; color: var(--ink); margin: 20px 0 16px; font-variant-numeric: tabular-nums; }
.msg { font-size: .875rem; margin: 12px 0 0; min-height: 1.2em; }
.msg.err { color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 24px; font-size: .9375rem; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 28px; }
.site-footer h2 { font-size: .875rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.footer-more { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.legal-row { display: flex; justify-content: space-between; gap: 8px 16px; border-top: 1px solid var(--line); padding-top: 16px; font-size: .8125rem; color: var(--muted); flex-wrap: wrap; }

/* header: below this width the navigation moves to a second, scrollable row */
@media (max-width: 1100px) {
  .bar { flex-wrap: wrap; gap: 0 24px; padding-top: 10px; min-height: 0; }
  .primary-nav { order: 3; width: 100%; flex: none; overflow-x: auto; white-space: nowrap; scrollbar-width: none; gap: 22px; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .primary-nav a { padding: 12px 0 10px; }
  .account-link { margin: 0 0 0 auto; }
  .account-link + .lang-switch { margin-left: 0; }
  .lang-switch { margin-left: auto; }
}
@media (max-width: 600px) {
  .bar { gap: 0 16px; }
  .lang-switch { gap: 10px; }
}
@media (max-width: 980px) {
  .calc-layout { grid-template-columns: 1fr; gap: 28px; }
  .result-col { position: static; }
  .media, .media-wide { grid-template-columns: 1fr; gap: 24px; }
  .media .shot { max-width: 560px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .lede { font-size: 1.0625rem; }
  .step { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .result { padding: 20px; }
  .intro { padding-top: 32px; }
  .section { padding: 22px 0; }
}

/* admin (kept simple) */
.admin .wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px; }
.adminhead { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.adminhead nav a { margin-left: 12px; text-decoration: none; } .adminhead nav a.on { font-weight: 800; text-decoration: underline; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.kpi span { display: block; font-size: 13px; color: var(--muted); } .kpi strong { font-size: 26px; display: block; } .kpi small { color: var(--muted); }
.admin table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 14px; }
.admin th, .admin td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); } .admin th { background: var(--surface); }
.admin .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.flag { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 13px; margin-right: 6px; } .flag.ok { background: #d7f0df; color: var(--success); } .flag.off { background: #fadbd8; color: var(--error); }

/* print: on pages with a calculator only the inputs and the result, on one page; elsewhere the content without
   navigation, footer and buy links. The print line names the site and the address with the inputs. */
@media print {
  @page { margin: 14mm; }
  body { font-size: 10pt; line-height: 1.45; color: #000; background: #fff; }
  .site-header, .notice, .site-footer, .skip, .next, .result-actions, .lead, .catalog, .related, .btn { display: none !important; }
  a { color: inherit; text-decoration: none; }
  main { padding: 0; }
  .has-calc main > :not(.calc-section) { display: none !important; }
  .has-calc .calc-section { padding: 0 !important; background: none !important; }
  .has-calc .container { max-width: none; padding: 0; }
  .calc-layout { display: block; }
  .calc-h { font-size: 15pt; }
  .step { padding: 8px 0 4px; gap: 6px 16px; grid-template-columns: 1fr 1fr; break-inside: avoid; }
  .step legend { margin-bottom: 4px; }
  .field { gap: 2px; }
  .field label { font-size: 8.5pt; }
  .money { height: 26px; border-color: #888; box-shadow: none; }
  .money input { font-size: 10pt; }
  .result-col { position: static; }
  .result { margin-top: 12px; padding: 12px 14px; border: 1px solid #888; background: none; break-inside: avoid; }
  .result-figure { font-size: 20pt; margin-bottom: 6px; }
  .result-table th, .result-table td { padding: 4px 0; }
  .hint { margin-bottom: 6px; }
  .print-only { display: block; }
  .print-line { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid #888; font-size: 8.5pt; color: #333; word-break: break-all; }
  .print-line strong { margin-right: 8px; }
}

/* deadline reminder sign-up (lib/account/reminder-block.mjs) */
.reminder-form { margin-top: 32px; max-width: var(--measure); }
.reminder-form h3 { margin: 0 0 6px; }
.reminder-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.reminder-row input { flex: 1 1 220px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 12px; font: inherit; }
.reminder-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .875rem; color: var(--muted); }
.reminder-consent input { margin-top: 3px; }
