/* ==========================================================================
   AI System Blueprint — site styles
   Follows the NEWPAGES house style (Outfit + Manrope, pill buttons, 16px cards).
   Light is the default; dark is neutral black. Primary: rose #F43F5E (shadcn / Tailwind rose scale).
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg-2: #F4F4F5;
  --bg-3: #FAFAFA;
  --card: #FFFFFF;
  --ink: #0B0B0B;
  --ink-2: #2A2A2A;
  --muted: #5F6368;
  --line: #E4E4E7;
  --line-2: #EFEFF1;
  --primary: #F43F5E;          /* rose-500: brand colour */
  --primary-hover: #E11D48;    /* rose-600 */
  --primary-ink: #BE123C;      /* rose-700: text-safe on light backgrounds */
  --primary-soft: #FFE4E6;     /* rose-100 */
  --primary-tint: #FFF1F2;     /* rose-50 */
  --on-primary: #FFFFFF;
  --status-amber: #B45309; --status-amber-soft: #FEF3C7;  /* "guided" / medium status, not the brand */
  --green: #1F9D55; --green-soft: #E7F6ED;
  --slate: #52525B; --slate-soft: #EEF0F3;
  --red: #CF1515; --red-soft: #FDECEB;
  --panel: #0B0B0B; --panel-ink: #FFFFFF; --panel-muted: rgba(255, 255, 255, .62); --panel-line: rgba(255, 255, 255, .12);
  --glow: rgba(244, 63, 94, .16);
  --grid: rgba(11, 11, 11, .045);
  --header-bg: rgba(255, 255, 255, .86);
  --r: 16px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 11, 11, .04), 0 14px 36px -16px rgba(11, 11, 11, .16);
  --shadow-sm: 0 1px 2px rgba(11, 11, 11, .05), 0 4px 14px -8px rgba(11, 11, 11, .12);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --maxw: 1180px;
  --font-head: "Outfit", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Dark only when chosen by the user */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0B0C;
  --bg-2: #111113;
  --bg-3: #141416;
  --card: #121214;
  --ink: #F5F5F5;
  --ink-2: #D4D4D8;
  --muted: #A1A1AA;
  --line: #26262A;
  --line-2: #1D1D21;
  --primary-ink: #FB7185;      /* rose-400 */
  --primary-soft: rgba(244, 63, 94, .16);
  --primary-tint: rgba(244, 63, 94, .08);
  --status-amber: #FBBF24; --status-amber-soft: rgba(245, 158, 11, .14);
  --green: #34D399; --green-soft: rgba(52, 211, 153, .12);
  --slate: #D4D4D8; --slate-soft: rgba(212, 212, 216, .1);
  --red: #F87171; --red-soft: rgba(248, 113, 113, .12);
  --panel: #151517; --panel-line: rgba(255, 255, 255, .1);
  --glow: rgba(244, 63, 94, .18);
  --grid: rgba(255, 255, 255, .035);
  --header-bg: rgba(11, 11, 12, .82);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -18px rgba(0, 0, 0, .8);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 16px -8px rgba(0, 0, 0, .6);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: transparent; color: var(--ink); /* page colour lives on html so .page-fx shows through */
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--ink); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.12rem; letter-spacing: -.01em; }
p { margin: 0 0 .9em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.lead { font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--muted); max-width: 62ch; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--primary-soft); }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 12px; z-index: 100; background: var(--card); padding: 8px 12px; }

/* ---------- pills, chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); font-size: .82rem; font-weight: 600;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.pill-dark { background: rgba(255, 255, 255, .06); border-color: var(--panel-line); color: var(--panel-ink); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-green { color: var(--green); background: var(--green-soft); }
.chip-amber { color: var(--status-amber); background: var(--status-amber-soft); }
.chip-primary { color: var(--primary-ink); background: var(--primary-soft); }
.chip-slate { color: var(--slate); background: var(--slate-soft); }
.chip-lg { font-size: .85rem; padding: 4px 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: .98rem; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 150ms var(--ease), background-color .2s, border-color .2s, box-shadow .2s;
}
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost-dark { background: transparent; border-color: var(--panel-line); color: var(--panel-ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); box-shadow: 0 10px 22px -12px rgba(244, 63, 94, .7); }
  .btn-ghost:hover { border-color: var(--ink); }
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; box-shadow: none; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .88rem; }
.btn-block { width: 100%; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: none; animation: spin .8s linear infinite; }
.busy .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--header-bg); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.header-row { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-mark { width: 28px; height: 28px; }
.brand-mark rect { fill: var(--ink); }
.brand-mark path { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark circle { fill: var(--primary); }
.nav { display: flex; gap: 24px; margin-left: 12px; font-size: .92rem; font-weight: 600; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.lang-toggle button { white-space: nowrap; border: 0; background: transparent; padding: 5px 11px; border-radius: 999px; font-size: .82rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(52px, 8vw, 96px) 0 clamp(56px, 8vw, 96px); text-align: center; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 320px at 50% 0%, var(--glow), transparent 70%),
    radial-gradient(500px 300px at 15% 30%, rgba(244, 63, 94, .07), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 85%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 85%);
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero-stats { margin: 14px 0 6px; font-size: .85rem; color: var(--muted); }
.hero-title { margin: 6px 0 18px; font-size: clamp(2.3rem, 5.6vw, 4.4rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.hero-title span { display: block; }
.hero-title .grad {
  background: linear-gradient(92deg, #E11D48 0%, #F43F5E 55%, #FB7185 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[lang^="zh"] .hero-title { letter-spacing: -.01em; line-height: 1.15; }
.hero-lead { margin: 0 auto 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-actions.left { justify-content: flex-start; }
.hero-ticks { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: .86rem; color: var(--muted); }
.hero-ticks li { display: inline-flex; align-items: center; gap: 7px; }
.hero-ticks li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23BE123C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* stage: preview card on top of the form card */
.stage { position: relative; width: 100%; max-width: 640px; margin-top: 44px; text-align: left; }
.stage-badge {
  position: absolute; top: -16px; right: -10px; z-index: 2;
  padding: 7px 16px; border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font-family: var(--font-head); font-weight: 700; font-size: .92rem; box-shadow: 0 8px 20px -8px rgba(244, 63, 94, .8);
  transform: rotate(2deg);
}
.preview {
  border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0;
  background: var(--card); padding: 20px 22px 14px; box-shadow: var(--shadow);
}
.preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.preview-head strong { font-family: var(--font-head); font-size: 1.02rem; display: block; }
.preview-team { font-size: .8rem; color: var(--muted); }
.preview-score { text-align: right; display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: baseline; }
.preview-score .num { font-family: var(--font-head); font-weight: 700; font-size: 2.3rem; line-height: 1; }
.preview-score .unit { font-size: .85rem; font-weight: 700; color: var(--muted); }
.preview-score .sub { grid-column: 1 / -1; font-size: .72rem; color: var(--muted); }
.preview-rows { list-style: none; margin: 0; padding: 8px 0 0; }
.preview-rows li { display: grid; grid-template-columns: 4px 1fr auto auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.preview-rows .bar { height: 22px; border-radius: 4px; background: var(--primary); }
.preview-rows .row-name { font-weight: 600; }
.preview-rows .tool { font-size: .8rem; color: var(--muted); }
.preview-more { margin: 10px 0 0; height: 1.4em; line-height: 1.4; overflow: hidden; padding-right: 90px; font-size: .8rem; color: var(--muted); }

.form-card {
  border: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r);
  background: var(--bg-3); padding: 24px 22px 22px; box-shadow: var(--shadow);
}
.form-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.form-card-head h2 { font-size: 1.3rem; margin: 0; }

