/* XenChats public site. Colors from the XenWorker brand (brand/README.md); night mode matches the agent app. */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/site/fonts/space-grotesk-700-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FFFFFF;
  --bg-soft: #F4F7F0;
  --surface: #FFFFFF;
  --surface-2: #F4F6F2;
  --text: #1A2016;
  --muted: #576052;
  --ink: #10140D;              /* headings */
  --line: #E2E7DC;
  --border-strong: #C9D2C1;
  --accent: #3F7A1F;           /* links, labels */
  --btn: #3F7A1F;
  --btn-hover: #356A19;
  --on-btn: #FFFFFF;
  --chip-bg: #EDF5E4;
  --chip-border: #D6E8C2;
  --header-bg: rgba(255, 255, 255, .86);
  --glow-a: rgba(168, 213, 112, .30);
  --glow-b: rgba(106, 168, 50, .12);
  --dots: #D5DBD0;
  --live-grad: linear-gradient(90deg, #3F7A1F, #6AA832);
  --band: #10140D;             /* the dark AI band */
  --tick-bg: #E6F2DA;
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.8 12.5l-1.4 1.4 5.1 5.1L20.6 7.9l-1.4-1.4z' fill='%233F7A1F'/%3E%3C/svg%3E");
  --tick-dark-bg: rgba(168, 213, 112, .16);
  --tick-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.8 12.5l-1.4 1.4 5.1 5.1L20.6 7.9l-1.4-1.4z' fill='%23A8D570'/%3E%3C/svg%3E");
  --shadow: 0 1px 2px rgba(16, 20, 13, .06), 0 12px 32px -8px rgba(16, 20, 13, .16);
  --shadow-lg: 0 2px 4px rgba(16, 20, 13, .06), 0 32px 80px -16px rgba(16, 20, 13, .28);
  --radius: 14px;
  --head: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

/* Night mode (same switch and key as the agent app). */
:root[data-theme="dark"] {
  --bg: #0E120C;
  --bg-soft: #131910;
  --surface: #171D14;
  --surface-2: #1C2318;
  --text: #DCE4D5;
  --muted: #A3AE9B;
  --ink: #F1F5EC;
  --line: #283023;
  --border-strong: #3D4836;
  --accent: #9CCF5F;
  --btn: #7DBB3F;
  --btn-hover: #8BC34A;
  --on-btn: #0E120C;
  --chip-bg: #1A2414;
  --chip-border: #2F3F24;
  --header-bg: rgba(14, 18, 12, .84);
  --glow-a: rgba(125, 187, 63, .16);
  --glow-b: rgba(106, 168, 50, .08);
  --dots: #3A4434;
  --live-grad: linear-gradient(90deg, #B7E07F, #8BC34A);
  --band: #080B07;
  --tick-bg: var(--tick-dark-bg);
  --tick: var(--tick-dark);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 40px 90px -20px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  font: 17px/1.6 var(--body);
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, Menlo, monospace; font-size: .88em; }

/* Pictures of the agent app come in a day and a night version. */
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -9999px; top: 8px; background: #10140D; color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid #6AA832; outline-offset: 2px; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px/1 var(--body); text-decoration: none; white-space: nowrap;
  height: 48px; padding: 0 22px; border-radius: 10px; border: 1.5px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 15px; border-radius: 8px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 17px; }
.btn-primary { background: var(--btn); color: var(--on-btn); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: #3F7A1F; }
.btn-light:hover { background: #F1F7EA; }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-row { display: flex; align-items: center; gap: 32px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 9px; }
.brand-name { font: 700 23px/1 var(--head); letter-spacing: -0.02em; }
.xen { color: var(--ink); }
.live { background: var(--live-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top-nav { display: flex; gap: 28px; }
.top-nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; }
.top-nav a:hover { color: var(--accent); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.link-login { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.link-login:hover { color: var(--accent); }

.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer; transition: border-color .15s, background-color .15s;
}
.theme-toggle:hover { border-color: var(--border-strong); background: var(--surface-2); }
.theme-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 0;
  background:
    radial-gradient(60% 50% at 85% 8%, var(--glow-a), transparent 70%),
    radial-gradient(50% 40% at 8% 30%, var(--glow-b), transparent 70%),
    var(--bg);
}
.hero-text { text-align: center; max-width: 920px; }
.eyebrow {
  display: inline-block; font-size: 14px; font-weight: 600; color: var(--accent);
  background: var(--chip-bg); border: 1px solid var(--chip-border); padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(38px, 6.2vw, 72px); line-height: 1.04; letter-spacing: -0.035em; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 720px; margin: 24px auto 0; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.fine { margin-top: 14px; font-size: 14px; color: var(--muted); }

.hero-shot { position: relative; margin-top: 56px; max-width: 1180px; }
.frame {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.frame-hero { box-shadow: var(--shadow-lg); border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
.frame-bar { display: flex; gap: 7px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.frame-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--dots); }
.hero-shot::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }

.chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; font-size: 15px; color: var(--ink); box-shadow: var(--shadow);
  white-space: nowrap;
}
.chip b { color: var(--accent); }
.chip-sale { left: -8px; top: 64%; }
.chip-live { right: 0; top: -22px; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: #6AA832; }
.chip .pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #2EAD4B; }
.chip .pulse::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #2EAD4B; opacity: 0;
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.5); opacity: .7; } 100% { transform: scale(1.4); opacity: 0; } }

/* ---------- feature rows ---------- */
.feature { padding: 112px 0; }
.feature-soft { background: var(--bg-soft); }
.feature-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.feature-row.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature-row.flip .feature-text { order: 2; }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.feature h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; }
.feature-text > p:not(.kicker) { margin-top: 18px; color: var(--muted); font-size: 18px; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; font-weight: 500; }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--tick-bg) var(--tick) center / 15px no-repeat;
}
.feature-img { box-shadow: var(--shadow); }
.feature-img-pad { padding: 18px; background: var(--surface-2); }
.feature-img-pad img { border-radius: 10px; }

