/* =============================================================
 * XEsync — shared design system
 * Modern polish pass: tokens, components, layout, auth pages.
 * ============================================================= */

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  --bg: #0a0a0a;
  --bg-2: #1a1a2e;
  --bg-3: #0f0f1a;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.55);
  --dim: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --accent: #00d4ff;
  --accent-2: #0099ff;
  --accent-3: #0066cc;
  --danger: #ff6b6b;
  --success: #7ee699;

  --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-logo: 'Courier Prime', 'Courier New', Courier, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 100px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── RESET + BASE ──────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { background: var(--bg); color: var(--fg); }

body {
  background: var(--bg);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Faint horizontal scanline (CRT echo, very subtle) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.012) 0px,
    rgba(255, 255, 255, 0.012) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* ── A11Y ──────────────────────────────────────────────────── */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── LOGO CANVAS (index hero) ──────────────────────────────── */
canvas#bg {
  display: block;
  position: absolute;
  top: 0; left: 0;
  z-index: 1;
  pointer-events: none;
}

.font-preload {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 120px;
  top: -9999px;
  left: -9999px;
}

/* ── NAV (index) ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 16px;
  left: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.nav a {
  min-height: 44px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 9px 20px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
              color 0.25s var(--ease), transform 0.25s var(--ease);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav a:hover {
  background: rgba(0, 212, 255, 0.18);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.nav a.primary {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
  font-weight: 600;
}
.nav a.primary:hover { background: #00b8e6; }
@media (max-width: 600px) {
  .nav { gap: 6px; top: 12px; }
  .nav a { padding: 7px 11px; font-size: 12px; gap: 6px; }
}
@media (max-width: 380px) {
  .nav a { padding: 6px 8px; font-size: 11px; gap: 5px; }
}

/* ── LAYOUT (index) ────────────────────────────────────────── */
.content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 100px 32px 32px;
}

.hero {
  text-align: center;
  margin-bottom: 64px;
}
.logo-container {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.tagline {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 12px;
  font-weight: 400;
  letter-spacing: -0.1px;
  line-height: 1.3;
}
.sub-tagline {
  font-size: 16px;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.65;
}
.cta-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.app-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.5);
}
.google-play-badge img {
  height: 64px;
  width: auto;
  display: block;
  transition: transform 0.25s var(--ease);
}
.google-play-badge:hover img { transform: scale(1.04); }

/* ── PHONE MOCKUP (index) ──────────────────────────────────── */
.phone-mockup {
  margin: 56px auto 0;
  width: 100%;
  max-width: 720px;
  position: relative;
}
.phone-frame {
  position: relative;
  background: #0a0a0a;
  border: 10px solid #1a1a1a;
  border-radius: 32px;
  padding: 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 30px 60px -20px rgba(0, 212, 255, 0.25),
    0 20px 50px -10px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  aspect-ratio: 19.5 / 9;
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #050505;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 3;
}
.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.phone-mockup::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.18) 0%, transparent 60%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}
@media (max-width: 600px) {
  .phone-mockup { max-width: 100%; margin-top: 40px; }
  .phone-frame { border-width: 8px; border-radius: 24px; }
  .phone-frame::before { width: 10px; height: 10px; left: 10px; }
}

/* ── GRID (index) ──────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 900px) {
  .content { padding: 80px 20px 24px; }
  .grid { grid-template-columns: 1fr; gap: 56px; }
}

/* Section labels — editorial: mono number + sans title, single line */
.grid { counter-reset: section; }
.grid > section { counter-increment: section; }

