﻿/* ============================================================
   Familix — Obsidian / Quartz · public pages
   Contains no colour literals. Every colour resolves through a
   token from tokens.css, so this file serves both themes.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }

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

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  inset-block-start: -80px;
  z-index: 200;
  background: var(--brand-500);
  color: var(--on-brand);
  padding: 12px 20px;
  border-radius: var(--r-md);
  transition: inset-block-start 0.2s;
}
.skip-link:focus { inset-block-start: 12px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

/* ---------- Ambient field (from 01, dialled down) ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(100px); }
.aurora span:nth-child(1) {
  width: 660px; height: 660px; background: var(--field-1);
  inset-block-start: -240px; inset-inline-start: -140px;
}
.aurora span:nth-child(2) {
  width: 540px; height: 540px; background: var(--field-2);
  inset-block-start: 120px; inset-inline-end: -180px;
}
.aurora span:nth-child(3) {
  width: 520px; height: 520px; background: var(--field-3);
  inset-block-end: -220px; inset-inline-start: 38%;
}
.grid-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 70%);
}

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--tint-2);
  border-block-end: 1px solid var(--stroke);
  color: var(--text-muted);
  font-size: 13.5px;
  padding-block: 9px;
}
.announce-inner { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.announce .chip {
  background: var(--grad-mark);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--r-xs);
}

/* ---------- Buttons (04's shapes, 01's fill) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 14.5px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-brand);
  color: var(--on-brand);
  box-shadow: var(--shadow-sm), var(--glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md), var(--glow-hover); }
.btn-outline { background: var(--glass); border-color: var(--stroke); color: var(--text); backdrop-filter: blur(10px); }
.btn-outline:hover { background: var(--glass-2); border-color: var(--stroke-2); }
.btn-quiet { background: transparent; color: var(--text-muted); }
.btn-quiet:hover { color: var(--text); background: var(--glass); }
.btn-lg { padding: 13px 24px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn svg { width: 17px; height: 17px; }
.is-rtl .btn svg.arrow { transform: scaleX(-1); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-block-end: 1px solid var(--stroke);
}
.nav-inner { display: flex; align-items: center; gap: 36px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; letter-spacing: -0.03em; }
.logo-mark {
  width: 30px; height: 30px; flex: none;
  border-radius: var(--r-sm);
  background: var(--grad-mark);
  display: grid; place-items: center;
  color: var(--on-accent);
  box-shadow: var(--glow);
}
.logo-mark svg { width: 17px; height: 17px; }

.nav-links { display: flex; gap: 26px; font-size: 14.5px; font-weight: 500; color: var(--text-muted); }
.nav-links a { padding-block: 6px; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }

.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 11px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-size: 13.5px; font-weight: 600;
}
.lang-btn:hover { border-color: var(--stroke-2); color: var(--text); }
.lang-btn svg { width: 15px; height: 15px; }
.lang-menu {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  min-width: 176px;
  padding: 5px;
  background: var(--panel);
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 120;
}
.lang.open .lang-menu { display: block; }
.lang-menu button {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 10px;
  background: none; border: 0; border-radius: var(--r-sm);
  color: var(--text-muted); font-size: 14px; text-align: start;
}
.lang-menu button:hover { background: var(--glass-2); color: var(--text); }
.lang-menu button[aria-selected="true"] { color: var(--teal-400); background: var(--info-bg); font-weight: 600; }

.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  color: var(--text);
  place-items: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 6vw, 84px); border-block-end: 1px solid var(--stroke); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--glass);
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
}
.badge svg { width: 14px; height: 14px; color: var(--success); }

.hero h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.08; margin-block-end: 18px; }
.hero h1 .grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { font-size: clamp(16px, 1.5vw, 18.5px); color: var(--text-muted); max-width: 54ch; margin-block-end: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-block-end: 26px; }
.hero-list { display: grid; gap: 10px; }
.hero-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--text-muted); }
.hero-list svg { width: 17px; height: 17px; color: var(--success); flex: none; margin-block-start: 3px; }

/* Product window — 04's chrome, glass instead of white */
.window {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-lg);
  background: var(--window-bg);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.window-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--tint-2);
  border-block-end: 1px solid var(--stroke);
}
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--stroke-2); }
.window-url {
  flex: 1;
  margin-inline-start: 8px;
  background: var(--input-bg);
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
  padding: 4px 10px;
  text-align: center;
}
.window-body { display: grid; grid-template-columns: 168px 1fr; min-height: 340px; }
.wsidebar { border-inline-end: 1px solid var(--stroke); padding: 14px 10px; background: var(--sunken); }
.wsidebar div {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; color: var(--text-muted);
}
.wsidebar div.active {
  background: var(--grad-active);
  border: 1px solid var(--grad-active-border);
  color: var(--text); font-weight: 600;
}
.wsidebar div svg { width: 15px; height: 15px; flex: none; }
.wmain { padding: 18px; }
.wmain h4 { font-size: 15px; margin-block-end: 14px; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-block-end: 16px; }
.kpi { border: 1px solid var(--stroke); border-radius: var(--r-md); padding: 11px 12px; background: var(--glass); }
.kpi span { display: block; font-size: 11px; color: var(--text-dim); margin-block-end: 4px; }
.kpi b { font-size: 20px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 11px; color: var(--success); font-weight: 600; margin-inline-start: 5px; }

