/* Shared styles for every Snipwise page: tokens, base, header, footer, and legal-page layout. */
/* Inter, the page font, is served from this site (see /fonts, license in Inter-OFL.txt): visitors' browsers never contact Google for it. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #09090f;
  --text: #f5f4fb;
  --muted: #a9a4b8;
  --dim: #8b8698;
  --line: rgba(255, 255, 255, 0.08);
  --card: #12121a;
  --grad: linear-gradient(90deg, #a78bfa 0%, #7c6cf6 42%, #3db4f6 100%);
  --header: 86px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
button, a { font-family: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.wrap {
  width: min(1480px, calc(100% - 64px));
  margin: 0 auto;
}

body > header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 4px 0 0;
  background: rgba(9, 9, 15, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.topbar, body > header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
body > header nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-height: 56px;
}
body > header .logo { margin-right: 18px; flex: none; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.mark { width: 28px; height: 28px; }

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: #8e8898;
  font-size: 16px;
  font-weight: 600;
  position: relative;
  transition: color 0.18s ease, filter 0.18s ease, background 0.18s ease;
}
body > header nav .tab:first-child { padding-left: 0; }
.tab svg { width: 16px; height: 16px; }
.tab.is-active { color: #f4f1fb; }
.tab.is-active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #c4b5fd, #38bdf8);
}
.tab.link:hover { color: #ece8f6; }
.tab.cta {
  color: white;
  background: var(--grad);
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(90, 80, 220, 0.28);
  min-width: 168px;
  margin-left: auto;
}
.tab.cta::after { display: none; }
.tab.cta:hover { filter: brightness(1.08); }
.tab:hover { color: #ece8f6; }
.tab.cta:hover { color: white; }

.kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #a78bfa;
}

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 22px 0 28px;
}
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #8d8796;
  font-size: 13px;
}
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { transition: color 0.18s ease; }
.foot a:hover { color: white; }

:focus-visible { outline: 2px solid #a78bfa; outline-offset: 3px; }

/* Legal pages (privacy, terms) */
.legal-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(540px 420px at 16% 18%, rgba(108, 72, 220, 0.28), transparent 70%),
    radial-gradient(520px 460px at 88% 8%, rgba(36, 120, 210, 0.18), transparent 68%),
    var(--bg);
}
.doc {
  position: relative;
  z-index: 1;
  width: min(820px, calc(100% - 64px));
  margin: 0 auto;
  padding: 72px 0 96px;
}
.doc h1 {
  margin: 12px 0 0;
  font-size: clamp(44px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.doc .updated { margin: 16px 0 0; color: #8d8798; font-size: 15px; }
.doc h2 { margin: 40px 0 10px; font-size: 22px; letter-spacing: -0.03em; }
.doc h3 { margin: 24px 0 8px; font-size: 18px; letter-spacing: -0.02em; }
.doc p, .doc li { color: #b7b1c4; font-size: 17px; line-height: 1.7; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc a { color: #c4b5fd; }
.doc a:hover { color: white; }
.doc .note {
  margin: 22px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.07);
  color: #fde68a;
  font-size: 15px;
  line-height: 1.55;
}
footer { position: relative; z-index: 1; }

@media (max-width: 720px) {
  .wrap { width: min(1480px, calc(100% - 28px)); }
  .doc { width: min(820px, calc(100% - 28px)); padding-top: 48px; }
  /* The top bar stays on one line on a phone: the logo, Pricing and Sign in as icons, and the Get Snipwise button.
     (Home is left out because the logo goes home. The words stay in the page for screen readers.) */
  body > header nav { flex-wrap: nowrap; gap: 2px; min-height: 52px; }
  body > header .logo { margin-right: 6px; font-size: 18px; }
  body > header nav .tab:nth-child(2) { display: none; }
  body > header nav .tab:not(.cta) { padding: 0 10px; }
  body > header nav .tab:not(.cta) svg { width: 20px; height: 20px; }
  body > header nav .tab:not(.cta) span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  body > header nav .tab.is-active::after { left: 10px; right: 10px; }
  .tab.cta { min-width: 0; padding: 0 14px; font-size: 14.5px; margin-left: auto; white-space: nowrap; }
  .tab.cta svg { display: none; }
  .foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  body > header .logo { font-size: 16px; gap: 7px; }
  .mark { width: 24px; height: 24px; }
  body > header nav .tab:not(.cta) { padding: 0 8px; }
  .tab.cta { padding: 0 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---- Sign-in and account pages ---- */
.auth-wrap { position: relative; z-index: 1; display: grid; place-items: start center; padding: 56px 16px 96px; }
.auth-card {
  width: min(460px, 100%);
  padding: 34px 30px 30px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(16, 16, 24, 0.9);
  box-shadow: 0 0 80px rgba(80, 50, 180, 0.12);
}
.auth-card { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; }
.auth-card h1 { margin: 0; font-size: 30px; letter-spacing: -0.03em; font-weight: 800; }
.auth-sub { margin: 8px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 22px 0 18px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.auth-tabs button {
  height: 38px; border: 0; border-radius: 9px; background: transparent; color: #b7b1c4; font-size: 15px; font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease;
}
.auth-tabs button.is-on { background: rgba(139, 92, 246, 0.22); color: #fff; }
.auth-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 20px; }
.auth-tabs + .auth-form { margin-top: 0; }
.field-label { display: grid; gap: 6px; color: #d9d4e2; font-size: 14px; font-weight: 600; }
.field-label input[type="email"], .field-label input[type="password"], .field-label input[type="text"] {
  width: 100%; min-width: 0; box-sizing: border-box;
  height: 46px; padding: 0 14px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit; font-size: 16px; font-weight: 500;
}
.field-label input:focus { outline: none; border-color: rgba(167, 139, 250, 0.7); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18); }
.field-label input.code { letter-spacing: 0.5em; text-align: center; font-size: 22px; font-weight: 700; }
.field-hint { color: #8d8798; font-size: 13px; font-weight: 500; }
.check-row { display: flex; gap: 10px; align-items: flex-start; color: #b7b1c4; font-size: 14px; line-height: 1.45; }
.check-row input { margin-top: 3px; accent-color: #8b5cf6; width: 16px; height: 16px; flex: none; }
.check-row a { color: #c4b5fd; text-decoration: underline; }
.auth-form .btn { width: 100%; height: 48px; font-size: 16px; }
.auth-form .btn[disabled], .btn[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.link-btn { border: 0; background: transparent; color: #c4b5fd; font-size: 14px; font-weight: 600; padding: 0; text-align: left; cursor: pointer; }
.link-btn:hover { color: #fff; }
.link-btn[disabled] { opacity: 0.5; cursor: default; }
.link-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: #8d8798; font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.1); }
.alert { margin-top: 16px; padding: 11px 14px; border-radius: 11px; font-size: 14.5px; line-height: 1.45; }
.alert.error { border: 1px solid rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); color: #fecaca; }
.alert.ok { border: 1px solid rgba(94, 234, 212, 0.3); background: rgba(94, 234, 212, 0.07); color: #99f6e4; }
.alert[hidden], [hidden] { display: none !important; }

.account { position: relative; z-index: 1; width: min(860px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 96px; }
.account h1 { margin: 0 0 6px; font-size: clamp(34px, 4vw, 48px); letter-spacing: -0.04em; font-weight: 800; }
.account .email { margin: 0 0 26px; color: var(--muted); font-size: 16px; }
.panel { padding: 24px 24px 22px; margin-bottom: 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(16, 16, 24, 0.9); }
.panel h2 { margin: 0 0 14px; font-size: 14px; letter-spacing: 0.14em; font-weight: 700; color: #a78bfa; text-transform: uppercase; }
.plan-line { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.plan-name { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.badge-pill { padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: rgba(94, 234, 212, 0.14); color: #5eead4; }
.badge-pill.warn { background: rgba(251, 191, 36, 0.14); color: #fde68a; }
.badge-pill.off { background: rgba(255, 255, 255, 0.08); color: #b7b1c4; }
.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.pack { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); text-align: left; color: inherit; font: inherit; cursor: pointer; }
.pack:hover:not(:disabled) { border-color: #8b5cf6; }
.pack:disabled { opacity: 0.6; cursor: default; }
.pack-answers { font-size: 18px; font-weight: 700; }
.pack-price { font-size: 22px; font-weight: 700; }
.pack-was { color: var(--muted); font-size: 14px; text-decoration: line-through; margin-left: 8px; font-weight: 400; }
.pack-badge { align-self: flex-start; margin-top: 6px; padding: 3px 9px; border-radius: 999px; background: rgba(139, 92, 246, 0.18); color: #c4b5fd; font-size: 12.5px; font-weight: 600; }
@media (max-width: 640px) { .pack-grid { grid-template-columns: 1fr; } }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(4, 4, 10, 0.72); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(480px, 100%); padding: 26px 24px 22px; border-radius: 18px; border: 1px solid var(--line); background: #12121c; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6); }
.modal-card h2 { margin: 0 0 12px; font-size: 20px; letter-spacing: 0; text-transform: none; color: #fff; }
.modal-card .field-label { display: block; margin-top: 14px; }
.modal-card .alert { margin-top: 14px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-actions .btn { height: 44px; padding: 0 18px; font-size: 15px; }
@media (max-width: 480px) { .modal-actions .btn { flex: 1 1 100%; } }
.btn.danger { border-color: rgba(248, 113, 113, 0.5); color: #fca5a5; }
.btn.danger:hover:not(:disabled) { border-color: #f87171; background: rgba(248, 113, 113, 0.1); }
.btn.danger:disabled { opacity: 0.5; cursor: not-allowed; }
.upgrade-box { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.upgrade-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.upgrade-actions .btn { height: 44px; font-size: 15px; padding: 0 20px; }
.upgrade-box .alert { margin-top: 12px; }
.plan-detail { margin: 10px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.meter { margin-top: 6px; }
.meter-row { display: flex; justify-content: space-between; gap: 12px; color: #d9d4e2; font-size: 15px; font-weight: 600; }
.meter-bar { height: 10px; margin: 10px 0 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.meter-bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad); width: 0; transition: width 0.4s ease; }
.meter-bar.full span { background: linear-gradient(90deg, #fbbf24, #f87171); }
.meter-note { color: #8d8798; font-size: 13.5px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 12px; }
.actions-row .btn { height: 48px; font-size: 15.5px; padding: 0 22px; }
.plan-message { margin: 14px auto 0; max-width: 560px; text-align: center; }
.account-skeleton { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 16px; }
.account-skeleton[hidden] { display: none; }
.spin-loader { display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.14); border-top-color: #a78bfa; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin-loader { animation-duration: 2s; } }
@media (max-width: 720px) {
  .auth-card { padding: 26px 18px 22px; }
  .panel { padding: 20px 16px; }
}

/* Buttons (shared by every page) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 16.5px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, filter 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn.primary {
  color: white;
  background: var(--grad);
  box-shadow: 0 10px 26px rgba(90, 80, 220, 0.32);
}
.btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost {
  color: #f3f0fa;
  background: rgba(10, 10, 16, 0.4);
  border-color: rgba(255, 255, 255, 0.16);
}
.btn.ghost:hover { border-color: rgba(255, 255, 255, 0.32); }

/* ---- Account page: cards, usage tiles, rows ---- */
.account { width: min(920px, calc(100% - 32px)); }
.acct-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.acct-avatar {
  flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
  box-shadow: 0 8px 24px rgba(90, 80, 220, 0.35);
}
.acct-id h1 { margin: 0; font-size: clamp(30px, 3.6vw, 40px); }
.acct-id .email { margin: 4px 0 0; }
.acct-nav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 18px; scrollbar-width: none; }
.acct-nav::-webkit-scrollbar { display: none; }
.acct-nav a {
  flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: #d9d4e2; font-size: 14px; font-weight: 600; transition: border-color 0.2s ease, background 0.2s ease;
}
.acct-nav a:hover { border-color: rgba(167, 139, 250, 0.55); background: rgba(139, 92, 246, 0.1); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.card { scroll-margin-top: 104px; padding: 26px 26px 24px; margin-bottom: 18px; border-radius: 20px; border: 1px solid var(--line); background: rgba(16, 16, 24, 0.9); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
.card-title { margin: 0 0 18px; font-size: 13px; letter-spacing: 0.14em; font-weight: 700; color: #a78bfa; text-transform: uppercase; }
.card-lead { margin: -8px 0 4px; }
.btn.sm { height: 40px; padding: 0 18px; font-size: 14.5px; }
.btn.ghost.danger { color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); }
.btn.ghost.danger:hover { border-color: rgba(248, 113, 113, 0.7); background: rgba(248, 113, 113, 0.08); }

.plan-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.plan-main { min-width: 0; }
.plan-main .plan-detail { margin-top: 6px; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.callout {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 20px; padding: 16px 18px;
  border-radius: 14px; border: 1px solid rgba(139, 92, 246, 0.35); background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(61, 180, 246, 0.07));
}
.callout-text { flex: 1 1 320px; min-width: 0; }
.callout-text strong { display: block; font-size: 16px; }
.callout-text p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.callout .upgrade-actions { margin-top: 0; }
.card > .alert { margin-top: 14px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat { display: flex; flex-direction: column; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.stat-value { margin-top: 8px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-sub { margin-top: 4px; color: #d9d4e2; font-size: 14px; font-weight: 500; }
.stat .meter-bar { margin: 14px 0 10px; }
.stat-note { margin-top: auto; color: #8d8798; font-size: 13px; line-height: 1.45; }
.credits-meter[hidden], #credits-empty[hidden] { display: none; }
#credits-empty .stat-value { color: #8b8698; }
.models-row { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); color: var(--muted); font-size: 14.5px; }
.models-row:empty { display: none; }

.pack-grid { gap: 14px; margin-top: 18px; }
.pack { gap: 6px; padding: 18px; border-radius: 16px; transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease; }
.pack:hover:not(:disabled) { border-color: #8b5cf6; background: rgba(139, 92, 246, 0.07); transform: translateY(-2px); }
.pack-answers { font-size: 15px; font-weight: 600; color: var(--muted); }
.pack-price { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.pack-cta { margin-top: 12px; padding: 9px 0; border-radius: 999px; text-align: center; font-size: 14px; font-weight: 700; color: #fff; background: var(--grad); }
.pack:disabled .pack-cta { background: rgba(255, 255, 255, 0.1); color: #b7b1c4; }

.rows { display: grid; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.rows > .row, .rows > .row-block { border-top: 1px solid var(--line); }
.rows > :first-child { border-top: 0; padding-top: 0; }
.row-block { padding: 0; }
.row-block > .row { padding: 14px 0; }
.rows > .row-block:first-child > .row { padding-top: 0; }
.row-text { min-width: 0; }
.row > .btn { flex-shrink: 0; white-space: nowrap; }
.row-label { font-size: 15.5px; font-weight: 600; }
.row-value { margin-top: 2px; font-size: 15px; color: #d9d4e2; overflow-wrap: anywhere; }
.row-value.dim { color: var(--muted); font-size: 14px; }
.pw-form { display: grid; gap: 14px; margin: 2px 0 16px; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); }
.pw-form[hidden] { display: none; }
.pw-form .plan-detail { margin: 0; font-size: 14px; }
.pw-form .field-hint { color: var(--dim); font-size: 13px; font-weight: 400; }
.pw-form .alert { margin-top: 0; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.row-block > .alert { margin: 0 0 14px; }
.danger-zone { margin-top: 10px; padding: 4px 18px; border-radius: 14px; border: 1px solid rgba(248, 113, 113, 0.25); background: rgba(248, 113, 113, 0.04); }

@media (max-width: 820px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-note { margin-top: 8px; }
}
@media (max-width: 640px) {
  .card { padding: 20px 16px 18px; border-radius: 16px; }
  .acct-avatar { width: 52px; height: 52px; font-size: 22px; }
  .row { flex-wrap: wrap; }
  .row .btn, .plan-actions .btn, .callout > .btn { width: 100%; }
  .plan-actions { width: 100%; }
  .form-actions .btn { flex: 1 1 140px; }
}

/* ---- Account page: professional refinement (square corners, flat colour, no glow; scoped to the account page and its dialogs) ---- */
body.account-page .legal-bg { background: var(--bg); }
.account { width: min(880px, calc(100% - 32px)); padding-top: 48px; }

.account .acct-head { gap: 16px; padding-bottom: 22px; margin-bottom: 0; border-bottom: 1px solid var(--line); }
.account .acct-avatar { width: 48px; height: 48px; border-radius: 8px; background: #2a2b3a; color: #e8e6f2; font-size: 20px; font-weight: 600; box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.1); }
.account .acct-id h1 { font-size: 24px; font-weight: 650; letter-spacing: -0.015em; }
.account .acct-id .email { margin-top: 2px; font-size: 14.5px; }

/* section menu: underlined tabs instead of pills */
.account .acct-nav { gap: 24px; padding: 0; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.account .acct-nav a { padding: 12px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: -1px; }
.account .acct-nav a:hover { color: var(--text); background: transparent; border-color: rgba(255, 255, 255, 0.28); }

/* cards: flat, thin border, small radius */
.account .card { padding: 24px; margin-bottom: 16px; border-radius: 10px; background: #111118; box-shadow: none; scroll-margin-top: 80px; }
.account .card-title { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: 0.08em; font-weight: 650; color: var(--muted); }
.account .card-lead { margin: 0 0 4px; }

/* plan header */
.account .plan-name { font-size: 24px; font-weight: 650; letter-spacing: -0.015em; }
.account .badge-pill { padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.account .plan-detail { font-size: 15px; }

/* buttons: rectangular with a small radius; solid primary, outlined secondary */
.account .btn, .modal .btn { border-radius: 6px; font-weight: 600; letter-spacing: 0; box-shadow: none; transform: none; }
.account .btn.primary, .modal .btn.primary { background: #6d5ef0; box-shadow: none; }
.account .btn.primary:hover, .modal .btn.primary:hover { background: #7b6cf5; filter: none; transform: none; }
.account .btn.ghost, .modal .btn.ghost { background: transparent; border-color: rgba(255, 255, 255, 0.18); color: #e6e3ef; }
.account .btn.ghost:hover:not(:disabled), .modal .btn.ghost:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.34); background: rgba(255, 255, 255, 0.04); }
.account .btn.ghost.danger, .modal .btn.ghost.danger { color: #f0a3a3; border-color: rgba(248, 113, 113, 0.4); }
.account .btn.ghost.danger:hover:not(:disabled), .modal .btn.ghost.danger:hover:not(:disabled) { border-color: rgba(248, 113, 113, 0.75); background: rgba(248, 113, 113, 0.08); }
.account .btn.sm { height: 36px; padding: 0 16px; font-size: 14px; }

/* upgrade callout: a quiet panel, no gradient */
.account .callout { margin-top: 18px; padding: 14px 16px; border-radius: 8px; border: 1px solid var(--line); border-left: 3px solid #6d5ef0; background: rgba(255, 255, 255, 0.025); }
.account .callout-text strong { font-size: 15px; font-weight: 650; }
.account .callout-text p { font-size: 14px; }

/* usage: three plain panels, thin bars */
.account .stat-grid { gap: 12px; }
.account .stat { padding: 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.02); }
.account .stat-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.account .stat-value { margin-top: 10px; font-size: 28px; font-weight: 650; letter-spacing: -0.02em; }
.account .stat-sub { font-size: 13.5px; color: var(--muted); }
.account .meter-bar { height: 4px; margin: 14px 0 10px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
.account .meter-bar span { background: #6d5ef0; }
.account .meter-bar.full span { background: #d99a2b; }
.account .models-row { border-radius: 6px; background: transparent; border: 1px solid var(--line); font-size: 14px; }

/* answer packs */
.account .pack-grid { gap: 12px; margin-top: 16px; }
.account .pack { padding: 16px; border-radius: 8px; gap: 4px; background: rgba(255, 255, 255, 0.02); transition: border-color 0.15s ease, background 0.15s ease; }
.account .pack:hover:not(:disabled) { transform: none; border-color: rgba(255, 255, 255, 0.34); background: rgba(255, 255, 255, 0.04); }
.account .pack-answers { font-size: 14px; font-weight: 600; }
.account .pack-price { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.account .pack-badge { border-radius: 4px; background: rgba(109, 94, 240, 0.16); color: #c3bcfb; font-size: 12px; font-weight: 600; }
.account .pack-cta { margin-top: 12px; padding: 8px 0; border-radius: 6px; background: #6d5ef0; font-size: 13.5px; font-weight: 600; }
.account .pack:disabled .pack-cta { background: rgba(255, 255, 255, 0.08); color: var(--muted); }

/* account rows */
.account .row-label { font-size: 15px; font-weight: 600; }
.account .row-value { font-size: 14.5px; }
.account .pw-form { padding: 16px; border-radius: 8px; }
.account .danger-zone { border-radius: 8px; border-color: rgba(248, 113, 113, 0.28); background: transparent; }
.account .field-label input[type="text"], .account .field-label input[type="password"], .account .field-label input[type="email"],
.modal .field-label input[type="text"], .modal .field-label input[type="password"] { height: 42px; border-radius: 6px; font-size: 15px; }
.account .alert, .modal .alert { border-radius: 6px; }

/* loading and dialogs */
.account .spin-loader { border-width: 2px; }
.modal-card { border-radius: 10px; background: #111118; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55); }
.modal-card h2 { font-size: 18px; font-weight: 650; }

@media (max-width: 640px) {
  .account { padding-top: 32px; }
  .account .card { padding: 18px 16px; border-radius: 8px; }
  .account .acct-nav { gap: 18px; }
}

/* ---- Account page: appearance setting and light theme (the theme is set on <html data-theme> by theme.js) ---- */
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

.seg { display: inline-flex; flex: none; padding: 2px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.16); }
.seg-btn { height: 30px; padding: 0 14px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] { background: #6d5ef0; color: #fff; }

html[data-theme="light"] {
  --bg: #f4f5f8;
  --text: #14161c;
  --muted: #565b6b;
  --dim: #6f7585;
  --line: rgba(20, 22, 28, 0.13);
}
html[data-theme="light"] body.account-page > header { background: rgba(244, 245, 248, 0.88); border-bottom-color: var(--line); }
html[data-theme="light"] body.account-page .logo { color: var(--text); }
html[data-theme="light"] body.account-page .tab { color: #565b6b; }
html[data-theme="light"] body.account-page .tab:hover,
html[data-theme="light"] body.account-page .tab.is-active { color: #14161c; }
html[data-theme="light"] body.account-page .tab.cta,
html[data-theme="light"] body.account-page .tab.cta:hover { color: #fff; }
html[data-theme="light"] body.account-page .foot { color: #565b6b; }
html[data-theme="light"] body.account-page .foot a:hover { color: #14161c; }
html[data-theme="light"] body.account-page footer { border-top-color: var(--line); }

html[data-theme="light"] .account .acct-avatar { background: #e6e8ee; color: #2a2d38; border-color: rgba(20, 22, 28, 0.12); }
html[data-theme="light"] .account .card,
html[data-theme="light"] .modal-card { background: #fff; }
html[data-theme="light"] .modal-card { box-shadow: 0 16px 48px rgba(20, 22, 28, 0.2); }
html[data-theme="light"] .modal-card h2 { color: var(--text); }
html[data-theme="light"] .modal-backdrop { background: rgba(20, 22, 28, 0.45); }
html[data-theme="light"] .account .acct-nav a:hover { border-color: rgba(20, 22, 28, 0.3); }
html[data-theme="light"] .account .stat,
html[data-theme="light"] .account .pack,
html[data-theme="light"] .account .pw-form { background: rgba(20, 22, 28, 0.025); }
html[data-theme="light"] .account .pack:hover:not(:disabled) { border-color: rgba(20, 22, 28, 0.35); background: rgba(20, 22, 28, 0.045); }
html[data-theme="light"] .account .callout { background: rgba(91, 78, 224, 0.05); border-color: var(--line); border-left-color: #5b4ee0; }
html[data-theme="light"] .account .meter-bar { background: rgba(20, 22, 28, 0.1); }
html[data-theme="light"] .account .meter-bar span { background: #5b4ee0; }
html[data-theme="light"] .account .meter-bar.full span { background: #c47f0e; }
html[data-theme="light"] .stat-note, html[data-theme="light"] .meter-note, html[data-theme="light"] .field-hint { color: var(--dim); }
html[data-theme="light"] .row-value { color: #2a2d38; }
html[data-theme="light"] .row-value.dim { color: var(--muted); }
html[data-theme="light"] .field-label, html[data-theme="light"] .meter-row { color: #2a2d38; }
html[data-theme="light"] .field-label input[type="email"],
html[data-theme="light"] .field-label input[type="password"],
html[data-theme="light"] .field-label input[type="text"] { background: #fff; border-color: rgba(20, 22, 28, 0.25); color: var(--text); }
html[data-theme="light"] .field-label input:focus { border-color: #5b4ee0; box-shadow: 0 0 0 3px rgba(91, 78, 224, 0.18); }

html[data-theme="light"] .account .btn.primary,
html[data-theme="light"] .modal .btn.primary,
html[data-theme="light"] .account .pack-cta,
html[data-theme="light"] .seg-btn[aria-pressed="true"] { background: #5b4ee0; color: #fff; }
html[data-theme="light"] .account .btn.primary:hover,
html[data-theme="light"] .modal .btn.primary:hover { background: #4a3ec8; }
html[data-theme="light"] .account .btn.ghost,
html[data-theme="light"] .modal .btn.ghost { color: var(--text); border-color: rgba(20, 22, 28, 0.28); }
html[data-theme="light"] .account .btn.ghost:hover:not(:disabled),
html[data-theme="light"] .modal .btn.ghost:hover:not(:disabled) { border-color: rgba(20, 22, 28, 0.5); background: rgba(20, 22, 28, 0.04); }
html[data-theme="light"] .account .btn.ghost.danger,
html[data-theme="light"] .modal .btn.ghost.danger { color: #b42323; border-color: rgba(180, 35, 35, 0.45); }
html[data-theme="light"] .account .btn.ghost.danger:hover:not(:disabled),
html[data-theme="light"] .modal .btn.ghost.danger:hover:not(:disabled) { border-color: #b42323; background: rgba(180, 35, 35, 0.07); }
html[data-theme="light"] .account .pack:disabled .pack-cta { background: rgba(20, 22, 28, 0.08); color: var(--muted); }
html[data-theme="light"] .account .pack-badge { background: rgba(91, 78, 224, 0.12); color: #4a3ec8; }
html[data-theme="light"] .seg { border-color: rgba(20, 22, 28, 0.25); }
html[data-theme="light"] .link-btn, html[data-theme="light"] .check-row a { color: #4a3ec8; }

html[data-theme="light"] .account .badge-pill { background: #dff3ea; color: #0f6247; }
html[data-theme="light"] .account .badge-pill.warn { background: #fbf0d2; color: #7a5200; }
html[data-theme="light"] .account .badge-pill.off { background: #eceef3; color: #4a4f5c; }
html[data-theme="light"] .alert.error { border-color: rgba(190, 40, 40, 0.4); background: #fdeeee; color: #8a1c1c; }
html[data-theme="light"] .alert.ok { border-color: rgba(15, 98, 71, 0.35); background: #e8f6f0; color: #0d5a42; }
html[data-theme="light"] .account .danger-zone { border-color: rgba(180, 35, 35, 0.3); }
html[data-theme="light"] .spin-loader { border-color: rgba(20, 22, 28, 0.15); border-top-color: #5b4ee0; }
html[data-theme="light"] :focus-visible { outline-color: #5b4ee0; }
html[data-theme="light"] .mark path[fill="#fff"] { fill: #5b4ee0; }
html[data-theme="light"] .mark path[fill="#bfdbfe"] { fill: #8aa0d8; }

/* ---- The soft theme, shared by EVERY page (it started as the previews/ experiment: Soft corners, Gradient buttons, Custom layout).
   Small corners that come from two tokens, compact tabs and buttons, transparent panels, and the gradient, glow and hover motion. ---- */
:root { --r: 8px; --r-sm: 6px; --btn-bg: var(--grad); --panel: rgba(255, 255, 255, 0.025); --panel-hi: rgba(255, 255, 255, 0.05); }

/* top bar: small rounded tabs with a light hover highlight, the gradient underline under the current one, a glowing call to action */
body > header { border-bottom-color: rgba(255, 255, 255, 0.08); }
body > header nav .tab:first-child { padding-left: 12px; }
html .tab { height: 36px; padding: 0 12px; border-radius: var(--r-sm); }
html .tab:not(.cta):hover, html .tab.is-active { background: var(--panel-hi); }
html[data-theme="light"] body.account-page .tab:not(.cta):hover { background: rgba(20, 22, 28, 0.06); }
html .tab.is-active::after { left: 12px; right: 12px; bottom: 2px; }
html .tab.cta { min-width: 0; padding: 0 16px; background: var(--btn-bg); border-radius: var(--r-sm); box-shadow: 0 10px 26px rgba(90, 80, 220, 0.28); }
html .tab.cta:hover { filter: brightness(1.08); }

/* buttons: compact with soft corners; the gradient, the glow and the hover motion stay */
html .btn { height: 42px; padding: 0 18px; border-radius: var(--r-sm); }
html .btn.primary { background: var(--btn-bg); }
kbd { border-radius: 4px; }

@media (max-width: 720px) { html .tab.cta { padding: 0 14px; } }
@media (max-width: 380px) { html .tab.cta { padding: 0 10px; } }

/* sign-in: a transparent panel, soft inputs, the sliding choice in gradient */
.auth-card { border-radius: var(--r); background: var(--panel); box-shadow: none; }
.auth-tabs { border-radius: var(--r-sm); }
.auth-tabs button { border-radius: calc(var(--r-sm) - 2px); }
.auth-tabs button.is-on { background: var(--btn-bg); box-shadow: 0 6px 18px rgba(90, 80, 220, 0.3); }

/* sign-in motion: the chosen option is a pill that slides across, each view's fields rise in one after another, and a working button shows a spinner */
.auth-tabs { position: relative; }
.auth-tabs button { position: relative; z-index: 1; }
.auth-tabs button.is-on { background: transparent; box-shadow: none; }
.auth-tabs::before {
  content: ''; position: absolute; left: 0; top: 0; width: var(--ind-w, 0px); height: var(--ind-h, 0px); pointer-events: none; opacity: var(--ind-o, 0);
  transform: translate(var(--ind-x, 0px), var(--ind-y, 0px)); border-radius: calc(var(--r-sm) - 2px); background: var(--btn-bg); box-shadow: 0 6px 18px rgba(90, 80, 220, 0.3);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.auth-tabs.no-anim::before { transition: none; }
@keyframes auth-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.view-in .auth-form > *, .auth-card .swap-in { animation: auth-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
.view-in .auth-form > :nth-child(2) { --i: 1; } .view-in .auth-form > :nth-child(3) { --i: 2; } .view-in .auth-form > :nth-child(4) { --i: 3; } .view-in .auth-form > :nth-child(5) { --i: 4; }
.auth-card .swap-in { --i: 0; animation-duration: 0.35s; }
.btn[aria-busy="true"]::before { content: ''; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 700ms linear infinite; }
.auth-form .btn[aria-busy="true"], #social .btn[aria-busy="true"] { opacity: 0.85; }
/* the Google mark next to "Continue with Google" (the spinner takes its place while the browser is sent to Google) */
.btn .g-icon { width: 20px; height: 20px; flex: none; margin-right: 2px; }
.btn[aria-busy="true"] .g-icon { display: none; }
@media (prefers-reduced-motion: reduce) {
  .auth-tabs::before { transition: none; }
  .view-in .auth-form > *, .auth-card .swap-in { animation: none; }
  .btn[aria-busy="true"]::before { animation-duration: 2s; }
}
.field-label input[type="email"], .field-label input[type="password"], .field-label input[type="text"] { border-radius: var(--r-sm); }
.alert { border-radius: var(--r-sm); }

/* the notes in the Terms and the Privacy Policy */
.doc .note { border-radius: var(--r); }

/* ---- Account page: the soft look, in the parts that are specific to it ---- */

/* buttons: gradient with a glow, lifting a little on hover */
.account .btn, .modal .btn { transition: transform 0.2s ease, filter 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
html:is([data-theme], :root) .account .btn.primary,
html:is([data-theme], :root) .modal .btn.primary,
html:is([data-theme], :root) .account .pack:not(:disabled) .pack-cta { background: var(--grad); box-shadow: 0 10px 26px rgba(90, 80, 220, 0.32); }
html:is([data-theme], :root) .account .btn.primary:hover:not(:disabled),
html:is([data-theme], :root) .modal .btn.primary:hover:not(:disabled) { background: var(--grad); filter: brightness(1.08); transform: translateY(-1px); }
html:is([data-theme], :root) .account .btn.primary:disabled,
html:is([data-theme], :root) .modal .btn.primary:disabled { box-shadow: none; }
html:not([data-theme="light"]) .account .btn.ghost,
html:not([data-theme="light"]) .modal .btn.ghost { background: rgba(10, 10, 16, 0.4); border-color: rgba(255, 255, 255, 0.16); }
html:not([data-theme="light"]) .account .btn.ghost:hover:not(:disabled),
html:not([data-theme="light"]) .modal .btn.ghost:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.32); }
html:not([data-theme="light"]) .account .btn.ghost.danger,
html:not([data-theme="light"]) .modal .btn.ghost.danger { background: transparent; }

/* panels: transparent, soft corners; extra-credit packs lift with the violet edge like the home page cards */
html:not([data-theme="light"]) .account .card { background: rgba(255, 255, 255, 0.025); border-radius: 8px; }
.account .pack { transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
html:not([data-theme="light"]) .account .pack:hover:not(:disabled) { transform: translateY(-3px); border-color: rgba(167, 139, 250, 0.32); background: rgba(255, 255, 255, 0.04); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28); }

/* gradient fills: the usage bars and the chosen option of the Appearance switch */
html:not([data-theme="light"]) .account .meter-bar span { background: var(--grad); }
html:not([data-theme="light"]) .account .meter-bar.full span { background: #d99a2b; }
html:is([data-theme], :root) .seg-btn[aria-pressed="true"] { background: var(--grad); box-shadow: 0 4px 12px rgba(90, 80, 220, 0.3); }

/* the left edge of the upgrade panel ("Get more with Plus"): a gradient line, laid over the panel's own 3 px edge */
.account .callout { position: relative; }
.account .callout::before { content: ''; position: absolute; left: -3px; top: -1px; bottom: -1px; width: 3px; border-radius: 8px 0 0 8px; background: linear-gradient(180deg, #a78bfa 0%, #7c6cf6 45%, #3db4f6 100%); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .account .btn, .modal .btn, .account .pack { transition: none; } .account .btn.primary:hover, .account .pack:hover { transform: none !important; } }

.captcha-box:not(:empty) { margin-top: 16px; display: flex; justify-content: center; }

/* Pre-launch notice at the top of every page. */
.launch-bar {
  position: relative;
  z-index: 30;
  padding: 10px 16px;
  background: #f5c542;
  color: #1a1400;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}
