/* Pages of ainonimizer: landing, upload, waiting, review. Plain CSS, no build step. */

/*
 * Colours of EvLogica (evlogica.com): primary orange #f57e20, secondary lime #b2dd4c, dark
 * grey #363636, grey #727272, light grey #fafafa. White text on the orange or on the lime is
 * hard to read (contrast 2.7:1 and 1.6:1, WCAG AA asks 4.5:1): on them the text is dark grey
 * (4.5:1 and 7.7:1). Links and hovers use a darker shade of the same orange (4.9:1 on white).
 */
:root {
    --text: #363636;
    --muted: #727272;
    /* Darker shade of the brand grey for the paragraphs of the landing: 7.0:1 on white and
       6.7:1 on the light grey (the brand grey gives 4.8:1 and 4.6:1, just above the 4.5:1 of WCAG AA). */
    --muted-strong: #595959;
    --background: #fafafa;
    --surface: #ffffff;
    --border: #e1e1e1;
    --primary: #f57e20;
    --primary-dark: #b65508;
    --primary-light: #fef0e4;
    --secondary: #b2dd4c;
    --secondary-light: #eef7d9;
    --dark: #363636;
    --focus: #363636;
    --error-text: #8f1d14;
    --error-background: #fdecea;
    --warning-text: #6b4a00;
    --warning-background: #fff6d6;
    --info-text: #363636;
    --info-background: var(--primary-light);
    --mark: var(--secondary-light);
    --radius: 8px;
    /* Titles and wordmark in Montserrat, the typeface of evlogica.com, served from this site. */
    --display: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-latin.woff2") format("woff2");
    font-weight: 500 800;
    font-style: normal;
    font-display: swap;
}

* { box-sizing: border-box; }

/* The "hidden" attribute must win over classes that set a display (e.g. .button, .busy). */
[hidden] { display: none !important; }

/* Not shown, but read by screen readers (e.g. the legend of a group shown as an accordion). */
.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; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    background: var(--background);
    /* Checkboxes and radio buttons in the brand colour, dark enough to be seen (4.9:1). */
    accent-color: var(--primary-dark);
}

.wrap { max-width: 920px; margin: 0 auto; padding: 0 1.25rem; }
.site-header .wrap, .site-footer .wrap, .landing .wrap { max-width: 1200px; }
.wrap.narrow { max-width: 760px; }

