/* SSHO Now — signed-in area. Loaded only under /account/, on top of style.css.
   Uses the same custom properties as the main stylesheet so the account pages are
   the same site and not a bolted-on app. Contrast of every text/background pair
   below is at or above 4.5:1 against WCAG 2.2 AA; error state is never carried by
   colour alone — there is always an icon-free text prefix or a word. */

.account-shell { padding: 28px 0 56px; }

.account-bar {
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center;
  justify-content: space-between;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 18px; margin-bottom: 22px;
}
.account-bar p { margin: 0; }
.account-bar form { margin: 0; }
.account-bar button {
  background: var(--navy); color: #fff; border: 0; border-radius: 6px;
  padding: 8px 16px; font-size: .95rem; cursor: pointer;
}
.account-bar button:hover { background: var(--navy-2); }

.account-nav { margin: 0 0 26px; border-bottom: 2px solid var(--line); }
.account-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 6px;
}
.account-nav a {
  display: block; padding: 10px 14px; text-decoration: none;
  color: var(--navy-2); border-radius: 6px 6px 0 0; font-weight: 600;
}
.account-nav a:hover { background: var(--paper-2); text-decoration: underline; }
/* Current page is marked by weight, colour AND a 3px underline, so it survives
   being read in greyscale or by a screen reader (aria-current is on the link). */
.account-nav a[aria-current="page"] {
  background: var(--paper-2); color: var(--navy);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.account-body h1 { color: var(--navy); margin-top: 0; line-height: 1.25; }
.account-body h2 { color: var(--navy-2); margin-top: 32px; }
.account-body .lede { color: var(--muted); font-size: 1.1rem; max-width: 70ch; }
.account-body p, .account-body li { max-width: 72ch; }
.account-body .card h2 { margin-top: 0; font-size: 1.1rem; }
.account-body .callout {
  background: var(--paper-2); border-left: 4px solid var(--gold);
  padding: 14px 18px; border-radius: 6px; margin: 20px 0;
}
.account-body .callout.warn { border-left-color: var(--accent); }
.account-body .callout h2 { margin-top: 0; font-size: 1.05rem; }

ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 7px 0; border-bottom: 1px solid var(--line); }

.notice {
  background: #eaf4ec; border-left: 4px solid var(--ok);
  color: #11391d; padding: 12px 16px; border-radius: 6px; margin: 0 0 22px;
}

/* ------------------------------------------------------------------- forms */

.account-form { max-width: 46rem; margin: 8px 0 0; }
.account-form fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 6px; margin: 0 0 26px;
}
.account-form legend {
  font-weight: 700; color: var(--navy); padding: 0 8px; font-size: 1.05rem;
}

.field { margin: 0 0 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field .req { font-weight: 400; color: var(--muted); font-size: .9rem; }
.field .hint {
  font-size: .9rem; color: var(--muted); margin: 0 0 6px; max-width: 62ch;
}
.field input[type="text"], .field input[type="email"],
.field input[type="password"], .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 11px 12px; border: 2px solid var(--line);
  border-radius: 6px; background: var(--paper);
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:hover, .field textarea:hover { border-color: var(--muted); }
/* An invalid field gets a heavier border AND the word "Error:" in its message. */
.field [aria-invalid="true"] { border-color: var(--accent); border-width: 2px; }
.field-error {
  color: var(--accent-dark); font-weight: 600; margin: 0 0 6px; max-width: 62ch;
}

.check { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; }
.check input[type="checkbox"] {
  /* 24px keeps the hit target comfortably over the 24x24 WCAG 2.2 minimum. */
  width: 24px; height: 24px; margin: 2px 0 0; flex: 0 0 auto;
}
.check label { font-weight: 400; max-width: 64ch; }

.form-errors {
  border: 2px solid var(--accent); background: #fdf1f1;
  border-radius: var(--radius); padding: 14px 20px; margin: 0 0 26px;
  max-width: 46rem;
}
.form-errors h2 { margin: 0 0 8px; color: var(--accent-dark); font-size: 1.1rem; }
.form-errors ul { margin: 0; padding-left: 20px; }
.form-errors a { color: var(--accent-dark); font-weight: 600; }

/* `.btn` in style.css sets only the shape — colour comes from a -primary/-secondary
   variant. The account area has one button per screen and no competing calls to
   action, so give the bare `.btn` the solid navy treatment here rather than
   decorating every call site, and let -danger override it on the delete button. */
.account-body .btn { background: var(--navy); color: #fff; }
.account-body .btn:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.account-body .btn-danger,
.account-body .btn-danger:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.account-body .btn-danger:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* `.data-table` itself lives in style.css, so the cookie policy and the account
   area share one definition. Only the account-specific override is here. */
.account-body .data-table th[scope="row"] { width: 38%; }

@media (max-width: 640px) {
  .account-bar { flex-direction: column; align-items: flex-start; }
}

/* Respect a reduced-motion preference even though we animate almost nothing. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
