/* ---------------------------------------------------------------------------
   The account
   A profile, and everything behind a sign-in: the work, the templates, the
   credits and the plans. It borrows the site's vocabulary rather than inventing
   a second one, because somebody arriving from the pricing page should not feel
   they have walked into a different product. .price, .ticks and .btn are reused
   whole.

   Loaded only by account.html and pricing.html. Every other page would be
   carrying it for nothing.
--------------------------------------------------------------------------- */

/* ---- the account menu, under the name in the top bar --------------------- */

/* Fixed, and positioned from the button's own rectangle rather than absolutely
   inside the bar. The bar is a flex row that clips, and a menu appearing with
   its bottom half cut off is worse than no menu at all. */
.acct-menu {
  position: fixed; z-index: var(--z-gate, 60);
  width: min(320px, calc(100vw - 20px));
  padding: 16px; border-radius: 16px;
  background: var(--ink-lift);
  border: 1px solid color-mix(in oklab, var(--edge) 66%, transparent);
  box-shadow: 0 26px 60px oklch(0 0 0 / 0.42);
  animation: acctMenuIn 160ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes acctMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .acct-menu { animation: none; } }

.acct-menu-who {
  display: flex; align-items: center; gap: 11px; margin-bottom: 14px;
  color: inherit; text-decoration: none;
  margin-left: -8px; margin-right: -8px; padding: 8px; border-radius: 10px;
}
.acct-menu-who:hover { background: color-mix(in oklab, var(--paper) 8%, transparent); }
.acct-menu-who b { display: block; font: 700 0.98rem/1.3 var(--display); }
.acct-menu-who span { display: block; color: var(--quiet); font-size: 0.85rem; overflow-wrap: anywhere; }

.acct-menu-plan {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 12px 0; border-top: 1px solid color-mix(in oklab, var(--edge) 46%, transparent);
}
.acct-menu-right { text-align: right; }
.acct-menu-label { display: block; color: var(--quiet); font-size: 0.78rem; margin-bottom: 2px; }
.acct-menu-plan b { font: 700 0.98rem/1.2 var(--display); }

.acct-menu-credit { padding: 12px 0; border-top: 1px solid color-mix(in oklab, var(--edge) 46%, transparent); }
.acct-menu-credit-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.acct-menu-credit-top b { font: 700 1.05rem/1.2 var(--display); letter-spacing: -0.02em; }
.acct-menu-credit-top span { color: var(--quiet); font-size: 0.82rem; }

.acct-meter {
  height: 5px; border-radius: 999px;
  background: color-mix(in oklab, var(--edge) 60%, transparent);
  overflow: hidden;
}
.acct-meter > i {
  display: block; height: 100%; border-radius: inherit;
  background: var(--flow);
  transition: width 260ms var(--ease-out);
}
.acct-meter[data-low="1"] > i { background: var(--magenta); }
@media (prefers-reduced-motion: reduce) { .acct-meter > i { transition: none; } }

.acct-menu-acts { display: flex; gap: 8px; padding-top: 4px; }
.acct-menu-acts .acct-mini { flex: 1; }

/* The pages that left the bar. A column, because they are destinations and not
   controls, and a row of three would read as more buttons. */
.acct-menu-nav {
  display: flex; flex-direction: column;
  margin-top: 14px; padding-top: 10px;
  border-top: 1px solid color-mix(in oklab, var(--edge) 46%, transparent);
}
.acct-menu-go {
  padding: 9px 8px; margin: 0 -8px; border-radius: 8px;
  color: var(--paper); text-decoration: none; font-size: 0.94rem;
  transition: background 140ms;
}
.acct-menu-go:hover { background: color-mix(in oklab, var(--edge) 40%, transparent); }

.acct-menu-foot {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid color-mix(in oklab, var(--edge) 46%, transparent);
}
.acct-menu-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--quiet); font: 400 0.9rem var(--body); text-decoration: none;
  transition: color 140ms;
}
.acct-menu-link:hover { color: var(--paper); text-decoration: underline; }
.acct-menu-link--risk:hover { color: var(--magenta); }

/* The name in the bar. */
.acct-who {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: inherit; font: inherit; font-size: 0.92rem; text-decoration: none;
}
/* The plate behind a face. Violet mixed toward black rather than plain violet:
   the initials only appear when the photograph does not, so that is exactly the
   moment they have to be readable, and white on flat --violet measures 2.6:1 at
   the eleven pixels the small one uses. */
