/* Vortex Editor website. Fonts are served from this site (no font CDN). */
@font-face { font-family: "Inter"; src: url("/fonts/Inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* Colour tokens. Every text/background pair is checked by `npm run contrast` (WCAG AA, 4.5:1 for
   text, 3:1 for input borders and focus rings). Change a colour here, then run the check. */
:root {
  --bg: #0b0814;
  --bg-glow: #1d1233;        /* the brightest point of the background glow (worst case for contrast) */
  --surface: #151022;
  --card: #1a1329;
  --card-hi: #231938;
  --line: #34284f;           /* decorative dividers only */
  --field-border: #8f7bbd;   /* input borders: 3:1 against the card */
  --text: #f4f0ff;
  --muted: #c9bedf;
  --accent: #c4a1ff;         /* links and highlights on dark surfaces */
  --accent-hot: #e879f9;     /* small neon highlights */
  --btn: #7b3fe4;            /* primary button background (white text) */
  --btn-hover: #6a2fd6;
  --btn-2: #2a1f44;          /* secondary button background (light text) */
  --btn-2-hover: #352757;
  --on-btn: #ffffff;
  --focus: #ffd166;
  --ok: #86efac;
  --warn: #ffd166;
  --danger: #ff9b9b;
  --danger-btn: #b3261e;
  --chip: #2c1f4a;
  --chip-text: #e6dbff;
  --code-bg: #120c1f;
  --placeholder-bg: #3d2f00;
  --placeholder-text: #ffe08a;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 400 16px/1.6 var(--font); color: var(--text); background-color: var(--bg);
  background-image:
    radial-gradient(60rem 30rem at 85% -10%, rgba(124, 58, 237, .22), transparent 60%),
    radial-gradient(40rem 24rem at -10% 20%, rgba(217, 70, 239, .10), transparent 60%);
  background-attachment: fixed;
}
main { flex: 1; width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--code-bg); color: var(--chip-text); padding: .1em .35em; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--btn); color: var(--on-btn); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 8px; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(11, 8, 20, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; margin-right: auto; }
.brand img { width: 40px; height: 40px; }
.brand span b { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--btn-2); color: var(--text); }
.nav .btn { margin-left: 6px; }
.menu { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; cursor: pointer; padding: 8px 14px; border: 1px solid var(--field-border); border-radius: 10px; font-weight: 700; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] .nav { display: flex; flex-direction: column; align-items: stretch; position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 20px 40px rgba(0,0,0,.5); }
  .menu[open] .nav .btn { margin: 6px 0 0; }
}

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent; font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--btn); color: var(--on-btn); box-shadow: 0 0 0 1px rgba(196,161,255,.35), 0 8px 28px rgba(123, 63, 228, .45); }
.btn-primary:hover { background: var(--btn-hover); color: var(--on-btn); }
.btn-secondary { background: var(--btn-2); color: var(--text); border-color: var(--field-border); }
.btn-secondary:hover { background: var(--btn-2-hover); color: var(--text); }
.btn-danger { background: var(--danger-btn); color: var(--on-btn); }
.btn-danger:hover { color: var(--on-btn); filter: brightness(1.1); }
.btn-lg { min-height: 54px; padding: 14px 24px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; min-height: 0; }

/* ---- Hero ---- */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero h1 .glow { color: var(--accent); text-shadow: 0 0 24px rgba(196, 161, 255, .55); }
.hero .lead { font-size: 1.18rem; color: var(--muted); max-width: 36rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 12px; }
.hero-emblem { filter: drop-shadow(0 0 40px rgba(155, 92, 255, .45)); justify-self: center; width: min(100%, 440px); }
.eyebrow { display: inline-block; font: 700 .78rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero-emblem { order: -1; width: min(70%, 300px); } .hero { padding-top: 28px; } }

