/* Base styles and page layout. Values come from tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img, svg { max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

a { color: var(--ink); text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button { font: inherit; color: inherit; }

.ov-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ov-skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: var(--radius); }
.ov-skip:focus { top: 8px; color: var(--paper); }

.ov-wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.ov-narrow { max-width: 1240px; }

/* Type */
.ov-eyebrow { font-family: var(--mono); font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.ov-display { font-family: var(--serif); font-weight: 300; font-size: clamp(48px, 8vw, 104px); line-height: 0.98; letter-spacing: -0.025em; }
.ov-display em { font-style: italic; }
.ov-h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(36px, 5vw, 56px); line-height: 1.04; letter-spacing: -0.018em; text-wrap: balance; }
.ov-h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -0.015em; }
.ov-h-sub { font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 3vw, 36px); line-height: 1.12; }
.ov-lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; max-width: 31em; text-wrap: pretty; }
.ov-body { font-size: 17px; line-height: 1.6; max-width: 38em; }
.ov-muted { color: var(--muted); }
.ov-small { font-size: 14px; line-height: 1.5; }
.ov-mono { font-family: var(--mono); }
.ov-mono-sm { font-family: var(--mono); font-size: 13px; }
.ov-minor { font-size: 14px; font-weight: 500; font-family: var(--sans); }
.ov-grow { flex: 1; }
.ov-stack-2 { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ov-stack-8 { display: flex; flex-direction: column; gap: 8px; }
.ov-rule-strong { border-bottom: 1px solid var(--rule-strong); padding-bottom: 8px; }

/* Header: sticky on every page. --header-h is kept up to date by site.js. */
:root { --header-h: 64px; }
html { scroll-padding-top: calc(var(--header-h) + var(--strip-h, 0px) + 16px); }
.ov-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--rule); background: var(--paper); }
.ov-header-in { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 32px; padding-top: 10px; padding-bottom: 10px; }
.ov-brand { display: flex; align-items: center; gap: 1px; font-family: var(--serif); font-size: 27px; letter-spacing: -0.02em; text-decoration: none; min-height: var(--tap); }
.ov-brand svg { margin-top: 2px; }
.ov-mark-a { fill: none; stroke: var(--ink); stroke-width: 4; }
.ov-mark-b { fill: none; stroke: var(--accent); stroke-width: 2; }
.ov-nav { display: flex; flex-wrap: wrap; gap: 0 22px; font-size: 15px; flex: 1; }
.ov-nav a { text-decoration: none; min-height: var(--tap); display: flex; align-items: center; border-bottom: 1px solid transparent; }
.ov-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* Footer */
.ov-footer { border-top: 1px solid var(--rule-strong); margin-top: 96px; }
.ov-footer-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 32px 56px; padding-top: 40px; padding-bottom: 48px; }
.ov-footer-main { display: flex; flex-direction: column; gap: 14px; grid-column: span 2; max-width: 640px; min-width: 0; }
.ov-footer-disclaimer { font-family: var(--serif); font-size: 21px; line-height: 1.4; text-wrap: pretty; }
.ov-footer nav { display: flex; flex-direction: column; font-size: 15px; }
.ov-footer nav a { min-height: var(--tap); display: flex; align-items: center; }
.ov-stamp { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 16px; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 0; }
.ov-stamp span + span::before { content: '·'; padding: 0 10px; }
.ov-stamp .is-strong { color: var(--ink); }
@media (max-width: 700px) { .ov-footer-main { grid-column: auto; } }