.section-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
  margin-bottom: 36px;
  font-weight: 400;
  font-family: var(--font-sans);
}
.section-label::before {
  content: counter(section, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 1px;
  font-weight: 500;
  position: relative;
  top: -2px;
}

/* ── FEATURES (index) — definition list, no card, no icon ──── */
.features {
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: feature;
}
@media (max-width: 600px) {
  .features { font-size: 14px; }
}
.feature {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 4px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  counter-increment: feature;
}
.feature:last-child { border-bottom: 1px solid var(--line); }
.feature::before {
  content: counter(feature, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.5px;
  font-weight: 500;
  text-align: left;
  position: relative;
  top: 6px;
}
.feature-icon { display: none; }
.feature h3 {
  grid-column: 2;
  grid-row: 1;
  color: var(--fg);
  font-size: 15px;
  margin: 0;
  font-weight: 500;
  font-family: var(--font-sans);
}
.feature p {
  grid-column: 2;
  grid-row: 2;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
  margin: 0;
}

/* ── TECH NOTES (index) — definition list with hairline dividers ── */
.tech-list { counter-reset: tech; }
.tech-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 6px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  counter-increment: tech;
}
.tech-card:last-of-type { border-bottom: 1px solid var(--line); }
.tech-card::before {
  content: counter(tech, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.5px;
  font-weight: 500;
  position: relative;
  top: 6px;
}
.tech-card h4 {
  grid-column: 2;
  grid-row: 1;
  font-size: 15px;
  color: var(--fg);
  margin: 0;
  font-weight: 500;
  font-family: var(--font-sans);
  display: block;
}
.tech-card h4 i { display: none; }
.tech-card p {
  grid-column: 2;
  grid-row: 2;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}
.tech-card code {
  font-family: var(--font-mono);
  color: var(--fg);
  font-size: 13px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-weight: 400;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
  padding-bottom: 1px;
}

/* ── STACK (index) — inline list, not pills ─────────────────── */
.stack {
  display: block;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.5px;
  line-height: 1.8;
}
.pill {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.5px;
}
.pill + .pill::before {
  content: "·";
  color: var(--dim);
  margin: 0 8px;
}

/* ── METRICS (index) — flat grid, no card ───────────────────── */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  margin: 56px 0 0;
  padding: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 0;
}
@media (max-width: 600px) {
  .metrics-row { grid-template-columns: repeat(3, 1fr); }
}
.metric {
  background: var(--bg);
  padding: 24px 18px;
  text-align: left;
}
.metric-value {
  font-size: 24px;
  font-weight: 500;
  color: var(--fg);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.metric-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 10px;
  font-weight: 500;
}

/* ── WHY (index) — plain centered text, no card, no border ──── */
.why {
  margin-top: 96px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.why .section-label { justify-content: center; }
.why p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 18px;
}
.why p:last-child { margin-bottom: 0; }
.why p strong {
  color: var(--accent);
  font-weight: 600;
}
@media (max-width: 600px) {
  .why { padding: 24px; }
  .why p { font-size: 14px; }
}

/* ── FOOTER (index) ────────────────────────────────────────── */
.footer {
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  padding: 32px 0 12px;
  margin-top: 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer a { color: var(--dim); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--accent); }
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Public app and engineering pages share the original visual language. */
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.4px; color: var(--accent); margin-bottom: 16px; }
.landing .tagline { font-size: clamp(25px, 3vw, 38px); color: var(--fg); letter-spacing: -1px; }
.landing .sub-tagline { margin-top: 12px; margin-bottom: 16px; }
.landing .phone-mockup { margin-top: 24px; }
.video-preview { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; color: var(--fg); text-decoration: none; }
.video-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-preview::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.2); transition: background .2s; }
.video-preview:hover::after { background: rgba(0,0,0,.05); }
.video-preview:focus-visible { outline-offset: -4px; }
.video-play { position: absolute; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: rgba(10,10,10,.92); border: 1px solid var(--accent); border-radius: 8px; font-size: 15px; font-weight: 500; text-align: left; }
.video-play-icon { color: var(--accent); font-size: 24px; }
.video-duration { display: block; color: var(--muted); font: 11px var(--font-mono); margin-top: 3px; }
@media (max-width: 600px) { .video-play { padding: 10px 14px; font-size: 13px; gap: 10px; } }
.hero-note { color: rgba(255,255,255,.65); font-size: 13px; margin: 10px 0 4px; }
.text-link { color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
.text-link:hover { text-decoration: underline; }
.hero-intro > .text-link { font-size: 13px; display: inline-flex; align-items: center; min-height: 44px; }
.screenshot-link { display: block; }
.screenshot-link img { display: block; width: 100%; height: auto; }
.screenshot-link:hover { outline: 1px solid var(--accent); outline-offset: 4px; }
figcaption { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 18px; }
figcaption strong { color: rgba(255,255,255,.85); font-weight: 500; }
.page-section { margin: 0 0 80px; padding-top: 32px; border-top: 1px solid var(--line-strong); scroll-margin-top: 90px; }
.page-section .section-label::before { content: none; }
.section-number { font: 11px var(--font-mono); color: var(--accent); }
.benefit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.benefit-grid h3, .steps h3 { font-size: 18px; font-weight: 500; margin-bottom: 12px; }
.benefit-grid p, .section-intro p, .setup-grid p, .maker-section p { color: rgba(255,255,255,.65); font-size: 15px; line-height: 1.8; }
.section-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 32px; }
.section-intro h3, .section-title { font-size: clamp(25px, 3vw, 34px); font-weight: 400; line-height: 1.25; letter-spacing: -.8px; }
.screenshot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.screenshot-grid img, .engineering-scene img { border: 1px solid var(--line-strong); border-radius: 6px; }
.section-note { color: var(--muted); font-size: 13px; line-height: 1.8; margin-top: 24px; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.setup-grid .section-title { margin-bottom: 24px; }
.console-photo { max-width: 360px; margin: 0 auto 28px; }
.console-photo img {
  display: block;
  height: auto;
  /* Keep the console face and buttons; crop the surrounding mount. */
  clip-path: inset(10% 12% 25% 11% round 6px);
  margin: -12.987% -15.584% -32.468% -14.286%;
  width: 129.87%;
}
.console-photo figcaption { text-align: center; margin-top: 12px; }
.setup-grid p { margin-bottom: 16px; }
.setup-grid strong { color: var(--fg); font-weight: 500; }
.steps { list-style: none; counter-reset: setup; }
.steps li { counter-increment: setup; position: relative; padding-left: 40px; margin-bottom: 26px; }
.steps li::before { content: counter(setup, decimal-leading-zero); position: absolute; left: 0; top: 4px; color: var(--accent); font: 11px var(--font-mono); }
.maker-section { max-width: 740px; margin-left: auto; margin-right: auto; }
.maker-section .section-title { margin-bottom: 24px; }
.maker-section p + p { margin-top: 16px; }
.closing-cta { text-align: center; padding: 48px 0 32px; border-top: 1px solid var(--line-strong); }
.closing-cta h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 400; margin-bottom: 12px; }
.closing-cta p { color: var(--muted); margin-bottom: 28px; }
.engineering-hero { max-width: 850px; padding: 48px 0 64px; }
.engineering-hero h1 { font-size: clamp(32px, 4.5vw, 54px); font-weight: 500; line-height: 1.15; letter-spacing: -1.8px; margin-bottom: 24px; }
.lead { color: rgba(255,255,255,.65); font-size: 18px; line-height: 1.8; margin-bottom: 24px; max-width: 720px; }
.architecture { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); list-style: none; margin-top: 32px; border: 1px solid var(--line-strong); }
.architecture li { padding: 24px 20px; border-right: 1px solid var(--line-strong); }
.architecture li:last-child { border-right: 0; }
.architecture span { display: block; font: 10px var(--font-mono); color: var(--accent); margin-bottom: 20px; }
.architecture strong { display: block; font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.architecture small { color: var(--muted); line-height: 1.7; display: block; }
.engineering-details .tech-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.engineering-details .tech-card h3 { grid-column: 2; grid-row: 1; font-size: 15px; font-weight: 500; }
.engineering .nav a[aria-current] { border-color: var(--accent); }
.engineering .tech-card p { color: rgba(255,255,255,.65); }
.engineering-scene { max-width: 950px; margin: auto; }
.accent-text { color: var(--accent); }
.port-invite { border-top: 1px solid var(--line-strong); padding: 32px 0; margin-bottom: 48px; }
.port-invite h2 { font-size: 26px; font-weight: 400; margin-bottom: 12px; }
.port-invite p { color: var(--muted); line-height: 1.8; }
.port-invite .eyebrow { color: var(--accent); }
.apple-page code { overflow-wrap: anywhere; font-size: 13px; }
.image-viewer { margin: auto; width: min(1200px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 16px; color: var(--fg); background: var(--bg); border: 1px solid var(--line-strong); }
.image-viewer::backdrop { background: rgba(0,0,0,.88); }
.viewer-toolbar { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 16px; }
.viewer-toolbar button { min-height: 44px; padding: 8px 16px; background: transparent; border: 1px solid var(--line-strong); color: var(--fg); font: 14px var(--font-sans); cursor: pointer; }
.viewer-toolbar button:hover { border-color: var(--accent); color: var(--accent); }
.viewer-scroll { overflow: auto; max-height: calc(100dvh - 200px); overscroll-behavior: contain; }
.viewer-image { display: block; max-width: 100%; max-height: calc(100dvh - 200px); width: auto; height: auto; margin: auto; }
.is-zoomed .viewer-image { max-width: none; max-height: none; width: max(100%, 1200px); margin: 0; }
.viewer-caption { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.6; }
@media (max-width: 700px) {
  .landing .hero-intro > .cta-row .app-logo { display: none; }
  .benefit-grid, .section-intro, .screenshot-grid, .setup-grid, .engineering-details .tech-list { grid-template-columns: 1fr; gap: 28px; }
  .architecture { grid-template-columns: 1fr 1fr; }
  .architecture li:nth-child(2) { border-right: 0; }
  .architecture li:nth-child(-n+2) { border-bottom: 1px solid var(--line-strong); }
  .architecture li { padding: 18px 12px; }
  .architecture strong { font-size: 15px; }
  .page-section { margin-bottom: 56px; }
  .setup-grid { gap: 48px; }
  .engineering-hero { padding: 28px 0 48px; }
  .lead { font-size: 16px; }
  .screenshot-grid { gap: 32px; }
  .landing .eyebrow { font-size: 10px; letter-spacing: .9px; }
  .footer { justify-content: center; font-size: 12px; }
}

/* Mobile opening: the introduction starts beneath the navigation, then
   slides down into its normal position as the logo appears above it. */
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .landing .hero-intro {
    animation: hero-slide-down 1s var(--ease) .25s both;
  }
  .landing canvas#bg, .landing .logo-container .brand {
    animation: hero-logo-appear .7s ease-out .65s both;
  }
}
@keyframes hero-slide-down {
  from { transform: translateY(-216px); }
  to { transform: translateY(0); }
}
@keyframes hero-logo-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── AUTH PAGE LAYOUT ──────────────────────────────────────── */
body.auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
body.auth > *:not(.back) { position: relative; z-index: 2; }
@media (max-width: 480px) {
  body.auth { padding-top: 80px; justify-content: flex-start; }
}

