/* Drafter: een rustige werkplek, in het saliegroen van docs/design.md.
   Achtergrond saliegroen met een zacht verloop en een heel lichte analoge laag; alles waar je mee werkt staat op mintwit.
   Lettertypen (lokaal in /fonts): Archivo voor koppen, Sentient (hetzelfde als het logo) voor de tekst en voor alles wat jij zegt of schrijft.
   Oudere varianten staan in docs/design/varianten/. */

@font-face { font-family: 'Sentient'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/Sentient-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Sentient'; font-weight: 400; font-style: italic; font-display: swap; src: url('/fonts/Sentient-Italic.woff2') format('woff2'); }
@font-face { font-family: 'Sentient'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/Sentient-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Sentient'; font-weight: 700; font-style: italic; font-display: swap; src: url('/fonts/Sentient-BoldItalic.woff2') format('woff2'); }
@font-face { font-family: 'SentientV'; font-weight: 200 700; font-style: normal; font-display: swap; src: url('/fonts/sentient/Sentient-Variable.woff2') format('woff2'); }
@font-face { font-family: 'SentientV'; font-weight: 200 700; font-style: italic; font-display: swap; src: url('/fonts/sentient/Sentient-VariableItalic.woff2') format('woff2'); }
@font-face {
    font-family: 'Archivo';
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-style: normal;
    font-display: swap;
    src: url('/fonts/archivo-latin-wdth-normal.woff2') format('woff2');
}

/* Palet 'Salie' (zie docs/design.md): saliegroen #bfccc4, mintwit #f6fffa, olijfgoud #796635, donker olijf #473d1f. */
:root {
    --bg: #bfccc4;
    --surface: #f6fffa;
    --sunken: #d5e0d9;
    --ink: #473d1f;
    --ink-2: #54492a;
    --ink-3: #655d3c;
    --on-ink: #f6fffa;
    --line: #dbe6df;
    --line-hover: #b3c4b9;

    --accent: #796635;
    --accent-hover: #6a5827;
    --accent-soft: #e4ece6;
    --marker: #d9d3b2;
    --ok-tint: #dfe9e2;
    --error: #9b2c2c;
    --error-tint: #F8E0E0;

    --bg-a: rgba(232, 244, 237, 0.55);
    --bg-b: rgba(104, 136, 120, 0.22);
    --analoog: 0.55;

    --r-card: 12px;
    --r-md: 10px;
    --r-pill: 999px;
    --shadow: 0 1px 2px rgba(54, 41, 9, 0.06), 0 12px 28px -20px rgba(54, 41, 9, 0.32);

    /* Koppen in Archivo, tekst en jouw eigen woorden in Sentient (hetzelfde lettertype als het logo). */
    --font-kop: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    --kop-w: 650;
    --kop-ls: -0.025em;
    --font-ui: 'SentientV', 'Sentient', Georgia, 'Times New Roman', serif;
    --font-serif: 'SentientV', 'Sentient', Georgia, 'Times New Roman', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background:
        radial-gradient(60% 45% at 8% 0%, var(--bg-a), transparent 70%),
        radial-gradient(55% 45% at 100% 8%, var(--bg-b), transparent 70%),
        radial-gradient(60% 40% at 60% 100%, color-mix(in srgb, var(--marker) 40%, transparent), transparent 70%),
        var(--bg);
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    position: relative;
}
/* Een heel lichte analoge laag (vlekjes en smuts) in de achtergrond. Hij ligt onder alles, dus witte vlakken blijven schoon. */
body::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: multiply; opacity: var(--analoog);
    background-image: url('/analoog-1.svg'), url('/analoog-2.svg'); background-size: 900px 1400px, 1300px 1900px; background-position: 0 0, 380px 620px;
}

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

/* Kopbalk: het merk is nummer 1, het menu is rustiger, het account het rustigst */
.topbar { background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15); border-bottom: 1px solid color-mix(in srgb, var(--line-hover) 70%, transparent); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; height: 76px; display: flex; align-items: center; gap: 40px; }

.brand { display: flex; align-items: center; text-decoration: none; flex: none; }
.brand-logo { display: block; height: 54px; width: auto; margin: -6px 0; }