/* Sections with a § side label */
.ov-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px 48px; padding: clamp(48px, 6vw, 80px) 0 0; }
.ov-section-label { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 10px; }
.ov-section-body { grid-column: span 3; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
@media (max-width: 860px) { .ov-section-body { grid-column: 1 / -1; } }

/* Buttons */
.ov-btn {
  background: var(--ink); color: var(--paper); border: none; border-radius: var(--radius);
  font: 600 15px var(--sans); min-height: var(--tap-primary); padding: 0 20px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
}
.ov-btn:hover { color: var(--paper); opacity: 0.92; }
.ov-btn-lg { font-size: 16px; min-height: 52px; padding: 0 24px; }
.ov-btn-outline {
  background: none; border: 1px solid var(--ink); border-radius: var(--radius); color: var(--ink);
  font: 600 14px var(--sans); min-height: var(--tap); padding: 0 16px; cursor: pointer;
}
.ov-btn-outline:hover { background: var(--ink); color: var(--paper); }
.ov-textbtn {
  background: none; border: none; color: var(--ink); font: 500 15px var(--sans); min-height: var(--tap);
  padding: 0 4px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 5px;
}
.ov-textbtn:hover { text-decoration-color: var(--ink); }
.ov-textbtn svg, .ov-btn svg, .ov-ext svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
.ov-badge { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; border: 1px solid var(--muted); color: var(--ink); padding: 1px 6px; border-radius: var(--radius); white-space: nowrap; display: inline-block; }
.ov-badge.is-strong { border-color: var(--ink); }
.ov-callout { background: var(--raised); border-left: 2px solid var(--ink); padding: 12px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 14px; line-height: 1.5; }
.ov-disclaimer { font-size: 13px; line-height: 1.55; color: var(--muted); border-left: 2px solid var(--rule); padding-left: 14px; }
.ov-notice { border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 12px 16px; font-size: 15px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }

@keyframes ov-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ov-fade { from { opacity: 0; } }
@keyframes ov-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.ov-print-only { display: none; }

/* ---------- Home ---------- */
.ov-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 32px 64px; align-items: center; padding: clamp(40px, 7vw, 96px) 0 clamp(32px, 5vw, 64px); border-bottom: 1px solid var(--rule); }
.ov-hero-text { display: flex; flex-direction: column; gap: 24px; max-width: 620px; }
.ov-hero-cta { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.ov-hero-cta svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
.ov-hero-link { font-size: 16px; font-weight: 500; min-height: var(--tap-primary); display: inline-flex; align-items: center; }
.ov-hero-figure { display: block; max-width: 640px; width: 100%; justify-self: end; text-decoration: none; }
.ov-hero-map { display: block; width: 100%; height: auto; overflow: visible; }
.ov-steps { display: flex; flex-direction: column; border-top: 1px solid var(--rule-strong); }
.ov-step { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px 32px; padding: 24px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.ov-step-n { font-family: var(--serif); font-weight: 300; font-size: 44px; line-height: 1; }
.ov-step-n.ov-mono { font-family: var(--mono); font-size: 20px; }
.ov-step-t { font-family: var(--serif); font-size: 24px; line-height: 1.25; }
.ov-step-d { font-size: 17px; line-height: 1.55; color: var(--muted); }
@media (max-width: 760px) { .ov-step { grid-template-columns: 48px minmax(0, 1fr); } .ov-step-d { grid-column: 2; } }
.ov-fwgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 40px; border-top: 1px solid var(--rule-strong); }
.ov-fwcard { display: flex; flex-direction: column; gap: 10px; padding: 22px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.55; }
.ov-fwcard-head { display: flex; align-items: center; gap: 10px; }
.ov-fwcard-name { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.2; }
.ov-not { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px 48px; border-top: 1px solid var(--rule-strong); padding-top: 24px; }

/* ---------- Method ---------- */
.ov-stats { display: flex; flex-wrap: wrap; gap: 8px 32px; border-top: 1px solid var(--rule-strong); padding-top: 16px; font-size: 15px; color: var(--muted); }
.ov-stat-n { font-family: var(--serif); font-size: 28px; color: var(--ink); margin-right: 6px; }
.ov-defs { display: flex; flex-direction: column; border-top: 1px solid var(--rule-strong); }
.ov-defs div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.55; }
.ov-index { display: flex; flex-direction: column; border-top: 1px solid var(--rule-strong); }
.ov-index-group { border-bottom: 1px solid var(--rule); }
.ov-index-group summary { cursor: pointer; min-height: var(--tap-primary); display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 500; padding: 8px 0; }
.ov-index-group summary .ov-mono-sm:last-child { margin-left: auto; font-weight: 400; }
.ov-index-group ul { display: flex; flex-direction: column; padding: 0 0 16px; }
.ov-index-row { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--rule); }
.ov-index-ref { font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
@media print { .ov-index-group:not([open]) > ul { display: flex; } }
@media (max-width: 640px) { .ov-defs div { grid-template-columns: minmax(0, 1fr); } }
.ov-changes { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--rule-strong); padding-top: 16px; }
.ov-changes ul, .ov-plainlist { padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }
.ov-changes ul { margin-top: 8px; font-size: 16px; }
.ov-hero-caption { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.ov-hero-figure:hover .ov-hero-caption { color: var(--accent); }

/* ---------- Official wording in "Why this link?" ---------- */
.ov-quote { margin: 0; display: flex; flex-direction: column; gap: 6px; border-left: 2px solid var(--ink); padding: 2px 0 2px 14px; }
.ov-quote blockquote { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.5; color: var(--ink); }
.ov-quote blockquote::before { content: '“'; }
.ov-quote blockquote::after { content: '”'; }

/* ---------- Home: also here ---------- */
.ov-also { display: flex; flex-direction: column; border-top: 1px solid var(--rule-strong); }
.ov-also a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.ov-also a:hover { color: var(--accent); }
.ov-also-title { font-family: var(--serif); font-size: 26px; line-height: 1.2; }
.ov-also .ov-muted { font-size: 16px; }
.ov-also svg { fill: none; stroke: currentColor; stroke-width: 1.5; }

/* ---------- About ---------- */
.ov-about { max-width: 720px; }
.ov-about-lead { font-family: var(--serif); font-size: 22px; line-height: 1.5; }
.ov-placeholder { background: var(--raised); padding: 0 4px; color: var(--muted); }
.ov-facts { display: flex; flex-direction: column; border-top: 1px solid var(--rule-strong); }
.ov-facts div { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.ov-facts dt { font-size: 14px; font-weight: 500; }
.ov-facts dd { font-size: 16px; line-height: 1.55; }
.ov-facts-list { display: flex; flex-direction: column; border-top: 1px solid var(--rule-strong); font-size: 17px; line-height: 1.6; max-width: 720px; }
.ov-facts-list li { padding: 16px 0; border-bottom: 1px solid var(--rule); }

/* ---------- Questionnaire translator ---------- */
.ov-input { font: 16px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); min-height: var(--tap-primary); padding: 0 14px; width: 100%; max-width: 520px; }
.ov-input::placeholder { color: var(--muted); opacity: 1; }
.ov-q-search { display: flex; flex-direction: column; gap: 8px; }
.ov-qs { display: flex; flex-direction: column; border-top: 1px solid var(--rule-strong); }
.ov-q { border-bottom: 1px solid var(--rule); }
.ov-q summary { cursor: pointer; min-height: 56px; display: flex; align-items: center; padding: 10px 0; list-style: none; gap: 12px; }
.ov-q summary::-webkit-details-marker { display: none; }
.ov-q summary::before { content: '+'; font-family: var(--mono); width: 18px; color: var(--muted); }
.ov-q details[open] summary::before { content: '−'; }
.ov-q-text { font-family: var(--serif); font-size: 21px; line-height: 1.3; }
.ov-q-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px 40px; padding: 4px 0 28px 30px; }
.ov-q-block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ov-q-block .ov-minor { border-bottom: 1px solid var(--rule-strong); padding-bottom: 6px; }
.ov-q-practices li { font-weight: 500; }
.ov-q-rules { display: flex; flex-direction: column; gap: 10px; }
.ov-q-rules li { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ov-q-refs { display: flex; flex-wrap: wrap; gap: 6px; }
.ov-q-refs .ov-ref { text-decoration: none; min-height: 28px; display: inline-flex; align-items: center; }
.ov-q-refs .ov-ref:hover { background: var(--raised); }
.ov-q-evidence { padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.ov-q-answer { grid-column: 1 / -1; }
.ov-q-answer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--rule-strong); }
.ov-q-answer-head .ov-minor { border: none; }
.ov-q-answer-text { background: var(--raised); padding: 14px 16px; font-size: 16px; line-height: 1.6; border-left: 2px solid var(--ink); }
@media (max-width: 640px) { .ov-q-body { padding-left: 0; } }

