/* THINK web account: shared components for /account/ and the checkout on /plus.html.
 * Same tokens as plus.html. House rules: every control carries a drawn icon,
 * no tinted fill with a matching outline (secondary surfaces stay neutral,
 * meaning lives in the glyph or the text colour), the one primary action is a
 * solid gold fill, motion is short and springy with a real reduced-motion branch. */
:root{--bg:#0c0a14;--bg2:#16131f;--bg3:#1b1726;--ink:#f5f1e8;--ink2:rgba(245,241,232,.82);--ink3:rgba(245,241,232,.58);
--ink4:rgba(245,241,232,.34);--rule:rgba(245,241,232,.12);--rule2:rgba(245,241,232,.22);--accent:#903cfe;--accent-hi:#c358ff;
--gold:#ffd34d;--gold-soft:#ffe08a;--ok:#8fe3a8;--warn:#ffcf7a;--bad:#ff8f8f;
--serif:"Fraunces",serif;--body:"Inter",system-ui,sans-serif;--mono:"JetBrains Mono",monospace;
--spring:cubic-bezier(.2,.9,.28,1.12)}
/* `hidden` must win over a component's display (the signed-in row is flex and
   showed "Signed in as" to a signed-out visitor; the weekly plan waits hidden). */
[hidden]{display:none!important}

.i{width:18px;height:18px;flex:0 0 auto;display:inline-block;vertical-align:middle}
.i-sm{width:15px;height:15px}
.i-lg{width:22px;height:22px}

/* card */
.acard{background:var(--bg2);border:1px solid var(--rule);border-radius:22px;padding:26px}
.acard + .acard{margin-top:16px}
.acard-head{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.acard-head .i{color:var(--gold)}
.acard-head.ok .i{color:var(--ok)}
.acard-head.warn .i{color:var(--warn)}
.acard h2,.acard h3{font-family:var(--serif);font-weight:700;color:var(--ink);font-size:21px;letter-spacing:-.4px;line-height:1.2}
.acard .hint{color:var(--ink3);font-size:14px;line-height:1.6;margin-bottom:18px}
.stack{display:flex;flex-direction:column;gap:12px}
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}

/* tabs: selected is text colour plus a gold rule, never a tinted pill */
.atabs{display:flex;gap:4px;border-bottom:1px solid var(--rule);margin-bottom:18px}
.atab{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 8px;background:none;border:none;
border-bottom:2px solid transparent;margin-bottom:-1px;color:var(--ink3);font:600 14px var(--body);cursor:pointer;
transition:color .18s ease,border-color .18s ease}
.atab[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--gold)}
.atab:hover{color:var(--ink)}

/* fields */
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-family:var(--mono);font-size:10px;letter-spacing:1.8px;color:var(--ink4);text-transform:uppercase}
.field input{width:100%;background:var(--bg);border:1px solid var(--rule);border-radius:12px;padding:13px 15px;color:var(--ink);
font-size:15.5px;font-family:var(--body)}
.field input:focus{outline:none;border-color:var(--rule2);box-shadow:0 0 0 3px rgba(245,241,232,.06)}

/* buttons: one solid primary; secondaries are neutral */
.abtn{display:inline-flex;align-items:center;justify-content:center;gap:9px;border-radius:14px;padding:14px 20px;
font:700 15px var(--body);text-decoration:none;cursor:pointer;border:1px solid transparent;
transition:transform .22s var(--spring),background .16s ease,border-color .16s ease,opacity .16s ease}
.abtn:active{transform:scale(.97)}
.abtn[disabled]{opacity:.55;cursor:default;transform:none}
.abtn-block{width:100%}
.abtn-gold{color:#0c0a14;background:linear-gradient(135deg,var(--gold-soft),var(--gold))}
.abtn-gold:hover:not([disabled]){transform:translateY(-1px)}
.abtn-apple{color:#000;background:#fff}
.abtn-quiet{color:var(--ink);background:transparent;border-color:var(--rule)}
.abtn-quiet:hover:not([disabled]){border-color:var(--rule2)}
.abtn-link{color:var(--ink3);background:none;border:none;padding:8px 4px;font-weight:600;font-size:14px}
.abtn-link:hover{color:var(--ink)}

.divider{display:flex;align-items:center;gap:12px;color:var(--ink4);font-family:var(--mono);font-size:10px;letter-spacing:1.8px;text-transform:uppercase}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--rule)}

/* notices: neutral surface, meaning in the glyph and text colour */
.notice{display:flex;gap:12px;align-items:flex-start;font-size:14px;line-height:1.6;color:var(--ink2);padding:2px 0}
.notice .i{margin-top:2px}
.notice.ok .i,.notice.ok strong{color:var(--ok)}
.notice.warn .i,.notice.warn strong{color:var(--warn)}
.notice.bad .i,.notice.bad strong{color:var(--bad)}
.notice.info .i{color:var(--ink3)}
.notice strong{color:var(--ink);font-weight:600}
.notice:empty{display:none}

.who{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;justify-content:space-between;font-size:14px;color:var(--ink3)}
.who .email{color:var(--ink);font-weight:600;overflow-wrap:anywhere;min-width:0}

/* status lines on the account page */
.lines{display:flex;flex-direction:column;border-top:1px solid var(--rule);margin-top:6px}
.line{display:flex;gap:12px;align-items:flex-start;padding:14px 0;border-bottom:1px solid var(--rule)}
.line .i{color:var(--ink3);margin-top:2px}
.line .k{font-family:var(--mono);font-size:10px;letter-spacing:1.6px;text-transform:uppercase;color:var(--ink4)}
.line .v{color:var(--ink);font-size:15px}
.line .sub{color:var(--ink3);font-size:13.5px;line-height:1.55;margin-top:2px}

/* a one-shot progress bar (fills once over the polling window, never loops) */
.progress{height:3px;background:var(--rule);border-radius:3px;overflow:hidden}
.progress > span{display:block;height:100%;width:0;background:var(--gold);border-radius:3px}

/* layers: mount, then animate in; animate out, then unmount (hidden) */
.layer{display:none}
.layer.mounted{display:block;opacity:0;transform:translateY(8px) scale(.99);
transition:opacity .2s ease,transform .24s var(--spring)}
.layer.mounted.in{opacity:1;transform:none}

.fine{color:var(--ink4);font-size:12.5px;line-height:1.6}
.fine a{color:var(--ink3)}

@media (prefers-reduced-motion:reduce){
  .layer.mounted,.abtn,.atab{transition:none}
  .layer.mounted{transform:none}
  .abtn:active{transform:none}
}
@media (max-width:560px){
  .acard{padding:22px 18px;border-radius:18px}
}
