/* apoplan.com — ApoPlan brand v1 (docs/brand/ApoPlan_brand_v1/README.md).
   Colours come only from tokens.css (loaded before this file). Journal devices instead of
   decoration: navy header bar, running head, thick blue section rule, cream Key Points box
   with a 6 px navy top edge, Figure 1 in figure-grey boxes, Table 1 with an ink top rule,
   blue drop cap. Square boxes, hairlines, no shadows, no gradients. */

@font-face { font-family: "Lora"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/lora-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.5; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; color: var(--navy); margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: var(--space-4); }
.read { max-width: 640px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 30px; background: var(--paper); color: var(--navy); padding: 8px 12px; border: 2px solid var(--navy); z-index: 10; }
.skip:focus { left: 16px; }

/* Header bar + masthead with running head */
.bar { height: var(--bar-header); background: var(--navy); }
.mast { border-bottom: var(--rule-hair) solid var(--line); }
.mast .wrap { display: flex; align-items: center; gap: var(--space-4); padding-block: 10px; }
.mast .logo { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; }
.mast .logo img { height: 34px; width: auto; display: block; }
.runhead { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.mast nav { display: flex; gap: 2px; }
.mast nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 14px; font-weight: 600; color: var(--link); text-decoration: none; }
.mast nav a:hover { text-decoration: underline; }
.mast nav a[aria-current="page"] { color: var(--ink-muted); font-weight: 400; }
@media (max-width: 760px) { .runhead { display: none; } }
.runhead-sm { display: none; font-size: 12px; line-height: 16px; color: var(--ink-muted); padding: 6px 0 0; }
@media (max-width: 760px) { .runhead-sm { display: block; } }

/* Type */
.eyebrow { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--navy); margin: 0 0 var(--space-3); }
.display { font-size: 32px; line-height: 38px; }
@media (min-width: 900px) { .display { font-size: 44px; line-height: 50px; } }
.title { font-size: 24px; line-height: 30px; }
.lede { font-size: 18px; line-height: 28px; }
.small { font-size: 14px; line-height: 20px; }
.fine { font-size: 12px; line-height: 17px; color: var(--ink-muted); }

/* Sections */
section { padding-block: var(--space-12) var(--space-2); }
.rule { display: block; width: 64px; height: var(--rule-thick); background: var(--blue); margin: 0 0 var(--space-3); }
.section-title { margin-bottom: var(--space-4); }

/* Hero: text left, Key Points right on wide screens */
.hero { padding-top: var(--space-8); }
.hero .grid { display: grid; gap: var(--space-8); }
@media (min-width: 900px) { .hero .grid { grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: start; } .hero .keypoints { margin-top: 30px; } }
.hero .lede { margin-top: var(--space-4); max-width: 34em; }
.caveat { font-size: 13px; line-height: 19px; color: var(--ink-muted); max-width: 46em; margin-top: var(--space-4); }
.status { font-size: 13px; line-height: 19px; color: var(--ink); background: var(--surface-sky); border-left: 4px solid var(--navy); padding: 10px 12px; margin: var(--space-6) 0 0; max-width: 46em; }
.status strong { font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); align-items: center; margin-top: var(--space-6); }
.textlink { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--link); text-decoration: none; }
.textlink:hover { text-decoration: underline; }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--radius-md); font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; border: 1.5px solid var(--navy); transition: background-color .15s, color .15s, transform .08s; -webkit-tap-highlight-color: transparent; }
.btn-primary { background: var(--navy); color: var(--on-navy); }
.btn-primary:hover { background: color-mix(in srgb, var(--navy) 86%, var(--ink)); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background: transparent; color: var(--navy); }
.btn-secondary:hover { background: var(--surface-sky); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .7; cursor: progress; }
@media (max-width: 480px) { .cta-row .btn { width: 100%; } }

