/* =======================================================================
   Chrysaor — shared design system
   Tokens, layout, and component styles for the public site.
   ======================================================================= */

:root {
  --ink: #11242A;
  --paper: #F7F7F2;
  --cloud: #FFFFFF;
  --tide: #1B8E88;
  --tide-dark: #146B66;
  --brass: #C98742;
  --mist: #DDE9E7;
  --slate: #5C6B70;
  --danger: #B64747;
  --focus: #126CC5;

  --bg: var(--paper);
  --surface: var(--cloud);
  --surface-2: var(--mist);
  --text: var(--ink);
  --text-muted: var(--slate);
  --border: #D9E2DF;
  --border-strong: #BFCBC8;

  --radius-sm: 12px;
  --radius-lg: 18px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'IBM Plex Serif', Georgia, serif;
  --shadow-sm: 0 1px 2px rgba(17, 36, 42, 0.06), 0 1px 1px rgba(17, 36, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(17, 36, 42, 0.08);
  --content-max: 1200px;
  --motion-fast: 150ms;
  --motion-med: 220ms;
}

:root[data-theme="dark"] {
  --bg: #0E1B1F;
  --surface: #16282D;
  --surface-2: #1C3339;
  --text: #EFF4F2;
  --text-muted: #A6B7B4;
  --border: #24393E;
  --border-strong: #32494F;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0E1B1F;
    --surface: #16282D;
    --surface-2: #1C3339;
    --text: #EFF4F2;
    --text-muted: #A6B7B4;
    --border: #24393E;
    --border-strong: #32494F;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

/* ---- Reset ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background var(--motion-med) ease, color var(--motion-med) ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

.sr-only {
  position: absolute;
  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: var(--space-3);
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top var(--motion-fast) ease;
}
.skip-link:focus { top: var(--space-3); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}
@media (max-width: 600px) {
  .container { padding: 0 var(--space-3); }
}

.section { padding: var(--space-7) 0; }
.section-tight { padding: var(--space-6) 0; }
@media (max-width: 720px) {
  .section { padding: var(--space-6) 0; }
  .section-tight { padding: var(--space-5) 0; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--tide);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
:root[data-theme="dark"] .eyebrow,
:root[data-theme="auto"] .eyebrow { color: #4FBDB5; }

h1.display, .display-1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw + 1rem, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}
h2.display-2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw + 1rem, 2.3rem);
  line-height: 1.2;
  margin-bottom: var(--space-2);
}
.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 60ch;
}
.section-head { max-width: 720px; margin-bottom: var(--space-5); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--motion-fast) ease, background var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--tide);
  color: #fff;
}
.btn-primary:hover { background: var(--tide-dark); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost {
  background: transparent;
  color: var(--tide);
}
:root[data-theme="dark"] .btn-ghost,
:root[data-theme="auto"] .btn-ghost { color: #4FBDB5; }
.btn-block { width: 100%; }
.btn-compact { padding: 0.6rem 1.1rem; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---- Header --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 36, 42, 0.96);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: box-shadow var(--motion-med) ease, padding var(--motion-med) ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-right: var(--space-2);
}
.brand-mark { width: 26px; height: 26px; object-fit: contain; }
.brand-word { letter-spacing: -0.01em; }

.primary-nav { flex: 1; }
.primary-nav ul { display: flex; align-items: center; gap: var(--space-1); }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 500;
  color: rgba(255,255,255,0.86);
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease;
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-link[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.12); }
.chev { transition: transform var(--motion-fast) ease; }
.products-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: var(--space-2); }
.signin-link { display: inline-flex; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  color: #fff;
}
.theme-toggle:hover { background: rgba(255,255,255,0.1); }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

.menu-toggle { display: none; width: 38px; height: 38px; align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; }

.products-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: var(--space-4);
  background: var(--cloud);
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  padding: var(--space-2);
  width: min(340px, 90vw);
  display: none;
  gap: 2px;
}
.products-menu.is-open { display: grid; }
.has-menu { position: relative; }
.products-menu-item {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
}
.products-menu-item:hover, .products-menu-item:focus-visible { background: var(--surface-2); }
.products-menu-item-label { display: block; font-weight: 600; font-size: 0.95rem; }
.products-menu-item-desc { display: block; font-size: 0.83rem; color: var(--text-muted); margin-top: 2px; }

.mobile-nav { display: none; }

@media (max-width: 920px) {
  .primary-nav, .signin-link { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav {
    background: rgba(17, 36, 42, 0.98);
    color: #fff;
    border-top: 1px solid rgba(255,255,255,0.12);
  }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav nav { display: flex; flex-direction: column; padding: var(--space-3) var(--space-4) var(--space-4); gap: var(--space-1); }
  .mobile-nav a { padding: 0.75rem 0.25rem; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .mobile-nav hr { border: none; border-top: 1px solid rgba(255,255,255,0.12); margin: var(--space-2) 0; }
  .mobile-nav .btn { margin-top: var(--space-2); }
  .mobile-products summary { cursor: pointer; padding: 0.75rem 0.25rem; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.08); list-style: none; display: flex; justify-content: space-between; }
  .mobile-products summary::-webkit-details-marker { display: none; }
  .mobile-products ul { padding-left: var(--space-3); }
  .mobile-products li a { border-bottom: none; padding: 0.5rem 0.25rem; }
}

/* ---- Footer --------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.82);
  margin-top: var(--space-7);
}
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  justify-content: space-between;
}
.footer-brand { max-width: 260px; }
.footer-brand .brand { margin-bottom: var(--space-2); }
.footer-tagline { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-columns { display: flex; flex-wrap: wrap; gap: var(--space-6); flex: 1; justify-content: flex-end; }
.footer-col h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(255,255,255,0.5); margin-bottom: var(--space-2); }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { font-size: 0.92rem; color: rgba(255,255,255,0.82); }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: var(--space-4);
}
.footer-legal-row { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between; align-items: center; max-width: var(--content-max); margin: 0 auto; }
.footer-ownership { max-width: var(--content-max); margin: 0 auto var(--space-3); font-size: 0.88rem; color: rgba(255,255,255,0.7); }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; font-size: 0.86rem; }
.footer-legal-links a:hover { text-decoration: underline; }
.lang-control select { background: transparent; border: 1px solid rgba(255,255,255,0.25); border-radius: 8px; color: #fff; padding: 4px 8px; }
.lang-control select option { color: #111; }

/* ---- Cards ---------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.card-flat { box-shadow: none; }
.card-elevated { box-shadow: var(--shadow-sm); }

.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.feature-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--motion-fast) ease, transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
a.feature-card:hover, a.feature-card:focus-visible {
  border-color: var(--tide);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--tide);
  margin-bottom: var(--space-1);
}
:root[data-theme="dark"] .feature-icon,
:root[data-theme="auto"] .feature-icon { color: #4FBDB5; }
.feature-card h3 { font-size: 1.05rem; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }
.feature-card .card-cta { margin-top: auto; font-weight: 600; color: var(--tide); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 4px; }
:root[data-theme="dark"] .feature-card .card-cta,
:root[data-theme="auto"] .feature-card .card-cta { color: #4FBDB5; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.badge-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--tide); }
.badge-preview { color: var(--brass); border-color: color-mix(in srgb, var(--brass) 40%, var(--border)); }
.badge-preview .badge-dot { background: var(--brass); }

/* ---- Hero ------------------------------------------------------------ */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--ink) 0%, #16282D 100%);
  color: #fff;
  padding: var(--space-8) 0 var(--space-7);
  overflow: hidden;
  isolation: isolate;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
  animation: auroraDrift 22s ease-in-out infinite alternate;
}
.hero::before {
  width: 620px; height: 620px;
  top: -220px; left: -120px;
  background: radial-gradient(circle at 30% 30%, #1B8E88, transparent 70%);
}
.hero::after {
  width: 520px; height: 520px;
  bottom: -260px; right: -100px;
  background: radial-gradient(circle at 60% 40%, #C98742, transparent 70%);
  animation-duration: 26s;
  animation-delay: -6s;
}
@keyframes auroraDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, -20px) scale(0.96); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after { animation: none; }
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--space-6);
  align-items: center;
  position: relative;
}
@media (max-width: 980px) { .hero-inner { grid-template-columns: 1fr; } }
.hero .eyebrow { color: #7FD1CA; }
.hero h1 { color: #fff; }
.hero .lede { color: rgba(255,255,255,0.78); max-width: 52ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); align-items: center; }
.hero-ctas .btn-secondary { color: #fff; border-color: rgba(255,255,255,0.35); }
.hero-ctas .btn-secondary:hover { background: rgba(255,255,255,0.1); }
.hero-support { margin-top: var(--space-3); font-size: 0.9rem; color: rgba(255,255,255,0.65); }

/* ---- Interactive product preview -------------------------------------- */
.preview-shell {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  color: var(--text);
}
.preview-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.preview-chrome span { width: 9px; height: 9px; border-radius: 999px; background: var(--border-strong); }
.preview-body { display: grid; grid-template-columns: 56px 1fr; min-height: 340px; }
.preview-rail {
  background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 12px 0;
  border-right: 1px solid var(--border);
}
.preview-rail button {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.preview-rail button[aria-pressed="true"] { background: var(--surface); color: var(--tide); box-shadow: var(--shadow-sm); }
.preview-rail button:hover { color: var(--tide); }
.preview-pane { padding: var(--space-3); }
.preview-pane[hidden] { display: none; }

.mail-row { display: flex; gap: 10px; padding: 10px; border-radius: 10px; align-items: flex-start; }
.mail-row + .mail-row { margin-top: 2px; }
.mail-row:hover { background: var(--surface-2); }
.mail-avatar { width: 30px; height: 30px; border-radius: 999px; background: var(--mist); color: var(--tide); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; flex-shrink: 0; }
.mail-meta { flex: 1; min-width: 0; }
.mail-meta .name-line { display: flex; justify-content: space-between; gap: 8px; font-size: 0.85rem; font-weight: 600; }
.mail-meta .time { font-weight: 400; color: var(--text-muted); }
.mail-meta .subject { font-size: 0.85rem; margin-top: 2px; }
.mail-meta .snippet { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-actions { display: flex; gap: 6px; margin-top: var(--space-2); flex-wrap: wrap; }
.mail-actions button { font-size: 0.78rem; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border); color: var(--text-muted); }
.mail-actions button:hover { border-color: var(--tide); color: var(--tide); }

.cal-grid-mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-size: 0.72rem; text-align: center; margin-bottom: var(--space-2); }
.cal-grid-mini span { padding: 4px 0; color: var(--text-muted); }
.cal-grid-mini .day { padding: 6px 0; border-radius: 6px; }
.cal-grid-mini .day.active { background: var(--tide); color: #fff; font-weight: 700; }
.cal-event { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); margin-bottom: 6px; font-size: 0.82rem; }
.cal-event .dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }

.doc-lines { display: flex; flex-direction: column; gap: 8px; }
.doc-lines .line { height: 9px; border-radius: 999px; background: var(--surface-2); }
.doc-lines .line.short { width: 40%; }
.doc-lines .line.med { width: 70%; }

.note-card-mini { padding: 10px; border-radius: 10px; background: var(--surface-2); margin-bottom: 8px; font-size: 0.82rem; }
.note-card-mini strong { display: block; font-size: 0.85rem; margin-bottom: 2px; }

/* ---- Workflow / action sheet ------------------------------------------ */
.workflow-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}
@media (max-width: 860px) { .workflow-demo { grid-template-columns: 1fr; } }
.message-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.message-card .name-line { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--space-2); }
.message-card h3 { font-size: 1.05rem; margin-bottom: var(--space-2); }
.message-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: var(--space-3); }
.action-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.action-row button { padding: 0.55rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); font-size: 0.86rem; font-weight: 600; }
.action-row button:hover { border-color: var(--tide); color: var(--tide); }