.wtable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.wtable th {
  text-align: start;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  padding-block: 8px;
  border-block-end: 1px solid var(--stroke);
}
.wtable td { padding-block: 10px; border-block-end: 1px solid var(--hairline); color: var(--text-muted); }
.pillstat { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.pillstat.ok { background: var(--success-bg); color: var(--success); }
.pillstat.wait { background: var(--info-bg); color: var(--brand-400); }
.pillstat.hold { background: var(--warning-bg); color: var(--warning); }

/* ---------- Trust ---------- */
.trust { padding-block: 40px; border-block-end: 1px solid var(--stroke); background: var(--tint); }
.trust p {
  text-align: center;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
  margin-block-end: 22px;
}
.logo-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 44px; color: var(--text-dim); }
.logo-row span { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; opacity: 0.75; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 6.5vw, 88px); }
.section.alt { background: var(--tint); border-block: 1px solid var(--stroke); }
.section-head { max-width: 620px; margin-block-end: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal-400);
  margin-block-end: 12px;
}
.section-head h2 { font-size: clamp(26px, 3.2vw, 38px); margin-block-end: 12px; }
.section-head p { color: var(--text-muted); font-size: 16.5px; }

/* Tabs */
.tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 5px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  margin-block-end: 28px;
}
.tab {
  flex: 1 1 auto;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tab svg { width: 16px; height: 16px; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] {
  background: var(--grad-active);
  border-color: var(--grad-active-border);
  color: var(--text);
}

.tabpanel { display: none; }
.tabpanel.active { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.tabpanel h3 { font-size: 24px; margin-block-end: 12px; }
.tabpanel > div > p { color: var(--text-muted); margin-block-end: 20px; }
.check-list { display: grid; gap: 11px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--text-muted); }
.check-list svg { width: 18px; height: 18px; color: var(--teal-400); flex: none; margin-block-start: 2px; }

.panel-visual {
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  padding: 20px;
}
.panel-rows { display: grid; gap: 8px; }
.prow {
  display: grid; grid-template-columns: 28px 1fr auto;
  gap: 12px; align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  font-size: 13.5px;
  background: var(--sunken-2);
}
.prow .ic {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  background: var(--info-bg);
  color: var(--brand-400);
  display: grid; place-items: center;
}
.prow .ic svg { width: 15px; height: 15px; }
.prow small { display: block; color: var(--text-dim); font-size: 12px; }

/* Metrics */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.metric {
  position: relative;
  padding: 24px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.metric::after {
  content: "";
  position: absolute; inset-block-start: 0; inset-inline: 0; height: 2px;
  background: var(--grad-rule);
  opacity: 0.75;
}
.metric b {
  display: block; font-size: 34px; letter-spacing: -0.03em; margin-block-end: 4px;
  font-variant-numeric: tabular-nums;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.metric span { font-size: 14px; color: var(--text-muted); }

/* Security */
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sec-card {
  padding: 26px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  backdrop-filter: blur(10px);
  transition: border-color 0.18s, background 0.18s;
}
.sec-card:hover { border-color: var(--stroke-2); background: var(--glass-2); }
.sec-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  color: var(--brand-400);
  display: grid; place-items: center;
  margin-block-end: 16px;
}
.sec-icon svg { width: 20px; height: 20px; }
.sec-card h3 { font-size: 17px; margin-block-end: 8px; }
.sec-card p { font-size: 14.5px; color: var(--text-muted); }

/* FAQ */
.faq { max-width: 820px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  background: var(--glass);
  margin-block-end: 10px;
  overflow: hidden;
}
.faq details[open] { border-color: var(--grad-active-border); background: var(--glass-2); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 18px 20px;
  font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 11px; height: 11px;
  border-inline-end: 2px solid var(--text-dim);
  border-block-end: 2px solid var(--text-dim);
  transform: rotate(45deg);
  transition: transform 0.2s;
  flex: none;
}
.faq details[open] summary::after { transform: rotate(-135deg); border-color: var(--teal-400); }
.faq p { padding: 0 20px 18px; color: var(--text-muted); font-size: 15px; }

/* CTA */
.cta {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 6vw, 76px);
  border-block-start: 1px solid var(--stroke);
  background: var(--grad-cta);
}
.cta-inner { display: grid; grid-template-columns: 1.3fr auto; gap: 36px; align-items: center; }
.cta h2 { font-size: clamp(26px, 3.2vw, 38px); margin-block-end: 12px; }
.cta p { color: var(--text-muted); max-width: 52ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
.footer { background: var(--footer-bg); border-block-start: 1px solid var(--stroke); color: var(--text-muted); padding-block: 52px 28px; }
.footer .logo { color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 36px; padding-block-end: 34px; }
.footer-brand p { font-size: 14px; max-width: 32ch; margin-block-start: 14px; color: var(--text-dim); }
.footer h4 { color: var(--text); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin-block-end: 15px; }
.footer ul { display: grid; gap: 9px; }
.footer ul a { font-size: 14px; color: var(--text-dim); }
.footer ul a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  padding-block-start: 22px;
  border-block-start: 1px solid var(--stroke);
  font-size: 13px;
  color: var(--text-dim);
}
/* Legal links in the landing footer's bottom row (task 0151a). Flex so the
   separator keeps even spacing and the pair wraps as one unit on a phone. */
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.footer-legal a { color: var(--text-dim); }
.footer-legal a:hover { color: var(--text); }

.compliance { display: flex; gap: 10px; flex-wrap: wrap; }
.compliance span {
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-sm);
  padding: 3px 9px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
}