a { color: var(--primary-dark); }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Header and footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: .7rem 0; position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
.brand { font-family: var(--display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.brand-ai { color: var(--primary); }
.brand-rest { color: var(--muted); }
/* Links and languages in a row; on small screens they become a panel (see the end of the file). */
.header-menu { display: flex; align-items: center; gap: .5rem 1.5rem; margin-left: auto; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.site-nav a { color: var(--text); font-weight: 600; text-decoration: none; }
.site-nav a:hover { color: var(--primary-dark); }
/* Flags: the current language is outlined, the others are faded until pointed at. */
.language-switch { display: flex; align-items: center; gap: .3rem; }
.language-switch a { display: inline-flex; align-items: center; gap: .5rem; padding: 2px; border: 2px solid transparent; border-radius: 5px; color: var(--text); font-weight: 600; text-decoration: none; }
.language-switch a:not([aria-current="true"]) img { opacity: .55; }
.language-switch a:hover img, .language-switch a:focus-visible img { opacity: 1; }
.language-switch a[aria-current="true"] { border-color: var(--primary); }
.language-switch img { display: block; width: 24px; height: 16px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(54, 54, 54, .2); }
/* The name of the language is the text of the link: read by screen readers, shown in the panel of small screens. */
.language-name { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Menu button of small screens: three bars that become a cross while the panel is open. */
.nav-toggle { display: none; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text); cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 1.15rem; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s; }
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
.site-footer { margin-top: 3rem; padding: 2rem 0; background: var(--dark); color: #e6e6e6; font-size: .9375rem; line-height: 1.6; }
.site-footer p { margin: .4rem 0; }
.site-footer a { color: var(--secondary); }
.landing + .site-footer { margin-top: 0; }
/* On the dark parts the dark focus ring would be invisible. */
.site-footer :focus-visible { outline-color: var(--secondary); }

main.page { padding-top: 1.5rem; }
h1 { font-family: var(--display); font-size: 1.6rem; margin: .5rem 0; }
h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.lead { font-size: 1.05rem; color: var(--muted); margin-top: 0; }

/* Boxes */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1rem 0;
}
.hint { color: var(--muted); font-size: .9rem; margin: .4rem 0; }
.notice { color: var(--muted); font-size: .95rem; }
.field-label { display: block; font-weight: 600; margin-bottom: .4rem; }
.field-error { color: var(--error-text); font-weight: 600; margin: .4rem 0 0; }

.alert { border-radius: var(--radius); padding: .8rem 1rem; margin: 1rem 0; }
.alert-error { background: var(--error-background); color: var(--error-text); border-left: 4px solid var(--error-text); }
.alert-warning { background: var(--warning-background); color: var(--warning-text); border-left: 4px solid var(--warning-text); }
.alert-info { background: var(--info-background); color: var(--info-text); border-left: 4px solid var(--primary); }

/* Form controls */
input[type="file"] { font-size: 1rem; max-width: 100%; }
textarea, input[type="text"], select {
    font: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .5rem .6rem;
    background: var(--surface);
    color: var(--text);
}
textarea { width: 100%; resize: vertical; }

.button {
    display: inline-block;
    font: inherit;
    font-weight: 600;
    border: 1px solid var(--primary-dark);
    color: var(--primary-dark);
    background: var(--surface);
    border-radius: 6px;
    padding: .6rem 1.1rem;
    cursor: pointer;
    text-decoration: none;
}
.button:hover { background: var(--info-background); }
.button.primary { background: var(--primary); border-color: var(--primary); color: var(--text); }
.button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.button.large { padding: .8rem 1.4rem; font-size: 1.05rem; }
.button.secondary { border-color: var(--border); color: var(--muted); }
.button.small { padding: .3rem .7rem; font-size: .9rem; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0; }

/* Checkboxes of the categories, in groups */
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: .75rem; }
.group { border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .9rem .8rem; margin: 0; }
.group legend { font-weight: 700; padding: 0 .3rem; }
.category { display: flex; gap: .5rem; align-items: flex-start; padding: .2rem 0; cursor: pointer; }
.category input { margin-top: .3rem; }
.group-toggle { font-size: .9rem; color: var(--muted); border-bottom: 1px dashed var(--border); padding-bottom: .4rem; margin-bottom: .2rem; }
.counter { float: right; }

/* Upload: a file or a pasted text. Only the panel of the chosen one is shown; browsers without
   :has() show both, and the server uses the choice. */
.source-switch { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; padding: 0; margin: 0 0 1rem; }
.source-option { display: flex; gap: .4rem; align-items: center; border: 1px solid var(--border); border-radius: 6px; padding: .45rem .9rem; cursor: pointer; font-weight: 600; }
.source-option:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.upload-form:has(input[name="source"][value="file"]:checked) .source-text,
.upload-form:has(input[name="source"][value="text"]:checked) .source-file { display: none; }

/* Optional groups of categories (config/evlogica.php): a full-width accordion under the others. */
.group-details { grid-column: 1 / -1; border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .9rem; }
.group-details > summary { font-weight: 700; cursor: pointer; }
.group-details[open] > summary { margin-bottom: .3rem; }
.group-details > .group { border: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 1rem; }
.group-details > .group > .hint, .group-details > .group > .group-toggle { grid-column: 1 / -1; }

/* Waiting for the analysis */
.busy { display: flex; gap: .75rem; align-items: center; background: var(--info-background); color: var(--info-text); border-radius: var(--radius); padding: 1rem; }
.busy[hidden] { display: none; }
.spinner { width: 1.4rem; height: 1.4rem; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.progress { width: 100%; height: 1.1rem; accent-color: var(--primary); }
.progress-text { font-weight: 600; margin: .5rem 0 0; }

/* Review: the data found */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.toolbar-buttons { display: flex; gap: .5rem; }
.countdown { margin: 0; color: var(--muted); font-size: .95rem; }
.countdown.expired { color: var(--error-text); font-weight: 600; }

.entities { list-style: none; padding: 0; margin: 1rem 0; }
.entity { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .6rem; }
.entity:has(input[data-entity]:not(:checked)) { opacity: .6; border-style: dashed; }
.entity-main { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; cursor: pointer; }
.badge { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--info-background); color: var(--info-text); border-radius: 4px; padding: .1rem .45rem; font-size: .9rem; }
.mentions { font-weight: 600; overflow-wrap: anywhere; }
.occurrences { color: var(--muted); font-size: .9rem; }
.context { margin: .4rem 0 0 1.6rem; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.category-name { display: inline-block; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; margin-right: .5rem; color: var(--text); }
mark { background: var(--mark); color: var(--text); padding: 0 .1rem; }
.empty { color: var(--muted); }

.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.row input[type="text"] { flex: 1 1 16rem; }
.row-text { flex: 1 1 16rem; overflow-wrap: anywhere; }
.row select { flex: 0 1 18rem; max-width: 100%; }

.result { background: var(--info-background); color: var(--info-text); border-radius: var(--radius); padding: 1rem; }
.result.error { background: var(--error-background); color: var(--error-text); }
.result p { margin: .25rem 0; }

@media (max-width: 600px) {
    h1 { font-size: 1.35rem; }
    .actions .button { width: 100%; text-align: center; }
}

/* Small screens: brand, the button that opens the tool and the menu button; links and languages
   in a panel under them. Without scripts (no "js" on <html>) the panel is always open. */
@media (max-width: 760px) {
    .brand { font-size: 1.35rem; margin-right: auto; }
    .nav-toggle:not([hidden]) { display: grid; }
    .header-inner { gap: .6rem .75rem; }
    .header-menu { order: 5; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0; }
    .js .header-menu:not(.open) { display: none; }
    .site-nav { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav a { padding: .8rem 0; border-top: 1px solid var(--border); }
    .language-switch { gap: 1rem; padding: .8rem 0 .3rem; border-top: 1px solid var(--border); }
    .language-switch a { padding: .25rem .5rem; }
    .language-name { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
}

/* Landing page */
.landing {
    /* The same space above and below every section. */
    --section-space: clamp(3.5rem, 7vw, 5.5rem);
    font-size: 1.0625rem;
    line-height: 1.6;
}
.landing h1, .landing h2, .landing h3 { font-family: var(--display); letter-spacing: -.015em; }
/* Paragraphs: never longer than about 70 characters. */
.landing p { max-width: 68ch; }

/* Opening: the claim on the left, the same document before and after on the right (half the width). */
.hero { background: var(--surface); padding: var(--section-space) 0; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 800; line-height: 1.08; margin: 0 0 1.25rem; }
.hero-lead { font-size: 1.2rem; color: var(--muted-strong); margin: 0; max-width: 34rem; }
.hero .actions { margin: 1.75rem 0 1.25rem; }

/* A sheet of paper: file name on top, the original text, a tear line, the anonymized text. */
.sheet { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 4px 14px 4px 4px; box-shadow: 0 18px 40px rgba(54, 54, 54, .13), 0 2px 4px rgba(54, 54, 54, .06); transform: rotate(1deg); }
.sheet-name { padding: .75rem 2rem; border-bottom: 1px solid var(--border); color: var(--muted-strong); font-size: .9375rem; font-weight: 600; }
.sheet-part { padding: 1.5rem 2rem 1.75rem; }
.sheet-part.after { border-top: 2px dashed var(--border); background: var(--background); border-radius: 0 0 4px 4px; }
.sheet-tag { display: inline-block; margin: 0 0 .6rem; font-size: .9375rem; font-weight: 700; border-radius: 4px; padding: .1rem .6rem; }
.sheet-part.before .sheet-tag { background: var(--primary-light); }
.sheet-part.after .sheet-tag { background: var(--secondary); }
.sheet-text { margin: 0; font-size: 1.15rem; line-height: 2; overflow-wrap: anywhere; }
.sheet-part.before mark { background: none; border-bottom: 2px solid var(--primary); border-radius: 2px; padding: 0; }
/* The labels are literal text put in the document: shown as written, in a fixed-width face. */
.sheet-part.after mark { background: var(--secondary-light); border: 1px solid var(--secondary); border-radius: 4px; padding: .05rem .3rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82em; font-weight: 600; }

/*
 * The example in motion: one datum at a time lights up in "before" and its label is written in
 * "after" (the n-th datum and the n-th label go together). Nothing changes size, so the text
 * never moves. Only for who has not asked for less motion: the others see the labels, still.
 */
@media (prefers-reduced-motion: no-preference) {
    .sheet-part.before mark { animation: datum-found 12s infinite both; }
    .sheet-part.after mark { animation: label-written 12s infinite both; }
    .sheet-text mark:nth-of-type(2) { animation-delay: .8s; }
    .sheet-text mark:nth-of-type(3) { animation-delay: 1.6s; }
    .sheet-text mark:nth-of-type(4) { animation-delay: 2.4s; }
    .sheet-text mark:nth-of-type(5) { animation-delay: 3.2s; }
    .sheet-text mark:nth-of-type(n+6) { animation-delay: 4s; }
}
@keyframes datum-found {
    0%, 2% { background-color: transparent; }
    5%, 9% { background-color: var(--primary-light); box-shadow: 0 0 0 .2em var(--primary-light); }
    13%, 100% { background-color: transparent; box-shadow: 0 0 0 .2em transparent; }
}
/* The label leaves an empty dashed slot, then appears when its datum has been found. */
@keyframes label-written {
    0%, 7% { color: transparent; background-color: transparent; border-color: var(--border); border-style: dashed; }
    11%, 96% { color: var(--text); background-color: var(--secondary-light); border-color: var(--secondary); border-style: solid; }
    100% { color: transparent; background-color: transparent; border-color: var(--border); border-style: dashed; }
}

/* The three promises: the only dark band of the page, so that nothing competes with it. */
.promises { background: var(--dark); color: #fff; padding: var(--section-space) 0; }
.promises h2 { color: var(--secondary); }
.promise-list { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.promise-list li { border-top: 3px solid var(--primary); padding-top: 1.1rem; }
.promise-list h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); font-weight: 700; line-height: 1.2; margin: 0 0 .7rem; }
/* Light grey on the dark band: 8.8:1. */
.promise-list p { margin: 0; color: #e6e6e6; }
.promises :focus-visible { outline-color: var(--secondary); }

.band { padding: var(--section-space) 0; }
.band.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.landing .section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.15; margin: 0; }
.section-lead { color: var(--muted-strong); margin: .75rem 0 0; }

/* Title on the left, content on the right. */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem 3.5rem; align-items: start; }
.split > .section-title, .split > .section-head { position: sticky; top: 5.5rem; }
.entries { display: grid; gap: 1.75rem; }
.entry { border-left: 3px solid var(--primary); padding-left: 1.1rem; }
.entry h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 .35rem; }
.entry p { color: var(--muted-strong); margin: 0; }

/* Three steps in a row, joined by a line: it is a sequence. */
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.step { position: relative; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 1.4rem; left: 3.6rem; right: -1.9rem; border-top: 2px dashed var(--border); }
.step-number { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; background: var(--primary); color: var(--text); font-family: var(--display); font-size: 1.25rem; font-weight: 800; margin-bottom: 1rem; }
.step h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 .4rem; }
.step p { color: var(--muted-strong); margin: 0; }

/* What the tool does for the document: cards with an icon, three in a row (two, then one). */
.features { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
/* Icons of public/images/icons.svg: outline in the dark orange on the light orange. */
.feature-icon { display: block; width: 2.75rem; height: 2.75rem; padding: .6rem; margin-bottom: 1rem; border-radius: 10px; background: var(--primary-light); color: var(--primary-dark); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 .4rem; }
.feature p { color: var(--muted-strong); margin: 0; }

/* Lists with a tick in the secondary colour (dark tick: white would not be readable). */
.checklist { list-style: none; padding: 0; margin: .5rem 0 0; }
.checklist li { position: relative; padding: .3rem 0 .3rem 1.8rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: .5rem; display: grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--secondary); color: var(--text); font-size: .7rem; font-weight: 800; line-height: 1; }
.checklist.inline { display: flex; flex-wrap: wrap; gap: 0 1.25rem; font-weight: 600; font-size: 1rem; }

/* Plans: name, price, a line, what is included, the button at the bottom. */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--background); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; }
.plan-featured { background: var(--surface); border: 2px solid var(--primary); box-shadow: 0 14px 34px rgba(245, 126, 32, .16); }
.plan-badge { position: absolute; top: -.9rem; left: 1.75rem; margin: 0; white-space: nowrap; background: var(--primary); color: var(--text); font-size: .9375rem; font-weight: 700; border-radius: 999px; padding: .15rem .9rem; }
.plan h3 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.plan-price { margin: .75rem 0 0; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); color: var(--muted-strong); }
.plan-price strong { display: block; color: var(--text); font-family: var(--display); font-size: 3rem; font-weight: 800; line-height: 1.1; }
.plan .checklist { flex: 1; margin: 1.1rem 0 1.75rem; }
.plan .button { text-align: center; padding: .8rem 1.1rem; }