.confirm-sheet {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
}
.confirm-sheet[hidden] { display: none; }
.confirm-sheet h4 { margin-bottom: var(--space-2); }
.confirm-field { margin-bottom: var(--space-2); }
.confirm-field label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.confirm-field input { width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg); color: var(--text); }
.toast {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff;
  padding: 0.7rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.88rem; margin-top: var(--space-3);
}
.toast[hidden] { display: none; }

/* ---- Privacy data path diagram ---------------------------------------- */
.data-path { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
@media (max-width: 860px) { .data-path { grid-template-columns: 1fr; } }
.data-path-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  position: relative;
}
.data-path-col h3 { font-size: 1.02rem; margin-bottom: var(--space-2); display: flex; align-items: center; gap: 8px; }
.data-path-col .col-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--tide); }
:root[data-theme="dark"] .data-path-col .col-icon,
:root[data-theme="auto"] .data-path-col .col-icon { color: #4FBDB5; }
.data-path-col ul { margin: var(--space-2) 0 0; }
.data-path-col li { font-size: 0.9rem; color: var(--text-muted); padding-left: 1.1em; position: relative; margin-bottom: 6px; }
.data-path-col li::before { content: "—"; position: absolute; left: 0; color: var(--border-strong); }
.explain-disclosure { margin-top: var(--space-3); }
.explain-disclosure summary {
  cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--tide);
  list-style: none; display: flex; align-items: center; gap: 4px;
}
:root[data-theme="dark"] .explain-disclosure summary,
:root[data-theme="auto"] .explain-disclosure summary { color: #4FBDB5; }
.explain-disclosure summary::-webkit-details-marker { display: none; }
.explain-disclosure summary::after { content: "+"; margin-left: auto; font-weight: 400; }
.explain-disclosure[open] summary::after { content: "−"; }
.explain-disclosure .explain-body { font-size: 0.86rem; color: var(--text-muted); margin-top: var(--space-2); }

.trust-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
@media (max-width: 860px) { .trust-facts { grid-template-columns: 1fr; } }
.trust-fact { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-3); }
.trust-fact h3 { font-size: 0.98rem; margin-bottom: 6px; }

