@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --ink: #181817;
  --ink-2: #242422;
  --bone: #ecece6;
  --paper: #f7f7f3;
  --card: #ffffff;
  --accent: #315efb;
  --accent-deep: #2047c8;
  --brass: #c2922e;
  --brass-deep: #9c7420;
  --steel: #70716c;
  --on-ink: #f7f7f3;
  --on-ink-mut: #aaa9a2;
  --text: #181817;
  --text-mut: #62625d;
  --line: #d9d9d2;
  --line-ink: #343431;
  --maxw: 1120px;
  --r: 8px;
  --r-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(24, 24, 23, 0.05);
  --shadow-md: 0 14px 34px rgba(24, 24, 23, 0.09);
}

html[data-theme="dark"] {
  --paper: #171716;
  --card: #222220;
  --bone: #2b2b28;
  --text: #f4f4ef;
  --text-mut: #aaa9a2;
  --line: #383835;
  --ink: #101010;
  --ink-2: #191918;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 16px 38px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
}
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button, input, textarea, select { font-family: inherit; }
svg { display: block; }
.container { width: min(100%, calc(var(--maxw) + 48px)); margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-primary { color: #fff; background: var(--ink); border-color: var(--ink); }
.btn-primary:hover { color: #fff; background: var(--accent); border-color: var(--accent); text-decoration: none; box-shadow: 0 7px 18px rgba(49, 94, 251, .18); }
.btn-ink { color: #fff; background: var(--ink); border-color: var(--ink); }
.btn-ink:hover { color: #fff; background: var(--accent); border-color: var(--accent); text-decoration: none; }
.btn-ghost { color: var(--text); background: transparent; border-color: var(--line); }
.btn-ghost:hover { color: var(--text); background: var(--card); border-color: var(--text-mut); text-decoration: none; }
.btn-lg { min-height: 48px; padding: 13px 21px; font-size: 16px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 22px;
  padding: 10px max(24px, calc((100vw - var(--maxw)) / 2));
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.site-header .brand > svg, .site-footer .brand > svg { display: none; }
.site-header .brand::before,
.site-footer .brand::before {
  width: 30px;
  height: 30px;
  flex: none;
  background: url("brand-mark.svg") center / contain no-repeat;
  content: "";
}
.site-footer .brand::before { width: 28px; height: 28px; }
.brand-name { color: inherit; font-family: inherit; font-size: 20px; font-weight: 700; line-height: 1; }
.site-header .brand-name::after {
  content: " beta";
  display: inline;
  margin-left: 7px;
  color: var(--text-mut);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: lowercase;
  vertical-align: 5px;
}
.nav { display: flex; align-items: center; gap: 24px; margin-left: 18px; }
.nav a { color: var(--text-mut); font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav-cta { display: flex; align-items: center; gap: 9px; margin-left: auto; }

/* Footer */
.site-footer { margin-top: 96px; color: var(--on-ink-mut); background: var(--ink); border-top: 1px solid var(--line-ink); }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(0, 2.5fr);
  gap: 72px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 24px 42px;
}
.footer-brand .brand-name { color: var(--on-ink); }
.footer-brand p { max-width: 29ch; margin: 16px 0 22px; font-size: 14px; line-height: 1.6; }
.footer-cta { display: inline-block; padding-bottom: 2px; color: var(--on-ink); font-size: 14px; font-weight: 600; border-bottom: 1px solid #666660; }
.footer-cta:hover { color: #fff; text-decoration: none; border-color: #fff; }
.footer-status { display: block; margin-top: 17px; color: var(--on-ink-mut); font-size: 12px; }
.footer-status:hover { color: var(--on-ink); text-decoration: none; }
.footer-status .dot { display: none; }
.footer-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.footer-cols h4 {
  margin: 0 0 14px;
  color: #777771;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}
.footer-cols a { display: block; margin-bottom: 8px; color: var(--on-ink-mut); font-size: 13px; line-height: 1.35; }
.footer-cols a:hover { color: #fff; text-decoration: none; }
.footer-base, .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 24px 34px;
  border-top: 1px solid var(--line-ink);
  font-size: 12px;
}
.footer-cols .leg { column-count: auto; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.language-chooser {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 7px 10px;
  color: var(--on-ink);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line-ink);
  border-radius: 10px;
}
.language-chooser svg { flex: none; opacity: .72; }
.language-chooser label { display: flex; }
.language-chooser select {
  min-width: 92px;
  padding: 0 22px 0 0;
  color: inherit;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.language-chooser select option { color: #181817; background: #fff; }
.language-chooser-menu {
  width: 100%;
  margin: 6px 0;
  justify-content: space-between;
  color: var(--text);
  background: var(--card);
  border-color: var(--line);
}
.language-chooser-floating {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 900;
  margin: 0;
  color: var(--text);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Shared public-page layouts */
.section { padding: 72px 0; }
.eyebrow { margin: 0 0 14px; color: var(--text-mut); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: uppercase; }
.lead { max-width: 60ch; color: var(--text-mut); font-size: 18px; }
.hero { padding: 76px 0 58px; text-align: left; }
.hero .mark-lg { display: none; }
.hero h1 { max-width: 17ch; margin: 0 0 18px; font-size: 64px; }
.hero h1 em { color: inherit; font-style: normal; }
.hero .lead { margin: 0 0 28px; font-size: 20px; }
.hero-cta { display: flex; justify-content: flex-start; gap: 10px; flex-wrap: wrap; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; border-top: 1px solid var(--line); }
.feature {
  min-width: 0;
  padding: 28px 0 34px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.feature:hover { transform: none; border-color: var(--line); box-shadow: none; }
.feature .ic { display: none; }
.feature h3 { margin-bottom: 8px; font-size: 20px; }
.feature p { margin: 0; color: var(--text-mut); font-size: 15px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; counter-reset: s; }
.step { position: relative; padding-top: 42px; }
.step::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
  counter-increment: s;
  content: "0" counter(s);
}
.step h3 { margin-bottom: 6px; font-size: 19px; }
.step p { margin: 0; color: var(--text-mut); font-size: 15px; }

.cta-band { padding: 54px; color: var(--on-ink); background: var(--ink); border: 1px solid var(--line-ink); border-radius: var(--r); text-align: left; box-shadow: none; }
.cta-band h2 { margin-bottom: 14px; color: #fff; font-size: 40px; }
.cta-band p { max-width: 46ch; margin: 0 0 26px; color: var(--on-ink-mut); }

.doc { max-width: 760px; margin: 0 auto; padding: 64px 24px 0; }
.doc h1 { margin-bottom: 10px; font-size: 50px; }
.doc .updated { color: var(--text-mut); font-size: 14px; }
.doc .notice { margin: 24px 0; padding: 14px 16px; color: var(--text); background: #eef2ff; border: 1px solid #cdd7ff; border-radius: var(--r); font-size: 14px; }
html[data-theme="dark"] .doc .notice { background: #202844; border-color: #384a85; }
.doc h2 { margin: 38px 0 10px; font-size: 25px; }
.doc h3 { margin: 24px 0 8px; font-size: 18px; }
.doc p, .doc li { color: var(--text); font-size: 16px; }
.doc ul { padding-left: 20px; }
.doc a { text-decoration: underline; text-underline-offset: 3px; }

.form-field { margin-bottom: 18px; }
.form-field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.input, textarea.input { width: 100%; padding: 13px 14px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); font: inherit; font-size: 15px; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.12); }

/* Normalize page-specific legacy components that are defined after this file. */
.pr-card { border-radius: var(--r) !important; box-shadow: none !important; }
.pr-card.feat { border-color: var(--ink) !important; }
.pr-badge { color: #fff !important; background: var(--ink) !important; border-radius: 2px !important; }
.pr-name, .pr-price { font-family: inherit !important; }
.pr-soon { border-radius: var(--r) !important; }
.pr-wrap h1 { font-size: 52px !important; }

/* Bring page-specific legacy surfaces into the current product system. */
.faq h2,
.dl-card h2,
.demo-head strong,
.st-wrap .big,
.pr-name,
.pr-price { font-family: inherit !important; letter-spacing: 0 !important; }
.st-wrap h1,
.st-wrap .big { letter-spacing: 0 !important; }
.st-wrap .big { font-size: 32px !important; font-style: normal !important; }
.brass { color: var(--accent-deep) !important; }

.faq details,
.dl-card,
.dl-safety,
.demo-side,
.demo-chat,
.demo-form,
.road-col,
.st-card,
.ap .hash { border-radius: var(--r) !important; box-shadow: none !important; }
.faq summary,
.demo-btn,
.dl-btn,
.ap .dl { transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease !important; }
.faq summary:hover,
.demo-btn:hover { background: color-mix(in srgb, var(--card) 72%, var(--accent) 5%) !important; }
.faq summary::after { color: var(--accent) !important; }
.demo-btn,
.dl-btn,
.ap .dl { border-radius: var(--r-sm) !important; }
.demo-btn:hover,
.dl-btn:hover,
.ap .dl:hover { transform: translateY(-1px); }
.demo-btn:hover,
.demo-btn.on { color: var(--text) !important; background: #eef2ff !important; border-color: #aebdff !important; }
.demo-head svg { display: none; }
.dmsg { border-radius: var(--r) !important; }
.dmsg.u { background: var(--ink) !important; border-bottom-right-radius: 3px !important; }
.dmsg.b { background: #eef2ff !important; border-bottom-left-radius: 3px !important; }
html[data-theme="dark"] .demo-btn:hover,
html[data-theme="dark"] .demo-btn.on,
html[data-theme="dark"] .dmsg.b { background: #202844 !important; border-color: #384a85 !important; }

.dl-bonus,
.dl-ver,
.ap .ver { color: var(--accent-deep) !important; background: #eef2ff !important; border-radius: 6px !important; }
.dl-btn,
.ap .dl { color: #fff !important; background: var(--ink) !important; }
.dl-btn:hover,
.ap .dl:hover { background: var(--accent) !important; }
.dl-card h2 { font-size: 21px !important; }
.dl-icon,
.ap img { border-radius: 18px !important; box-shadow: 0 8px 24px rgba(24, 24, 23, .14) !important; }
.pr-badge { border-radius: 6px !important; }
.st-card,
.road-col { transition: border-color .15s ease, background-color .15s ease; }
.st-card:hover,
.road-col:hover { border-color: color-mix(in srgb, var(--line) 55%, var(--text-mut)); }

/* Mobile install prompt injected by assets/pwa.js. */
.app-install-prompt {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 9998;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 36px;
  gap: 11px;
  align-items: center;
  width: min(calc(100% - 24px), 560px);
  margin: 0 auto;
  padding: 11px 10px 11px 12px;
  color: #f7f7f3;
  background: #181817;
  border: 1px solid #343431;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  animation: app-prompt-in .22s ease-out both;
}

.app-install-prompt-consent {
  top: 72px;
  bottom: auto;
}

@keyframes app-prompt-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-install-prompt-chat {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 5;
  width: auto;
  max-width: 720px;
  margin: 8px 12px 0;
  box-shadow: none;
}

.app-install-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: url("brand-mark.svg") center / contain no-repeat;
}

.app-install-copy {
  display: block;
  min-width: 0;
}

.app-install-copy strong,
.app-install-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-install-copy strong {
  color: #f7f7f3;
  font-size: 14px;
  line-height: 1.25;
}

.app-install-copy span {
  margin-top: 2px;
  color: #aaa9a2;
  font-size: 12px;
  line-height: 1.3;
}

.app-install-action {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: #fff;
  background: var(--accent);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.app-install-action:hover {
  color: #fff;
  background: var(--accent-deep);
  text-decoration: none;
}

.app-install-close {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: #aaa9a2;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.app-install-close:hover {
  color: #fff;
  background: #2a2a28;
}

@media (max-width: 600px) {
  .st-wrap .big { font-size: 26px !important; }
  .dl-icon,
  .ap img { border-radius: 16px !important; }
}

@media (max-width: 980px) {
  .footer-inner { grid-template-columns: 1fr; gap: 38px; }
  .footer-brand p { max-width: 44ch; }
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .section { padding: 54px 0; }
  .hero { padding: 56px 0 40px; }
  .hero h1 { font-size: 48px; }
  .cta-band h2 { font-size: 36px; }
  .doc h1, .pr-wrap h1 { font-size: 42px !important; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cta-band { padding: 38px 24px; }
}

@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .site-header { min-height: 58px; padding-inline: 18px; }
  .site-header .brand-name { font-size: 18px; }
  .hero h1 { font-size: 40px; }
  .cta-band h2 { font-size: 32px; }
  .doc h1, .pr-wrap h1 { font-size: 36px !important; }
  .nav-cta .btn-ghost { display: none; }
  .nav-cta .btn { min-height: 38px; padding: 9px 13px; font-size: 14px; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-inner { padding: 48px 18px 32px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 30px 22px; }
  .footer-base { flex-direction: column; gap: 5px; padding: 18px 18px 28px; }
  .doc { padding: 48px 18px 0; }
  .doc table { width: 100%; table-layout: fixed; }
  .doc th, .doc td { overflow-wrap: anywhere; }
  .app-install-prompt-chat { margin-inline: 12px; }
  .app-install-prompt-consent { top: calc(58px + env(safe-area-inset-top)); }
}

@media (max-width: 390px) {
  .app-install-prompt {
    grid-template-columns: 34px minmax(0, 1fr) auto 32px;
    gap: 8px;
    padding-left: 9px;
    padding-right: 7px;
  }
  .app-install-mark { width: 34px; height: 34px; font-size: 15px; }
  .app-install-action { min-height: 36px; padding-inline: 10px; }
  .app-install-close { width: 32px; height: 34px; }
  .app-install-copy span { font-size: 11px; }
  .app-install-copy strong {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

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