/* Questions: the whole row opens the answer; the arrow turns. */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem .75rem; font-family: var(--display); font-weight: 700; font-size: 1.1rem; line-height: 1.35; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex: none; width: .6rem; height: .6rem; margin: 0 .35rem .25rem; border-right: 2px solid var(--primary-dark); border-bottom: 2px solid var(--primary-dark); transform: rotate(45deg); transition: transform .25s; }
.faq-item[open] summary::after { transform: translateY(.3rem) rotate(-135deg); }
.faq-item summary:hover { background: var(--primary-light); }
.faq-item p { color: var(--muted-strong); margin: 0; padding: 0 .75rem 1.25rem; }
@media (prefers-reduced-motion: no-preference) {
    /* The answer comes in softly everywhere; where the browser can, the row also grows smoothly. */
    .faq-item[open] p { animation: answer-shown .3s ease-out; }
    @supports (interpolate-size: allow-keywords) {
        .faq-item { interpolate-size: allow-keywords; }
        .faq-item::details-content { block-size: 0; overflow: hidden; transition: block-size .3s ease, content-visibility .3s allow-discrete; }
        .faq-item[open]::details-content { block-size: auto; }
    }
}
@media (prefers-reduced-motion: reduce) {
    .faq-item summary::after, .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { transition: none; }
}
@keyframes answer-shown { from { opacity: 0; transform: translateY(-.4rem); } }

