/* AI House Design — website styles. Plain CSS, no build step.
   Colours come from the app's ThemeService (lib/services/theme_service.dart). */

/* ---------- Fonts (Inter, the app's font; SIL OFL 1.1, see fonts/OFL.txt) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700.woff2") format("woff2"); }

/* ---------- Design tokens ---------- */
:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #FAFAF8;
  --bg-alt: #F2F6F4;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --mint: #F0F9F6;
  --mint-2: #DCEEE7;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --border: #E2E8F0;
  --brand: #0F5A56;
  --brand-hover: #0B4744;
  --brand-ink: #FFFFFF;
  --brand-soft: rgba(15, 90, 86, 0.08);
  --accent: #2DD4BF;
  --ring: rgba(15, 90, 86, 0.4);
  --glow-1: rgba(45, 212, 191, 0.22);
  --glow-2: rgba(56, 189, 248, 0.14);
  --store-bg: #0B0F14;
  --store-ink: #FFFFFF;
  --phone-body: #0B0F14;
  --header-bg: rgba(250, 250, 248, 0.78);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 40px 80px -30px rgba(15, 42, 40, 0.45), 0 16px 32px -16px rgba(15, 23, 42, 0.25);

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --gutter: 16px;
  --max: 1180px;
  --section-y: 72px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1120;
    --bg-alt: #0E1628;
    --surface: #131D31;
    --surface-2: #1E293B;
    --mint: #132A2E;
    --mint-2: #13383A;
    --ink: #F8FAFC;
    --ink-2: #CBD5E1;
    --muted: #94A3B8;
    --border: #263349;
    --brand: #2DD4BF;
    --brand-hover: #5EEAD4;
    --brand-ink: #042F2E;
    --brand-soft: rgba(45, 212, 191, 0.1);
    --ring: rgba(45, 212, 191, 0.5);
    --glow-1: rgba(45, 212, 191, 0.16);
    --glow-2: rgba(56, 189, 248, 0.1);
    --store-bg: #000000;
    --phone-body: #000000;
    --header-bg: rgba(11, 17, 32, 0.78);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 16px 32px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1120;
  --bg-alt: #0E1628;
  --surface: #131D31;
  --surface-2: #1E293B;
  --mint: #132A2E;
  --mint-2: #13383A;
  --ink: #F8FAFC;
  --ink-2: #CBD5E1;
  --muted: #94A3B8;
  --border: #263349;
  --brand: #2DD4BF;
  --brand-hover: #5EEAD4;
  --brand-ink: #042F2E;
  --brand-soft: rgba(45, 212, 191, 0.1);
  --ring: rgba(45, 212, 191, 0.5);
  --glow-1: rgba(45, 212, 191, 0.16);
  --glow-2: rgba(56, 189, 248, 0.1);
  --store-bg: #000000;
  --phone-body: #000000;
  --header-bg: rgba(11, 17, 32, 0.78);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 16px 32px -16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

