/* Functional quiz layout; the shared site stylesheet supplies the page design. */
.quiz-shell [hidden]{display:none!important}
.quiz-shell .navigation{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 0 1.25rem}
.quiz-shell .navigation button[aria-current="page"]{background:var(--forest);color:var(--mint);border-color:var(--forest)}
.quiz-shell .layout{display:grid;grid-template-columns:minmax(0,1fr) 20rem;gap:1.5rem;align-items:start}
.quiz-shell .layout>div,.quiz-shell .sidebar{min-width:0}
.quiz-shell .layout .panel{margin-bottom:1.5rem}
.quiz-shell .settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.quiz-shell .settings label{display:grid;gap:.4rem;min-width:0}
.quiz-shell .settings select,.quiz-shell input[type="search"],.quiz-shell .term-tools select{width:100%;min-width:0}
.quiz-shell .actions{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap;margin-top:1.25rem}
.quiz-shell .actions .small{margin:0}
.quiz-shell .question-label{display:flex;justify-content:space-between;gap:.75rem;flex-wrap:wrap}
.quiz-shell .scenario{font-size:1.1rem;line-height:1.65;padding:1.1rem 1.25rem;background:var(--mint);border-radius:.6rem;border-left:4px solid var(--forest);margin:1.25rem 0}
.quiz-shell .question-title{font-size:1.35rem;line-height:1.4;margin-top:1.25rem}
.quiz-shell .answers{padding:0;border:0;margin:1rem 0;min-width:0}
.quiz-shell .answers legend,.quiz-shell .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.quiz-shell .option{display:flex;gap:.75rem;align-items:flex-start;border:1px solid var(--line);border-radius:.6rem;padding:.9rem 1rem;margin:.7rem 0;cursor:pointer;line-height:1.5}
.quiz-shell .option input{margin:.3rem 0 0;accent-color:var(--forest);width:18px;height:18px;flex:0 0 18px}
.quiz-shell .option .letter{font-weight:750;min-width:1.3rem}
.quiz-shell .option>span:last-child{min-width:0;overflow-wrap:anywhere}
.quiz-shell .option:has(input:checked){border-color:var(--forest);background:var(--mint)}
.quiz-shell .option.correct{background:var(--mint);border:2px solid var(--forest)}
.quiz-shell .option.wrong{background:transparent;border:2px dashed var(--ink)}
.quiz-shell .option .outcome{display:block;font-size:.85rem;font-weight:700;margin-top:.35rem}
.quiz-shell .feedback{padding:1.1rem 1.25rem;border:1px solid var(--line);border-radius:.6rem;margin-top:1.25rem}
.quiz-shell .feedback.good{background:var(--mint);border-left:5px solid var(--forest)}
.quiz-shell .feedback.review{border-left:5px dashed var(--ink)}
.quiz-shell .feedback h3{margin:0 0 .6rem}
.quiz-shell .feedback details{border-top:1px solid var(--line);padding-top:.75rem;margin-top:1rem}
.quiz-shell .feedback ul{padding-left:1.3rem}
.quiz-shell .feedback li{margin:.75rem 0}
.quiz-shell .stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;margin:1.1rem 0}
.quiz-shell .metric{border:1px solid var(--line);border-radius:.6rem;padding:.8rem;min-width:0}
.quiz-shell .metric strong{display:block;font-size:1.6rem;line-height:1.2;color:var(--forest);overflow-wrap:anywhere}
.quiz-shell .metric span{display:block;font-size:.8rem;line-height:1.5;margin-top:.4rem}
.quiz-shell .rank-name{font-size:1.6rem;line-height:1.3;font-weight:750;margin-top:.5rem}
.quiz-shell .bar{height:.75rem;display:block;width:100%;accent-color:var(--forest);margin:.75rem 0}
.quiz-shell .sidebar dl{display:block;margin:1rem 0}
.quiz-shell .sidebar dt{font-size:.85rem;font-weight:400}
.quiz-shell .sidebar dd{margin:.15rem 0 .8rem;font-size:1.1rem;font-weight:650}
.quiz-shell .term-tools{display:grid;grid-template-columns:2fr 1fr;gap:.75rem;margin:1.1rem 0}
.quiz-shell .term-tools label{min-width:0}
.quiz-shell .term-list details{border:1px solid var(--line);border-radius:.6rem;padding:1rem 1.1rem;margin:.8rem 0}
.quiz-shell .term-list summary{cursor:pointer;font-weight:700;display:flex;justify-content:space-between;align-items:baseline;gap:1rem}
.quiz-shell .term-list summary .small{font-weight:400;white-space:nowrap}
.quiz-shell .term-list .limit-copy{padding:.75rem;background:var(--mint);border-radius:.4rem}
.quiz-shell .table-wrap{overflow-x:auto;max-width:100%}
.quiz-shell .table-wrap table{border-collapse:collapse;width:100%}
.quiz-shell .table-wrap th,.quiz-shell .table-wrap td{padding:.8rem;border:1px solid var(--line);text-align:left;vertical-align:top}
.quiz-shell .achieved{background:var(--mint)}
.quiz-shell .file-control{display:inline-block;border:1px solid var(--line);border-radius:.5rem;padding:.7rem 1rem;cursor:pointer;max-width:100%}
.quiz-shell .file-control input{display:block;width:100%;font-size:.85rem;margin-top:.5rem}
.quiz-shell .result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.75rem;margin:1.1rem 0}
.quiz-shell .notice.error{border-left:5px dashed var(--ink)}
.quiz-shell button:disabled{opacity:.55;cursor:default}
@media(max-width:1000px){
  .quiz-shell .layout{grid-template-columns:1fr}
  .quiz-shell .sidebar{order:2}
  .quiz-shell .sidebar .stats-grid{grid-template-columns:repeat(4,1fr)}
}
@media(max-width:600px){
  .quiz-shell .settings,.quiz-shell .term-tools{grid-template-columns:1fr}
  .quiz-shell .sidebar .stats-grid,.quiz-shell .result-grid{grid-template-columns:1fr 1fr}
  .quiz-shell .scenario{padding:.9rem;font-size:1rem}
  .quiz-shell .option{padding:.8rem .65rem;gap:.5rem}
  .quiz-shell .term-list summary{display:block}
  .quiz-shell .term-list summary .small{display:block;margin-top:.4rem;white-space:normal}
  .quiz-shell .actions>button{flex-grow:1}
}
@media print{
  .quiz-shell .navigation,.quiz-shell .actions,.quiz-shell .settings,.quiz-shell .sidebar,.quiz-shell #storage-note,.quiz-shell #notice{display:none}
  .quiz-shell .layout{display:block}
}

/* Keep the comparison reachable by keyboard and primary quiz actions comfortable to tap. */
.quiz-shell .table-wrap:focus-visible{outline:3px solid var(--terra);outline-offset:4px}
.quiz-shell button{min-height:44px}