/* form */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.label { font-weight: 700; font-size: .9rem; color: var(--ink); }
.optional { margin-left: 6px; font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hint { color: var(--muted); font-size: .8rem; }
input, textarea {
  width: 100%; font-size: 1rem; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
input:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.error { color: var(--red); font-size: .82rem; }
.error:empty { display: none; }
.form-error { color: var(--red); font-size: .9rem; margin: 12px 0 0; }
.form-error:empty { display: none; }
.form-note { display: flex; gap: 8px; margin: 14px 0 0; font-size: .78rem; color: var(--muted); line-height: 1.5; }
.form-note svg { flex: none; width: 15px; height: 15px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { margin-bottom: 40px; }
.section-head.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.section-head .pill { margin-bottom: 16px; }
.section-head h2 { max-width: 22em; }
.section-head.center .lead { margin: 0 auto; }
.section-glow { position: relative; background: color-mix(in srgb, var(--bg-2) 72%, transparent); }
.section-glow::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(520px 240px at 50% 0%, var(--glow), transparent 70%); opacity: .6; }
.section-glow .wrap { position: relative; }

/* bordered card grid (shared outer border, inner dividers) */
.grid-cards { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.grid-cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gcard { padding: 28px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cols-3 .gcard:nth-child(3n) { border-right: 0; }
.cols-3 .gcard:nth-last-child(-n + 3) { border-bottom: 0; }
.gcard svg { width: 26px; height: 26px; margin-bottom: 18px; fill: none; stroke: var(--primary-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gcard h3 { margin-bottom: 6px; }
.gcard p { color: var(--muted); font-size: .94rem; }

/* tool rows */

/* CTA panel (always dark, like the reference) */
.cta-panel {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: 24px; background: var(--panel); color: var(--panel-ink);
  border: 1px solid var(--panel-line);
}
.cta-panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px 260px at 85% 110%, rgba(244, 63, 94, .35), transparent 70%), radial-gradient(360px 220px at 0% 0%, rgba(244, 63, 94, .12), transparent 70%); }
.cta-panel > * { position: relative; }
.cta-small { margin: 22px 0 4px; font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--panel-ink); }
.cta-big { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(3.6rem, 9vw, 6.4rem); line-height: .95; letter-spacing: -.04em; color: var(--primary); }
.cta-right p { color: var(--panel-muted); font-size: 1.02rem; }
.checks { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.checks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }

/* FAQ */

/* floating centered watermark */
.watermark {
  position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 35; margin: 0;
  padding: 3px 12px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  font-size: .7rem; font-weight: 600; letter-spacing: .02em; color: var(--muted);
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line-2); opacity: .85;
}
@media print { .watermark { display: none; } }

/* ---------- loading ---------- */
.loading { padding: clamp(64px, 12vw, 140px) 0; }
.loading-inner { max-width: 640px; }
.loader { display: flex; gap: 8px; margin-bottom: 26px; }
.loader span { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); animation: pulse 1.2s var(--ease) infinite; }
.loader span:nth-child(2) { animation-delay: .15s; }
.loader span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
.loading-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
.elapsed { margin-left: 6px; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }
.load-steps { list-style: none; margin: 30px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.load-steps li { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); color: var(--muted); font-weight: 600; }
.load-steps li:last-child { border-bottom: 0; }
.load-steps li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); }
.load-steps li.done { color: var(--ink); }
.load-steps li.done::before { border-color: var(--green); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.load-steps li.active { color: var(--ink); background: var(--primary-soft); }
.load-steps li.active::before { border-color: var(--primary); border-right-color: transparent; animation: spin .9s linear infinite; }

/* ---------- result ---------- */
.result-bar { position: sticky; top: 65px; z-index: 30; background: var(--header-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-2); }
.result-bar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-top: 12px; padding-bottom: 12px; }
.result-title { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#result-state .report { padding: 40px 0 140px; }

/* ---------- floating button + drawer ---------- */
.fab {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 45;
  display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 22px;
  border-radius: 999px; border: 0; background: var(--primary); color: var(--on-primary);
  font-family: var(--font-head); font-weight: 700; font-size: 1rem; cursor: pointer;
  box-shadow: 0 14px 30px -12px rgba(244, 63, 94, .75), 0 2px 6px rgba(0, 0, 0, .12);
}
.fab svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.fab:not([hidden]) { animation: fab-in .4s var(--ease); }
@keyframes fab-in { from { transform: translateY(18px) scale(.9); opacity: 0; } }
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: fade .25s ease-out; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); overflow-y: auto;
  background: var(--bg); border-left: 1px solid var(--line); padding: 24px clamp(18px, 3vw, 28px) 32px;
  animation: drawer-in .3s var(--ease);
}
@keyframes drawer-in { from { transform: translateX(48px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.drawer-head h2 { font-size: 1.5rem; margin-bottom: 4px; }
body.drawer-open { overflow: hidden; }

.toast {
  position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: var(--bg); padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  box-shadow: var(--shadow); max-width: calc(100vw - 32px);
}

/* off-screen host used while building the PDF */
.pdf-host { position: absolute; left: 0; top: 0; width: 688px; z-index: -1; background: #fff; pointer-events: none; }
.pdf-cover { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: grid; place-items: center; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }

/* ---------- stage interactions (preview + form) ---------- */
.stage-badge { animation: badge-float 4.5s ease-in-out infinite; }
@keyframes badge-float { 0%, 100% { transform: rotate(2deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-5px); } }

.preview { position: relative; transition: border-color .35s, box-shadow .35s; }
.preview.is-live { border-color: var(--primary); }
.preview-body { transition: opacity .26s var(--ease), transform .26s var(--ease); }
.preview-body.is-out { opacity: 0; transform: translateY(8px); }
.preview-id { min-width: 0; }
.preview-id strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.preview-score .num { display: inline-block; min-width: 1.3ch; font-variant-numeric: tabular-nums; transition: color .3s; }
.preview.is-live .preview-score .num { color: var(--muted); animation: num-wait 1.4s ease-in-out infinite; }
@keyframes num-wait { 50% { opacity: .35; } }

/* "Live preview" tag appears once the user starts typing */
.preview-live {
  position: absolute; top: 12px; left: 22px; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: .72rem; font-weight: 700;
  opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s var(--ease); pointer-events: none;
}
.preview-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #22C55E; animation: live-blink 1.2s ease-in-out infinite; }
.preview.is-live .preview-live { opacity: 1; transform: none; }
@keyframes live-blink { 50% { opacity: .25; } }

/* rows: slide in one after another, bars grow */
.preview-rows li { border-radius: 8px; transition: background-color .2s, padding .2s; }
.preview-rows .row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-rows .bar { transform-origin: bottom; }
.preview-rows li.row-in { animation: row-in .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }
.preview-rows li.row-in .bar { animation: bar-grow .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 180ms); }
@keyframes row-in { from { opacity: 0; transform: translateX(-14px); } }
@keyframes bar-grow { from { transform: scaleY(0); } }
@media (hover: hover) {
  .preview:not(.is-live) .preview-rows li:hover { background: var(--bg-2); padding-left: 8px; padding-right: 8px; }
}
.preview-rows .bar.pending { background: var(--line); }
.preview-rows li.ghost .row-name { height: 10px; width: 60%; border-radius: 5px; background: var(--line-2); }
.chip-pending {
  color: var(--muted);
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--line) 50%, var(--bg-2) 100%); background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.chip-pending::before { background: var(--primary); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* example switcher dots */
.pv-dots { position: absolute; right: 22px; bottom: 14px; display: flex; gap: 6px; }
.pv-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: width .3s var(--ease), background-color .3s; }
.pv-dots button:hover { background: var(--muted); }
.pv-dots button[aria-current="true"] { width: 22px; background: var(--primary); }
.preview.is-live .pv-dots { display: none; }

/* form card: glows while in use, shows progress */
.form-card { transition: border-color .3s, box-shadow .3s; }
.form-card:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft), var(--shadow); }
.field .label { transition: color .2s; }
.field:focus-within .label { color: var(--primary-ink); }
.form-progress { display: flex; align-items: center; gap: 12px; margin: -6px 0 18px; }
.form-progress-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.form-progress-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--primary); transition: width .5s var(--ease), background-color .3s; }
#fp-text { font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; transition: color .3s; }
.form-progress.done .form-progress-bar i { background: var(--green); }
.form-progress.done #fp-text { color: var(--green); }
.btn-primary.is-ready { animation: ready-pulse 1.8s ease-out 1; }