@media (min-width: 768px) { :root { --gutter: 24px; --section-y: 104px; } }
@media (min-width: 1100px) { :root { --section-y: 120px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; }
::selection { background: var(--mint-2); color: var(--ink); }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; color: var(--brand-ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; font-size: 1.0625rem; margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-sm); }
.nav-links { display: none; align-items: center; gap: 4px; list-style: none; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .9375rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--brand-soft); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: background .2s ease, transform .2s ease;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.96); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.nav .nav-cta { display: none; }
.brand span { white-space: nowrap; }
.menu-btn .close { display: none; }
.menu-btn[aria-expanded="true"] .open { display: none; }
.menu-btn[aria-expanded="true"] .close { display: block; }
.mobile-menu { display: none; border-top: 1px solid var(--border); padding: 8px 0 16px; }
.mobile-menu.is-open { display: block; }
.mobile-menu ul { list-style: none; display: grid; gap: 2px; }
.mobile-menu a { display: block; padding: 12px 4px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1.0625rem; border-bottom: 1px solid var(--border); }
.mobile-menu li:last-child a { border-bottom: 0; }
@media (min-width: 960px) {
  .nav { height: 72px; }
  .nav-links { display: flex; }
  .nav .nav-cta { display: inline-flex; }
  .menu-btn, .mobile-menu, .mobile-menu.is-open { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .9375rem; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 20px -10px var(--brand); }
.btn-primary:hover { background: var(--brand-hover); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn svg { width: 18px; height: 18px; }

.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 58px; padding: 9px 20px 9px 16px; border-radius: 14px;
  background: var(--store-bg); color: var(--store-ink); text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .2s ease;
}
.store-btn:hover { color: var(--store-ink); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.store-btn svg { width: 28px; height: 28px; flex: none; }
.store-btn span { display: grid; line-height: 1.1; text-align: left; }
.store-btn small { font-size: .6875rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.store-btn strong { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.store-btn.is-soon {
  background: var(--surface); color: var(--muted); border: 1px dashed var(--border);
  box-shadow: none; cursor: default;
}
.store-btn.is-soon:hover { transform: none; box-shadow: none; color: var(--muted); }
.store-btn.is-soon strong { color: var(--ink-2); }

/* ---------- Common section parts ---------- */
.section { padding-block: var(--section-y); position: relative; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 6px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-size: .8125rem; font-weight: 700; letter-spacing: .01em;
}
.eyebrow svg { width: 14px; height: 14px; }
.h2 { font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem); letter-spacing: -0.032em; line-height: 1.08; }
.lead { margin-top: 14px; font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); color: var(--muted); line-height: 1.6; }
.check-list { list-style: none; display: grid; gap: 12px; margin-top: 24px; }
.check-list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; color: var(--ink-2); }
.check-list li::before {
  content: ""; width: 24px; height: 24px; border-radius: 8px; margin-top: 1px;
  background: var(--mint-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F5A56' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/14px no-repeat;
}
:root[data-theme="dark"] .check-list li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232DD4BF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .check-list li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232DD4BF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E"); }
}
.check-list strong { color: var(--ink); font-weight: 700; }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split.reverse > :first-child { order: 2; }
}

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: 40px; padding-bottom: 64px; overflow-x: clip; }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); pointer-events: none;
}
.hero::before { width: 620px; height: 620px; right: -160px; top: -180px; background: var(--glow-1); }
.hero::after { width: 520px; height: 520px; left: -220px; bottom: -200px; background: var(--glow-2); }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero-copy { max-width: 600px; }
.hero h1 {
  font-size: clamp(2.5rem, 1.4rem + 5vw, 4.5rem);
  letter-spacing: -0.045em; line-height: 1.02;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--brand) 10%, #14B8A6 55%, #0EA5E9 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="dark"] .hero h1 .grad { background-image: linear-gradient(100deg, #5EEAD4 0%, #2DD4BF 45%, #7DD3FC 100%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero h1 .grad { background-image: linear-gradient(100deg, #5EEAD4 0%, #2DD4BF 45%, #7DD3FC 100%); }
}
.hero .lead { margin-top: 20px; max-width: 540px; }
.hero .store-row { margin-top: 32px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; list-style: none; color: var(--muted); font-size: .9375rem; }
.trust-row li { display: inline-flex; align-items: center; gap: 8px; }
.trust-row svg { width: 18px; height: 18px; color: var(--brand); }
@media (min-width: 960px) {
  .hero { padding-top: 64px; padding-bottom: 96px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 32px; }
}

/* ---------- Phone mockups ---------- */
.hero-visual { position: relative; height: 560px; max-width: 520px; width: 100%; margin-inline: auto; }
.phone {
  --w: 270px;
  position: absolute; width: var(--w); aspect-ratio: 9 / 19.2;
  padding: 9px; border-radius: calc(var(--w) * .16);
  background: var(--phone-body);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}