.topnav { display: flex; gap: 22px; flex: 1; align-items: center; }
.topnav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}
a.topnav-item:hover { color: var(--ink); border-bottom-color: var(--line-hover); }
.topnav-item.is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.topnav-item.is-soon { color: var(--ink-3); cursor: default; }
.soon-tag { font-size: 11px; font-weight: 500; color: var(--ink-3); border: 1px solid var(--line-hover); border-radius: var(--r-pill); padding: 0 7px; }
.account { display: flex; align-items: center; gap: 14px; margin-left: auto; font-size: 13px; color: var(--ink-3); }
.account .topnav-item { font-size: 13px; color: var(--ink-3); }
.env-tag { font-size: 12px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }

/* Werkgebied */
.workspace { max-width: 1180px; margin: 0 auto; padding: 36px 24px 88px; }
.workspace.narrow { max-width: 760px; }

/* Stappen: genummerd, zoals de drie stappen bij Gonest */
.stepper { list-style: none; display: flex; align-items: center; gap: 0; margin-bottom: 40px; }
.step { display: flex; align-items: center; }
.step + .step::before { content: ''; width: 44px; height: 1px; background: var(--line-hover); margin: 0 14px; }
.step-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-3); }
.step-link { cursor: default; }
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border: 1px solid var(--line-hover); border-radius: 50%;
    font-size: 13px; font-weight: 600; color: var(--ink-3); background: var(--surface);
}
.step-label { font-size: 14.5px; font-weight: 500; }
.step.is-done .step-num { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-hover); }
.step.is-done .step-link { color: var(--ink-3); }
.step.is-current .step-num { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.step.is-current .step-link { color: var(--ink); }
.step.is-current .step-label { font-weight: 700; }

/* Titels en korte uitleg boven elke stap */
.page-title {
    font-family: var(--font-kop);
    font-size: clamp(30px, 4.4vw, 44px);
    font-weight: var(--kop-w);
    letter-spacing: var(--kop-ls);
    line-height: 1.12;
    margin-bottom: 16px;
}
.lead { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 44ch; margin-bottom: 36px; }
.column-label { font-family: var(--font-kop); font-size: 20px; font-weight: var(--kop-w); color: var(--ink); margin-bottom: 12px; }

.test-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); cursor: pointer; accent-color: var(--accent); }
.test-toggle[hidden] { display: none; }

/* Stap 1: één opnameknop in het midden, met suggesties die er zachtjes omheen zweven */
.hero { text-align: center; }
.hero .lead { margin-left: auto; margin-right: auto; margin-bottom: 8px; }

.stage { position: relative; height: 560px; max-width: 980px; margin: 0 auto; }

.record-wrap {
    position: absolute; left: 50%; top: 46%;
    transform: translate(-50%, -50%);
    display: flex; flex-direction: column; align-items: center; gap: 22px;
    z-index: 2;
}

.record {
    position: relative;
    width: 136px; height: 136px;
    border: none; border-radius: 50%;
    background: var(--ink); color: var(--on-ink);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 18px 34px -18px rgba(54, 41, 9, 0.55);
    transition: transform 0.15s, background 0.2s;
}
.record:hover { transform: scale(1.04); background: var(--accent); }
.record:active { transform: scale(0.97); }
.record:disabled { cursor: default; opacity: 0.7; transform: none; background: var(--ink); }
.record svg { width: 46px; height: 46px; fill: currentColor; }
.record .icon-stop { display: none; }

/* Zachte ringen: een wolk van rust rond de knop, die langzaam ademt */
.record::before, .record::after {
    content: ''; position: absolute; inset: -22px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    opacity: 0.35;
    animation: breathe 4s ease-in-out infinite;
    pointer-events: none;
}
.record::after { inset: -46px; opacity: 0.2; animation-delay: 1.3s; }
@keyframes breathe { 0%, 100% { transform: scale(0.96); opacity: 0.18; } 50% { transform: scale(1.06); opacity: 0.45; } }

.record.is-recording { background: var(--accent); }
.record.is-recording .icon-mic { display: none; }
.record.is-recording .icon-stop { display: block; }
.record.is-recording::before, .record.is-recording::after { animation-duration: 1.6s; border-width: 2px; opacity: 0.5; }

.record-hint { font-size: 15px; font-weight: 500; color: var(--ink-2); min-height: 24px; max-width: 28ch; }
.record-hint .time { font-family: var(--font-ui); font-size: 22px; font-weight: 700; color: var(--ink); display: block; margin-bottom: 2px; }
.record-hint.is-warning, .record-hint.is-warning .time { color: var(--accent); }