/*
 * Closing call in the primary colour. The text is dark grey: 4.5:1 on the orange, while white
 * would give 2.7:1. The button is the only white element of the band, with a dark border.
 */
.cta { background: var(--primary); color: var(--text); text-align: center; border: 0; }
.cta h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; margin: 0 0 .5rem; }
.cta p { margin: 0 auto 2rem; font-size: 1.15rem; font-weight: 500; }
.button.on-primary { background: var(--surface); border: 2px solid var(--dark); color: var(--text); font-size: 1.2rem; font-weight: 700; padding: 1rem 2.5rem; box-shadow: 0 6px 0 rgba(54, 54, 54, .28); }
.button.on-primary:hover { background: var(--dark); color: #fff; }
.cta :focus-visible { outline-color: var(--dark); }

@media (max-width: 1000px) {
    .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .hero-inner, .split { grid-template-columns: minmax(0, 1fr); }
    .split > .section-title, .split > .section-head { position: static; }
    .promise-list, .steps { grid-template-columns: 1fr; gap: 1.75rem; }
    .step:not(:last-child)::after { display: none; }
    .sheet { transform: none; }
}
@media (max-width: 640px) {
    /* Never under 16px for the paragraphs. */
    .landing { font-size: 1rem; }
    .hero-lead { font-size: 1.0625rem; }
    .features { grid-template-columns: 1fr; }
    .sheet-name { padding: .6rem 1.25rem; }
    .sheet-part { padding: 1.1rem 1.25rem 1.3rem; }
    .sheet-text { font-size: 1rem; line-height: 1.9; }
    .plan { padding: 1.5rem; }
    .button.on-primary { display: block; padding: 1rem; }
}