.phone::before {
  content: ""; position: absolute; z-index: 3; top: 19px; left: 50%; transform: translateX(-50%);
  width: 30%; height: 22px; border-radius: 20px; background: #000;
}
.phone-screen {
  position: relative; height: 100%; overflow: hidden; border-radius: calc(var(--w) * .13);
  background: var(--bg); color: var(--ink); display: flex; flex-direction: column;
  font-size: 11px; line-height: 1.35;
}
.phone-front { right: 4%; top: 0; z-index: 2; animation: float 7s ease-in-out infinite; }
.phone-back { --w: 236px; left: 0; top: 70px; z-index: 1; transform: rotate(-7deg); opacity: .98; animation: float-back 8s ease-in-out infinite; }
@media (max-width: 480px) {
  .hero-visual { height: 500px; max-width: 360px; }
  .phone-front { --w: 236px; right: 0; }
  .phone-back { --w: 200px; left: -6px; top: 64px; }
}
@media (min-width: 1100px) {
  .hero-visual { height: 640px; }
  .phone-front { --w: 296px; }
  .phone-back { --w: 254px; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes float-back { 0%, 100% { transform: rotate(-7deg) translateY(0); } 50% { transform: rotate(-7deg) translateY(10px); } }

.status-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px 6px; font-weight: 700; font-size: 11px; }
.status-bar .sb-icons { display: inline-flex; gap: 4px; align-items: center; }
.status-bar .sb-icons i { display: block; width: 14px; height: 8px; border-radius: 2px; background: currentColor; opacity: .85; }
.status-bar .sb-icons i:first-child { width: 10px; clip-path: polygon(0 100%, 100% 0, 100% 100%); border-radius: 0; }
.app-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px 10px; }
.app-bar .ab-back { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); }
.app-bar .ab-back svg { width: 13px; height: 13px; }
.app-bar .ab-title { font-weight: 700; font-size: 12.5px; margin-right: auto; letter-spacing: -0.01em; }
.credit-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; background: var(--mint-2); color: var(--brand); font-weight: 700; font-size: 10px; }
.credit-pill svg { width: 11px; height: 11px; }

