/* ===================================================================
   PROFILE ADVOCATE — SHARED DESIGN SYSTEM
   Single source of truth for tokens, motion, and shared components.
   Link this on every page:  <link rel="stylesheet" href="profilepro.css">
   Fonts (load in <head> of each page):
     Cormorant Garamond (display) · Inter (body) · JetBrains Mono (data)
   =================================================================== */

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

:root {
  --navy:    #0B1629;
  --navy-2:  #141F36;
  --navy-3:  #253550;
  --gold:    #C9A84C;
  --gold-lt: #E2C97E;
  --purple:  #7C5CFC;
  --purple-lt:#A78BFA;
  --violet:  #9D4EDD;
  --magenta: #C849D6;
  --silver:  #9EA8B8;
  --white:   #F8F9FB;
  --white-2: #EEF1F5;
  --text:    #D4DBE8;
  --text-dim:#8593AB;

  /* status semantics */
  --ok:      #4ade80;
  --ok-bg:   rgba(34,197,94,0.10);
  --ok-bd:   rgba(34,197,94,0.25);
  --warn:    #E2C97E;
  --warn-bg: rgba(201,168,76,0.10);
  --warn-bd: rgba(201,168,76,0.30);
  --info:    #A78BFA;
  --info-bg: rgba(124,92,252,0.12);
  --info-bd: rgba(124,92,252,0.30);
  --done:    #C849D6;
  --done-bg: rgba(200,73,214,0.12);
  --done-bd: rgba(200,73,214,0.30);
  --danger:  #F87171;
}

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Animated aurora background — drifts slowly behind everything */
body::before {
  content: '';
  position: fixed; inset: -30%;
  z-index: -2;
  background:
    radial-gradient(40% 50% at 20% 25%, rgba(124,92,252,0.18), transparent 60%),
    radial-gradient(35% 45% at 80% 15%, rgba(200,73,214,0.12), transparent 60%),
    radial-gradient(45% 50% at 70% 80%, rgba(201,168,76,0.10), transparent 60%),
    radial-gradient(40% 45% at 15% 85%, rgba(157,78,221,0.14), transparent 60%);
  filter: blur(40px);
  animation: aurora 22s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate(0,0) scale(1) rotate(0deg); }
  33%  { transform: translate(4%, -3%) scale(1.08) rotate(4deg); }
  66%  { transform: translate(-3%, 4%) scale(1.04) rotate(-3deg); }
  100% { transform: translate(2%, 2%) scale(1.1) rotate(2deg); }
}
/* subtle vignette layer so gradients read as premium not flat */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(120% 120% at 50% 0%, transparent 50%, rgba(11,22,41,0.6) 100%);
  pointer-events: none;
}

@keyframes shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* gradient-text helper (animated purple→magenta→gold) */
.grad-text {
  background: linear-gradient(110deg, var(--purple-lt), var(--magenta), var(--gold-lt), var(--purple-lt));
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 7s linear infinite;
}

/* ─────────────────────────────────────────────────────────────
   ACCESSIBILITY — visible keyboard focus on every interactive el
   ───────────────────────────────────────────────────────────── */
a, button, input, select, textarea, [tabindex], summary, label.opt-card {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--purple-lt);
  outline-offset: 3px;
  border-radius: 6px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--purple-lt);
  outline-offset: 1px;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 200;
  background: var(--purple); color: #fff; padding: 10px 18px;
  border-radius: 8px; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── NAV (marketing / public) ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 60px;
  background: rgba(11,22,41,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.12);
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 500; letter-spacing: 0.08em;
  color: var(--white); text-decoration: none;
}
.nav-logo span {
  background: linear-gradient(90deg, var(--purple-lt), var(--gold), var(--magenta), var(--purple-lt));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}