/* ---------- page background effects ---------- */
.page-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; transition: opacity .6s; --orb-o: .26; --spot-o: .08; --noise-o: .035; }
:root[data-theme="dark"] .page-fx { --orb-o: .24; --spot-o: .12; --noise-o: .05; }
body.view-result .page-fx { opacity: .45; }

/* drifting ambient light */
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--orb-o); will-change: transform; }
.o1 { width: 48vw; height: 48vw; left: -14vw; top: -16vw; background: radial-gradient(circle, rgba(244, 63, 94, .75), transparent 68%); animation: drift-a 40s ease-in-out infinite alternate; }
.o2 { width: 40vw; height: 40vw; right: -12vw; top: 28vh; background: radial-gradient(circle, rgba(251, 113, 133, .6), transparent 68%); animation: drift-b 48s ease-in-out infinite alternate; }
.o3 { width: 36vw; height: 36vw; left: 22vw; bottom: -20vw; background: radial-gradient(circle, rgba(225, 29, 72, .5), transparent 68%); animation: drift-c 56s ease-in-out infinite alternate; }
@keyframes drift-a { 50% { transform: translate(14vw, 10vh) scale(1.12); } 100% { transform: translate(4vw, 22vh) scale(.95); } }
@keyframes drift-b { 50% { transform: translate(-16vw, -8vh) scale(1.1); } 100% { transform: translate(-6vw, 14vh) scale(1.05); } }
@keyframes drift-c { 50% { transform: translate(12vw, -14vh) scale(1.15); } 100% { transform: translate(-10vw, -6vh) scale(.92); } }

