/* Copied from hud-kit/web/settings/settings.css by hud-kit bin/sync-into. Edit it there, then run it again. */
/* hud-kit web/settings (see settings.js). Geometry, layers and motion only; colours and fonts come from --settings-*
   variables, falling back to the role tokens. The switch is hud-kit controls.css's (load it too); the slider is
   web/slider's. Sizes come from knobs: --settings-w, --settings-row-h, --settings-pad, --settings-gap,
   --settings-section-gap, --settings-hold. */
.hk-settings{
  --st-ink: var(--settings-ink, var(--c-ink, currentColor));
  --st-soft: var(--settings-soft, var(--c-muted, color-mix(in srgb, currentColor 62%, transparent)));
  --st-row: var(--settings-row, var(--c-surface, color-mix(in srgb, currentColor 7%, transparent)));
  --st-line: var(--settings-line, var(--c-line, color-mix(in srgb, currentColor 16%, transparent)));
  --st-accent: var(--settings-accent, var(--c-accent, currentColor));
  --st-accent-ink: var(--settings-accent-ink, var(--c-accent-ink, Canvas));
  --st-danger: var(--settings-danger, var(--c-danger, var(--st-ink)));
  --slider-ink: var(--st-ink); --slider-soft: var(--st-soft); --slider-focus: var(--st-accent);
  box-sizing:border-box;display:flex;flex-direction:column;width:min(var(--settings-w,560px),100%);color:var(--st-ink);
  background:var(--settings-bg, transparent);font-family:var(--settings-family, var(--t-body, inherit));text-align:left}
.hk-settings *{box-sizing:border-box}
.hk-settings .st-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.hk-settings .st-section{display:flex;flex-direction:column;gap:var(--settings-gap,4px)}
.hk-settings .st-section+.st-section{margin-top:var(--settings-section-gap,22px)}
.hk-settings .st-head{padding:0 var(--settings-pad,16px) 4px;font-size:.78em;font-weight:800;letter-spacing:.04em;color:var(--st-soft);text-wrap:balance}
.hk-settings .st-note{padding:2px var(--settings-pad,16px) 0;font-size:.8em;font-weight:600;color:var(--st-soft);text-wrap:pretty}

/* A row: words on the left, its control on the right (a slider row puts the slider under the words). */
.hk-settings .st-row{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;min-height:var(--settings-row-h,58px);padding:8px var(--settings-pad,16px);
  border-radius:14px;background:var(--st-row);color:var(--settings-row-ink, var(--c-surface-ink, var(--st-ink)));outline:0;
  transition:background-color .1s,transform .08s;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
.hk-settings .st-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.hk-settings .st-label{font-weight:700;line-height:1.25;text-wrap:pretty}
.hk-settings .st-detail{font-size:.82em;font-weight:500;line-height:1.3;color:var(--st-soft);text-wrap:pretty}
.hk-settings .st-end{flex:none;position:relative;display:flex;align-items:center;gap:10px}
.hk-settings .st-value{font-size:.9em;font-weight:700;color:var(--st-soft);font-variant-numeric:tabular-nums}
.hk-settings .st-chev{width:9px;height:15px;fill:none;stroke:var(--st-soft);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}

/* Rows you press. */
.hk-settings .st-row[role]{cursor:pointer}
.hk-settings .st-row[role]:hover,.hk-settings .st-row.hover,.hk-settings .st-stepper:hover{background:var(--settings-hover, color-mix(in srgb, var(--st-row) 86%, var(--st-ink)))}
.hk-settings .st-row.pressed,.hk-settings .st-row[role]:active{background:var(--settings-press, color-mix(in srgb, var(--st-row) 74%, var(--st-ink)))}
.hk-settings .st-row:focus-visible{box-shadow:inset 0 0 0 2px var(--st-accent)}
.hk-settings .st-row .hk-switch{pointer-events:none;--hk-switch-w:52px;--hk-switch-h:30px;--hk-switch-knob:22px;--hk-switch-inset:4px}

/* Check box. */
.hk-settings .st-box{display:grid;place-items:center;width:26px;height:26px;border-radius:8px;box-shadow:inset 0 0 0 2px var(--st-soft);transition:background-color .1s,box-shadow .1s}
.hk-settings .st-box svg{width:18px;height:18px;fill:none;stroke:var(--st-accent-ink);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:20;stroke-dashoffset:20;transition:stroke-dashoffset .16s ease-out}
.hk-settings .st-check[aria-checked=true] .st-box{background:var(--st-accent);box-shadow:none}
.hk-settings .st-check[aria-checked=true] .st-box svg{stroke-dashoffset:0}

/* Stepper. */
.hk-settings .st-step{all:unset;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;cursor:pointer;box-shadow:inset 0 0 0 1.5px color-mix(in srgb, var(--st-soft) 70%, transparent);transition:background-color .1s,transform .08s}
.hk-settings .st-step svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round}
.hk-settings .st-step:hover,.hk-settings .st-step.hover{background:color-mix(in srgb, currentColor 10%, transparent)}
.hk-settings .st-step:active,.hk-settings .st-step.pressed{transform:scale(.9)}
.hk-settings .st-step:focus-visible{box-shadow:inset 0 0 0 2px var(--st-accent)}
.hk-settings .st-step:disabled{opacity:.35;cursor:default;transform:none;background:none}
.hk-settings .st-num{min-width:3.2em;text-align:center;font-weight:800;font-variant-numeric:tabular-nums}