/* ── BACK BUTTON (auth pages) — plain text link ───────────── */
.back {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 100;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  background: none;
  border: none;
  backdrop-filter: none;
  transition: color 0.2s var(--ease);
}
.back:hover { color: var(--fg); }
@media (max-width: 480px) {
  .back { top: 16px; left: 16px; font-size: 12px; }
}

/* ── AUTH CARD — no card, just a contained form on the page ─ */
.card {
  width: 100%;
  max-width: 420px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
}

/* Brand logo on auth pages (static, two-tone like the big animated one) */
.brand {
  font-family: var(--font-logo);
  font-weight: 700;
  text-align: center;
  letter-spacing: 2px;
  font-size: 28px;
  margin-bottom: 8px;
  line-height: 1;
}
.brand .xe { color: #c3e1fa; }
.brand .sync {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* Sub: matches the section-label editorial pattern */
.brand-sub {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 32px;
  letter-spacing: 1px;
  text-transform: none;
  font-weight: 500;
}
.brand-sub::before {
  content: "01";
  color: var(--accent);
  letter-spacing: 0.5px;
  position: relative;
  top: -1px;
}

/* ── FORMS ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-weight: 500;
}
input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  color: #fff;
  font-size: 16px;
  padding: 10px 0;
  outline: none;
  transition: border-color 0.2s var(--ease);
  font-family: var(--font-sans);
}
input:hover { border-bottom-color: rgba(255, 255, 255, 0.3); }
input:focus { border-bottom-color: var(--accent); }
input::placeholder { color: rgba(255, 255, 255, 0.18); }
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #0a0a0a inset;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
}

.hint {
  font-size: 12px;
  color: var(--dim);
  margin-top: 8px;
  line-height: 1.5;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 28px 0;
}
.help-text {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ── BUTTONS — restrained, no glow, no radius ─────────────── */
.btn {
  width: 100%;
  padding: 14px 18px;
  background: var(--accent);
  color: #0a0a0a;
  border: none;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.2s var(--ease), transform 0.1s var(--ease);
  font-family: var(--font-sans);
  margin-top: 16px;
}
.btn:hover { background: #00b8e6; }
.btn:active { transform: scale(0.99); }
.btn:disabled {
  background: rgba(0, 212, 255, 0.3);
  color: rgba(255, 255, 255, 0.4);
  cursor: default;
}

.btn-inline {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #0a0a0a;
  border-radius: 0;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  transition: background 0.2s var(--ease);
  font-family: var(--font-sans);
}
.btn-inline:hover { background: #00b8e6; }

/* ── MESSAGES — hairline + left rule, no fill ─────────────── */
.error {
  background: transparent;
  border: none;
  border-left: 2px solid var(--danger);
  border-radius: 0;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--danger);
  margin-bottom: 20px;
  display: none;
}
.success {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 20px;
  font-size: 14px;
  color: var(--fg);
  text-align: center;
  display: none;
  line-height: 1.6;
}
.msg {
  border-radius: 0;
  padding: 8px 12px;
  font-size: 13px;
  margin-top: 20px;
  display: none;
  background: transparent;
  border-left: 2px solid var(--danger);
}
.msg.error {
  color: var(--danger);
}
.msg.success {
  border-left-color: var(--success);
  color: var(--success);
}

/* Strength bar (register page) */
.strength-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 8px;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

/* ── AUTH PAGE LINKS ───────────────────────────────────────── */
.register-link, .login-link {
  text-align: center;
  margin-top: 28px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
}
.register-link a, .login-link a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
.register-link a:hover, .login-link a:hover { text-decoration: underline; }
.terms {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  margin-top: 16px;
  line-height: 1.6;
}
.terms a { color: rgba(0, 212, 255, 0.7); text-decoration: none; transition: color 0.2s; }
.terms a:hover { color: var(--accent); }
.auth-footer {
  margin-top: 40px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
  text-align: center;
}
.auth-footer a { color: rgba(255, 255, 255, 0.25); text-decoration: none; transition: color 0.2s; }
.auth-footer a:hover { color: var(--accent); }
.footer-link {
  display: block;
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { text-decoration: underline; }

/* ── VERIFY PAGE ───────────────────────────────────────────── */
.verify-icon { font-size: 56px; margin-bottom: 20px; line-height: 1; }
.verify-title { font-size: 22px; margin-bottom: 12px; font-weight: 600; }
.verify-msg { font-size: 14px; color: rgba(255, 255, 255, 0.6); line-height: 1.6; }
.verify-ok { color: var(--accent); }
.verify-err { color: var(--danger); }
.verify-spin { color: rgba(255, 255, 255, 0.4); }

/* ── CONFIDENTIALITY (DOC) PAGE ────────────────────────────── */
body.doc { padding: 80px 20px 60px; }
.doc-container { max-width: 680px; margin: 0 auto; }
.doc-back {
  position: fixed;
  top: 24px;
  left: 24px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  transition: color 0.2s;
  z-index: 10;
}
.doc-back:hover { color: var(--fg); }
.doc-brand {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 48px;
  letter-spacing: 2px;
  line-height: 1;
}
.doc-brand .xe { color: rgba(0, 212, 255, 0.7); }
.doc-brand .sync {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.doc h1 {
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.doc-effective {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 56px;
  letter-spacing: 0.5px;
}
.doc h2 {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
  margin-top: 56px;
}
.doc p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  margin-bottom: 14px;
}
.doc ul { list-style: none; margin-bottom: 14px; }
.doc ul li {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}
.doc ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.doc a { color: var(--accent); text-decoration: none; transition: color 0.2s; border-bottom: 1px dashed rgba(0, 212, 255, 0.4); }
.doc a:hover { border-bottom-color: var(--accent); }
.doc-divider {
  height: 1px;
  background: var(--line);
  margin: 56px 0 32px;
}
.doc-footer {
  font-size: 13px;
  color: var(--dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.doc-footer a { color: var(--dim); transition: color 0.2s; }
.doc-footer a:hover { color: var(--fg); }
