/* Teacher console only: rule switches with tips, and the folding setup panel. Kept apart from style.css, which is
   part of the student editor's build hash. */
.toggles { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .5rem 1.5rem; margin: 1rem 0; }
.toggle { display: flex; align-items: center; gap: .5rem; position: relative; }
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; margin: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { flex: none; width: 2.6rem; height: 1.5rem; border-radius: 1rem; background: var(--line); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--bg); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(1.1rem); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .switch .track, .switch .track::after { transition: none; } }
.tip { position: relative; display: inline-block; }
.tip-mark { display: inline-block; width: 1.2rem; height: 1.2rem; line-height: 1.1rem; text-align: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: .8em; cursor: help; }
.tip-text { display: none; position: absolute; z-index: 5; left: 50%; bottom: calc(100% + .4rem); transform: translateX(-50%); width: 16rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--card); box-shadow: 0 2px 8px rgb(0 0 0 / .2); font-size: .9em; }
.tip:hover .tip-text, .toggle:focus-within .tip-text { display: block; }

/* starting point: one choice from a few, as a row of buttons */
fieldset.segmented, fieldset.range { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
fieldset legend { padding: 0; font-weight: 600; margin-bottom: .35rem; }
.segmented .options { display: flex; flex-wrap: wrap; gap: .5rem; }
.segmented .option { position: relative; display: inline-flex; align-items: center; gap: .3rem; }
.segmented .option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented .option label { margin: 0; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 2rem; background: var(--card); cursor: pointer; }
.segmented .option input:checked + label { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600; }
.segmented .option input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.segmented .option:hover .tip-text, .segmented .option:focus-within .tip-text { display: block; }

/* word count: "Between [ ] and [ ] words" on one line */
.range-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.range-row input { width: 6.5rem; }
.hint { margin: .25rem 0 0; color: var(--muted); font-size: .88em; }

/* classes */
.class-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.class-head h2 { margin: 0; }
.copy-chooser { padding: .25rem 0; }
.extend-form label { margin: 0; }
