/* /account/: the parent's one page. Tokens from panelab.css.
   One white sheet, the hero (the kid's reading at a glance, the four endings as the Ahaboom 2x2 page mark). Everything
   else sits on the canvas as plain sections under a hairline, pairs side by side from 900px, account settings quiet at
   the bottom. Marigold only on the read button and the endings found. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.acct { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: clamp(24px, 5vh, 52px) max(16px, env(safe-area-inset-left), env(safe-area-inset-right)) 64px; }
.acct-noscript { color: var(--ink-2); }
/* the comic image behind the sign-in pages stays only behind the 18+ step (it continues sign-up) */
.auth-page[data-auth="account"]:not(:has(.acct-adult))::before,
.auth-page[data-auth="account"]:not(:has(.acct-adult))::after { display: none; }

/* ---------- head: a calm greeting, and the one-line notes (signed in, a claim answered) ---------- */
.acct-head { margin: 0 0 clamp(20px, 3vw, 28px); }
.acct-head p { max-width: 62ch; color: var(--ink-2); }
.acct-head .btn { margin-top: 8px; }
.acct-title { margin: 0; font: 800 clamp(34px, 4.6vw, 52px)/1.04 var(--display); letter-spacing: -.025em; color: var(--ink); }
.acct-title:focus { outline: none; }
.acct-head .acct-title + p { margin-top: 10px; }
.acct-flash { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 8px 14px; border-radius: var(--r-control); background: var(--sun-soft); color: var(--ink) !important; font-weight: 600; font-size: var(--t-small); line-height: 1.4; }
.acct-muted { font-size: var(--t-small); color: var(--ink-3) !important; }

/* ---------- the dashboard ---------- */
.acct-grid { display: grid; gap: clamp(36px, 5vw, 52px); }
.acct-pair { display: grid; gap: clamp(36px, 5vw, 52px); align-items: start; }
@media (min-width: 900px) { .acct-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; } }
.acct-sec { min-width: 0; padding-top: 22px; border-top: 1px solid var(--line); }
.acct-sec__title { margin: 0 0 12px; font: 800 26px/1.15 var(--display); letter-spacing: -.015em; color: var(--ink); }
.acct-sec p { margin: 0 0 12px; color: var(--ink-2); max-width: 60ch; }
.acct-sec strong { color: var(--ink); overflow-wrap: anywhere; }

/* ---------- hero: SLICE! Episode 1, read %, the endings page, the last ending, read here ---------- */
.acct-hero { display: grid; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); box-shadow: var(--e1); }
.acct-hero__art { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; object-position: 55% 35%; background: var(--surface-2); }
.acct-hero__body { min-width: 0; padding: 22px 20px 24px; }
.acct-hero__title { margin: 0 0 6px; font: 800 clamp(28px, 3.2vw, 36px)/1.08 var(--display); letter-spacing: -.02em; color: var(--ink); }
.acct-hero__lead { margin: 0 0 22px; max-width: 46ch; color: var(--ink-2); }
.acct-hero__stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin: 0 0 18px; }
.acct-stat { display: grid; align-content: start; gap: 2px; min-width: 0; }
.acct-stat + .acct-stat { padding-left: 18px; border-left: 1px solid var(--line); }
.acct-stat__n { font: 800 clamp(36px, 5vw, 56px)/1 var(--display); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.acct-stat__label { font-size: var(--t-small); color: var(--ink-2); }
.acct-stat--endings { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; }
.acct-stat--endings .acct-stat__n { font-size: clamp(28px, 3.4vw, 36px); }
.acct-stat__text { display: grid; gap: 2px; min-width: 0; }
.acct-meter { display: block; height: 8px; margin-top: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.acct-meter__fill { display: block; height: 100%; width: 0; background: var(--ink); border-radius: inherit; }
/* the four endings: the logo's 2x2 comic page, a found ending is a marigold panel */
.acct-endings { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 54px; height: 54px; }
.acct-endings__panel { border: 2px solid var(--ink); border-radius: 4px; background: var(--surface); }
.acct-endings__panel.is-found { background: var(--sun); }
.acct-hero__last { margin: 0 0 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--t-small); }
.acct-hero__last b { color: var(--ink); }
.acct-hero .acct-actions { margin: 0; }
@media (max-width: 479px) {
  .acct-stat--endings { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .acct-endings { width: 40px; height: 40px; gap: 3px; }
  .acct-endings__panel { border-radius: 3px; }
}
@media (min-width: 600px) and (max-width: 899px) { .acct-hero__art { aspect-ratio: 5 / 2; } }
@media (min-width: 640px) { .acct-hero__body { padding: 28px 32px 30px; } .acct-hero__stats { gap: 28px; } .acct-stat + .acct-stat { padding-left: 28px; } }
@media (min-width: 900px) {
  .acct-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 44%); }
  .acct-hero__art { order: 2; height: 100%; aspect-ratio: auto; min-height: 340px; }
  .acct-hero__body { padding: 36px 40px 38px; }
}