/* faint engineering grid, strongest near the top */
.fx-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 75%);
}
/* soft light that follows the cursor (desktop only; set by app.js) */
.fx-spot { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 30%), rgba(244, 63, 94, var(--spot-o)), transparent 62%); }
.page-fx.has-pointer .fx-spot { opacity: 1; }
/* film grain for depth */
.fx-noise {
  position: absolute; inset: -50%; opacity: var(--noise-o);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* reading progress under the header */
.scroll-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  transform-origin: left; transform: scaleX(var(--sp, 0));
  background: linear-gradient(90deg, #E11D48, #F43F5E 60%, #FB7185);
}

/* cards light up where the cursor is */
.gcard { position: relative; }
.gcard::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(280px circle at var(--cx, 50%) var(--cy, 50%), var(--primary-soft), transparent 70%);
}
.gcard > * { position: relative; }
@media (hover: hover) { .gcard:hover::before { opacity: 1; } }

/* scroll reveal (classes added by app.js, so nothing is hidden without JS) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.reveal-stagger.is-in > * { opacity: 1; transform: none; }

/* back to top, with a ring that shows how far down the page you are */
.to-top {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 44;
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
  box-shadow: var(--shadow-sm);
  opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none;
  transition: opacity .3s, transform .35s var(--ease), bottom .35s var(--ease), background-color .2s, color .2s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
body.has-fab .to-top { bottom: calc(clamp(16px, 3vw, 32px) + 68px); }
.to-top-ring { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); transform: rotate(-90deg); }
.to-top-ring circle { fill: none; stroke-width: 2.5; }
.to-top-ring .ring-bg { stroke: transparent; }
.to-top-ring .ring-fg { stroke: var(--primary); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.to-top-arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
@media (hover: hover) {
  .to-top:hover { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
  .to-top:hover .to-top-arrow { transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}
@media print { .page-fx, .to-top, .scroll-progress { display: none !important; } }
@keyframes ready-pulse { 0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, .55); } 100% { box-shadow: 0 0 0 14px rgba(244, 63, 94, 0); } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav, .header-cta { display: none; }
  .grid-cards.cols-3 { grid-template-columns: 1fr; }
  .cols-3 .gcard { border-right: 0; }
  .cols-3 .gcard:nth-last-child(-n + 3) { border-bottom: 1px solid var(--line); }
  .cols-3 .gcard:last-child { border-bottom: 0; }
  .cta-panel { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .brand span { font-size: .95rem; }
  .stage-badge { right: 6px; }
  .preview-rows li { grid-template-columns: 4px 1fr auto; }
  .preview-rows .tool { display: none; }
  .result-bar { top: 64px; }
  .result-title, #copy-md { display: none; }
  .fab span { display: none; }
  .fab { padding: 0; width: 56px; justify-content: center; }
}

/* ---------- print (Ctrl+P): report only ---------- */
@media print {
  .site-header, .fab, .drawer, .toast, .result-bar, #landing, .loading { display: none !important; }
  body { background: #fff; }
  #result-state .report { padding: 0; }
}

/* very narrow phones: keep the header on one line */
@media (max-width: 440px) {
  .brand span { display: none; }
  .header-row { gap: 10px; }
  .lang-toggle button { padding: 5px 9px; }
}

/* ==========================================================================
   Stage v2: two floating glass cards (preview + form), high-tech feel
   ========================================================================== */
.stage { max-width: 1060px; margin-top: 56px; }
.stage-grid {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(20px, 3.2vw, 44px); align-items: center; perspective: 1400px;
}
.stage-col { position: relative; min-width: 0; }

/* gentle floating, offset per column */
@media (prefers-reduced-motion: no-preference) {
  .col-preview { animation: bob-a 7s ease-in-out infinite; }
  .col-form { animation: bob-b 8s ease-in-out infinite; }
}
@keyframes bob-a { 50% { transform: translateY(-10px); } }
@keyframes bob-b { 50% { transform: translateY(8px); } }

/* glass cards with depth; tilt comes from --rx/--ry (set by app.js) */
.preview, .form-card {
  position: relative; border: 1px solid color-mix(in srgb, var(--line) 70%, var(--primary) 30%); border-radius: 20px;
  background: color-mix(in srgb, var(--card) 78%, transparent);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 30px 60px -28px rgba(244, 63, 94, .35), 0 18px 40px -22px rgba(0, 0, 0, .35);
  transform-style: preserve-3d; will-change: transform;
}
:root[data-theme="dark"] .preview, :root[data-theme="dark"] .form-card {
  background: color-mix(in srgb, var(--card) 70%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 70px -30px rgba(244, 63, 94, .45), 0 20px 50px -24px rgba(0, 0, 0, .9);
}
.preview { padding: 46px 22px 16px; overflow: hidden; transform: rotateY(calc(7deg + var(--ry, 0deg))) rotateX(var(--rx, 0deg)); transition: transform .4s var(--ease), border-color .35s, box-shadow .35s; }
.form-card { padding: 26px 24px 22px; transform: rotateY(calc(-4deg + var(--ry, 0deg))) rotateX(var(--rx, 0deg)) translateZ(30px); transition: transform .4s var(--ease), border-color .3s, box-shadow .3s; }
.stage.is-typing .preview, .stage.is-typing .form-card { --rx: 0deg; --ry: 0deg; }

/* sweeping light beam over the preview */
.scan { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.scan::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; width: 38%; left: -50%;
  background: linear-gradient(100deg, transparent, rgba(244, 63, 94, .14), rgba(255, 255, 255, .22), transparent);
  transform: skewX(-18deg); animation: scan 6.5s ease-in-out infinite;
}
@keyframes scan { 0%, 55% { left: -50%; } 100% { left: 130%; } }

/* form card: rotating rose light around the border + HUD corners */
.form-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: .9;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 62%, rgba(244, 63, 94, .95) 78%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin-border 5s linear infinite;
}
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin-border { to { --ang: 360deg; } }
.hud { position: absolute; width: 14px; height: 14px; pointer-events: none; border: 0 solid var(--primary); opacity: .85; }
.hud.tl { top: 10px; left: 10px; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 5px; }
.hud.tr { top: 10px; right: 10px; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 5px; }
.hud.bl { bottom: 10px; left: 10px; border-bottom-width: 2px; border-left-width: 2px; border-bottom-left-radius: 5px; }
.hud.br { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 5px; }
.form-card:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft), 0 30px 70px -28px rgba(244, 63, 94, .55); }

/* badge + floating tool chips */
.stage-badge { top: -18px; right: 14px; z-index: 3; }
.stage-fx { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.fc {
  position: absolute; padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap;
  color: var(--ink); background: color-mix(in srgb, var(--card) 82%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--shadow-sm);
}
.fc::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 8px var(--primary); }
.fc5 { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.fc5::before { background: #fff; box-shadow: none; }
.fc1 { left: -2%; top: 8%; } .fc2 { left: 38%; top: -7%; } .fc3 { left: 1%; bottom: 6%; }
.fc4 { right: -3%; top: 22%; } .fc5 { right: 6%; bottom: -5%; }
@media (prefers-reduced-motion: no-preference) {
  .fc { animation: chip-float 5s ease-in-out infinite; }
  .fc2 { animation-delay: -1.2s; } .fc3 { animation-delay: -2.4s; } .fc4 { animation-delay: -3.1s; } .fc5 { animation-delay: -4s; }
}
@keyframes chip-float { 50% { transform: translateY(-9px); } }

.pv-dots { right: 22px; bottom: 14px; }
.form-card-head { margin-bottom: 14px; }

/* ---------- tablet: stack, drop the 3D ---------- */
@media (max-width: 980px) {
  .stage { max-width: 640px; }
  .stage-grid { grid-template-columns: 1fr; gap: 22px; perspective: none; }
  .preview, .form-card { transform: none !important; }
  .stage-badge { right: 12px; }
  .fc1, .fc4 { display: none; }
  .fc2 { left: 6%; top: -14px; } .fc3 { left: auto; right: 8%; bottom: auto; top: 46%; } .fc5 { right: 4%; bottom: -12px; }
}
/* ---------- phone: no floating chips, no tilt, comfortable touch sizes ---------- */
@media (max-width: 640px) {
  .stage { margin-top: 40px; }
  .stage-fx { display: none; }
  .col-preview, .col-form { animation: none; }
  .preview { padding: 44px 16px 14px; }
  .form-card { padding: 22px 16px 18px; border-radius: 18px; }
  .hud { display: none; }
  .stage-badge { top: -16px; right: 8px; font-size: .82rem; padding: 6px 12px; }
  .preview-head strong { max-width: 190px; }
  input, textarea { font-size: 16px; } /* prevents iOS zoom on focus */
}
@media print { .stage-fx, .scan { display: none !important; } }

/* stage v2 refinements */
.scan::before { background: linear-gradient(100deg, transparent, rgba(244, 63, 94, .10), rgba(255, 255, 255, .10), transparent); }
:root[data-theme="dark"] .scan::before { background: linear-gradient(100deg, transparent, rgba(244, 63, 94, .12), rgba(255, 255, 255, .05), transparent); }
.fc2 { left: 43%; top: 3%; }
.fc4 { right: -5%; top: 12%; }
@media (max-width: 1180px) { .stage-fx { display: none; } }
@media (max-width: 640px) { .scan { display: none; } }

/* ==========================================================================
   Tool stack: a ladder of six levels (always start at the lowest that works)
   ========================================================================== */
.ladder { --fill: 0; position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 980px; }
.ladder::before, .ladder::after { content: ""; position: absolute; left: 21px; top: 30px; bottom: 30px; width: 2px; border-radius: 2px; }
.ladder::before { background: var(--line); }
.ladder::after { background: linear-gradient(var(--primary), var(--primary-ink)); transform-origin: top; transform: scaleY(var(--fill)); box-shadow: 0 0 12px var(--primary); }

.lv { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 8px 0; }
.lv-dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; margin-top: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line); color: var(--muted); font-family: var(--font-head); font-weight: 800; font-size: 1rem;
  transition: background-color .4s, border-color .4s, color .4s, box-shadow .4s, transform .4s var(--ease);
}
.lv.is-lit .lv-dot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 6px var(--primary-soft); transform: scale(1.04); }