/* Key Points box */
.keypoints { background: var(--surface-box); border-top: var(--bar-box) solid var(--navy); padding: var(--space-4) var(--space-6) var(--space-2); }
.keypoints h2 { font-size: 20px; line-height: 26px; color: var(--ink); margin-bottom: var(--space-3); }
.keypoints p { font-size: 15px; line-height: 23px; margin-bottom: var(--space-3); }
.keypoints b { color: var(--navy); font-weight: 600; margin-right: 6px; }

/* Figure 1 — four steps in figure-grey boxes */
figure.fig { margin: 0; }
figure.fig figcaption { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--navy); padding-bottom: var(--space-2); border-bottom: var(--rule-hair) solid var(--ink); margin-bottom: var(--space-4); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); counter-reset: step; }
@media (min-width: 760px) { .flow { grid-template-columns: repeat(4, 1fr); gap: var(--space-6); } }
.flow li { position: relative; background: var(--surface-figure); border: 1px solid var(--border); padding: var(--space-3) var(--space-4) var(--space-4); }
.flow li::before { counter-increment: step; content: counter(step); display: block; font-weight: 600; font-size: 20px; line-height: 26px; color: var(--ink); margin-bottom: 4px; }
@media (min-width: 760px) { .flow li:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: calc(-1 * var(--space-6)); width: var(--space-6); border-top: 1px solid var(--border); } }
.flow h3 { font-family: var(--font-sans); font-size: 15px; line-height: 21px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.flow p { font-size: 14px; line-height: 20px; margin: 0; color: var(--ink); }

/* Two/three-column text */
.cols { display: grid; gap: var(--space-6); margin-top: var(--space-8); }
@media (min-width: 760px) { .cols.two { grid-template-columns: 1fr 1fr; gap: var(--space-8); } .cols.three { grid-template-columns: repeat(3, 1fr); gap: var(--space-8); } }
.cols h3 { font-size: 18px; line-height: 24px; margin-bottom: var(--space-2); padding-top: var(--space-3); border-top: var(--rule-hair) solid var(--line); }
.cols p { font-size: 15px; line-height: 23px; margin: 0; }

/* Table 1 */
.tablewrap { overflow-x: auto; }
table.t1 { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 22px; }
table.t1 caption { text-align: left; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--navy); padding-bottom: var(--space-2); }
table.t1 thead th { background: var(--surface-box); border-top: 2px solid var(--ink); text-align: left; font-weight: 600; padding: 10px 12px; }
table.t1 td, table.t1 tbody th { padding: 12px; border-bottom: var(--rule-hair) solid var(--line); vertical-align: top; text-align: left; }
table.t1 tbody th { font-weight: 600; color: var(--ink); width: 38%; }

/* Evidence with drop cap and superscripts */
.dropcap::first-letter { float: left; font-family: var(--font-serif); font-weight: 700; color: var(--blue); font-size: 64px; line-height: 52px; padding: 6px 10px 0 0; }
.evidence p { font-size: 16px; line-height: 25px; }
sup.ref { font-size: 10px; line-height: 0; vertical-align: super; font-weight: 400; margin-left: 1px; }
sup.ref a { color: var(--link); text-decoration: none; padding: 0 1px; }
sup.ref a:hover { text-decoration: underline; }
.wtrs { font-size: 13px; line-height: 19px; color: var(--ink-muted); margin: var(--space-4) 0 0; }
.wtrs strong { color: var(--ink); font-weight: 600; }
ol.refs { margin: var(--space-3) 0 0; padding-left: 22px; font-size: 12px; line-height: 17px; color: var(--ink-muted); }
ol.refs li { margin-bottom: 5px; }
ol.refs a { color: var(--link); word-break: break-word; }