.acct-dot {
  position: relative; width: 26px; height: 26px; border-radius: 999px;
  overflow: hidden; flex-shrink: 0;
  background: color-mix(in oklab, var(--violet) 58%, black);
  display: grid; place-items: center;
}
.acct-dot--big { width: 42px; height: 42px; border-radius: 14px; }
.acct-dot-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The initials sit underneath, so a photograph that never arrives leaves a
   letter rather than a hole. */
.acct-dot-i { color: white; font: 700 0.72rem/1 var(--display); }
.acct-dot--big .acct-dot-i { font-size: 1rem; }
.acct-nopic { display: none; }

/* ---- the profile head ---------------------------------------------------- */

.acct-profile { padding-top: 18px; }

/* The head is one card: the banner on top, the identity under it, and the face
   cut into the seam. Two loose blocks read as a picture followed by some text,
   which is the arrangement every profile abandoned years ago. */
.acct-headcard {
  border-radius: 18px; overflow: hidden;
  background: color-mix(in oklab, var(--ink-lift) 62%, transparent);
  border: 1px solid color-mix(in oklab, var(--edge) 44%, transparent);
}

.acct-cover {
  position: relative; overflow: hidden;
  height: clamp(130px, 22vw, 230px);
  background:
    radial-gradient(70% 120% at 18% 10%, color-mix(in oklab, var(--violet) 42%, transparent), transparent 68%),
    color-mix(in oklab, var(--ink-lift) 70%, transparent);
}
.acct-cover-pic { width: 100%; height: 100%; object-fit: cover; display: block; }

/* The identity sits below the banner, with room made at the left for the half
   of the face that hangs into it. */
.acct-headbody {
  position: relative;
  padding: clamp(16px, 2.4vw, 24px) clamp(18px, 2.6vw, 30px) clamp(20px, 2.6vw, 26px);
  padding-top: calc(clamp(52px, 7vw, 74px) + 14px);
}

/* A circle, not a rounded square, and ringed in the card's own colour so it
   reads as cut out of the edge rather than dropped on top of it. */
/* Two elements: this one positions and is never clipped, the inner one is the
   circle. One element doing both took a bite out of the camera badge. */
.acct-avatar {
  position: absolute;
  left: clamp(18px, 2.6vw, 30px);
  top: calc(clamp(52px, 7vw, 74px) * -1);
  width: clamp(104px, 14vw, 148px); height: clamp(104px, 14vw, 148px);
}
.acct-avatar-in {
  position: absolute; inset: 0;
  border-radius: 50%; overflow: hidden;
  background: color-mix(in oklab, var(--violet) 58%, black);
  display: grid; place-items: center;
  border: 5px solid var(--ink-deep);
  box-shadow: 0 6px 22px oklch(0 0 0 / 0.28);
}
.acct-avatar-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Changing the pictures.

   Both controls sit on the thing they change rather than in a settings page
   somewhere, because that is where somebody looks when they decide they hate
   their cover photo. Quiet until hovered: a profile is mostly read, not edited,
   and a camera icon burning away on every visit is a page that never settles. */
.acct-swap {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in oklab, white 34%, transparent);
  background: color-mix(in oklab, var(--ink-deep) 62%, transparent);
  backdrop-filter: blur(6px);
  color: white; font: 700 0.82rem/1 var(--display);
  opacity: 0.85;
  transition: opacity 160ms, background 160ms;
}
.acct-swap:hover { opacity: 1; background: color-mix(in oklab, var(--ink-deep) 78%, transparent); }
.acct-cam { width: 16px; height: 16px; flex-shrink: 0; }

/* On the circle's edge at roughly forty-five degrees, which for a circle is at
   85% of the box, not at its corner. Violet rather than var(--paper): paper
   flips to near-black in light mode, and a black disc on somebody's face is the
   thing that looked wrong. */
.acct-swapface {
  position: absolute; right: 3%; bottom: 3%;
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; cursor: pointer;
  border: 3px solid var(--ink-deep);
  background: var(--violet); color: white;
  box-shadow: 0 3px 10px oklch(0 0 0 / 0.3);
  transition: background 160ms, transform 140ms;
}
.acct-swapface:hover { background: color-mix(in oklab, var(--violet) 84%, white); }
.acct-swapface:active { transform: scale(0.94); }
@media (prefers-reduced-motion: reduce) { .acct-swapface { transition: background 160ms; } .acct-swapface:active { transform: none; } }
.acct-swapface .acct-cam { width: 17px; height: 17px; }