/* ============================================================
   Registration
   ============================================================ */
.auth-wrap { min-height: calc(100vh - 64px); padding-block: clamp(32px, 5vw, 64px); }
.auth-grid { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: start; }

.auth-card {
  background: var(--window-bg);
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  padding: clamp(26px, 4vw, 42px);
}
.auth-head { margin-block-end: 26px; }
.auth-head h1 { font-size: clamp(24px, 3vw, 32px); margin-block-end: 8px; }
.auth-head > p { color: var(--text-muted); font-size: 15px; }
.auth-head a { color: var(--brand-400); font-weight: 600; }
.auth-head a:hover { text-decoration: underline; }

/* One column: Google is the only provider (task 0149a), so the control spans the
   row rather than sitting half-width beside a gap. Still a grid — the rule that
   decides the count is this one line if a second provider ever returns. */
.social-row { display: grid; grid-template-columns: 1fr; gap: 10px; margin-block-end: 22px; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--glass);
  font-size: 14px; font-weight: 600;
  color: var(--text);
}
/* A configured provider renders as <a>, not <button> (task 0147a) — anchors bring
   their own underline, which the button form never had. */
.social-btn, .social-btn:hover { text-decoration: none; }
.social-btn:hover { border-color: var(--stroke-2); background: var(--glass-2); }
.social-btn svg { width: 17px; height: 17px; }

.divider { display: flex; align-items: center; gap: 12px; margin-block-end: 22px; font-size: 13px; color: var(--text-dim); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--stroke); }

.form { display: grid; gap: 16px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text-muted); }
.field label .req { color: var(--danger); margin-inline-start: 2px; }
/* Terms agreement (request 151, task 0151b). Deliberately not a `.field`: that
   block is a grid whose input stretches to 100%, which is right for a text box and
   absurd for a tick box. The label is prose here — a statement being agreed to,
   not a caption — so it keeps normal weight and line height. The focus ring comes
   from the global `:focus-visible` rule. */