/* ---------- Ireland tracker ---------- */
.ov-legend-labels { display: flex; flex-direction: column; gap: 10px; }
.ov-legend-labels ul { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.ov-legend-labels li { display: flex; align-items: center; gap: 10px; }
.ov-status { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; border: 1.5px solid var(--ink); border-radius: var(--radius); white-space: nowrap; display: inline-block; align-self: flex-start; }
.ov-status[data-status="in-force"] { background: var(--ink); color: var(--paper); }
.ov-status[data-status="proposed"] { border-style: dashed; font-style: italic; }
.ov-status[data-status="guidance"] { border-color: transparent; padding-left: 0; padding-right: 0; text-decoration: underline; text-underline-offset: 3px; }
.ov-status[data-status="milestone"] { border-style: dotted; }
.ov-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-chip { font: 500 14px var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: var(--radius); min-height: var(--tap); padding: 0 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.ov-chip:hover { border-color: var(--ink); }
.ov-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ov-entries { display: flex; flex-direction: column; border-top: 1px solid var(--rule-strong); }
.ov-entry { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); gap: 12px 32px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.ov-entry-side { display: flex; flex-direction: column; gap: 8px; }
.ov-entry-date { font-family: var(--mono); font-size: 14px; }
.ov-entry-main { display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.55; max-width: 44em; }
.ov-entry-title { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.2; }
.ov-entry-you { border-left: 2px solid var(--rule); padding-left: 12px; }
@media (max-width: 640px) { .ov-entry { grid-template-columns: minmax(0, 1fr); } .ov-entry-side { flex-direction: row; flex-wrap: wrap; align-items: center; } }

/* ---------- Shared: reference chip and framework label ---------- */
.ov-ref { font-family: var(--mono); font-size: 13px; border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 1px 6px; white-space: nowrap; }
.ov-row-head { display: inline-flex; align-items: center; gap: 8px; }

.ov-plain-list { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Mobile menu ---------- */
.ov-menu-btn { display: none; }
@media (max-width: 759px) {
  .ov-header-in { flex-wrap: wrap; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; }
  .js .ov-menu-btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 12px;
    background: none; border: 1px solid var(--rule); border-radius: var(--radius); font: 500 15px var(--sans); color: var(--ink); cursor: pointer;
  }
  .ov-menu-btn svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
  .ov-menu-close { display: none; }
  .is-menu-open .ov-menu-open { display: none; }
  .is-menu-open .ov-menu-close { display: inline; }
  .ov-nav { flex-basis: 100%; flex-direction: column; gap: 0; font-size: 17px; padding: 4px 0 8px; }
  .ov-nav a { min-height: 48px; border-bottom: 1px solid var(--rule); }
  .ov-nav a[aria-current="page"] { border-bottom-color: var(--rule); font-weight: 600; }
  .ov-nav a[aria-current="page"]::before { content: ''; width: 3px; height: 20px; background: var(--ink); margin-right: 10px; }
  .js .ov-header:not(.is-menu-open) .ov-nav { display: none; }
}

/* ---------- Table ---------- */
.ov-table-wrap { overflow-x: auto; }
.ov-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; min-width: 640px; }
.ov-table thead tr { text-align: left; border-bottom: 1px solid var(--rule-strong); }
.ov-table th, .ov-table td { padding: 12px 16px 12px 0; vertical-align: top; text-align: left; }
.ov-table thead th { font-weight: 500; font-size: 14px; }
.ov-table tbody tr { border-bottom: 1px solid var(--rule); }
.ov-table tbody th { font-weight: 500; white-space: nowrap; }


/* ---------- On this page (Method) ---------- */
.ov-toc { border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 18px; margin-top: 32px; }
.ov-toc-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ov-toc ol { display: flex; flex-direction: column; }
.ov-toc a { display: flex; gap: 10px; align-items: baseline; min-height: 40px; padding: 8px 0; text-decoration: none; font-size: 15px; border-left: 2px solid transparent; padding-left: 10px; margin-left: -12px; }
.ov-toc a[aria-current="true"] { border-left-color: var(--ink); font-weight: 600; }
@media (min-width: 1100px) {
  .ov-method { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 48px; align-items: start; }
  .ov-method > .ov-section { grid-column: 2; grid-template-columns: minmax(0, 1fr); }
  .ov-method > .ov-section > .ov-section-body { grid-column: auto; }
  .ov-method > .ov-toc { grid-column: 1; grid-row: 2 / span 7; position: sticky; top: calc(var(--header-h) + 32px); border: none; padding: 0; margin-top: clamp(48px, 6vw, 80px); }
  .ov-method > .ov-method-head { grid-row: 1; }
}

/* ---------- Sticky filters and search ---------- */
.ov-filters, .ov-q-search { position: sticky; top: var(--header-h); z-index: 10; background: var(--paper); padding: 10px 0; border-bottom: 1px solid var(--rule); }

/* Home hero map on phones: it draws at about half size, so habit names and small captions
   are dropped, the dots grow and keep their numbers, and the corners keep name and count. */
@media (max-width: 759px) {
  .ov-hero-map .rs-plabel, .ov-hero-map .rs-unit, .ov-hero-map .rs-caps { display: none; }
  .ov-hero-map .rs-dot { r: 19px; }
  .ov-hero-map .rs-num { font-size: 21px; }
  .ov-hero-map .rs-count { font-size: 18px; }
  .ov-hero-map .rs-name { font-size: 27px; }
}

/* ---------- Light/dark switch ---------- */
.ov-theme-btn { display: none; }
.js .ov-theme-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: var(--tap); padding: 0 12px;
  background: none; border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink); font: 500 14px var(--sans); cursor: pointer;
}
.js .ov-theme-btn:hover { border-color: var(--ink); }
.ov-theme-btn svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
.ov-theme-btn .ov-theme-half { fill: currentColor; stroke: none; }
@media (max-width: 759px) {
  .js .ov-theme-btn { padding: 0; width: var(--tap); justify-content: center; }
  .ov-theme-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ov-header-in { justify-content: flex-start; gap: 0 8px; }
  .ov-brand { margin-right: auto; }
  .js .ov-theme-btn { margin-left: 0; }
}
@media (min-width: 760px) { .ov-nav { order: 2; } .js .ov-theme-btn { order: 3; } }