/* staircase: each level sits a little further right, i.e. a little more custom */
.lv-card {
  position: relative; margin-left: calc((var(--n) - 1) * 14px);
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 14px 24px; align-items: center;
  padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm); transition: border-color .4s, box-shadow .4s, transform .4s var(--ease);
}
.lv.is-lit .lv-card { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
@media (hover: hover) { .lv-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); } }
.lv-text { padding-right: 64px; }
.lv-text h3 { margin: 0 0 4px; font-size: 1.12rem; }
.lv-text p { margin: 0; font-size: .9rem; color: var(--muted); max-width: 40ch; }
.lv-effort { position: absolute; top: 16px; right: 18px; display: flex; align-items: flex-end; gap: 3px; }
.lv-effort i { width: 4px; height: 8px; border-radius: 2px; background: var(--line); transition: background-color .4s, height .4s var(--ease); }
.lv-effort i:nth-child(n + 4) { height: 12px; } .lv-effort i:nth-child(n + 6) { height: 16px; }
.lv.is-lit .lv-effort i.on { background: var(--primary); }

/* logo tiles */
.lv-tools { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tool {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); font-size: .84rem; font-weight: 650; line-height: 1.2;
  transition: transform .3s var(--ease), border-color .25s, box-shadow .25s;
}
.tool-logo { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--bg-2); transition: transform .35s var(--ease), background-color .25s; }
.tool-logo img { width: 18px; height: 18px; display: block; }
:root[data-theme="dark"] .tool-logo img { filter: invert(1); }
.mono { font-family: var(--font-head); font-weight: 800; font-size: .66rem; letter-spacing: .02em; color: var(--primary-ink); }
.mono { display: grid; place-items: center; width: 100%; height: 100%; border-radius: inherit; background: var(--primary-soft); }
.tool-tag { padding: 1px 7px; border-radius: 999px; background: var(--status-amber-soft); color: var(--status-amber); font-size: .66rem; font-weight: 700; }
.tool.is-limited { border-style: dashed; }
@media (hover: hover) {
  .tool:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 8px 18px -10px rgba(244, 63, 94, .55); }
  .tool:hover .tool-logo { transform: scale(1.1) rotate(-4deg); background: var(--primary-soft); }
}
/* tiles pop in one by one when their level lights up */
.lv .tool { opacity: 0; transform: translateY(8px) scale(.96); }
.lv.is-lit .tool { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .25s, box-shadow .25s; transition-delay: calc(var(--t, 0) * 70ms); }
.no-js .lv .tool, .lv.is-static .tool { opacity: 1; transform: none; }