/* The pencil's little menu, hanging off the bottom of the avatar. */
.acct-facemenu {
  position: absolute; left: 50%; bottom: -10px; transform: translate(-50%, 100%);
  z-index: 40; min-width: 178px; padding: 6px;
  display: grid; gap: 2px;
  background: var(--ink-deep); border: 1px solid var(--edge); border-radius: 12px;
  box-shadow: 0 10px 30px oklch(0 0 0 / 0.35);
}
.acct-facemenu-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 0; border-radius: 8px; cursor: pointer;
  background: none; color: var(--paper); font: 600 0.88rem/1 var(--body);
  text-align: left;
}
.acct-facemenu-row .acct-cam { width: 16px; height: 16px; flex-shrink: 0; }
.acct-facemenu-row:hover { background: color-mix(in oklab, var(--paper) 10%, transparent); }
.acct-facemenu-row--risk:hover { background: oklch(0.55 0.19 25 / 0.22); color: oklch(0.75 0.16 25); }

/* Only there once there is something to undo. */
.acct-reset {
  margin-top: 16px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--quiet); font: 400 0.88rem var(--body); text-decoration: underline;
}
.acct-reset:hover { color: var(--paper); }
.acct-reset + .acct-reset { margin-left: 18px; }
.acct-avatar-i { color: white; font: 700 clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem)/1 var(--display); letter-spacing: -0.02em; }

/* Out at the right of the row the face pushes into: the only part of it not
   already spoken for.

   In normal flow rather than absolutely placed. Absolute put them at a fixed
   corner whatever else was there, so a third button, a longer name or a narrower
   window could slide them under the avatar or off the card. A left margin wide
   enough to clear the face means they can only ever wrap, which is a layout that
   goes wrong quietly instead of invisibly. */
.acct-headbody .acct-actions {
  margin: 0 0 16px auto;
  justify-content: flex-end;
  padding-left: clamp(96px, 14vw, 160px);
}
.acct-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.acct-id-say { min-width: 0; }
.acct-name { font-size: clamp(1.55rem, 1.2rem + 1.3vw, 2.1rem); margin: 0 0 6px; outline: none; }
.acct-since { margin: 0; color: var(--quiet); font-size: 0.92rem; }
/* The address, which is the thing somebody reads out or puts on a CV, so it
   looks like an address rather than a username. */
.acct-addr { color: var(--paper); text-decoration: none; border-bottom: 1px solid color-mix(in oklab, var(--paper) 34%, transparent); }
.acct-addr:hover { border-bottom-color: var(--cyan); color: var(--cyan); }

.acct-stats {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 28px;
}
.acct-stats li { display: flex; align-items: baseline; gap: 6px; }
.acct-stats b { font: 700 1.05rem/1 var(--display); letter-spacing: -0.01em; }
.acct-stats span { color: var(--quiet); font-size: 0.92rem; }

/* Narrow: the buttons cannot share the line with the face, so they go under the
   name where there is room for them. */
@media (max-width: 620px) {
  .acct-headbody .acct-actions { padding-left: 0; justify-content: flex-start; }
  .acct-headbody .acct-actions .btn { flex: 1 1 auto; }
}

/* Viewing your own profile as a visitor: a bar, not a badge. */
.acct-asbar {
  background: color-mix(in oklab, var(--cyan) 12%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--cyan) 30%, transparent);
}
.acct-asbar-in {
  display: flex; flex-wrap: wrap; gap: 12px 18px;
  align-items: center; justify-content: space-between;
  padding: 12px 0;
}
.acct-asbar span { color: var(--paper); font-size: 0.92rem; }

/* ---- tabs ---------------------------------------------------------------- */

/* Sticky under the site's own bar rather than at the top of the window. The bar
   is sticky at 0 and 65 tall, so tabs stuck at 0 spend the whole page hidden
   behind it: they scroll away and never come back, which looks like sticky
   simply not working. Measured, not guessed. */
