:root {--bg:#F5F2EB;--paper:#FFFCF7;--paper2:#FAF7F1;--graphite:#2D3133;--text:#35383A;--muted:#807F7C;--line:#E9E3D9;--blue:#527DA5;--blue-soft:#E8F0F7;--sage:#668D78;--sage-soft:#E9F1E9;--violet:#8D79AC;--violet-soft:#F0EBF6;--amber:#C58B44;--amber-soft:#F9EFDE;--coral:#C17875;--coral-soft:#F8EAE7;--shadow:0 10px 36px rgba(51,46,38,.035);--radius:20px;}
*{box-sizing:border-box}html{background:var(--bg);scroll-behavior:smooth}body{margin:0;color:var(--text);background:var(--bg);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,Arial,sans-serif;font-size:15px;-webkit-font-smoothing:antialiased}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.48;cursor:not-allowed}input,textarea,select{color:var(--text)}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid rgba(82,125,165,.45);outline-offset:2px}button svg{flex-shrink:0}.app-shell{min-height:100vh;display:flex;max-width:1680px;margin:0 auto}.sidebar{width:236px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:27px 17px 22px;background:#F1EDE5;border-right:1px solid #E7E0D7;flex-shrink:0}.brand{display:flex;align-items:center;gap:12px;margin:0 3px 46px}.brand-mark{display:grid;place-items:center;width:41px;height:41px;border-radius:14px;background:#35393B;color:#FFF8F0;font-size:28px;font-weight:800;line-height:1;font-family:Georgia,serif}.brand-mark span{color:#C6A06B;font-size:17px}.brand strong{font-size:17px;display:block;letter-spacing:-.5px}.brand small{display:block;letter-spacing:1.6px;font-weight:750;font-size:9px;color:var(--muted);margin-top:4px}.sidebar-group-label{font-size:10px;color:#A5A198;letter-spacing:1.6px;padding:0 14px;margin-bottom:12px;font-weight:750}.sidebar-nav{display:grid;gap:5px}.nav-link{display:flex;width:100%;align-items:center;gap:13px;text-align:left;color:#666964;background:transparent;border:0;padding:14px 14px;border-radius:13px;font-size:14px;font-weight:600}.nav-link svg{width:18px;height:18px;stroke-width:1.75}.nav-link.active{color:#313636;background:#FFFCF8;box-shadow:0 1px 7px rgba(30,30,30,.055)}.nav-link.active svg{color:var(--blue)}.nav-link:hover{background:#FFFCF8}.sidebar-fill{flex:1}.aside-tip{background:#E7E9DB;border-radius:17px;padding:18px 17px;margin:20px 3px 19px}.tip-dot{display:block;width:21px;height:4px;background:#9BA77F;border-radius:5px;margin-bottom:17px}.aside-tip b{font-size:15px;line-height:1.4;font-family:Georgia,serif}.aside-tip p{font-size:12px;line-height:1.5;color:#727A6F;margin-bottom:0}.settings-nav{margin-top:0}.sidebar-version{font-size:10px;color:#9B9B93;padding:12px 13px 0;line-height:1.5}.main-shell{flex:1;min-width:0}.topbar{height:81px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 38px;background:rgba(245,242,235,.93)}.crumb{display:flex;align-items:center;gap:10px;color:#7B7D79;font-size:12px;font-weight:600;white-space:nowrap}.small-emblem{font-size:23px;color:#B58D54}.top-actions{display:flex;align-items:center;gap:13px}.pill{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border-radius:30px;font-size:11px;font-weight:650;white-space:nowrap}.pill-soft{background:#E8E8DC;color:#7C856F}.pill-good{background:#E4EFE5;color:#507D62}.pill-bad{background:#FAE7E3;color:#B36D64}.icon-button{border:1px solid var(--line);background:var(--paper);border-radius:12px;width:39px;height:39px;display:grid;place-items:center;color:#6D6C67}.icon-button svg{width:18px;height:18px}.btn{border:0;border-radius:12px;display:inline-flex;justify-content:center;align-items:center;gap:8px;font-size:13px;font-weight:650;padding:12px 16px;line-height:1.2;min-height:42px;white-space:normal}.btn svg{width:17px;height:17px}.btn-dark{background:#303638;color:#FFFBF6}.btn-dark:hover{background:#474D4D}.btn-light{background:#EEE8DE;color:#454949}.btn-ghost{background:transparent;color:#6C6F6B}.btn-outline{border:1px solid #DED8CC;background:#FFFCF7;color:#4E5554}.btn-blue{background:#E7F0F8;color:#496D8E}.btn-sage{background:#E7F0E8;color:#577B66}.btn-violet{background:#EEE8F4;color:#7C6898}.btn-tiny{font-size:12px;min-height:35px;padding:8px 12px}.content{padding:32px 38px 72px;max-width:1220px;margin:0 auto}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:800;color:#A4A09B;margin-bottom:12px}.page-intro{margin-bottom:29px}.page-intro h1{font-family:Georgia,"Times New Roman",serif;font-weight:500;letter-spacing:-.9px;font-size:37px;line-height:1.18;margin:5px 0 10px;color:var(--graphite)}.page-intro .sub{color:#83817C;font-size:14px;line-height:1.6;max-width:680px;margin:0}.stack{display:grid;gap:19px}.grid-2{display:grid;grid-template-columns:1.3fr 1fr;gap:19px}.grid-equal{display:grid;grid-template-columns:1fr 1fr;gap:19px}.card{background:var(--paper);border:1px solid rgba(227,220,210,.9);border-radius:var(--radius);box-shadow:var(--shadow);padding:23px}.card h2,.card h3{margin:0;font-size:17px;letter-spacing:-.3px;font-weight:750}.card-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:20px}.muted{color:var(--muted)}.small{font-size:12px}.tiny{font-size:11px}.section-lead{font-size:14px;color:var(--muted);line-height:1.55}.greeting-layout{display:flex;align-items:end;justify-content:space-between;gap:20px}.today-date{font-size:11px;font-weight:750;color:#9C9183;letter-spacing:1.6px;text-transform:uppercase}.sun-ornament{width:82px;height:82px;border-radius:25px;background:#EFE5D5;color:#C58B44;display:grid;place-items:center;transform:rotate(-5deg)}.sun-ornament svg{width:38px;height:38px}.section-title{font-size:12px;color:#88817B;text-transform:uppercase;letter-spacing:1.4px;font-weight:750;margin:5px 0 15px}.focus-card{border-left:4px solid #90A7B8}.focus-list,.item-list{display:grid;gap:9px}.focus-row,.item-row{display:flex;align-items:flex-start;gap:11px;padding:11px 0;border-bottom:1px solid #F1EDE6}.focus-row:last-child,.item-row:last-child{border-bottom:0}.focus-row .record-txt{flex:1}.record-title{font-weight:690;font-size:13px;line-height:1.35;overflow-wrap:anywhere}.record-detail{color:#96918C;font-size:11px;margin-top:5px;line-height:1.35;overflow-wrap:anywhere}.round-check{height:23px;width:23px;border:1.5px solid #D1CBC0;border-radius:50%;background:transparent;display:grid;place-items:center;color:transparent;flex-shrink:0;padding:0}.round-check.done{border-color:#769983;background:#769983;color:white}.round-check svg{width:14px;height:14px}.is-done .record-title{text-decoration:line-through;color:#A2A4A0}.mini-icon{width:37px;height:37px;border-radius:12px;display:grid;place-items:center;flex-shrink:0}.mini-icon svg{width:19px;height:19px}.theme-blue{color:var(--blue);background:var(--blue-soft)}.theme-sage{color:var(--sage);background:var(--sage-soft)}.theme-violet{color:var(--violet);background:var(--violet-soft)}.theme-amber{color:var(--amber);background:var(--amber-soft)}.theme-coral{color:var(--coral);background:var(--coral-soft)}.theme-gray{color:#65706D;background:#ECEDEA}.empty{padding:18px 8px;color:#928B81;font-size:13px;line-height:1.6}.empty b{display:block;color:#555C57;margin-bottom:5px}.soft-quote{background:#E8EADD;border-color:#E0E3D4;position:relative}.soft-quote p{font-family:Georgia,serif;font-size:19px;line-height:1.46;margin:8px 0;color:#5E675E}.soft-quote .quote-mark{font-size:35px;color:#A9B399;line-height:.5}.action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.action-tile{display:flex;align-items:center;gap:10px;border-radius:14px;background:#F9F6F0;border:1px solid #EFE9DF;padding:12px 10px;text-align:left;color:#525957;font-size:12px;font-weight:700}.action-tile .mini-icon{width:31px;height:31px;border-radius:10px}.action-tile .mini-icon svg{width:16px;height:16px}.action-tile:hover{border-color:#C8C1B6}.world-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.domain-card{background:var(--paper);border:1px solid #E8E1D8;border-radius:19px;padding:21px;min-height:172px;display:flex;flex-direction:column;gap:11px}.domain-card h3{margin:0;font-size:16px}.domain-card p{color:#89827D;font-size:12px;line-height:1.5;margin:0;flex:1}.domain-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#9A9389;font-size:11px}.domain-foot button{border:0;background:transparent;color:var(--blue);font-weight:700;padding:5px;display:flex;align-items:center;gap:2px}.domain-foot svg{width:14px;height:14px}.count-chip{background:#F2EEE7;color:#807B74;font-size:11px;font-weight:700;border-radius:100px;padding:5px 8px}.quiet-banner{border-radius:20px;padding:24px;background:#EAE9DC;display:flex;gap:18px;align-items:center;justify-content:space-between}.quiet-banner h3{font-family:Georgia,serif;font-weight:500;font-size:22px;margin:0 0 7px}.quiet-banner p{font-size:12px;line-height:1.5;color:#777F70;margin:0}.quiet-banner .mini-icon{width:60px;height:60px;border-radius:20px}.quiet-banner .mini-icon svg{width:27px;height:27px}.item-card{display:flex;align-items:start;gap:14px;padding:15px 0;border-bottom:1px solid var(--line)}.item-card:last-child{border-bottom:0}.item-card .record-content{flex:1;min-width:0}.item-card .record-body{font-size:12px;line-height:1.55;color:#86817B;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:6px;max-height:80px;overflow:hidden}.card-tools{display:flex;gap:4px;align-items:center}.card-tools button{border:0;background:transparent;color:#A19D97;border-radius:8px;padding:6px;display:grid;place-items:center}.card-tools button:hover{background:#F2EDE6;color:#525B56}.card-tools svg{width:16px;height:16px}.stat-row{display:flex;gap:9px;flex-wrap:wrap}.stat-pill{padding:8px 11px;background:#F5F1EA;border-radius:9px;font-size:11px;color:#77736D}.stat-pill b{color:#414744}.banner-label{display:inline-block;border-radius:7px;color:#8D7D65;background:#F4ECDD;padding:5px 8px;font-weight:750;font-size:10px;letter-spacing:.5px}.notice{background:#F7F1E7;border:1px solid #ECE2D5;padding:14px 17px;border-radius:13px;color:#817463;font-size:12px;line-height:1.6}.notice.info{background:#EDF2F5;border-color:#DFEAF1;color:#597280}.notice.success{background:#EDF4EC;border-color:#DCE9DC;color:#5B7864}.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.tag{font-size:10px;color:#8A8074;border:1px solid #E8E0D5;border-radius:7px;padding:5px 7px}.tag.demo{background:#FAF0E2;color:#A57944}.two-column{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field-label{display:block;font-size:12px;font-weight:720;margin:16px 0 8px;color:#535956}.text-field{display:block;border:1px solid #DFD9CD;border-radius:11px;background:#FFFEFA;min-height:43px;padding:11px 13px;width:100%;outline:0;font-size:14px}.text-field:focus{border-color:#8AA9BB;box-shadow:0 0 0 3px #E8F0F4}.field-textarea{resize:vertical;min-height:110px;line-height:1.55}.text-field::placeholder{color:#ADA69F}.required{color:#CA8D74}.output-box{font-size:12px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;max-height:250px;overflow-y:auto;background:#F9F6EF;border:1px solid #ECE4DA;border-radius:13px;padding:15px;width:100%;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#4C5858}.check-option{display:flex;align-items:center;gap:9px;font-size:13px;color:#6E716C;padding:8px 0}.check-option input{width:17px;height:17px;accent-color:#527DA5}.privacy-note{font-size:11px;color:#979087;line-height:1.6;margin:11px 0 0}.file-upload{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.file-upload input{max-width:100%;font-size:12px;color:#736E68}.action-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.settings-grid>.wide{grid-column:span 2}.offline-status{font-size:13px;font-weight:700}.tinyline{font-size:12px;color:#86817A;line-height:1.5}.modal-backdrop{position:fixed;inset:0;z-index:50;background:rgba(37,40,37,.35);display:flex;align-items:center;justify-content:center;padding:15px}.modal-backdrop[hidden]{display:none}.modal-panel{max-height:94vh;overflow-y:auto;width:min(610px,100%);background:#FDFBF5;border-radius:22px;padding:24px 27px 18px;box-shadow:0 25px 85px rgba(32,35,33,.25)}.modal-head{display:flex;align-items:start;justify-content:space-between;gap:10px}.modal-head h2{margin:0;font-family:Georgia,serif;font-size:26px;font-weight:500}.type-picker{display:flex;gap:7px;flex-wrap:wrap;margin:18px 0}.type-pill{border:1px solid #E3DDD2;border-radius:30px;background:#F8F5EE;font-size:11px;font-weight:650;padding:8px 11px;color:#7C7D76}.type-pill.selected{background:#353B3B;color:#fff;border-color:#353B3B}.extra-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.extra-fields .field-label{margin-top:12px}.modal-footer{display:flex;justify-content:flex-end;gap:9px;margin-top:21px}.form-status{font-size:12px;margin-top:7px;color:#B35D59}.toast{position:fixed;z-index:100;bottom:24px;right:24px;max-width:min(500px,calc(100vw - 30px));padding:13px 18px;background:#2D3637;color:white;border-radius:12px;box-shadow:0 13px 50px #0002;font-size:13px;display:none}.toast.visible{display:block}.bottom-nav,.floating-add{display:none} .light-tag{display:inline-block;font-size:10px;color:#918373;background:#F5EFE5;border-radius:7px;padding:5px 8px} .bookmark-pill{background:#EAE8F1;color:#7A6C94;padding:5px 8px;border-radius:7px;font-size:10px;font-weight:700}.link-button{border:0;background:transparent;color:#517EA3;padding:0;font-size:12px;font-weight:700}.loading{opacity:.6}.warning-text{color:#B16D64!important}
@media(max-width:1150px){.sidebar{width:214px}.topbar{padding:0 26px}.content{padding:27px 26px 75px}.world-grid{grid-template-columns:repeat(2,1fr)}.action-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:820px){.sidebar{display:none}.topbar{height:68px;padding:0 19px}.content{padding:25px 17px 110px}.page-intro h1{font-size:31px}.grid-2{grid-template-columns:1fr}.grid-equal{grid-template-columns:1fr 1fr}.world-grid{grid-template-columns:repeat(2,1fr)}.bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:20;background:rgba(255,252,247,.98);border-top:1px solid #E5DED3;padding:8px 7px calc(8px + env(safe-area-inset-bottom));justify-content:space-around}.bottom-link{border:0;background:none;display:grid;justify-items:center;gap:3px;min-width:57px;color:#898782;padding:5px 2px;border-radius:11px}.bottom-link svg{width:22px;height:22px;stroke-width:1.8}.bottom-link small{font-size:10px}.bottom-link.active{color:#517DA1;background:#EDF1F1}.floating-add{position:fixed;display:grid;place-items:center;z-index:21;right:15px;bottom:83px;width:52px;height:52px;border:none;border-radius:18px;background:#34393B;color:white;box-shadow:0 8px 26px #0003}.floating-add svg{width:24px;height:24px}.top-add{display:none}.toast{bottom:147px;right:14px}}
@media(max-width:550px){.grid-equal,.settings-grid,.world-grid,.two-column{grid-template-columns:1fr}.settings-grid>.wide{grid-column:auto}.topbar .crumb{font-size:11px}.top-actions{gap:7px}.top-actions .pill{padding:5px 7px;font-size:10px}.content{padding:22px 13px 115px}.card{padding:18px}.page-intro h1{font-size:29px}.page-intro .sub{font-size:13px}.sun-ornament{width:56px;height:56px;border-radius:17px}.sun-ornament svg{width:27px}.action-grid{grid-template-columns:1fr 1fr}.modal-panel{padding:20px 17px}.extra-fields{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Valentin OS 0.5 — iPad usability, themes and historical learning. */
html[data-theme="warm"]{--bg:#F5F2EB;--paper:#FFFCF7;--paper2:#FAF7F1;--text:#35383A;--graphite:#2D3133;--muted:#807F7C;--line:#E9E3D9}
html[data-theme="sage"]{--bg:#E5ECE6;--paper:#F9FAF6;--paper2:#EFF4ED;--text:#30403A;--graphite:#293C36;--muted:#6B8075;--line:#CEDBD0;--blue:#4C7B90;--sage:#557F69;--violet:#7C7099;--shadow:0 12px 34px rgba(31,74,50,.045)}
html[data-theme="night"]{--bg:#202728;--paper:#2C3435;--paper2:#313B3B;--graphite:#F6F1E9;--text:#ECEDE7;--muted:#ADB9B4;--line:#4A5553;--blue:#9CC8ED;--blue-soft:#344B5C;--sage:#A8D7B4;--sage-soft:#334A40;--violet:#C9B5E7;--violet-soft:#473F55;--amber:#E1BC7B;--amber-soft:#4B4436;--coral:#EDA8A2;--coral-soft:#4E3E40;--shadow:0 12px 38px rgba(0,0,0,.09)}
/* consistent icon alignment: same SVG box, stroke, intrinsic line-height across elements */
.btn,.icon-button,.card-tools button,.link-button,.domain-foot button,.bottom-link,.type-pill,.round-check{align-items:center;justify-content:center;line-height:1.25}
.btn svg,.icon-button svg,.card-tools svg,.link-button svg,.type-pill svg,.domain-foot svg,.bottom-link svg,.floating-add svg{display:block;vertical-align:middle;flex:0 0 auto;transform:none!important}
.btn [data-icon],.icon-button [data-icon],.top-add [data-icon],.nav-link [data-icon]{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;line-height:0;flex:0 0 auto}
.icon-button{display:inline-flex;align-items:center;justify-content:center;padding:0;flex:0 0 auto}
.card-tools{display:flex;align-items:center;gap:5px}.card-tools button{display:flex;align-items:center;justify-content:center;min-width:36px;min-height:36px;padding:0}
.link-button{display:inline-flex;align-items:center;gap:6px;padding:5px}.link-button svg{width:16px;height:16px}
.modal-head-actions{display:flex;align-items:center;gap:9px}
.modal-head h2{line-height:1.25}
.field-textarea{min-height:220px;max-height:72vh;resize:vertical;line-height:1.65;padding:16px 18px;overflow:auto}
.entry-textarea{display:block;width:100%;min-height:300px;line-height:1.7;padding:16px 18px;resize:vertical}
#modal.compose-mode{padding:0;align-items:stretch}
#modal.compose-mode .modal-panel{display:flex;flex-direction:column;width:min(100%,1000px);max-width:1000px;max-height:100dvh;height:100dvh;border-radius:0;margin:0 auto;padding:26px 30px;overflow:auto}
#modal.compose-mode #recordForm{display:flex;flex-direction:column;flex:1;min-height:0}
#modal.compose-mode #recordBody{flex:1;min-height:50vh;max-height:none;resize:none;font-size:17px;line-height:1.75}
#modal.compose-mode .type-picker{max-height:74px;overflow:auto}
#modal.compose-mode .modal-footer{margin-top:auto}
.topic-card{border:1px solid var(--line);border-radius:15px;background:var(--paper2);margin:11px 0;overflow:hidden}
.topic-open{border:0;background:transparent;color:var(--text);width:100%;min-height:74px;display:flex;align-items:center;gap:11px;text-align:left;padding:13px;cursor:pointer}
.topic-open>.mini-icon{flex:0 0 auto}.topic-open>.topic-content{min-width:0;flex:1;display:flex;flex-direction:column;gap:6px}.topic-open strong{font-size:14px;overflow-wrap:anywhere}.topic-open small{font-size:11px;color:var(--muted)}.topic-open>svg{flex:0 0 auto;width:16px;height:16px;color:var(--muted)}
.knowledge-detail-wrap{margin-top:20px}.knowledge-detail{scroll-margin-top:30px}.detail-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.detail-title{font-family:Georgia,'Times New Roman',serif;font-size:29px!important;margin:0 0 10px!important;font-weight:500!important;line-height:1.25}
.timeline{border-left:2px solid var(--line);margin:27px 0 5px 11px;padding-left:26px}.timeline-entry{position:relative;padding:0 0 25px;min-width:0}.timeline-dot{position:absolute;left:-34px;top:2px;height:13px;width:13px;border-radius:50%;background:var(--sage);border:3px solid var(--paper)}.timeline-stamp{font-size:12px;font-weight:700;color:var(--muted);margin-bottom:10px}.timeline-text{font-size:15px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.week-card{margin-bottom:0}.week-facts{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0 16px}.week-facts>span{padding:10px 12px;border-radius:12px;background:var(--paper2);border:1px solid var(--line);font-size:12px}.week-question{font-family:Georgia,serif;font-size:18px;color:var(--text);line-height:1.5;margin:8px 0 16px}
.theme-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.theme-choice{display:flex;flex-direction:column;align-items:flex-start;gap:6px;border:2px solid var(--line);border-radius:16px;padding:9px;background:var(--paper);color:var(--text);text-align:left;min-width:0}.theme-choice.selected{border-color:var(--blue)}.theme-choice strong{font-size:13px;padding-left:3px}.theme-choice small{font-size:11px;color:var(--muted);padding-left:3px}
.theme-swatch{width:100%;height:74px;border-radius:11px;position:relative;display:block;overflow:hidden}.theme-swatch i{position:absolute;left:10px;top:12px;width:30%;height:50px;border-radius:7px}.theme-swatch b{position:absolute;left:43%;top:14px;width:46%;height:18px;border-radius:6px}.theme-swatch em{position:absolute;left:43%;top:40px;width:37%;height:19px;border-radius:6px}.swatch-warm{background:#F5F2EB}.swatch-warm i,.swatch-warm b{background:#FFFCF7}.swatch-warm em{background:#527DA5}.swatch-night{background:#202728}.swatch-night i,.swatch-night b{background:#344042}.swatch-night em{background:#92BDE0}.swatch-sage{background:#E5ECE6}.swatch-sage i,.swatch-sage b{background:#F9FAF6}.swatch-sage em{background:#668D78}
/* neutralize old hardcoded accents in alternative themes */
html[data-theme="sage"] .sidebar{background:#DBE5DD;border-color:var(--line)}
html[data-theme="sage"] .topbar{background:#E5ECE6}html[data-theme="sage"] .aside-tip{background:#DAE4D7}
html[data-theme="night"] .sidebar{background:#222D2D;border-color:#45504E}
html[data-theme="night"] .topbar{background:#202728}
html[data-theme="night"] .brand-mark{background:#E4D9BE;color:#252B2B}
html[data-theme="night"] .nav-link{color:#BDC8C3}html[data-theme="night"] .nav-link.active,html[data-theme="night"] .nav-link:hover{background:#374340;color:#F1EDE5}
html[data-theme="night"] .aside-tip{background:#38463F}html[data-theme="night"] .aside-tip p{color:#C2CCC4}
html[data-theme="night"] .sidebar-group-label,html[data-theme="night"] .sidebar-version{color:#ADB8B2}
html[data-theme="night"] .page-intro .sub,html[data-theme="night"] .domain-card p,html[data-theme="night"] .record-detail,html[data-theme="night"] .empty,html[data-theme="night"] .privacy-note{color:var(--muted)}
html[data-theme="night"] .card,html[data-theme="night"] .domain-card,html[data-theme="night"] .modal-panel{background:var(--paper);border-color:var(--line)}
html[data-theme="night"] .type-pill,html[data-theme="night"] .text-field,html[data-theme="night"] .output-box,html[data-theme="night"] .action-tile,html[data-theme="night"] .item-card,html[data-theme="night"] .file-upload,html[data-theme="night"] .stat-pill{background:var(--paper2);color:var(--text);border-color:var(--line)}
html[data-theme="night"] .type-pill.selected,html[data-theme="night"] .btn-dark{background:#D8E4DC;color:#22302E}
html[data-theme="night"] .btn-light,html[data-theme="night"] .btn-outline,html[data-theme="night"] .icon-button{background:#3D4947;color:var(--text);border-color:var(--line)}
html[data-theme="night"] .quiet-banner,html[data-theme="night"] .soft-quote{background:#35433D;color:var(--text);border-color:#526056}
html[data-theme="night"] .quiet-banner p,html[data-theme="night"] .soft-quote p{color:#C8D4CC}
html[data-theme="night"] .pill-good{background:#334E40;color:#B9DDC3}html[data-theme="night"] .pill-soft{background:#3D4947;color:#D9DFD4}
html[data-theme="night"] .tag,html[data-theme="night"] .light-tag,html[data-theme="night"] .count-chip{background:#3E4946;color:var(--text);border-color:var(--line)}
html[data-theme="night"] .bottom-nav{background:#222D2D;border-color:var(--line)}html[data-theme="night"] .bottom-link{color:#C6D0C7}html[data-theme="night"] .bottom-link.active{color:#A9D3ED}
html[data-theme="night"] .empty b{color:#ECEDE7}html[data-theme="night"] .notice.info{background:#364954;color:#E1EEF1}
@media(max-width:820px){.theme-choices{grid-template-columns:repeat(3,minmax(0,1fr))}.knowledge-detail{scroll-margin-top:14px}}
@media(max-width:550px){.theme-choices{grid-template-columns:1fr}.modal-head-actions{gap:5px}.entry-textarea{min-height:40vh}.topic-open{flex-wrap:wrap}.timeline{margin-left:7px;padding-left:19px}.timeline-dot{left:-27px}}
@media(max-height:680px){.modal-backdrop{align-items:flex-start!important;overflow-y:auto}.modal-panel{margin:12px auto!important;max-height:none!important}}
.linked-records{margin-top:14px;border-top:1px solid var(--line);padding-top:20px}.linked-records h3{margin:0 0 15px;font-size:15px}

/* Valentin OS v0.5.1: mindful micro-practice, replaces fixed quote on Today */
.mindful-card{background:#E8EADD;border-color:#DDE2D7;padding:24px;position:relative}
.mindful-header{display:flex;align-items:center;gap:9px;margin-bottom:20px;color:#748878}
.mindful-symbol{display:inline-flex;align-items:center;justify-content:center;width:33px;height:33px;background:rgba(111,145,114,.13);border-radius:11px;flex:0 0 auto}
.mindful-symbol svg{width:18px;height:18px}
.mindful-overline{font-size:10px;font-weight:760;letter-spacing:1.15px;line-height:1.5}
.mindful-card h2{font-family:Georgia,"Times New Roman",serif;font-weight:500;font-size:24px;line-height:1.25;letter-spacing:-.3px;color:#4E6256}
.mindful-card p{font-family:inherit;font-size:14px;line-height:1.65;color:#55685D;margin:12px 0 18px}
.mindful-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.mindful-card .btn-outline{background:rgba(255,255,255,.62);border-color:#CAD8C9;color:#486D57}
.mindful-card .link-button{color:#486D57}
.mindful-foot{font-size:11px;color:#7A887C;margin-top:15px;line-height:1.4}
html[data-theme="night"] .mindful-card{background:#35433D;border-color:#526056}
html[data-theme="night"] .mindful-card h2{color:#E8F0E7}
html[data-theme="night"] .mindful-card p,html[data-theme="night"] .mindful-overline,html[data-theme="night"] .mindful-foot{color:#C8D4CC}
html[data-theme="night"] .mindful-symbol{color:#BCD8BB;background:#425A4C}
html[data-theme="night"] .mindful-card .btn-outline{color:#E5F3E7;background:#3F5549;border-color:#59715E}
html[data-theme="night"] .mindful-card .link-button{color:#B9DCC6}
html[data-theme="sage"] .mindful-card{background:#DAE7DD;border-color:#C3D9C6}
@media(max-width:550px){.mindful-card{padding:19px}.mindful-card h2{font-size:21px}.mindful-overline{font-size:9px}}

/* v0.6: context engine, grounded review and explicit relations */
.context-signals .signal-item{display:flex;align-items:flex-start;gap:12px;padding:14px 0;border-top:1px solid var(--line)}
.context-signals .signal-item .mini-icon{flex:0 0 auto}.signal-copy{min-width:0;flex:1}.signal-copy strong{font-size:13px;line-height:1.5}.signal-copy p{font-size:12px;line-height:1.55;margin:4px 0 0;color:var(--muted)}
.context-section-title{margin:28px 0 16px}.context-section-title h2{font-family:Georgia,serif;font-size:26px;font-weight:500;margin:9px 0 4px}
.journey-card{background:var(--paper2);border:1px solid var(--line);border-radius:14px;margin-top:12px;overflow:hidden}.journey-open{width:100%;display:flex;align-items:center;gap:12px;padding:13px;border:0;background:none;color:var(--text);text-align:left;min-height:72px}.journey-open>.mini-icon{flex:0 0 auto}.journey-heading{min-width:0;flex:1;display:flex;flex-direction:column;gap:5px}.journey-heading strong{font-size:14px;overflow-wrap:anywhere}.journey-heading small{color:var(--muted);font-size:11px}.journey-open>.light-tag{flex:0 0 auto}.journey-open>svg{width:15px;height:15px;color:var(--muted)}
.journey-detail{margin-top:20px}.journey-properties{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px;margin:22px 0}.journey-properties>div{border-radius:13px;padding:14px;background:var(--paper2);border:1px solid var(--line);min-width:0}.journey-properties small{font-size:11px;color:var(--muted);font-weight:650}.journey-properties p{line-height:1.6;margin:7px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.context-subhead{font-size:15px;margin-top:30px}
.context-related{border-top:1px solid var(--line);margin:24px 0 0;padding-top:20px}.context-related h3{font-size:15px;margin:0}.context-link-row,.context-suggest-row{display:flex;align-items:center;gap:10px;margin:10px 0;padding:12px;border-radius:12px;background:var(--paper2);border:1px solid var(--line)}.context-link-row>span:nth-child(2),.context-suggest-row>div{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}.context-link-row strong,.context-suggest-row strong{font-size:13px;overflow-wrap:anywhere}.context-link-row small,.context-suggest-row small{color:var(--muted);font-size:11px}.context-suggestions{margin-top:24px}.context-suggestions h4{font-size:13px;margin-bottom:7px}.context-link-row .link-button{white-space:nowrap}.journey-detail .action-row{flex-wrap:wrap}
html[data-theme="night"] .context-signals .signal-item{border-color:var(--line)}
@media(max-width:850px){.journey-properties{grid-template-columns:1fr 1fr}.journey-properties>div:first-child{grid-column:span 2}}
@media(max-width:560px){.journey-properties{display:block}.journey-properties>div{margin:9px 0}.journey-open{flex-wrap:wrap}.context-suggest-row,.context-link-row{flex-wrap:wrap}}
