/* ════════════════════════════════════════════════════════════════════
   Blocade — front door / sign-in. Faithful port of the prototype's
   `Blocade app design/index.html` inline CSS, scoped under `.civic-auth`.
   Soft pastel surfaces, sharp color only on data. Local tokens override
   the (starker) design-system vars within the auth screen; --font-*, --r,
   --r-pill, --speed, --ease resolve through design-system.css.
   ════════════════════════════════════════════════════════════════════ */
.civic-auth {
  --ink: #262c4d; --ink-2: #5b6285; --ink-3: #9a9fbb;
  --paper: #FBFAF7; --surface: #ffffff; --surface-2: #F4F2FB;
  --line: #EAE8F4; --line-2: #DBD8EC;
  --blue: #3B4EE0; --blue-press: #2D3EC6; --blue-soft: #EDEEFD;
  /* pastel washes */
  --w-sky: #E9EEFC; --w-lilac: #F0EAFB; --w-mint: #E5F3EC; --w-cream: #FBF2E0; --w-blush: #FBEDE8;
  /* sharp accents — data / charts / deltas only */
  --a-indigo: #3B4EE0; --a-gold: #E0952A; --a-gold-br: #EBA63E; --a-green: #12915B; --a-red: #D2583E;
  --r: 13px; --r-sm: 9px; --r-xs: 6px; --r-lg: 18px; --r-xl: 26px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(20, 20, 27, 0.05), 0 1px 1px rgba(20, 20, 27, 0.04);

  display: grid;
  grid-template-columns: 47fr 53fr;
  min-height: 100vh;
  color: var(--ink);
}

/* ── LEFT · sign-in ─────────────────────────────────────────────────── */
.civic-signin {
  position: relative; display: flex; flex-direction: column; overflow: auto;
  padding: 30px 38px 26px;
  background:
    radial-gradient(680px 360px at 0% 0%, color-mix(in srgb, var(--w-sky) 70%, transparent), transparent 62%),
    var(--paper);
}
.civic-auth .su-top { display: flex; align-items: center; justify-content: space-between; }
.civic-auth .logo { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.civic-auth .logo:hover { color: var(--ink); }
.civic-auth .logo .mk { width: 32px; height: 32px; }
.civic-auth .logo .wm { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -.035em; color: var(--a-gold); }
.civic-auth .logo .wm b { color: var(--ink); font-weight: 600; }
.civic-auth .su-top-r { display: flex; align-items: center; gap: 6px; }
.civic-auth .ghost-link {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 7px 11px; border-radius: var(--r-pill);
  transition: all var(--speed) var(--ease); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none;
}
.civic-auth .ghost-link:hover { background: var(--surface-2); color: var(--ink); }
.civic-auth .ghost-link i { font-size: 13px; }

.civic-auth .su-center { flex: 1; display: flex; flex-direction: column; justify-content: safe center; align-items: center; padding: 24px 0; }
.civic-auth .su-card { width: 100%; max-width: 392px; }

.civic-auth .trust-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  color: #3a4794; background: linear-gradient(180deg, var(--w-sky), #fff); border: 1px solid #D9DEF6;
  padding: 5px 12px 5px 10px; border-radius: var(--r-pill); white-space: nowrap;
}
.civic-auth .trust-pill i { color: var(--a-gold); font-size: 12px; }
.civic-auth .trust-pill b { color: var(--a-gold); font-weight: 800; }

.civic-auth h1.su-h { font-family: var(--font-display); font-weight: 600; font-size: 38px; letter-spacing: -.03em; line-height: 1.04; margin: 18px 0 7px; color: var(--ink); }
.civic-auth .su-sub { color: var(--ink-2); font-size: 15px; margin: 0 0 22px; line-height: 1.5; }
.civic-auth .su-sub b { color: var(--ink); font-weight: 650; }

