/* Sign-in panel. Shared by the landing page and the workshop, so it carries its own
   colours and buttons instead of borrowing either page's. */
.acct-pop {
  --a-ink: #1D1C1A; --a-ink-2: #5E5B55; --a-ink-3: #97938B; --a-sheet: #FCFBF8; --a-well: #F4F2ED;
  --a-rule: rgba(29, 28, 26, .10); --a-bad: #D23F2A; --a-ease: cubic-bezier(.2, .8, .2, 1);
  position: fixed; z-index: 120; top: 60px; right: 16px; width: min(380px, calc(100vw - 24px));
  padding: 20px 20px 18px; border-radius: 16px; background: var(--a-sheet); color: var(--a-ink);
  font: 15px/1.5 "Satoshi", ui-sans-serif, system-ui, -apple-system, sans-serif; text-align: left;
  box-shadow: 0 2px 4px rgba(60, 48, 30, .08), 0 8px 16px rgba(60, 48, 30, .08), 0 24px 48px rgba(60, 48, 30, .10), 0 0 0 1px var(--a-rule);
  animation: acctIn .22s var(--a-ease); transform-origin: top right;
}
.acct-pop[hidden] { display: none; }
@keyframes acctIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.acct-pop * { box-sizing: border-box; }
.acct-pop h2 { margin: 0 0 4px; font: 400 24px/1.15 "Fraunces", Georgia, serif; letter-spacing: -.02em; font-variation-settings: "opsz" 144; }
.acct-pop h2 i { font-weight: 340; }
.acct-pop .sub { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--a-ink-3); }
.acct-pop .sub b { color: var(--a-ink); font-weight: 500; overflow-wrap: anywhere; }

