:root{font-family:system-ui,sans-serif;color:#182b2a;background:#eef3f2;line-height:1.5;--ink:#164941;--line:#cfdbd8}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;display:flex;flex-direction:column}
header{background:#133c36;color:#fff;padding:1rem max(1rem,calc((100% - 1120px)/2))}
.brand{display:inline-flex;color:inherit;text-decoration:none;align-items:center;gap:.7rem;font-weight:700}
.brand-mark{display:grid;place-items:center;width:2rem;height:2rem;background:#d5f1e7;color:#133c36;border-radius:.45rem;font-family:Georgia,serif;font-size:1.2rem}
main{width:100%;max-width:1160px;margin:0 auto;padding:1.5rem 1.1rem}
.search{background:#dbeae5;padding:clamp(1rem,4vw,2.5rem);border-radius:1.1rem;position:relative}
h1,h2,h3,p{margin:0}
h1{font-family:Georgia,serif;font-size:clamp(1.8rem,5vw,2.85rem);line-height:1.15;margin-bottom:1.2rem;color:#133c36}
label{display:block;font-weight:650;margin-bottom:.35rem}
.search-line,.actions{display:flex;gap:.55rem;align-items:center;flex-wrap:wrap}
.search-line{flex-wrap:nowrap;max-width:38rem}
button,input{font:inherit}
button{cursor:pointer;border:1px solid var(--line);border-radius:.5rem;background:white;color:var(--ink);padding:.48rem .85rem;font-weight:650}
button:hover{background:#e5f2ed}
button:disabled{cursor:default;opacity:.55;background:#fff}
.primary{background:var(--ink);color:white;border-color:var(--ink)}
.primary:hover{background:#23685d}
#word{width:100%;min-width:0;padding:.54rem .7rem;background:white;border-radius:.5rem;border:1px solid #9cb5ae;color:inherit}
#results{max-width:38rem;margin-top:.45rem;border:1px solid var(--line);border-radius:.5rem;background:white;padding:.25rem}
#results button{display:flex;justify-content:space-between;gap:.8rem;width:100%;border:0;text-align:left}
#search-status:not(:empty){margin-top:.45rem}
.exercise-head{display:flex;align-items:end;justify-content:space-between;gap:.7rem;flex-wrap:wrap;margin:1.45rem 0 .8rem}
#lemma{font-family:Georgia,serif;font-size:2.1rem;line-height:1.15}
#category,.keys,footer{color:#385653}
kbd{background:white;padding:.1rem .3rem;border:1px solid var(--line);border-radius:.25rem}
.stack,.pair{display:grid;gap:.8rem}
.pair{grid-template-columns:repeat(2,minmax(0,1fr))}
.card,details,.actions{border:1px solid var(--line);border-radius:.75rem;background:white}
.card{padding:.85rem;min-width:0}
.card h3{margin-bottom:.5rem;font-size:1.08rem}
summary{cursor:pointer;font-weight:700;padding:.85rem 1rem}
details[open]>summary{border-bottom:1px solid var(--line)}
.details-body{padding:.75rem}
.scroll{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:.875rem}
th,td{padding:.25rem;text-align:center;border-bottom:1px solid #e0e8e6}
thead th{background:#edf4f1;color:#294f49}
tbody th{font-weight:650;text-align:left;white-space:nowrap}
.cell{position:relative}
.cell input{min-width:5.7rem;width:100%;padding:.38rem 1.1rem .38rem .35rem;color:inherit;background:#fbfdfc;border:1px solid #b9ccc6;border-radius:.32rem}
.cell span{position:absolute;pointer-events:none;right:.52rem;top:50%;transform:translateY(-50%);font-weight:750}
[data-state=correct] input{background:#e0f5e6;border-color:#47825c}
[data-state=wrong] input{background:#fce7e6;border-color:#b74b48}
[data-state=revealed] input{background:#e7effb;border-color:#6f90c0}
[data-state=correct] span{color:#216631}
[data-state=wrong] span{color:#9b2424}
:focus-visible{outline:2px solid #146cab;outline-offset:2px}
.actions{margin-top:.8rem;padding:.7rem}
#score{margin-left:auto}
footer{margin-top:auto;border-top:1px solid var(--line);background:#dbeae5;font-size:.875rem}
.footer-inner{max-width:1160px;margin:0 auto;padding:1rem 1.1rem}
footer a{color:var(--ink)}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:740px){.pair{grid-template-columns:1fr}.split-mobile{display:grid}.search,.card{border-radius:.65rem}}

header{background:#172824;border-bottom:3px solid #efa83f}
.brand-mark{background:#efa83f;color:#172824}
.brand:hover .brand-name{text-decoration:underline}
.brand:focus-visible{outline-color:#efa83f}
.instructions{margin-top:1.25rem;padding:1rem;border:1px solid var(--line);border-radius:.75rem;background:white}
.instructions h2{font-size:1.15rem}
.instructions ol{margin:.5rem 0 0;padding-left:1.35rem}
.instructions li + li{margin-top:.35rem}
.intro{max-width:39rem;margin:-.4rem 0 1.15rem}
.signature{font-weight:700;margin-bottom:.25rem}