/* ---- Sections, cards ---- */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-neon { position: relative; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, #9b5cff, #e879f9 55%, #4f46e5) border-box; border: 1px solid transparent; box-shadow: 0 0 32px rgba(155, 92, 255, .18); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.feature .icon { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--chip); color: var(--chip-text); font-size: .88rem; font-weight: 700; }
.version { font-family: var(--mono); font-weight: 400; background: var(--chip); color: var(--chip-text); padding: 2px 10px; border-radius: 8px; font-size: .9rem; }

/* ---- Downloads ---- */
.dl-card h2 { display: flex; align-items: center; gap: 10px; }
.dl-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 14px 0 18px; font-size: .95rem; }
.dl-meta dt { color: var(--muted); }
.dl-meta dd { margin: 0; overflow-wrap: anywhere; }
.steps { padding-left: 1.3em; }
.steps li { margin-bottom: .5em; }
.notice { border-left: 4px solid var(--warn); background: var(--surface); padding: 12px 16px; border-radius: 0 10px 10px 0; }

/* ---- Updates ---- */
.post-list { display: grid; gap: 16px; }
.post-card a.title { color: var(--text); text-decoration: none; }
.post-card a.title:hover { text-decoration: underline; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: .92rem; margin-bottom: 10px; }
.post-section { margin: 28px 0; }
.post-section h2 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.post-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.post-items li { background: var(--card); border: 1px solid var(--line); border-left: 3px solid #9b5cff; border-radius: 10px; padding: 12px 16px; white-space: pre-line; }
.discord-status { font-size: .9rem; }
.status-ok { color: var(--ok); }
.status-bad { color: var(--danger); }

/* Admin preview of the Discord message (an original mock-up, not Discord's own styling) */
.embed { border-left: 4px solid #9b5cff; background: var(--code-bg); border-radius: 8px; padding: 14px 16px; max-width: 560px; }
.embed .e-title { font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.embed .e-field { margin-top: 10px; }
.embed .e-name { font-weight: 700; }
.embed .e-value { white-space: pre-line; color: var(--muted); font-size: .94rem; }
.embed .e-foot { margin-top: 12px; font-size: .82rem; color: var(--muted); }

/* ---- Forms / auth ---- */
.auth { display: grid; place-items: center; padding: 40px 16px 64px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card .emblem { display: block; width: 96px; margin: 0 auto 8px; filter: drop-shadow(0 0 18px rgba(155, 92, 255, .5)); }
.auth-card h1 { font-size: 1.7rem; text-align: center; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin: 18px 0 22px; }
.tabs a { text-align: center; padding: 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.tabs a[aria-current="page"] { background: var(--btn); color: var(--on-btn); }
.field { margin-bottom: 16px; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 6px; }
.field .hint { display: block; color: var(--muted); font-size: .88rem; margin-top: 4px; }
.field .error { display: block; color: var(--danger); font-size: .92rem; margin-top: 6px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 16px; }
input[type=email], input[type=password], input[type=text], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--field-border);
  background: var(--surface); color: var(--text); font: inherit;
}
textarea { min-height: 280px; font-family: var(--mono); font-size: .92rem; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.dob { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 8px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; min-height: 34px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--field-border); background: var(--btn-2); color: var(--text); font: 700 .85rem var(--font); cursor: pointer; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: #9b5cff; flex: none; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.btn-google { background: #ffffff; color: #1f1f1f; border-color: #747775; }
.btn-google:hover { background: #f2f2f2; color: #1f1f1f; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; }
.alert-ok { border-color: var(--ok); color: var(--ok); background: #0f2418; }
.alert-bad { border-color: var(--danger); color: var(--danger); background: #2a1215; }
.alert-info { border-color: var(--accent); color: var(--text); background: var(--surface); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---- Legal pages ---- */
.legal h2 { margin-top: 1.8em; }
.legal h3 { margin-top: 1.4em; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: .95rem; }
.legal th, .legal td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--text); background: var(--surface); }
.table-scroll { overflow-x: auto; }
.placeholder { background: var(--placeholder-bg); color: var(--placeholder-text); padding: 0 .3em; border-radius: 4px; font-weight: 700; }
.toc { columns: 2 220px; padding-left: 1.2em; }

/* ---- Cookie banner ---- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 760px; margin: 0 auto; }
.consent .card { display: grid; grid-template-columns: 1fr auto; gap: 14px 20px; align-items: center; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.consent h2 { font-size: 1.05rem; margin: 0 0 4px; }
.consent p { margin: 0; font-size: .95rem; color: var(--muted); }
/* Both choices use the same class and size, so "Essential only" is as easy to pick as "Accept all". */
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-choice { background: var(--btn-2); color: var(--text); border-color: var(--field-border); min-width: 150px; }
.btn-choice:hover { background: var(--btn-2-hover); color: var(--text); }
@media (max-width: 640px) { .consent .card { grid-template-columns: 1fr; } .btn-choice { min-width: 0; } }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 48px; padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); font-size: .93rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 24px; }
.site-footer h2 { font-size: .95rem; margin-bottom: .6em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .btn-link { color: var(--muted); }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.warn-list li { color: var(--warn); }
.inline-form { display: inline; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color .15s ease, filter .15s ease; }
}
.h3 { font-size: 1.2rem; }
.install-head { margin-top: 22px; font-size: 1rem; }
/* Update image card */
.card-canvas, .update-card { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 14px; border: 1px solid var(--line); background: var(--code-bg); }
.update-card { margin: 8px 0 24px; box-shadow: 0 0 40px rgba(155, 92, 255, .2); }
.field .label { display: block; font-weight: 700; margin-bottom: 6px; }

/* ---- Motion ----
   Everything below only runs when the visitor hasn't asked their system for reduced motion,
   and every element is fully visible without animation or JavaScript. */
.start-link { font-weight: 700; }
.tool-card { color: var(--text); text-decoration: none; transition: border-color .2s ease; }
.tool-card:hover { border-color: #9b5cff; color: var(--text); }
.tool-card .icon { font-size: 1.8rem; display: block; margin-bottom: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .anim-words .w { display: inline-block; animation: word-in .75s cubic-bezier(.2, .75, .2, 1) both; }
  .anim-words .w:nth-child(1) { animation-delay: .05s; } .anim-words .w:nth-child(2) { animation-delay: .13s; }
  .anim-words .w:nth-child(3) { animation-delay: .21s; } .anim-words .w:nth-child(4) { animation-delay: .29s; }
  .anim-words .w:nth-child(5) { animation-delay: .37s; } .anim-words .w:nth-child(6) { animation-delay: .45s; }
  .anim-words .w:nth-child(7) { animation-delay: .53s; } .anim-words .w:nth-child(8) { animation-delay: .61s; }
  .anim-words .w.glow { animation: word-in .75s cubic-bezier(.2, .75, .2, 1) .29s both, glow-pulse 3.2s ease-in-out 1.2s infinite; }
  @keyframes word-in { from { opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
  @keyframes glow-pulse { 0%, 100% { text-shadow: 0 0 18px rgba(196, 161, 255, .45); } 50% { text-shadow: 0 0 34px rgba(232, 121, 249, .85), 0 0 4px rgba(255, 255, 255, .6); } }
  .fade-up { animation: fade-up .8s cubic-bezier(.2, .75, .2, 1) both; }
  .fade-up.d2 { animation-delay: .55s; } .fade-up.d3 { animation-delay: .7s; } .fade-up.d4 { animation-delay: .85s; }
  @keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .hero-emblem { animation: emblem-in 1.1s cubic-bezier(.2, .75, .2, 1) both, float 7s ease-in-out 1.1s infinite; }
  @keyframes emblem-in { from { opacity: 0; transform: scale(.9) rotate(-4deg); filter: drop-shadow(0 0 0 rgba(155, 92, 255, 0)) blur(6px); } to { opacity: 1; transform: none; } }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
  .eyebrow.fade-up { animation: track-in 1s cubic-bezier(.2, .75, .2, 1) both; }
  @keyframes track-in { from { opacity: 0; letter-spacing: .45em; } to { opacity: 1; letter-spacing: .14em; } }
  /* scroll reveal: site.js adds .reveal-armed (only below the fold) and then .in */
  .reveal.reveal-armed { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .75, .2, 1); }
  .reveal.reveal-armed.in { opacity: 1; transform: none; }
  .reveal.in .card { animation: fade-up .6s ease both; }
  .reveal.in .card:nth-child(2) { animation-delay: .08s; } .reveal.in .card:nth-child(3) { animation-delay: .16s; }
  .reveal.in .card:nth-child(4) { animation-delay: .24s; } .reveal.in .card:nth-child(5) { animation-delay: .32s; }
  .reveal.in .card:nth-child(6) { animation-delay: .4s; }
  .card-neon { background-size: 100% 100%, 200% 200%; animation: border-flow 8s linear infinite; }
  @keyframes border-flow { 0% { background-position: 0 0, 0% 50%; } 50% { background-position: 0 0, 100% 50%; } 100% { background-position: 0 0, 0% 50%; } }
  .btn-primary:hover { box-shadow: 0 0 0 1px rgba(196, 161, 255, .5), 0 10px 34px rgba(123, 63, 228, .65); }
}

/* ---- Get started tour ---- */
.onboard { padding-top: 32px; text-align: center; }
.onboard-progress { display: flex; justify-content: center; gap: 8px; margin-bottom: 26px; }
.onboard-progress span { width: 54px; height: 6px; border-radius: 6px; background: var(--line); }
.onboard-progress span.on { background: linear-gradient(90deg, #9b5cff, #e879f9); box-shadow: 0 0 12px rgba(232, 121, 249, .5); }
.onboard-count { font: 700 .8rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.onboard-title { font-size: clamp(1.8rem, 4.5vw, 2.8rem); margin-bottom: .25em; outline: none; }
.onboard-sub { margin-bottom: 26px; }
.onboard-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); text-align: left; max-width: 900px; margin: 0 auto; }
.onboard-card { display: flex; flex-direction: column; gap: 6px; color: var(--text); text-decoration: none; min-height: 170px; position: relative; overflow: hidden; }
.onboard-card:hover { border-color: #9b5cff; color: var(--text); }
.onboard-card::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 220px; height: 220px; background: radial-gradient(circle, rgba(155, 92, 255, .25), transparent 70%); pointer-events: none; }
.onboard-icon { font-size: 2rem; }
.onboard-tag { font: 700 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-top: auto; }
.onboard-card-title { font-size: 1.2rem; font-weight: 700; }
.onboard-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 820px; margin: 0 auto; }
.chip-btn { min-height: 48px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--field-border); background: var(--btn-2); color: var(--text); font: 700 1rem var(--font); cursor: pointer; }
.chip-btn:hover { background: var(--btn-2-hover); }
.chip-btn[aria-pressed="true"] { background: var(--btn); color: var(--on-btn); border-color: #c4a1ff; box-shadow: 0 0 18px rgba(155, 92, 255, .5); }
.onboard-back { display: block; margin: 0 0 18px; }
.onboard-actions { margin-top: 26px; }
.onboard-skip { margin-top: 30px; }
.onboard-tip { margin-top: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .onboard-step:not([hidden]) { animation: fade-up .5s cubic-bezier(.2, .75, .2, 1) both; }
  .onboard-step:not([hidden]) .onboard-card, .onboard-step:not([hidden]) .chip-btn { animation: fade-up .5s ease both; }
  .onboard-step:not([hidden]) .onboard-card:nth-child(2), .onboard-step:not([hidden]) .chip-btn:nth-child(2) { animation-delay: .06s; }
  .onboard-step:not([hidden]) .onboard-card:nth-child(3), .onboard-step:not([hidden]) .chip-btn:nth-child(3) { animation-delay: .12s; }
  .onboard-step:not([hidden]) .onboard-card:nth-child(4), .onboard-step:not([hidden]) .chip-btn:nth-child(4) { animation-delay: .18s; }
  .onboard-step:not([hidden]) .chip-btn:nth-child(n+5) { animation-delay: .24s; }
  .onboard-progress span { transition: background .3s ease; }
}

/* ---- Tools ---- */
.credit-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 20px; }
.tools-grid .tool-card .pill { align-self: flex-start; margin-top: 8px; }
.tools-grid .tool-card { display: flex; flex-direction: column; }
.tool-form { display: grid; gap: 14px; }
.drop { display: grid; justify-items: center; gap: 6px; padding: 34px 16px; border: 2px dashed var(--field-border); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: center; }
.drop:hover, .drop.over { border-color: #e879f9; background: var(--card-hi); }
.drop input[type=file] { width: 100%; max-width: 320px; color: var(--muted); }
.drop:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.drop-icon { font-size: 2rem; }
.drop-title { font-weight: 700; }
.tool-preview { max-height: 320px; width: auto; margin: 0 auto; border-radius: 10px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--field-border); border-radius: 12px; background: var(--surface); cursor: pointer; }
.choice:has(input:checked) { border-color: #c4a1ff; background: var(--card-hi); box-shadow: 0 0 14px rgba(155, 92, 255, .35); }
.choice input { accent-color: #9b5cff; width: 18px; height: 18px; }
.tool-results { margin-top: 28px; }
.result-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.result-card { margin: 0; display: grid; gap: 10px; }
.result-card figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.checker { border-radius: 10px; overflow: hidden; background-color: #2a2238; background-image: linear-gradient(45deg, #3a3050 25%, transparent 25%), linear-gradient(-45deg, #3a3050 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #3a3050 75%), linear-gradient(-45deg, transparent 75%, #3a3050 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.checker img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; }
.result-zip { font-size: 3rem; text-align: center; padding: 30px 0; background: var(--surface); border-radius: 10px; }

/* ---- Asset library ---- */
.library-hero { text-align: center; padding: 36px 20px; margin-bottom: 18px; }
.library-hero h1 { margin-bottom: .3em; }
.search-row { display: flex; gap: 10px; max-width: 620px; margin: 18px auto 0; }
.search-row input { flex: 1; min-width: 0; min-height: 50px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--field-border); background: var(--surface); color: var(--text); font: inherit; }
.tab-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.tab-chip { flex: none; display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--field-border); background: var(--btn-2); color: var(--text); text-decoration: none; font-weight: 700; font-size: .92rem; }
.tab-chip:hover { background: var(--btn-2-hover); color: var(--text); }
.tab-chip[aria-current="page"] { background: var(--btn); color: var(--on-btn); border-color: #c4a1ff; }
.library-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 20px; }
.library-tools a[aria-current] { font-weight: 700; color: var(--text); }
.asset-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.asset-card { display: grid; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.asset-card:hover { border-color: #9b5cff; color: var(--text); }
.asset-thumb { aspect-ratio: 16 / 10; background: var(--code-bg); display: grid; place-items: center; overflow: hidden; }
.asset-thumb img, .asset-thumb video { width: 100%; height: 100%; object-fit: cover; }
.asset-meta { display: grid; gap: 2px; padding: 12px 14px; }
.asset-title { font-weight: 700; }
.asset-audio { display: grid; gap: 8px; justify-items: center; width: 100%; padding: 10px; font-size: 2rem; }
.asset-audio audio { width: 100%; }
.asset-file { display: grid; justify-items: center; gap: 4px; font-size: 2.4rem; }
.asset-file span:last-child { font: 700 .9rem var(--mono); color: var(--muted); }
.asset-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.asset-stage { display: grid; place-items: center; min-height: 320px; padding: 12px; }
.asset-stage img, .asset-stage video { max-width: 100%; max-height: 70vh; border-radius: 10px; }
.asset-stage .asset-audio { font-size: 3rem; }
.asset-actions { margin-top: 12px; }
.report { margin-top: 18px; }
.report summary { cursor: pointer; color: var(--accent); }
textarea.short { min-height: 90px; font-family: var(--font); }
.empty { text-align: center; padding: 40px 16px; }
.upload-progress { width: 100%; height: 10px; accent-color: #9b5cff; }
.mod-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mod-card .asset-thumb { border-radius: 10px; margin-bottom: 10px; }
.inline-reject { display: flex; gap: 6px; flex-wrap: wrap; }
.inline-reject input { flex: 1; min-width: 140px; min-height: 44px; }
.narrow-input { max-width: 110px; }
@media (max-width: 860px) { .asset-layout { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) {
  .asset-card:hover { transform: translateY(-3px); }
  .asset-grid .asset-card { animation: fade-up .5s ease both; }
}

/* ---- Vortex Pro ---- */
.pro-hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 24px; align-items: center; margin-bottom: 18px; }
.pro-emblem { width: min(100%, 300px); justify-self: center; filter: drop-shadow(0 0 36px rgba(232, 121, 249, .45)); }
.free-promise { display: block; margin-top: 10px; color: var(--text); }
.perk-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 10px 0 26px; }
.perk-icon { font-size: 1.7rem; display: block; margin-bottom: 6px; }
.pro-plans { display: grid; gap: 16px; }
.plan-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.plan { position: relative; display: grid; gap: 6px; padding: 18px; border-radius: 16px; border: 2px solid var(--field-border); background: var(--surface); cursor: pointer; }
.plan input { position: absolute; top: 16px; right: 16px; width: 22px; height: 22px; accent-color: #9b5cff; }
.plan:has(input:checked) { border-color: #c4a1ff; background: var(--card-hi); box-shadow: 0 0 24px rgba(155, 92, 255, .4); }
.plan:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.plan-name { font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; }
.plan-price { font-size: 2rem; font-weight: 700; }
.plan-price .per { font-size: 1rem; font-weight: 400; color: var(--muted); }
.plan-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--btn); color: var(--on-btn); font: 700 .75rem/1 var(--font); padding: 6px 12px; border-radius: 999px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.save-pill { background: #0f2418; color: var(--ok); padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.renewal-terms { border-left: 4px solid var(--accent); background: var(--surface); padding: 12px 16px; border-radius: 0 10px 10px 0; color: var(--text); }
.renewal-terms p { margin: 0 0 .6em; }
.renewal-terms p:last-child { margin: 0; }
.consent-check { margin: 0 0 12px; }
.pro-action .btn[disabled] { opacity: 1; background: var(--btn-2); color: var(--muted); cursor: not-allowed; box-shadow: none; }
.compare td, .compare th { text-align: center; }
.compare th[scope="row"] { text-align: left; font-weight: 400; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.draft-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #3b2a05; color: var(--warn); font-weight: 700; font-size: .85rem; vertical-align: middle; }
.pro-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #3b2a05; color: var(--warn); font-weight: 700; font-size: .85rem; }
@media (max-width: 760px) { .pro-hero, .plan-row { grid-template-columns: 1fr; } .pro-emblem { order: -1; width: 180px; } .plan-row { gap: 22px; } }
@media (prefers-reduced-motion: no-preference) {
  .pro-emblem { animation: emblem-in 1.1s cubic-bezier(.2, .75, .2, 1) both, float 7s ease-in-out 1.1s infinite; }
  .plan { transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
}

.result-card.wide { grid-column: 1 / -1; }
.transcript { white-space: pre-wrap; background: var(--code-bg); color: var(--text); padding: 14px; border-radius: 10px; max-height: 260px; overflow: auto; font: 400 .95rem/1.5 var(--font); margin: 0; }

/* ---- Cash App order ---- */
.pay-card { display: grid; gap: 14px; }
.pay-meta { font-size: 1.05rem; align-items: baseline; }
.pay-amount { font-size: 2rem; font-weight: 700; color: var(--text); }
.pay-tag { font-size: 1.3rem; font-weight: 700; color: var(--ok); }
.pay-ref { font-size: 1.2rem; padding: .2em .5em; letter-spacing: .06em; }
.cancel-order { text-align: center; }

/* Admin > Payments: one card per order to check in Cash App. */
.stack { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: minmax(140px, max-content) minmax(0, 320px); gap: 10px 14px; align-items: center; margin: 12px 0; }
.form-grid .check, .form-grid .form-actions { grid-column: 1 / -1; margin: 0; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- Account profile ---- */
.account-body { max-width: 760px; margin: 0 auto; }
.profile { padding: 0; overflow: hidden; }
.profile-banner { height: 120px; background:
  radial-gradient(120% 140% at 15% 0%, rgba(232, 121, 249, .35), transparent 55%),
  radial-gradient(120% 160% at 85% 10%, rgba(56, 189, 248, .28), transparent 60%),
  linear-gradient(135deg, #1a1030, #0d1424); border-bottom: 1px solid var(--line); }
.profile-main { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 22px; align-items: start; padding: 0 24px 22px; }
.avatar { --av: #c4a1ff; width: 108px; height: 108px; margin-top: -54px; border-radius: 50%; display: grid; place-items: center;
  font: 700 3rem/1 var(--font); color: var(--av); background: var(--card); border: 3px solid var(--av);
  box-shadow: 0 0 0 6px var(--card), 0 0 28px color-mix(in srgb, var(--av) 55%, transparent); }
.profile-who { padding-top: 14px; min-width: 0; }
.profile-name { font-size: 1.7rem; margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.plan-chip { font: 700 .78rem/1 var(--mono); letter-spacing: .06em; padding: 6px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.plan-chip.is-pro { background: #3b2a05; color: var(--warn); border-color: #6b4c0a; }
.profile-bio { margin: 0 0 8px; overflow-wrap: anywhere; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; overflow-wrap: anywhere; }
.profile-actions { display: flex; gap: 8px; padding-top: 16px; flex-wrap: wrap; justify-content: flex-end; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0 8px; }
.stat { display: flex; gap: 14px; align-items: center; }
.stat-icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 1.3rem; }
.stat-label { margin: 0; color: var(--muted); font-size: .9rem; }
.stat-value { margin: 2px 0; font-size: 1.35rem; font-weight: 700; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches legend { width: 100%; }
.swatch { --av: #c4a1ff; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 400; margin: 0; }
.swatch::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--av); }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch:has(input:checked) { border-color: var(--av); box-shadow: 0 0 0 2px color-mix(in srgb, var(--av) 45%, transparent); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 760px) {
  .profile-main { grid-template-columns: 1fr; padding: 0 16px 18px; }
  .profile-actions { justify-content: flex-start; padding-top: 0; }
  .stat-row { grid-template-columns: 1fr; }
}

/* ---- Collab spaces ---- */
.lead { font-size: 1.12rem; color: var(--muted); max-width: 42rem; }
.section-sm { margin-top: 18px; }
.collab-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 0; }
.collab-how .h3 { margin-top: 0; }
.collab-plans ul { margin: 8px 0 0; padding-left: 1.2em; }
.space-list { display: grid; gap: 10px; margin-bottom: 18px; }
.space-item { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--text); text-decoration: none; }
.space-item:hover { border-color: var(--accent); }
.space-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.copy-row { display: flex; gap: 8px; margin: 10px 0 4px; }
.copy-row input { flex: 1; min-width: 0; }
.steps-small { margin: 6px 0 10px; padding-left: 1.3em; }
.who-dot { --who: #c4a1ff; width: 12px; height: 12px; border-radius: 50%; background: var(--who); box-shadow: 0 0 10px var(--who); flex: none; margin-top: 6px; }
.people { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.people li { display: flex; gap: 10px; align-items: flex-start; }
.people li > span:not(.who-dot) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.history { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 2px; max-height: 520px; overflow: auto; }
.history li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.history-what { overflow-wrap: anywhere; }
.history-actions { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; }
.history-actions form { margin: 0; }
@media (max-width: 760px) { .collab-how, .space-grid { grid-template-columns: 1fr; } .history li { grid-template-columns: 1fr; } }

/* Avatar and collab member colours (classes, because the CSP allows no inline styles). */
.tone-c4a1ff { --av: #c4a1ff; --who: #c4a1ff; }
.tone-f472b6 { --av: #f472b6; --who: #f472b6; }
.tone-38bdf8 { --av: #38bdf8; --who: #38bdf8; }
.tone-2dd4bf { --av: #2dd4bf; --who: #2dd4bf; }
.tone-a3e635 { --av: #a3e635; --who: #a3e635; }
.tone-fbbf24 { --av: #fbbf24; --who: #fbbf24; }
.tone-fb7185 { --av: #fb7185; --who: #fb7185; }
.tone-f97316 { --av: #f97316; --who: #f97316; }
.tone-c084fc { --av: #c084fc; --who: #c084fc; }
.tone-818cf8 { --av: #818cf8; --who: #818cf8; }
.tone-facc15 { --av: #facc15; --who: #facc15; }
