
  :root {
    --ink: #181818; --ink-weak: #5c5c5c; --ink-faint: #939393;
    --line: #d8dde6; --surface: #ffffff; --brand: #0176d3; --brand-dark: #032d60;
    --err: #ba0517; --err-bg: #fdecec; --err-line: #f5b5b5;
    --navy-deep: #060f1d; --navy: #0d1f3c; --navy-mid: #1f3864;
    --blob-a: rgba(1, 118, 211, .55); --blob-b: rgba(30, 80, 170, .45);
    --blob-c: rgba(12, 40, 90, .40);
    --check: #45c65a; --check-bg: rgba(69, 198, 90, .18);
    --check-line: rgba(69, 198, 90, .45);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --ink: #eaeff3; --ink-weak: #a9b4bf; --ink-faint: #78848f;
      --line: #2f373e; --surface: #1c2126; --brand: #57a3fb;
      --err: #fe5c4c; --err-bg: #2a1a1a; --err-line: #5a2a2a;
    }
  }
  * { box-sizing: border-box; }
  body {
    margin: 0; color: var(--ink); background: var(--surface);
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }

  .shell { display: flex; min-height: 100vh; }

  /* --- Brand panel ---------------------------------------------------- */
  .brand-panel {
    flex: 0 0 50%; position: relative; overflow: hidden;
    display: flex; flex-direction: column; padding: 48px 52px;
    background-color: var(--navy);
    background-image:
      radial-gradient(ellipse 70% 55% at 80% 20%, var(--blob-a), transparent 70%),
      radial-gradient(ellipse 60% 60% at 10% 80%, var(--blob-b), transparent 65%),
      radial-gradient(ellipse 90% 70% at 50% 50%, var(--blob-c), transparent 80%),
      linear-gradient(160deg, var(--navy-mid) 0%, var(--navy) 40%, var(--navy-deep) 100%);
  }
  .blob { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
  .blob--tr { width: 520px; height: 420px; top: -80px; right: -120px;
              background: radial-gradient(ellipse, var(--blob-a), transparent 70%);
              animation: fade 1.2s ease both; }
  .blob--bl { width: 460px; height: 460px; bottom: -100px; left: -100px;
              background: radial-gradient(ellipse, var(--blob-b), transparent 65%);
              animation: fade 1.4s ease both; }
  .noise {
    position: absolute; inset: 0; opacity: .3; pointer-events: none;
    /* Backslash-continued so the source line stays readable; Python joins it
       back into the single line the url() needs. */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    background-size: 200px 200px;
  }
  .brand-inner { position: relative; z-index: 1; max-width: 42rem; padding-top: 9vh; }
  .brand-logo {
    display: flex; align-items: center; gap: 12px; margin-bottom: 72px;
    animation: rise .6s cubic-bezier(.22,1,.36,1) both;
  }
  .brand-logo svg { display: block; }
  .brand-logo span {
    color: #fff; font-size: 18px; font-weight: 600; letter-spacing: -.2px;
  }
  .badge {
    display: inline-block; margin: 0 0 18px; color: rgba(255,255,255,.9);
    font-size: 11px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase;
    animation: rise .6s .15s cubic-bezier(.22,1,.36,1) both;
  }
  .headline {
    margin: 0 0 24px; color: #fff; font-size: clamp(32px, 3.6vw, 46px);
    font-weight: 500; line-height: 1.15; letter-spacing: .15px;
    animation: rise .7s .25s cubic-bezier(.22,1,.36,1) both;
  }
  .lede {
    margin: 0 0 44px; max-width: 30rem; color: rgba(255,255,255,.85);
    font-size: 16px; line-height: 1.65;
    animation: rise .7s .38s cubic-bezier(.22,1,.36,1) both;
  }
  .features {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 16px;
  }
  .feature {
    display: flex; align-items: center; gap: 14px; opacity: 0;
    animation: rise .6s cubic-bezier(.22,1,.36,1) forwards;
  }
  .feature:nth-child(1) { animation-delay: .60s; }
  .feature:nth-child(2) { animation-delay: .72s; }
  .feature:nth-child(3) { animation-delay: .84s; }
  .feature i {
    flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%;
    background: var(--check-bg); border: 1.5px solid var(--check-line); color: var(--check);
    display: flex; align-items: center; justify-content: center;
  }
  .feature span { color: rgba(230, 238, 255, .85); font-size: 14.5px; line-height: 1.4; }

  /* --- Form panel ------------------------------------------------------ */
  .form-panel {
    flex: 0 0 50%; display: flex; align-items: center; justify-content: center;
    padding: 48px 32px; background: var(--surface);
  }
  .form-inner { width: 100%; max-width: 26rem; animation: fade .3s ease both; }
  .greeting { display: block; color: var(--ink-weak); font-size: 13.5px; font-weight: 500; }
  .title {
    margin: 0 0 12px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2;
  }
  .subtitle { margin: 0 0 28px; color: var(--ink-weak); font-size: 15px; }
  label {
    display: block; margin: 0 0 6px; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .05em; color: var(--ink-weak);
  }
  input {
    width: 100%; margin-bottom: 18px; padding: 12px 14px; font-size: 15px;
    border: 1px solid var(--line); border-radius: 6px;
    background: var(--surface); color: var(--ink);
  }
  input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
  button {
    width: 100%; height: 48px; font-size: 15px; font-weight: 700; letter-spacing: .01em;
    cursor: pointer; color: #fff; background: var(--brand); border: 0; border-radius: 6px;
  }
  button:hover { filter: brightness(1.08); }
  .btn--secondary {
    margin-top: 12px;
    color: var(--ink-weak); background: var(--surface); border: 1px solid var(--line);
  }
  .btn--secondary:hover { border-color: var(--brand); color: var(--brand); }
  .err {
    margin: 0 0 18px; padding: 10px 12px; font-size: 13px;
    color: var(--err); background: var(--err-bg);
    border: 1px solid var(--err-line); border-radius: 6px;
  }
  .foot { margin: 24px 0 0; text-align: center; color: var(--ink-faint); font-size: 12px; }

  /* --- Responsive ------------------------------------------------------ */
  @media (max-width: 980px) {
    .shell { flex-direction: column; }
    .brand-panel { flex: 0 0 auto; padding: 32px 28px; }
    .brand-inner { padding-top: 0; }
    .brand-logo { margin-bottom: 28px; }
    .lede { margin-bottom: 0; }
    .features { display: none; }
    .form-panel { flex: 1 1 auto; padding: 40px 28px; }
  }
  /* Below this the brand panel is gone, so the mark comes across to the form:
     a sign-in page with no name on it could belong to anything. */
  .mobile-mark { display: none; align-items: center; gap: 10px; margin-bottom: 28px; }
  .mobile-mark span { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
  @media (max-width: 620px) {
    .brand-panel { display: none; }
    .mobile-mark { display: flex; }
  }
  @media (prefers-reduced-motion: reduce) {
    * { animation: none !important; }
    .feature { opacity: 1; }
  }