/* ---- Accordion / FAQ --------------------------------------------------- */
.accordion { border-top: 1px solid var(--border); }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) 0;
  text-align: left;
  font-weight: 600;
  font-size: 1rem;
}
.accordion-trigger .plus { flex-shrink: 0; width: 20px; height: 20px; position: relative; }
.accordion-trigger .plus::before, .accordion-trigger .plus::after {
  content: ""; position: absolute; background: var(--text-muted);
  transition: transform var(--motion-fast) ease;
}
.accordion-trigger .plus::before { top: 9px; left: 2px; right: 2px; height: 2px; }
.accordion-trigger .plus::after { left: 9px; top: 2px; bottom: 2px; width: 2px; }
.accordion-trigger[aria-expanded="true"] .plus::after { transform: scaleY(0); }
.accordion-panel { overflow: hidden; max-height: 0; transition: max-height var(--motion-med) ease; }
.accordion-panel-inner { padding-bottom: var(--space-3); color: var(--text-muted); font-size: 0.95rem; max-width: 68ch; }

/* ---- Forms -------------------------------------------------------------- */
.form-field { margin-bottom: var(--space-4); }
.form-field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.form-field .hint { font-size: 0.84rem; color: var(--text-muted); margin-top: 6px; }
.form-field input[type="email"],
.form-field input[type="text"],
.form-field input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
.form-field input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.form-field.has-error input { border-color: var(--danger); }
.form-field .error-msg { color: var(--danger); font-size: 0.84rem; margin-top: 6px; display: none; align-items: center; gap: 6px; }
.form-field.has-error .error-msg { display: flex; }
.form-field.is-valid input { border-color: var(--tide); }