/* ---------- actions ---------- */
.acct-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 4px 0 12px; }
.acct-actions--quiet { margin: 4px 0 0; padding-top: 6px; }
.acct-linkbtn { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 4px; border: 0; background: none; color: var(--link); font: 600 var(--t-small)/1.2 var(--body); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.acct-linkbtn:hover { text-decoration-thickness: 2px; }
.acct-linkbtn--bad { color: var(--bad); }
.acct-textlink { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 4px; font-weight: 600; font-size: var(--t-small); color: var(--ink); }
.btn--bad { background: var(--bad); color: #fff; }
.btn--bad:hover { background: #9e2c23; }
.btn--bad:disabled { opacity: .7; cursor: progress; }

/* ---------- your kid’s free episode (first on the page, owner council 2026-10-21): the link + copy/share, then the
   quieter "Read on this phone" text link, the QR beside it when there is room ---------- */
.acct-link { display: grid; gap: 4px 28px; }
.acct-link__row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.acct-link__url { flex: 1 1 220px; min-width: 0; min-height: 52px; font: 400 var(--t-small)/1.2 var(--body); text-overflow: ellipsis; }
.acct-link__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.acct-link .acct-muted { margin: 0 0 8px; }
.acct-qr-slot { display: grid; justify-items: start; align-content: start; gap: 6px; }
.acct-qr-slot:empty { display: none; }
.acct-qr { width: 148px; height: 148px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.acct-qr-slot .acct-muted { max-width: 22ch; margin: 0; font-size: var(--t-meta); }
.acct-link .acct-actions--quiet { grid-column: 1 / -1; border-top: 1px solid var(--line); }
@media (min-width: 560px) {
  .acct-link.has-qr { grid-template-columns: minmax(0, 1fr) auto; }
  .acct-link.has-qr .acct-qr-slot { padding-top: 4px; }
}
/* full width from 2026-10-21: the QR stays next to the link instead of at the far edge */
@media (min-width: 900px) { .acct-link.has-qr { grid-template-columns: minmax(0, 720px) auto; } }

/* ---------- reading devices ---------- */
.acct-devices { list-style: none; max-width: 720px; margin: 0; padding: 0; } /* full width since 2026-10-21: keep Turn off near its name */
.acct-device { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.acct-device:first-child { padding-top: 4px; }
.acct-device:last-child { border-bottom: 0; }
.acct-device > .ic { align-self: start; margin-top: 2px; color: var(--ink); }
.acct-device__text { display: grid; gap: 2px; min-width: 0; color: var(--ink); line-height: 1.4; }
.acct-device__text .acct-muted { font-size: var(--t-meta); }
.acct-device__off { white-space: nowrap; }

/* ---------- membership: the plan step today; the short "Become a member" card (.acct-member) from /checkout/ ---------- */
.acct-plan { max-width: 560px; }
.acct-plan p { margin: 0 0 12px; }
.acct-plan__set { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; }
.acct-plan__opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); cursor: pointer; color: var(--ink); }
.acct-plan__opt:hover { background: var(--surface-2); }
.acct-plan__opt:has(input:checked) { border-color: var(--ink); background: var(--sun-soft); box-shadow: inset 0 0 0 1px var(--ink); }
.acct-plan__opt input { margin: 0; width: 20px; height: 20px; flex: none; accent-color: var(--ink); }
.acct-plan__title { margin: 0 0 8px; font: 700 var(--t-sub)/1.3 var(--body); color: var(--ink); }
.acct-plan__title:focus { outline: none; }
/* the members card: the Episode 2 paywall in "Next in SLICE!" (and any short membership card from /checkout/) */
.acct-member { display: grid; align-content: start; justify-items: start; gap: 8px; min-width: 0; padding: clamp(20px, 3vw, 28px); border: 2px solid var(--ink); border-radius: var(--r-sheet); background: var(--surface); }
.acct-member h2, .acct-member h3 { margin: 0; font: 800 clamp(24px, 2.6vw, 30px)/1.1 var(--display); letter-spacing: -.015em; color: var(--ink); }
.acct-member p { margin: 0 0 8px; color: var(--ink-2); max-width: 44ch; }
.acct-member .btn { margin-top: 4px; }
@media (max-width: 479px) { .acct-member .btn { width: 100%; } }

/* ---------- next in SLICE!: the paywall card, then Episode 2 and 3 as locked stills ---------- */
.acct-next__row { display: grid; gap: 20px; }
.acct-eps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-content: start; }
.acct-ep { display: grid; gap: 2px; min-width: 0; color: var(--ink); }
.acct-ep__art { position: relative; display: block; aspect-ratio: 16 / 10; margin-bottom: 8px; overflow: hidden; border-radius: var(--r-art); background: var(--ink); box-shadow: var(--e1); }
.acct-ep__art img { width: 100%; height: 100%; object-fit: cover; filter: blur(3px) saturate(.7); opacity: .55; transform: scale(1.08); }
.acct-ep__badge { position: absolute; left: 8px; bottom: 8px; }
.acct-ep__badge .ic { width: 14px; height: 14px; }
.acct-ep__title { font-weight: 700; font-size: var(--t-body); line-height: 1.3; }
.acct-ep__meta { color: var(--ink-3); font-size: var(--t-meta); }
@media (min-width: 900px) { .acct-next__row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: stretch; } }

/* ---------- the last report and its emails ---------- */
.acct-report { display: grid; margin: 0; }
.acct-report > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: var(--t-small); }
.acct-report > div:first-child { padding-top: 2px; }
.acct-report > div:last-child { border-bottom: 0; }
.acct-report dt { color: var(--ink-2); }
.acct-report dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.acct-report .acct-report__wide { display: grid; gap: 6px; }
.acct-report__wide dd { text-align: left; font-weight: 400; }
.acct-report__wide ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.acct-mails { display: grid; gap: 12px; }
.acct-mails .auth-mail { margin-top: 0; }
.acct-mails__note { margin: 12px 0 0 !important; font-size: var(--t-meta) !important; }