.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-links a {
  color: var(--silver); font-size: 13px; font-weight: 400;
  text-decoration: none; letter-spacing: 0.05em; transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.btn-login {
  background: transparent;
  color: var(--white); padding: 9px 22px; border-radius: 6px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em;
  cursor: pointer; text-decoration: none; transition: all 0.25s;
  position: relative; border: 1px solid transparent;
  background-image: linear-gradient(var(--navy), var(--navy)),
    linear-gradient(120deg, var(--purple), var(--gold), var(--magenta));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.btn-login:hover { box-shadow: 0 0 18px rgba(124,92,252,0.35); transform: translateY(-1px); }

/* mobile marketing nav: collapse links into a tap-to-open menu (nav stays one row) */
.nav-toggle { display: none; }
@media (max-width: 820px) {
  nav { padding: 14px 20px; }
  .nav-toggle { display: block; background: none; border: none; color: var(--white); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 6px; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11,22,41,0.98); backdrop-filter: blur(14px);
    border-top: 1px solid rgba(158,168,184,0.12);
    padding: 4px 20px 14px; display: none;
  }
  nav.open .nav-links { display: flex; }
  .nav-links a { padding: 13px 2px; border-bottom: 1px solid rgba(158,168,184,0.08); font-size: 15px; }
  .nav-links a:last-child { border-bottom: none; }
  .btn-login { text-align: center; margin-top: 10px; padding: 12px 22px; }
}

/* ── BUTTONS ── */
.btn-primary {
  background: linear-gradient(110deg, var(--purple), var(--violet), var(--magenta), var(--purple));
  background-size: 250% 100%;
  color: #fff; border: none;
  padding: 14px 32px; border-radius: 8px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.05em;
  font-family: 'Inter', sans-serif;
  cursor: pointer; text-decoration: none; transition: all 0.25s;
  display: inline-block;
  animation: shimmer 6s linear infinite;
  box-shadow: 0 8px 24px rgba(124,92,252,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(124,92,252,0.45); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; animation: none; filter: grayscale(0.3); }
.btn-primary-lg {
  background: linear-gradient(110deg, var(--purple), var(--violet), var(--magenta), var(--gold), var(--purple));
  background-size: 300% 100%;
  color: #fff; border: none;
  padding: 16px 40px; border-radius: 8px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.05em;
  font-family: 'Inter', sans-serif;
  text-decoration: none; transition: all 0.25s; display: inline-block; cursor: pointer;
  animation: shimmer 8s linear infinite;
  box-shadow: 0 10px 30px rgba(124,92,252,0.35);
}
.btn-primary-lg:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(124,92,252,0.5); }
.btn-secondary {
  color: var(--silver); font-size: 14px; background: none; border: none; cursor: pointer;
  text-decoration: none; letter-spacing: 0.04em; font-family: 'Inter', sans-serif;
  border-bottom: 1px solid rgba(158,168,184,0.3);
  padding-bottom: 2px; transition: all 0.2s;
}
.btn-secondary:hover { color: var(--white); border-color: var(--white); }
/* outline/ghost button — for portal secondary actions */
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); font-size: 13px; font-weight: 500; letter-spacing: 0.03em;
  padding: 11px 22px; border-radius: 8px; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; transition: all 0.25s;
  background-image: linear-gradient(rgba(11,22,41,0.6), rgba(11,22,41,0.6)),
    linear-gradient(120deg, rgba(124,92,252,0.5), rgba(200,73,214,0.4), rgba(201,168,76,0.4));
  background-origin: border-box; background-clip: padding-box, border-box;
  font-family: 'Inter', sans-serif;
}
.btn-ghost:hover { box-shadow: 0 0 18px rgba(124,92,252,0.25); transform: translateY(-1px); color: #fff; }

/* ── SECTION SHARED ── */
section { padding: 100px 60px; }
.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--purple-lt), var(--gold-lt));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px; display: inline-block;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 300; line-height: 1.18;
  color: var(--white); margin-bottom: 16px;
}
.section-title em {
  font-style: italic;
  background: linear-gradient(110deg, var(--purple-lt), var(--magenta), var(--gold-lt), var(--purple-lt));
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 7s linear infinite;
}
.section-body { font-size: 15px; color: var(--text-dim); max-width: 520px; line-height: 1.8; }

/* ── PANEL (generic translucent card container) ── */
.panel {
  background: linear-gradient(160deg, rgba(20,31,54,0.8), rgba(11,22,41,0.6));
  border: 1px solid rgba(124,92,252,0.12);
  border-radius: 16px;
  padding: 28px;
  position: relative; overflow: hidden;
  backdrop-filter: blur(8px);
}
.panel-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.panel-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 500; color: var(--white);
}
.panel-title small {
  display: block; font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 400; margin-bottom: 6px;
}
/* streaming top edge — reuse the portal-card signature */
.panel-glow::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple-lt), var(--magenta), var(--gold), transparent);
  background-size: 200% 100%;
  animation: shimmer 5s linear infinite;
}