.acct-tabs-wrap {
  position: sticky; top: 65px; z-index: 29;
  background: var(--ink-deep);
  border-bottom: 1px solid color-mix(in oklab, var(--edge) 34%, transparent);
  margin-top: 24px;
}
@media (max-width: 720px) { .acct-tabs-wrap { top: 60px; } }
.acct-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.acct-tabs::-webkit-scrollbar { display: none; }
.acct-tab {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 15px 14px; border: 0; background: transparent; cursor: pointer;
  color: var(--quiet); font: 700 0.95rem/1 var(--display); letter-spacing: -0.01em;
  white-space: nowrap; transition: color 160ms;
}
.acct-tab:hover, .acct-tab.on { color: var(--paper); }
.acct-tab.on::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 2px; border-radius: 2px; background: var(--flow);
}
.acct-tab-n {
  font: 400 0.78rem/1 var(--body); padding: 3px 7px; border-radius: 999px;
  background: color-mix(in oklab, var(--edge) 46%, transparent); color: var(--quiet);
}
.acct-tab.on .acct-tab-n { color: var(--paper); }

.acct-band { padding: clamp(26px, 3.5vw, 40px) 0; }
.acct-lead { color: var(--quiet); max-width: 62ch; margin: 0 0 22px; font-size: 0.96rem; }

/* ---- cards, for courses and templates alike ------------------------------ */

/* One card shape for both, because they are the same kind of object at
   different stages: a course you have, and a course you could have. */
.acct-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.acct-card {
  display: flex; flex-direction: column;
  border-radius: 16px; overflow: hidden;
  background: color-mix(in oklab, var(--ink-lift) 52%, transparent);
  border: 1px solid color-mix(in oklab, var(--edge) 46%, transparent);
  transition: border-color 180ms, transform 180ms var(--ease-out);
}
.acct-card:hover { border-color: color-mix(in oklab, var(--cyan) 52%, transparent); transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) {
  .acct-card { transition: border-color 180ms; }
  .acct-card:hover { transform: none; }
}

.acct-shot {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10;
  overflow: hidden; padding: 0; border: 0; cursor: pointer;
  background: color-mix(in oklab, var(--ink-deep) 60%, transparent);
}
.acct-shot-pic {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 320ms var(--ease-out);
}
.acct-card:hover .acct-shot-pic { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .acct-card:hover .acct-shot-pic { transform: none; } }

.acct-card-say { display: flex; flex-direction: column; gap: 8px; padding: 15px 16px 16px; flex: 1; }
.acct-card-say h3 { font-size: 1rem; margin: 0; line-height: 1.3; }
.acct-titlebtn {
  background: none; border: 0; padding: 0; text-align: left; cursor: pointer;
  color: inherit; font: inherit;
}
.acct-titlebtn:hover { text-decoration: underline; }
.acct-card-meta { margin: 0; color: var(--quiet); font-size: 0.87rem; line-height: 1.5; flex: 1; }
.acct-card .acct-row-actions { margin-top: 4px; }

/* Draft or published, on the picture where it belongs. */
.acct-pill {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px;
  font: 700 0.74rem/1.5 var(--display);
  background: color-mix(in oklab, var(--ink-deep) 86%, transparent);
  color: var(--paper);
}
.acct-pill--live { color: color-mix(in oklab, var(--cyan) 50%, var(--paper)); }

.acct-row-actions { display: flex; gap: 8px; }
.acct-mini {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--edge); background: transparent; color: var(--paper);
  font: 700 0.84rem/1 var(--display); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 160ms, color 160ms, background 160ms, transform 120ms;
}
.acct-mini:hover { border-color: var(--quiet); }
.acct-mini--go { background: var(--paper); color: var(--ink-deep); border-color: var(--paper); }
.acct-mini--go:hover { background: color-mix(in oklab, var(--paper) 88%, var(--ink-deep)); }
.acct-mini--risk:hover { border-color: var(--magenta); color: var(--magenta); }
.acct-mini--wide { width: 100%; }
.acct-mini:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
  .acct-mini { transition: border-color 160ms, color 160ms, background 160ms; }
  .acct-mini:active { transform: none; }
}

/* The draft the editor is holding: one line, because it points at something
   already open rather than being a thing in its own right. */
