/* MyStash 1.8 — één consistente layout, zonder oude overschrijvingen. */
:root {
  --bg:#ffffff; --surface:#ffffff; --ink:#26352a; --muted:#667368;
  --line:#e1e7df; --accent:#507c59; --accent2:#eaf2e9;
  --forest:#263f2f; --shadow:0 8px 30px rgba(24,48,28,.055);
  color:var(--ink); background:var(--bg);
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-synthesis:none;
}
*,*::before,*::after { box-sizing:border-box; }
html { scroll-behavior:auto; scroll-padding-top:12px; }
body { margin:0; min-height:100vh; overflow-x:hidden; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
button:disabled { opacity:.60; cursor:wait; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:3px solid #8ab49a; outline-offset:3px; }
a { color:inherit; text-decoration:none; }
h1,h2,h3,h4,p { margin-top:0; }
h1 { font-size:clamp(2.2rem,5.2vw,3.55rem); line-height:1.1; letter-spacing:-.052em; margin-bottom:16px; }
h1 em { color:var(--accent); font-style:normal; }
h2 { font-size:1.3rem; letter-spacing:-.025em; margin-bottom:8px; }
h3 { font-size:1.25rem; line-height:1.3; letter-spacing:-.025em; }
.muted { color:var(--muted); line-height:1.6; }
.eyebrow { display:block; font-size:.72rem; font-weight:800; letter-spacing:.115em; color:var(--accent); text-transform:uppercase; margin:0 0 10px; }
.sr-only { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
[hidden] { display:none!important; }

/* Alle pagina's gebruiken exact dezelfde horizontale uitlijning. */
.layout { width:min(100%,860px); padding:0 24px; margin:0 auto; }
.topbar { position:relative; z-index:2; isolation:isolate; display:flex; align-items:center; justify-content:space-between; gap:12px;
  width:100%; min-height:82px; padding:13px 0; border-bottom:1px solid var(--line);
  background:var(--bg); background-image:none; -webkit-backdrop-filter:none; backdrop-filter:none; }
.brand,.welcome-brand { display:inline-flex; align-items:center; gap:11px; min-width:0; }
.brand-button { border:0; background:transparent; padding:0; text-align:left; }
.brand-symbol { flex:none; display:grid; place-items:center; width:42px; height:42px; border-radius:13px; background:var(--forest); color:#e0f0da; font-size:1.55rem; }
.brand-name { color:#566d5a; font-weight:820; font-size:1.28rem; line-height:1.08; letter-spacing:-.06em; }
.brand-name>span { color:var(--accent); }
.brand-name small { display:block; margin-top:5px; color:#91a095; font-size:.58rem; line-height:1.2; font-weight:550; letter-spacing:0; }
.header-right { display:flex; align-items:center; flex:none; gap:12px; }
.private-pill { display:flex; align-items:center; gap:7px; color:var(--accent); font-size:.75rem; }
.dot,.source-dot { display:inline-block; flex:none; width:7px; height:7px; background:#76a785; border-radius:50%; }
.icon-button { padding:8px; border:0; background:transparent; color:var(--muted); font-size:1.25rem; border-radius:10px; }
.icon-button:hover { background:var(--accent2); }
.app-version { display:inline-flex; align-items:center; border:1px solid #d4e1d4; color:#526b57; border-radius:7px; padding:4px 7px; font-size:.69rem; font-weight:750; white-space:nowrap; }
.app-content { width:100%; max-width:100%; min-width:0; margin:0; padding:24px 0 calc(128px + env(safe-area-inset-bottom)); }

/* Vereenvoudigde pagina-intro en acties. */
.secondary,.primary { display:inline-flex; align-items:center; justify-content:center; gap:9px; border-radius:11px;
  padding:12px 16px; font-size:.87rem; font-weight:750; line-height:1.35; min-height:44px; transition:background .17s; }
.secondary { color:var(--forest); background:#fff; border:1px solid #d5ded4; }
.secondary:hover { background:var(--accent2); }
.primary { color:white; background:var(--forest); border:1px solid var(--forest); }
.primary:hover { background:#375840; }
.primary.inline { min-height:44px; }
.feed-status,.alert { display:flex; align-items:flex-start; gap:11px; margin:0 0 18px; padding:12px 15px;
  border:1px solid #d1e3d3; border-radius:11px; background:#ebf4eb; color:#426e4d; font-size:.85rem; line-height:1.55; overflow-wrap:anywhere; }
.feed-status p,.alert p { margin:0; flex:1; }
.feed-status>span,.alert>span { flex:none; font-weight:800; }
.feed-status button,.alert button { flex:none; margin-left:auto; border:0; background:transparent; color:inherit; font-size:1.16rem; padding:0 3px; }
.feed-status.feed-error,.alert.error { border-color:#ebcdc6; background:#fff1ed; color:#96554b; }
.alert { margin:12px 0 20px; }


/* MyStash 2.0 — lezen gaat voorop: één artikel, zonder kaart in een kaart. */
.feed-heading { margin:0 0 16px; }
.feed-heading h1 { font-size:clamp(1.75rem,4vw,2.15rem); letter-spacing:-.04em; color:var(--forest); margin:0 0 4px; }
.feed-heading p { margin:0; color:var(--muted); font-size:.88rem; line-height:1.5; }
.feed-heading-line { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.refresh-button { white-space:nowrap; flex:none; padding:10px 14px; }
.header-profile { background:transparent; border:0; font-size:.81rem; font-weight:700; padding:9px 4px; color:var(--forest); }
.header-profile:hover { text-decoration:underline; }
/* Plain reader — the whole page is the reading surface. */
.reader { width:100%; min-width:0; margin:0; padding:0; scroll-margin-top:12px; }
.reader-controls { display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:49px; border-bottom:1px solid var(--line); padding:5px 0 12px; }
.reader-controls-bottom { border-bottom:0; border-top:1px solid var(--line); padding:15px 0; margin:16px 0 0; }
.reader-count { font-size:.78rem; font-weight:700; color:var(--muted); font-variant-numeric:tabular-nums; }
.reader-arrows { display:flex; gap:8px; }
.reader-arrows button { background:transparent; border:1px solid #dfe6df; border-radius:8px; min-width:90px; min-height:36px; padding:6px 10px; font-size:.78rem; font-weight:720; color:var(--forest); }
.reader-arrows button:hover:not(:disabled) { border-color:#92aa96; background:#f5f8f5; }
.reader-arrows button:disabled { opacity:.36; cursor:default; }
.knowledge-card { width:100%; min-width:0; border:0; background:transparent; border-radius:0; box-shadow:none; padding:24px 0 5px; overflow:visible; }
.story-kicker { display:flex; justify-content:space-between; align-items:center; gap:14px; margin:0 0 14px; text-transform:none; font-size:.77rem; color:#64796a; }
.story-kicker span { font-weight:750; }
.story-kicker time { color:#86948a; flex:none; }
.story-title { font-family:ui-serif,Georgia,Cambria,"Times New Roman",serif; font-weight:720; font-size:clamp(2rem,4.3vw,2.65rem); letter-spacing:-.027em; line-height:1.18; color:#1f3025; margin:0 0 12px; overflow-wrap:anywhere; }
.story-source { font-size:.78rem; color:#78877d; margin:0 0 22px; }
.story-lead { font-size:1.13rem; font-weight:620; line-height:1.66; color:#2b3c31; margin:0 0 22px; }
.story-prose p,.story-section p { color:#343e37; font-size:1rem; line-height:1.78; margin:0; white-space:pre-line; }
.story-prose { margin:0 0 25px; }
.story-section { margin:0 0 25px; }
.story-section h3 { font-family:inherit; font-size:.98rem; font-weight:780; color:#263a2b; margin:0 0 11px; letter-spacing:0; }
.story-section ul { margin:0; padding-left:1.35rem; display:grid; gap:11px; }
.story-section li { font-size:.99rem; line-height:1.68; color:#36453b; padding-left:.13rem; }
.story-section li::marker { color:#6a876f; }
.story-why { color:#455c4c; margin:4px 0 22px; font-size:.91rem; line-height:1.66; }
.story-why strong { color:#304d38; }
.story-evidence { font-size:.73rem; color:#8d9990; margin:20px 0 15px; }
.story-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 12px; padding:13px 0 3px; border-top:1px solid var(--line); }
.story-action { border:1px solid #e1e8e1; border-radius:8px; color:#506357; background:#fff; font-size:.78rem; font-weight:670; padding:8px 10px; min-height:36px; }
.story-action:hover { border-color:#a4bba8; background:#f6f9f6; }
.story-action.selected { background:#e9f2e9; color:#325d3b; border-color:#c9ddca; }
.story-action.delete-action { margin-left:auto; border-color:transparent; color:#8e7775; }
.story-action.delete-action:hover { background:#fcf2f1; color:#b25549; }
.source-link { display:inline-block; margin:4px 0 14px; color:var(--accent); font-size:.8rem; font-weight:680; }
.source-link:hover { text-decoration:underline; }
.reader-empty { text-align:left; padding:32px 0; border-top:1px solid var(--line); }
.reader-empty h2 { margin:0 0 12px; font-size:1.35rem; }
.reader-empty p { color:var(--muted); font-size:.91rem; line-height:1.6; margin:0 0 18px; }
.feed-lower { border-top:1px solid var(--line); margin-top:22px; padding-top:24px; }
.feed-lower .archive-link { font-size:.91rem; }
.feed-lower p { font-size:.76rem; line-height:1.6; color:#8a998c; margin:17px 0 0; }
.upgrade-area { margin:0 0 18px; color:#617365; font-size:.82rem; }
.upgrade-area>p { margin:0; line-height:1.6; }
.upgrade-area .text-button { font-size:inherit; font-weight:700; }
.upgrade-error { color:#9b4d42; margin:8px 0; line-height:1.5; }
.undo-toast { position:fixed; z-index:40; bottom:calc(75px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%);
  background:var(--forest); border-radius:10px; color:#fff; box-shadow:0 12px 28px #1d2a1d20;
  padding:12px 14px; display:flex; align-items:center; gap:12px; max-width:calc(100vw - 20px); font-size:.82rem; white-space:nowrap; }
.undo-toast button { background:transparent; border:0; color:#dbf0de; font-weight:740; }
.undo-toast .undo-dismiss { color:#fff; font-size:1rem; }
.bottom-nav { display:flex; align-items:center; gap:2px; padding:5px; position:fixed; z-index:30;
  left:50%; bottom:calc(8px + env(safe-area-inset-bottom)); transform:translateX(-50%);
  width:max-content; max-width:calc(100% - 18px); border:1px solid var(--line); border-radius:12px;
  background:rgba(255,255,255,.98); box-shadow:0 5px 25px #20312017; }
.bottom-nav button { border:0; background:transparent; color:#6d7e70; display:flex; align-items:center; justify-content:center;
  gap:6px; border-radius:8px; min-height:42px; padding:9px 13px; font-weight:700; font-size:.78rem; white-space:nowrap; }
.bottom-nav button span { font-size:1rem; }
.bottom-nav button.active { background:var(--forest); color:#fff; }
.bottom-nav .nav-top { padding:7px 9px; border-left:1px solid var(--line); border-radius:0; }
.bottom-nav .nav-top span { font-size:1.2rem; }

/* Onboarding en bewerkbaar persoonlijk interesseprofiel. */
.page-head { padding:4px 0 15px; }
.page-head p { color:var(--muted); line-height:1.6; }
.settings-stack { display:grid; gap:20px; width:100%; max-width:100%; }
.settings-card { background:transparent; border:0; border-bottom:1px solid var(--line); padding:12px 0 25px; border-radius:0; min-width:0; }
.settings-card>h2 { font-size:1.3rem; }
.settings-card>.muted { font-size:.9rem; }
.settings-card.compact { margin-bottom:30px; }
.welcome-layout { width:min(100%,760px); min-height:100vh; margin:0 auto; padding:22px; }
.welcome-brand { margin:0 0 35px; }
.auth-card { background:#fff; padding:33px; border:1px solid var(--line); border-radius:20px; margin:0 auto 40px; max-width:100%; }
.auth-card .muted { margin-bottom:22px; }
.simple-footer { text-align:center; color:#9ca69e; font-size:.71rem; }
.form-stack { display:flex; flex-direction:column; gap:18px; margin-top:22px; }
.form-stack label:not(.topic),.form-label { display:flex; flex-direction:column; gap:8px; color:#3b503f; font-size:.85rem; font-weight:750; }
.form-stack label small { color:#8d9b90; font-weight:500; }
.form-stack input:not([type=checkbox]),.form-stack textarea,.form-stack select,.source-form input { width:100%; min-width:0; border:1px solid #dce4da;
  color:#24382c; border-radius:10px; background:white; padding:12px 13px; font-size:.92rem; resize:vertical; }
.subtle-note { font-size:.75rem; color:#86968a; line-height:1.6; margin:12px 0 0; }
.subtle-note a { color:var(--accent); text-decoration:underline; }
.profile-wizard { margin-top:22px; }
.profile-wizard fieldset { padding:0; border:0; min-width:0; margin:0; }
.wizard-top { margin:0 0 19px; scroll-margin-top:16px; }
.wizard-top h2 { font-size:clamp(1.13rem,2.5vw,1.5rem); margin:0 0 6px; }
.wizard-top p { margin:0; font-size:.89rem; line-height:1.55; color:var(--muted); }
.wizard-steps { display:flex; align-items:center; gap:13px; margin:0 0 15px; }
.wizard-counter { flex:none; color:var(--accent); font-size:.76rem; font-weight:800; }
.wizard-progress { display:block; width:100%; height:6px; overflow:hidden; border-radius:50px; background:#e6efe5; }
.wizard-progress i { display:block; height:100%; background:#579067; border-radius:50px; transition:width .2s ease; }
.topic-grid,.profile-wizard .topic-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.topic { position:relative; min-width:0; cursor:pointer; }
.topic input { position:absolute; opacity:0; width:1px; height:1px; }
.topic-inner { display:flex; align-items:center; gap:9px; min-width:0; min-height:56px; height:100%; padding:11px 10px;
  border:1px solid #e2e8e1; border-radius:10px; color:#52685a; font-size:.83rem; font-weight:740; line-height:1.35; }
.topic-inner>span:nth-child(2) { min-width:0; overflow-wrap:anywhere; }
.topic input:checked+.topic-inner { background:#ecf4ea; border-color:#8db798; color:#355e3f; }
.topic input:focus-visible+.topic-inner { outline:3px solid #9abc9c; }
.topic-icon { flex:0 0 25px; font-size:1.12rem; text-align:center; }
.topic-check { flex:none; margin-left:auto; opacity:0; }
.topic input:checked+.topic-inner .topic-check { opacity:1; }
.profile-wizard .subtopic-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.wizard-freeform { display:block; margin:23px 0 0; font-weight:750; font-size:.86rem; color:#39503e; }
.profile-wizard textarea,.profile-wizard select { display:block; width:100%; min-width:0; border:1px solid #dce4da;
  background:#fff; color:#26382c; border-radius:10px; padding:12px 13px; margin-top:8px; font:inherit; font-size:.91rem; }
.profile-wizard .wizard-field { margin-bottom:22px; }
.profile-wizard .wizard-field label { font-size:.86rem; font-weight:750; }
.wizard-note { margin:16px 0; font-size:.85rem; color:var(--muted); line-height:1.5; }
.discovery-toggle { display:flex!important; align-items:flex-start!important; gap:11px!important; padding:14px; margin:10px 0 20px;
  border-radius:10px; background:#f5f9f4; font-size:.86rem; }
.discovery-toggle input { accent-color:var(--accent); margin-top:3px; }
.discovery-toggle small { display:block; color:var(--muted); font-weight:500; margin-top:3px; line-height:1.55; }
.language-promise { display:flex; align-items:flex-start; gap:12px; padding:15px; background:#ebf4ec; border:1px solid #d4e6d6; border-radius:13px; }
.language-promise>span { font-size:1.25rem; }
.language-promise strong,.language-promise small { display:block; }
.language-promise strong { color:#326040; font-size:.87rem; }
.language-promise small { color:#66806e; margin-top:4px; line-height:1.55; font-size:.79rem; }
.wizard-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:11px; align-items:center; margin:23px 0 8px; }
.wizard-actions .wizard-back { margin-right:auto; }
.wizard-error { color:#913d31; padding:11px 13px; background:#fff1ed; border:1px solid #eccbc3; border-radius:10px; font-size:.85rem; }
.source-list { margin:18px 0; }
.source-row { display:flex; align-items:center; justify-content:space-between; gap:13px; padding:12px 0; border-bottom:1px solid var(--line); }
.source-row>div { min-width:0; }
.source-row strong { display:block; font-size:.83rem; }
.source-row small { display:block; margin-top:4px; font-size:.71rem; color:#839289; overflow-wrap:anywhere; }
.source-row button { flex:none; background:#f4f7f3; border:0; border-radius:9px; width:32px; height:32px; color:#87998b; }
.source-form { display:grid; gap:10px; }
.source-form .secondary { justify-self:start; }
.text-button { border:0; padding:0; background:transparent; color:var(--accent); font-weight:750; }
.checkbox-inline { display:flex!important; flex-direction:row!important; align-items:center; }
.checkbox-inline input { accent-color:var(--accent); }
.empty-state { background:#fff; border:1px solid var(--line); border-radius:18px; padding:40px 24px; text-align:center; }
.empty-icon { font-size:2.4rem; color:var(--accent); margin:0 0 12px; }
.empty-state h3 { font-size:1.28rem; }
.empty-state p { max-width:510px; margin:0 auto 20px; font-size:.89rem; color:var(--muted); line-height:1.6; }
.app-loading { min-height:80vh; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:12px; color:var(--muted); }
.spinner { border:3px solid #dce8dc; border-top-color:#608f69; width:30px; height:30px; border-radius:50%; animation:spin 1s linear infinite; }
.rotate { display:inline-block; animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.fatal-error { max-width:530px; padding:25px; margin:100px auto; }
.fatal-error h1 { font-size:1.8rem; }
.fatal-error button { background:var(--forest); border:0; border-radius:9px; padding:12px 18px; color:#fff; }

/* v1.9 — explicit profile save, errors and AI search transparency */
.wizard-actions .wizard-save{display:inline-flex;min-width:160px;}
.wizard-save-status{margin:10px 0 0;font-size:.84rem;line-height:1.5;color:var(--muted);}
.wizard-save-status.saved{color:#33623b;font-weight:680;}
.wizard-save-status.unsaved{color:#9f691f;}
.settings-error{font-size:.84rem;color:#a94539;line-height:1.5;margin:8px 0;}
.discovery-panel{background:#f2f7ef;border:1px solid #d6e6d3;border-radius:13px;margin:16px 0;padding:16px 18px;}
.discovery-panel strong{display:block;font-size:.94rem;color:var(--forest);}
.discovery-panel p{margin:8px 0 12px;font-size:.86rem;line-height:1.55;color:var(--muted);}
.discovery-panel .secondary{white-space:normal;}
.discovery-pending{background:#fcf8ed;border-color:#eadfbd;}
.discovery-queries{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0;}
.discovery-queries span{background:#fff;padding:7px 11px;border-radius:20px;border:1px solid #d6e6d3;font-size:.78rem;font-weight:650;}
.source-subtitle{font-size:1rem;margin:22px 0 9px;}
@media(max-width:460px){.wizard-actions{align-items:stretch;}.wizard-actions .wizard-save{flex:1}.wizard-actions .wizard-next{flex:1}.wizard-actions .wizard-back{flex:1;}}


@media(max-width:700px) {
  .layout { padding:0 16px; }
  .topbar { min-height:64px; padding:12px 0; }
  .brand-symbol { width:35px; height:35px; border-radius:10px; }
  .brand-name { font-size:1.19rem; }
  .header-right { gap:6px; }
  .app-version { padding:3px 5px; font-size:.62rem; }
  .header-profile { padding:8px 0; font-size:.75rem; }
  .app-content { padding:17px 0 calc(140px + env(safe-area-inset-bottom)); }
  .feed-heading { margin-bottom:14px; }
  .feed-heading-line { align-items:center; gap:9px; }
  .feed-heading h1 { font-size:1.55rem; margin-bottom:4px; }
  .feed-heading p { font-size:.74rem; }
  .refresh-button { min-height:38px; padding:8px 11px; font-size:.75rem; }
  .reader-controls { padding:4px 0 8px; }
  .reader-controls-bottom { padding:12px 0; }
  .reader-arrows button { min-width:83px; min-height:36px; padding:6px 8px; font-size:.75rem; }
  .knowledge-card { padding-top:22px; }
  .story-title { font-size:clamp(1.75rem,7vw,2.2rem); line-height:1.21; }
  .story-lead { font-size:1.06rem; line-height:1.65; }
  .story-prose p,.story-section p,.story-section li { font-size:.98rem; line-height:1.73; }
  .story-actions { gap:6px; }
  .story-action { padding:8px 9px; }
  .settings-card { padding:10px 0 24px; }
  .page-head h1 { font-size:2.2rem; }
  .auth-card { padding:24px 17px; }
  .welcome-layout { padding:14px; }
  .topic-grid,.profile-wizard .topic-grid,.profile-wizard .subtopic-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  .topic-inner { min-height:54px; padding:9px 8px; gap:5px; font-size:.75rem; }
  .topic-icon { flex-basis:22px; font-size:1rem; }
  .wizard-actions .primary { white-space:normal; }
  .bottom-nav { width:calc(100% - 12px); bottom:calc(6px + env(safe-area-inset-bottom)); gap:0; padding:4px 2px; }
  .bottom-nav button { flex:1 1 22%; min-width:0; flex-direction:column; padding:7px 1px; gap:2px; font-size:.64rem; }
  .bottom-nav button span { font-size:1.09rem; }
  .bottom-nav .nav-top { flex:0 0 34px; padding:5px 4px; }
  .undo-toast { max-width:calc(100vw - 16px); padding:10px 11px; }
}
@media(max-width:370px) {
  .layout { padding:0 12px; }
  .header-profile { font-size:.69rem; }
  .refresh-button { font-size:.72rem; padding:8px 9px; }
  .story-action.delete-action { margin-left:0; }
}
@media(max-width:460px){.wizard-actions{align-items:stretch;}.wizard-actions .wizard-save{flex:1}.wizard-actions .wizard-next{flex:1}.wizard-actions .wizard-back{flex:1;}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important;}}

/* MyStash 2.1 - minder navigatie, rustige profielonderdelen en inzicht in bronnen. */
.app-content { padding-bottom:calc(95px + env(safe-area-inset-bottom)); }
.bottom-nav { box-shadow:0 4px 22px rgba(23,51,32,.09); }
.profile-heading { padding:0 0 7px; }
.profile-heading h1 { margin:0 0 5px; font-size:clamp(1.65rem,3vw,2.05rem); }
.profile-heading p { margin:0; font-size:.84rem; }
.header-profile.active { color:var(--accent); }
.settings-tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin:9px 0 20px; overflow-x:auto; scrollbar-width:thin; }
.settings-tabs button { flex:0 0 auto; border:0; border-bottom:2px solid transparent; color:#6c7e70; background:none; padding:12px 16px 11px; font-size:.87rem; font-weight:700; }
.settings-tabs button.active { border-bottom-color:var(--forest); color:var(--forest); }
.settings-tabs button:hover:not(.active) { background:#f5f8f5; }
.settings-plain { padding:0 0 26px; border-bottom:0; }
.settings-plain>h2 { font-size:1.23rem; margin:0 0 6px; }
.settings-plain>.muted { margin:0 0 14px; }
.after-profile-save { margin:10px 0; font-size:.85rem; }
.sources-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }
.sources-heading h2 { margin:0 0 5px; }
.sources-heading .muted { margin:0; font-size:.85rem; }
.sources-heading .primary { flex:none; white-space:nowrap; }
.source-message { padding:11px 0; font-size:.86rem; line-height:1.55; color:#3f6945; font-weight:650; margin:10px 0; }
.source-message.error { color:#a44339; }
.source-recent { color:#53745b; font-size:.83rem; margin:6px 0 12px; }
.source-explain { color:#7c897d; font-size:.77rem; line-height:1.5; margin:10px 0 0; }
.source-list { margin:9px 0 23px; }
.source-row { align-items:center; gap:14px; padding:15px 0; }
.source-row .source-main { flex:1 1 0; min-width:0; }
.source-row .source-name { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.source-row .source-name strong { font-size:.87rem; line-height:1.4; }
.source-row .source-stats { display:block; margin-top:5px; font-size:.77rem; color:#57735f; }
.source-row small { color:#929d94; font-size:.69rem; }
.source-new { font-size:.68rem; font-weight:700; color:#426a4c; background:#eef4ed; padding:3px 7px; border-radius:6px; }
.manual-source,.discovery-details { border-top:1px solid var(--line); padding:15px 0; }
.manual-source summary,.discovery-details summary { cursor:pointer; color:var(--forest); font-weight:700; font-size:.86rem; }
.manual-source .source-form { margin-top:15px; }
.discovery-details .discovery-panel { margin:15px 0 0; background:none; padding:0; border:0; }
.discovery-details .discovery-panel p { font-size:.82rem; }
@media (max-width:700px) {
  .app-content { padding-bottom:calc(105px + env(safe-area-inset-bottom)); }
  .bottom-nav button { flex:1 1 28%; font-size:.69rem; }
  .profile-heading { padding:1px 0 4px; }
  .profile-heading h1 { font-size:1.68rem; }
  .profile-heading p { font-size:.8rem; line-height:1.5; }
  .settings-tabs { gap:0; margin-bottom:18px; }
  .settings-tabs button { padding:12px 12px 10px; font-size:.81rem; }
  .sources-heading { flex-direction:column; align-items:stretch; gap:12px; }
  .sources-heading .primary { width:100%; }
  .source-row { padding:13px 0; }
}

/* MyStash 2.2 – quiet, inline status; no stacked cards inside cards. */
.job-panel {padding:12px 0 16px;border-bottom:1px solid var(--line);max-width:720px}
.job-panel.compact {padding:11px 0;margin-bottom:12px}
.job-line {display:flex;align-items:center;gap:10px;font-size:.91rem;color:var(--ink)}
.job-live-dot {width:8px;height:8px;border-radius:50%;background:#618a68;animation:job-pulse 1.6s ease-in-out infinite}
@keyframes job-pulse {50%{opacity:.35}}
.job-stage {margin:5px 0 0;color:var(--muted);font-size:.86rem;line-height:1.5}
.job-detail,.job-schedule {font-size:.77rem;color:var(--muted);line-height:1.55;margin:7px 0}
.job-panel .secondary {margin-top:14px}
.job-progress {height:5px;overflow:hidden;background:#e7ece6;border-radius:6px;margin:12px 0 7px}
.job-progress>span{display:block;height:100%;background:#4f7756;border-radius:6px;transition:width .35s}
.job-error {font-size:.83rem;line-height:1.5;color:#ab4c43;margin:9px 0}
@media(max-width:600px){.job-panel {padding:10px 0 13px}.job-line {font-size:.87rem}}

/* 2.3: concise, readable batch history and preference summary */
.learning-summary {font-size:.83rem;color:var(--muted);line-height:1.6;padding:9px 0;border-bottom:1px solid var(--line);margin:4px 0 14px}
.learning-summary strong {font-weight:650;color:var(--ink)}
.job-details {margin:8px 0 6px;font-size:.79rem;color:var(--muted)}
.job-details summary {font-weight:600;cursor:pointer;padding:5px 0;color:var(--ink)}
.job-details p {line-height:1.5;margin:3px 0 6px;padding-left:9px;border-left:2px solid var(--line);overflow-wrap:anywhere}
.job-details span {font-variant-numeric:tabular-nums;color:var(--muted);margin-right:6px}
.job-panel .text-button {display:block;margin:12px 0 0;text-align:left}

/* MyStash 2.4 — focus on the article, not on batch controls. */
.header-current { font-size:1rem; font-weight:720; color:var(--forest); letter-spacing:-.02em; margin-left:auto; margin-right:auto; white-space:nowrap; }
.app-content-today { padding-top:8px; }
.app-content-today .reader-controls:not(.reader-controls-bottom) { min-height:43px; padding-top:0; padding-bottom:7px; }
.app-content-today .knowledge-card { padding-top:17px; }
.story-source { display:flex; align-items:baseline; gap:6px; flex-wrap:wrap; margin:0 0 15px; line-height:1.5; }
.story-title { margin-bottom:8px; }
@media (max-width:700px) {
  .header-current { font-size:.91rem; margin-left:auto; margin-right:auto; }
  .app-version { display:none; }
  .app-content-today { padding-top:6px; }
  .app-content-today .knowledge-card { padding-top:13px; }
}
@media (max-width:355px) {
  .header-current { font-size:.83rem; }
  .brand-name { font-size:1.1rem; }
  .header-right { gap:4px; }
  .header-profile { font-size:.72rem; }
}

/* MyStash 2.8 — rustige, direct bereikbare leesinstellingen */
:root { --reader-scale: 1; }
.reader-tools { display:flex; align-items:center; justify-content:flex-end; gap:6px; padding:8px 0 3px; min-height:42px; color:var(--muted); }
.reader-tools-label { font-size:.76rem; margin-right:auto; }
.reader-tools button { min-width:39px; min-height:38px; border:1px solid var(--line); background:transparent; border-radius:8px; color:var(--ink); padding:6px 9px; font-size:.84rem; font-weight:690; white-space:nowrap; }
.reader-tools button:hover:not(:disabled) { background:var(--accent2); }
.reader-tools button:disabled { opacity:.35; cursor:default; }
.reader-tools .theme-toggle { margin-left:3px; min-width:76px; }
.reader-font-size { min-width:37px; text-align:center; font-size:.70rem; font-variant-numeric:tabular-nums; color:var(--muted); }
.reader-prefs-status { font-size:.73rem; color:#aa6347; }
.reader-prefs-status:empty { display:none; }
/* Vergroot alleen het artikel, niet de navigatie en knoppen. */
.story-title { font-size:clamp(calc(1.75rem * var(--reader-scale)),calc(5.4vw * var(--reader-scale)),calc(2.65rem * var(--reader-scale))); }
.story-lead { font-size:calc(1.13rem * var(--reader-scale)); }
.story-prose p, .story-section p, .story-section li { font-size:calc(1rem * var(--reader-scale)); }
.story-section h3 { font-size:calc(.98rem * var(--reader-scale)); }
.story-why { font-size:calc(.91rem * var(--reader-scale)); }
@media(max-width:700px) {
  .reader-tools { gap:5px; }
  .reader-tools button { min-width:36px; padding:6px 7px; min-height:38px; }
  .reader-tools .theme-toggle { min-width:73px; }
  .story-title { font-size:clamp(calc(1.75rem * var(--reader-scale)),calc(7vw * var(--reader-scale)),calc(2.2rem * var(--reader-scale))); }
  .story-lead { font-size:calc(1.06rem * var(--reader-scale)); }
  .story-prose p,.story-section p,.story-section li { font-size:calc(.98rem * var(--reader-scale)); }
}

/* Contrasterend donker leesthema. Geen grafische kaders of kleurige kaarten. */
html[data-theme="dark"] {
  color-scheme:dark;
  --bg:#111c16; --surface:#16251c; --ink:#e8f1e9; --muted:#b4c8b9;
  --line:#375044; --accent:#a9dcb2; --accent2:#203c29;
  --forest:#d8eedc; --shadow:0 8px 28px rgba(0,0,0,.2);
  background:var(--bg); color:var(--ink);
}
[data-theme="dark"] body, [data-theme="dark"] .layout { background:var(--bg); color:var(--ink); }
[data-theme="dark"] .brand-symbol { background:#2e583e; color:#e7faeb; }
[data-theme="dark"] .brand-name { color:#d6e8d8; }
[data-theme="dark"] .brand-name>span { color:#a9dfb2; }
[data-theme="dark"] .app-version { background:transparent; color:var(--muted); border-color:var(--line); }
[data-theme="dark"] .header-current, [data-theme="dark"] .header-profile,
[data-theme="dark"] .story-title, [data-theme="dark"] .story-section h3,
[data-theme="dark"] .reader-arrows button, [data-theme="dark"] .settings-plain>h2,
[data-theme="dark"] .settings-tabs button.active, [data-theme="dark"] .manual-source summary,
[data-theme="dark"] .discovery-details summary { color:var(--ink); }
[data-theme="dark"] .story-source, [data-theme="dark"] .story-evidence,
[data-theme="dark"] .story-kicker, [data-theme="dark"] .story-kicker time { color:#aec3b1; }
[data-theme="dark"] .story-lead { color:#e0ece0; }
[data-theme="dark"] .story-prose p, [data-theme="dark"] .story-section p,
[data-theme="dark"] .story-section li, [data-theme="dark"] .story-why,
[data-theme="dark"] .story-why strong { color:#d5e4d8; }
[data-theme="dark"] .reader-arrows button, [data-theme="dark"] .story-action,
[data-theme="dark"] .secondary, [data-theme="dark"] .reader-tools button {
  background:#17271d; border-color:#44604b; color:#e5f1e6;
}
[data-theme="dark"] .reader-arrows button:hover:not(:disabled),
[data-theme="dark"] .story-action:hover, [data-theme="dark"] .secondary:hover,
[data-theme="dark"] .reader-tools button:hover:not(:disabled) { background:#28432f; }
[data-theme="dark"] .story-action.selected { background:#2d5538; border-color:#658e6c; color:#d8f7dd; }
[data-theme="dark"] .story-action.delete-action { background:transparent; border-color:transparent; color:#e6b2ac; }
[data-theme="dark"] .story-action.delete-action:hover { background:#4b2b2b; }
[data-theme="dark"] .bottom-nav { background:rgba(22,36,27,.98); border-color:var(--line); }
[data-theme="dark"] .bottom-nav button { color:#bacfbd; }
[data-theme="dark"] .bottom-nav button.active { background:#356347; color:#fff; }
[data-theme="dark"] .bottom-nav .nav-top { border-color:var(--line); }
[data-theme="dark"] .primary { background:#41784d; border-color:#5d9367; color:white; }
[data-theme="dark"] .primary:hover { background:#4c9059; }
[data-theme="dark"] .settings-tabs button { color:#b1c6b5; }
[data-theme="dark"] .settings-tabs button.active { border-bottom-color:#9acfaa; }
[data-theme="dark"] .settings-tabs button:hover:not(.active) { background:#203729; }
[data-theme="dark"] .topic-inner { color:#d1e4d3; border-color:#46624a; background:#18291d; }
[data-theme="dark"] .topic input:checked+.topic-inner { background:#30593a; color:#e5f5e7; border-color:#84bc8a; }
[data-theme="dark"] .form-stack label:not(.topic), [data-theme="dark"] .form-label,
[data-theme="dark"] .wizard-freeform, [data-theme="dark"] .profile-wizard .wizard-field label { color:#d9eadd; }
[data-theme="dark"] .form-stack input:not([type=checkbox]),
[data-theme="dark"] .form-stack textarea, [data-theme="dark"] .form-stack select,
[data-theme="dark"] .profile-wizard textarea, [data-theme="dark"] .profile-wizard select,
[data-theme="dark"] .source-form input { background:#192a1f; border-color:#4b6852; color:#eaf2eb; }
[data-theme="dark"] .auth-card, [data-theme="dark"] .empty-state { background:#192a1f; border-color:var(--line); }
[data-theme="dark"] .discovery-toggle, [data-theme="dark"] .discovery-panel { background:#1b3323; border-color:var(--line); }
[data-theme="dark"] .discovery-pending { background:#303022; }
[data-theme="dark"] .discovery-panel strong, [data-theme="dark"] .learning-summary strong,
[data-theme="dark"] .source-new { color:#d6ebd7; }
[data-theme="dark"] .discovery-queries span, [data-theme="dark"] .source-row button {
  background:#213727; border-color:var(--line); color:#d6ebd8;
}
[data-theme="dark"] .source-stats, [data-theme="dark"] .source-recent { color:#b7d8bd; }
[data-theme="dark"] .source-row small, [data-theme="dark"] .source-explain { color:#acc0b0; }
[data-theme="dark"] .language-promise { background:#1c3928; border-color:#426c4c; }
[data-theme="dark"] .language-promise strong, [data-theme="dark"] .language-promise small { color:#d9eadd; }
[data-theme="dark"] .wizard-progress { background:#2e4835; }
[data-theme="dark"] .wizard-progress i, [data-theme="dark"] .job-progress>span { background:#78b98b; }
[data-theme="dark"] .job-progress { background:#2a4432; }
[data-theme="dark"] .job-error, [data-theme="dark"] .wizard-error,
[data-theme="dark"] .settings-error { color:#ffc3b7; }
[data-theme="dark"] .wizard-error, [data-theme="dark"] .feed-status.feed-error,
[data-theme="dark"] .alert.error { background:#4d2b2a; border-color:#81514a; }
[data-theme="dark"] .feed-status, [data-theme="dark"] .alert { background:#213c2b; border-color:#4b7656; color:#d9f3dd; }
[data-theme="dark"] .undo-toast { background:#2d593d; }
[data-theme="dark"] .source-link, [data-theme="dark"] .text-button { color:#a4ddb0; }
[data-theme="dark"] button:focus-visible,[data-theme="dark"] a:focus-visible,
[data-theme="dark"] input:focus-visible { outline-color:#b4e4be; }

/* MyStash 2.9 — compacte header en 4 hoofdonderdelen. */
.topbar { gap:12px; min-height:72px; padding:12px 0; }
.brand { flex:0 1 auto; }
.brand-name .brand-subtitle { display:block; margin-top:4px; color:var(--muted); font-size:.72rem; font-weight:620; letter-spacing:0; line-height:1.2; }
.header-right { margin-left:auto; gap:0; min-width:0; }
.topbar .reader-tools { justify-content:flex-end; gap:5px; margin:0; padding:0; min-height:0; flex-wrap:nowrap; }
.topbar .reader-tools button { flex:none; min-width:36px; width:36px; height:38px; min-height:38px; padding:0; border-radius:9px; font-size:.82rem; }
.topbar .reader-tools .theme-toggle { flex:none; min-width:36px; width:38px; height:38px; margin-left:1px; font-size:1.2rem; line-height:1; }
.topbar .reader-font-size { min-width:35px; font-size:.7rem; font-variant-numeric:tabular-nums; }
.app-content { padding-top:16px; }
.app-content-today { padding-top:11px; }
.bottom-nav { gap:4px; }
.bottom-nav button { flex:1 1 25%; }
.build-version { font-size:.72rem; color:var(--muted); margin:22px 0 0; }
[data-theme="dark"] .brand-name .brand-subtitle { color:var(--muted); }
@media(max-width:700px) {
  .topbar { min-height:61px; padding:10px 0; gap:8px; }
  .brand,.welcome-brand { gap:8px; }
  .brand-symbol { width:35px; height:35px; }
  .brand-name { font-size:1.15rem; }
  .brand-name .brand-subtitle { font-size:.66rem; margin-top:2px; }
  .topbar .reader-tools { gap:3px; }
  .topbar .reader-tools button { width:35px; min-width:35px; height:36px; min-height:36px; font-size:.78rem; }
  .topbar .reader-tools .theme-toggle { width:36px; min-width:36px; height:36px; font-size:1.12rem; }
  .topbar .reader-font-size { min-width:32px; font-size:.66rem; }
  .app-content { padding-top:13px; }
  .app-content-today { padding-top:8px; }
  .bottom-nav { width:calc(100% - 12px); }
  .bottom-nav button { flex:1 1 25%; min-width:0; padding:7px 1px; font-size:.68rem; }
}
@media(max-width:350px) {
  .topbar { gap:6px; }
  .brand-name { font-size:1.05rem; }
  .brand-symbol { width:32px; height:32px; }
  .topbar .reader-tools { gap:2px; }
  .topbar .reader-tools button { width:33px; min-width:33px; height:35px; min-height:35px; }
  .topbar .reader-tools .theme-toggle { width:34px; min-width:34px; }
  .topbar .reader-font-size { min-width:30px; font-size:.63rem; }
  .bottom-nav button { font-size:.64rem; }
}

/* MyStash 2.9.1 - iPhone standalone safe area: protect the brand from iOS status-bar overlay.
   The header itself is always fully opaque; no translucent blur layer is applied. */
@supports (padding-top: env(safe-area-inset-top)) {
  @media (display-mode: standalone) {
    .layout { padding-top:max(0px, calc(env(safe-area-inset-top, 0px) - 32px)); }
  }
}
.topbar .brand, .topbar .brand-symbol, .topbar .brand-name {
  filter:none; -webkit-backdrop-filter:none; backdrop-filter:none; opacity:1;
}
