/* =====================================================================
   BRAG Finance — public hero (sign-in) page.
   Self-contained: no inline styles or scripts (CSP), system fonts only,
   light and dark themes, no blur effects, no text below 17px.
   ===================================================================== */

:root {
  --hp-bg: #edf2f8;
  --hp-bg-2: #e2eaf4;
  --hp-grid: rgba(11, 42, 82, 0.055);
  --hp-glow-blue: rgba(61, 127, 214, 0.13);
  --hp-glow-gold: rgba(226, 176, 74, 0.16);
  --hp-top-bg: #ffffff;
  --hp-rule: #c9962b;
  --hp-ink: #0b1b30;
  --hp-muted: #47586f;
  --hp-line: #d4dce8;
  --hp-panel: #ffffff;
  --hp-field: #ffffff;
  --hp-field-line: #c5d0df;
  --hp-focus-line: #0b2447;
  --hp-focus: 0 0 0 4px rgba(201, 150, 43, 0.28);
  --hp-link: #0b2a52;
  --hp-gold: #c9962b;
  --hp-gold-ink: #8a5d10;
  --hp-chip-bg: #f6ebcf;
  --hp-chip-line: #e2c27a;
  --hp-submit-bg: #0b2447;
  --hp-submit-hover: #12366a;
  --hp-submit-ink: #ffffff;
  --hp-seg-bg: #f1f4f9;
  --hp-seg-on: #ffffff;
  --hp-card-shadow: 0 34px 90px rgba(8, 23, 41, 0.20), 0 3px 8px rgba(8, 23, 41, 0.08);
  --hp-deco-blue: #3a7bd5;
  --hp-deco-blue-soft: #a9c8ef;
  --hp-deco-gold: #e0ac45;
  --hp-deco-ink: #5b7091;
  --hp-foot-bg: #081a33;
  --hp-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --hp-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --hp-math: "Cambria Math", Cambria, "Times New Roman", serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --hp-bg: #050c18;
  --hp-bg-2: #08142a;
  --hp-grid: rgba(150, 185, 230, 0.05);
  --hp-glow-blue: rgba(70, 130, 220, 0.14);
  --hp-glow-gold: rgba(226, 176, 74, 0.10);
  --hp-top-bg: #071226;
  --hp-ink: #e8eef7;
  --hp-muted: #a6b4c8;
  --hp-line: #1f2e47;
  --hp-panel: #0c182d;
  --hp-field: #091325;
  --hp-field-line: #2b3d5a;
  --hp-focus-line: #d6a740;
  --hp-link: #e6bb5c;
  --hp-gold-ink: #e6bb5c;
  --hp-chip-bg: rgba(201, 150, 43, 0.14);
  --hp-chip-line: rgba(226, 194, 122, 0.45);
  --hp-submit-bg: #c9962b;
  --hp-submit-hover: #ddab3d;
  --hp-submit-ink: #10141c;
  --hp-seg-bg: #0b1730;
  --hp-seg-on: #16264a;
  --hp-card-shadow: 0 34px 100px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(201, 150, 43, 0.18);
  --hp-deco-blue: #5d9cf0;
  --hp-deco-blue-soft: #2b5287;
  --hp-deco-gold: #e2b04a;
  --hp-deco-ink: #7d92b1;
  --hp-foot-bg: #030913;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

/* The hidden attribute must always win over component display rules. */
[hidden] { display: none !important; }

body.hp {
  --hp-card-w: 1120px;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--hp-bg);
  color: var(--hp-ink);
  font-family: var(--hp-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--hp-link); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: none; box-shadow: var(--hp-focus); }

.hp-skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--hp-submit-bg);
  color: var(--hp-submit-ink);
  font-weight: 800;
  text-decoration: none;
}
.hp-skip:focus { top: 12px; }

/* ---------------------------------------------------------------- top bar */
.hp-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 3vw, 40px);
  background: var(--hp-top-bg);
  border-bottom: 2px solid var(--hp-rule);
}

.hp-brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--hp-ink); }
.hp-wordmark { font-family: var(--hp-serif); font-size: 31px; font-weight: 700; letter-spacing: 0.06em; color: var(--hp-ink); }
.hp-brand-divider { width: 1px; height: 26px; background: var(--hp-line); }
.hp-brand-org { font-size: 18px; font-weight: 650; color: var(--hp-muted); white-space: nowrap; }