/* Waiting-list form (inside a cream box) */
.formbox { background: var(--surface-box); border-top: var(--bar-box) solid var(--navy); padding: var(--space-6); max-width: 640px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; line-height: 20px; margin-bottom: 6px; }
.field input[type="email"], .field input[type="text"] { width: 100%; min-height: 48px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink-muted); border-radius: var(--radius-sm); }
.field input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--navy); }
.field .hint { font-size: 12px; line-height: 16px; color: var(--ink-muted); margin-top: 4px; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
fieldset legend { font-weight: 600; font-size: 14px; line-height: 20px; margin-bottom: 6px; padding: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--navy); border-radius: var(--radius-pill); color: var(--navy); background: var(--paper); font-weight: 600; font-size: 15px; cursor: pointer; transition: background-color .15s, color .15s; }
.chip input:checked + span { background: var(--navy); color: var(--on-navy); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 15px; line-height: 22px; margin-bottom: 16px; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--navy); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { margin: 12px 0 14px; padding: 12px 14px; font-size: 15px; line-height: 22px; background: var(--paper); }
.msg[hidden] { display: none; }
.msg.err[hidden]:target { display: block; } /* no-JS fallback for the tester door */
.msg.ok { border-left: 4px solid var(--blue); }
.msg.err { border-left: 4px solid var(--flag); }

/* Footer */
footer { margin-top: var(--space-12); border-top: var(--rule-hair) solid var(--line); padding-block: 22px 40px; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
footer a { color: var(--link); display: inline-block; padding: 4px 0; }
footer .tester { margin-left: auto; }
@media (max-width: 480px) { footer .tester { margin-left: 0; } }

/* Tester door and legal pages */
.door { max-width: 560px; }
.door .keypoints dl, .keypoints dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; column-gap: 14px; row-gap: 8px; }
.keypoints dt { font-weight: 600; color: var(--navy); font-size: 14px; line-height: 22px; }
.keypoints dd { margin: 0 0 var(--space-2); font-size: 15px; line-height: 22px; }
@media (max-width: 400px) { .keypoints dl { grid-template-columns: 1fr; row-gap: 2px; } }
.legal h2 { font-size: 18px; line-height: 24px; margin: 26px 0 8px; }
.legal p, .legal li { font-size: 15px; line-height: 23px; }
.legal ul { padding-left: 20px; }
.legal .wrap, main > section > .wrap:has(> .door) { max-width: 672px; }

/* Business-card page (/card, /da/card): one screen, ApoPlan brand v1 devices only —
   navy header bar, wordmark, running head, blue rule, cream box with navy top edge. */
body.cardpage { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.card { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-8); display: flex; flex-direction: column; justify-content: center; }
.card-lang { display: flex; justify-content: flex-end; gap: 2px; margin: 0 -10px var(--space-6) 0; }
.card-lang a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 14px; font-weight: 600; color: var(--link); text-decoration: none; }
.card-lang a[aria-current="page"] { color: var(--ink-muted); font-weight: 400; }
.card-mark { margin: 0; line-height: 0; }
.card-mark img { width: min(306px, 78vw); height: auto; }
.card-runhead { font-size: 13px; line-height: 18px; color: var(--ink-muted); margin: var(--space-3) 0 var(--space-8); padding-bottom: var(--space-3); border-bottom: var(--rule-hair) solid var(--line); }
.card .eyebrow { font-size: 16px; line-height: 24px; margin-bottom: var(--space-4); }
.card-box { background: var(--surface-box); border-top: var(--bar-box) solid var(--navy); padding: var(--space-4) var(--space-6); }
.card-box p { margin: 0; font-size: 15px; line-height: 23px; }
.card-status { font-size: 13px; line-height: 19px; color: var(--ink-muted); margin: var(--space-6) 0 0; }
.card-status strong { color: var(--ink); font-weight: 600; }
.card-eta { font-family: var(--font-serif); font-weight: 700; font-size: 20px; line-height: 26px; color: var(--navy); margin: var(--space-3) 0 0; }
.card-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; padding: var(--space-4) var(--space-4) var(--space-6); border-top: var(--rule-hair) solid var(--line); font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.card-foot a { color: var(--link); display: inline-block; padding: 4px 0; }
.card-foot span { display: inline-block; padding: 4px 0; }