/* gateway: the shared base of levels 4-6 */
.gateway {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center;
  max-width: 980px; margin: 18px auto 0; padding: 18px 22px; border-radius: 18px;
  background: var(--panel); color: var(--panel-ink); border: 1px solid var(--panel-line);
}
.gateway::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(360px 160px at 100% 100%, rgba(244, 63, 94, .35), transparent 70%); }
.gateway > * { position: relative; }
.gw-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: var(--on-primary); font-family: var(--font-head); font-weight: 800; }
.gateway h3 { margin: 0 0 2px; color: var(--panel-ink); font-size: 1.05rem; }
.gateway p { margin: 0; font-size: .88rem; color: var(--panel-muted); }
.gw-flow { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: repeating-linear-gradient(90deg, var(--primary) 0 14px, transparent 14px 28px); opacity: .85; }
@media (prefers-reduced-motion: no-preference) { .gw-flow { background-size: 28px 3px; animation: gw-run 1.6s linear infinite; } }
@keyframes gw-run { to { background-position: 28px 0; } }

/* tablet + phone */
@media (max-width: 860px) {
  .lv-card { grid-template-columns: 1fr; margin-left: calc((var(--n) - 1) * 6px); }
  .lv-text p { max-width: none; }
}
@media (max-width: 520px) {
  .ladder::before, .ladder::after { left: 15px; }
  .lv { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .lv-dot { width: 32px; height: 32px; font-size: .85rem; margin-top: 14px; }
  .lv-card { margin-left: 0; padding: 14px 14px 16px; }
  .lv-text { padding-right: 56px; }
  .lv-effort { top: 14px; right: 14px; }
  .tool { font-size: .8rem; }
  .gateway { grid-template-columns: 1fr; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .lv .tool { opacity: 1; transform: none; } }

/* ==========================================================================
   How it works: three connected steps (a real sequence, so it is numbered)
   ========================================================================== */
.flow { --p: 0; position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
/* the path behind the cards, and the pulse that runs along it once */
.flow::before { content: ""; position: absolute; left: 16%; right: 16%; top: 112px; height: 2px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 16px); }
.flow::after { content: ""; position: absolute; left: 16%; top: 108px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px var(--primary-soft), 0 0 14px var(--primary); opacity: 0; }
.flow.is-run::after { animation: flow-dot 2.4s var(--ease) .3s forwards; }
@keyframes flow-dot { 0% { left: 16%; opacity: 1; } 100% { left: calc(84% - 10px); opacity: 1; } }

.fl { position: relative; padding: 22px 22px 24px; border-radius: 22px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 88%, transparent); text-align: center; }
.fl-main { border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); background: color-mix(in srgb, var(--primary-tint) 70%, var(--card)); }
.fl-vis { height: 96px; display: grid; place-items: center; margin-bottom: 18px; }
.fl-n {
  position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong); font-family: var(--font-head); font-weight: 800; transition: background-color .4s, border-color .4s, color .4s, box-shadow .4s;
}
.flow.is-run .fl-n { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 6px var(--primary-soft); }
.flow.is-run .fl:nth-child(1) .fl-n { transition-delay: .3s; } .flow.is-run .fl:nth-child(2) .fl-n { transition-delay: 1.5s; } .flow.is-run .fl:nth-child(3) .fl-n { transition-delay: 2.7s; }
.fl h3 { margin: 0 0 4px; font-size: 1.3rem; }
.fl p { margin: 0 auto; max-width: 26ch; color: var(--muted); font-size: .95rem; }