.hp-values { margin: 0; text-align: center; font-size: 18px; font-weight: 750; letter-spacing: 0.01em; color: var(--hp-ink); }

.hp-controls { display: flex; align-items: center; gap: 12px; }

.hp-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--hp-line); border-radius: 11px; background: var(--hp-seg-bg); }
.hp-seg button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--hp-muted);
  font: inherit;
  font-size: 17px;
  font-weight: 650;
  cursor: pointer;
}
.hp-seg button[aria-pressed="true"] { background: var(--hp-seg-on); border-color: var(--hp-line); color: var(--hp-ink); box-shadow: 0 1px 3px rgba(8, 23, 41, 0.12); }
.hp-seg button:hover { color: var(--hp-ink); }

.hp-mantra {
  display: grid;
  padding-left: 16px;
  border-left: 1px solid var(--hp-line);
  font-family: var(--hp-serif);
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
  line-height: 1.22;
  color: var(--hp-gold-ink);
  text-decoration: none;
}
.hp-mantra:hover { color: var(--hp-gold); }
.hp-mantra span { white-space: nowrap; }

/* ------------------------------------------------------------------ stage */
.hp-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vh, 48px) clamp(16px, 3vw, 40px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 60% at 12% 28%, var(--hp-glow-blue), transparent 70%),
    radial-gradient(ellipse 50% 55% at 88% 72%, var(--hp-glow-gold), transparent 70%),
    linear-gradient(180deg, var(--hp-bg), var(--hp-bg-2));
}
.hp-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, var(--hp-grid) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, var(--hp-grid) 0 1px, transparent 1px 44px);
  pointer-events: none;
}

/* ------------------------------------------------------------ decoration */
/* Each decoration fills its side gutter (plus a small tuck behind the card),
   so nothing is clipped by the card itself. */
.hp-deco { position: absolute; top: 3%; bottom: 3%; width: min(440px, calc((100% - var(--hp-card-w)) / 2 + 48px)); pointer-events: none; }
.hp-deco svg { width: 100%; height: 100%; display: block; }
.hp-deco-left { left: clamp(4px, 1vw, 24px); }
.hp-deco-right { right: clamp(4px, 1vw, 24px); display: grid; grid-template-rows: 1fr auto; }

.dk-stop-blue { stop-color: var(--hp-deco-blue); stop-opacity: 0.32; }
.dk-stop-clear { stop-color: var(--hp-deco-blue); stop-opacity: 0; }
.dk-stop-blue-strong { stop-color: var(--hp-deco-blue); stop-opacity: 0.85; }
.dk-stop-gold { stop-color: var(--hp-deco-gold); stop-opacity: 0.9; }

