/* Segment stylesheet: account. Owned by the account segment; shared tokens and components live in /static/gw.css.
   Colours only via var(--gw-*) tokens. Prefix: .acct-*  (account, delete, cancel flow, 403/503, renew card). */

/* ---------- page rhythm ---------- */
.acct{display:flex;flex-direction:column;gap:16px}
.acct>.gw-pagehead{margin-bottom:4px}
.acct-flow{gap:20px}
.acct-sec{display:flex;flex-direction:column;margin-top:16px;min-width:0}
.acct-sec__h{margin:0 0 8px 4px}

/* ---------- identity + plan summary ---------- */
.acct-summary{position:relative;display:grid;grid-template-columns:48px 1fr;align-items:center;gap:14px;min-width:0;padding:16px 20px;border-radius:var(--gw-r-card);background:var(--gw-hero-teal);border:1px solid var(--gw-line);box-shadow:var(--gw-shadow-card);overflow:hidden}
.acct-summary__avatar{box-shadow:0 0 0 4px var(--gw-surface)}
.acct-summary__avatar .gw-icon{width:24px;height:24px}
.acct-summary__id{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.acct-summary__id b{font-size:17px;line-height:22px;font-weight:700;color:var(--gw-ink);overflow-wrap:anywhere}
.acct-summary__id small{font-size:14px;line-height:20px;color:var(--gw-subtle);overflow-wrap:anywhere}
.acct-summary__row{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0}
.acct-summary__pill{flex:none}
.acct-summary__pill .gw-icon{width:14px;height:14px;stroke-width:2}
.acct-dot{width:7px;height:7px;border-radius:50%;background:var(--gw-accent);box-shadow:0 0 0 3px var(--gw-mint)}

/* "Saved." toast: a positive pill, not a full-width box */
.acct-toast{align-self:flex-start;display:inline-flex;align-items:center;gap:6px;margin:0;padding:6px 14px 6px 10px;border-radius:999px;background:var(--gw-pos-bg);color:var(--gw-pos-fg);font-size:14px;line-height:20px;font-weight:700}
.acct-toast .gw-icon{width:16px;height:16px;stroke-width:2.25}

/* ---------- plan state ---------- */
.acct-state{background:var(--gw-cau-bg);color:var(--gw-cau-fg)}
.acct-state .gw-icon{color:var(--gw-cau-fg)}
.acct-inline{display:inline-block;margin-left:2px;color:inherit!important;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.acct-renew{display:flex;flex-direction:column;gap:10px}
.acct-renew__note{display:flex;align-items:center;gap:6px;margin:0 4px}
.acct-renew__note .gw-icon{width:16px;height:16px;color:var(--gw-subtle)}

/* Renew card (shared include: /account expired, 403, /log expired) */
/* With renew_art (403, /account expired): the plan-paused spot leads, the eyebrow and h2 sit centred under it */
.acct-renewcard:has(.acct-renewcard__art){padding-top:16px}
.acct-renewcard__art{width:min(200px,56%)}
.acct-renewcard__art~.gw-eyebrow,.acct-renewcard__art~.gw-h2{margin:0;text-align:center}
.acct-renewcard__art~.gw-h2{margin-bottom:4px;text-wrap:balance}
/* 403: the page h1 is screen-reader only, so the card is the first thing on the page */
.acct-flow>.gw-pagehead.gw-sr-only+.acct-renewcard{margin-top:8px}
.acct-renewcard__head{display:flex;align-items:center;gap:10px}
.acct-renewcard__head .gw-eyebrow{margin:0;color:var(--gw-cau-fg)}
.acct-renewcard__chip{width:36px;height:36px;background:var(--gw-sand);color:var(--gw-cau-fg)}
.acct-renewcard__chip .gw-icon{width:20px;height:20px}
.acct-renewcard__mail{display:flex;gap:8px;align-items:flex-start}
.acct-renewcard__mail .gw-icon{width:18px;height:18px;margin-top:3px;color:var(--gw-accent)}
.acct-renewcard__mail a{font-weight:700;color:var(--gw-accent-ink);overflow-wrap:anywhere}

/* ---------- medication: a summary row that opens into the form ---------- */
.acct-disc{overflow:hidden}
.acct-disc>summary{min-height:64px;padding:10px 16px;font-weight:400;-webkit-tap-highlight-color:transparent;transition:background-color var(--gw-dur-press,.16s) var(--gw-ease)}
.acct-disc>summary:active{background:var(--gw-bg)}
.acct-disc>summary:focus-visible{outline:3px solid var(--gw-accent);outline-offset:-3px}
.acct-disc__main b{font-size:16px;line-height:22px;color:var(--gw-ink)}
.acct-disc>summary>.gw-icon:last-child{transition:transform .2s var(--gw-ease)}
.acct-disc[open]>summary>.gw-icon:last-child{transform:rotate(90deg)}
.acct-disc__body{padding:0 16px 20px;gap:16px}
.acct-disc__body::before{margin:0 -16px}
.acct-card__lede{margin:0}
.acct-save{min-height:48px;box-shadow:none}

/* ---------- reminders: switch rows in grouped inset lists ---------- */
.acct-rem{display:flex;flex-direction:column}
.acct-group{background:var(--gw-surface);border:1px solid var(--gw-line);border-radius:var(--gw-r-box);box-shadow:var(--gw-shadow-card);overflow:hidden;transition:opacity .2s var(--gw-ease)}
.acct-switch{position:relative;display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 16px}
.acct-switch+.acct-switch::before{content:"";position:absolute;top:0;left:68px;right:0;height:1px;background:var(--gw-line)}
.acct-ico{width:40px;height:40px}
.acct-ico .gw-icon{width:20px;height:20px}
.acct-switch__text{flex:1;min-width:0;cursor:pointer;font:600 16px/22px var(--gw-font-ui);color:var(--gw-ink);overflow-wrap:normal;hyphens:manual}
.acct-switch__text small{display:block;margin-top:1px;font-size:14px;line-height:20px;font-weight:400;color:var(--gw-subtle)}
.acct-nowrap{white-space:nowrap}
.acct .gw-switch:focus-visible{outline:3px solid var(--gw-accent);outline-offset:2px}
.acct-rem__note{margin:10px 4px 0;font-size:14px;line-height:20px;color:var(--gw-subtle)}
.acct-sub-h{margin:24px 0 8px 4px;transition:opacity .2s var(--gw-ease)}
.acct-rem .acct-save{margin-top:16px}
/* master off: the four kinds read as paused (visual only, inputs stay live) */
.acct-rem:has(#rem-on:not(:checked)) .acct-subs,
.acct-rem:has(#rem-on:not(:checked)) .acct-sub-h{opacity:.5}

/* expired: a paused banner (spot + line), the section dims, and Save drops to a muted ghost so it never competes with renew */
.acct-paused{display:flex;align-items:center;gap:14px;margin:0 0 12px;padding:8px 16px 8px 8px;border-radius:var(--gw-r-box);background:var(--gw-bg-deep);border:1px solid var(--gw-line)}
.acct-paused__art{width:72px;height:54px}
.acct-paused__text{display:flex;flex-direction:column;gap:2px;margin:0;min-width:0;font-size:14px;line-height:20px;color:var(--gw-muted)}
.acct-paused__text b{font-size:15px;line-height:20px;font-weight:700;color:var(--gw-ink)}
.acct--expired .acct-rem .acct-group,.acct--expired .acct-sub-h,.acct--expired .acct-rem__note{opacity:var(--gw-muted-opacity)}
.acct--expired .acct-rem .acct-save{min-height:44px}
/* expired: switches only look paused (dimmed above); they stay tappable so a lapsed user can still opt out of reminders */

/* big text (OS / browser text scaling): container ems follow the group's own font size, so once a row is narrower
   than 17em (on at 390 with big text, off at 320 with normal text) the decorative 40px icon chips step aside and
   the titles get the width back */
.acct .acct-group,.acct .gw-list--icons{container-type:inline-size}
@container (max-width:17em){
  .acct-switch>.acct-ico,.acct .gw-list-row>.gw-chip{display:none}
  .acct-switch+.acct-switch::before{left:16px}
}

/* settings lists */
.acct .gw-list-main b{font-size:16px}
.acct-signout{margin-top:24px}
.acct-signout form{margin:0}
.acct-signout__btn{justify-content:center;min-height:52px;font-size:16px;font-weight:600;color:var(--gw-accent-ink)!important}
.acct-signout__btn:focus-visible{outline:3px solid var(--gw-accent);outline-offset:-3px}

/* ---------- flow marks (delete, confirm, done) ---------- */
.acct-mark{display:inline-flex;align-items:center;justify-content:center;flex:none;width:56px;height:56px;margin:var(--gw-halo) 0 calc(12px + var(--gw-halo)) var(--gw-halo);border-radius:50%;background:var(--gw-tint);color:var(--gw-accent);box-shadow:0 0 0 8px var(--gw-mint-soft)}
.acct-mark .gw-icon{width:26px;height:26px;stroke-width:2}
.acct-mark--lg{width:64px;height:64px;margin-bottom:calc(16px + var(--gw-halo))}
.acct-mark--lg .gw-icon{width:30px;height:30px}
.acct-mark--quiet{background:var(--gw-bg-deep);color:var(--gw-ink);box-shadow:0 0 0 8px var(--gw-sand-soft)}
.acct-mark--danger{background:var(--gw-warn-bg);color:var(--gw-danger);box-shadow:0 0 0 8px var(--gw-warn-soft)}
.acct-eyebrow--danger{color:var(--gw-danger)}

/* neutral note card: informational, distinct from the alert callout */
.acct-note{display:flex;gap:10px;align-items:flex-start;padding:14px 16px;border-radius:var(--gw-r-field);background:var(--gw-surface);border:1px solid var(--gw-line);font-size:15px;line-height:22px;color:var(--gw-muted)}
.acct-note .gw-icon{width:18px;height:18px;margin-top:2px;color:var(--gw-subtle)}
.acct-note strong{color:var(--gw-ink)}
.acct-note a{color:var(--gw-accent-ink);font-weight:700}
.acct .gw-callout--alert{font-weight:600;color:var(--gw-danger)}

.acct-confirm-input{font-weight:700;letter-spacing:.12em}
.acct .gw-btn--danger:hover{filter:brightness(.92)}
.acct .gw-btn--danger:focus-visible{outline-color:var(--gw-danger)}
/* type-to-confirm (shared .gw-arm): the danger button stays inert-looking until DELETE is typed; still focusable + submittable */
.acct-delete-form .gw-btn--armed-when{transition:background-color .18s var(--gw-ease),color .18s var(--gw-ease),box-shadow .18s var(--gw-ease)}
.acct-delete-form:has([data-arm]:placeholder-shown) .gw-btn--armed-when .gw-icon{opacity:.7}
.acct-delete-form .acct-confirm-input:placeholder-shown{letter-spacing:normal}

/* ---------- cancel: reason choices ---------- */
.acct-choices{gap:10px}
.acct-legend{margin:0 0 10px;padding:0;padding-inline:0}
.acct-choice input[type=radio]{-webkit-appearance:none;appearance:none;flex:none;width:22px;height:22px;margin:0;border-radius:50%;border:2px solid var(--gw-control-ring);background:var(--gw-surface);cursor:pointer;transition:border-width .16s var(--gw-ease),border-color .16s}
.acct-choice input[type=radio]:checked{border:7px solid var(--gw-accent)}
.acct-choice:has(input:checked){border-color:var(--gw-accent);background:var(--gw-tint)}
.acct-choice:has(input:focus-visible){outline:3px solid var(--gw-accent);outline-offset:2px}
.acct-choice input[type=radio]:focus-visible{outline:none}
.acct-textarea{min-height:96px;resize:vertical}
.acct-actions{display:flex;flex-direction:column;gap:12px;margin-top:4px}
.acct-actions>form{margin:0}

/* ---------- cancel: retention offer ---------- */
.acct-offer{position:relative;display:flex;flex-direction:column;gap:6px;padding:24px;border-radius:var(--gw-r-card);background:var(--gw-hero-sand);border:1px solid var(--gw-line);box-shadow:var(--gw-shadow-card);overflow:hidden}
.acct-offer__art{position:absolute;top:16px;right:16px;width:120px;height:auto;aspect-ratio:4/3;pointer-events:none}
.acct-offer__top{display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-height:86px;padding-right:128px}
.acct-offer__top .gw-eyebrow{margin:0}
.acct-offer__ribbon{align-self:flex-start;display:inline-flex;align-items:center;gap:6px;margin:0;padding:4px 10px 4px 8px;border-radius:999px;background:var(--gw-sand);color:var(--gw-cau-fg);font-size:13px;line-height:18px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.acct-offer__ribbon .gw-icon{width:15px;height:15px;stroke-width:2}
.acct-offer .gw-h1{margin:0}
.acct-offer__pct{font-size:1.35em;line-height:1;color:var(--gw-accent-ink);letter-spacing:-.02em;font-variant-numeric:tabular-nums;white-space:nowrap}
.acct-offer .gw-body{margin:4px 0 0}
.acct-keep-h{margin:16px 0 6px}
.acct-keep{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}
.acct-keep li{display:flex;align-items:center;gap:10px;font-size:15px;line-height:22px;color:var(--gw-ink)}
.acct-keep .gw-icon{box-sizing:content-box;width:14px;height:14px;padding:4px;border-radius:50%;background:var(--gw-tint);color:var(--gw-accent);stroke-width:2.5}

/* ---------- done ---------- */
.acct-after .gw-list-row{min-height:56px}
.acct-after .gw-list-main b{font-size:15px;line-height:21px;font-weight:600}
.acct-after+.acct-actions{margin-top:8px}
.acct-textform{display:flex;justify-content:center;margin:0}
.acct-textbtn{min-height:44px;font-weight:600}

/* ---------- calm system states (503, cancel support) ---------- */
.acct-pagehead--art{align-items:center;text-align:center;padding-top:24px}
.acct-pagehead--art .gw-body{max-width:34ch}
.acct-spot{display:block;width:160px;height:auto;aspect-ratio:4/3;margin:0 0 12px}
.acct-stuck{margin:0;text-align:center}
.acct-stuck a{font-weight:700;color:var(--gw-accent-ink);overflow-wrap:anywhere}
.acct-mailcard{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border-radius:var(--gw-r-box);background:var(--gw-surface);border:1px solid var(--gw-line)}
.acct-mailcard p{margin:0;flex:1;min-width:0;font-size:15px;line-height:22px;color:var(--gw-muted)}
.acct-mailcard a{font-weight:700;color:var(--gw-accent-ink);overflow-wrap:anywhere}

/* ---------- motion ---------- */
@keyframes acct-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes acct-pop{0%{opacity:0;transform:scale(.6)}70%{transform:scale(1.06)}100%{opacity:1;transform:none}}
.acct-summary,.acct-offer,.acct-toast{animation:acct-rise .42s var(--gw-ease-out) both}
.acct-disc[open] .acct-disc__body{animation:acct-rise .28s var(--gw-ease-out) both}
.acct-done .acct-mark{animation:acct-pop .5s var(--gw-ease-out) both}
@media (prefers-reduced-motion:reduce){
  .acct-summary,.acct-offer,.acct-toast,.acct-done .acct-mark,.acct-disc[open] .acct-disc__body{animation:none}
  .acct-disc>summary,.acct-disc>summary>.gw-icon:last-child{transition:none}
  .acct-group,.acct-sub-h,.acct-choice input[type=radio],.acct-delete-form .gw-btn--armed-when{transition:none}
}

/* ---------- finish pass ---------- */
.acct-summary__sub{text-wrap:balance}
.acct-sub-note{margin:0;padding:4px 4px 0;line-height:1.5}
.acct-sub-note a{font-weight:700;color:var(--gw-accent-ink);overflow-wrap:anywhere}
.acct-legal{margin:16px 0 0;text-align:center}
.acct-legal a{color:var(--gw-accent-ink);font-weight:600;padding:12px 8px;display:inline-block}
/* cancel reasons: ~48px cards so "Continue" sits above the fold at 390x844 */
.acct-choices{gap:8px}
.acct-choice{min-height:48px;padding-block:8px}
.acct-textarea{min-height:72px}