/* ── STATUS BADGES (Active / Waiting / Under Review / Complete) ── */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.06em;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;   /* pills keep one consistent shape — never wrap to two lines */
  background: var(--ok-bg); border: 1px solid var(--ok-bd); color: var(--ok);
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
.status-badge.active  { background: var(--ok-bg);   border-color: var(--ok-bd);   color: var(--ok); }
.status-badge.waiting { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn); }
.status-badge.review  { background: var(--info-bg); border-color: var(--info-bd); color: var(--info); }
.status-badge.complete{ background: var(--done-bg); border-color: var(--done-bd); color: #E9A7F0; }

/* ── PORTAL CARD SYSTEM (hero seed; reused on dashboard) ── */
.portal-card {
  background: linear-gradient(160deg, rgba(20,31,54,0.95), rgba(11,22,41,0.9));
  border: 1px solid rgba(124,92,252,0.2);
  border-radius: 16px; padding: 32px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 60px rgba(124,92,252,0.12);
  position: relative; overflow: hidden; backdrop-filter: blur(8px);
}
.portal-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple-lt), var(--magenta), var(--gold), transparent);
  background-size: 200% 100%; animation: shimmer 5s linear infinite;
}
.portal-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; }
.portal-card-name { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 500; color: var(--white); }
.portal-card-name small {
  display: block; font-family: 'Inter', sans-serif; font-size: 11px; color: var(--text-dim);
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 400; margin-bottom: 3px;
}

/* Arc progress */
.arc-wrapper { display: flex; justify-content: center; margin-bottom: 28px; position: relative; }
.arc-svg { width: 180px; height: 100px; overflow: visible; }
.arc-track { fill: none; stroke: rgba(158,168,184,0.12); stroke-width: 8; stroke-linecap: round; }
.arc-fill {
  fill: none; stroke: url(#arcGrad); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 283; stroke-dashoffset: 283;
  transition: stroke-dashoffset 2s cubic-bezier(0.4,0,0.2,1);
}
.arc-label { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); text-align: center; }
.arc-score {
  font-family: 'JetBrains Mono', monospace; font-size: 28px; font-weight: 500;
  background: linear-gradient(120deg, var(--purple-lt), var(--gold-lt));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  display: block; line-height: 1;
}
.arc-cap { font-size: 10px; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }

.portal-stages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.stage-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.stage-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.stage-dot.done { background: linear-gradient(135deg, var(--purple-lt), var(--gold)); }
.stage-dot.active { background: var(--magenta); box-shadow: 0 0 10px var(--magenta); }
.stage-dot.pending { background: var(--navy-3); border: 1px solid var(--navy-3); }
.stage-label { color: var(--text-dim); }
.stage-label.done { color: var(--white); }
.stage-label.active { color: #e0b3ff; font-weight: 500; }

.portal-progress-bar { height: 3px; background: rgba(158,168,184,0.1); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.portal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--magenta), var(--gold-lt), var(--purple));
  background-size: 200% 100%;
  width: 0%; transition: width 1.8s cubic-bezier(0.4,0,0.2,1);
  animation: shimmer 4s linear infinite;
}
.portal-progress-label {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-dim); margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
}

.floating-badge {
  position: absolute;
  z-index: 3;   /* sit in front of the .portal-card, not behind it */
  background: linear-gradient(135deg, rgba(20,31,54,0.95), rgba(11,22,41,0.9));
  border: 1px solid rgba(124,92,252,0.3);
  border-radius: 10px; padding: 10px 14px;
  font-size: 12px; color: var(--white);
  box-shadow: 0 8px 24px rgba(124,92,252,0.25);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 8px;
}
.badge-icon { font-size: 16px; }