.dk-formula { font-family: var(--hp-math); font-size: 30px; fill: var(--hp-deco-ink); opacity: 0.85; }
.dk-formula-lg { font-size: 42px; }
.dk-label { font-family: var(--hp-sans); font-size: 19px; font-weight: 700; fill: var(--hp-deco-ink); }
.dk-label-gold { fill: var(--hp-deco-gold); }
.dk-caption { font-family: var(--hp-sans); font-size: 18px; font-weight: 600; letter-spacing: 0.08em; fill: var(--hp-deco-ink); opacity: 0.85; }
.dk-axis { stroke: var(--hp-deco-ink); stroke-width: 1.4; opacity: 0.5; }
.dk-diag { stroke: var(--hp-deco-ink); stroke-width: 1.2; stroke-dasharray: 5 6; opacity: 0.55; }
.dk-curve { fill: none; stroke: var(--hp-deco-blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dk-curve-strong { stroke-width: 3; }
.dk-tail { fill: var(--hp-deco-gold); opacity: 0.38; }
.dk-var { stroke: var(--hp-deco-gold); stroke-width: 2; stroke-dasharray: 6 5; }
.dk-threshold { stroke: var(--hp-deco-gold); stroke-width: 1.8; stroke-dasharray: 7 6; }
.dk-threshold-soft { opacity: 0.5; }
.dk-dot { fill: var(--hp-deco-blue); }
.dk-dot-gold { fill: var(--hp-deco-gold); }
.dk-ring { fill: none; stroke: var(--hp-deco-gold); stroke-width: 1.6; opacity: 0.6; }
.dk-orbits ellipse { fill: none; stroke-width: 1.6; opacity: 0.75; }
.dk-words text { font-family: var(--hp-sans); font-size: 21px; font-weight: 700; letter-spacing: 0.3em; fill: var(--hp-deco-ink); opacity: 0.8; }
.dk-bars rect { fill: var(--hp-deco-blue-soft); }
.dk-bars .dk-bar-gold { fill: var(--hp-deco-gold); opacity: 0.75; }
.dk-network line { stroke: var(--hp-deco-blue); stroke-width: 1.4; opacity: 0.55; }

.hp-deco-motto {
  margin: 0;
  padding-left: 80px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.7;
  color: var(--hp-deco-ink);
}

/* ------------------------------------------------------------------- card */
.hp-card {
  position: relative;
  z-index: 1;
  width: min(var(--hp-card-w), 100%);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  border-radius: 22px;
  overflow: hidden;
  background: var(--hp-panel);
  box-shadow: var(--hp-card-shadow);
  animation: hp-rise 0.5s ease-out both;
}

@keyframes hp-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* story panel */
.hp-story {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 42px 44px 36px;
  color: #ffffff;
  background:
    radial-gradient(circle at 92% 42%, rgba(255, 255, 255, 0.055) 0 30%, transparent 30.3%),
    radial-gradient(circle at 92% 42%, rgba(255, 255, 255, 0.035) 0 44%, transparent 44.3%),
    linear-gradient(160deg, #0e2f5c 0%, #081d3b 58%, #06152c 100%);
}

.hp-logo { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.hp-logo-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 3px solid #c9962b;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f2cf74, #c9962b 70%);
  color: #0b1b30;
  font-family: var(--hp-serif);
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 0 0 4px rgba(201, 150, 43, 0.18);
}
.hp-logo-glyph { font-family: var(--hp-serif); font-size: 54px; font-style: italic; font-weight: 700; line-height: 1; color: #e2b04a; }

.hp-story-title { display: grid; margin: 0; font-family: var(--hp-serif); font-size: clamp(42px, 4.3vw, 58px); font-weight: 700; line-height: 1.02; letter-spacing: -0.01em; }
.hp-story-sub { margin: 10px 0 26px; font-size: 19px; color: #c8d5ea; }

.hp-features { display: grid; gap: 15px; margin: 0; padding: 0; list-style: none; }
.hp-features li { display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 600; color: #e9eff8; }
.hp-features svg { width: 22px; height: 22px; flex: none; fill: none; stroke: #e2c27a; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hp-story-foot { margin-top: auto; padding-top: 30px; }
.hp-story-mantra { display: grid; margin: 0; font-size: 25px; font-weight: 800; line-height: 1.24; color: #e8b54c; }
.hp-story-rule { margin: 18px 0 14px; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.hp-story-values { margin: 0 0 8px; font-size: 18px; font-weight: 750; color: #ffffff; }
.hp-story-org { margin: 0; font-size: 17px; color: #b9c8de; }

/* access panel */
.hp-access { display: flex; flex-direction: column; padding: 40px 46px 32px; background: var(--hp-panel); color: var(--hp-ink); }

.hp-chip {
  align-self: flex-start;
  padding: 5px 16px;
  border: 1px solid var(--hp-chip-line);
  border-radius: 999px;
  background: var(--hp-chip-bg);
  color: var(--hp-gold-ink);
  font-size: 17px;
  font-weight: 800;
}
.hp-title { margin: 18px 0 8px; font-size: clamp(30px, 2.7vw, 38px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.hp-lead { margin: 0 0 22px; font-size: 18px; line-height: 1.55; color: var(--hp-muted); }


.hp-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--hp-field-line);
  border-radius: 10px;
  background: var(--hp-field);
  color: var(--hp-ink);
  font: inherit;
  font-size: 17px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.hp-outline:hover { border-color: var(--hp-gold); }


.hp-form { display: grid; gap: 16px; }
.hp-field { display: grid; gap: 7px; }
.hp-field label { font-size: 17px; font-weight: 800; }
.hp-field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hp-field-row a { font-size: 17px; font-weight: 750; text-decoration: none; color: var(--hp-link); }
.hp-field-row a:hover { text-decoration: underline; }

.hp-field input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--hp-field-line);
  border-radius: 10px;
  background: var(--hp-field);
  color: var(--hp-ink);
  font: inherit;
  font-size: 17px;
}
.hp-field input::placeholder { color: var(--hp-muted); opacity: 0.75; }
.hp-field input:focus { outline: none; border: 2px solid var(--hp-focus-line); padding: 0 15px; box-shadow: var(--hp-focus); }

.hp-password { position: relative; }
.hp-password input { padding-right: 56px; }
.hp-password input:focus { padding-right: 55px; }
.hp-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--hp-muted);
  cursor: pointer;
}
.hp-eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hp-eye[aria-pressed="true"] { color: var(--hp-gold); }

.hp-check { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--hp-muted); cursor: pointer; }
.hp-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--hp-gold); }

.hp-submit {
  min-height: 56px;
  border: 0;
  border-radius: 10px;
  background: var(--hp-submit-bg);
  color: var(--hp-submit-ink);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}
.hp-submit:hover { background: var(--hp-submit-hover); }
.hp-submit:disabled { opacity: 0.7; cursor: progress; }
.hp-submit-link { display: grid; place-items: center; padding: 0 22px; text-decoration: none; }

.hp-status { min-height: 26px; margin: 0; font-size: 17px; color: var(--hp-muted); }
.hp-status[data-tone="error"] { color: #b42318; }
.hp-status[data-tone="warning"] { color: #9a6200; }
.hp-status[data-tone="success"] { color: #157347; }
:root[data-theme="dark"] .hp-status[data-tone="error"] { color: #ff8a80; }
:root[data-theme="dark"] .hp-status[data-tone="warning"] { color: #f2c66d; }
:root[data-theme="dark"] .hp-status[data-tone="success"] { color: #6fd39b; }

.hp-session { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--hp-line); border-radius: 12px; }
.hp-session-who { margin: 0; font-size: 18px; }
.hp-session-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hp-account { margin: 20px 0 8px; text-align: center; font-size: 17px; color: var(--hp-muted); }
.hp-account a { font-weight: 800; text-decoration: none; color: var(--hp-link); }
.hp-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin: 0 0 14px; font-size: 17px; color: var(--hp-muted); }
.hp-links a { font-weight: 800; text-decoration: none; color: var(--hp-link); }
.hp-account a:hover, .hp-links a:hover { text-decoration: underline; }
.hp-trust { margin: auto 0 0; text-align: center; font-size: 17px; line-height: 1.5; color: var(--hp-muted); }
.hp-trust[data-tone="warning"] { color: #9a6200; }
:root[data-theme="dark"] .hp-trust[data-tone="warning"] { color: #f2c66d; }

/* ------------------------------------------------------------------ footer */
.hp-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 14px clamp(18px, 3vw, 36px);
  background: var(--hp-foot-bg);
  border-top: 2px solid rgba(201, 150, 43, 0.55);
  color: #dfe7f2;
}
.hp-foot-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 17px; }
.hp-foot-brand strong { font-weight: 800; color: #ffffff; }
.hp-foot-brand em { font-family: var(--hp-serif); font-weight: 600; color: #e2b04a; }
.hp-foot-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid #c9962b;
  border-radius: 50%;
  font-family: var(--hp-serif);
  font-size: 17px;
  font-weight: 700;
  color: #e2b04a;
}
.hp-foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.hp-foot-links a { font-size: 17px; font-weight: 750; text-decoration: none; color: #ffffff; }
.hp-foot-links a:hover { color: #e2b04a; }
.hp-foot-legal { margin: 0; font-size: 17px; color: #b8c5d8; }
.hp-foot-version { margin-left: 10px; font-weight: 800; color: #e2b04a; }

/* ------------------------------------------------------- figure motion */
/* Every figure is alive: curves draw themselves, risk tails breathe, the
   breach ring pulses, bars and evidence words cycle. CSS only (CSP-safe). */
.dk-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dk-draw 9s ease-in-out infinite; }
.dk-delay-2 { animation-delay: 1.2s; }
@keyframes dk-draw {
  0% { stroke-dashoffset: 1; opacity: 1; }
  32% { stroke-dashoffset: 0; opacity: 1; }
  88% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

.dk-tail-wrap { animation: dk-breathe 4.5s ease-in-out infinite; }
@keyframes dk-breathe { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

.dk-var, .dk-threshold { animation: dk-flow 1.6s linear infinite; }
.dk-network line { stroke-dasharray: 5 7; animation: dk-flow 2.2s linear infinite; }
@keyframes dk-flow { to { stroke-dashoffset: -22; } }

.dk-dot { transform-box: fill-box; transform-origin: center; animation: dk-pulse 3.2s ease-in-out infinite; }
.dk-panel .dk-dot:nth-of-type(2), .dk-network .dk-dot:nth-of-type(2), .dk-orbits > .dk-dot:nth-of-type(2) { animation-delay: 0.6s; }
.dk-panel .dk-dot:nth-of-type(3), .dk-network .dk-dot:nth-of-type(3), .dk-orbits > .dk-dot:nth-of-type(3) { animation-delay: 1.2s; }
.dk-panel .dk-dot:nth-of-type(4), .dk-network .dk-dot:nth-of-type(4) { animation-delay: 1.8s; }
.dk-network .dk-dot:nth-of-type(5) { animation-delay: 2.4s; }
@keyframes dk-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.45); } }

.dk-ring-pulse { transform-box: fill-box; transform-origin: center; animation: dk-ring 2.4s ease-out infinite; }
@keyframes dk-ring { 0% { transform: scale(1); opacity: 0.85; } 100% { transform: scale(2.6); opacity: 0; } }

.dk-spin { transform-box: view-box; transform-origin: 300px 560px; animation: dk-spin 36s linear infinite; }
@keyframes dk-spin { to { transform: rotate(360deg); } }

.dk-bars rect { transform-box: fill-box; transform-origin: 50% 100%; animation: dk-bar 3.6s ease-in-out infinite; }
.dk-bars rect:nth-child(2) { animation-delay: 0.3s; }
.dk-bars rect:nth-child(3) { animation-delay: 0.6s; }
.dk-bars rect:nth-child(4) { animation-delay: 0.9s; }
.dk-bars rect:nth-child(5) { animation-delay: 1.2s; }
@keyframes dk-bar { 0%, 100% { transform: scaleY(0.72); } 50% { transform: scaleY(1); } }

/* MODEL → EVIDENCE → CHALLENGE → DECISION → MONITOR, lit in sequence */
.dk-words text { animation: dk-word 7.5s ease-in-out infinite; }
.dk-words text:nth-child(2) { animation-delay: 1.5s; }
.dk-words text:nth-child(3) { animation-delay: 3s; }
.dk-words text:nth-child(4) { animation-delay: 4.5s; }
.dk-words text:nth-child(5) { animation-delay: 6s; }
@keyframes dk-word {
  0%, 26%, 100% { fill: var(--hp-deco-ink); opacity: 0.55; }
  8%, 18% { fill: var(--hp-deco-gold); opacity: 1; }
}

.dk-formula { animation: dk-float 6s ease-in-out infinite; }
@keyframes dk-float { 0%, 100% { opacity: 0.6; } 50% { opacity: 0.95; } }

/* -------------------------------------------------------------- responsive */
/* Medium desktops keep the figures by narrowing the card slightly. */
@media (max-width: 1559px) {
  body.hp { --hp-card-w: 1000px; }
  .hp-deco { width: calc((100% - var(--hp-card-w)) / 2 - 14px); }
  .hp-deco-motto { padding-left: 12px; letter-spacing: 0.08em; }
}
/* Below this the gutters are too narrow for readable figures. */
@media (max-width: 1279px) {
  .hp-deco { display: none; }
  body.hp { --hp-card-w: 1120px; }
}

@media (max-width: 1180px) {
  .hp-values { font-size: 17px; }
}

/* The mantra also appears in the card and footer, so the top-bar copy can
   yield space on mid-size screens. */
@media (max-width: 1100px) {
  .hp-mantra { display: none; }
}

/* ------------------------------------------------------ one-screen layout */
/* On desktop the whole experience fits one viewport: header, card, footer.
   Very short windows (< 600px) fall back to natural scrolling so nothing
   is ever unreachable. */
@media (min-width: 981px) and (min-height: 600px) {
  body.hp { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .hp-stage { min-height: 0; padding-top: clamp(10px, 2.6vh, 44px); padding-bottom: clamp(10px, 2.6vh, 44px); }
  .hp-card { max-height: 100%; grid-template-rows: minmax(0, 1fr); }
  /* Safety net: if a panel ever exceeds the screen it scrolls inside the card. */
  .hp-story, .hp-access { min-height: 0; overflow-y: auto; }
  .hp-foot-brand em { white-space: nowrap; }
}

@media (min-width: 981px) and (max-height: 1040px) {
  .hp-top { padding-top: 10px; padding-bottom: 10px; }
  .hp-story { padding: 30px 38px 26px; }
  .hp-logo { margin-bottom: 14px; }
  .hp-logo-glyph { font-size: 44px; }
  .hp-story-title { font-size: clamp(38px, 3.6vw, 48px); }
  .hp-story-sub { margin: 6px 0 18px; }
  .hp-features { gap: 10px; }
  .hp-story-foot { padding-top: 18px; }
  .hp-story-mantra { font-size: 22px; }
  .hp-story-rule { margin: 12px 0 10px; }
  .hp-access { padding: 28px 40px 22px; }
  .hp-title { margin: 12px 0 6px; font-size: clamp(28px, 2.4vw, 34px); }
  .hp-lead { margin-bottom: 16px; line-height: 1.45; }
  .hp-form { gap: 12px; }
  .hp-field { gap: 5px; }
  .hp-field input { min-height: 48px; }
  .hp-submit { min-height: 50px; }
  .hp-status { min-height: 0; }
  .hp-account { margin: 12px 0 6px; }
  .hp-links { margin-bottom: 8px; }
  .hp-trust { line-height: 1.4; }
  .hp-foot { padding-top: 10px; padding-bottom: 10px; }
}

@media (min-width: 981px) and (max-height: 860px) {
  .hp-top { padding-top: 6px; padding-bottom: 6px; }
  .hp-wordmark { font-size: 27px; }
  .hp-seg button { min-height: 36px; }
  .hp-story { padding: 22px 34px 20px; }
  .hp-logo { display: none; }
  .hp-story-title { display: flex; gap: 12px; font-size: 38px; }
  .hp-story-sub { margin: 4px 0 14px; }
  .hp-features { gap: 7px; }
  .hp-features li { font-size: 17px; }
  .hp-story-foot { padding-top: 12px; }
  .hp-story-mantra { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 20px; }
  .hp-story-rule, .hp-story-org { display: none; }
  .hp-story-values { margin: 8px 0 0; font-size: 17px; }
  .hp-access { padding: 20px 36px 16px; }
  .hp-chip { display: none; }
  .hp-title { margin-top: 0; }
  .hp-lead { margin-bottom: 12px; }
  .hp-form { gap: 10px; }
  .hp-field input { min-height: 44px; }
  .hp-submit { min-height: 46px; }
  .hp-account { margin: 8px 0 4px; }
  .hp-links { margin-bottom: 4px; }
  .hp-foot { padding-top: 6px; padding-bottom: 6px; gap: 6px 18px; flex-wrap: nowrap; }
  .hp-foot-brand em { display: none; }
  .hp-stage { padding-top: 8px; padding-bottom: 8px; }
  .hp-lead { line-height: 1.4; }
  .hp-trust { line-height: 1.35; }
}

@media (min-width: 981px) and (max-height: 700px) {
  .hp-lead { display: none; }
  .hp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
  .hp-story-values { display: none; }
}

@media (max-width: 980px) {
  .hp-top { grid-template-columns: 1fr auto; }
  .hp-values { display: none; }
  .hp-card { grid-template-columns: 1fr; min-height: 0; }
  .hp-access { order: -1; }
  .hp-story { padding: 34px 30px 30px; }
  .hp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .hp-top { grid-template-columns: 1fr; justify-items: start; gap: 12px; }
  .hp-controls { flex-wrap: wrap; }
  .hp-mantra { display: none; }
  .hp-brand-org { display: none; }
  .hp-access { padding: 28px 22px 24px; }
  .hp-features { grid-template-columns: 1fr; }
  .hp-foot { justify-content: center; text-align: center; }
  .hp-foot-brand, .hp-foot-links { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hp-card, .dk-draw, .dk-tail-wrap, .dk-var, .dk-threshold, .dk-network line,
  .dk-dot, .dk-ring-pulse, .dk-spin, .dk-bars rect, .dk-words text, .dk-formula { animation: none; }
  .dk-draw { stroke-dashoffset: 0; }
  .dk-ring-pulse { display: none; }
}

/* Google sign-in */
.hp-alt { display: grid; gap: 10px; margin-top: 12px; }
.hp-alt[hidden] { display: none; }
.hp-or { display: flex; align-items: center; gap: 10px; color: var(--hp-muted, #8a99ad); font-size: 17px; }
.hp-or::before, .hp-or::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .35; }
.hp-google { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; border: 1px solid rgba(138, 153, 173, .55); border-radius: 12px; color: inherit; font-weight: 750; font-size: 17px; text-decoration: none; }
.hp-google:hover, .hp-google:focus-visible { border-color: #c9962b; }
.hp-field[hidden] { display: none !important; }