/* the dark AI band (darker than the page in night mode too) */
.feature-dark { background: var(--band); color: #DCE4D5; border-block: 1px solid var(--line); }
.feature-dark h2 { color: #fff; }
.feature-dark .kicker { color: #A8D570; }
.feature-dark .feature-text > p:not(.kicker) { color: #B9C4B1; }
.feature-dark .ticks li::before { background: var(--tick-dark-bg) var(--tick-dark) center / 15px no-repeat; }
.feature-dark .frame { border-color: #2A3324; box-shadow: 0 32px 80px -24px rgba(0, 0, 0, .7); }

/* ---------- set up ---------- */
.setup { padding: 112px 0; border-top: 1px solid var(--line); }
.setup-head { text-align: center; max-width: 680px; margin: 0 auto; }
.setup-head h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; }
.setup-head p:not(.kicker) { margin-top: 16px; color: var(--muted); font-size: 18px; }
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 2px rgba(16, 20, 13, .05); }
.step-n {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--btn); color: var(--on-btn); font: 700 17px/1 var(--head); margin-bottom: 18px;
}
.step h3 { font-size: 21px; }
.step p { margin-top: 10px; color: var(--muted); font-size: 16px; }
.step p code { background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; color: var(--ink); }
.code {
  margin: 18px 0 0; padding: 14px 16px; background: #10140D; color: #D8E8C8; border-radius: 10px;
  border: 1px solid var(--line); font-size: 13px; line-height: 1.6; white-space: pre; overflow-x: auto;
}

/* ---------- final call ---------- */
.final { padding: 0 0 88px; }
.final-box {
  text-align: center; color: #fff; padding: 72px 32px; border-radius: 24px; max-width: 1152px;
  background:
    radial-gradient(50% 70% at 95% 0%, rgba(168, 213, 112, .22), transparent 60%),
    linear-gradient(135deg, #26500F, #336A18 50%, #3B751C);
}
.final-box h2 { color: #fff; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; }
.final-box p { margin-top: 14px; font-size: 19px; color: #E4F1D6; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 36px 0 44px; }
.foot-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 28px; align-items: center; }
.brand-foot .brand-name { font-size: 19px; }
.brand-foot img { border-radius: 7px; }
.foot-by { color: var(--muted); font-size: 15px; }
.foot-by a { color: var(--ink); font-weight: 600; text-decoration: none; }
.foot-nav { display: flex; gap: 22px; }
.foot-nav a { color: var(--text); text-decoration: none; font-size: 15px; }
.foot-nav a:hover { color: var(--accent); }
.foot-copy { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }

/* ---------- smaller screens ---------- */
@media (max-width: 960px) {
  .top-nav { display: none; }
  .feature { padding: 80px 0; }
  .feature-row, .feature-row.flip { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .feature-row.flip .feature-text { order: 0; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .chip-sale { left: 12px; top: auto; bottom: 18px; }
  .chip-live { right: 12px; top: 56px; }
  .setup { padding: 80px 0; }
  .final { padding-bottom: 80px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .top-row { height: 64px; gap: 10px; }
  .top-actions { gap: 10px; }
  .theme-toggle { width: 38px; height: 38px; }
  .brand-name { font-size: 21px; }
  .hero { padding-top: 44px; }
  .eyebrow { font-size: 13px; margin-bottom: 18px; }
  .cta-row .btn { flex: 1 1 100%; }
  .hero-shot { margin-top: 40px; }
  .chip { font-size: 13px; padding: 8px 12px; }
  .chip-live { display: none; }
  .frame-bar { padding: 9px 12px; }
  .frame-bar i { width: 9px; height: 9px; }
  .feature-text > p:not(.kicker), .setup-head p:not(.kicker) { font-size: 17px; }
  .final-box { padding: 52px 20px; border-radius: 18px; }
  .foot-row { grid-template-columns: minmax(0, 1fr); }
  .foot-nav { flex-wrap: wrap; gap: 10px 20px; }
}
@media (max-width: 380px) {
  .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chip .pulse::after { animation: none; }
  .btn { transition: none; }
}

/* ======================= menus, pages and footer (build-pages.mjs) ======================= */
.nav-list { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.nav-top { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font: 500 15px/1 var(--body); text-decoration: none; cursor: pointer; }
.nav-top svg { width: 18px; height: 18px; fill: currentColor; transition: transform .15s; }
.nav-top:hover, .has-mega.open > .nav-top { color: var(--accent); background: var(--surface-2); }
.has-mega.open > .nav-top svg { transform: rotate(180deg); }
.has-mega { position: relative; }
.mega {
  display: none; position: absolute; top: calc(100% + 10px); left: -16px; z-index: 60; min-width: 520px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 14px;
}
.mega::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.has-mega.open > .mega { display: block; }
.mega.compact { min-width: 420px; }
.mega-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
.mega-col { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; align-content: start; }
.mega-col a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.mega-col a:hover, .mega-col a:focus-visible { background: var(--bg-soft); }
.mega-col b { display: block; font-size: 15px; font-weight: 600; }
.mega-col span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.mega.compact .mega-col a { padding: 8px 12px; }
.mega-more { display: block; margin-top: 8px; padding: 12px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }
.mega-more:hover { text-decoration: underline; }
.menu-btn { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; padding: 0 10px; flex-direction: column; justify-content: center; gap: 5px; }
.menu-btn span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .15s, opacity .15s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.drawer { border-top: 1px solid var(--line); background: var(--surface); max-height: calc(100vh - 64px); overflow-y: auto; padding: 8px 16px 20px; }
.drawer details { border-bottom: 1px solid var(--line); }
.drawer summary, .drawer-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; font-weight: 600; font-size: 17px; color: var(--ink); cursor: pointer; list-style: none; text-decoration: none; }
.drawer-top { border-bottom: 1px solid var(--line); }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary::after { content: '+'; font-size: 22px; color: var(--muted); }
.drawer details[open] summary::after { content: '\2013'; }
.drawer-links { display: grid; padding: 0 4px 12px; }
.drawer-links a { padding: 9px 0; color: var(--text); text-decoration: none; }
.drawer-more { color: var(--accent) !important; font-weight: 600; }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 72px; } /* room for the chat bubble */
body.drawer-open { overflow: hidden; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 28px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.page-hero { padding-top: 56px; padding-bottom: 72px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 58px); }
.feature-row.no-img { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.feature-link { margin-top: 22px; }
.feature-link a { color: var(--accent); font-weight: 600; text-decoration: none; }
.feature-link a:hover { text-decoration: underline; }

.cards-sec { padding: 88px 0; }
.cards-sec + .cards-sec { padding-top: 0; }
.cards-sec.cards-soft { background: var(--bg-soft); padding-top: 88px; }
.cards-sec .setup-head { margin-bottom: 40px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16, 20, 13, .05); display: flex; flex-direction: column; padding: 24px; scroll-margin-top: 96px; }
.card > a { display: flex; flex-direction: column; flex: 1; margin: -24px; padding: 24px; color: inherit; text-decoration: none; border-radius: var(--radius); }
.card:has(> a):hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.card h3 { font-size: 20px; color: var(--ink); }
.card p { margin-top: 8px; color: var(--muted); font-size: 15px; flex: 1; }
.card-tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.card-go { margin-top: 16px; color: var(--accent); font-weight: 600; font-size: 15px; }
.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.step p a, .help-item a, .help-more a { color: var(--accent); }
.step code, .help-item code { background: var(--bg-soft); padding: 1px 6px; border-radius: 5px; color: var(--ink); font-size: .92em; }

.faq { padding: 88px 0; border-top: 1px solid var(--line); }
.faq-wrap { max-width: 820px; }
.faq h2 { font-size: clamp(28px, 3.2vw, 38px); margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 18px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: '\2013'; }
.faq details p { padding: 0 0 20px; color: var(--muted); font-size: 17px; }

.help { padding: 24px 0 96px; }
.help-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.help-toc { position: sticky; top: 96px; display: grid; gap: 2px; }
.help-toc a { padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.help-toc a:hover { background: var(--bg-soft); color: var(--accent); }
.help-sec { padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.help-sec h2 { font-size: 28px; margin-bottom: 8px; }
.help-item { padding: 16px 0 4px; }
.help-item h3 { font-size: 19px; color: var(--ink); }
.help-item p { margin-top: 6px; color: var(--muted); font-size: 16px; }
.help-more { font-size: 17px; }

.news { padding: 8px 0 96px; }
.news-wrap { max-width: 820px; }
.news-item { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.news-item time { color: var(--muted); font-size: 15px; font-weight: 600; }
.news-item p { color: var(--text); font-size: 16px; }

.status { padding: 8px 0 96px; }
.status-wrap { max-width: 720px; }
.status-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); font-size: 19px; color: var(--ink); }
.status-head.ok { background: var(--chip-bg); border-color: var(--chip-border); }
.status-list { list-style: none; margin: 18px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.status-list li { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--line); }
.status-list li:first-child { border-top: 0; }
.status-list b { color: var(--ink); font-weight: 600; }
.status-note { margin-left: auto; color: var(--muted); font-size: 15px; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }
.ok > .status-dot { background: #2EAD4B; }
.bad > .status-dot { background: #D93025; }
.status-time { margin-top: 14px; color: var(--muted); font-size: 14px; }
.dev-code { max-width: 820px; margin: 32px auto 0; }

/* footer with columns */
.foot { padding: 64px 0 36px; }
.foot-top { display: grid; grid-template-columns: minmax(200px, 1.3fr) repeat(6, minmax(max-content, 1fr)); gap: 28px; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-h { font-weight: 700; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.foot-col a { color: var(--muted); text-decoration: none; font-size: 15px; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.foot-bottom .foot-copy { grid-column: auto; }

@media (max-width: 1100px) {
  .nav-top { padding: 0 9px; }
  .foot-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .top-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .top-cta, .link-login { display: none; }
  .steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .help-toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .help-toc a { background: var(--bg-soft); }
}
@media (min-width: 961px) { .drawer { display: none !important; } }
@media (max-width: 640px) {
  .page-hero { padding-top: 32px; padding-bottom: 48px; }
  .cards-sec, .faq { padding: 64px 0; }
  .steps-4, .steps-2 { grid-template-columns: minmax(0, 1fr); }
  .news-item { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* ======================= pricing (/pricing/) ======================= */
.price-hero { padding-bottom: 40px; }
.billing { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 32px; }
.billing-toggle, .builder-plans { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); }
.billing-btn, .builder-plans button {
  height: 42px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--ink);
  font: 600 15px/1 var(--body); cursor: pointer; transition: background-color .15s, color .15s;
}
.billing-btn:hover, .builder-plans button:hover { background: var(--surface-2); }
.billing-btn[aria-pressed="true"], .builder-plans button[aria-pressed="true"] { background: var(--btn); color: var(--on-btn); }
.billing-save { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.billing-check { width: 20px; height: 20px; border-radius: 50%; background: var(--tick-bg) var(--tick) center / 14px no-repeat; flex-shrink: 0; }

.plans-sec { padding: 8px 0 88px; }
.plans { position: relative; list-style: none; margin: 0; padding: 16px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan-slide { display: flex; }
.plan {
  position: relative; flex: 1; display: flex; flex-direction: column; gap: 24px; padding: 30px 28px 26px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 1px 2px rgba(16, 20, 13, .05);
}
.plan-featured { border: 2px solid var(--btn); box-shadow: var(--shadow); }
.plan-badge {
  position: absolute; top: -14px; left: 26px; padding: 5px 12px; border-radius: 999px;
  background: var(--btn); color: var(--on-btn); font-size: 13px; font-weight: 700; line-height: 1.3;
}
.plan-head h2 { font-size: 26px; }
.plan-desc { margin-top: 8px; color: var(--muted); font-size: 15px; }
.plan-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.plan-amount { font: 700 44px/1.05 var(--head); color: var(--ink); letter-spacing: -0.03em; }
.plan-unit { color: var(--muted); font-size: 15px; }
.plan-billed { margin-top: 6px; color: var(--muted); font-size: 14px; }
.plan-cta { width: 100%; }
.plan-features { flex: 1; }
.plan-intro { font-weight: 700; color: var(--ink); font-size: 15px; }
.plan-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 9px; }
.plan-group { margin-top: 10px; font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--accent); }
.plan-group:first-child { margin-top: 0; }
.plan-feat { position: relative; padding-left: 30px; font-size: 15px; color: var(--text); }
.plan-feat::before { content: ''; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--tick-bg) var(--tick) center / 14px no-repeat; }
.plan-feat b { color: var(--ink); }
.plan-more { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none; }
.plan-more:hover { text-decoration: underline; }
.plan-more svg { width: 20px; height: 20px; fill: currentColor; }
.plans-nav { display: none; }
@media (min-width: 961px) { .plan-price { min-height: 76px; } } /* the three buttons on one line */
.plans-note { margin-top: 28px; text-align: center; color: var(--muted); font-size: 14px; }
.plans-note a { color: var(--accent); font-weight: 600; }

/* the comparison table */
.compare { padding: 88px 0; border-top: 1px solid var(--line); }
.compare-title { text-align: center; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; margin-bottom: 40px; scroll-margin-top: 96px; }
.cmp-row { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.cmp-head { position: sticky; top: 72px; z-index: 5; background: var(--bg); }
.cmp-head .cmp-row { border-bottom: 1px solid var(--border-strong); }
.cmp-corner { align-self: end; padding: 16px 12px 16px 0; font: 700 18px/1.2 var(--head); color: var(--ink); }
.cmp-plan { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; text-align: center; }
.cmp-plan-name { font: 700 19px/1.2 var(--head); color: var(--ink); }
.cmp-plan-price { font-size: 14px; color: var(--muted); }
.cmp-plan-price .plan-amount { font-size: 18px; letter-spacing: -0.01em; }
.cmp-cta { margin-top: 4px; }
.cmp-featured { background: var(--bg-soft); }
.cmp-sec-row { border-bottom: 1px solid var(--line); }
.cmp-sec-btn {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0;
  border: 0; background: none; color: var(--ink); font: 700 19px/1.2 var(--head); text-align: left; cursor: pointer;
}
.cmp-sec-btn svg { width: 26px; height: 26px; fill: currentColor; transition: transform .15s; flex-shrink: 0; }
.cmp-sec-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.cmp-sec-btn:hover { color: var(--accent); }
.cmp-label { padding: 14px 12px 14px 0; font-size: 15px; color: var(--text); }
.cmp-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 8px; text-align: center; font-size: 15px; color: var(--ink); }
.cmp-yes { display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: var(--tick-bg) var(--tick) center / 15px no-repeat; }
.cmp-no { color: var(--muted); }

/* the plan builder */
.builder { padding: 88px 0; border-top: 1px solid var(--line); background: var(--bg-soft); }
.builder-box { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; max-width: 980px; margin: 40px auto 0; }
.builder-in, .builder-out { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.builder-label { display: block; margin-bottom: 10px; font-weight: 700; font-size: 15px; color: var(--ink); }
.builder-field + .builder-field { margin-top: 28px; }
.builder-users { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.builder-users .builder-label { margin-bottom: 0; }
.builder-users input {
  width: 92px; height: 44px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: 600 17px/1 var(--body);
}
.builder-range { display: block; width: 100%; height: 28px; margin: 14px 0 0; accent-color: var(--btn); }
.builder-hint { margin-top: 8px; color: var(--muted); font-size: 14px; }
.builder-lines { margin: 0; }
.builder-lines div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.builder-lines dt { font-size: 15px; color: var(--text); }
.builder-lines dd { margin: 0; font-weight: 600; color: var(--ink); white-space: nowrap; }
.builder-total { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 16px; font-weight: 600; color: var(--ink); }
.builder-sum { font: 700 36px/1.1 var(--head); color: var(--ink); }
.builder-note { margin-top: 6px; color: var(--muted); font-size: 14px; }
.builder-cta { width: 100%; margin-top: 20px; }
.builder-ent { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--bg-soft); font-size: 15px; color: var(--text); }
.builder-ent[hidden] { display: none; }

/* not sure which plan fits */
.fit { padding: 88px 0; }
.fit-box { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; padding: 36px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 1px 2px rgba(16, 20, 13, .05); }
.fit-box h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; }
.fit-box p { margin-top: 8px; color: var(--muted); font-size: 17px; max-width: 560px; }
.fit-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }
.fit + .faq { border-top: 1px solid var(--line); }

@media (max-width: 960px) {
  .plans { display: flex; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 16px; margin: 0 -24px; padding: 18px 24px 6px; }
  .plans::-webkit-scrollbar { display: none; }
  .plan-slide { flex: 0 0 min(420px, 84%); scroll-snap-align: center; }
  .plans-nav { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; }
  .plans-arrow { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; }
  .plans-arrow svg { width: 24px; height: 24px; fill: currentColor; transform: rotate(90deg); }
  .plans-next svg { transform: rotate(-90deg); }
  .plans-arrow:disabled { opacity: .45; cursor: default; }
  .plans-dots { display: flex; }
  .plans-dot { width: 32px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: inline-grid; place-items: center; }
  .plans-dot::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
  .plans-dot[aria-current="true"]::before { background: var(--btn); width: 24px; border-radius: 6px; }
  .cmp-cta { display: none; }
  .builder-box { grid-template-columns: minmax(0, 1fr); }
  .fit-box { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .br-wide { display: none; }
  .billing-btn { padding: 0 16px; }
  .plans { margin: 0 -16px; padding: 18px 16px 6px; }
  .plan { padding: 26px 22px 22px; }
  .plans-sec { padding-bottom: 64px; }
  .compare, .builder, .fit { padding: 64px 0; }
  .cmp-head { top: 64px; }
  .cmp-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cmp-corner { display: none; }
  .cmp-plan { padding: 12px 4px; }
  .cmp-plan-name { font-size: 16px; }
  .cmp-label { grid-column: 1 / -1; padding: 12px 0 2px; font-weight: 600; color: var(--ink); }
  .cmp-cell { padding: 6px 4px 12px; font-size: 14px; }
  .builder-in, .builder-out, .fit-box { padding: 22px 18px; }
  .fit-actions { width: 100%; }
  .fit-actions .btn { flex: 1 1 100%; }
}

/* ======================= legal pages (/terms/, /privacy/, /refund/) ======================= */
.legal-hero { padding-bottom: 40px; }
.legal-hero h1 { font-size: clamp(32px, 4.4vw, 52px); }
.legal-updated { margin-top: 14px; color: var(--muted); font-size: 15px; }
.legal-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.legal-nav a, .legal-nav span { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; text-decoration: none; }
.legal-nav a { color: var(--text); background: var(--surface); }
.legal-nav a:hover { border-color: var(--border-strong); color: var(--accent); }
.legal-nav span { color: var(--accent); background: var(--chip-bg); border-color: var(--chip-border); }
.legal { padding: 8px 0 96px; }
.legal-wrap { max-width: 820px; }
.legal-wrap h2 { font-size: 23px; line-height: 1.25; margin: 40px 0 4px; scroll-margin-top: 96px; }
.legal-wrap p { margin-top: 12px; font-size: 16px; line-height: 1.7; color: var(--text); }
.legal-wrap ul { margin: 12px 0 0; padding-left: 22px; }
.legal-wrap li { margin: 6px 0; font-size: 16px; line-height: 1.6; }
.legal-wrap b { color: var(--ink); }
.legal-wrap a { color: var(--accent); }
.legal-party { color: var(--muted) !important; font-size: 15px !important; }
.legal-notice { padding: 14px 16px; border-left: 3px solid var(--btn); border-radius: 8px; background: var(--bg-soft); font-size: 14.5px !important; font-weight: 600; color: var(--ink) !important; }
.legal-table { margin-top: 14px; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.legal-table th, .legal-table td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: break-word; }
.legal-table th { background: var(--surface-2); color: var(--ink); font-weight: 700; }
@media (max-width: 640px) {
  .legal { padding-bottom: 64px; }
  .legal-wrap h2 { font-size: 21px; margin-top: 32px; }
  /* tables become one card per row, each value under its column name */
  .legal-table thead { display: none; }
  .legal-table table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; }
  .legal-table tr { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  .legal-table td { border: 0; border-top: 1px solid var(--line); padding: 9px 12px; }
  .legal-table td:first-child { border-top: 0; background: var(--surface-2); color: var(--ink); font-weight: 700; }
  .legal-table td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
}
