  :root {
    --navy: #0a2a5e;
    --blue: #1558c9;
    --blue-dark: #0f46a3;
    --gold: #d9a62e;
    --paper: #f4f7fc;
    --ink: #14213d;
    --muted: #5b6785;
    --line: #cfd8ea;
    --error: #b3261e;
    --card: #ffffff;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #0c1730;
      --ink: #eaf0fb;
      --muted: #a2b0cf;
      --line: #2b3a5e;
      --card: #12203f;
      --error: #ff8a80;
    }
  }
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
  }
  .page { min-height: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }

  /* Left brand panel */
  .brand {
    background: linear-gradient(160deg, var(--navy) 0%, var(--blue) 100%);
    color: #fff;
    padding: 48px clamp(28px, 5vw, 72px);
    display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    position: relative; overflow: hidden;
  }
  .brand::after {
    content: ""; position: absolute; right: -140px; bottom: -140px;
    width: 420px; height: 420px; border-radius: 50%;
    border: 2px solid rgba(217,166,46,.55);
  }
  .lockup { display: flex; align-items: center; gap: 14px; }
  .lockup a{
    text-decoration: none;
    color: #82a41d;
  }
  .lockup a:hover{
    color: #82a41dab;
  }
  .lockup svg { flex: none; }
  .lockup .name { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
  .lockup .name span { display: block; height: 3px; width: 100%; background: var(--gold); margin-top: 6px; border-radius: 2px; }
  .brand h2 { font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.2; margin: 0 0 14px; max-width: 18ch; }
  .brand p { margin: 0; color: rgba(255,255,255,.85); max-width: 40ch; }
  .brand ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; position: relative; z-index: 1; }
  .brand li { display: flex; gap: 10px; align-items: center; color: rgba(255,255,255,.92); }
  .brand li svg { flex: none; }

  /* Form side */
  .panel { display: grid; place-items: center; padding: 40px 20px; }
  .card { width: 100%; max-width: 420px; }
  .card h1 { font-family: var(--serif); font-size: 2rem; line-height: 1.2; margin: 0 0 8px; }
  .card .sub { color: var(--muted); margin: 0 0 28px; }
  .field { margin-bottom: 18px; }
  label { display: block; font-weight: 600; margin-bottom: 6px; }
  .control { position: relative; }
  input[type="email"], input[type="password"], input[type="text"] {
    width: 100%; font: inherit; color: var(--ink);
    background: var(--card); border: 1.5px solid var(--line); border-radius: 8px;
    padding: 12px 14px; min-height: 48px;
    transition: border-color .15s, box-shadow .15s;
  }
  input:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,88,201,.25); }
  input[aria-invalid="true"] { border-color: var(--error); }
  .control input[type="password"], .control input.pw { padding-right: 76px; }
  .toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; font: inherit; font-weight: 600; font-size: .9rem;
    color: var(--blue); cursor: pointer; padding: 8px 10px; border-radius: 6px;
  }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toggle { color: #8fb7ff; } }
  .toggle:focus-visible { outline: 3px solid rgba(21,88,201,.4); }
  .err { color: var(--error); font-size: .9rem; margin: 6px 0 0; min-height: 0; }
  .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 22px; }
  .check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; cursor: pointer; }
  .check input { width: 18px; height: 18px; accent-color: var(--blue); }
  a { color: var(--blue); }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a { color: #8fb7ff; } }
  a:focus-visible { outline: 3px solid rgba(21,88,201,.4); outline-offset: 2px; border-radius: 3px; }
  .btn {
    width: 100%; min-height: 50px; font: inherit; font-weight: 600; font-size: 1.05rem;
    background: var(--blue); color: #fff; border: 0; border-radius: 8px; cursor: pointer;
    border-bottom: 3px solid var(--gold);
    transition: background .15s;
  }
  .btn:hover { background: var(--blue-dark); }
  .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
  .btn[disabled] { opacity: .7; cursor: progress; }
  .status { margin-top: 16px; padding: 12px 14px; border-radius: 8px; display: none; font-size: .95rem; }
  .status.show { display: block; }
  .status.bad { background: rgba(179,38,30,.1); color: var(--error); border: 1px solid var(--error); }
  .status.ok { background: rgba(21,128,61,.12); color: #15803d; border: 1px solid #15803d; }
  .foot { margin-top: 26px; text-align: center; color: var(--muted); }

  @media (max-width: 860px) {
    .page { grid-template-columns: 1fr; }
    .brand { padding: 28px 24px; gap: 24px; }
    .brand ul { display: none; }
    .brand::after { display: none; }
    .brand h2 { font-size: 1.5rem; }
  }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Added for sign-up and dashboard */
.hint { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.hint.ok { color: #15803d; }
.card.wide { max-width: 460px; }
.dash { max-width: 720px; margin: 0 auto; padding: 48px 20px; }
.dash h1 { font-family: var(--serif); margin: 0 0 8px; }
.dash .bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.dash .btn.small { width: auto; min-height: 42px; padding: 0 20px; font-size: 1rem; }
.dash .panelbox { background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 22px; }

/* Contact page */
select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 8px;
  padding: 12px 14px; min-height: 48px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 140px; resize: vertical; }
select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,88,201,.25); }
select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
.count { color: var(--muted); font-size: .85rem; text-align: right; margin: 4px 0 0; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { text-align: left; }
.done h2 { font-family: var(--serif); font-size: 1.7rem; margin: 0 0 10px; }
.done .btn { margin-top: 18px; }
.brand ul.details li { align-items: flex-start; }
.brand ul.details a { color: #fff; }
@media (max-width: 860px) { .brand ul.details { display: grid; } }
