/* shared/portal-account.css
 *
 * The three screens behind the You tab: Your profile, How we contact you, and
 * Help. One profile, second person, per the 29 Aug ruling. Design system tokens only, nothing below --fs-min.
 *
 * ONE FILE FOR THREE SCREENS, deliberately. They are one area, they share the
 * card and row shapes, and they are always reached from the same tab. Three
 * files would mean three requests and three places to keep one visual language
 * true. portal-you.css stays separate because You is the tab itself.
 *
 * EVERY HEADING AND BUTTON RULE IS SCOPED BY ITS SCREEN ROOT, and that is not
 * style. A bare .hp-h is (0,1,0) and loses to the design system's own .hds h1,
 * so the size written there never applies at all. Seven headings in this file
 * were inert until 29 Aug 2026, when the specificity guard was taught that one
 * stylesheet can serve more than one module and immediately found them.
 *
 * AND THE SCREEN ROOT IS `sgn` RATHER THAN `si` FOR A REASON. The legacy
 * stylesheet is still loaded on the same page and already carries
 * `.si { font-size: 40px }`. The whole sign-in screen inherited it, so its
 * lede rendered at 40px. A two letter class is not a namespace. Found by
 * measuring the rendered screen, not by reading the file.
 */

.pf, .nt, .hp, .sgn { padding: var(--sp-5) var(--sp-4) var(--sp-7); max-width: var(--portal-measure); margin: 0 auto; }

.pf-head, .nt-head, .hp-head, .sgn-head { margin-bottom: var(--sp-4); }
.pf-head h1, .nt-head h1, .hp-head h1, .sgn-head h1 { font-size: var(--fs-h2); line-height: var(--lh-head); }
.pf-lede, .nt-lede, .hp-lede, .sgn-lede { color: var(--t2); margin-top: var(--sp-2); }

.pf .ds-card, .nt .ds-card, .hp .ds-card, .sgn .ds-card { padding: var(--sp-4); }
.nt .ds-card + .ds-card, .hp .ds-card + .ds-card { margin-top: var(--sp-3); }

.hp .hp-h, .nt .nt-h { font-size: var(--fs-lead); margin: var(--sp-6) 0 var(--sp-3); }

/* ── HOW WE CONTACT YOU ───────────────────────────────────────────────────── */

/* The promise sits ABOVE the switches, because it changes what she thinks she
 * is doing before she does it. Given the accent bar so it is not skimmed. */
.nt-promise {
  border-left: 3px solid var(--brand);
  background: var(--brand-tint);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--sp-3) var(--sp-4);
  margin: 0 0 var(--sp-5);
  color: var(--t1);
}

