.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
[hidden] { display:none !important; }
.sidebar-search { padding: 8px 12px; border-bottom: 1px solid var(--cream-deeper); font-size: 12px; }
.sidebar-search label { display:block; margin-bottom:4px; font-weight:700; color:var(--brown); }
.sidebar-search input, .sidebar-search select { width:100%; padding:8px; border:1px solid var(--brown-ghost); border-radius:6px; background:var(--white); color:var(--text); }
.sidebar-search select { margin-top:5px; }
#saved-search-results { max-height:160px; overflow-y:auto; margin-top:6px; color:var(--text-muted); }
.saved-search-result { display:block; width:100%; padding:8px; margin:3px 0; text-align:left; background:var(--white); color:var(--text); border:1px solid var(--cream-deeper); }
.saved-search-result strong, .saved-search-result span { display:block; white-space:normal; }
.saved-search-result span { font-size:11px; color:var(--text-muted); }
.history-item { display:block; width:100%; text-align:left; background:transparent; color:var(--text); border:0; }
.followup-start { margin-top:18px; }
#save-status { min-height:1em; padding:0 12px; color:var(--brown-light); }
#resolution-view { display:flex; flex:1; min-height:0; position:relative; overflow:hidden; }
#resolution-rail { flex:0 0 235px; overflow-y:auto; padding:14px; background:var(--cream-dark); border-right:1px solid var(--brown-ghost); }
.resolution-rail-head, .resolution-canvas-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.resolution-rail-head h2 { font-size:17px; color:var(--brown); }
.resolution-project-group { margin-top:10px; padding:8px; background:var(--white); border-radius:8px; }
.resolution-project-group summary { cursor:pointer; font-weight:700; }
.resolution-project-group button { display:block; width:100%; margin-top:5px; padding:6px; text-align:left; background:none; color:var(--brown); }
#resolution-view.rail-hidden #resolution-rail { display:none; }
.resolution-rail-backdrop { display:none; }
#resolution-canvas { flex:1; min-width:0; display:flex; flex-direction:column; }
.resolution-canvas-head { flex:none; padding:10px 18px; border-bottom:1px solid var(--cream-deeper); }
#resolution-thread { flex:1; overflow-y:auto; padding:24px; display:flex; flex-direction:column; gap:16px; }
.practice-card { width:min(100%, 780px); padding:20px; background:var(--white); border:1px solid var(--cream-deeper); border-radius:14px; color:var(--text); }
.practice-card h2, .practice-card h3, .practice-card h4 { color:var(--brown); line-height:1.3; margin-bottom:8px; }
.practice-card h2 { font-size:24px; }
.practice-card h3 { font-size:20px; }
.practice-card h4 { font-size:16px; }
.practice-card p { margin:8px 0 13px; }
.practice-card label:not(.practice-permission) { display:block; font-weight:700; margin:12px 0 5px; }
.practice-card input:not([type=checkbox]), .practice-card select, .practice-card textarea { width:100%; padding:10px; border:1px solid var(--brown-ghost); border-radius:8px; background:var(--white); color:var(--text); font:inherit; }
.practice-card textarea { resize:vertical; min-height:90px; }
.practice-card ol { padding-left:23px; margin:12px 0; }
.practice-card li { margin:10px 0; }
.question-select { width:100%; display:block; padding:10px 12px; text-align:left; border:1px solid var(--brown-ghost); border-radius:9px; background:var(--white); color:var(--text); font:inherit; cursor:pointer; }
.question-select.is-selected { border-color:var(--brown); background:var(--cream); box-shadow:inset 3px 0 0 var(--brown); }
.question-select:focus-visible { outline:3px solid var(--sage); outline-offset:2px; }
.practice-card details { margin:12px 0; }
.practice-card summary { cursor:pointer; font-weight:700; color:var(--brown-mid); }
.practice-actions { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin-top:14px; }
.practice-notice { color:var(--brown-light); font-size:13px; }
.practice-permission { display:flex; align-items:flex-start; gap:8px; margin:16px 0; font-size:13px; }
.practice-permission input { flex:none; margin-top:3px; }
.resolution-source { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; padding:14px; background:var(--cream); border-radius:8px; }
.mapping-row { padding:12px 0; border-top:1px solid var(--cream-deeper); }
.practice-result { border-top:1px solid var(--cream-deeper); padding:14px 0; }
.practice-saved-attempt { margin-top:18px; }
.speech-practice { margin:0 0 0 40px; max-width:calc(100% - 40px); }
#practice-audio-preview audio { width:min(100%, 350px); display:block; margin:10px 0; }
@media (max-width:700px) {
  #resolution-rail { position:absolute; inset:0 auto 0 0; width:min(82vw,280px); z-index:3; box-shadow:8px 0 25px rgba(42,31,23,.18); }
  .resolution-rail-backdrop:not([hidden]) { display:block; position:absolute; inset:0; z-index:2; border:0; border-radius:0; background:rgba(42,31,23,.34); }
  #resolution-thread { padding:12px; }
  .practice-card { padding:15px; }
  .speech-practice { margin-left:0; max-width:100%; }
}
@media (max-width:400px) {
  .practice-actions .btn { width:100%; }
  #header-bar { gap:6px; padding:0 8px; }
}