.checkbox-field { display: flex; gap: 10px; align-items: flex-start; margin-bottom: var(--space-4); }
.checkbox-field input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--tide); }
.checkbox-field label { font-size: 0.9rem; color: var(--text-muted); }
.checkbox-field a { color: var(--tide); text-decoration: underline; }

.auth-shell {
  min-height: calc(100vh - 400px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-7) var(--space-3);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: var(--space-2); }
.auth-card .lede { font-size: 0.95rem; margin-bottom: var(--space-4); }
.auth-foot { margin-top: var(--space-4); font-size: 0.88rem; color: var(--text-muted); text-align: center; }
.auth-foot a { color: var(--tide); font-weight: 600; }

.status-banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: var(--space-3); border-radius: var(--radius-sm);
  font-size: 0.88rem; margin-bottom: var(--space-4);
}
.status-banner.info { background: var(--mist); color: var(--ink); }
.status-banner.error { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
:root[data-theme="dark"] .status-banner.info,
:root[data-theme="auto"] .status-banner.info { background: var(--surface-2); color: var(--text); }
.status-banner[hidden] { display: none; }

.code-input-row { display: flex; gap: 8px; justify-content: center; margin: var(--space-4) 0; }
.code-input-row input {
  width: 48px; height: 58px;
  text-align: center;
  font-size: 1.4rem; font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.code-input-row input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
@media (max-width: 420px) {
  .code-input-row input { width: 13vw; height: 15vw; font-size: 1.1rem; }
}
.resend-row { text-align: center; font-size: 0.88rem; color: var(--text-muted); margin-bottom: var(--space-4); }
.resend-row button { color: var(--tide); font-weight: 600; }
.resend-row button[disabled] { color: var(--text-muted); cursor: not-allowed; }

.dev-hint {
  border: 1px dashed var(--brass);
  background: color-mix(in srgb, var(--brass) 10%, var(--surface));
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  font-size: 0.85rem;
  margin-bottom: var(--space-4);
}
.dev-hint strong { display: block; margin-bottom: 2px; }

/* ---- Onboarding strip / stepper ---------------------------------------- */
.steps-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
@media (max-width: 780px) { .steps-strip { grid-template-columns: 1fr; } }
.step-item { position: relative; padding-left: var(--space-6); }
.step-num {
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
}
:root[data-theme="dark"] .step-num,
:root[data-theme="auto"] .step-num { background: var(--tide); }
.step-item h3 { font-size: 1rem; margin-bottom: 4px; }
.step-item p { color: var(--text-muted); font-size: 0.9rem; }

/* ---- Draft legal banner -------------------------------------------------- */
.draft-banner {
  background: color-mix(in srgb, var(--brass) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brass) 45%, var(--border));
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: 0.92rem;
  font-weight: 600;
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: var(--space-5);
}
:root[data-theme="dark"] .draft-banner,
:root[data-theme="auto"] .draft-banner { color: var(--text); }

.legal-doc h2 { font-size: 1.15rem; margin-top: var(--space-5); margin-bottom: var(--space-2); }
.legal-doc h2:first-of-type { margin-top: 0; }
.legal-doc p, .legal-doc li { color: var(--text-muted); font-size: 0.96rem; margin-bottom: var(--space-2); }
.legal-doc li { margin-left: 1.2em; list-style: disc; }
.legal-meta { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--space-5); padding-bottom: var(--space-4); border-bottom: 1px solid var(--border); }
.legal-meta strong { color: var(--text); }