/* ─────────────────────────────────────────────────────────────
   FORM CONTROLS (shared — intake + any future forms)
   ───────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.field > label, .field-label {
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--text);
}
.field .hint { font-size: 11px; color: var(--text-dim); line-height: 1.5; }
.field .req { color: var(--magenta); margin-left: 2px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }

input[type=text], input[type=email], input[type=tel], input[type=date],
input[type=number], input[type=password], select, textarea {
  width: 100%;
  background: rgba(11,22,41,0.55);
  border: 1px solid rgba(158,168,184,0.18);
  border-radius: 9px;
  color: var(--white);
  font-family: 'Inter', sans-serif; font-size: 14px;
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--text-dim); opacity: 0.7; }
input:hover, select:hover, textarea:hover { border-color: rgba(124,92,252,0.4); }
input:focus, select:focus, textarea:focus {
  border-color: var(--purple); background: rgba(11,22,41,0.8);
  box-shadow: 0 0 0 3px rgba(124,92,252,0.18);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238593AB' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(248,113,113,0.15); }
.field-error { font-size: 11px; color: var(--danger); display: none; }
.field.show-error .field-error { display: block; }

/* selectable option cards (checkbox / radio) */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 12px; }
.opt-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px; border-radius: 12px; cursor: pointer;
  background: rgba(11,22,41,0.5);
  border: 1px solid transparent;
  background-image: linear-gradient(rgba(11,22,41,0.55), rgba(11,22,41,0.55)),
    linear-gradient(120deg, rgba(124,92,252,0.18), rgba(200,73,214,0.12), rgba(201,168,76,0.12));
  background-origin: border-box; background-clip: padding-box, border-box;
  transition: all 0.2s; position: relative;
}
.opt-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(124,92,252,0.16); }
.opt-card input { position: absolute; opacity: 0; pointer-events: none; }
.opt-card .opt-mark {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid rgba(158,168,184,0.4);
  display: grid; place-items: center; margin-top: 1px; transition: all 0.2s;
  font-size: 12px; color: transparent;   /* hide the ✓ until the option is selected */
}
.opt-card input[type=radio] + .opt-mark { border-radius: 50%; }
.opt-card .opt-body { display: flex; flex-direction: column; gap: 3px; }
.opt-card .opt-name { font-size: 14px; font-weight: 500; color: var(--white); }
.opt-card .opt-desc { font-size: 12px; color: var(--text-dim); line-height: 1.45; }
.opt-card input:checked ~ .opt-mark {
  background: linear-gradient(135deg, var(--purple), var(--magenta));
  border-color: transparent; box-shadow: 0 0 12px rgba(124,92,252,0.5); color: #fff;   /* reveal ✓ only when checked */
}
.opt-card:has(input:checked) {
  background-image: linear-gradient(rgba(124,92,252,0.10), rgba(124,92,252,0.06)),
    linear-gradient(120deg, var(--purple), var(--magenta), var(--gold));
  box-shadow: 0 8px 22px rgba(124,92,252,0.18);
}

/* ── UPLOAD DROPZONE (document center + intake) ── */
.dropzone {
  border: 1.5px dashed rgba(124,92,252,0.4);
  border-radius: 12px; padding: 22px;
  background: rgba(11,22,41,0.4);
  display: flex; align-items: center; gap: 16px;
  transition: all 0.2s; cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: var(--magenta); background: rgba(124,92,252,0.08); }
.dropzone .dz-icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 11px;
  background: linear-gradient(135deg, var(--purple), var(--magenta));
  display: grid; place-items: center; font-size: 18px;
  box-shadow: 0 8px 20px rgba(124,92,252,0.3);
}
.dropzone .dz-text { font-size: 13px; color: var(--text); }
.dropzone .dz-text strong { color: var(--white); font-weight: 500; }
.dropzone .dz-text span { color: var(--text-dim); font-size: 12px; }

.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 9px; margin-top: 8px;
  background: rgba(11,22,41,0.5); border: 1px solid rgba(158,168,184,0.12);
  font-size: 13px;
}
.file-row .fr-name { color: var(--white); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fr-meta { color: var(--text-dim); font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.file-row .fr-x { color: var(--text-dim); cursor: pointer; background: none; border: none; font-size: 15px; line-height: 1; }
.file-row .fr-x:hover { color: var(--danger); }

/* ── PILL / TAG ── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 20px;
  border: 1px solid rgba(158,168,184,0.2); color: var(--text-dim);
}
.pill.req  { color: #E9A7F0; border-color: var(--done-bd); background: var(--done-bg); }
.pill.cond { color: var(--warn); border-color: var(--warn-bd); background: var(--warn-bg); }
.pill.opt  { color: var(--silver); }
.pill.ok   { color: var(--ok); border-color: var(--ok-bd); background: var(--ok-bg); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid rgba(158,168,184,0.08);
  padding: 48px 60px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 24px;
}
.footer-brand { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 400; color: var(--white); }
.footer-brand span {
  background: linear-gradient(90deg, var(--purple-lt), var(--gold-lt));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.footer-contact { font-size: 13px; color: var(--text-dim); display: flex; gap: 32px; }
.footer-contact a { color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.footer-contact a:hover { color: var(--gold); }
.footer-legal {
  font-size: 11px; color: var(--text-dim); letter-spacing: 0.05em; width: 100%;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 16px; padding-top: 20px; border-top: 1px solid rgba(158,168,184,0.06);
}
.footer-legal a { color: var(--text-dim); text-decoration: none; }
.footer-legal a:hover { color: var(--silver); }

/* ─────────────────────────────────────────────────────────────
   PORTAL APP SHELL (logged-in pages: dashboard, documents)
   ───────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.app-scrim { display: none; }   /* mobile menu backdrop only — must not occupy a grid column on desktop */
.app-sidebar {
  border-right: 1px solid rgba(158,168,184,0.08);
  background: rgba(11,22,41,0.55); backdrop-filter: blur(12px);
  padding: 24px 18px; display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 0; height: 100vh;
}
.app-sidebar .nav-logo { padding: 6px 10px 22px; font-size: 21px; }
.app-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  color: var(--silver); text-decoration: none; font-size: 14px;
  transition: all 0.2s; position: relative;
}
.app-nav-link .ico { width: 18px; text-align: center; font-size: 15px; opacity: 0.85; }
.app-nav-link:hover { color: var(--white); background: rgba(124,92,252,0.08); }
.app-nav-link.active {
  color: var(--white);
  background: linear-gradient(100deg, rgba(124,92,252,0.18), rgba(200,73,214,0.10));
}
.app-nav-link.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--purple-lt), var(--magenta), var(--gold));
}
.app-nav-spacer { flex: 1; }
.app-nav-foot { font-size: 11px; color: var(--text-dim); padding: 12px 14px; line-height: 1.6; border-top: 1px solid rgba(158,168,184,0.08); }