/* flashed messages */
.civic-auth .su-card .alert { border-radius: var(--r); font-size: 13.5px; padding: 11px 14px; margin-bottom: 16px; }

/* SSO */
.civic-auth .sso-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.civic-auth .sso {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px;
  cursor: pointer; transition: all var(--speed) var(--ease); font-family: inherit; text-decoration: none;
}
.civic-auth .sso:hover { background: var(--surface-2); border-color: var(--ink-3); transform: translateY(-1px); color: var(--ink); }
.civic-auth .sso svg { width: 17px; height: 17px; }

.civic-auth .su-or { display: flex; align-items: center; gap: 13px; margin: 18px 0; color: var(--ink-3); font-size: 11.5px; font-weight: 600; letter-spacing: .05em; }
.civic-auth .su-or::before, .civic-auth .su-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.civic-auth .fg { margin-bottom: 13px; }
.civic-auth .fg .lbl-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.civic-auth .fg .lbl-row a { font-size: 12px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.civic-auth .fg .lbl-row a:hover { color: var(--blue); }
.civic-auth .lbl { font-size: 12.5px; font-weight: 650; color: var(--ink-2); display: block; margin-bottom: 6px; }
.civic-auth .fw { position: relative; }
.civic-auth .fw .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); display: flex; pointer-events: none; }
.civic-auth .fw .ico i { font-size: 15px; }
.civic-auth .fw .field {
  width: 100%; height: 46px; padding: 0 44px 0 39px; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--line-2); color: var(--ink); font: inherit; font-size: 14px;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.civic-auth .fw .field:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.civic-auth .fw .field::placeholder { color: var(--ink-3); }
.civic-auth .fw .peek {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: none;
  background: transparent; color: var(--ink-3); border-radius: var(--r-xs); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--speed) var(--ease);
}
.civic-auth .fw .peek:hover { color: var(--ink); background: var(--surface-2); }
.civic-auth .fw .peek i { font-size: 15px; }

.civic-auth .opt-row { display: flex; align-items: center; justify-content: space-between; margin: 3px 0 17px; }
.civic-auth .remember { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer; user-select: none; }
.civic-auth .remember input { accent-color: var(--blue); width: 15px; height: 15px; margin: 0; }