.field-check { display: flex; align-items: flex-start; gap: 10px; }
.field-check input[type="checkbox"] {
  inline-size: 18px; block-size: 18px; flex: none;
  margin-block-start: 2px;
  accent-color: var(--brand-400);
}
.field-check label { font-size: 13.5px; font-weight: 500; line-height: 1.5; color: var(--text-muted); }
.field-check a { color: var(--brand-400); font-weight: 600; }
.field-check .req { color: var(--danger); margin-inline-start: 2px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--input-bg);
  font: inherit;
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  /* No `color-scheme` here. It rode in from the dark-only design lab and told
     the browser to draw the control's own furniture — the date picker's calendar
     glyph above all — for a dark UI, which painted it white on the light theme's
     white field: present, unclickable-looking, invisible (request 134 §1). The
     scheme belongs to the theme, and `tokens_v2.css` sets it on :root. */
}
.field input::placeholder { color: var(--text-dim); }

/* The date field's picker button (request 134 §1). The browser's own indicator is
   kept — it opens the picker with no JavaScript and Firefox draws its own from
   the same markup — and only sized and given a hover, so it reads as something
   to click rather than a decoration in the corner of the field. */
input[type="date"]::-webkit-calendar-picker-indicator {
  inline-size: 17px;
  block-size: 17px;
  padding: 3px;
  margin-inline-start: 4px;
  border-radius: var(--r-sm);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s, background 0.15s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  background: var(--glass-2);
}
@media (prefers-reduced-motion: reduce) {
  input[type="date"]::-webkit-calendar-picker-indicator { transition: none; }
}
.field input:focus {
  outline: none;
  border-color: var(--brand-400);
  background: var(--input-bg-focus);
  box-shadow: var(--focus-ring);
}
.field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: var(--danger-ring); }
.has-toggle input { padding-inline-end: 40px; }

.toggle-pw {
  position: absolute;
  inset-inline-end: 8px;
  background: none; border: 0;
  color: var(--text-dim);
  padding: 5px; border-radius: var(--r-sm);
  display: grid; place-items: center;
}
.toggle-pw:hover { color: var(--text); background: var(--glass-2); }
.toggle-pw svg { width: 18px; height: 18px; }

.hint { font-size: 12.5px; color: var(--text-dim); }
.error-msg { display: none; font-size: 12.5px; color: var(--danger); }
.field.invalid .error-msg, .check-field.invalid .error-msg { display: block; }
.check-field .error-msg { margin-block-start: 6px; }

.strength { display: grid; gap: 5px; }
.strength-bars { display: flex; gap: 4px; }
.strength-bars i { flex: 1; height: 4px; border-radius: 2px; background: var(--track); transition: background 0.25s; }
.strength-label { font-size: 12px; color: var(--text-dim); }
.strength[data-level="1"] .strength-bars i:nth-child(-n + 1) { background: var(--danger); }
.strength[data-level="2"] .strength-bars i:nth-child(-n + 2) { background: var(--warning); }
.strength[data-level="3"] .strength-bars i:nth-child(-n + 3) { background: var(--brand-400); }
.strength[data-level="4"] .strength-bars i { background: var(--success); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-muted); cursor: pointer; }
.check input {
  appearance: none;
  width: 18px; height: 18px; flex: none;
  margin-block-start: 2px;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-xs);
  background: var(--input-bg);
  display: grid; place-items: center;
}
.check input:checked { background: var(--brand-500); border-color: var(--brand-500); }
.check input:checked::after {
  content: "";
  width: 5px; height: 9px;
  border: solid var(--on-brand); border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.check a { color: var(--brand-400); }
.check a:hover { text-decoration: underline; }
.check-field.invalid .check input { border-color: var(--danger); }

.form-foot { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--text-dim); }
.form-foot svg { width: 15px; height: 15px; color: var(--success); }

/* Right rail */
.rail { display: grid; gap: 16px; position: sticky; inset-block-start: 88px; }
.rail-card {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  padding: 22px;
  backdrop-filter: blur(10px);
}
.rail-card h3 { font-size: 15px; margin-block-end: 14px; }
.rail-list { display: grid; gap: 13px; }
.rail-list li { display: flex; gap: 11px; align-items: flex-start; }
.rail-list .ic {
  width: 30px; height: 30px; flex: none;
  border-radius: var(--r-md);
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  color: var(--brand-400);
  display: grid; place-items: center;
}
.rail-list .ic svg { width: 16px; height: 16px; }
.rail-list strong { display: block; font-size: 14px; }
.rail-list p { font-size: 13px; color: var(--text-muted); }