/* step 1: three answers */
.vchip { display: inline-grid; place-items: center; width: 46px; height: 46px; margin: 0 5px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.vchip svg { width: 22px; height: 22px; fill: none; stroke: var(--primary-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* step 2: the AI picks a tool for each job */
.pick { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; width: 168px; }
.pick li { display: grid; grid-template-columns: 26px 1fr; gap: 9px; align-items: center; padding: 4px 8px 4px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.pick img { width: 18px; height: 18px; margin: 0 auto; }
:root[data-theme="dark"] .pick img { filter: invert(1); }
.pick i { height: 6px; border-radius: 4px; background: var(--line-2); }
.flow.is-run .pick li { animation: pick 3.6s ease-in-out 1.4s infinite; }
.flow.is-run .pick li:nth-child(2) { animation-delay: 2.6s; } .flow.is-run .pick li:nth-child(3) { animation-delay: 3.8s; }
@keyframes pick { 0%, 100% { border-color: var(--line); } 12%, 30% { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); } 45% { border-color: var(--line); box-shadow: none; } }
/* step 3: a mini report */
.sheet { position: relative; display: grid; gap: 6px; width: 92px; padding: 12px 12px 30px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow-sm); transform: rotate(-3deg); }
.sheet i { height: 6px; border-radius: 4px; background: var(--line); } .sheet i:first-child { width: 60%; background: var(--primary); }
.sheet b { position: absolute; bottom: -9px; padding: 3px 8px; border-radius: 999px; font: 800 .62rem var(--font-head); color: var(--on-primary); background: var(--primary); }
.sheet b:nth-of-type(1) { left: -12px; } .sheet b:nth-of-type(2) { right: -14px; background: var(--ink); color: var(--bg); }

/* phone + tablet: vertical rail */
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; gap: 16px; }
  .flow::before { left: 26px; right: auto; top: 30px; bottom: 30px; width: 2px; height: auto; background: repeating-linear-gradient(var(--line-strong) 0 8px, transparent 8px 16px); }
  .flow::after { display: none; }
  .fl { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; text-align: left; padding: 16px 16px 18px 12px; }
  .fl-vis { grid-column: 2; grid-row: 3; height: auto; justify-content: start; place-items: start; margin: 12px 0 0; }
  .fl-n { grid-column: 1; grid-row: 1 / span 2; margin: 2px 0 0; }
  .fl h3 { grid-column: 2; } .fl p { grid-column: 2; margin: 0; max-width: none; }
  .vchip { margin: 0 8px 0 0; }
  .pick { width: min(220px, 100%); }
  .sheet { margin-left: 12px; }
}
@media (prefers-reduced-motion: reduce) { .flow::after { display: none; } .pick li { animation: none !important; } }

/* ==========================================================================
   FAQ: short questions, icon rows, one-line answers
   ========================================================================== */
.faq-wrap { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.faq-side { position: sticky; top: 96px; }
.faq-side .pill { margin-bottom: 16px; }
.faq-side h2 { margin-bottom: 10px; }
.faq-side-text { margin: 0 0 22px; color: var(--muted); font-size: 1.05rem; max-width: 24ch; }

.faq-list { display: grid; gap: 10px; }
.qa { border-radius: 18px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 88%, transparent); transition: border-color .3s, background-color .3s, box-shadow .3s; }
.qa[open] { border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); background: color-mix(in srgb, var(--primary-tint) 60%, var(--card)); box-shadow: var(--shadow-sm); }
.qa summary { display: grid; grid-template-columns: 40px minmax(0, 1fr) 28px; gap: 14px; align-items: center; padding: 14px 16px; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); transition: background-color .3s, transform .3s var(--ease); }
.qa-ico svg { width: 20px; height: 20px; fill: none; stroke: var(--primary-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.qa[open] .qa-ico { background: var(--primary); transform: rotate(-6deg); }
.qa[open] .qa-ico svg { stroke: var(--on-primary); }
.qa-q { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.qa-tog { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); transition: background-color .3s, border-color .3s, transform .35s var(--ease); }
.qa-tog::before, .qa-tog::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; margin: -1px 0 0 -5.5px; border-radius: 2px; background: var(--ink); transition: transform .35s var(--ease), background-color .3s; }
.qa-tog::after { transform: rotate(90deg); }
.qa[open] .qa-tog { background: var(--primary); border-color: var(--primary); transform: rotate(180deg); }
.qa[open] .qa-tog::before, .qa[open] .qa-tog::after { background: var(--on-primary); }
.qa[open] .qa-tog::after { transform: rotate(0); }
.qa-a { padding: 0 16px 16px 70px; }
.qa-a p { margin: 0; color: var(--ink-2); max-width: 46ch; }
@media (prefers-reduced-motion: no-preference) { .qa[open] .qa-a { animation: qa-in .35s var(--ease); } }
@keyframes qa-in { from { opacity: 0; transform: translateY(-6px); } }
.qa summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 18px; }

@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; } .faq-side { position: static; } .faq-side-text { max-width: none; } }
@media (max-width: 520px) { .qa summary { grid-template-columns: 36px minmax(0, 1fr) 26px; gap: 10px; padding: 12px; } .qa-ico { width: 36px; height: 36px; } .qa-a { padding: 0 14px 14px 58px; } .qa-q { font-size: 1rem; } }

/* how-it-works fixes: row layout for illustrations, path drawn over the cards at the number row */
.fl-vis { display: flex; align-items: center; justify-content: center; }
.flow::before { top: 155px; z-index: 2; }
.flow::after { top: 151px; z-index: 3; }
.fl-n { z-index: 4; }
@media (max-width: 860px) {
  .fl-vis { justify-content: flex-start; align-items: center; }
  .fl-vis .pick { width: min(230px, 100%); }
  .flow::before { z-index: 0; } .fl-n { z-index: 1; }
}

