/* Settings in two columns: each section's name and what it covers on the left, its controls in
   a #111 panel on the right. Sections are split by one rule; everything saves as you change it. */
.page-narrow { width: min(1120px, 100%); padding: 36px 32px 96px; }

.group {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 16px 48px;
  align-items: start;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.group-head { padding-top: 14px; }
.group-head h2 { margin: 0; font-size: 16px; font-weight: 650; }
.group-head p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }

.rows {
  border-radius: var(--r-lg);
  background: var(--panel);
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 16px 20px;
  min-height: 64px;
}
.row + .row { border-top: 1px solid var(--line); }

.row-label { display: grid; gap: 3px; font-weight: 550; }
.row-label small { color: var(--text-2); font-size: 13px; font-weight: 400; max-width: 46ch; line-height: 1.45; }

.row input, .row select { width: 240px; flex: none; }
.row .tc { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.row input[aria-invalid="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }

.field-stack { display: grid; gap: 4px; justify-items: end; }
.field-error { font-size: 12px; font-weight: 600; }
.field-error::before { content: "! "; }

.choice {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--bg);
}
.choice button {
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: var(--text-2);
  font-weight: 550;
  cursor: pointer;
}
.choice button:hover { color: var(--text); }
.choice button[aria-checked="true"] { background: var(--raised); color: var(--text); }

/* Usage: the bar at its true ratio, both ends labelled by the row's text. */
.meter {
  position: relative;
  flex: none;
  width: 240px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--raised);
  overflow: hidden;
}
.meter span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--text); border-radius: var(--r-pill); }

/* Destructive without colour: an outline, explicit wording, and a confirm step that names it. */
.btn-danger { background: transparent; border-color: var(--line-strong); }
.btn-danger:hover:not(:disabled) { border-color: var(--text); background: transparent; }

@media (max-width: 900px) {
  .group { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 28px 0; }
  .group-head { padding-top: 0; }
}

@media (max-width: 720px) {
  .page-narrow { padding: 24px 16px 64px; }
  .row { flex-direction: column; align-items: stretch; }
  .row input, .row select, .field-stack, .meter { width: 100%; }
  .field-stack { justify-items: start; }
  .choice { display: flex; }
  .choice button { flex: 1; min-height: 40px; }
}

/* Install steps for iPhone and iPad */
.steps { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text-2); font-weight: 400; font-size: 14px; }
.steps strong { color: var(--text); font-weight: 600; }
.glyph { display: inline-block; width: 17px; height: 17px; vertical-align: -3px; color: var(--text); }
.row .switch { width: 44px; align-self: center; }
@media (max-width: 720px) { .row .switch { align-self: flex-start; } }