/* Suggesties: geen knoppen, alleen wolkjes die zweven */
.chips { list-style: none; }
.chip { position: absolute; transform: translate(-50%, -50%); width: max-content; max-width: 220px; }
.chip-body {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px 18px;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 17px;
    line-height: 1.35;
    color: var(--ink-2);
    box-shadow: var(--shadow);
    animation: float 7s ease-in-out infinite;
    animation-delay: var(--d, 0s);
    animation-duration: var(--t, 7s);
    user-select: none;
    cursor: default;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.chip:nth-child(1) { left: 17%; top: 20%; --d: 0s;    --t: 7s; }
.chip:nth-child(2) { left: 50%; top: 6%;  --d: -2s;   --t: 8s; }
.chip:nth-child(3) { left: 83%; top: 20%; --d: -4s;   --t: 6.5s; }
.chip:nth-child(4) { left: 11%; top: 62%; --d: -1s;   --t: 7.5s; }
.chip:nth-child(5) { left: 89%; top: 62%; --d: -3s;   --t: 8.5s; }
.chip:nth-child(6) { left: 50%; top: 93%; --d: -5s;   --t: 7s; }

.stage-foot { text-align: center; margin-top: 8px; }
.stage-foot .status-message { max-width: 520px; margin: 0 auto 18px; text-align: center; }

/* Meldingen */
.status-message { display: none; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--r-md); margin-top: 18px; font-size: 14.5px; }
.status-message.show { display: block; }
.status-message.success { background: var(--ok-tint); border-color: var(--accent-soft); color: var(--ink); }
.status-message.error { background: var(--error-tint); border-color: #e9bcbc; color: var(--error); }
.status-message.loading { background: var(--sunken); color: var(--ink-2); }

/* Knoppen: rustig donker, warmt op naar oranje */
.actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.btn {
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--accent); }
.btn-secondary { background: transparent; border-color: var(--line-hover); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); background: var(--surface); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { font-size: 13.5px; padding: 8px 16px; }

/* Stap 2 */
.story-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 24px;
    min-height: 180px;
    max-height: 480px;
    overflow-y: auto;
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.75;
    color: var(--ink);
}
.status { text-align: center; padding: 40px; font-size: 15px; color: var(--ink-2); }
.status.error { color: var(--error); }
.spinner { display: inline-block; width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Stap 3: een strook papiertjes. Wat je zelf zei staat voorop. */
.papers-wrap { position: relative; }
.papers {
    display: flex; gap: 18px; align-items: stretch;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 24px;
    padding: 6px 4px 22px; margin: 0 -4px;
    -webkit-overflow-scrolling: touch;
}
.papers:focus-visible { outline-offset: -2px; border-radius: var(--r-card); }
.papers-nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.papers-nav[hidden] { display: none; }

.topic {
    flex: 0 0 clamp(290px, 31.5%, 400px);
    scroll-snap-align: start;
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: var(--shadow);
    padding: 26px 26px 24px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.topic:hover { border-color: var(--line-hover); }

.topic-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.topic-letter {
    flex: none; width: 46px; height: 46px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ink); color: var(--on-ink);
    font-family: var(--font-kop); font-size: 26px; font-weight: var(--kop-w); line-height: 1;
}
.topic-title { font-family: var(--font-kop); font-size: 21px; font-weight: var(--kop-w); line-height: 1.2; letter-spacing: -0.01em; }
.quotes-label { font-family: var(--font-kop); font-size: 18px; font-weight: var(--kop-w); color: var(--accent-hover); margin-bottom: 6px; }
.quotes { margin-bottom: 22px; }
blockquote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 22px;
    line-height: 1.45;
    color: var(--ink);
    border-left: 3px solid var(--marker);
    padding: 2px 0 2px 16px;
    margin: 14px 0;
}