/* ---------- account settings, quiet at the bottom ---------- */
.acct-settings { padding-top: 18px; border-top: 1px solid var(--line); }
.acct-settings__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.acct-settings__who { min-width: 0; }
.acct-settings__title { margin: 0; font: 700 var(--t-body)/1.3 var(--body); color: var(--ink); }
.acct-settings__who p { margin: 0; color: var(--ink-2); font-size: var(--t-small); }
.acct-settings__who strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.acct-settings .acct-actions { margin: 0; }
.acct-confirm { max-width: 560px; margin: 16px 0 0; padding: 16px 18px; border: 1.5px solid var(--bad); border-radius: var(--r); background: var(--surface); }
.acct-confirm[hidden] { display: none; }
.acct-confirm p { margin: 0 0 12px; color: var(--ink); }
.acct-confirm .acct-actions { margin: 0; }
@media (min-width: 900px) { .acct-settings__row { justify-content: flex-start; column-gap: 48px; } }

.acct-toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px); margin: 0; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: var(--t-small); font-weight: 600; box-shadow: var(--e2); }

/* ---------- a device asks to read on this account: Allow / Not me, above everything ---------- */
.acct-request { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 4px 14px; margin: 0 0 clamp(28px, 4vw, 40px); padding: clamp(20px, 4vw, 28px); background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-sheet); box-shadow: var(--e1); }
.acct-request > :not(.acct-request__icon) { grid-column: 2; }
.acct-request__icon { grid-row: 1; padding-top: 3px; color: var(--ink); }
.acct-request__title { margin: 0 0 6px; font: 800 clamp(22px, 2.6vw, 28px)/1.15 var(--display); letter-spacing: -.015em; color: var(--ink); }
.acct-request__title:focus { outline: none; }
.acct-request p { margin: 0 0 10px; max-width: 62ch; color: var(--ink-2); }
.acct-request .acct-actions { margin: 8px 0 0; }
.acct-request .acct-actions .btn { min-width: 128px; }
.acct-request > .acct-flash { grid-column: 1 / -1; margin: 0; }

/* ---------- the 18+ step (GO-1): one sheet, the width of the sign-in form ---------- */
.acct-adult { max-width: 520px; margin: clamp(0px, 4vh, 40px) auto 0; padding: clamp(24px, 6vw, 44px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); box-shadow: var(--e1); }
.acct-adult > p { margin: 10px 0 0; color: var(--ink-2); }
.acct-adult__form { display: grid; gap: 12px; margin: 24px 0 8px; }
.acct-adult__form .auth-fine { margin: 0; }
.acct-adult .acct-actions--quiet { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }

/* QA-1 batch 10: "Delete my account" asks in a modal dialog */
.acct-dialog { box-sizing: border-box; width: min(480px, calc(100vw - 32px)); padding: 24px 22px 20px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; color: var(--ink); }
.acct-dialog::backdrop { background: rgb(20 20 20 / .55); }
.acct-dialog__title { margin: 0 0 12px; font: 800 24px/1.15 var(--display); letter-spacing: -.01em; }
.acct-dialog p { margin: 0 0 8px; color: var(--ink-2); }
.acct-dialog__list { margin: 0 0 10px; padding-left: 1.2em; color: var(--ink-2); }
.acct-dialog__warn { font-weight: 700; color: var(--ink) !important; }
.acct-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 16px; }
@media (max-width: 479px) { .acct-dialog__actions { flex-direction: column-reverse; } .acct-dialog__actions .btn { width: 100%; } }