/* buttons */
.acct-k {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 40px; padding: 0 16px;
  border: 0; border-radius: 10px; font: 500 14.5px/1 inherit; font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: transform .09s var(--a-ease), filter .16s var(--a-ease), box-shadow .14s var(--a-ease);
}
.acct-k:active { transform: translateY(2px); }
.acct-k:disabled { opacity: .55; pointer-events: none; }
.acct-k-dark { color: #F6F3EC; background: linear-gradient(#3A3936, #262523); box-shadow: inset 0 -3px 0 #171614, inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(0, 0, 0, .18), 0 4px 10px rgba(0, 0, 0, .12); }
.acct-k-dark:hover { filter: brightness(1.08); }
.acct-k-light { color: var(--a-ink); background: linear-gradient(#F7F5F0, #E9E6DF); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .13), inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(60, 48, 30, .14); }
.acct-k-light:hover { filter: brightness(1.02); }
.acct-k-danger { color: #fff; background: linear-gradient(#DD4A35, #C23A26); box-shadow: inset 0 -3px 0 #9A2C1C, inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .18); }
.acct-link { border: 0; background: none; padding: 6px 0; font: inherit; font-size: 13px; color: var(--a-ink-2); cursor: pointer; }
.acct-link:hover { color: var(--a-ink); text-decoration: underline; }
.acct-link:disabled { color: var(--a-ink-3); pointer-events: none; }
.acct-link.acct-danger:hover { color: var(--a-bad); }
.acct-k:focus-visible, .acct-link:focus-visible { outline: 2px solid var(--a-ink); outline-offset: 2px; }

.acct-ways { display: grid; gap: 8px; }
.acct-way { width: 100%; height: 42px; }
.acct-way svg { width: 18px; height: 18px; flex: none; }
.acct-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; font-size: 12.5px; color: var(--a-ink-3); }
.acct-or::before, .acct-or::after { content: ""; flex: 1; height: 1px; background: var(--a-rule); }
.acct-row { display: flex; gap: 8px; }
.acct-row input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 0; border-radius: 10px;
  font: inherit; font-size: 14px; color: var(--a-ink); background: var(--a-well);
  box-shadow: inset 0 0 0 1px var(--a-rule), inset 0 1px 2px rgba(60, 48, 30, .06);
}
.acct-row input::placeholder { color: var(--a-ink-3); }
.acct-row input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--a-ink-2); }
#acct-code { font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.acct-split { justify-content: space-between; align-items: center; margin-top: 14px; }
.acct-links { margin-top: 8px; }
.acct-who { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.acct-who b { display: block; font-weight: 600; font-size: 15px; }
.acct-who div span { display: block; font-size: 13px; color: var(--a-ink-3); overflow-wrap: anywhere; }
.acct-note { margin: 12px 0 0; font-size: 12.5px; color: var(--a-ink-3); line-height: 1.45; }
.acct-err { margin: 10px 0 0; font-size: 13px; color: var(--a-bad); line-height: 1.45; }

/* avatar, in the panel and in whichever button opens it */
.acct-av { display: block; flex: none; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(29, 28, 26, .10); }
.acct-av-letter { display: grid; place-items: center; background: #1D1C1A; color: #FCFBF8; font-weight: 600; line-height: 1; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 180px; white-space: nowrap; cursor: pointer; }
.acct-btn span { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 520px) {
  .acct-pop { left: 12px; right: 12px; width: auto; }
}

/* landing nav: the Sign in link becomes a button */
button.nav-sign { border: 0; background: none; padding: 0; font-family: inherit; line-height: inherit; }
button.nav-sign.signed-in { color: var(--a-ink, #1D1C1A); }

/* ---------- the sign-in page (signin.html) ---------- */
.si-body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column; color: #1D1C1A; -webkit-font-smoothing: antialiased;
  font: 15.5px/1.55 "Satoshi", ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: #F6F5F1 radial-gradient(rgba(29, 28, 26, .09) 1px, transparent 1.2px) 0 0 / 22px 22px;
}
.si-head { display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(20px, 5vw, 56px); }
.si-wordmark { font: 400 21px/1 "Fraunces", Georgia, serif; font-variation-settings: "opsz" 36; letter-spacing: -0.02em; color: #1D1C1A; text-decoration: none; white-space: nowrap; }
.si-wordmark i { font-style: italic; }
.si-back { font-size: 14px; font-weight: 500; color: #5E5B55; text-decoration: none; }
.si-back:hover { color: #1D1C1A; }
.si-main { flex: 1; display: grid; place-items: center; padding: 24px 16px 56px; }
.si-card {
  box-sizing: border-box; width: min(440px, 100%); padding: 44px 40px 36px; border-radius: 20px; text-align: center; background: #FDFDFB;
  box-shadow: 0 1px 2px rgba(60, 48, 30, .07), 0 4px 8px rgba(60, 48, 30, .07), 0 12px 24px rgba(60, 48, 30, .07), 0 0 0 1px rgba(29, 28, 26, .08);
  font: 15px/1.5 "Satoshi", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --a-ink: #1D1C1A; --a-ink-2: #5E5B55; --a-ink-3: #97938B; --a-well: #F4F2ED; --a-rule: rgba(29, 28, 26, .10); --a-bad: #D23F2A; --a-ease: cubic-bezier(.2, .8, .2, 1);
}
.si-card * { box-sizing: border-box; }
.si-mark { display: flex; justify-content: center; margin: 0 auto 24px; color: #1D1C1A; }
.si-mark .pw-mark { width: 44px; height: 44px; top: 0; }
.si-card h1 { margin: 0 0 10px; font: 500 34px/1.05 "Satoshi", ui-sans-serif, system-ui, sans-serif; letter-spacing: -0.045em; color: #232220; }
.si-sub { margin: 0 0 26px; font-size: 15px; color: #97938B; }
.si-sub b { font-weight: 500; color: #1D1C1A; overflow-wrap: anywhere; }
.si-card .acct-way { height: 46px; font-size: 15px; }
.si-help { margin: 12px 0 0; font-size: 13.5px; line-height: 1.5; color: #5E5B55; }
.si-card .acct-or { margin: 22px 0 18px; text-transform: none; }
.si-form { display: grid; gap: 10px; }
.si-form input {
  width: 100%; height: 48px; padding: 0 16px; border: 0; border-radius: 12px; font: inherit; font-size: 15px; color: #1D1C1A;
  background: #FDFDFB; box-shadow: inset 0 0 0 1px rgba(29, 28, 26, .14), 0 1px 2px rgba(60, 48, 30, .06), inset 0 -2px 0 rgba(29, 28, 26, .04);
}
.si-form input::placeholder { color: #97938B; }
.si-form input:focus { outline: none; box-shadow: inset 0 0 0 1.5px #5E5B55; }
.si-form .acct-k { width: 100%; height: 48px; font-size: 15px; }
.si-card .acct-err { margin-top: 14px; text-align: left; }
.si-links { display: flex; justify-content: space-between; margin-top: 18px; }
.si-wait { height: 46px; margin-bottom: 18px; border-radius: 10px; background: linear-gradient(90deg, #F1EFEA, #F7F5F0, #F1EFEA); background-size: 200% 100%; animation: siWait 1.2s linear infinite; }
@keyframes siWait { to { background-position: -200% 0; } }
.si-foot nav { display: flex; gap: 18px; }
.si-foot a { color: inherit; text-decoration: none; }
.si-foot a:hover { color: #1D1C1A; }
.si-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px clamp(20px, 5vw, 56px) 28px; font-size: 13px; color: #97938B; }
.si-terms { margin: 22px 0 0; font-size: 13px; line-height: 1.5; color: #97938B; }
.si-terms a { color: #5E5B55; text-decoration: underline; text-decoration-color: rgba(29, 28, 26, .25); text-underline-offset: 3px; }
.si-terms a:hover { color: #1D1C1A; text-decoration-color: currentColor; }

/* Terms and Privacy */
.doc { flex: 1; width: min(680px, 100% - 40px); margin: 32px auto 72px; color: #2A2926; }
.doc h1 { margin: 24px 0 6px; font: 500 clamp(36px, 5vw, 52px)/1.02 "Satoshi", ui-sans-serif, system-ui, sans-serif; letter-spacing: -0.05em; color: #232220; }
.doc .doc-meta { margin: 0 0 36px; font-size: 14px; color: #97938B; }
.doc h2 { margin: 40px 0 10px; font: 500 22px/1.2 "Satoshi", ui-sans-serif, system-ui, sans-serif; letter-spacing: -0.02em; color: #1D1C1A; }
.doc h3 { margin: 22px 0 6px; font-size: 15px; font-weight: 700; color: #1D1C1A; }
.doc p, .doc li { font-size: 16.5px; line-height: 1.65; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: #97938B; }
.doc b { font-weight: 600; color: #1D1C1A; }
.doc a { color: #1D1C1A; text-underline-offset: 3px; }
.doc code { font: 14px "JetBrains Mono", ui-monospace, monospace; background: rgba(29, 28, 26, .05); padding: 1px 5px; border-radius: 5px; }

@media (max-width: 520px) {
  .si-card { padding: 36px 22px 28px; border-radius: 18px; }
  .si-card h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { .si-wait { animation: none; } }
.acct-dash { width: 100%; margin: 2px 0 4px; text-decoration: none; }

/* ---------- account menu (signed in) ---------- */
.acct-pop:has(.am-who), .acct-pop:has(.am-confirm) { width: 288px; padding: 6px; border-radius: 14px; }
.am-who { display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px; }
.am-who div { min-width: 0; }
.am-who b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-who div span { display: block; font-size: 12.5px; color: var(--a-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-group { padding: 4px 0; border-top: 1px solid var(--a-rule); }
.am-item {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 38px; padding: 0 12px; border: 0; border-radius: 9px;
  background: none; font: inherit; font-size: 14px; color: var(--a-ink); text-decoration: none; text-align: left; cursor: pointer;
  transition: background-color .12s var(--a-ease);
}
.am-item:hover, .am-item:focus-visible { background: rgba(29, 28, 26, .055); outline: none; }
.am-item:disabled { color: var(--a-ink-3); pointer-events: none; }
.am-item svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--a-ink-2); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.am-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 2px; padding: 10px 12px 8px; border-top: 1px solid var(--a-rule); font-size: 12px; color: var(--a-ink-3); }
.am-del { border: 0; background: none; padding: 0; font: inherit; color: var(--a-ink-3); cursor: pointer; }
.am-del:hover, .am-del:focus-visible { color: var(--a-bad); outline: none; text-decoration: underline; }
.acct-pop .acct-err { margin: 6px 12px; }
.am-confirm { padding: 14px 12px 10px; }
.am-confirm b { display: block; font-size: 15px; font-weight: 600; }
.am-confirm p { margin: 6px 0 14px; font-size: 13px; line-height: 1.5; color: var(--a-ink-2); }
.am-confirm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.am-confirm-row .acct-k { height: 36px; font-size: 14px; }
@media (max-width: 520px) { .acct-pop:has(.am-who), .acct-pop:has(.am-confirm) { width: auto; } }

/* Signed in: a round picture, last in the header's right-hand group (like Google, GitHub, Vercel). */
.acct-btn.signed-in {
  order: 99; width: 36px; height: 36px; padding: 0 !important; justify-content: center; border-radius: 50%;
  background: none !important; box-shadow: none !important; transition: box-shadow .16s cubic-bezier(.2, .8, .2, 1);
}
.acct-btn.signed-in .acct-av { width: 32px; height: 32px; box-shadow: 0 0 0 1px rgba(29, 28, 26, .10); }
.acct-btn.signed-in:hover, .acct-btn.signed-in[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(29, 28, 26, .10) !important; }
.acct-btn.signed-in:focus-visible { outline: 2px solid #1D1C1A; outline-offset: 2px; }
.acct-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.acct-pop { transform-origin: top right; }

/* ---------- Upgrade button (headers, signed-in free users) ----------
   A small graphite keycap, the same material as Continue. No colour: the light sweeping across on hover
   and the arrow nudging up and out are the only flourish. */
.io-upgrade {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 15px; border: 0; border-radius: 10px; cursor: pointer;
  font: 500 14px "Satoshi", ui-sans-serif, system-ui, sans-serif; letter-spacing: -.005em; color: #F6F4EE; white-space: nowrap;
  background: linear-gradient(#3A3834, #1D1C1A);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 1px 2px rgba(29, 28, 26, .18), 0 4px 10px -2px rgba(29, 28, 26, .22);
  transition: box-shadow .16s cubic-bezier(.2, .8, .2, 1), transform .09s cubic-bezier(.2, .8, .2, 1), filter .16s;
}
.io-upgrade::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%); transform: translateX(-120%); pointer-events: none; }
.io-upgrade svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .75; transition: transform .25s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.io-upgrade:hover { filter: brightness(1.12); }
.io-upgrade:hover::after { transform: translateX(120%); transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.io-upgrade:hover svg { transform: translate(1.5px, -1.5px); opacity: 1; }
.io-upgrade:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -1px 0 rgba(0, 0, 0, .35), 0 1px 1px rgba(29, 28, 26, .2); }
.io-upgrade:focus-visible { outline: 2px solid #1D1C1A; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .io-upgrade::after { display: none; } }
.io-upgrade[hidden] { display: none; }
.am-up { border: 0; background: none; padding: 0; font: inherit; color: #1D1C1A; font-weight: 500; cursor: pointer; }
.am-up:hover { text-decoration: underline; }

/* ---------- the upgrade window ---------- */
.pw-veil {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background: rgba(29, 28, 26, .38); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .2s cubic-bezier(.2, .8, .2, 1);
}
.pw-veil[hidden] { display: none; }
.pw-veil.in { opacity: 1; }
.pw-card {
  position: relative; width: min(460px, 100%); padding: 40px 32px 26px; border-radius: 28px; text-align: center; color: #1D1C1A;
  font: 15px/1.5 "Satoshi", ui-sans-serif, system-ui, sans-serif;
  background: linear-gradient(180deg, #F6F1E9 0%, #FDFDFB 42%);
  box-shadow: 0 2px 4px rgba(60, 48, 30, .06), 0 24px 48px rgba(60, 48, 30, .14), 0 60px 120px rgba(60, 48, 30, .18), 0 0 0 1px rgba(29, 28, 26, .06);
  transform: translateY(12px) scale(.98); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.pw-veil.in .pw-card { transform: none; }
.pw-x { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(29, 28, 26, .05); cursor: pointer; }
.pw-x svg { width: 13px; height: 13px; fill: none; stroke: #5E5B55; stroke-width: 1.6; stroke-linecap: round; }
.pw-x:hover { background: rgba(29, 28, 26, .09); }
.pw-cover { position: relative; width: 64px; aspect-ratio: 240 / 300; margin: 0 auto 22px; transform: rotate(-3deg); }
.pw-tab { position: absolute; right: -5px; top: 9px; width: 10px; height: 30px; border-radius: 0 6px 6px 0; background: var(--fold-2); }
.pw-face { position: absolute; inset: 0; overflow: hidden; border-radius: 4px 7px 7px 4px; background: var(--fold); box-shadow: inset 0 0 0 1px rgba(29, 28, 26, .1), 0 10px 22px -6px rgba(60, 48, 30, .35); }
.pw-face svg { display: block; width: 100%; height: 100%; }
.pw-kicker { margin: 0; font-size: 13.5px; font-weight: 500; color: #97938B; }
.pw-card h2 { margin: 6px auto 0; max-width: 16ch; font: 500 32px/1.08 "Satoshi", ui-sans-serif, system-ui, sans-serif; letter-spacing: -0.045em; color: #232220; text-wrap: balance; }
.pw-sub { margin: 12px auto 0; max-width: 34ch; font-size: 15px; line-height: 1.55; color: #5E5B55; }
.pw-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 28px; }
.pw-opt {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px 14px; border: 0; border-radius: 16px; cursor: pointer;
  font: inherit; color: inherit; background: #FDFDFB; box-shadow: inset 0 0 0 1px rgba(29, 28, 26, .10); transition: box-shadow .15s, background-color .15s;
}
.pw-opt:hover { box-shadow: inset 0 0 0 1px rgba(29, 28, 26, .22); }
.pw-opt.on { box-shadow: inset 0 0 0 2px #1D1C1A; }
.pw-opt-n { font-size: 13px; font-weight: 500; color: #5E5B55; }
.pw-opt b { margin-top: 4px; font: 500 24px/1 "Satoshi", sans-serif; letter-spacing: -0.04em; color: #1D1C1A; font-variant-numeric: tabular-nums; }
.pw-opt small { font-size: 11.5px; line-height: 1.3; color: #97938B; }
.pw-opt em { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 2px 9px; border-radius: 999px; font: 600 11px "Satoshi", sans-serif; font-style: normal; color: #FDFDFB; background: #1D1C1A; white-space: nowrap; }
.pw-go {
  display: block; width: 100%; height: 52px; margin-top: 20px; border: 0; border-radius: 14px; cursor: pointer;
  font: 500 16px "Satoshi", sans-serif; color: #F6F3EC; background: linear-gradient(#3A3936, #262523);
  box-shadow: inset 0 -3px 0 #171614, inset 0 1px 0 rgba(255, 255, 255, .18), 0 2px 6px rgba(0, 0, 0, .18);
}
.pw-go:hover { filter: brightness(1.08); }
.pw-go:active { transform: translateY(2px); }
.pw-fine { margin: 14px 0 0; font-size: 12.5px; color: #97938B; }
@media (max-width: 420px) { .pw-card { padding: 34px 20px 22px; } .pw-opt b { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { .pw-veil, .pw-card { transition: none; } }