/* ---------- Habits index ---------- */
.ov-habit-area { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.ov-habit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.ov-habit-card a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; }
.ov-habit-card a:hover { border-color: var(--ink); color: var(--ink); background: var(--raised); }
.ov-habit-name { font-family: var(--serif); font-size: 21px; line-height: 1.25; }
.ov-habit-plain { font-size: 15px; color: var(--muted); line-height: 1.5; }
.ov-habit-counts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: auto; padding-top: 6px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.ov-habit-counts span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Habit page ---------- */
.ov-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; padding-top: 24px; color: var(--muted); }
.ov-crumbs li + li::before { content: '›'; margin-right: 10px; color: var(--muted); }
.ov-crumbs a { min-height: var(--tap); display: inline-flex; align-items: center; }
.ov-habit-head { padding-top: 24px; }
.ov-habit-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.ov-habit-cta svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
.ov-habit-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 32px 48px; }
.ov-habit-cols > div { display: flex; flex-direction: column; gap: 14px; }
.ov-steps-list { padding-left: 1.4em; display: flex; flex-direction: column; gap: 10px; font-size: 17px; line-height: 1.55; }
.ov-steps-list li::marker { font-family: var(--mono); color: var(--muted); }
.ov-habit-fw { margin-top: 16px; }
.ov-habit-fw-head { font-size: 17px; border-bottom: 1px solid var(--rule-strong); padding-bottom: 8px; }
.ov-index-list { display: flex; flex-direction: column; }
.ov-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; border-top: 1px solid var(--rule-strong); margin-top: 48px; padding-top: 16px; }
.ov-pager a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; min-height: var(--tap); justify-content: center; }
.ov-pager a span:last-child { font-size: 16px; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.ov-pager .ov-pager-next { text-align: right; }
.ov-pager .ov-pager-all { font-size: 15px; text-decoration: underline; }
@media (max-width: 640px) { .ov-pager { grid-template-columns: 1fr 1fr; } .ov-pager .ov-pager-all { grid-column: 1 / -1; grid-row: 2; justify-self: center; } }

/* ---------- NIS2 checker ---------- */
.ov-check-form { display: flex; flex-direction: column; gap: 28px; }
.ov-check-form fieldset { border: none; border-top: 1px solid var(--rule-strong); padding: 16px 0 0; margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ov-check-form legend { font-family: var(--serif); font-size: 23px; line-height: 1.25; padding: 0; display: flex; gap: 12px; align-items: baseline; }
.ov-check-form legend .ov-step-n { font-size: 15px; color: var(--muted); }
.ov-sector-group { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.ov-sector-group .ov-minor { margin-bottom: 4px; }
.ov-choice { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 8px; border-radius: var(--radius); cursor: pointer; min-height: var(--tap); }
.ov-choice:hover { background: var(--raised); }
.ov-choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.ov-choice > span { display: flex; flex-direction: column; gap: 2px; }
.ov-choice-label { font-size: 16px; font-weight: 500; }
.ov-choice-none { border-top: 1px solid var(--rule); margin-top: 6px; }
.ov-result { margin-top: 8px; }
.ov-result-box { border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; animation: ov-in var(--t-panel) ease-out; }
.ov-result-box[data-tone="indirect"], .ov-result-box[data-tone="maybe"] { border-style: dashed; }
.ov-result-box[data-tone="none"] { border-color: var(--rule); }
.ov-result-points { padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 1.55; }
.ov-result-next { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.ov-result-next a { min-height: var(--tap); display: inline-flex; align-items: center; font-weight: 500; }
@media (min-width: 1000px) {
  /* Keep the answer in view beside the questions on wide screens. */
  .ov-check-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); gap: 40px; align-items: start; }
  .ov-check-wrap .ov-result { position: sticky; top: calc(var(--header-h) + 24px); margin-top: 0; }
}
/* Legends sit below the rule, not inside it. */
.ov-check-form legend { float: left; width: 100%; margin-bottom: 4px; }
.ov-check-form legend + * { clear: both; }
.ov-result-box .ov-h-sub { font-size: clamp(22px, 2.2vw, 27px); line-height: 1.2; }
.ov-crumbs ol { align-items: center; }
.ov-crumbs li { display: inline-flex; align-items: center; }
.ov-pager + .ov-disclaimer { margin-top: 24px; }

/* ---------- "Something's gone wrong?" in the header ---------- */
/* On wide screens it sits at the end of the menu, set apart; on phones it leads the menu. */
.ov-nav .ov-urgent { margin-left: auto; font-weight: 600; border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 0 12px; }
.ov-nav .ov-urgent:hover { background: var(--ink); color: var(--paper); }
.ov-nav a[aria-current="true"] { border-bottom-color: var(--ink); }
@media (max-width: 759px) {
  .ov-nav .ov-urgent { order: -1; margin: 6px 0 8px; border: 1.5px solid var(--ink); justify-content: center; }
  .ov-nav a[aria-current="true"] { border-bottom-color: var(--rule); font-weight: 600; }
  .ov-nav a[aria-current="true"]::before { content: ''; width: 3px; height: 20px; background: var(--ink); margin-right: 10px; }
  .ov-nav .ov-urgent[aria-current="page"]::before { display: none; }
}

/* ---------- Start here: one large link per situation (home and Tools) ---------- */
.ov-doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.ov-doors a {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; height: 100%; box-sizing: border-box;
  padding: 20px 22px; border: 1px solid var(--rule-strong); border-radius: var(--radius); text-decoration: none;
}
.ov-doors a:hover { background: var(--raised); }
.ov-doors svg { flex: none; margin-top: 6px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ov-doors .is-urgent a { border-width: 2.5px; }
.ov-door-situation { font-family: var(--serif); font-size: clamp(23px, 2.4vw, 28px); line-height: 1.2; text-wrap: balance; }
.ov-door-name { font-weight: 600; font-size: 16px; }
.ov-door-what { font-size: 16px; line-height: 1.5; color: var(--muted); }

/* ---------- Readability: no running text under 15px, no label under 13px ---------- */
.ov-small { font-size: 15px; }
.ov-minor, .ov-callout, .ov-hero-caption, .ov-crumbs ol, .ov-q-rules li, .ov-toc-title, .ov-table thead th,
.ov-facts dt, .ov-entry-date, .ov-chip, .ov-btn-outline, .js .ov-theme-btn { font-size: 15px; }
.ov-eyebrow, .ov-section-label, .ov-mono-sm, .ov-ref, .ov-habit-counts, .ov-stamp { font-size: 14px; }
.ov-disclaimer { font-size: 14.5px; }
.ov-badge, .ov-status { font-size: 13px; }
@media (min-width: 760px) { .ov-nav { font-size: 16px; } }
.ov-quote blockquote { font-size: 17px; }
.ov-habit-plain { font-size: 16px; }
@media (max-width: 640px) { .ov-doors a { padding: 16px 18px; } }
/* Each questionnaire question is a heading inside its summary (h1 > h2 order, and findable). */
.ov-q summary .ov-q-text { margin: 0; font-weight: 400; }
/* Controls that only work with scripts. The head script sets .js before the first paint, so
   they are laid out from the start instead of appearing (and shifting the page) later. */
html:not(.js) [data-needs-js] { display: none !important; }
/* Narrow screens and 400% zoom (WCAG 1.4.10): long labels wrap, About's facts stack. */
.ov-status { white-space: normal; max-width: 100%; }
.ov-facts dd { overflow-wrap: anywhere; }
@media (max-width: 480px) { .ov-facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