.app-main { min-width: 0; }
.app-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 20px 40px;
  border-bottom: 1px solid rgba(158,168,184,0.08);
  background: rgba(11,22,41,0.55); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
.app-topbar .greeting { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 400; color: var(--white); }
.app-topbar .greeting small { display: block; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 2px; }
.app-topbar-actions { display: flex; align-items: center; gap: 16px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  flex-shrink: 0;   /* never let a long flex-row neighbor squash the circle into an oval */
  background: linear-gradient(135deg, var(--purple), var(--magenta));
  display: grid; place-items: center; font-weight: 600; font-size: 14px; color: #fff;
  box-shadow: 0 6px 16px rgba(124,92,252,0.35);
}
.app-content { padding: 36px 40px 64px; max-width: 1180px; }

/* mobile menu toggle (hidden on desktop) */
.app-menu-btn { display: none; background: none; border: none; color: var(--white); font-size: 22px; cursor: pointer; }

/* ── REDUCED MOTION GUARD ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ── RESPONSIVE BASE ── */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  .nav-links { gap: 18px; }
  section { padding: 72px 24px; }
  footer { padding: 40px 24px; }
  .footer-contact { flex-direction: column; gap: 8px; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }

  /* app shell collapses to single column with slide-in sidebar */
  .app { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed; top: 0; left: 0; z-index: 120; width: 248px;
    transform: translateX(-100%); transition: transform 0.3s ease;
  }
  .app.menu-open .app-sidebar { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,0.6); }
  .app-menu-btn { display: block; }
  .app-topbar { padding: 16px 20px; }
  .app-content { padding: 24px 20px 56px; }
  .app-scrim { display: none; position: fixed; inset: 0; z-index: 110; background: rgba(11,22,41,0.6); backdrop-filter: blur(2px); }
  .app.menu-open .app-scrim { display: block; }
}
@media (max-width: 560px) {
  .opt-grid { grid-template-columns: 1fr; }
}

/* ── LEGAL / PROSE PAGES ── */
.legal-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 60px; background: rgba(11,22,41,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(201,168,76,0.12); }
.legal-wrap { max-width: 780px; margin: 0 auto; padding: 130px 24px 90px; }
.legal-wrap h1 { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: clamp(32px,4.5vw,52px); line-height: 1.12; margin-bottom: 10px; }
.legal-meta { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 30px; }
.legal-wrap h2 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 24px; color: var(--white); margin: 34px 0 10px; }
.legal-wrap p, .legal-wrap li { font-size: 14.5px; color: var(--text); line-height: 1.75; }
.legal-wrap p { margin-bottom: 14px; }
.legal-wrap ul { margin: 0 0 14px 20px; display: flex; flex-direction: column; gap: 6px; }
.legal-wrap strong { color: var(--white); }
.legal-wrap a { color: var(--purple-lt); text-decoration: none; }
.legal-wrap a:hover { text-decoration: underline; }
.legal-callout { border: 1px solid rgba(201,168,76,0.3); background: linear-gradient(135deg, rgba(201,168,76,0.08), rgba(124,92,252,0.05));
  border-radius: 12px; padding: 16px 18px; margin: 20px 0; font-size: 13.5px; color: var(--text); line-height: 1.65; }
.legal-callout strong { color: var(--gold-lt); }
@media (max-width: 700px) { .legal-nav { padding: 14px 20px; } }

/* ── Mobile: form controls must be ≥16px or iOS auto-zooms the page on
      focus (the classic "layout blows up when I tap the email field"). ── */
@media (max-width: 700px) {
  input[type=text], input[type=email], input[type=tel], input[type=date],
  input[type=number], input[type=password], select, textarea {
    font-size: 16px;
  }
}
