:root {
    /* Brand — Suporte Imagem green, reinterpreted premium */
    --brand: oklch(0.72 0.18 145);
    --brand-hi: oklch(0.82 0.20 148);
    --brand-lo: oklch(0.55 0.15 145);
    --brand-glow: oklch(0.72 0.18 145 / 0.35);

    /* Dark palette (default) */
    --bg-0: #07080a;
    --bg-1: #0b0d10;
    --bg-2: #11141a;
    --bg-3: #171b22;
    --line: rgba(255,255,255,0.06);
    --line-strong: rgba(255,255,255,0.12);
    --fg: #e7ecf2;
    --fg-mute: #8a94a4;
    --fg-faint: #566070;
    --field-bg: rgba(255,255,255,0.03);
    --field-bg-focus: rgba(255,255,255,0.05);
    --chip-bg: rgba(255,255,255,0.04);
    --glass: rgba(255,255,255,0.025);
    --grid-dot: rgba(255,255,255,0.045);
    --noise-op: 0.035;
  }

  html[data-theme="light"] {
    --brand: oklch(0.55 0.17 146);
    --brand-hi: oklch(0.62 0.18 148);
    --brand-lo: oklch(0.42 0.15 146);
    --brand-glow: oklch(0.55 0.17 146 / 0.18);

    --bg-0: #f5f6f4;
    --bg-1: #fafbf9;
    --bg-2: #ffffff;
    --bg-3: #f0f2ef;
    --line: rgba(10,14,20,0.07);
    --line-strong: rgba(10,14,20,0.14);
    --fg: #0c1016;
    --fg-mute: #5a6472;
    --fg-faint: #8a94a2;
    --field-bg: #ffffff;
    --field-bg-focus: #ffffff;
    --chip-bg: rgba(10,14,20,0.035);
    --glass: rgba(255,255,255,0.7);
    --grid-dot: rgba(10,14,20,0.06);
    --noise-op: 0.02;
  }

  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body {
    font-family: 'Inter Tight', system-ui, sans-serif;
    background: var(--bg-0);
    color: var(--fg);
    font-feature-settings: "ss01","cv11";
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

  /* Top chrome */
  .chrome {
    position: fixed; top: 0; left: 0; right: 0;
    height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px;
    z-index: 50;
    pointer-events: none;
  }
  .chrome > * { pointer-events: auto; }
  .crumb {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--fg-faint);
  }
  .crumb .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand-glow); }
  .chrome-right { display: flex; gap: 8px; align-items: center; }

  .theme-toggle {
    appearance: none; background: var(--chip-bg);
    border: 1px solid var(--line); color: var(--fg-mute);
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer;
    transition: all .2s ease;
  }
  .theme-toggle:hover { color: var(--fg); border-color: var(--line-strong); }
  .theme-toggle svg { width: 15px; height: 15px; }

  /* Stage */
  .stage {
    min-height: 100vh;
    position: relative;
    isolation: isolate;
  }

  /* ============ VARIANT B — split cinematic ============ */
  .vB {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    min-height: 100vh;
  }

  .vB .left {
    position: relative;
    background: var(--bg-0);
    overflow: hidden;
    border-right: 1px solid var(--line);
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 56px 56px 44px;
  }
  .vB .left::before {
    content: ""; position: absolute; inset: 0;
    background:
      radial-gradient(50% 40% at 30% 60%, var(--brand-glow), transparent 65%),
      radial-gradient(30% 30% at 80% 20%, oklch(0.72 0.18 145 / 0.15), transparent 70%);
    opacity: 1;
  }
  .vB .left::after {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(var(--grid-dot) 1px, transparent 1px),
                      linear-gradient(90deg, var(--grid-dot) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(80% 80% at 40% 50%, black 20%, transparent 80%);
    opacity: 0.6;
  }

  .left-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

  .logo-wordmark { height: 28px; display: block; }
  .logo-wordmark img { height: 100%; width: auto; display: block; }
  .logo-wordmark .light-only { display: none; }
  html[data-theme="light"] .logo-wordmark .light-only { display: block; }
  html[data-theme="light"] .logo-wordmark .dark-only { display: none; }

  .sia-mark {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 13px 8px 11px;
    background: var(--chip-bg);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-family: 'Inter Tight';
  }
  .sia-mark .sia-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 10px var(--brand-glow);
  }
  .sia-mark .sia-text {
    font-weight: 700; font-size: 14px; letter-spacing: 0.02em;
    color: var(--fg);
  }
  .sia-mark .sia-suffix {
    color: var(--brand);
    font-weight: 500;
  }
  html[data-theme="light"] .sia-mark .sia-suffix { color: var(--brand-lo); }

  .visual {
    position: relative; z-index: 2;
    flex: 1;
    display: grid; place-items: center;
    margin: -20px 0;
  }
  .rings-wrap {
    position: relative;
    width: min(520px, 70%);
    aspect-ratio: 1;
  }
  .ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
  }
  .ring.r1 { inset: 0; }
  .ring.r2 { inset: 10%; border-style: dashed; opacity: 0.6;}
  .ring.r3 { inset: 22%; border-color: oklch(0.72 0.18 145 / 0.3);}
  .ring.r4 { inset: 34%; opacity: 0.5; }
  .ring.r5 { inset: 44%; border-color: oklch(0.72 0.18 145 / 0.5); box-shadow: 0 0 60px var(--brand-glow) inset; }
  .core {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 42%; height: 42%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, oklch(0.72 0.18 145 / 0.25), oklch(0.72 0.18 145 / 0.05) 60%, transparent 75%);
  }
  .scanline {
    position: absolute; top: 50%; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
    box-shadow: 0 0 12px var(--brand-glow);
    animation: scan 4s ease-in-out infinite alternate;
    transform-origin: center;
  }
  @keyframes scan {
    0% { transform: translateY(-120px); opacity: .3; }
    50% { opacity: 1; }
    100% { transform: translateY(120px); opacity: .3; }
  }
  .ticks {
    position: absolute; inset: 0;
    pointer-events: none;
  }
  .tick-label {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; color: var(--fg-faint);
    letter-spacing: 0.05em;
    white-space: nowrap;
  }
  .tick-label::before {
    content: ""; display: inline-block;
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--brand); margin-right: 7px;
    vertical-align: middle;
    box-shadow: 0 0 8px var(--brand-glow);
  }

  .left-bottom {
    position: relative; z-index: 2;
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 24px;
  }
  .tagline {
    max-width: 360px;
    font-family: 'Inter Tight';
    font-weight: 400;
    font-size: 17px;
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: var(--fg);
  }
  .tagline em {
    font-style: normal;
    color: var(--fg-mute);
  }
  .meta-col {
    display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; color: var(--fg-faint);
    letter-spacing: 0.05em;
    text-align: right;
  }
  .meta-col .k { color: var(--fg-mute); }

  .vB .right {
    display: flex; flex-direction: column;
    justify-content: space-between;
    padding: 56px;
    background: var(--bg-1);
    position: relative;
  }
  .vB .right-top { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--fg-faint); letter-spacing: 0.08em; text-transform: uppercase; }
  .vB .right-top .num { color: var(--fg-mute); }

  .form-wrap {
    width: 100%;
    max-width: 380px;
    margin: auto 0;
  }
  .welcome {
    margin: 0 0 8px;
    font-family: 'Inter Tight';
    font-weight: 500;
    font-size: 30px;
    letter-spacing: -0.025em;
    line-height: 1.15;
  }
  .subline {
    margin: 0 0 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--fg-faint);
    letter-spacing: 0.02em;
  }
  .subline .tick { color: var(--brand); }

  .field { margin-bottom: 14px; position: relative; }
  .field label {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 7px;
    font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--fg-mute);
  }
  .input {
    position: relative;
    display: flex; align-items: center;
    background: var(--field-bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: all .18s ease;
    overflow: hidden;
  }
  .input:focus-within {
    background: var(--field-bg-focus);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-glow);
  }
  .input .ico {
    width: 44px; display: grid; place-items: center;
    color: var(--fg-faint);
  }
  .input .ico svg { width: 15px; height: 15px; }
  .input input {
    flex: 1;
    background: transparent; border: 0; outline: 0;
    color: var(--fg);
    font: 400 14px/1 'Inter Tight';
    padding: 14px 14px 14px 0;
    letter-spacing: -0.005em;
  }
  .input input::placeholder { color: var(--fg-faint); }
  .input .toggle-eye {
    background: transparent; border: 0; cursor: pointer;
    color: var(--fg-faint); padding: 0 14px; height: 100%;
    display: grid; place-items: center;
  }
  .input .toggle-eye:hover { color: var(--fg-mute); }
  .input .toggle-eye svg { width: 15px; height: 15px; }

  .row-between {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 4px; margin-bottom: 22px;
  }
  .check {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: 12px; color: var(--fg-mute);
    user-select: none;
    white-space: nowrap;
  }
  .check input { display: none; }
  .check .box {
    width: 15px; height: 15px; border-radius: 4px;
    border: 1px solid var(--line-strong);
    background: var(--field-bg);
    display: grid; place-items: center;
    transition: all .15s ease;
  }
  .check input:checked + .box {
    background: var(--brand); border-color: var(--brand);
  }
  .check input:checked + .box::after {
    content: "";
    width: 7px; height: 4px;
    border-left: 1.5px solid #0b0d10;
    border-bottom: 1.5px solid #0b0d10;
    transform: rotate(-45deg) translate(1px,-1px);
  }
  .link {
    font-size: 12px; color: var(--fg-mute); text-decoration: none;
    transition: color .15s ease;
    border-bottom: 1px dashed transparent;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0;
  }
  .link:hover { color: var(--brand-hi); border-bottom-color: var(--brand-hi); }
  html[data-theme="light"] .link:hover { color: var(--brand-lo); border-bottom-color: var(--brand-lo); }

  .ai-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 10px 6px 8px;
    background: var(--chip-bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px; letter-spacing: 0.02em;
    color: var(--fg-mute);
  }
  .ai-chip .spark {
    width: 14px; height: 14px; position: relative;
  }
  .ai-chip .spark::before,
  .ai-chip .spark::after {
    content: ""; position: absolute; inset: 0;
    background: var(--brand);
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2 L14 10 L22 12 L14 14 L12 22 L10 14 L2 12 L10 10 Z"/></svg>') center / contain no-repeat;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2 L14 10 L22 12 L14 14 L12 22 L10 14 L2 12 L10 10 Z"/></svg>') center / contain no-repeat;
  }
  .ai-chip .spark::after {
    filter: blur(4px); opacity: 0.8;
  }

  .btn-primary {
    width: 100%;
    position: relative;
    appearance: none; cursor: pointer;
    background: linear-gradient(180deg, var(--brand-hi), var(--brand));
    color: #06170c;
    font: 600 13.5px/1 'Inter Tight'; letter-spacing: 0.01em;
    border: 1px solid oklch(0.45 0.13 145 / 0.6);
    border-radius: 12px;
    padding: 14px 16px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow:
      0 1px 0 rgba(255,255,255,0.3) inset,
      0 -1px 0 rgba(0,0,0,0.15) inset,
      0 8px 24px -6px var(--brand-glow);
    transition: transform .1s ease, box-shadow .2s ease;
  }
  html[data-theme="light"] .btn-primary {
    background: linear-gradient(180deg, oklch(0.42 0.14 146), oklch(0.34 0.12 146));
    color: #f4f9f2;
    border: 1px solid oklch(0.28 0.10 146);
    box-shadow:
      0 1px 0 oklch(0.52 0.14 146 / 0.5) inset,
      0 -1px 0 rgba(0,0,0,0.2) inset,
      0 10px 28px -10px oklch(0.42 0.14 146 / 0.5);
  }
  html[data-theme="light"] .btn-primary:hover {
    background: linear-gradient(180deg, oklch(0.46 0.15 146), oklch(0.36 0.13 146));
  }
  .btn-primary:hover { box-shadow:
      0 1px 0 rgba(255,255,255,0.35) inset,
      0 -1px 0 rgba(0,0,0,0.15) inset,
      0 10px 30px -6px var(--brand-glow); }
  .btn-primary:active { transform: translateY(1px); }
  .btn-primary .kbd {
    margin-left: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: 0.04em;
    padding: 3px 6px; border-radius: 5px;
    background: rgba(0,0,0,0.18);
    color: rgba(6,23,12,0.7);
  }
  html[data-theme="light"] .btn-primary .kbd {
    background: rgba(255,255,255,0.12);
    color: rgba(244,249,242,0.8);
  }

  .vB .right-bottom {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px; color: var(--fg-faint);
    letter-spacing: 0.04em;
    display: flex; justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }
  .vB .right-bottom a { color: var(--fg-mute); text-decoration: none; border-bottom: 1px dashed var(--line-strong); padding-bottom: 1px; }
  .vB .right-bottom a:hover { color: var(--brand-hi); }

  /* Django error states */
  .alert-error {
    background: oklch(0.55 0.18 25 / 0.08);
    border: 1px solid oklch(0.55 0.18 25 / 0.25);
    color: oklch(0.78 0.15 25);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 12.5px;
    margin-bottom: 18px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.01em;
  }
  html[data-theme="light"] .alert-error { color: oklch(0.45 0.16 25); }

  .field.has-error .input {
    border-color: oklch(0.55 0.18 25 / 0.5);
  }
  .field-error {
    margin-top: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: oklch(0.78 0.15 25);
    letter-spacing: 0.02em;
  }
  html[data-theme="light"] .field-error { color: oklch(0.45 0.16 25); }

  /* Autofill override */
  input:-webkit-autofill,
  input:-webkit-autofill:hover,
  input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-2) inset;
    -webkit-text-fill-color: var(--fg);
    transition: background-color 5000s ease-in-out 0s;
  }

  /* Focus */
  :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
  button:focus-visible, a:focus-visible { outline-offset: 3px; }

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