/* ============================================================
   SpookyAI — design system (mobile-first, dark aubergine + pumpkin)
   Base styles are written for 375px; desktop grows via min-width queries.
   ============================================================ */

/* ===== self-hosted fonts (OFL-licensed woff2, local only) ===== */
@font-face {
  font-display: swap;
  font-family: 'Creepster';
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/creepster-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-display: swap;
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 500;
  src: url(../fonts/cinzel-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-display: swap;
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 500;
  src: url(../fonts/cinzel-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-display: swap;
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 600;
  src: url(../fonts/cinzel-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-display: swap;
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 600;
  src: url(../fonts/cinzel-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-display: swap;
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 700;
  src: url(../fonts/cinzel-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-display: swap;
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 700;
  src: url(../fonts/cinzel-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-display: swap;
  font-family: 'Karla';
  font-style: italic;
  font-weight: 400;
  src: url(../fonts/karla-400-i-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-display: swap;
  font-family: 'Karla';
  font-style: italic;
  font-weight: 400;
  src: url(../fonts/karla-400-i-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-display: swap;
  font-family: 'Karla';
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/karla-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-display: swap;
  font-family: 'Karla';
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/karla-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-display: swap;
  font-family: 'Karla';
  font-style: normal;
  font-weight: 500;
  src: url(../fonts/karla-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-display: swap;
  font-family: 'Karla';
  font-style: normal;
  font-weight: 500;
  src: url(../fonts/karla-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-display: swap;
  font-family: 'Karla';
  font-style: normal;
  font-weight: 600;
  src: url(../fonts/karla-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-display: swap;
  font-family: 'Karla';
  font-style: normal;
  font-weight: 600;
  src: url(../fonts/karla-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-display: swap;
  font-family: 'Karla';
  font-style: normal;
  font-weight: 700;
  src: url(../fonts/karla-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-display: swap;
  font-family: 'Karla';
  font-style: normal;
  font-weight: 700;
  src: url(../fonts/karla-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  --bg: #130A22;
  --bg-2: #1B0F33;
  --surface: #221441;
  --surface-2: #2C1854;
  --line: rgba(178, 150, 235, 0.14);
  --line-strong: rgba(178, 150, 235, 0.28);
  --text: #F7F2FF;
  --text-2: #CFC0EC;
  --muted: #A18FC6;
  --orange: #FF8A00;
  --orange-2: #FFB45E;
  --violet: #8B5CF6;
  --pink: #FF4D7D;
  --green: #3DDC97;
  --red: #FF5470;
  --r: 16px;
  --r-sm: 10px;
  --r-lg: 24px;
  --shadow: 0 14px 34px rgba(8, 3, 20, 0.45);
  --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-brand: 'Creepster', 'Impact', 'Haettenschweiler', sans-serif;
  --font-body: 'Karla', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --header-h: 64px;
  --maxw: 1240px;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(900px 480px at -10% 12%, rgba(255, 138, 0, 0.12), transparent 55%),
    var(--bg);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; letter-spacing: 0.01em; }
h1 { font-size: clamp(2rem, 6.5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(255, 138, 0, 0.35); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
  padding: 12px 22px; min-height: 48px; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none; line-height: 1.2;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: linear-gradient(135deg, var(--orange), #F26419); color: #1C0E02; border-color: transparent; box-shadow: 0 10px 24px rgba(255, 138, 0, 0.35); }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(255, 138, 0, 0.45); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--orange); color: var(--orange-2); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { color: var(--orange-2); text-decoration: none; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--orange-2); background: rgba(255, 138, 0, 0.12);
  border: 1px solid rgba(255, 138, 0, 0.35); padding: 5px 12px; border-radius: 999px;
}
.badge-pro {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  padding: 3px 10px; border-radius: 999px;
}
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 10px; display: block;
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(19, 10, 34, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
@media (max-width: 520px) {
  .header-inner { gap: 8px; }
  .logo { font-size: 23px; gap: 7px; }
  .logo svg { width: 26px; height: 26px; }
  .header-actions { gap: 6px; }
  .lang-toggle { padding: 0 10px; }
  .lang-toggle .lang-label { display: none; }
  .fav-nav { padding: 0 10px; }
}
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-brand); font-size: 27px; color: var(--text); letter-spacing: 0.02em; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; color: var(--orange); flex: none; }
.nav { margin-left: auto; }
.nav-list { display: none; list-style: none; margin: 0; padding: 0; align-items: center; gap: 4px; }
.nav-link {
  display: block; padding: 9px 13px; border-radius: 999px; color: var(--text-2);
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.nav-link:hover { color: var(--orange-2); background: rgba(255, 138, 0, 0.08); text-decoration: none; }
.nav-link.is-active { color: var(--orange-2); background: rgba(255, 138, 0, 0.1); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; background: transparent; border: 1px solid var(--line-strong);
  color: var(--text); cursor: pointer; flex: none;
}
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 13px;
  border-radius: 999px; background: transparent; border: 1px solid var(--line-strong);
  color: var(--text-2); font-weight: 700; font-size: 14px; cursor: pointer; flex: none;
}
.lang-toggle svg { width: 17px; height: 17px; }
.fav-nav {
  display: inline-flex; align-items: center; gap: 5px; height: 44px; padding: 0 13px;
  border-radius: 999px; background: transparent; border: 1px solid var(--line-strong);
  color: var(--text-2); font-weight: 700; font-size: 14px; text-decoration: none; flex: none;
}
.fav-nav:hover { border-color: var(--orange); color: var(--orange-2); text-decoration: none; }
.fav-nav .fav-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px;
  background: var(--orange); color: #1C0E02; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 0 5px;
}
/* mobile dropdown */
.mobile-menu {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  display: none; padding: 14px 18px 20px;
}
.mobile-menu.is-open { display: block; }
.mobile-menu .nav-link { padding: 13px 12px; border-radius: 12px; font-size: 16px; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
@media (min-width: 900px) {
  .nav-list { display: flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* ---------- hero ---------- */
.hero { padding: 44px 0 30px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 70% 0%, rgba(139, 92, 246, 0.18), transparent 65%),
    radial-gradient(500px 260px at 15% 90%, rgba(255, 138, 0, 0.1), transparent 60%);
}
.hero-inner { position: relative; display: grid; gap: 30px; align-items: center; }
.hero-copy .brand-line { font-family: var(--font-brand); font-size: clamp(2.6rem, 9vw, 4.4rem); color: var(--orange-2); line-height: 1; margin: 4px 0 12px; text-shadow: 0 4px 24px rgba(255, 138, 0, 0.35); }
.hero-lead { color: var(--text-2); font-size: 17px; max-width: 560px; margin-bottom: 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: 14px; }
.hero-trust li { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust svg { width: 16px; height: 16px; color: var(--green); flex: none; }

/* hero demo stage */
.demo-stage {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px; box-shadow: var(--shadow);
}
.demo-stage .stage-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px 12px; }
.demo-stage .stage-label span { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; color: var(--text-2); }
.canvas-wrap { position: relative; background: #0E0719; border-radius: var(--r); overflow: hidden; min-height: 260px; display: grid; place-items: center; }
.canvas-wrap canvas { width: 100%; height: auto; display: block; }
.canvas-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 26px; color: var(--muted); font-size: 14px; }
.canvas-empty svg { width: 44px; height: 44px; margin: 0 auto 10px; color: var(--violet); }
.effect-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 2px 2px; }
.effect-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text-2);
  font-family: var(--font-body); font-size: 13.5px; font-weight: 700; cursor: pointer; transition: all 0.15s ease;
}
.effect-chip:hover { border-color: var(--orange); color: var(--orange-2); }
.effect-chip.is-active { background: var(--orange); color: #1C0E02; border-color: var(--orange); }
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 2px 2px; }
.demo-actions .btn { flex: 1 1 auto; min-width: 120px; }
.file-input-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@media (min-width: 980px) {
  .hero { padding: 64px 0 48px; }
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; gap: 44px; }
}

/* ---------- sections ---------- */
.section { padding: 46px 0; }
.section-head { max-width: 640px; margin-bottom: 26px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--text-2); font-size: 16px; }
.section-alt { background: rgba(27, 15, 51, 0.5); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- grids ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1120px) { .grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- tool card (photo background) ---------- */
.tool-card {
  position: relative; display: block; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line); min-height: 230px; text-decoration: none;
  background: var(--surface); box-shadow: 0 6px 18px rgba(8, 3, 20, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); text-decoration: none; }
.tool-card .card-bg { position: absolute; inset: 0; }
.tool-card .card-bg img { width: 100%; height: 100%; object-fit: cover; }
.tool-card .card-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19,10,34,0.05) 20%, rgba(19,10,34,0.92) 82%); }
.tool-card .card-body { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 230px; padding: 16px; }
.tool-card .card-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tool-card .card-cat { font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #1C0E02; background: var(--orange); padding: 4px 10px; border-radius: 999px; }
.tool-card .card-fav {
  width: 38px; height: 38px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(19, 10, 34, 0.55); border: 1px solid rgba(255,255,255,0.18); color: #fff; cursor: pointer;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.tool-card .card-fav:hover { border-color: var(--orange); color: var(--orange-2); }
.tool-card .card-fav.is-faved { background: var(--orange); color: #1C0E02; border-color: var(--orange); }
.tool-card .card-fav svg { width: 18px; height: 18px; }
.tool-card h3 { margin: 0 0 6px; font-size: 1.22rem; color: #fff; }
.tool-card .card-desc { margin: 0 0 12px; color: var(--text-2); font-size: 14px; }
.tool-card .card-go { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; color: var(--orange-2); }
.tool-card .card-go svg { width: 15px; height: 15px; }
.tool-card .badge-pro { position: absolute; top: 12px; left: 12px; z-index: 2; }

/* ---------- article card ---------- */
.article-card {
  display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.article-card .ac-thumb { aspect-ratio: 3 / 2; overflow: hidden; position: relative; }
.article-card .ac-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.article-card:hover .ac-thumb img { transform: scale(1.04); }
.article-card .ac-body { display: flex; flex-direction: column; gap: 8px; padding: 16px; flex: 1; }
.article-card .ac-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.article-card .ac-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.article-card h3 { margin: 0; font-size: 1.1rem; line-height: 1.35; }
.article-card p { margin: 0; color: var(--text-2); font-size: 14px; }
.article-card .ac-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; color: var(--orange-2); font-weight: 800; font-size: 13.5px; }
.article-card .ac-fav {
  margin-left: auto; width: 34px; height: 34px; border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line-strong);
  color: var(--text-2); cursor: pointer;
}
.article-card .ac-fav svg { width: 16px; height: 16px; }
.article-card .ac-fav.is-faved { background: var(--orange); color: #1C0E02; border-color: var(--orange); }

/* ---------- tool page ---------- */
.page-hero { padding: 36px 0 22px; }
.page-hero .crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.page-hero .crumbs a { color: var(--muted); }
.page-hero .crumbs a:hover { color: var(--orange-2); }
.page-hero h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); margin-bottom: 10px; }
.page-hero .lead { color: var(--text-2); font-size: 16.5px; max-width: 720px; margin-bottom: 14px; }
.page-hero .tool-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.stage {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; box-shadow: var(--shadow); margin-bottom: 26px;
}
.stage .stage-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px 12px; }
.stage .stage-label strong { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.05em; }
.stage .stage-label span { color: var(--muted); font-size: 13px; }
.controls { display: grid; gap: 12px; padding: 14px 4px 2px; }
.control-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.control-col { display: grid; gap: 8px; }
.control-col label { font-size: 13.5px; font-weight: 700; color: var(--text-2); }
input[type="text"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 16px; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 12px 14px; min-height: 48px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.18); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A18FC6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
textarea { min-height: 120px; resize: vertical; }
.checkbox-row { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--text-2); cursor: pointer; }
.checkbox-row input { width: 20px; height: 20px; accent-color: var(--orange); }

/* anchors (face landmarks) */
.anchor {
  position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: var(--orange); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.6);
  transform: translate(-50%, -50%); cursor: grab; touch-action: none; z-index: 5;
}
.anchor::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
.anchor.is-dragging { cursor: grabbing; }

/* results */
.result-row { display: flex; flex-wrap: wrap; gap: 10px; }
.result-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; display: grid; gap: 10px;
}
.result-card img, .result-card canvas { width: 100%; border-radius: var(--r-sm); }
.result-card .rc-title { font-weight: 800; font-size: 14.5px; }

/* how-to steps */
.steps { display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: step; }
.step {
  counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 18px 18px 64px;
}
.step::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 18px; top: 18px;
  font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--orange);
}
.step h3 { margin: 0 0 6px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--text-2); font-size: 14.5px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 18px;
}
.faq summary {
  cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 15.5px; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--orange); border-bottom: 2px solid var(--orange);
  transform: rotate(45deg); transition: transform 0.2s ease; margin-right: 6px;
}
.faq details[open] summary::after { transform: rotate(225deg); }
.faq .faq-a { color: var(--text-2); font-size: 14.5px; padding-bottom: 16px; }

/* ---------- article page ---------- */
.article-hero { padding: 30px 0 8px; }
.article-hero .crumbs { margin-bottom: 12px; }
.article-hero h1 { font-size: clamp(1.7rem, 5vw, 2.7rem); max-width: 840px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 13.5px; margin: 10px 0 20px; }
.article-cover { border-radius: var(--r-lg); overflow: hidden; margin-bottom: 28px; border: 1px solid var(--line); }
.article-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-body { max-width: 780px; margin: 0 auto; font-size: 17px; line-height: 1.85; color: #EFE9FB; }
.article-body h2 { margin: 1.6em 0 0.6em; font-size: 1.45rem; }
.article-body h3 { margin: 1.4em 0 0.5em; font-size: 1.2rem; color: var(--orange-2); }
.article-body p { margin-bottom: 1.2em; }
.article-body ul, .article-body ol { margin-bottom: 1.2em; }
.article-body li { margin-bottom: 0.5em; }
.article-body a { font-weight: 700; }
.article-body img { border-radius: var(--r); margin: 1.2em 0; }
.article-body blockquote {
  margin: 1.4em 0; padding: 14px 20px; border-left: 3px solid var(--orange);
  background: var(--surface); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text-2);
}
.article-body table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 15px; }
.article-body th, .article-body td { border: 1px solid var(--line-strong); padding: 10px 12px; text-align: left; }
.article-body th { background: var(--surface-2); }
.zh-notes {
  margin: 22px 0; padding: 16px 18px; background: rgba(139, 92, 246, 0.1);
  border: 1px dashed rgba(139, 92, 246, 0.4); border-radius: var(--r); color: var(--text-2); font-size: 15px;
}
.zh-notes summary { cursor: pointer; font-weight: 800; color: var(--violet); }
.article-nav { display: grid; gap: 12px; margin: 36px 0; grid-template-columns: 1fr; }
.article-nav a {
  display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px; color: var(--text-2); text-decoration: none;
}
.article-nav a:hover { border-color: var(--orange); text-decoration: none; }
.article-nav small { color: var(--muted); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 11.5px; }
.article-nav strong { color: var(--text); font-size: 15.5px; }
@media (min-width: 760px) { .article-nav { grid-template-columns: repeat(2, 1fr); } }

/* ---------- static pages / prose ---------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { margin: 1.6em 0 0.6em; }
.prose p { color: var(--text-2); }
.contact-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list svg { width: 22px; height: 22px; color: var(--orange); flex: none; margin-top: 3px; }
.info-list strong { display: block; }
.info-list a { color: var(--orange-2); }

/* ---------- ad slots ---------- */
.ad-slot {
  max-width: var(--maxw); margin: 8px auto; padding: 8px 18px; display: flex; justify-content: center;
}
.ad-placeholder {
  width: 100%; max-width: 728px; min-height: 90px; border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm); display: grid; place-items: center; background: rgba(27, 15, 51, 0.4);
}
.ad-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(80px);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong);
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  box-shadow: var(--shadow); opacity: 0; transition: transform 0.25s ease, opacity 0.25s ease; z-index: 100;
}
.toast.is-visible { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ---------- cookie bar ---------- */
.cookie-bar {
  position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 90;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  box-shadow: var(--shadow); max-width: 640px; margin: 0 auto;
}
.cookie-text { font-size: 13.5px; color: var(--text-2); flex: 1 1 260px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 48px; }
.footer-grid { display: grid; gap: 26px; padding: 40px 0 26px; grid-template-columns: 1fr; }
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 320px; }
.footer-col h4 { font-family: var(--font-body); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange-2); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { color: var(--text-2); font-size: 14.5px; }
.footer-col a:hover { color: var(--orange-2); }
.footer-bottom {
  border-top: 1px solid var(--line); padding: 18px 0; display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: space-between; color: var(--muted); font-size: 13px;
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* ---------- misc ---------- */
.notfound { text-align: center; padding: 70px 0; }
.notfound .big { font-family: var(--font-brand); font-size: clamp(4rem, 16vw, 7rem); color: var(--violet); line-height: 1; }
.cta-band {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(255, 138, 0, 0.12));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px 26px; text-align: center;
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { color: var(--text-2); max-width: 520px; margin: 0 auto 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 30px 0; }
.two-col { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1fr; } }
.stat-row { display: flex; flex-wrap: wrap; gap: 18px; }
.stat { flex: 1 1 130px; }
.stat .num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--orange-2); }
.stat .lbl { color: var(--muted); font-size: 13px; }