.proposal-box { border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 18px; }
.proposal-box h2 { font-family: var(--font-kop); font-size: 18px; font-weight: var(--kop-w); line-height: 1.25; margin-bottom: 6px; }
.proposal-box p { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.proposal-box .summary { margin-bottom: 12px; }
.proposal-box .field { margin-bottom: 10px; }
.proposal-box .field-label { font-size: 14px; }
.proposal-box .field-text { font-family: var(--font-ui); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }

.topic > .btn-primary { align-self: flex-start; margin-top: auto; }

.note { font-size: 14px; color: var(--ink-2); margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.meta { font-size: 12px; color: var(--ink-3); margin-top: 20px; }

/* Smalle schermen: alles onder elkaar, de stappen compact */
@media (max-width: 900px) {
    /* Smal scherm: de knop eerst, de suggesties daaronder als losse wolkjes. */
    .stage { height: auto; display: flex; flex-direction: column; align-items: center; gap: 28px; padding-top: 8px; }
    .record-wrap { position: static; transform: none; }
    .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
    .chip { position: static; transform: none; max-width: 100%; }
    /* Telefoon en tablet: merk en account bovenaan, het menu als rustige rij eronder */
    .topbar-inner { flex-wrap: wrap; height: auto; padding: 8px 16px 0; gap: 0 16px; }
    .brand-logo { height: 46px; margin: -4px 0; }
    .account { order: 2; }
    .topnav { order: 3; flex: 0 0 100%; gap: 20px; overflow-x: auto; padding: 4px 0 0; }
    .topnav-item { padding: 8px 0; white-space: nowrap; }
    .topnav-item.is-soon { display: none; }
    .topic { flex-basis: 84%; }
}
@media (max-width: 560px) {
    .step + .step::before { width: 16px; margin: 0 8px; }
    .step:not(.is-current) .step-label { display: none; }
    .workspace { padding: 24px 16px 64px; }
    .env-tag { display: none; }
    .topic { padding: 22px 20px 20px; }
    blockquote { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== Stap 3: kaarten met verhaal, nut en doelen ===== */
.workspace.narrow-wide { max-width: 860px; }
.text-link { font-size: 14px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover { color: var(--ink); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent-hover); background: var(--accent-soft); border-radius: var(--r-pill); padding: 4px 12px; }

.topic .summary { color: var(--ink-2); margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field-label { font-family: var(--font-kop); font-size: 16px; font-weight: var(--kop-w); color: var(--ink); margin: 0 0 4px; padding: 0; }
.field-text { font-family: var(--font-serif); font-size: 17px; line-height: 1.6; color: var(--ink); margin: 0; }

.goals { display: grid; gap: 8px; margin: 6px 0 18px; }
.goal {
    position: relative;
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1.5px solid var(--line-hover);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.goal:hover { border-color: var(--accent); background: var(--surface); }
.goal-input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.goal-box {
    flex: none; width: 22px; height: 22px; margin-top: 1px;
    border: 2px solid var(--ink-3); border-radius: 50%; background: var(--surface);
    display: inline-flex; align-items: center; justify-content: center;
}
.goal-box::after { content: '✓'; font-size: 14px; font-weight: 700; color: var(--on-ink); opacity: 0; }
.goal-input:checked ~ .goal-box { background: var(--ink); border-color: var(--ink); }
.goal-input:checked ~ .goal-box::after { opacity: 1; }
.goal-input:focus-visible ~ .goal-box { outline: 3px solid var(--accent); outline-offset: 2px; }
.goal.is-selected { border-color: var(--ink); background: var(--accent-soft); }
.goal-body { display: grid; gap: 2px; }
.goal-name { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.goal-text { font-size: 14px; color: var(--ink-2); line-height: 1.45; }

/* ===== Stap 4: schrijven met suggesties in de kantlijn ===== */
.writer-head { margin-bottom: 24px; }
.writer-head .page-title { margin-bottom: 12px; }
.writer-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.writer-head .lead { margin-bottom: 0; }

.writer { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }

.editor { min-width: 0; }
.meter { margin-bottom: 12px; }
.meter-bar { height: 6px; background: var(--sunken); border-radius: var(--r-pill); overflow: hidden; }
.meter-fill { height: 100%; width: 100%; background: var(--accent); border-radius: var(--r-pill); transition: width 0.25s, background 0.25s; }
.meter-fill.is-ok { background: var(--accent); }
.meter-text { font-size: 13px; color: var(--ink-2); margin-top: 8px; }

.writer-input {
    display: block;
    width: 100%;
    min-height: 520px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: var(--shadow);
    padding: 28px 30px;
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.75;
    color: var(--ink);
    resize: vertical;
    outline: none;
}
.writer-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.exportbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.save-state { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.save-state.is-error { color: var(--error); }
.hint-line { font-size: 13px; color: var(--ink-3); margin-top: 14px; max-width: 70ch; }
.editor .status-message { margin-top: 14px; }
.writer-help { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 14px; overflow-wrap: anywhere; }
.pill[hidden] { display: none; }
.part-note { font-size: 14px; line-height: 1.45; color: var(--ink-2); margin-bottom: 10px; }
.part-jump { background: none; border: none; padding: 0; cursor: pointer; font-family: var(--font-ui); }

.margin { position: sticky; top: 84px; max-height: calc(100vh - 108px); overflow-y: auto; padding-right: 4px; }
.part { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: 10px; transition: border-color 0.15s, box-shadow 0.15s; }
.part.is-current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.part-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; background: transparent; border: none; cursor: pointer; font-family: var(--font-ui); text-align: left; }
.part-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sunken); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.part.is-current .part-num { background: var(--ink); color: var(--on-ink); }
.part-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.part-count { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.part-body { display: none; padding: 0 14px 14px; }
.part.is-current .part-body { display: block; }
.part-tips { list-style: none; display: grid; gap: 10px; margin-bottom: 12px; }
.tip { font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.tip-text { display: block; }
.tip-quote { display: block; font-family: var(--font-serif); font-style: italic; font-size: 13.5px; color: var(--ink-3); margin-top: 3px; }
.bridge { border-top: 1px dashed var(--line-hover); padding-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.bridge-label { display: block; font-size: 13px; font-weight: 700; color: var(--accent-hover); margin-bottom: 2px; }

.origin { margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.origin summary { cursor: pointer; font-weight: 600; }
.origin-text { font-family: var(--font-serif); font-size: 15px; line-height: 1.7; margin-top: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); max-height: 280px; overflow-y: auto; }

/* ===== Mijn verhalen ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-filter { font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; padding: 7px 14px; border: 1px solid var(--line-hover); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.chip-filter:hover { border-color: var(--ink-2); color: var(--ink); }
.chip-filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.sort select { font-family: var(--font-ui); font-size: 14px; padding: 7px 12px; border: 1px solid var(--line-hover); border-radius: var(--r-md); background: var(--surface); color: var(--ink); }

.story-list { display: grid; gap: 14px; }
.story-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 22px 24px; }
.story-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.story-head h2 { font-family: var(--font-kop); font-size: 21px; font-weight: var(--kop-w); letter-spacing: -0.01em; line-height: 1.25; }
.story-preview { font-family: var(--font-serif); font-size: 16px; line-height: 1.6; color: var(--ink-2); margin-bottom: 10px; }
.story-meta { font-size: 12.5px; color: var(--ink-3); margin-bottom: 14px; }
.story-actions { display: flex; gap: 10px; }
.story-actions .btn { text-decoration: none; display: inline-block; }
.empty { text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed var(--line-hover); border-radius: var(--r-card); }
.empty h2 { font-family: var(--font-kop); font-weight: var(--kop-w); font-size: 24px; margin-bottom: 8px; }
.empty p { color: var(--ink-2); margin-bottom: 20px; }

@media (max-width: 900px) {
    .writer { grid-template-columns: 1fr; }
    .margin { position: static; max-height: none; }
}
@media (max-width: 560px) {
    .writer-input { padding: 18px 16px; font-size: 17px; line-height: 1.65; min-height: 420px; }
    .writer-help { padding: 10px 12px; font-size: 14px; }
}

/* Laadstanden: een boek waar doorheen wordt gebladerd (lezen) en een pen die schrijft (stap 4) */
.lezen { display: flex; flex-direction: column; align-items: center; padding: 28px 0 12px; }
.lezen-tekst { margin-top: 22px; font-size: 15px; color: var(--ink-2); text-align: center; max-width: 36ch; }

.boek { position: relative; width: 320px; height: 200px; perspective: 1000px; transform: rotate(-1.2deg); filter: drop-shadow(0 12px 16px rgba(54, 41, 9, 0.2)); }
.boek::before { content: ''; position: absolute; inset: 6px -8px -8px; background: var(--ink); border-radius: 6px 14px 10px 8px / 8px 10px 14px 6px; z-index: -1; }
.boek-links, .boek-rechts, .blad {
    position: absolute; top: 0; width: 160px; height: 200px;
    background: var(--surface); border: 1.5px solid var(--line-hover);
}
.boek-links { left: 0; padding: 16px 12px 12px 18px; border-radius: 10px 2px 2px 12px / 12px 2px 2px 10px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.boek-links span { display: block; font-family: var(--font-serif); font-size: 12.5px; line-height: 1.5; color: var(--ink); white-space: nowrap; overflow: hidden; }
.boek-links span.is-leeg { height: 2px; margin-top: 10px; background: var(--line-hover); width: 80%; }
.boek-rechts, .blad {
    left: 160px; border-radius: 2px 12px 10px 2px / 2px 10px 12px 2px;
    background: repeating-linear-gradient(var(--surface) 0 17px, var(--line) 17px 18px);
}
.blad { transform-origin: left center; backface-visibility: hidden; filter: brightness(calc(1 - (2 - var(--i)) * 0.07)); }
/* Alleen het voorste blad (laatste in de stapel) beweegt: een stukje omhoog, naar de kijker toe, en terug. */
.boek:not(.schrijft) .blad:last-child { animation: blad 3.6s ease-in-out infinite; }
@keyframes blad {
    0%, 15% { transform: rotateY(0deg); }
    45% { transform: rotateY(-32deg); }
    75%, 100% { transform: rotateY(0deg); }
}

.schrijf-papier { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.schrijf-regel { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.schrijf-regel.r1 { animation: draw1 10s linear infinite; }
.schrijf-regel.r2 { animation: draw2 10s linear infinite; }
.schrijf-regel.r3 { animation: draw3 10s linear infinite; }
.schrijf-regel.r4 { animation: draw4 10s linear infinite; }
@keyframes draw1 { 0% { stroke-dashoffset: 1; opacity: 1; } 18%, 90% { stroke-dashoffset: 0; opacity: 1; } 97%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes draw2 { 0%, 22% { stroke-dashoffset: 1; opacity: 1; } 36%, 90% { stroke-dashoffset: 0; opacity: 1; } 97%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes draw3 { 0%, 40% { stroke-dashoffset: 1; opacity: 1; } 56%, 90% { stroke-dashoffset: 0; opacity: 1; } 97%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes draw4 { 0%, 60% { stroke-dashoffset: 1; opacity: 1; } 70%, 90% { stroke-dashoffset: 0; opacity: 1; } 97%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.schrijf-pen { position: absolute; left: 0; top: 0; color: var(--ink); animation: pen 10s linear infinite; pointer-events: none; }
@keyframes pen {
    0% { transform: translate(11px, 10px); opacity: 1; }
    18% { transform: translate(122px, 10px); }
    22% { transform: translate(11px, 46px); }
    36% { transform: translate(108px, 46px); }
    40% { transform: translate(11px, 82px); }
    56% { transform: translate(122px, 82px); }
    60% { transform: translate(11px, 118px); }
    70% { transform: translate(66px, 118px); }
    90% { transform: translate(66px, 118px); opacity: 1; }
    97%, 100% { transform: translate(11px, 10px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .blad, .schrijf-regel, .schrijf-pen { animation: none !important; }
    .schrijf-regel { stroke-dashoffset: 0; }
    .schrijf-pen { transform: translate(66px, 118px); }
}

/* ===== Intake (profiel) ===== */
.groep { border: 0; margin: 0 0 34px; padding: 0; min-width: 0; }
.groep > .column-label { margin-bottom: 14px; padding: 0; }
.veld-rij { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.veld label, .veld-titel { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; padding: 0; }
.verplicht, .veld-hulp-inline { font-weight: 400; color: var(--ink-3); }
.veld input[type="text"], .veld textarea {
    display: block; width: 100%;
    font-family: var(--font-serif); font-size: 17px; line-height: 1.4; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-hover); border-radius: var(--r-md);
    padding: 11px 14px; outline: none;
}
.veld textarea { line-height: 1.6; resize: vertical; min-height: 180px; }
.veld input::placeholder, .veld textarea::placeholder { color: var(--ink-3); opacity: 0.8; }
.veld input:focus, .veld textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.veld input[aria-invalid="true"], .veld textarea[aria-invalid="true"] { border-color: var(--error); }
.veld-fout { font-size: 13.5px; color: var(--error); min-height: 0; margin-top: 4px; }
.veld-fout:empty { display: none; }
.veld-hulp { font-size: 13.5px; color: var(--ink-3); margin-top: 6px; }
.teller { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.teller.is-over { color: var(--error); font-weight: 600; }
.goal.is-uit { opacity: 0.5; cursor: not-allowed; }
.goal.is-uit .goal-input { cursor: not-allowed; }
.intake-acties { align-items: center; flex-wrap: wrap; }
.privacy-regel { text-align: right; }
.test-bar { background: var(--accent-soft); border: 1px solid var(--line-hover); border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 28px; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; font-size: 14.5px; }
.test-bar[hidden] { display: none; }
.test-bar-knoppen { display: flex; flex-wrap: wrap; gap: 8px; }
.test-bar .btn { text-decoration: none; display: inline-block; }
.resultaat-json { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; margin-bottom: 8px; }
@media (max-width: 640px) {
    .veld-rij { grid-template-columns: 1fr; }
    .privacy-regel { text-align: left; }
    .intake-acties .btn { flex: 1 1 100%; text-align: center; }
}
.veld { margin-bottom: 16px; }
.groep .goals { border: 0; padding: 0; min-width: 0; margin: 4px 0 20px; }
.groep .goals > .veld-titel { margin-bottom: 8px; }

/* ===== Accountmenu ===== */
.account-menu-wrap { position: relative; }
.account-knop { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1.5px solid var(--line-hover); color: var(--ink); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.account-knop:hover, .account-knop[aria-expanded="true"] { border-color: var(--ink); background: var(--accent-soft); }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line-hover); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 6px; }
.account-menu[hidden] { display: none; }
.account-mail { font-size: 12.5px; color: var(--ink-3); padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-wrap: anywhere; }
.account-item { display: block; width: 100%; text-align: left; font: inherit; font-size: 14.5px; font-weight: 500; color: var(--ink); background: none; border: 0; border-radius: 8px; padding: 9px 12px; cursor: pointer; text-decoration: none; }
.account-item:hover, .account-item:focus-visible { background: var(--accent-soft); }

/* ===== Logo: de golven bewegen één keer bij hover of focus (zie logo.js) ===== */
.logo-golf { mix-blend-mode: multiply; color: var(--accent); }
.logo-svg path[fill] { fill: var(--ink); }
.logo-svg .l { stroke: currentColor; stroke-width: 32.3077; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.logo-svg.speelt .l { animation: golf 5.5s both; animation-delay: calc(var(--d) - 1.4s); }   /* de stilte aan het begin overgeslagen: het beweegt meteen */
.logo-svg .a { --d: 0s; } .logo-svg .b { --d: .12s; } .logo-svg .c { --d: .24s; }
@keyframes golf {
    0%, 29.09% { stroke-dashoffset: 0; animation-timing-function: cubic-bezier(.9, 0, .4, 1); }
    46.36% { stroke-dashoffset: -1; animation-timing-function: step-end; }
    54.55% { stroke-dashoffset: 1; animation-timing-function: cubic-bezier(.5, 0, .1, 1); }
    74.55%, 100% { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) { .logo-svg .l { animation: none !important; } }

/* ===== Bevestiging na de intake: een papiertje waarop het vinkje zichzelf tekent ===== */
.bevestiging { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 0 40px; }
.bevestiging .lead { margin-bottom: 26px; }
.papiertje {
    position: relative; width: 150px; height: 190px; margin: 14px 0 34px; transform: rotate(-2deg);
    filter: drop-shadow(0 12px 16px rgba(54, 41, 9, 0.2));
}
.papiertje::after {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(var(--surface) 0 17px, var(--line) 17px 18px);
    border: 1.5px solid var(--line-hover); border-radius: 4px 12px 10px 6px / 6px 10px 12px 4px;
}
.papiertje::before { content: ''; position: absolute; inset: 6px -8px -8px; background: var(--ink); border-radius: 6px 14px 10px 8px / 8px 10px 14px 6px; z-index: -1; }
.papiertje svg { z-index: 1; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vinkje { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: vinkje 1s 0.35s ease-out forwards; }
@keyframes vinkje { to { stroke-dashoffset: 0; } }
#klaar[hidden], #testdeel[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .vinkje { animation: none; stroke-dashoffset: 0; } }
