/* Settings sheet. Colours and fonts come from tokens only. */

.settings { padding-bottom: 8px; }

.settings-section { padding-top: 22px; }
.settings-section + .settings-section { margin-top: 6px; }
.settings-heading {
  margin: 0;
  padding-bottom: 6px;
  font-size: 17px;
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
}

.settings .row {
  display: flex;
  min-height: 44px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.settings .row-stack { flex-direction: column; gap: 8px; }
.settings .row-line { align-items: center; justify-content: space-between; gap: 12px; }
.settings .row-toggle { align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.settings .row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.settings .row-label { font-size: 16px; min-width: 0; }
.settings .row-value { font-size: 15px; color: var(--ink-2); text-align: right; }
.settings .note { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.settings .version { margin: 0; padding: 12px 0; font-size: 15px; border-bottom: 1px solid var(--rule); }
.settings .readout { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* Segmented control */
.seg { display: flex; border: 1px solid var(--ink); }
.seg-option {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 0 6px;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border-left: 1px solid var(--ink);
}
.seg-option:first-child { border-left: 0; }
.seg-option[aria-checked="true"] { background: var(--ink); color: var(--paper); }
.seg-option:focus-visible { outline-offset: -4px; outline-color: var(--indigo); }
.seg-option[aria-checked="true"]:focus-visible { outline-color: var(--paper); }

/* Tick box */
.tick {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  position: relative;
  width: 26px;
  height: 26px;
  margin: 0;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
.tick:checked { background: var(--ink); }
.tick:checked::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid var(--paper);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Slider */
.range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track { height: 2px; background: var(--rule); border: 0; }
.range::-moz-range-track { height: 2px; background: var(--rule); border: 0; }
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: -9px; background: var(--ink); border: 0; border-radius: 0; }
.range::-moz-range-thumb { width: 20px; height: 20px; background: var(--ink); border: 0; border-radius: 0; }
.range:focus-visible { outline-offset: 0; }

/* Stepper */
.stepper { display: flex; align-items: center; }
.stepper .readout { min-width: 3ch; text-align: center; color: var(--ink); font-size: 16px; }
.step {
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}
.step:active { background: var(--wash); }
.step[disabled] { opacity: 0.4; cursor: default; }
.stepper .readout { margin: 0 6px; }

/* Packs */
.pack { justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.pack-info { flex: 1 1 200px; min-width: 0; }
.pack-action { flex: none; }
.pack-progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.pack-progress .meter { flex: 1; margin: 0; height: 4px; }
.pack-progress .meter-fill { background: var(--seal); }
.pack-progress .readout { min-width: 4ch; text-align: right; }
.pack-error { margin: 6px 0 0; font-size: 14px; color: var(--seal); }

/* Offline, about */
.actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 0 4px; }
.reset-confirm { padding-top: 4px; }
.reset-confirm .actions { padding-top: 8px; }
.credits { margin: 0; padding: 10px 0; list-style: none; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); }
.credits li { padding: 3px 0; }
.credits a { color: var(--indigo); text-underline-offset: 2px; display: inline-block; padding: 3px 0; }
.offline .note:last-child { border: 0; }
.offline > .note { padding-top: 6px; }