/* ---- Help center --------------------------------------------------------- */
.help-search { position: relative; max-width: 560px; margin: 0 auto var(--space-6); }
.help-search input {
  width: 100%; padding: 1rem 1rem 1rem 2.8rem;
  border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 1rem;
}
.help-search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.help-topic-list { margin-top: var(--space-3); }
.help-topic-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.help-topic-list a { font-size: 0.94rem; }
.help-topic-list a:hover { color: var(--tide); text-decoration: underline; }
.help-empty { text-align: center; color: var(--text-muted); padding: var(--space-5) 0; display: none; }
.help-empty.show { display: block; }

/* ---- Status page ----------------------------------------------------------- */
.status-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
}
.status-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--tide); font-weight: 600; font-size: 0.88rem; }
:root[data-theme="dark"] .status-ok,
:root[data-theme="auto"] .status-ok { color: #4FBDB5; }
.status-ok .dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; }

/* ---- Community principles ---------------------------------------------- */
.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
@media (max-width: 780px) { .principles-grid { grid-template-columns: 1fr; } }
.principle-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); text-align: center; }
.principle-card .glyph { font-size: 1.6rem; margin-bottom: var(--space-2); }

/* ---- Final CTA band ------------------------------------------------------ */
.cta-band { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: var(--space-6); text-align: center; }
.cta-band h2 { color: #fff; font-family: var(--font-display); font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem); margin-bottom: var(--space-3); }
.cta-band .btn-primary { background: var(--tide); }

/* ---- Learn hub sub-nav ------------------------------------------------------ */
.learn-subnav {
  position: sticky;
  top: var(--header-h, 64px);
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.learn-subnav-inner {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  padding: 10px var(--space-4);
  scrollbar-width: thin;
}
.learn-subnav a {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.learn-subnav a:hover { background: var(--surface-2); color: var(--text); }
.learn-subnav a.is-active { background: var(--surface-2); color: var(--text); }

/* ---- Utility -------------------------------------------------------------- */
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.related-tools { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.related-tools a {
  padding: 0.5rem 0.9rem; border-radius: 999px; border: 1px solid var(--border-strong);
  font-size: 0.86rem; font-weight: 600;
}
.related-tools a:hover { border-color: var(--tide); color: var(--tide); }

/* ---- Scroll-reveal ------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Preview shell ambient glow ------------------------------------------ */
.hero-preview { position: relative; }
.hero-preview::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: calc(var(--radius-lg) + 14px);
  background: linear-gradient(135deg, rgba(27,142,136,0.35), rgba(201,135,66,0.28));
  filter: blur(22px);
  z-index: -1;
  animation: glowPulse 5s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-preview::before { animation: none; opacity: 0.75; }
}
.preview-rail button {
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.preview-rail button[aria-pressed="true"] { transform: scale(1.04); }
.preview-pane {
  animation: paneFade 0.35s ease;
}
@keyframes paneFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .preview-pane { animation: none; }
}

.dev-preview-banner {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-flex;
  margin-bottom: var(--space-2);
}
