/* View styles: Einstellungen (grouped settings). Tokens only – see DESIGN.md. */
.set-layout { display: block; }
.set-nav { display: none; }
@media (min-width: 1200px) {
  .set-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-6); align-items: start; }
  .set-nav { display: block; position: sticky; top: 24px; }
}
.set-nav ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.set-nav a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 10px; border-radius: 10px; color: var(--ink-2); font-size: 0.92rem; font-weight: 560; text-decoration: none; transition: background-color var(--t-fast), color var(--t-fast); }
.set-nav a:hover { background: var(--surface-sunken); color: var(--ink); }
.set-nav .icon { width: 17px; height: 17px; color: var(--ink-3); }
.set-nav a[aria-current] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.set-nav a[aria-current] .icon { color: var(--ink); }
.set-sections { min-width: 0; max-width: 820px; }

.set-section { margin: 0 0 var(--s-7); scroll-margin-top: 24px; }
.set-section:last-child { margin-bottom: 0; }
@media (max-width: 1023px) { .set-section { scroll-margin-top: calc(var(--topbar-h) + 16px); } }
.set-head { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 var(--s-3); }
.set-head h2 { margin: 4px 0 2px; }
.set-head .sub { margin: 0; }
.set-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink-2); }
.set-icon .icon { width: 19px; height: 19px; }
.set-card { padding: 4px 24px; margin: 0; }
.set-section > .callout { margin: 0 0 var(--s-3); }
.set-voices { display: contents; }

.set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px var(--s-5); padding: 18px 0; border-top: 1px solid var(--line); }
.set-card > :first-child, .set-card > .set-voices:first-child > :first-child { border-top: 0; }
.set-row.wide { grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); }
.set-row.stack-row { grid-template-columns: minmax(0, 1fr); }
.set-label { min-width: 0; }
.set-label > label, .set-title { display: block; font-weight: 600; font-size: 0.97rem; line-height: 1.35; }
.set-label > label { cursor: pointer; }
.set-label .hint { margin-top: 3px; font-size: 0.85rem; line-height: 1.5; max-width: 60ch; }
.set-label .hint code { font-size: 0.8rem; }
.set-control { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.set-control select { width: 100%; }
.set-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.set-actions > .hint { text-align: right; max-width: 34ch; }
.set-callout { margin: 0 0 18px; font-size: 0.9rem; }
.set-card > .set-callout:first-child { margin-top: 18px; }
.set-card details.reveal { margin: 0 0 18px; }
.set-card .set-row + details.reveal, .set-voices > details.reveal { margin-top: 0; }
.set-ok, .set-no { display: inline-flex; align-items: center; gap: 4px; }
.set-ok { color: var(--good); }
.set-no { color: var(--warn); }
.set-ok .icon, .set-no .icon { width: 13px; height: 13px; }
.set-tips { margin: 0; padding-left: 1.1em; font-size: 0.9rem; color: var(--ink-2); }
.set-tips li + li { margin-top: 6px; }
.set-tips strong { color: var(--ink); }

/* theme segmented control */
.set-theme { margin: 0; }
.set-theme button .icon { width: 16px; height: 16px; }

/* switch */
input.switch { appearance: none; -webkit-appearance: none; position: relative; width: 46px; height: 28px; margin: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; flex: none; transition: background-color var(--t-mid) var(--ease-out); }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgb(24 24 27 / 0.25); transition: transform var(--t-mid) var(--ease-out); }
input.switch:checked { background: var(--btn-primary); }
:root[data-theme="dark"] input.switch:not(:checked)::after { background: var(--ink-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) input.switch:not(:checked)::after { background: var(--ink-2); } }
input.switch:checked::after { transform: translateX(18px); background: var(--btn-primary-ink); }
input.switch:focus-visible { box-shadow: var(--focus-ring); border-radius: 999px; }
input.switch:active::after { transform: scale(0.92); }
input.switch:checked:active::after { transform: translateX(18px) scale(0.92); }

/* speech rate slider */
.set-rate { display: flex; align-items: center; gap: 10px; width: 100%; }
.set-rate .hint { flex: none; }
.set-rate-out { flex: none; min-width: 3.6em; padding: 2px 8px; border-radius: 6px; background: var(--surface-sunken); font-size: 0.85rem; font-weight: 600; text-align: center; }
input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 28px; margin: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--ink) 0 calc(var(--fill, 0.43) * 100%), var(--surface-sunken) calc(var(--fill, 0.43) * 100%)); box-shadow: inset 0 0 0 1px var(--line); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--line); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow-1); transition: transform var(--t-fast) var(--ease-press); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.1); }
input[type="range"]:focus-visible { box-shadow: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--focus-ring); }

/* stepper */
.set-stepper { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); }
.set-stepper input { width: 4.2em; min-height: 38px; border: 0; padding: 0 4px; text-align: center; font-family: var(--mono); font-weight: 600; -moz-appearance: textfield; }
.set-stepper input::-webkit-outer-spin-button, .set-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.set-stepper input:focus-visible { box-shadow: var(--focus-ring); border-radius: 6px; }
.set-stepper .btn { --btn-h: 38px; border-radius: 8px; }

/* data */
.set-danger-title { margin: var(--s-5) 0 var(--s-2); color: var(--bad); }
.set-danger-title .icon { color: var(--bad); }
.set-danger { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }

/* about */
.set-counts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 18px; padding: 0; }
.set-counts li { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-sunken); font-size: var(--fs-caption); color: var(--ink-2); }
.set-counts .mono { font-weight: 600; color: var(--ink); font-size: 0.85rem; }
.set-privacy { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.set-privacy li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; color: var(--ink-2); font-size: 0.9rem; line-height: 1.5; max-width: 70ch; }
.set-privacy .icon { width: 17px; height: 17px; margin-top: 2px; color: var(--ink-3); }
.set-subhead { display: flex; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.set-subhead + .set-row { border-top: 0; padding-top: 10px; }
.set-row.stack-row details.reveal { margin: 4px 0 0; }
.set-credits { margin: 0; padding-left: 1.6em; display: grid; gap: 8px; font-size: 0.88rem; }
.set-credits li::marker { color: var(--ink-3); font-family: var(--mono); font-size: 0.8em; }
.set-credits li { padding-left: 4px; }
.credit-title { display: block; color: var(--ink); overflow-wrap: anywhere; }
.set-credits .hint a { color: inherit; }

@media (pointer: coarse) {
  .set-stepper .btn { --btn-h: 44px; }
  .set-stepper input { min-height: 44px; }
}
@media (max-width: 767px) {
  .set-section { margin-bottom: var(--s-6); }
  .set-card { padding: 2px 16px; }
  .set-row, .set-row.wide { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px 0; }
  .set-row.has-switch { grid-template-columns: minmax(0, 1fr) auto; }
  .set-control, .set-actions { justify-content: flex-start; }
  .set-actions > .hint { text-align: left; }
  .set-theme { display: flex; width: 100%; }
  .set-theme button { flex: 1; justify-content: center; }
}