/* Slider row: the slider runs the whole width under the words; its own name is for assistive tech only. */
.hk-settings .st-slider{flex:0 0 100%}
.hk-settings .st-slider .hk-slider-head{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.hk-settings .st-slider .hk-slider{--slider-thumb:28px;--slider-row:0px;--slider-value-size:14px;--slider-end-size:12px;padding:0}

/* Hold-to-commit: the fill grows while held; let go early and it drains. */
.hk-settings .st-end .st-hold{all:unset;position:relative;overflow:hidden;display:inline-grid;place-items:center;min-width:96px;height:36px;padding:0 16px;border-radius:18px;cursor:pointer;
  box-shadow:inset 0 0 0 2px var(--st-accent);color:var(--st-accent);font-weight:800;font-size:.9em;white-space:nowrap;transition:transform .08s}
.hk-settings .st-end .st-hold.danger{box-shadow:inset 0 0 0 2px var(--st-danger);color:var(--st-danger)}
.hk-settings .st-end .st-hold span{position:relative;grid-area:1/1}
/* Both labels sit hidden in the same cell, so the pill keeps one width while its word changes. */
.hk-settings .st-end .st-hold::before{content:attr(data-a)}.hk-settings .st-end .st-hold::after{content:attr(data-b)}
.hk-settings .st-end .st-hold::before,.hk-settings .st-end .st-hold::after{grid-area:1/1;visibility:hidden;height:0;overflow:hidden}
.hk-settings .st-end .st-hold .st-fill{position:absolute;inset:0;background:var(--st-accent);transform:scaleX(0);transform-origin:left;transition:transform .2s ease-out}
.hk-settings .st-end .st-hold.danger .st-fill{background:var(--st-danger)}
.hk-settings .st-end .st-hold:hover,.hk-settings .st-end .st-hold.hover{background:color-mix(in srgb, currentColor 14%, transparent)}
.hk-settings .st-end .st-hold.holding{transform:scale(.97)}
.hk-settings .st-end .st-hold.holding .st-fill,.hk-settings .st-end .st-hold.did .st-fill{transform:none;transition:transform var(--settings-hold,.9s) linear}
.hk-settings .st-end .st-hold.did .st-fill{transition:none}
/* While holding, the fill is a see-through tint so the words stay readable over it; once done it is solid. */
.hk-settings .st-end .st-hold.holding:not(.did) .st-fill{opacity:.3}
.hk-settings .st-end .st-hold.did span{color:var(--st-accent-ink)}
.hk-settings .st-end .st-hold:focus-visible{outline:2px solid var(--st-accent);outline-offset:2px}

/* Busy, failed, off. */
.hk-settings .st-spin{display:none;width:18px;height:18px;border-radius:50%;border:2.5px solid color-mix(in srgb, var(--st-accent) 25%, transparent);border-top-color:var(--st-accent);animation:st-spin .8s linear infinite}
.hk-settings .st-busy{cursor:progress}
.hk-settings .st-row.st-busy:not(.st-slider) .st-spin{display:block}
.hk-settings .st-row.st-switch.st-busy .st-spin{order:-1}
.hk-settings .st-row.st-busy:not(.st-switch):not(.st-slider) .st-end>:not(.st-spin){opacity:.35}
.hk-settings .st-row.st-busy .st-chev{display:none}
.hk-settings .st-row.st-fail{animation:st-shake .36s;box-shadow:inset 0 0 0 1.5px var(--st-danger)}
.hk-settings .st-off{opacity:.62;cursor:default!important;pointer-events:none}
.hk-settings .st-off .hk-switch[aria-checked=true],.hk-settings .st-off.st-check[aria-checked=true] .st-box{background:var(--st-soft)}
@keyframes st-spin{to{transform:rotate(1turn)}}
@keyframes st-shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}

/* Loading skeleton and the empty state. */
.hk-settings .st-skel i{display:block;height:.8em;border-radius:6px;background:var(--settings-skel, color-mix(in srgb, var(--st-ink) 20%, transparent));animation:st-pulse 1.2s ease-in-out infinite}
.hk-settings .st-head.st-skel i{height:.8em;background:var(--settings-skel, color-mix(in srgb, var(--st-ink) 26%, transparent))}
.hk-settings .st-skel .st-label,.hk-settings .st-skel .st-detail{display:block;padding:3px 0}
.hk-settings .st-skel .st-skel-end{width:52px;height:30px;border-radius:15px}
@keyframes st-pulse{50%{opacity:.6}}
.hk-settings .st-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:36px 24px;text-align:center;border-radius:16px;box-shadow:inset 0 0 0 1.5px color-mix(in srgb, var(--st-soft) 55%, transparent)}
.hk-settings .st-empty svg{width:40px;height:40px;margin-bottom:4px;fill:none;stroke:var(--st-soft);stroke-width:2.4;stroke-linecap:round}
.hk-settings .st-empty b{font-weight:800;text-wrap:balance}
.hk-settings .st-empty span{max-width:26em;font-size:.86em;font-weight:500;color:var(--st-soft);text-wrap:pretty}

@media (prefers-reduced-motion:reduce){.hk-settings .st-row,.hk-settings .st-box svg,.hk-settings .st-end .st-hold .st-fill{transition:none}.hk-settings .st-end .st-hold.holding .st-fill{transition:transform var(--settings-hold,.9s) linear}.hk-settings .st-fail,.hk-settings .st-skel i{animation:none}}