.rail-quote {
  background: var(--grad-quote);
  border-color: var(--grad-quote-border);
}
.rail-quote p { font-size: 14.5px; color: var(--text-muted); margin-block-end: 16px; }
.rail-author { display: flex; align-items: center; gap: 11px; }
.rail-author .av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad-mark);
  color: var(--on-accent);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; flex: none;
}
.rail-author strong { display: block; font-size: 13.5px; }
.rail-author span { font-size: 12px; color: var(--text-dim); }

/* Toast */
.toast {
  position: fixed;
  inset-block-end: 24px;
  inset-inline: 24px auto;
  z-index: 300;
  max-width: 380px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--stroke-2);
  color: var(--text);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  opacity: 0; transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  overflow: hidden;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast::before {
  content: "";
  position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px;
  background: var(--grad-rule);
}

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.06s; }
[data-reveal][data-delay="2"] { transition-delay: 0.12s; }
[data-reveal][data-delay="3"] { transition-delay: 0.18s; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .tabpanel.active { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .sec-grid { grid-template-columns: 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .auth-grid { grid-template-columns: 1fr; }
  .rail { position: static; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .container { padding-inline: 18px; }
  .nav-links { display: none; }
  .nav-actions .btn-quiet, .nav-actions .btn-outline { display: none; }
  .nav-toggle { display: grid; }
  .nav-links.open {
    display: grid; gap: 2px;
    position: absolute;
    inset-block-start: 64px;
    inset-inline: 0;
    padding: 12px 18px 18px;
    background: var(--bg-2);
    border-block-end: 1px solid var(--stroke);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open a { padding-block: 11px; font-size: 15.5px; }
  .window-body { grid-template-columns: 1fr; }
  .wsidebar { display: flex; gap: 6px; overflow-x: auto; border-inline-end: 0; border-block-end: 1px solid var(--stroke); }
  .wsidebar div { white-space: nowrap; }
  .kpis { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .logo-row { gap: 26px; }
  .announce-inner { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Theme switch ----------
   A real switch, not an icon button: a track with a knob that slides,
   role="switch" + aria-checked, and both icons always visible so the
   control reads as two states rather than one mystery glyph. */
.theme-switch {
  position: relative;
  width: 62px;
  height: 32px;
  flex: none;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--sunken-3);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.theme-switch:hover { border-color: var(--stroke-2); }

.theme-switch .ts-knob {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--grad-mark);
  box-shadow: var(--shadow-sm);
  transition: translate 0.22s cubic-bezier(.34, 1.4, .64, 1);
}
/* The knob slides toward the end of the line, so it has to reverse
   under RTL. i18n.js sets dir on <html>, which is the same element
   the theme attribute lives on — hence the compound selector. */
:root[data-theme="dark"] .theme-switch .ts-knob { translate: 30px 0; }
html[dir="rtl"][data-theme="dark"] .theme-switch .ts-knob { translate: -30px 0; }

.theme-switch .ts-icons {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 7px;
  pointer-events: none;
}
.theme-switch svg { width: 15px; height: 15px; transition: color 0.2s, opacity 0.2s; }
.theme-switch .ts-sun  { color: var(--on-accent); opacity: 1; }
.theme-switch .ts-moon { color: var(--text-dim); opacity: .8; }
:root[data-theme="dark"] .theme-switch .ts-sun  { color: var(--text-dim); opacity: .8; }
:root[data-theme="dark"] .theme-switch .ts-moon { color: var(--on-accent); opacity: 1; }

.theme-switch:focus-visible { outline: 2px solid var(--teal-400); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .theme-switch .ts-knob { transition: none; } }

/* ---- Domolytics additions (request 130, task 0130f) ----------------------
   The example's mobile nav is opened by shared/ui.js, which does not ship with
   the variant. home_v2.js toggles `.is-open`; this is the panel it needs. */
@media (max-width: 900px) {
    .nav-links.is-open {
        display: flex; position: absolute; inset-inline: 0; top: 100%;
        flex-direction: column; gap: 0;
        background: var(--panel); border-block: 1px solid var(--stroke);
        padding: 8px 20px;
    }
    .nav-links.is-open a { padding-block: 10px; }
    .nav { position: relative; }
}

/* Reveal-on-scroll, made fail-safe (request 130, task 0130f).
   The example ships `[data-reveal] { opacity: 0 }` and relies on shared/ui.js —
   which is not in the variant — to add `.in`. Any failure of that script leaves
   ten blocks of a PUBLIC page permanently invisible.
   Inverted here: content is visible by default, and only hidden once JS has
   declared itself able to reveal it again. No JS, no observer, a thrown error —
   the page still reads. */
[data-reveal] { opacity: 1; transform: none; }
html.reveal-ready [data-reveal]:not(.in) { opacity: 0; transform: translateY(14px); }

/* The language menu holds real links, not buttons (request 130, task 0130f):
   navigation should work with JS off. The example only styled `button`, so the
   same rules are extended to `a`. */
.lang-menu a {
    display: flex; align-items: center; gap: 9px;
    width: 100%; padding: 8px 10px;
    background: none; border: 0; border-radius: var(--r-sm);
    color: var(--text-muted); font-size: 14px; text-align: start;
    text-decoration: none;
}
.lang-menu a:hover { background: var(--glass-2); color: var(--text); }
.lang-menu a[aria-selected="true"] { color: var(--teal-400); background: var(--info-bg); font-weight: 600; }

/* ---------- Travel landing page (request 148, task 0148) ----------
   A travel-scoped variant of the landing page reusing .nav/.hero/.window/.cta.
   Only what the travel page adds lives here; nothing above was modified.
   Colours resolve through tokens, so dark mode and contrast fixes stay in
   `tokens_v2.css` (spec 1-tech/3-ui). */

/* "TD" wordmark in place of the main site's SVG mark. Same 30px box, so the nav
   height and the logo gap are unchanged. */
.logo-mark--text {
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
}

/* Trip cards above the list, inside the hero's mock all-trips window. */
.wcards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-block-end: 16px; }
.wcard {
    border: 1px solid var(--stroke);
    border-radius: var(--r-md);
    padding: 11px 12px;
    background: var(--glass);
    display: grid;
    gap: 4px;
    justify-items: start;
}
.wcard b { font-size: 14px; letter-spacing: -0.02em; }
.wcard small { color: var(--text-dim); font-size: 11.5px; }

/* The showcase windows have no sidebar, so the two-column body would leave a
   168px gap where one used to be. */
.window-body--plain { grid-template-columns: 1fr; min-height: 0; }

/* Three screens from the real travel section, side by side under "See how it
   works". They stack before the shots get too narrow to read. */
.showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.shot { margin: 0; display: grid; gap: 14px; }
.shot figcaption { display: grid; gap: 4px; }
.shot figcaption b { font-size: 15px; }
.shot figcaption span { color: var(--text-muted); font-size: 13.5px; line-height: 1.5; }
.shot .wmain { padding: 14px; }
.shot .kpis { gap: 8px; margin-block-end: 12px; }
.shot .kpi { padding: 9px 10px; }
.shot .kpi b { font-size: 16px; }

/* Day groups in the travel-plan shot. */
.wdays { display: grid; gap: 12px; }
.wday { display: grid; gap: 6px; }
.wday-head {
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 700;
}

@media (max-width: 1080px) {
    .showcase { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
}

@media (max-width: 760px) {
    .wcards { grid-template-columns: 1fr; }

    /* The travel nav carries a longer wordmark than the main site's and has no
       burger to hide things behind — at 390px the row overflowed the viewport and
       clipped "Get started". Wrapping to two rows fixes it for every language,
       which a width tweak would not: the brand, "log in" and "get started" are all
       longer in Russian and French. */
    .nav-travel .nav-inner { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 10px; }
    /* Wrapping the actions too, not just the row above them: in French
       "Se connecter" + "Commencer" overrun 390px and `justify-content: flex-end`
       pushed the theme switch off the start edge, where `overflow-x: hidden` ate
       it. Measured, not guessed — see docs/tests/test_0148.md. */
    .nav-travel .nav-actions {
        margin-inline-start: 0;
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        row-gap: 8px;
    }
    /* Back after task 0149c: the travel home page keeps a ONE-LINE title
       (request 149 Verification #1), and one line of "Travel by Domolytics" does
       not fit beside the nav controls at 390px in any language — measured in
       docs/tests/test_0148.md. Hiding the suffix is what kept row one to one line.
       The left panel is unaffected; it stacks instead, which is what the two-row
       layout was actually for. */
    .nav-travel .logo .brand-name__suffix { display: none; }
    /* With the row wrapped there is room for "log in" again — and this nav has no
       burger to put it behind, so hiding it would remove it from the page. */
    .nav-travel .nav-actions .btn-quiet { display: inline-flex; }
}