.acct-draft {
  display: flex; flex-wrap: wrap; gap: 12px 18px;
  align-items: center; justify-content: space-between;
  padding: 14px 18px; margin-bottom: 22px; border-radius: 12px;
  background: color-mix(in oklab, var(--cyan) 8%, transparent);
  border: 1px solid color-mix(in oklab, var(--cyan) 34%, transparent);
}
.acct-draft b { display: block; font: 700 0.98rem/1.3 var(--display); }
.acct-draft span { color: var(--quiet); font-size: 0.9rem; }

.acct-empty {
  padding: clamp(28px, 5vw, 44px); border-radius: 16px; text-align: center;
  border: 1px dashed color-mix(in oklab, var(--edge) 80%, transparent);
}
.acct-empty h3 { margin: 0 0 8px; font-size: 1.05rem; }
.acct-empty p { margin: 0 auto 18px; color: var(--quiet); font-size: 0.95rem; max-width: 46ch; }

/* ---- sign in ------------------------------------------------------------- */

.acct-panel {
  padding: clamp(24px, 3.4vw, 34px); border-radius: 16px;
  background: color-mix(in oklab, var(--ink-lift) 58%, transparent);
  border: 1px solid color-mix(in oklab, var(--edge) 48%, transparent);
}
.acct-panel h1 { font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.6rem); margin: 0 0 8px; }
.acct-panel p { color: var(--quiet); margin: 0 0 18px; font-size: 0.96rem; max-width: 62ch; }
.acct-panel--sign { max-width: 520px; }

/* Google's own button arrives in an iframe; this just gives it room. */
.acct-google { margin: 22px 0 4px; min-height: 44px; }

.acct-field { display: block; margin-bottom: 14px; }
.acct-field span { display: block; margin-bottom: 6px; font: 700 0.86rem/1.3 var(--display); color: var(--quiet); }
.acct-field input {
  width: 100%; padding: 13px 15px; border-radius: 10px;
  border: 1px solid var(--edge); background: var(--ink-deep); color: var(--paper);
  font: 400 1rem var(--body);
  transition: border-color 160ms, box-shadow 160ms;
}
.acct-field input::placeholder { color: color-mix(in oklab, var(--quiet) 76%, transparent); }
.acct-field input:hover { border-color: var(--quiet); }
.acct-field input:focus-visible {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--cyan) 28%, transparent);
}
.acct-field input[aria-invalid="true"] { border-color: var(--magenta); }
.acct-say { margin: 12px 0 0; font-size: 0.92rem; min-height: 1.4em; color: var(--quiet); }
.acct-say.no { color: var(--magenta); }
.acct-say.yes { color: var(--cyan); }

/* ---- plans, in a dialog -------------------------------------------------- */

.acct-plans {
  width: min(900px, 94vw); max-height: 88vh; padding: 0; border: 0; border-radius: 18px;
  background: var(--ink-lift); color: var(--paper);
  box-shadow: 0 30px 80px oklch(0 0 0 / 0.5);
  overflow: auto;
}
.acct-plans::backdrop, .acct-buy::backdrop { background: oklch(0.11 0.05 268 / 0.72); }
/* The credits dialog holds three buttons and a sentence; a 900px box around
   that reads as an error. */
.acct-plans--slim { width: min(520px, 94vw); }

.acct-plans-in { padding: clamp(22px, 3.4vw, 32px); }
.acct-plans-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.acct-plans-head h2 { font-size: 1.3rem; margin: 0; }
.acct-x {
  width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--edge); background: transparent;
  color: var(--paper); cursor: pointer; transition: border-color 160ms, color 160ms;
}
.acct-x:hover { border-color: var(--quiet); }

/* How long for, then which tier. */
.acct-term { margin-bottom: 22px; }
.acct-term .segmented { flex-wrap: wrap; }
.acct-term-say { margin: 12px 0 0; font-size: 0.9rem; }

/* Two tiers side by side rather than the three-up grid the pricing page uses.
   With two boxes, auto-fit at 300px leaves them stretched across a wide dialog
   and harder to compare than if they sat at a readable width. */
.price-grid--two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 720px; }
.price--max { border-color: color-mix(in oklab, var(--violet) 52%, transparent); }
.price-credits {
  margin: 0 0 14px; font: 700 0.95rem/1.3 var(--display);
  color: color-mix(in oklab, var(--cyan) 55%, var(--paper));
}
.acct-drop { margin: 18px 0 0; }

