/* ETHOS V4 — a shared presentation system over the existing application. */
:root{
 --ethos-bg:#111012;--ethos-surface:#1b191c;--ethos-raised:#232024;--ethos-interactive:#2b252b;
 --ethos-ink:#f0ebe5;--ethos-secondary:#b2aaaf;--ethos-muted:#958c92;--ethos-line:#ffffff16;
 --ethos-brand:#99444f;--ethos-brand-hover:#ad5260;--ethos-focus:#dfa9b2;--ethos-mastery:#afcbbb;
 --ethos-radius:18px;--ethos-control:12px;--ethos-gap:24px;
 background:var(--ethos-bg);color:var(--ethos-ink);font-size:16px;
}
body{background:var(--ethos-bg)}
.shell{max-width:1100px;padding-bottom:112px}.topbar{height:84px;border-bottom:1px solid var(--ethos-line);margin-bottom:28px}.brand{font-size:21px;letter-spacing:.2em}.top-actions{gap:16px}
.page{animation:ethos-enter 140ms ease-out}.title{font-size:clamp(32px,4.5vw,42px);line-height:1.15;letter-spacing:-.045em;margin:10px 0 12px}.intro{line-height:1.6;margin-bottom:28px;max-width:54ch}
h1,h2,h3{color:var(--ethos-ink)}.subtle{color:var(--ethos-secondary)}.eyebrow{font-size:12px;line-height:1.5;letter-spacing:.14em;color:#c5939b}.hint{font-size:14px;line-height:1.6;color:var(--ethos-muted)}
.surface:not(.hero){background:var(--ethos-surface);border-color:var(--ethos-line);border-radius:var(--ethos-radius);box-shadow:none}
.card{padding:24px}.card p{color:var(--ethos-secondary);line-height:1.65}.section-head{margin:32px 0 14px;gap:16px}.section-head h2{font-size:18px;letter-spacing:-.025em}.separator{background:var(--ethos-line);margin:24px 0}
.button{min-height:48px;border-radius:var(--ethos-control);padding:13px 20px;background:var(--ethos-brand);font-size:15px;line-height:1.4;font-weight:700;box-shadow:none;transition:background 130ms,transform 100ms,border-color 130ms}
.button:hover{background:var(--ethos-brand-hover);transform:none}.button:active{transform:scale(.985)}.button.secondary{color:#d7cbd0;background:#292329;border:1px solid #ffffff16}.button.secondary:hover{background:#352b32;border-color:#ffffff28}.button.small{min-height:44px;padding:10px 14px;border-radius:10px}.button:disabled{opacity:.45;transform:none}
.link{min-height:40px;padding:9px 4px;font-size:14px;line-height:1.5;font-weight:600;color:#d6a1ac;border-radius:6px}.link:hover{color:#efd0d7}.icon-button{min-width:44px;height:44px;border-radius:12px;background:#211d22;border-color:var(--ethos-line);color:#c9bdc4;transition:background 120ms}.icon-button:hover{background:#30272e}
button:focus-visible,[role="button"]:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--ethos-focus);outline-offset:3px}
.field{background:#211e23;color:var(--ethos-ink);border-color:#ffffff25;border-radius:var(--ethos-control);font-size:16px;line-height:1.4;min-height:48px;padding:13px 14px;transition:border-color 120ms,background 120ms}.field:focus{background:#262027;border-color:#bd7885}.field-label{font-size:14px;color:#c6bac2;margin-top:22px;margin-bottom:8px}.field:disabled{color:#81787f;background:#1a181c}.field::placeholder,textarea::placeholder{color:#938890}
/* Existing dynamic hero intentionally retains its original background, shape and color treatment. */
.home-layout{gap:32px}.metric-grid{gap:0}.metric-grid .metric{background:transparent;border:0;border-bottom:1px solid var(--ethos-line);border-radius:0;padding:22px 0}.metric strong{font-size:28px;letter-spacing:-.04em;margin-bottom:6px}.metric span{font-size:14px;line-height:1.55;color:var(--ethos-secondary)}
.home-layout aside>.card{margin-top:24px;background:transparent;border:0;border-top:1px solid var(--ethos-line);border-radius:0;padding:24px 0}.home-layout aside>.card h3{font-size:16px}.home-layout aside>.card p{font-size:14px}
.hero.has-resume .button[data-action="start"]{background:transparent;border:1px solid #ffffff2c;color:#dac9cd}.hero.has-resume .resume-priority{display:flex;align-items:center;justify-content:center;min-height:48px;margin-top:14px;padding:13px 20px;background:var(--ethos-brand);border-radius:var(--ethos-control);color:white;font-size:15px;font-weight:700;width:100%}
/* Verse rows read as a collection, with reference, metadata and mastery in a steady rhythm. */
.item.surface{background:transparent;border:0;border-bottom:1px solid var(--ethos-line);border-radius:0;padding:20px 0;margin:0;align-items:center;gap:16px}.item.surface:hover{background:#ffffff03;transform:none}.item h3{font-size:18px;font-weight:700;letter-spacing:-.015em;margin-bottom:6px}.item p{font-size:14px;line-height:1.55;color:var(--ethos-secondary)}.pill{font-size:12px;letter-spacing:.01em;font-weight:600;border-radius:7px;padding:6px 9px;background:#39272f;color:#d6a7b2}.pill.familiar{background:#342b2f;color:#c7b3bb}.pill.strong{background:#3d2b31;color:#e0b2bb}.pill.mastered{background:#27362f;color:var(--ethos-mastery)}
.collection-grid{gap:10px}.collection.surface{padding:18px;background:#1b191d}.collection.selected{border-color:#a76774;background:#292027}.collection strong{font-size:15px}.collection span{font-size:14px}.toolbar{margin-top:24px}.empty{padding:32px 24px}.empty h3{font-size:19px}.empty p{font-size:16px;line-height:1.65}
.activity-refined{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 18px;align-items:center;transition:border-color 140ms,background 140ms}.activity-refined:hover{border-color:#a1667266;background:#211c22}.activity-reference{font-size:18px;font-weight:700;letter-spacing:-.015em}.activity-meta{display:block;font-size:14px;color:var(--ethos-muted);line-height:1.6;margin-top:5px}.activity-performance{font:700 24px Manrope,sans-serif;color:#dfb5bf;letter-spacing:-.035em;text-align:right}.activity-detail{grid-column:1/-1;color:var(--ethos-secondary);font-size:13px;margin-top:1px}
.history{min-height:60px;align-items:center;padding:14px 0;border-color:var(--ethos-line)}.history strong{font-size:16px}.history span{font-size:14px}.history:hover{color:#e7b7c2}
/* The same three destinations, with a quiet selected state and a stable bottom edge. */
.nav{width:100%;left:0;right:0;bottom:0;transform:none;border:0;border-top:1px solid var(--ethos-line);border-radius:0;box-shadow:none;background:#18151aee;backdrop-filter:blur(14px);gap:8px;padding:9px 18px calc(9px + env(safe-area-inset-bottom));justify-content:center}
.nav button{min-width:92px;max-width:130px;flex:1;padding:8px 16px;border-radius:10px;gap:5px;font-size:13px;line-height:1.3;color:#b1a4ae;transition:color 140ms,background 140ms}.nav button svg{width:21px;height:21px}.nav button.active,.nav button.center.active{background:#3d2730;color:#f1d4dc}.nav button.center{color:#b1a4ae}.nav button.active:after{content:'';height:2px;width:15px;background:#cf8e9f;border-radius:2px;position:absolute;bottom:5px}.nav button{position:relative}
/* Retrieval remains calm. The verse and response receive the most readable type. */
.practice-shell{max-width:690px;margin:18px auto}.practice-top{margin:16px 0 28px}.practice-top h1{font-size:clamp(26px,4.5vw,34px);letter-spacing:-.035em;line-height:1.2}.practice-top p{font-size:14px;line-height:1.5;color:var(--ethos-secondary)}.practice-top .eyebrow{margin-bottom:10px}
.recall-box.surface{background:#19171b;border:1px solid #54414e;padding:24px}.recall-box:focus-within{border-color:#b17a89;box-shadow:0 0 0 3px #b17a8910}.recall-box textarea{font-family:'DM Sans',sans-serif;font-size:21px;line-height:1.8;min-height:260px;letter-spacing:.005em;color:var(--ethos-ink);caret-color:#dfa4b3}.recall-box .progress-track{height:3px;background:#30272d}.progress-fill{background:#ad687c}.practice-actions{gap:12px;margin-top:20px;align-items:center;flex-wrap:wrap}
.page[data-phase="recall"] .practice-actions .button:last-child{min-width:152px}.page[data-phase="recall"] .practice-actions .secondary{background:transparent;border-color:var(--ethos-line);color:#baaab5}.page[data-phase="recall"] .practice-shell>.link{color:#a1939e;font-size:14px;margin-top:8px}
.recall-report>.surface.card{padding:28px}.recall-report .submitted-response{font-family:'DM Sans',sans-serif;font-size:22px;line-height:1.85;letter-spacing:.005em;margin:16px 0 10px;color:#f1eae2}.recall-report .correct-response{font-family:'DM Sans',sans-serif;font-size:20px;line-height:1.8!important;color:#d9d1cb!important;margin-top:14px!important;letter-spacing:.002em}
.report-outcome{display:flex;align-items:center;gap:16px;padding:20px 0;margin:18px 0;border-top:1px solid var(--ethos-line);border-bottom:1px solid var(--ethos-line)}.report-outcome .result-score{font-size:32px;line-height:1.2;letter-spacing:-.055em;white-space:nowrap;color:#dfb8c4}.report-outcome .result-score small{font-size:21px}.report-outcome .score-label{font-family:'DM Sans',sans-serif;font-size:15px;font-weight:500;letter-spacing:0;margin-left:7px;color:#c8aeb9}.report-outcome p{font-size:14px;line-height:1.5;max-width:25ch}
.recall-report .result-summary{gap:8px 18px;margin:20px 0 4px;padding:14px 0 0;border-top:1px solid var(--ethos-line)}.recall-report .result-summary .pill{background:transparent;padding:0;color:#a99aa5;border-radius:0;font-size:13px}.recall-report .result-summary .pill:first-child{color:#d4bcc8}.recall-report .result-summary .pill:last-child{color:#93858f}
.recall-error{position:relative;min-height:30px;color:inherit;text-decoration-thickness:2px;text-underline-offset:5px;transition:text-decoration-color 130ms}.recall-error:before{content:'';position:absolute;inset:-4px -2px;pointer-events:auto}.recall-error:hover{text-decoration-color:#f3b6c8}.recall-error.punctuation,.recall-error.capitalization,.recall-error.case{text-decoration-thickness:1px;text-decoration-color:#aaa1a4}.recall-insertion{min-width:26px;min-height:30px;position:relative}.recall-insertion:before{content:'';position:absolute;inset:-5px -2px}.mistake-explanation{background:#292127;border-left:2px solid #bd8395;border-radius:10px;padding:15px 18px}.mistake-explanation p{font-size:15px;color:#ebdfe5!important;line-height:1.65!important}
.mistake-explanation.anchored-explanation{position:fixed;z-index:25;margin:0;max-height:190px;overflow:auto;border:1px solid #7f5a69;box-shadow:0 8px 24px #0005;padding-right:44px;animation:ethos-explanation 120ms ease-out}.explanation-close{position:absolute;right:3px;top:3px;width:36px;height:36px;border:0;background:none;color:#d4bcc7;border-radius:7px;font-size:23px}.explanation-close:hover{background:#ffffff08}.anchored-explanation[hidden]{display:none}
.trouble-line{padding:12px 0;border-bottom:1px solid var(--ethos-line);color:#d3c6ce!important}.trouble-line:last-child{border-bottom:0}.trouble-line .hint{font-size:13px}.trouble-line .link{color:#d5a5b6}.page[data-screen="detail"]>.surface.card>p[style]{font-family:'DM Sans',sans-serif;font-size:21px!important;line-height:1.8!important;letter-spacing:.002em;color:var(--ethos-ink)!important}
.page[data-phase="complete"] .result-score{font-size:44px;line-height:1.2;color:#c0d6c9}.page[data-phase="complete"] .result-score small{font-size:25px}.page[data-phase="complete"] .practice-top h1{font-size:28px}.page[data-phase="complete"] .surface.card{border-top-color:#7b9b8955}
/* Existing Stats content: one primary trend, then mastery and quieter supporting figures. */
.page[data-screen="stats"]{max-width:780px;margin-inline:auto}.stats-primary-heading{margin-top:24px}.stats-primary-visual.surface{padding:26px 24px 22px;border:1px solid #68505e66;background:#211a21}.stats-primary-visual .recall-trend{height:185px;gap:16px}.stats-primary-visual .recall-trend>div{gap:10px;font-size:13px;color:#b1a4ae}.stats-primary-visual .trend-value{font-size:14px;font-weight:600;color:#ead1dd}.stats-primary-visual .trend-track{width:min(42px,100%);background:#31262f;border-radius:5px}.stats-primary-visual .trend-track i{background:#b67791;border-radius:5px 5px 2px 2px}
.page[data-screen="stats"] .stats-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px;margin-top:18px}.page[data-screen="stats"] .stat.surface{padding:20px 0;border:0;border-bottom:1px solid var(--ethos-line);border-radius:0;background:transparent}.stat strong{font-size:26px;line-height:1.3;letter-spacing:-.035em;color:#d8cbd3}.stat span{font-size:14px;line-height:1.5;color:var(--ethos-secondary)}.stat[data-emphasis="mastery"] strong{color:#c0d6c9;font-size:32px}.stat[data-emphasis="recall"] strong{color:#e3b9ca;font-size:32px}.stat[data-emphasis="support"] strong{font-size:22px;color:#afa0ac}.bar-row{font-size:14px;gap:14px;margin:17px 0}.bar-row span{width:80px;color:#c5b8c2}.bar-row .progress-track{height:7px;background:#352d34}.bar-row em{color:#cbbdc7}
/* Modal forms share the same control grammar and preserve their current grouping. */
.modal-wrap{padding:20px;background:#08060ac9;backdrop-filter:blur(3px)}.modal{background:#1b181e;border:1px solid #ffffff22;border-radius:20px;padding:26px;box-shadow:0 18px 60px #0006;max-height:calc(100dvh - 40px);scrollbar-width:thin;scrollbar-color:#604350 transparent}.modal-head{padding-bottom:4px;gap:16px}.modal h2{font-size:24px;letter-spacing:-.035em}.modal .row{align-items:center}.modal .row strong{font-size:16px}.modal .separator{margin:26px 0}.modal .hint{font-size:13px;line-height:1.6}.modal .preview{font-size:17px;line-height:1.75;padding:18px;background:#252027;color:#e0d4dc;border-radius:12px;max-height:240px}.suggestions{background:#272029;border-color:#584250}.suggestions button{min-height:48px;font-size:16px}.suggestions button:hover{background:#41303d}.toggle{height:26px;width:46px;background:#514650}.toggle:checked{background:var(--ethos-brand)}.toggle:after{height:20px;width:20px}.reminder-days{gap:7px}.reminder-days span{min-height:44px;border-radius:10px;color:#c3b3bf;border-color:#54434f}.reminder-days input:checked+span{background:#703845;border-color:#af7083}.reminder-window{padding-bottom:10px;border-bottom:1px solid var(--ethos-line)}.reminder-time-row{gap:10px}.reminder-missed{font-size:15px;line-height:1.55}.modal>.button.full{margin-top:4px}
.toast{font-size:14px;line-height:1.5;max-width:calc(100vw - 32px);width:max-content;background:#e9dde4;color:#20151e;border-radius:12px;padding:13px 18px;box-shadow:0 6px 20px #0003;bottom:100px}.offline-indicator{font-size:12px;color:#aaa0a9}.reliability-notice.surface{border-left:2px solid #b58c9d;background:#261d24}.reliability-notice p{color:#d4c2ce}.catalog-notice{font-size:13px}
.startup{background:var(--ethos-bg);gap:18px}.startup .brand{font-size:24px;letter-spacing:.22em}.startup-line{width:96px;height:2px;background:#39242f}.startup-line:after{background:#b56b83}.startup-label{color:#a28f9e;font-size:13px;letter-spacing:.025em}
@keyframes ethos-enter{from{opacity:.65}to{opacity:1}}@keyframes ethos-explanation{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:760px){.shell{padding-inline:40px}.home-layout{grid-template-columns:minmax(0,1.4fr) minmax(0,.75fr)}.nav{padding-top:10px;padding-bottom:10px}.nav button{min-width:110px}.page[data-screen="verses"] .desktop-grid{grid-template-columns:minmax(0,1.4fr) minmax(0,.8fr);gap:36px}}
@media(max-width:759px){.topbar{height:72px;margin-bottom:24px}.metric-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:24px;margin-bottom:16px}.metric-grid .metric{padding:14px 0}.metric strong{font-size:25px}.metric span{font-size:13px}.home-layout aside>.card{margin-top:12px}.page[data-screen="practice"]>.practice-shell{margin-top:0}.home-layout{display:block}}
@media(max-width:500px){.shell{padding-inline:20px;padding-bottom:110px}.title{font-size:32px}.card{padding:21px}.section-head{margin-top:28px}.nav{gap:4px;padding-inline:20px}.nav button{min-width:0;max-width:130px;padding-inline:10px}.practice-top{margin:12px 0 24px}.recall-box.surface{padding:20px}.recall-box textarea{font-size:20px;min-height:240px;line-height:1.8}.recall-report>.surface.card{padding:22px 20px}.recall-report .submitted-response{font-size:21px}.recall-report .correct-response{font-size:19px}.report-outcome{gap:12px;align-items:flex-start;flex-direction:column}.report-outcome p{max-width:none}.report-outcome .result-score{font-size:30px}.modal-wrap{padding:12px}.modal{padding:21px;max-height:calc(100dvh - 24px)}.reminder-time-row{gap:7px}.reminder-time-row .field{padding-inline:9px}.reminder-days{gap:5px}.item h3{font-size:17px}.item p{font-size:13px}.item .pill{font-size:12px;padding:6px 8px}.stats-primary-visual.surface{padding:22px 18px}.stats-primary-visual .recall-trend{gap:9px;height:165px}.stats-primary-visual .recall-trend>div{font-size:12px}.stats-primary-visual .trend-value{font-size:13px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.startup-line:after{transform:none;opacity:.65}}

/* V4.1 — anchored navigation and quiet, functional interaction feedback. */
.shell{padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))}
.nav{position:fixed;left:max(16px,env(safe-area-inset-left,0px));right:max(16px,env(safe-area-inset-right,0px));bottom:calc(8px + env(safe-area-inset-bottom,0px));width:auto;max-width:440px;margin-inline:auto;transform:none;display:flex;gap:4px;padding:6px;border:1px solid #ffffff19;border-radius:16px;background:#242026;box-shadow:0 4px 16px #0004;backdrop-filter:none;-webkit-backdrop-filter:none}
.nav button{flex:1;min-width:0;max-width:none;min-height:52px;padding:7px 10px;gap:4px;border-radius:10px;color:#bcb0b9;font-size:13px;line-height:1.25;transition:color 120ms ease,background-color 120ms ease,transform 90ms ease}
.nav button svg{width:20px;height:20px}.nav button.active,.nav button.center.active{background:#3b2a32;color:#f0dce3}.nav button.center{color:#bcb0b9}.nav button.active:after{width:14px;height:2px;bottom:3px;left:50%;transform:translateX(-50%);background:#c28c9c}.nav button:active{transform:scale(.98)}
/* Focus lives on the containing field, not as a second rectangle inside it. */
.recall-box textarea:focus,.recall-box textarea:focus-visible{outline:none;box-shadow:none;border:0}
.recall-box:focus-within{border-color:#987580;box-shadow:inset 0 0 0 1px #98758012}
.recall-box:has(textarea:focus-visible){border-color:#b68e9a;box-shadow:inset 0 0 0 1px #b68e9a22}
.icon-button:active,.link:active{transform:scale(.98)}
.progress-fill,.trend-track i{transition:width 180ms ease-out,height 180ms ease-out}
.toast{bottom:calc(98px + env(safe-area-inset-bottom,0px))}
@media(prefers-reduced-motion:reduce){.nav button,.progress-fill,.trend-track i{transition:none}.nav button:active,.button:active,.icon-button:active,.link:active{transform:none}}