.ps-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ps-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.wipe { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 443 / 470; background: var(--surface-2); box-shadow: var(--shadow-sm); }
.wipe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wipe .after { clip-path: inset(0 0 0 0); animation: wipe 6s cubic-bezier(.65, 0, .35, 1) infinite; }
.wipe .line { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .35); animation: wipe-line 6s cubic-bezier(.65, 0, .35, 1) infinite; }
.wipe .tag { position: absolute; top: 8px; padding: 3px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; background: rgba(15, 23, 42, .6); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.wipe .tag.l { left: 8px; }
.wipe .tag.r { right: 8px; background: rgba(15, 90, 86, .85); }
@keyframes wipe { 0%, 12% { clip-path: inset(0 0 0 100%); } 45%, 70% { clip-path: inset(0 0 0 0); } 95%, 100% { clip-path: inset(0 0 0 100%); } }
@keyframes wipe-line { 0%, 12% { left: 100%; opacity: 0; } 14% { opacity: 1; } 45% { left: 0; opacity: 1; } 47%, 70% { left: 0; opacity: 0; } 72% { opacity: 1; } 95% { left: 100%; opacity: 1; } 100% { left: 100%; opacity: 0; } }

.chip-row { display: flex; gap: 6px; overflow: hidden; }
.chip { flex: none; padding: 6px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 500; font-size: 10.5px; color: var(--ink-2); }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 700; }
.ps-cta { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 12px; box-shadow: 0 8px 16px -10px var(--brand); }
.ps-cta svg { width: 14px; height: 14px; }
.thumb-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.thumb-row img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* 3D editor screen */
.editor-screen { background: #EEF3F6; color: #0F172A; }
:root[data-theme="dark"] .editor-screen { background: #101a2c; color: #F8FAFC; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .editor-screen { background: #101a2c; color: #F8FAFC; } }
.editor-canvas {
  position: relative; flex: 1; display: grid; place-items: center;
  background-image:
    linear-gradient(rgba(100, 116, 139, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 139, .14) 1px, transparent 1px);
  background-size: 18px 18px;
}
.editor-canvas img { width: 96%; }
.seg { display: inline-flex; gap: 2px; padding: 3px; margin: 6px auto 0; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.seg span { padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 10px; color: var(--muted); }
.seg span.on { background: var(--brand); color: var(--brand-ink); }
.tool-dock { display: flex; justify-content: space-around; padding: 10px 10px 16px; margin: 0 10px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.tool-dock i { width: 20px; height: 20px; border-radius: 7px; background: var(--mint-2); }
.tool-dock i.on { background: var(--brand); }

.float-card {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 10px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md);
  font-size: .8125rem; line-height: 1.25; color: var(--ink);
}
.float-card b { display: block; font-weight: 700; }
.float-card small { color: var(--muted); font-size: .75rem; }
.float-card .fc-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--mint-2); color: var(--brand); flex: none; }
.float-card .fc-icon svg { width: 18px; height: 18px; }
.fc-1 { left: -2%; bottom: 52px; animation: float 6s ease-in-out infinite .6s; }
.fc-2 { left: -4%; top: 18px; animation: float 7s ease-in-out infinite 1.2s; }
@media (max-width: 480px) {
  .fc-1 { left: 0; bottom: 18px; }
  .fc-2 { display: none; }
}

/* ---------- Logos / stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 22px 18px; }
.stat b { display: block; font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); line-height: 1; letter-spacing: -0.04em; color: var(--brand); font-feature-settings: "tnum"; }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: .9375rem; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } .stat { padding: 28px 24px; } }

/* ---------- How it works ---------- */
.steps { list-style: none; display: grid; gap: 14px; counter-reset: step; margin-top: 28px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 1.125rem;
}
.step h3 { font-size: 1.0625rem; letter-spacing: -0.01em; }
.step p { margin-top: 4px; color: var(--muted); font-size: .9375rem; }

.ba {
  --pos: 50%;
  position: relative; width: 100%; max-width: 480px; margin-inline: auto;
  aspect-ratio: 443 / 503; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); background: var(--surface-2); user-select: none; touch-action: pan-y;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba .ba-after { clip-path: inset(0 0 0 var(--pos)); }
.ba .ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; pointer-events: none; }
.ba .ba-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: #fff; box-shadow: 0 0 16px rgba(0, 0, 0, .35); }
.ba .ba-knob {
  position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #0F5A56; box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.ba .ba-knob svg { width: 22px; height: 22px; }
.ba input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
  -webkit-appearance: none; appearance: none;
}
.ba input[type="range"]:focus-visible ~ .ba-handle .ba-knob { outline: 3px solid var(--accent); outline-offset: 3px; }
.ba .ba-tag { position: absolute; bottom: 14px; padding: 6px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 700; color: #fff; background: rgba(15, 23, 42, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); pointer-events: none; }
.ba .ba-tag.l { left: 14px; }
.ba .ba-tag.r { right: 14px; background: rgba(15, 90, 86, .88); }
.ba-caption { margin-top: 14px; text-align: center; color: var(--muted); font-size: .875rem; }

/* ---------- AI tools grid ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; list-style: none; }
.tool {
  position: relative; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tool:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--mint-2); }
.tool h3 { margin-top: 14px; font-size: .9875rem; letter-spacing: -0.01em; }
.tool p { margin-top: 4px; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.tool .tag { position: absolute; top: 14px; right: 14px; font-size: .6875rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ticon { width: 44px; height: 44px; border-radius: 14px; background: var(--mint); display: grid; place-items: center; border: 1px solid var(--mint-2); }
.ticon::before {
  content: ""; width: 24px; height: 24px; background: var(--brand);
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.i-furnish { --icon: url("../icons/tool_furnish.svg"); }
.i-interior { --icon: url("../icons/tool_interior.svg"); }
.i-restyle { --icon: url("../icons/tool_restyle.svg"); }
.i-rearrange { --icon: url("../icons/tool_rearrange.svg"); }
.i-walls { --icon: url("../icons/tool_walls.svg"); }
.i-flooring { --icon: url("../icons/tool_flooring.svg"); }
.i-replace { --icon: url("../icons/tool_replace.svg"); }
.i-remove { --icon: url("../icons/tool_remove.svg"); }
.i-declutter { --icon: url("../icons/tool_declutter.svg"); }
.i-style { --icon: url("../icons/tool_style.svg"); }
.i-exterior { --icon: url("../icons/tool_exterior.svg"); }
.i-garden { --icon: url("../icons/tool_garden.svg"); }
.i-pool { --icon: url("../icons/tool_pool.svg"); }
.i-floorplan { --icon: url("../icons/tool_floorplan.svg"); }
.i-custom { --icon: url("../icons/sparkles.svg"); }
.i-camera { --icon: url("../icons/camera.svg"); }
@media (min-width: 640px) { .tools-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } .tool { padding: 20px; } }
@media (min-width: 1024px) { .tools-grid { grid-template-columns: repeat(5, 1fr); } }
.tools-note { margin-top: 24px; color: var(--muted); font-size: .9375rem; text-align: center; }

/* ---------- Styles marquee ---------- */
.marquee { position: relative; overflow: hidden; padding-block: 6px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 60s linear infinite; list-style: none; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 7px)); } }
.style-card { position: relative; width: 168px; flex: none; border-radius: 20px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-sm); }
.style-card img { width: 100%; aspect-ratio: 360 / 408; object-fit: cover; }
.style-card span { position: absolute; left: 10px; bottom: 10px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #0F172A; font-weight: 700; font-size: .8125rem; }
@media (min-width: 768px) { .style-card { width: 200px; } }
.palettes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 36px; list-style: none; }
.palette { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 500; font-size: .875rem; color: var(--ink-2); }
.palette .sw { display: inline-flex; }
.palette .sw i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -6px; }
.palette .sw i:first-child { margin-left: 0; }
.more-styles { margin-top: 22px; text-align: center; color: var(--muted); font-size: .9375rem; }