:root { --line-strong: #C3C3CB; }
:root[data-theme="dark"] { --line-strong: #4A4A52; }

/* FAQ: heading questions, source links, trust line */
.qa .qa-q { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; line-height: 1.3; letter-spacing: -.01em; }
.qa-src { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--primary-ink); font-size: .8rem; font-weight: 700; text-decoration: none; transition: border-color .25s, background-color .25s; }
.qa-src::after { content: "↗"; font-size: .85em; }
.qa-src[href^="#"]::after { content: "↓"; }
@media (hover: hover) { .qa-src:hover { border-color: var(--primary); background: var(--primary-soft); } }
.qa:target { border-color: var(--primary); }
.faq-meta { margin: 22px 0 0; font-size: .8rem; line-height: 1.6; color: var(--muted); }
.faq-meta time { color: var(--ink-2); font-weight: 600; }

/* How it works: illustrations float */
@keyframes fl-bob { 50% { transform: translateY(-7px); } }
@keyframes sheet-float { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-9px); } }
@media (prefers-reduced-motion: no-preference) {
  .vchip { animation: fl-bob 3.6s ease-in-out infinite; }
  .vchip:nth-child(2) { animation-delay: -1.2s; } .vchip:nth-child(3) { animation-delay: -2.4s; }
  .pick { animation: fl-bob 5s ease-in-out infinite; }
  .sheet { animation: sheet-float 5.5s ease-in-out infinite; }
  .sheet b { animation: fl-bob 3s ease-in-out infinite; }
  .sheet b:nth-of-type(2) { animation-delay: -1.5s; }
}

/* ---------- free quota, limit panel, share link ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.quota { margin: 0 0 10px; text-align: center; font-size: .82rem; font-weight: 600; color: var(--primary); }
.limit-panel { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--primary-soft, rgba(244,63,94,.08)); display: grid; gap: 12px; }
.limit-panel p { margin: 0; line-height: 1.55; }
.limit-title { margin: 0; font-family: var(--font-head); font-size: 1.1rem; }
.limit-sub { font-weight: 700; font-size: .85rem; }
.limit-reports ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.limit-reports li { font-size: .9rem; overflow-wrap: anywhere; }
.limit-reports small { color: var(--muted); }
.bp-form.is-limited .field, .bp-form.is-limited #submit-btn, .bp-form.is-limited .form-note { display: none; }
.share-banner { padding-top: 14px; }
.share-banner p { margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: .88rem; }
.share-banner a { font-weight: 700; color: var(--primary); }
.share-note { margin: 10px auto 0; font-size: .8rem; color: var(--muted); }
.gone { text-align: center; padding-top: 12vh; padding-bottom: 12vh; display: grid; gap: 14px; justify-items: center; }
.gone-title { font-family: var(--font-head); margin: 0; font-size: 1.6rem; }
body.share-mode .nav, body.share-mode .header-cta, body.share-mode .fab, body.share-mode .drawer { display: none !important; }
@media print { .share-banner, .share-note { display: none !important; } }

/* ---------- contact section ---------- */
.contact-card { display: grid; justify-items: center; text-align: center; gap: 14px; padding: clamp(28px, 5vw, 56px) 20px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); }
.contact-card h2 { margin: 0; font-family: var(--font-head); font-size: clamp(1.7rem, 4vw, 2.4rem); }
.contact-text { margin: 0; max-width: 46ch; color: var(--muted); line-height: 1.6; }
.contact-mail { max-width: 100%; }
.contact-mail svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.contact-mail span { overflow-wrap: anywhere; }
.contact-card .faq-meta { margin: 6px 0 0; font-size: .78rem; color: var(--muted); }

/* ---------- AI tools badges ---------- */
.tagbox { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: text; transition: border-color .2s, box-shadow .2s; }
.tagbox:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tagbox input[type="text"] { flex: 1 1 140px; min-width: 120px; width: auto; border: 0; outline: 0; box-shadow: none; background: transparent; padding: 8px 4px; }
.tag-list { display: contents; list-style: none; margin: 0; padding: 0; }
.tag-list[hidden] { display: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 4px 4px 11px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-ink, var(--text)); font-size: .85rem; font-weight: 600; }
.tag span { overflow-wrap: anywhere; }
.tag button { flex: none; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.tag button:hover, .tag button:focus-visible { background: var(--primary); color: #fff; outline: 0; }

/* ---------- email popup ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); animation: modal-fade .2s ease-out; }
.modal-card { position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; padding: 28px 24px 22px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); animation: modal-in .25s var(--ease, ease-out); }
.modal-card h2 { margin: 0 36px 6px 0; font-family: var(--font-head); font-size: 1.35rem; line-height: 1.25; }
.modal-text { margin: 0 0 18px; color: var(--muted); line-height: 1.55; font-size: .95rem; }
.modal-x { position: absolute; top: 14px; right: 14px; }
.modal-note { margin-top: 12px; }
.modal .form-error:empty { display: none; }
.modal .form-error { margin: 0 0 12px; }
.modal .limit-panel { margin-bottom: 12px; }
body.modal-open { overflow: hidden; }
@keyframes modal-fade { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .modal-backdrop, .modal-card { animation: none; } }

/* ---------- "currently unavailable" ---------- */
.service-note { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); color: var(--ink); font-size: .9rem; line-height: 1.5; }
.service-note[hidden] { display: none; }
.service-note a { margin-left: 6px; color: var(--primary-ink); font-weight: 700; text-decoration: underline; }
#submit-btn.is-unavailable, #submit-btn:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
