/* Controls from the house style guide, built only from house-style tokens
   and shared by /backdrop and /style. Kept out of house.css so that file
   stays an unchanged copy of the template. Placement (fixed corners, panel
   layout) belongs to each page, not here.

   .seg: a segmented control, the theme toggle's pill with mono text options.
   aria-pressed marks the current one with the toggle's inverted look. Two to
   four short options. */
.seg{display:inline-flex;flex-wrap:wrap;gap:2px;padding:3px;background:var(--surface);border:1px solid var(--rule);border-radius:999px}
.seg button{font:500 .72rem/1 var(--mono);letter-spacing:.04em;padding:8px 11px;border:0;border-radius:999px;background:none;color:var(--faint);cursor:pointer}
.seg button:hover{color:var(--ink);background:var(--surface-2)}
.seg button[aria-pressed="true"],.seg button[aria-pressed="true"]:hover{color:var(--ground);background:var(--ink)}

/* .menu-btn: a 40px round icon button that opens and closes one panel;
   aria-expanded drives its pressed look. */
.menu-btn{width:40px;height:40px;display:grid;place-items:center;padding:0;border:1px solid var(--rule);border-radius:50%;background:var(--surface);color:var(--dim);box-shadow:var(--shadow);cursor:pointer}
.menu-btn svg{width:18px;height:18px;display:block}
.menu-btn:hover{color:var(--ink);background:var(--surface-2)}
.menu-btn[aria-expanded="true"],.menu-btn[aria-expanded="true"]:hover{color:var(--ground);background:var(--ink);border-color:var(--ink)}

/* .pill: a single outlined mono button. In a .pills row (options that may
   wrap, such as presets) aria-pressed gives the current one the inverted
   look; alone it is a quiet action (Reset). An action with something to act
   on (Reset while any setting is off its default) gets .changed: an indigo
   --pre outline and --pre-soft halo, like .card.elsewhere, and full ink. */
.pills{display:flex;flex-wrap:wrap;gap:.35rem}
.pill{font:500 .72rem/1 var(--mono);letter-spacing:.04em;padding:8px 11px;border-radius:999px;border:1px solid var(--rule);background:var(--surface);color:var(--dim);cursor:pointer}
.pill:hover{color:var(--ink);background:var(--surface-2)}
.pill[aria-pressed="true"],.pill[aria-pressed="true"]:hover{color:var(--ground);background:var(--ink);border-color:var(--ink)}
.pill.changed{color:var(--ink);border-color:var(--pre);box-shadow:0 0 0 3px var(--pre-soft)}

/* .sliders: a grid of label, range input and value. Labels match dt, values
   are mono tabular numbers, the track takes --ink (no status colour), and
   each input is 24px tall so neighbours meet the touch-target size. A
   setting away from its default gets .changed on label and value: an indigo
   --pre dot and full ink. The dot's space is reserved on every row. */
.sliders{display:grid;grid-template-columns:auto minmax(0,1fr) 3.6rem;gap:.35rem .8rem;align-items:center}
.sliders label,.sliders .lbl{font:500 .68rem/1.9 var(--mono);letter-spacing:.11em;text-transform:uppercase;color:var(--faint);position:relative;padding-left:12px}
.sliders input{width:100%;height:24px;margin:0;accent-color:var(--ink);cursor:pointer}
.sliders output{font:500 .78rem/1 var(--mono);color:var(--dim);text-align:right;font-variant-numeric:tabular-nums}
.sliders .pills{grid-column:2/-1;padding-block:.15rem .35rem}
.sliders label.changed{color:var(--ink)}
.sliders label.changed::before{content:"";position:absolute;left:0;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:50%;background:var(--pre)}
.sliders output.changed{color:var(--ink)}