/* palette swatch colours (from the app) */
.c-e7dec8 { background: #E7DEC8; } .c-cbb89d { background: #CBB89D; } .c-8c7a6b { background: #8C7A6B; }
.c-1e293b { background: #1E293B; } .c-f8fafc { background: #F8FAFC; } .c-0f172a { background: #0F172A; }
.c-b45309 { background: #B45309; } .c-d97706 { background: #D97706; } .c-fde68a { background: #FDE68A; }
.c-0284c7 { background: #0284C7; } .c-38bdf8 { background: #38BDF8; } .c-bae6fd { background: #BAE6FD; }
.c-166534 { background: #166534; } .c-22c55e { background: #22C55E; } .c-dcfce7 { background: #DCFCE7; }
.c-fbcfe8 { background: #FBCFE8; } .c-e9d5ff { background: #E9D5FF; } .c-fef3c7 { background: #FEF3C7; }
.c-0ea5e9 { background: #0EA5E9; } .c-f1f5f9 { background: #F1F5F9; } .c-fbbf24 { background: #FBBF24; }
.c-0f5a56 { background: #0F5A56; } .c-ffd928 { background: #FFD928; }
.c-e2e8f0 { background: #E2E8F0; } .c-cbd5e1 { background: #CBD5E1; } .c-94a3b8 { background: #94A3B8; }

/* ---------- Assistant chat mockup ---------- */
.chat-visual { position: relative; display: grid; place-items: center; min-height: 600px; }
.chat-visual .phone { position: relative; }
.chat-visual::before { content: ""; position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: var(--glow-1); filter: blur(60px); z-index: -1; }
.chat { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 6px 12px 12px; overflow: hidden; }
.bubble { max-width: 86%; padding: 9px 11px; border-radius: 16px; font-size: 11px; line-height: 1.45; }
.bubble.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 6px; }
.bubble.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); color: var(--ink); border-bottom-left-radius: 6px; }
.bubble img { width: 100%; border-radius: 11px; margin-bottom: 7px; aspect-ratio: 3 / 2; object-fit: cover; }
.bubble .suggest { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.bubble .suggest span { padding: 3px 7px; border-radius: 999px; background: var(--mint-2); color: var(--brand); font-weight: 700; font-size: 9.5px; }
.bubble .gen { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 9px; padding: 8px; border-radius: 11px; background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 10.5px; }
.bubble .gen svg { width: 12px; height: 12px; }
.typing { display: inline-flex; gap: 4px; align-self: flex-start; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.4s infinite both; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-input { display: flex; align-items: center; gap: 8px; margin: 0 12px 14px; padding: 8px 8px 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.chat-input span { flex: 1; }
.chat-input i { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); flex: none; }

/* ---------- 2D / 3D planner ---------- */
.planner-visual { position: relative; }
.view-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.view-tabs button { font: inherit; font-weight: 700; font-size: .875rem; padding: 8px 16px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .2s ease, color .2s ease; }
.view-tabs button[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); }
.view-stage { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: #F5F4EF; box-shadow: var(--shadow-lg); }
.view-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s ease, transform .6s ease; }
.view-stage img[hidden] { display: block; opacity: 0; transform: scale(1.03); pointer-events: none; }
.view-stage .plan-img { object-fit: contain; padding: 4%; background: #F7F6F1; }
.exports { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; list-style: none; }
.exports li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.exports svg { width: 16px; height: 16px; color: var(--brand); }

/* ---------- Render cards ---------- */
.render-grid { display: grid; gap: 16px; margin-top: 8px; }
@media (min-width: 768px) { .render-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
.render-card { overflow: hidden; display: flex; flex-direction: column; }
.render-card .rc-media { position: relative; aspect-ratio: 720 / 538; background: var(--surface-2); overflow: hidden; }
.render-card .rc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.render-card:hover .rc-media img { transform: scale(1.04); }
.render-card .rc-body { padding: 22px; }
.render-card h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
.render-card p { margin-top: 6px; color: var(--muted); }
.rc-badge { position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #0F5A56; font-size: .8125rem; font-weight: 700; }
.rc-badge svg { width: 14px; height: 14px; }

/* ---------- Templates ---------- */
.h-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 78%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 18px; margin-inline: calc(var(--gutter) * -1); list-style: none; scrollbar-width: thin; overscroll-behavior-x: contain; }
.h-scroll > * { scroll-snap-align: start; }
@media (min-width: 768px) { .h-scroll { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); gap: 20px; overflow: visible; margin-inline: 0; padding: 0; } }
.tpl { overflow: hidden; }
.tpl img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.tpl .tpl-body { padding: 14px 16px 16px; }
.tpl h3 { font-size: 1rem; letter-spacing: -0.01em; }
.tpl p { margin-top: 2px; color: var(--muted); font-size: .875rem; }

/* ---------- Build: estimator + academy ---------- */
.build-grid { display: grid; gap: 20px; }
@media (min-width: 960px) { .build-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.build-card { padding: 24px; display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
@media (min-width: 768px) { .build-card { padding: 32px; } }
.build-card h3 { font-size: clamp(1.375rem, 1.2rem + .6vw, 1.75rem); letter-spacing: -0.025em; }
.build-card > p { color: var(--muted); }
.estimate { border-radius: 18px; background: var(--mint); border: 1px solid var(--mint-2); padding: 16px; display: grid; gap: 10px; margin-top: auto; }
.estimate .row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: .9375rem; }
.estimate .row span { color: var(--muted); }
.estimate .row b { font-weight: 700; text-align: right; }
.estimate .bars { display: grid; gap: 7px; padding: 4px 2px; }
.estimate .bar { height: 8px; border-radius: 999px; background: var(--mint-2); overflow: hidden; }
.estimate .bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.w-80 { width: 80%; } .w-55 { width: 55%; } .w-35 { width: 35%; }
.academy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: auto; }
.academy-grid figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.academy-grid img { width: 100%; height: 100%; object-fit: cover; }
.academy-grid figcaption { position: absolute; left: 6px; bottom: 6px; right: 6px; padding: 3px 7px; border-radius: 8px; background: rgba(15, 23, 42, .66); color: #fff; font-size: .6875rem; font-weight: 700; line-height: 1.3; }
.stage-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.stage-list li { padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .8125rem; font-weight: 500; }

/* ---------- Inspiration gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; list-style: none; }
.gallery li { position: relative; border-radius: 18px; overflow: hidden; background: var(--surface-2); aspect-ratio: 3 / 2; }
.gallery li:first-child { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.gallery li:hover img { transform: scale(1.05); }
@media (min-width: 768px) {
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .gallery li:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
}

/* ---------- Privacy highlight ---------- */
.privacy-band { display: grid; gap: 28px; padding: 28px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--mint) 0%, var(--surface) 70%); border: 1px solid var(--mint-2); }
@media (min-width: 960px) { .privacy-band { grid-template-columns: 1fr 1.4fr; padding: 48px; gap: 48px; align-items: center; } }
.privacy-points { display: grid; gap: 14px; list-style: none; }
@media (min-width: 640px) { .privacy-points { grid-template-columns: 1fr 1fr; } }
.privacy-points li { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.privacy-points svg { width: 24px; height: 24px; color: var(--brand); }
.privacy-points h3 { margin-top: 12px; font-size: 1rem; letter-spacing: -0.01em; }
.privacy-points p { margin-top: 4px; color: var(--muted); font-size: .9rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin-inline: auto; display: grid; gap: 10px; }
.faq details { border-radius: 18px; background: var(--surface); border: 1px solid var(--border); transition: box-shadow .2s ease; }
.faq details[open] { box-shadow: var(--shadow-md); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-weight: 700; font-size: 1.0313rem; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center/14px no-repeat; transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 20px 20px; color: var(--ink-2); }
.faq .answer p + p, .faq .answer p + ul, .faq .answer ul + p { margin-top: 10px; }
.faq .answer ul { padding-left: 20px; }
.faq .answer li + li { margin-top: 4px; }
.faq-more { text-align: center; margin-top: 28px; }

/* ---------- Final CTA ---------- */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  padding: 56px 20px; border-radius: 32px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #14B8A6 0%, rgba(20, 184, 166, 0) 50%), linear-gradient(160deg, #0F5A56 0%, #083A38 100%);
  box-shadow: var(--shadow-lg);
}
.cta-band::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: radial-gradient(80% 80% at 50% 0%, #000, transparent); mask-image: radial-gradient(80% 80% at 50% 0%, #000, transparent); pointer-events: none; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band img.cta-icon { width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 20px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.cta-band h2 { font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem); letter-spacing: -0.035em; }
.cta-band p { margin: 14px auto 0; max-width: 560px; color: rgba(255, 255, 255, .82); font-size: 1.0625rem; }
.cta-band .store-row { justify-content: center; margin-top: 30px; }
.cta-band .store-btn.is-soon { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .75); }
.cta-band .store-btn.is-soon strong { color: #fff; }
@media (min-width: 768px) { .cta-band { padding: 80px 40px; } }

/* ---------- Footer ---------- */
.site-footer { padding: 48px 0 32px; border-top: 1px solid var(--border); background: var(--bg-alt); color: var(--muted); font-size: .9375rem; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-grid h2 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin-bottom: 12px; }
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-about p { margin-top: 12px; max-width: 380px; }
.footer-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: .8125rem; }
.footer-legal:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
@media (min-width: 768px) { .footer-legal { grid-template-columns: auto 1fr; gap: 24px; } .footer-legal p:last-child { text-align: right; } }

/* ---------- Document pages (privacy, terms, support) ---------- */
.doc-hero { padding: 48px 0 8px; }
.doc-hero h1 { font-size: clamp(2.125rem, 1.5rem + 3vw, 3.25rem); letter-spacing: -0.04em; line-height: 1.05; }
.doc-hero .lead { max-width: 680px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--muted); font-size: .875rem; }
.draft-note {
  display: grid; grid-template-columns: 24px 1fr; gap: 12px; margin-top: 24px; padding: 16px 18px;
  border-radius: 16px; background: #FEF3C7; border: 1px solid #FCD34D; color: #78350F; font-size: .9375rem;
}
.draft-note svg { width: 24px; height: 24px; }
.draft-note strong { color: #78350F; }
:root[data-theme="dark"] .draft-note { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .4); color: #FDE68A; }
:root[data-theme="dark"] .draft-note strong { color: #FEF3C7; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .draft-note { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .4); color: #FDE68A; }
  :root:not([data-theme="light"]) .draft-note strong { color: #FEF3C7; }
}
.ph { padding: 1px 6px; border-radius: 6px; background: #FEF3C7; color: #92400E; font-weight: 700; font-size: .92em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
:root[data-theme="dark"] .ph { background: rgba(251, 191, 36, .18); color: #FDE68A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ph { background: rgba(251, 191, 36, .18); color: #FDE68A; } }

.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; padding-bottom: var(--section-y); }
.prose { min-width: 0; }
@media (min-width: 1024px) { .doc-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; } }
.toc { display: none; }
@media (min-width: 1024px) {
  .toc { display: block; position: sticky; top: 96px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); font-size: .875rem; }
  .toc h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
  .toc ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; color: var(--muted); }
  .toc .toc-top { margin-bottom: 8px; }
  .toc a { color: var(--ink-2); text-decoration: none; }
  .toc a:hover { color: var(--brand); text-decoration: underline; }
}
.prose { max-width: 760px; color: var(--ink-2); font-size: 1.0313rem; }
.prose h2 { margin-top: 44px; margin-bottom: 12px; font-size: 1.5rem; letter-spacing: -0.025em; color: var(--ink); scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 26px; margin-bottom: 8px; font-size: 1.125rem; color: var(--ink); }
.prose p { margin-top: 12px; }
.prose ul, .prose ol { margin-top: 12px; padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--ink); }
.prose .summary-box { margin-top: 8px; padding: 20px 22px; border-radius: 18px; background: var(--mint); border: 1px solid var(--mint-2); }
.prose .summary-box h2 { margin: 0 0 8px; font-size: 1.125rem; }
.prose .summary-box ul { margin-top: 6px; }
.table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.5; min-width: 560px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: .875rem; }
.prose tr:last-child td { border-bottom: 0; }
/* On phones, site.js turns the table into stacked cards (labels come from the header row). */
@media (max-width: 639px) {
  .prose table.is-stacked { min-width: 0; }
  .is-stacked thead { display: none; }
  .is-stacked tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .is-stacked tr:last-child { border-bottom: 0; }
  .prose .is-stacked td { display: block; padding: 3px 0; border: 0; }
  .is-stacked td::before { content: attr(data-label); display: block; margin-top: 6px; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .is-stacked td:first-child::before { display: none; }
  .is-stacked td:first-child { font-weight: 700; color: var(--ink); }
}

/* Support page */
.help-cards { display: grid; gap: 14px; margin-top: 32px; }
@media (min-width: 768px) { .help-cards { grid-template-columns: repeat(3, 1fr); } }
.help-card { padding: 20px; text-decoration: none; color: var(--ink); transition: transform .2s ease, box-shadow .2s ease; }
.help-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.help-card svg { width: 26px; height: 26px; color: var(--brand); }
.help-card h2 { margin-top: 12px; font-size: 1.0625rem; letter-spacing: -0.01em; }
.help-card p { margin-top: 4px; color: var(--muted); font-size: .9375rem; }
.faq-group { margin-top: 48px; }
.faq-group > h2 { font-size: 1.375rem; letter-spacing: -0.02em; margin-bottom: 14px; scroll-margin-top: 96px; }
.faq.left { margin-inline: 0; max-width: 820px; }
.tips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; list-style: none; padding: 0 !important; }
@media (min-width: 640px) { .tips { grid-template-columns: repeat(3, 1fr); } }
.tips li { margin: 0 !important; }
.tips figure { margin: 0; border-radius: 14px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.tips img { width: 100%; aspect-ratio: 240 / 273; object-fit: cover; }
.tips figcaption { padding: 8px 10px; font-size: .8125rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tips .good { color: #15803D; }
.tips .bad { color: #B91C1C; }
:root[data-theme="dark"] .tips .good { color: #4ADE80; }
:root[data-theme="dark"] .tips .bad { color: #F87171; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tips .good { color: #4ADE80; } :root:not([data-theme="light"]) .tips .bad { color: #F87171; } }
.support-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 56px; padding-bottom: var(--section-y); }
.support-aside { display: grid; gap: 16px; align-content: start; margin-top: 56px; }
.contact-card { padding: 28px; display: grid; gap: 16px; scroll-margin-top: 96px; }
.contact-card .btn { justify-self: start; }
.side-links { padding: 20px 24px; }
.side-links h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.side-links ul { list-style: none; display: grid; gap: 6px; }
.side-links a { text-decoration: none; font-weight: 500; }
.side-links a:hover { text-decoration: underline; }
@media (min-width: 1024px) {
  .support-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .support-aside { position: sticky; top: 96px; margin-top: 48px; }
}
.contact-card h2 { font-size: 1.5rem; letter-spacing: -0.025em; }
.contact-card p { margin-top: 6px; color: var(--muted); }

/* 404 */
.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.not-found .code { font-size: clamp(4rem, 3rem + 8vw, 8rem); font-weight: 700; letter-spacing: -0.06em; line-height: 1; background: linear-gradient(135deg, var(--brand), #0EA5E9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found h1 { margin-top: 12px; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); letter-spacing: -0.03em; }
.not-found p { margin-top: 10px; color: var(--muted); }
.not-found .btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .wipe .after { clip-path: inset(0 0 0 50%); }
  .wipe .line { left: 50%; opacity: 1; }
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; }
  .marquee-track [aria-hidden="true"] { display: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .toc, .draft-note svg { display: none !important; }
  body { background: #fff; color: #000; }
  .prose { max-width: none; }
}
