:root {
  --ink: #16101a;
  --muted: #5c5360;
  --line: #eadfe3;
  --brand: #8b1538;
  --brand-hover: #6b1530;
  --soft: #f8f4f5;
  --font: Outfit, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: var(--soft); color: var(--ink); }
a { color: inherit; }
button, input { font: inherit; }

.site-nav { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.site-nav__inner { width: min(100% - 1.5rem, 1120px); margin: 0 auto; min-height: 72px; display: flex; align-items: center; gap: 1rem; }
.site-nav__brand { display: inline-flex; align-items: center; }
.site-nav__brand img { height: 40px; width: auto; display: block; }
.site-nav__brand .logo-dark { display: none; }
html[data-theme="dark"] .site-nav__brand .logo-light { display: none; }
html[data-theme="dark"] .site-nav__brand .logo-dark { display: block; }
.site-nav__links { display: none; gap: 0.2rem; margin-left: auto; }
.site-nav__links a { padding: 0.5rem 0.85rem; border-radius: 10px; color: var(--muted); font-weight: 550; font-size: 0.94rem; text-decoration: none; }
.site-nav__links a:hover { color: var(--brand); background: #f8eef1; }
.site-nav__actions { display: flex; align-items: center; gap: 0.45rem; margin-left: auto; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.lang button { border: 0; background: #fff; color: var(--muted); padding: 0.42rem 0.7rem; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.04em; cursor: pointer; }
.lang button.is-on { background: var(--brand); color: #fff; }
.nav-btn { display: none; align-items: center; justify-content: center; padding: 0.5rem 0.9rem; border-radius: 10px; font-weight: 650; font-size: 0.88rem; text-decoration: none; }
.nav-btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.nav-btn.primary { background: var(--brand); color: #fff; border: 1px solid var(--brand); }
@media (min-width: 980px) {
  .site-nav__links { display: flex; }
  .site-nav__actions { margin-left: 0.5rem; }
  .nav-btn { display: inline-flex; }
}

.stage { min-height: calc(100vh - 73px); display: flex; align-items: center; justify-content: center; padding: 1.75rem 0.75rem 2.5rem; }
.split { width: min(100% - 1.5rem, 1040px); display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.login-page .split { max-width: 920px; }
@media (min-width: 900px) {
  .split { grid-template-columns: 0.92fr 1.08fr; gap: 1.5rem; align-items: stretch; }
  .login-page .split { grid-template-columns: 0.95fr 1.05fr; }
  .intro { height: auto; align-self: stretch; }
}
@media (max-width: 899px) {
  .intro { display: none; }
}

.intro {
  background: var(--brand);
  color: #fff;
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}
.intro .eyebrow { color: rgba(255,255,255,0.82); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.75rem; font-weight: 750; margin: 0 0 1rem; }
.intro h1 { margin: 0 0 0.85rem; font-size: clamp(1.8rem, 3vw, 2.35rem); letter-spacing: -0.03em; line-height: 1.15; }
.intro .lead { margin: 0; color: rgba(255,255,255,0.9); line-height: 1.5; }
.points { list-style: none; margin: 1.35rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.points li { display: flex; gap: 0.55rem; align-items: flex-start; color: rgba(255,255,255,0.92); }
.points li::before { content: ""; width: 8px; height: 8px; margin-top: 0.45rem; border-radius: 50%; background: #fff; flex-shrink: 0; }
.home-link { margin-top: 1.6rem; color: #fff; font-weight: 650; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(22, 16, 26, 0.08);
  padding: 1.85rem 1.75rem;
}
.kicker { margin: 0; color: var(--brand); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.75rem; font-weight: 750; }
.panel h2 { margin: 0.35rem 0 1.1rem; font-size: 1.55rem; letter-spacing: -0.03em; }
form { display: grid; gap: 0.85rem; }
label { display: grid; gap: 0.35rem; color: #3a3340; font-weight: 600; font-size: 0.92rem; }
.pair { display: grid; gap: 0.85rem; }
.pair label { min-width: 0; }
@media (min-width: 640px) { .pair { grid-template-columns: 1fr 1fr; } }
input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 2.75rem;
  padding: 0.55rem 0.8rem;
  color: var(--ink);
  background: #fff;
}
input:not([type="checkbox"]):not([type="radio"]):focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.14);
  outline: none;
}
.check { display: flex; gap: 0.55rem; align-items: flex-start; font-weight: 550; font-size: 0.9rem; }
.kind { border: 0; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.kind legend { font-weight: 600; font-size: 0.92rem; color: #3a3340; padding: 0; }
.choice { display: flex; gap: 0.55rem; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.8rem; font-weight: 600; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: #f8eef1; }
.choice input { accent-color: var(--brand); }
.check input { margin-top: 0.2rem; accent-color: var(--brand); }
button[type="submit"] {
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  min-height: 3rem;
  font-weight: 700;
  cursor: pointer;
}
button[type="submit"]:hover { background: var(--brand-hover); }
#code-step { display: flex; flex-direction: column; align-items: stretch; }
#code-step form { display: grid; gap: 0.85rem; margin: 0; }
#code-step form + form { margin-top: 0.85rem; }
#code-step button[type="submit"] { width: 100%; position: static; margin: 0; }
#code-step .btn-quiet {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}
#code-step .btn-quiet:hover { background: #f8eef1; color: var(--brand-hover); }
.switch { text-align: center; color: var(--muted); margin: 0.9rem 0 0; }
.switch a { color: var(--brand); font-weight: 700; }
.error { background: #fef2f2; color: #b91c1c; border-radius: 10px; padding: 0.6rem 0.7rem; font-size: 0.88rem; margin: 0 0 0.8rem; }
.google { margin-top: 1rem; }
.google-line { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 0.85rem; color: var(--muted); font-size: 0.85rem; }
.google-line::before, .google-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google a {
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
  width: 100%; min-height: 3rem; border: 1px solid #d9d3dc; border-radius: 12px;
  background: #fff; color: #1b2030; font-weight: 600; text-decoration: none;
}
.google a:hover { border-color: var(--brand); background: #f8eef1; }
.google svg { width: 20px; height: 20px; }
.trial { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.78rem; text-align: center; }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.auth .card { width: min(440px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem 1.3rem 1.2rem; box-shadow: 0 18px 40px rgba(22,16,26,.08); }
.auth .brand { display: block; margin: 0 auto 1rem; text-align: center; }
.auth .brand img { height: 46px; width: auto; }
.auth .eyebrow { color: var(--brand); font-size: .75rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .4rem; }
.auth h1 { margin: 0 0 .4rem; font-size: 1.7rem; letter-spacing: -.03em; }
.auth .lead, .auth .hint, .auth .demo { color: var(--muted); font-size: .92rem; }
.auth form { display: grid; gap: .7rem; margin: 1rem 0 .4rem; }
.auth form[hidden] { display: none !important; }
.auth label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.auth button { border-radius: 12px; }
.auth .demo { background: #f8eef1; border-radius: 10px; padding: .65rem .75rem; }

.theme-switch { position: relative; }
.theme-toggle {
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; display: none; }
html[data-theme="light"] .theme-icon--sun,
html[data-theme="dark"] .theme-icon--moon { display: block; }
[data-theme-choice="system"] { display: none !important; }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 140px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(22,16,26,.12); padding: 0.3rem; z-index: 30;
}
.theme-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); border-radius: 8px; padding: 0.45rem 0.6rem; font-weight: 650; cursor: pointer; }
.theme-menu button[aria-checked="true"] { background: var(--brand); color: #fff; }
label small { color: var(--muted); font-weight: 500; font-size: 0.8rem; }

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3f4f5;
  --muted: #d8dadf;
  --line: #474c55;
  --soft: #0f1011;
  --brand: #e11d48;
  --brand-hover: #fb7185;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .site-nav,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .lang,
html[data-theme="dark"] .lang button,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .theme-menu,
html[data-theme="dark"] .nav-btn.ghost,
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]) {
  background: #1a1c20;
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .site-nav { background: #0f1011; }
html[data-theme="dark"] body { background: var(--soft); }
html[data-theme="dark"] label,
html[data-theme="dark"] .kicker,
html[data-theme="dark"] .kind legend { color: #d8dade; }
html[data-theme="dark"] .choice { background: #1a1c20; }
html[data-theme="dark"] .choice:has(input:checked) { background: #25282d; }
html[data-theme="dark"] .lang button.is-on,
html[data-theme="dark"] .theme-menu button[aria-checked="true"],
html[data-theme="dark"] .nav-btn.primary,
html[data-theme="dark"] button[type="submit"] { background: #8b1538; color: #fff; }
html[data-theme="dark"] .google a { background: #fff; color: #1b2030; }