.price--now { border-color: color-mix(in oklab, var(--cyan) 58%, transparent); }
.price-tag {
  display: inline-block; margin-bottom: 12px; padding: 4px 11px; border-radius: 999px;
  font: 700 0.74rem/1.5 var(--display); letter-spacing: 0.02em;
  background: color-mix(in oklab, var(--cyan) 20%, transparent);
  /* Cyan mixed toward whichever colour the text is on this theme. --paper is
     near-white on dark and near-black on light, so one declaration lightens the
     cyan against the dark ground and darkens it against the light one. Plain
     var(--cyan) here measured 2.3:1 in light mode, which is unreadable. */
  color: color-mix(in oklab, var(--cyan) 55%, var(--paper));
}
.price-amount small { font: 400 0.9rem/1 var(--body); color: var(--quiet); letter-spacing: 0; }
.price .btn { width: 100%; margin-top: 4px; }
.price .btn[disabled] { opacity: 0.45; cursor: default; }
.price .btn[disabled]:hover { transform: none; }

.acct-packs-wrap { margin-top: 30px; padding-top: 24px; border-top: 1px solid color-mix(in oklab, var(--edge) 46%, transparent); }
.acct-packs-wrap h3 { margin: 0 0 6px; font-size: 1.05rem; }
.acct-packs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.acct-pack {
  padding: 12px 18px; border-radius: 12px;
  border: 1px solid var(--edge); background: transparent; color: var(--paper);
  cursor: pointer; text-align: left; font: 400 0.95rem/1.35 var(--body);
  transition: border-color 160ms, background 160ms;
}
.acct-pack b { display: block; font: 700 1rem/1.2 var(--display); }
.acct-pack span { color: var(--quiet); font-size: 0.86rem; }
.acct-pack:hover { border-color: var(--cyan); background: color-mix(in oklab, var(--cyan) 8%, transparent); }

/* The share sheet. The link is visible and selected rather than copied
   invisibly: a "copied!" with nothing on screen is a thing people do not trust
   and cannot check. */
.acct-share { width: min(520px, 92vw); }
.acct-share-field {
  width: 100%; margin-top: 4px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--edge); background: var(--ink-deep); color: var(--paper);
  font: 400 0.86rem/1.4 var(--mono);
  text-overflow: ellipsis;
}
.acct-share-field:focus-visible {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--cyan) 28%, transparent);
}
.acct-share-note { margin: 12px 0 0; color: var(--quiet); font-size: 0.88rem; }

/* ---- checkout ------------------------------------------------------------ */

.acct-buy {
  width: min(440px, 92vw); padding: 0; border: 0; border-radius: 16px;
  background: var(--ink-lift); color: var(--paper);
  box-shadow: 0 30px 80px oklch(0 0 0 / 0.5);
}
.acct-buy-in { padding: clamp(24px, 4vw, 32px); }
.acct-buy h2 { font-size: 1.25rem; margin: 0 0 6px; }
.acct-buy .acct-buy-body > p { color: var(--quiet); font-size: 0.95rem; margin: 0 0 18px; }
.acct-buy-line {
  display: flex; justify-content: space-between; gap: 16px; padding: 13px 0;
  border-top: 1px solid color-mix(in oklab, var(--edge) 46%, transparent);
  font-size: 0.96rem;
}
.acct-buy-line:last-of-type {
  border-bottom: 1px solid color-mix(in oklab, var(--edge) 46%, transparent);
  font-weight: 700;
}
.acct-buy-note {
  margin: 16px 0 0; padding: 11px 14px; border-radius: 10px; font-size: 0.86rem;
  background: color-mix(in oklab, var(--cyan) 12%, transparent);
  color: color-mix(in oklab, var(--cyan) 40%, var(--paper));
}
.acct-buy-do { display: flex; gap: 10px; margin-top: 20px; }
.acct-buy-do .btn { flex: 1; }
.acct-buy[data-state="done"] .acct-buy-body { display: none; }
.acct-buy-done { display: none; text-align: center; }
.acct-buy[data-state="done"] .acct-buy-done { display: block; }
.acct-tick {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 999px;
  display: grid; place-items: center;
  background: color-mix(in oklab, var(--cyan) 22%, transparent);
  color: color-mix(in oklab, var(--cyan) 60%, var(--paper));
}

/* ---- narrow -------------------------------------------------------------- */

@media (max-width: 560px) {
  .acct-grid { grid-template-columns: 1fr; }
}