.nt-row { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.nt-row__body { flex: 1; min-width: 12rem; }
.nt .nt-row__title { font-size: var(--fs-body); font-weight: 700; }
.nt-row__sub { font-size: var(--fs-min); color: var(--t3); margin-top: 2px; }
.nt-row__switches { display: flex; gap: var(--sp-3); flex: none; }

/* A switch is a label wrapping a real checkbox. The checkbox is visually
 * hidden, not removed, so it keeps its keyboard behaviour and its announcement.
 * --tap-min on the whole label, so the target is the words as well as the
 * track. */
.nt-sw {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: var(--tap-min); padding: 0 var(--sp-1);
  cursor: pointer; font-size: var(--fs-min); font-weight: 600; color: var(--t2);
}
.nt-sw__track {
  width: 2.75rem; height: 1.625rem; border-radius: var(--r-pill); flex: none;
  background: var(--surface); border: 1px solid var(--bd-strong);
  display: flex; align-items: center; padding: 2px;
  transition: background .12s ease, border-color .12s ease;
}
.nt-sw__dot {
  width: 1.125rem; height: 1.125rem; border-radius: 50%;
  background: var(--t3); transition: transform .12s ease, background .12s ease;
}
.nt-sw input:checked + .nt-sw__track { background: var(--brand); border-color: var(--brand); }
.nt-sw input:checked + .nt-sw__track .nt-sw__dot { background: var(--on-brand); transform: translateX(1.125rem); }
.nt-sw input:focus-visible + .nt-sw__track { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Off because it cannot work, not off because she chose it. Reads as
 * unavailable rather than as a setting. */
.nt-sw--off { opacity: .55; cursor: not-allowed; }
.nt-sw--off .nt-sw__track { background: var(--surface); }

.nt-status { margin-top: var(--sp-4); }

/* Stated where the switches are, not as a footnote. He read the greyed
 * switches as broken, which they are not: the browser blocked them. */
.nt-pushnote { margin-top: var(--sp-4); border-left: 3px solid var(--warn); background: var(--warn-bg); }
.nt .nt-pushnote__title { font-size: var(--fs-body); font-weight: 700; }
.nt-pushnote__body { margin-top: var(--sp-2); color: var(--t2); }

@media (prefers-reduced-motion: reduce) {
  .nt-sw__track, .nt-sw__dot { transition: none; }
}

/* ── YOUR PROFILE ─────────────────────────────────────────────────────────── */

/* A WAY BACK. He walked these screens and the first thing he said was that
 * there is no back button. --tap-min on the control, not just the glyph. */
.hds .pf-back:not(.ds-btn), .hds .nt-back:not(.ds-btn),
.hds .hp-back:not(.ds-btn), .hds .sgn-back:not(.ds-btn) {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: var(--tap-min); padding: 0 var(--sp-3) 0 var(--sp-2);
  margin-bottom: var(--sp-3);
  background: none; border: 1px solid transparent; border-radius: var(--r-md);
  font-family: var(--font-body); font-size: var(--fs-body); font-weight: 600;
  color: var(--brand); cursor: pointer;
}
.hds .pf-back:not(.ds-btn):hover, .hds .nt-back:not(.ds-btn):hover,
.hds .hp-back:not(.ds-btn):hover, .hds .sgn-back:not(.ds-btn):hover { background: var(--brand-tint); }
.hds .pf-back:not(.ds-btn):focus-visible, .hds .nt-back:not(.ds-btn):focus-visible,
.hds .hp-back:not(.ds-btn):focus-visible, .hds .sgn-back:not(.ds-btn):focus-visible {
  outline: 3px solid var(--brand); outline-offset: 2px;
}

.pf .pf-h { font-size: var(--fs-lead); margin: var(--sp-6) 0 var(--sp-2); }
.pf-intro { color: var(--t3); font-size: var(--fs-min); margin: 0 0 var(--sp-3); max-width: 46em; }
.pf-field + .pf-field { margin-top: var(--sp-5); }
.pf-field__hint { margin: 2px 0 var(--sp-2); }
.pf-field__error { margin-top: var(--sp-2); }
.pf-actions { margin-top: var(--sp-6); }
.pf-status { margin-top: var(--sp-3); }

/* ── HELP ─────────────────────────────────────────────────────────────────── */

.hp .hp-contact__title { font-size: var(--fs-lead); }
.hp-contact__body { color: var(--t2); margin: var(--sp-2) 0 var(--sp-4); }

.hp .hp-fact__title { font-size: var(--fs-body); font-weight: 700; }
.hp-fact__body { color: var(--t2); margin-top: var(--sp-2); }

.hds .hp-row:not(.ds-btn) {
  display: flex; align-items: center; gap: var(--sp-4); width: 100%; text-align: left;
  min-height: var(--tap-primary); padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-body); font-size: var(--fs-body); color: var(--t1);
  cursor: pointer;
}
.hp-row__body { flex: 1; min-width: 0; }
.hp-row__title { font-weight: 700; }
.hp-row__go { flex: none; color: var(--t3); font-size: var(--fs-lead); line-height: 1; }

.hp-note { margin-top: var(--sp-5); }

/* ── HOW YOU SIGN IN ──────────────────────────────────────────────────────── */

.sgn .sgn-h { font-size: var(--fs-lead); margin: var(--sp-6) 0 var(--sp-3); }
.sgn-field + .sgn-field { margin-top: var(--sp-5); }
.sgn-hint { margin: 2px 0 var(--sp-2); }
.sgn-error { margin-top: var(--sp-3); }

/* The OUTCOME, said before she presses the button. A person who types a new
 * address, sees "saved" and then cannot sign in has been told the truth about
 * the request and not about the result. */
.sgn-note {
  border-left: 3px solid var(--brand); background: var(--brand-tint);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--sp-3) var(--sp-4); margin: var(--sp-4) 0 0; color: var(--t1);
}
.sgn-sent {
  margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4);
  background: var(--ok-bg); border-left: 3px solid var(--ok);
  border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--t1);
}