/* CTA — deep indigo-ink (confident + non-partisan) */
.civic-auth .btn-signin {
  width: 100%; justify-content: center; height: 48px; font-size: 15px; font-weight: 650; border: none; border-radius: var(--r);
  color: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(180deg, #2f3868, #222a4f); box-shadow: 0 8px 20px -8px rgba(34, 42, 79, .6), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: all var(--speed) var(--ease); font-family: inherit;
}
.civic-auth .btn-signin:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(34, 42, 79, .66), inset 0 1px 0 rgba(255, 255, 255, .12); color: #fff; }
.civic-auth .btn-signin:active { transform: translateY(.5px); }
.civic-auth .btn-signin .arrow { transition: transform var(--speed) var(--ease); }
.civic-auth .btn-signin:hover .arrow { transform: translateX(3px); }

.civic-auth .sso-foot { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 15px; color: var(--ink-3); font-size: 12.5px; }
.civic-auth .su-new { text-align: center; color: var(--ink-2); font-size: 13.5px; margin: 18px 0 0; }
.civic-auth .su-new a { font-weight: 650; color: var(--blue); text-decoration: none; }
.civic-auth .su-new a:hover { text-decoration: underline; }

.civic-auth .su-legal { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-size: 11.5px; }
.civic-auth .su-legal .lk { display: inline-flex; align-items: center; gap: 6px; }
.civic-auth .su-legal i { color: var(--a-green); font-size: 12px; }

/* ── RIGHT · live campaign ledger ───────────────────────────────────── */
.civic-auth .ledger {
  position: relative; overflow: auto; display: flex; flex-direction: column; justify-content: safe center; gap: 18px; padding: 44px 50px;
  background:
    radial-gradient(820px 440px at 92% -8%, var(--w-cream), transparent 56%),
    radial-gradient(680px 560px at 6% 6%, var(--w-sky), transparent 56%),
    radial-gradient(760px 680px at 70% 120%, var(--w-mint), transparent 58%),
    linear-gradient(152deg, var(--w-lilac) 0%, #FCFBFE 64%);
}
.civic-auth .ledger .grain { position: absolute; inset: 0; opacity: .4; pointer-events: none; mix-blend-mode: multiply; z-index: 0; }
.civic-auth .ledger > * { position: relative; z-index: 1; }
.civic-auth .led-wrap { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

/* product showcase (right panel) */
.civic-auth .prod-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.civic-auth .pb-mark { width: 30px; height: 30px; display: inline-flex; color: var(--ink); }
.civic-auth .pb-mark svg { width: 30px; height: 30px; }
.civic-auth .pb-wm { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.03em; color: var(--a-gold); }
.civic-auth .pb-wm b { color: var(--ink); font-weight: 600; }
.civic-auth .preview-chip {
  margin-left: 4px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
  background: #fff; border: 1px solid var(--line-2); padding: 3px 9px; border-radius: var(--r-pill);
}
.civic-auth .prod-head { font-family: var(--font-display); font-weight: 600; font-size: 33px; line-height: 1.08; letter-spacing: -.03em; color: var(--ink); margin: 4px 0 0; }
.civic-auth .prod-sub { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; margin: 11px 0 2px; max-width: 46ch; }

/* the data card */
.civic-auth .led-card {
  background: rgba(255, 255, 255, .82); border: 1px solid #EBE8F4; border-radius: var(--r-xl);
  box-shadow: 0 24px 60px -28px rgba(40, 40, 80, .34), 0 2px 8px rgba(40, 40, 80, .05); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 20px 22px 14px;
}
.civic-auth .lc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.civic-auth .lc-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.civic-auth .lc-hero { font-family: var(--font-mono); font-weight: 600; font-size: 30px; letter-spacing: -.03em; line-height: 1; margin-top: 7px; color: var(--ink); }
.civic-auth .lc-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.civic-auth .legend { display: flex; gap: 14px; }
.civic-auth .lg { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.civic-auth .lg i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.civic-auth .chart-box { position: relative; margin-top: 6px; }
.civic-auth .chart-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.civic-auth .end-pill {
  position: absolute; font-family: var(--font-mono); font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: var(--r-pill);
  transform: translate(-50%, -50%); white-space: nowrap; box-shadow: var(--sh-1);
}
.civic-auth .end-pill.gold { background: var(--a-gold-br); color: #3a2706; }
.civic-auth .end-pill.ind { background: #fff; color: var(--a-indigo); border: 1px solid #D7DBF7; }
.civic-auth .end-pill.x8 { background: #fff; color: var(--a-gold); border: 1px solid #EAD3A0; font-size: 10.5px; transform: translate(8px, -50%); }

/* feature rows */
.civic-auth .feat-row { display: flex; flex-direction: column; gap: 12px; margin-top: 2px; }
.civic-auth .feat { display: flex; align-items: flex-start; gap: 12px; }
.civic-auth .feat-ic {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #E6E2F4; color: var(--a-indigo); box-shadow: var(--sh-1);
}
.civic-auth .feat-ic i { font-size: 15px; }
.civic-auth .feat b { font-size: 13.5px; font-weight: 650; display: block; color: var(--ink); }
.civic-auth .feat span { font-size: 12.5px; color: var(--ink-2); }

/* reveals */
@keyframes civic-rise2 { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.civic-auth .rv { animation: civic-rise2 .6s var(--ease) both; }
.civic-auth .rv.d1 { animation-delay: .05s; } .civic-auth .rv.d2 { animation-delay: .11s; }
.civic-auth .rv.d3 { animation-delay: .18s; } .civic-auth .rv.d4 { animation-delay: .26s; }
.civic-auth .rv.d5 { animation-delay: .34s; } .civic-auth .rv.d6 { animation-delay: .42s; }

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1080px) { .civic-auth .ledger { padding: 36px 32px; } .civic-signin { padding: 28px 30px; } }
@media (max-width: 920px) {
  .civic-auth { grid-template-columns: 1fr; }
  .civic-auth .ledger { display: none; }
  .civic-signin {
    padding: 30px 24px;
    background:
      radial-gradient(680px 380px at 100% 0%, color-mix(in srgb, var(--w-cream) 70%, transparent), transparent 60%),
      radial-gradient(680px 360px at 0% 0%, color-mix(in srgb, var(--w-sky) 70%, transparent), transparent 62%),
      var(--paper);
  }
}
@media (max-width: 440px) {
  .civic-auth h1.su-h { font-size: 32px; }
  .civic-auth .sso-row { grid-template-columns: 1fr; }
  .civic-auth .ghost-link span { display: none; }
}

/* ── dark fallback (front door stays soft, just inverted) ───────────── */
[data-theme="dark"] .civic-auth {
  --ink: #ECEAF6; --ink-2: #A6A8C2; --ink-3: #74768f;
  --paper: #0E0F1C; --surface: #181A2C; --surface-2: #1F2236;
  --line: #26283D; --line-2: #323651;
  --blue: #8E9BFF; --blue-soft: #1B1E3A;
  --w-sky: #161a36; --w-lilac: #171530; --w-mint: #10261d; --w-cream: #241c10; --w-blush: #2a1714;
}
[data-theme="dark"] .civic-signin { background: radial-gradient(680px 360px at 0% 0%, color-mix(in srgb, var(--w-sky) 80%, transparent), transparent 62%), var(--paper); }
[data-theme="dark"] .civic-auth .ledger {
  background:
    radial-gradient(820px 440px at 92% -8%, var(--w-cream), transparent 56%),
    radial-gradient(680px 560px at 6% 6%, var(--w-sky), transparent 56%),
    radial-gradient(760px 680px at 70% 120%, var(--w-mint), transparent 58%),
    linear-gradient(152deg, var(--w-lilac) 0%, #0E0F1C 64%);
}
[data-theme="dark"] .civic-auth .led-card { background: rgba(24, 26, 44, .8); border-color: #2a2d45; }
[data-theme="dark"] .civic-auth .feat-ic, [data-theme="dark"] .civic-auth .preview-chip { background: #181A2C; border-color: #2a2d45; }
[data-theme="dark"] .civic-auth .end-pill.ind { background: #181A2C; }
[data-theme="dark"] .civic-auth .btn-signin { background: linear-gradient(180deg, #3a4488, #2a3263); }

/* ════════════════════════════════════════════════════════════════════
   Blocade — secondary auth screens (register / forgot / reset password).
   Single-column centered card, same soft-pastel front-door tokens as the
   sign-in split-screen above, so the whole auth flow reads as one family.
   ════════════════════════════════════════════════════════════════════ */
.civic-auth-simple {
  --ink: #262c4d; --ink-2: #5b6285; --ink-3: #9a9fbb;
  --paper: #FBFAF7; --surface: #ffffff; --surface-2: #F4F2FB;
  --line: #EAE8F4; --line-2: #DBD8EC;
  --blue: #3B4EE0; --blue-press: #2D3EC6; --blue-soft: #EDEEFD;
  --w-sky: #E9EEFC; --w-cream: #FBF2E0;
  --a-gold: #E0952A; --a-green: #12915B;
  --r: 13px; --r-lg: 18px; --r-xl: 26px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(20, 20, 27, 0.05), 0 1px 1px rgba(20, 20, 27, 0.04);

  min-height: calc(100vh - var(--header-h, 0px));
  display: flex; align-items: center; justify-content: center;
  padding: 48px 16px;
  color: var(--ink);
  background:
    radial-gradient(680px 360px at 0% 0%, color-mix(in srgb, var(--w-sky) 70%, transparent), transparent 62%),
    radial-gradient(680px 380px at 100% 100%, color-mix(in srgb, var(--w-cream) 60%, transparent), transparent 60%),
    var(--paper);
}
.civic-auth-simple .cas-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 60px -28px rgba(40, 40, 80, .28), 0 2px 8px rgba(40, 40, 80, .05);
  padding: 36px 34px 30px;
  animation: civic-rise2 .6s var(--ease) both;
}
.civic-auth-simple .cas-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 22px;
}
.civic-auth-simple .cas-brand img { width: 30px; height: 30px; }
.civic-auth-simple .cas-brand .wm {
  font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.03em; color: var(--a-gold);
}
.civic-auth-simple .cas-brand .wm b { color: var(--ink); font-weight: 600; }
.civic-auth-simple .cas-head { text-align: center; margin-bottom: 22px; }
.civic-auth-simple .cas-head h1 {
  font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -.02em; margin: 0 0 6px; color: var(--ink);
}
.civic-auth-simple .cas-head p { color: var(--ink-2); font-size: 14px; margin: 0; line-height: 1.5; }

.civic-auth-simple .alert { border-radius: var(--r); font-size: 13.5px; padding: 11px 14px; margin-bottom: 16px; }

.civic-auth-simple .fg { margin-bottom: 15px; }
.civic-auth-simple .lbl {
  font-size: 12.5px; font-weight: 650; color: var(--ink-2); display: block; margin-bottom: 6px;
}
.civic-auth-simple .field {
  width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--line-2); color: var(--ink); font: inherit; font-size: 14px;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.civic-auth-simple .field:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.civic-auth-simple .field::placeholder { color: var(--ink-3); }
.civic-auth-simple .hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.civic-auth-simple .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.civic-auth-simple .btn-signin {
  width: 100%; justify-content: center; height: 48px; font-size: 15px; font-weight: 650; border: none; border-radius: var(--r);
  color: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(180deg, #2f3868, #222a4f); box-shadow: 0 8px 20px -8px rgba(34, 42, 79, .6), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: all var(--speed) var(--ease); font-family: inherit; margin-top: 6px;
}
.civic-auth-simple .btn-signin:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(34, 42, 79, .66), inset 0 1px 0 rgba(255, 255, 255, .12); color: #fff; }
.civic-auth-simple .btn-signin:active { transform: translateY(.5px); }

.civic-auth-simple .cas-or {
  display: flex; align-items: center; gap: 13px; margin: 22px 0 16px; color: var(--ink-3); font-size: 11.5px; font-weight: 600; letter-spacing: .05em;
}
.civic-auth-simple .cas-or::before, .civic-auth-simple .cas-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.civic-auth-simple .cas-foot { text-align: center; color: var(--ink-2); font-size: 13.5px; margin: 0; }
.civic-auth-simple .cas-foot a { font-weight: 650; color: var(--blue); text-decoration: none; }
.civic-auth-simple .cas-foot a:hover { text-decoration: underline; }

@media (max-width: 440px) {
  .civic-auth-simple .cas-card { padding: 28px 22px 24px; }
  .civic-auth-simple .row-2 { grid-template-columns: 1fr; }
}

[data-theme="dark"] .civic-auth-simple {
  --ink: #ECEAF6; --ink-2: #A6A8C2; --ink-3: #74768f;
  --paper: #0E0F1C; --surface: #181A2C; --surface-2: #1F2236;
  --line: #26283D; --line-2: #323651;
  --blue: #8E9BFF; --blue-soft: #1B1E3A;
  --w-sky: #161a36; --w-cream: #241c10;
}
[data-theme="dark"] .civic-auth-simple .cas-card { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .civic-auth-simple .btn-signin { background: linear-gradient(180deg, #3a4488, #2a3263); }
