/* Accounts and the Save button (scripts/account-ui.mjs, research/accounts.md). Uses the tokens in
   public/style.css :root. The nav redesign owns where .nav-acct sits; this only styles it. */

/* ---------- header entry (adult pages) ---------- */
.nav-acct { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 2px; text-underline-offset: 6px; white-space: nowrap; }
.nav-acct:hover { background: var(--sun-soft); text-decoration-color: var(--sun); }
.nav-acct[aria-current] { text-decoration-color: var(--coral); text-decoration-thickness: 3px; }
.nav-acct .acct-in, .acct-in .nav-acct .acct-out { display: none; }
.acct-in .nav-acct .acct-in { display: inline; }

/* ---------- Save (heart) beside the H1 ---------- */
.cn-h1row { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: var(--s4); row-gap: 0; }
.cn-h1row > h1 { flex: 1 1 14ch; min-width: 0; }
.cn-save { display: none; }
.js .cn-save { display: inline-flex; flex: none; margin-top: .55em; --b-bg: #fff; --b-bd: var(--line-2); padding: 10px 18px 10px 14px; gap: 8px; }
.js .cn-save:hover { --b-bg: var(--sun-soft); --b-bd: var(--ink); }
.cn-heart { fill: none; stroke: var(--coral); stroke-width: 2; stroke-linejoin: round; transition: fill .15s, transform .2s cubic-bezier(.2, .9, .3, 1.4); }
.js .cn-save[aria-pressed="true"] { --b-bd: var(--coral); --b-bg: var(--coral-soft); }
.js .cn-save[aria-pressed="true"]:hover { --b-bg: #fbdcd0; }
.cn-save[aria-pressed="true"] .cn-heart { fill: var(--coral); transform: scale(1.08); }
.cn-save-msg { margin: 0 0 var(--s3); max-width: var(--measure); font-size: var(--t-sm); color: var(--ink); background: var(--sun-field); border-radius: 12px; padding: 10px 14px; }
.cn-save-msg[hidden] { display: none; }
.cn-save-msg a { font-weight: 700; }
@media (max-width: 599px) {
  .js .cn-save { margin-top: 0; margin-bottom: var(--s3); }
  .cn-h1row > h1 { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .cn-heart { transition: none; } .cn-save[aria-pressed="true"] .cn-heart { transform: none; } }

/* ---------- /account/ ---------- */
.acct { padding-bottom: var(--section); }
.acct-step { max-width: 34rem; }
.acct-for { display: inline-block; margin: 0 0 var(--s3); padding: 6px 14px; border-radius: 999px; background: var(--sun-soft); font-weight: 700; font-size: var(--t-xs); }
.acct-form { margin: var(--s5) 0 var(--s4); }
.acct-form input { min-height: 52px; font-size: 1.125rem; }
.acct-form input[aria-invalid="true"] { border-color: var(--coral); }
.acct-err { margin: 0 0 var(--s3); color: var(--coral-dark); font-weight: 700; }
.acct-err[hidden], .acct-msg[hidden] { display: none; }
.acct-small { font-size: var(--t-sm); color: var(--muted); max-width: var(--measure); }
.acct-msg { max-width: 34rem; margin: 0 0 var(--s5); padding: 12px 16px; border-radius: 12px; background: var(--blue-soft); }
.acct-msg[data-tone="ok"] { background: var(--green-soft); }
.acct-msg[data-tone="error"] { background: var(--coral-soft); }
.acct-steps { padding-left: 1.4em; margin: var(--s4) 0; }
.acct-steps li { margin: 0 0 var(--s2); }
.acct-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.acct-who { margin: 0 0 var(--s5); }
.acct-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: var(--s5); margin: 0 0 var(--s4); }
.acct-card h2 { font-size: 1.375rem; margin: 0 0 var(--s2); }
.acct-card p { margin: 0 0 var(--s3); max-width: var(--measure); }
.acct-card p:last-child { margin-bottom: 0; }
.acct-card[hidden] { display: none; }
.acct-delete { margin-top: var(--s5); border-top: 2px solid var(--line); padding-top: var(--s4); }
.acct-delete summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--coral-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.acct-delete[open] summary { margin-bottom: var(--s2); }
.btn.danger { --b-bg: #fff; --b-bd: var(--coral-dark); --b-fg: var(--coral-dark); }
.btn.danger:hover { --b-bg: var(--coral-soft); }
.acct-help { margin-top: var(--s6); }
@media (min-width: 700px) { .acct-card { padding: var(--s5) var(--s6); } }

/* ---------- /account/saved/ ---------- */
.acct-saved { padding-bottom: var(--section); }
.acct-saved .sub a { font-weight: 700; }
.sv-filter { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: var(--s4) 0 var(--s5); }
.sv-filter[hidden], .sv-empty[hidden], .sv-grid[hidden] { display: none; }
.sv-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.sv-card { display: flex; flex-direction: column; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sv-card:has(.sv-link:hover) { border-color: var(--sun); }
.sv-link { display: flex; flex-direction: column; flex: 1; color: var(--ink); text-decoration: none; }
.sv-thumb { display: flex; align-items: center; justify-content: center; padding: 8px; background: #fff; aspect-ratio: 320 / 414; }
.sv-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sv-nothumb { background: var(--sun-field); }
.sv-nothumb svg { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linejoin: round; }
.sv-t { padding: 8px 12px 0; font-weight: 700; font-size: .95rem; line-height: 1.3; border-top: 2px solid var(--line); }
.sv-type { margin: 4px 12px 8px; font-size: var(--t-xs); color: var(--muted); }
.sv-rm { margin: auto 12px 12px; min-height: 44px; font-size: var(--t-xs); padding: 6px 14px; --b-bd: var(--line-2); }
.sv-empty { max-width: 34rem; margin-top: var(--s5); }
.sv-empty h2 { margin-top: 0; }

/* Phones: Sign in/Account sits in the Menu sheet, not the header bar (scripts/nav.mjs, nav-redesign). */
