
/* Home only: friendly, compact, no extra configuration. */
.shell:has(.view[data-view=home]) header{border-color:#d1dfec}
.view[data-view=home]{padding-top:clamp(12px,2.4dvh,23px)}
.view[data-view=home] .field{margin-bottom:clamp(14px,2.5dvh,22px)}
.view[data-view=home] .seg button{border-radius:12px;min-height:46px;background:white;box-shadow:0 2px 0 #dce5ef}
.view[data-view=home] .seg .selected{background:#dcecff;color:#194c88;box-shadow:0 2px 0 #a8c4e5,inset 0 0 0 1px #244e91}
.mode-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.mode-grid .mode-tile{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:102px;padding:9px 4px;border-radius:14px;box-shadow:0 3px 0 #dce5ef;text-align:center}
.mode-grid .mode-tile strong{font-size:clamp(11px,3vw,15px);line-height:1.25;overflow-wrap:anywhere}
.mode-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#edf2f8;color:#315e91}
.mode-icon svg{width:22px;height:22px}
.mode-tile[data-val=quiz] .mode-icon{background:#e3f3ea;color:#287350}
.mode-tile[data-val=exam] .mode-icon{background:#fdf0d7;color:#8a631d}
.mode-grid .selected{background:#e6f0fe;border:2px solid #244e91;box-shadow:0 3px 0 #a9c2df;color:#1c467d}
.view[data-view=home] .primary{position:relative;border-radius:14px;box-shadow:0 4px 0 #163970;min-height:54px}
.start-arrow{position:absolute;right:18px;top:50%;transform:translateY(-50%);font-size:23px}
.view[data-view=home] .record{margin-top:10px}
@media(max-width:365px){.mode-grid{gap:5px}.mode-grid .mode-tile{min-height:84px}}
@media(max-height:700px){.mode-grid .mode-tile{min-height:76px}.mode-icon{height:28px;width:28px}.mode-icon svg{width:19px;height:19px}.view[data-view=home] .field{margin-bottom:14px}}
/* Exam practice lives in the same shell; scope all study styles. */
.embedded-exam{padding-top:clamp(12px,2dvh,22px);padding-bottom:16px}
.embedded-exam[hidden],#app[hidden]{display:none!important}
.embedded-exam h1{font-size:clamp(22px,5vw,28px);line-height:1.35}
.embedded-exam h2{font-size:17px;margin:14px 0 7px}
.embedded-exam .top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.embedded-exam .meter{height:7px;background:#dce5f1;border-radius:6px;margin:12px 0 15px;overflow:hidden}
.embedded-exam .meter span{display:block;height:100%;background:var(--accent)}
.embedded-exam .stem{font-size:clamp(18px,4.5vw,23px);line-height:1.6;overflow-wrap:anywhere;padding:15px 16px;background:#fff;border:1px solid var(--line);border-radius:13px;margin:0 0 12px}
.embedded-exam .blank{color:var(--accent);font-weight:750;white-space:nowrap}
.embedded-exam .options{display:grid;gap:8px}
.embedded-exam .option{height:auto;min-height:52px;padding:10px 13px;font-size:clamp(17px,4.2vw,21px);justify-content:flex-start;line-height:1.4;gap:12px;border-radius:11px}
.embedded-exam .option span:last-child{min-width:0;overflow-wrap:anywhere}
.embedded-exam .num{display:grid;place-items:center;width:1.7em;height:1.7em;background:#e9eff7;color:#53647b;font-size:13px;border-radius:6px;font-weight:700;flex:none}
.embedded-exam .option.correct{background:#e8f3eb;color:var(--green);border-color:var(--green)}
.embedded-exam .option.wrong{background:#fae9e5;color:var(--red);border-color:var(--red)}
.embedded-exam .option.correct .num{background:#c9e6c4}.embedded-exam .option.wrong .num{background:#f4cdc6}
.embedded-exam .option:disabled:not(.correct):not(.wrong){opacity:.7}
.embedded-exam .feedback{padding:10px 0;min-height:0;line-height:1.5}
.embedded-exam .feedback strong{color:var(--green)}.embedded-exam .feedback.bad strong{color:var(--red)}
.embedded-exam .feedback p{font-size:14px;margin-top:4px}.embedded-exam .feedback .word{font-size:17px;font-weight:750}
.embedded-exam .primary{min-height:50px}.embedded-exam .note{margin-top:12px;font-size:13px;color:var(--muted)}
.embedded-exam .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
.embedded-exam .actions:has(button:only-child){grid-template-columns:1fr}
.embedded-exam .score{font-size:36px;color:var(--accent);font-weight:800;margin:7px 0}
.embedded-exam .wide{width:100%}
.embedded-exam .review{list-style:none;margin:0;padding:0}
.embedded-exam .review li{padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:white;margin-bottom:7px;overflow-wrap:anywhere}
.embedded-exam .review li.miss{background:#fae9e5;border-color:#e3bab2}
.embedded-exam .review p{font-size:14px;margin-top:3px}.embedded-exam .review small{font-size:12px;color:var(--muted)}

/* Keep visual hierarchy in the controls rather than promotional copy. */
.field-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}
.field-heading .label{margin:0}
.home-count{display:inline-flex;align-items:baseline;gap:4px;font-size:12px;color:#41617e;background:#e2effb;border-radius:8px;padding:4px 9px;white-space:nowrap}
.home-count strong{font-size:16px;font-variant-numeric:tabular-nums;color:#244e91}
.mode-grid .mode-tile{min-height:90px;gap:9px}
.mode-grid .mode-tile strong{font-size:clamp(12px,3.2vw,15px)}
@media(max-height:700px){.mode-grid .mode-tile{min-height:76px;gap:6px}}

.direction-field.inactive .label{color:var(--muted)}
.direction-field.inactive button:disabled{background:#e8edf3;color:#637287;border-color:#d4dce5;box-shadow:0 2px 0 #dce5ef;opacity:1}
