/* ══════════════════════════════════════════════════════════════════
   TPT Marketplace — "Partner Ledger" design language
   Editorial rather than app-like: warm paper ground, serif display
   figures, hairline rules, statement-style leaders, stamp badges.
   Motion is entrance/feedback/continuity only, honors reduced-motion.
   Strict-CSP safe: no inline styles anywhere.
   ══════════════════════════════════════════════════════════════════ */

:root {
  /* Ground & ink */
  --paper: #f3f1ea;
  --card: #fffefb;
  --ink: #1a202c;
  --ink-2: #4b5261;
  --muted: #837f72;
  --hairline: #e2ddce;
  --grid: #edeade;
  --rule: #cfc9b6;

  /* Brand */
  --brand: #10365f;
  --brand-2: #0b2846;
  --navy-deep: #081c33;
  --accent: #2a78d6;
  --accent-strong: #1c5cab;
  /* TechPlus Talent brand flame — orange to magenta, from the company logo */
  --grad-text: linear-gradient(100deg, #ef7d12 5%, #ee4b3c 48%, #d6336c 92%);

  /* Status */
  --good: #0ca30c;
  --good-ink: #056709;
  --warning: #fab219;
  --warning-ink: #7a5200;
  --critical: #d03b3b;
  --critical-ink: #9c2020;

  --radius: 12px;
  --shadow-1: 0 1px 1px rgba(26, 32, 44, 0.04), 0 3px 10px -2px rgba(26, 32, 44, 0.06);
  --shadow-2: 0 2px 6px rgba(26, 32, 44, 0.06), 0 18px 44px -16px rgba(26, 32, 44, 0.18);
  --ring: 0 0 0 3px rgba(42, 120, 214, 0.25);

  --serif: "Iowan Old Style", Palatino, Georgia, ui-serif, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 150ms;
  --t-med: 280ms;
  --t-slow: 520ms;

  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  /* Warm paper with a faint light source at the top — depth without noise */
  background:
    radial-gradient(1100px 420px at 50% -80px, rgba(255, 254, 250, 0.9), transparent 70%),
    var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(42, 120, 214, 0.2); }
a { color: var(--accent-strong); text-decoration: none; transition: color var(--t-fast); }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbc5b3; border-radius: 999px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: #b3ac97; }

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scale-in { from { opacity: 0; transform: scale(0.965) translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes drift-a { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, -40px) scale(1.12); } 100% { transform: translate(-30px, 30px) scale(0.95); } }
@keyframes drift-b { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-70px, 30px) scale(1.08); } 100% { transform: translate(40px, -20px) scale(1.02); } }
@keyframes drift-c { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 50px) scale(0.9); } 100% { transform: translate(-50px, -30px) scale(1.1); } }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.4); } 55% { box-shadow: 0 0 0 6px rgba(12, 163, 12, 0); } }
@keyframes shimmer { from { background-position: -300px 0; } to { background-position: 300px 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px) scale(0.97); } }
@keyframes toast-life { from { width: 100%; } to { width: 0%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes step-right { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes step-left { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(3px); }
  30%, 70% { transform: translateX(-5px); } 40%, 60% { transform: translateX(5px); } 50% { transform: translateX(-4px); }
}
@keyframes draw-stroke { to { stroke-dashoffset: 0; } }
@keyframes confetti-fall {
  from { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  to { transform: translate(var(--drift, 0px), 110vh) rotate(var(--spin, 540deg)); opacity: 0.4; }
}

.anim-in { animation: fade-up var(--t-slow) var(--ease-out) both; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 10px 19px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  font-family: var(--sans);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast),
    transform var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: 60ms; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary {
  background: linear-gradient(180deg, #164573 0%, var(--brand) 100%); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 8px rgba(16, 54, 95, 0.28);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #123a62 0%, var(--brand-2) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 18px rgba(16, 54, 95, 0.32);
}
.btn-accent { background: var(--accent-strong); color: #fff; box-shadow: var(--shadow-1); }
.btn-accent:hover { background: var(--brand); }
.btn-outline { background: transparent; color: var(--brand); border-color: #bfc8d6; }
.btn-outline:hover { border-color: var(--brand); background: #fff; box-shadow: var(--shadow-1); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(26, 32, 44, 0.06); color: var(--ink); }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn-danger { background: transparent; color: var(--critical-ink); border-color: rgba(208, 59, 59, 0.45); }
.btn-danger:hover { background: rgba(208, 59, 59, 0.07); border-color: var(--critical); }
.btn-good { background: transparent; color: var(--good-ink); border-color: rgba(12, 163, 12, 0.45); }
.btn-good:hover { background: rgba(12, 163, 12, 0.08); border-color: var(--good); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Landing: header ─────────────────────────────────────── */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 6vw; position: sticky; top: 0; z-index: 50;
  background: rgba(243, 241, 234, 0.7);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: background var(--t-med), border-color var(--t-med), box-shadow var(--t-med);
}
.site-header.scrolled { background: rgba(243, 241, 234, 0.92); border-bottom-color: var(--hairline); box-shadow: 0 4px 20px rgba(26, 32, 44, 0.06); }

.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 17.5px; color: var(--brand); font-family: var(--serif); }
/* The mark: the TechPlus Talent flame monogram on a transparent ground, so it
   sits cleanly on both the dark rail and the paper landing. */
.logo-mark {
  width: 42px; height: 42px; flex-shrink: 0; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(214, 51, 108, 0.22));
  transition: transform var(--t-med) var(--ease-spring);
}
.logo:hover .logo-mark { transform: translateY(-2px) scale(1.06); }
/* The word "Plus" carries the brand flame inside the wordmark */
.logo .plus {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-weight: inherit;
}
.logo small { display: block; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 0.16em; font-family: var(--sans); }
.header-actions { display: flex; gap: 10px; }

/* ── Landing: hero ───────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 88px 6vw 60px; isolation: isolate;
  background: radial-gradient(rgba(16, 54, 95, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
}
.aurora { position: absolute; inset: -20%; z-index: -1; filter: blur(70px); pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; opacity: 0.45; will-change: transform; }
.aurora i:nth-child(1) { width: 46vw; height: 46vw; left: -8%; top: -18%; background: radial-gradient(circle, #a9c8ef, transparent 65%); animation: drift-a 24s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 38vw; height: 38vw; right: -6%; top: -6%; background: radial-gradient(circle, #ead9b8, transparent 65%); animation: drift-b 28s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 34vw; height: 34vw; left: 32%; bottom: -28%; background: radial-gradient(circle, #b3e3e8, transparent 65%); animation: drift-c 32s ease-in-out infinite alternate; }

.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 15px; border-radius: 999px; margin-bottom: 24px;
  background: rgba(255, 254, 251, 0.8); border: 1px solid var(--rule);
  color: var(--brand); font-size: 12px; font-weight: 700; letter-spacing: 0.09em;
  animation: fade-up var(--t-slow) var(--ease-out) both;
}
.hero .eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--good); animation: pulse-dot 2.4s ease-out infinite;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 56px); margin: 0 0 18px; font-weight: 700;
  color: var(--brand-2); letter-spacing: -0.02em;
  animation: fade-up var(--t-slow) var(--ease-out) 90ms both;
}
.hero h1 .grad {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-style: italic;
}
.hero p.sub {
  max-width: 600px; margin: 0 auto 30px; color: var(--ink-2); font-size: 17px;
  animation: fade-up var(--t-slow) var(--ease-out) 180ms both;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; animation: fade-up var(--t-slow) var(--ease-out) 260ms both; }

.ms-icon { display: inline-grid; grid-template-columns: 7px 7px; grid-template-rows: 7px 7px; gap: 1px; }
.ms-icon i { display: block; }
.ms-icon i:nth-child(1) { background: #f25022; }
.ms-icon i:nth-child(2) { background: #7fba00; }
.ms-icon i:nth-child(3) { background: #00a4ef; }
.ms-icon i:nth-child(4) { background: #ffb900; }

/* ── Landing: journey strip ──────────────────────────────── */
.journey-section { padding: 44px 6vw 8px; max-width: 1100px; margin: 0 auto; text-align: center; }
.journey-section h2 { font-family: var(--serif); color: var(--brand-2); font-size: 27px; margin-bottom: 26px; }
.journey { display: flex; align-items: stretch; justify-content: center; gap: 14px; flex-wrap: wrap; }
.journey-step {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
  box-shadow: var(--shadow-1); padding: 24px 26px; width: 280px; text-align: left; position: relative;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.journey-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--rule); }
.journey-num {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--brand); color: var(--brand); font-family: var(--serif);
  font-weight: 700; font-size: 16px; margin-bottom: 12px;
}
.journey-step h3 { margin: 0 0 6px; font-size: 16px; color: var(--brand-2); }
.journey-step p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.journey-arrow { align-self: center; font-size: 22px; color: var(--muted); }
@media (max-width: 900px) { .journey-arrow { display: none; } }

/* ── Landing: services ───────────────────────────────────── */
.services-section { padding: 44px 6vw 70px; max-width: 1220px; margin: 0 auto; }
.services-section h2 { font-family: var(--serif); text-align: center; color: var(--brand-2); font-size: 27px; margin-bottom: 6px; }
.services-section .section-sub { text-align: center; color: var(--muted); margin: 0 0 28px; font-size: 15px; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 350px)); justify-content: center; gap: 18px; }
.service-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 22px;
  position: relative; overflow: hidden;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.service-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--rule); }
.service-card:hover::after { transform: scaleX(1); }
.service-card .tech {
  display: inline-block; font-size: 11px; font-weight: 800; color: var(--accent-strong);
  letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid rgba(42, 120, 214, 0.35); padding: 2px 9px; border-radius: 3px; margin-bottom: 4px;
}
.service-card h3 { font-family: var(--serif); margin: 10px 0 6px; font-size: 17px; }
.service-card p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

.site-footer { padding: 30px 6vw; border-top: 1px solid var(--hairline); color: var(--muted); font-size: 13px; text-align: center; }

/* ── Banners & toasts ────────────────────────────────────── */
.banner {
  max-width: 760px; margin: 18px auto 0; padding: 13px 20px; border-radius: 10px;
  font-size: 14px; display: none; border: 1px solid; box-shadow: var(--shadow-1); background: var(--card);
}
.banner.show { display: block; animation: fade-up var(--t-med) var(--ease-out) both; }
.banner-info { border-color: rgba(42, 120, 214, 0.4); color: var(--accent-strong); }
.banner-warn { border-color: rgba(250, 178, 25, 0.55); color: var(--warning-ink); }
.banner-error { border-color: rgba(208, 59, 59, 0.45); color: var(--critical-ink); }

#toast-region { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast {
  background: rgba(26, 32, 44, 0.95); color: #fff; padding: 13px 18px 15px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.3); max-width: 380px; position: relative; overflow: hidden;
  animation: toast-in 0.3s var(--ease-spring) both;
}
.toast.out { animation: toast-out 0.25s var(--ease-out) both; }
.toast::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: rgba(255, 255, 255, 0.4);
  animation: toast-life var(--toast-ms, 4200ms) linear both;
}
.toast.toast-error { background: rgba(156, 32, 32, 0.96); }
.toast.toast-success { background: rgba(5, 103, 9, 0.96); }

/* ── Auth pages & registration wizard ────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 44px 20px; position: relative; overflow: hidden; }
.auth-wrap .aurora { filter: blur(80px); opacity: 0.5; }
.form-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: 14px;
  box-shadow: var(--shadow-2); padding: 34px; width: 100%; max-width: 540px; margin-top: 28px;
  animation: scale-in var(--t-slow) var(--ease-out) both;
  position: relative; z-index: 1;
}
.form-card h1 { font-family: var(--serif); font-size: 23px; margin: 0 0 4px; color: var(--brand-2); }
.form-card .sub { color: var(--ink-2); font-size: 14px; margin: 0 0 24px; }
.form-card code { background: var(--grid); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field label .req { color: var(--critical); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 13px; border: 1.5px solid #d3cec0; border-radius: 8px;
  font-size: 14.5px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #bcb5a2; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.field .error-text { color: var(--critical-ink); font-size: 12.5px; margin-top: 5px; display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--critical); }
.field.has-error .error-text { display: block; animation: fade-up var(--t-fast) var(--ease-out) both; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-actions { margin-top: 24px; display: flex; gap: 12px; align-items: center; }

.reg-shell {
  display: flex; width: 100%; max-width: 880px; margin-top: 28px; border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow-2); border: 1px solid var(--hairline);
  background: var(--card); position: relative; z-index: 1; min-height: 480px;
}
.reg-side {
  width: 290px; flex-shrink: 0; position: relative; overflow: hidden; color: #d6dfeb;
  background: linear-gradient(168deg, var(--brand-2) 0%, var(--navy-deep) 75%);
  padding: 34px 28px; display: flex; flex-direction: column;
}
.reg-side .aurora { filter: blur(50px); opacity: 0.5; inset: -30%; }
.reg-side .aurora i:nth-child(1) { background: radial-gradient(circle, rgba(42, 120, 214, 0.85), transparent 65%); }
.reg-side .aurora i:nth-child(2) { background: radial-gradient(circle, rgba(34, 184, 207, 0.5), transparent 65%); }
.reg-side-content { position: relative; flex: 1; }
.reg-side h2 { font-family: var(--serif); color: #fff; font-size: 22px; margin: 0 0 10px; }
.reg-side #side-blurb { font-size: 13.5px; color: #a9bcd4; min-height: 60px; margin: 0 0 26px; transition: opacity var(--t-med); }
.reg-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.reg-step {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; color: #7d94b3;
  transition: background var(--t-med), color var(--t-med);
}
.reg-step.active { background: rgba(255, 255, 255, 0.09); color: #fff; }
.reg-step.done { color: #9fe8b8; }
.reg-dot {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid currentColor; font-size: 12px; font-weight: 800; font-family: var(--serif);
  transition: background var(--t-med), border-color var(--t-med), transform var(--t-med) var(--ease-spring);
}
.reg-step.active .reg-dot { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.12); }
.reg-step.done .reg-dot { background: rgba(12, 163, 12, 0.25); border-color: transparent; font-size: 0; }
.reg-step.done .reg-dot::before { content: "✓"; font-size: 13px; }
.reg-side-foot { position: relative; font-size: 12.5px; color: #7d94b3; }
.reg-side-foot a { color: #cfe0f5; font-weight: 600; }

.reg-main { flex: 1; padding: 30px 34px 26px; display: flex; flex-direction: column; min-width: 0; }
.reg-progress { height: 3px; border-radius: 999px; background: var(--grid); overflow: hidden; margin-bottom: 24px; }
.reg-progress-fill { height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width var(--t-slow) var(--ease-out); }
#register-form { display: flex; flex-direction: column; flex: 1; }
.step-panel { display: none; flex: 1; }
.step-panel.active { display: block; }
.step-panel.from-right { animation: step-right 0.4s var(--ease-out) both; }
.step-panel.from-left { animation: step-left 0.4s var(--ease-out) both; }
.step-panel h1 { font-family: var(--serif); font-size: 22px; margin: 0 0 4px; color: var(--brand-2); }
.step-panel .sub { color: var(--ink-2); font-size: 13.5px; margin: 0 0 22px; }

.input-wrap { position: relative; }
.field.is-valid .input-wrap::after {
  content: "✓"; position: absolute; right: 13px; top: 50%; translate: 0 -50%;
  color: var(--good-ink); font-weight: 800; font-size: 14px;
  animation: scale-in 0.25s var(--ease-spring) both;
}
.field.is-valid input { border-color: rgba(12, 163, 12, 0.5); }
.field.shake { animation: shake 0.4s var(--ease-out); }

.wizard-nav { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 22px; }
.wizard-count { flex: 1; text-align: center; font-size: 12.5px; }

.review-list { display: flex; flex-direction: column; }
.review-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--grid); opacity: 0; animation: fade-up 0.4s var(--ease-out) forwards;
}
.review-row:nth-child(1) { animation-delay: 0ms; } .review-row:nth-child(2) { animation-delay: 50ms; }
.review-row:nth-child(3) { animation-delay: 100ms; } .review-row:nth-child(4) { animation-delay: 150ms; }
.review-row:nth-child(5) { animation-delay: 200ms; } .review-row:nth-child(6) { animation-delay: 250ms; }
.review-label { width: 90px; flex-shrink: 0; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.review-value { flex: 1; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.review-edit {
  border: none; background: none; color: var(--accent-strong); font-size: 12.5px; font-weight: 700;
  cursor: pointer; font-family: inherit; padding: 4px 8px; border-radius: 6px;
  transition: background var(--t-fast);
}
.review-edit:hover { background: rgba(42, 120, 214, 0.08); }

.reg-success {
  position: relative; z-index: 1; margin-top: 28px; width: 100%; max-width: 560px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 14px;
  box-shadow: var(--shadow-2); padding: 40px 38px; text-align: center;
  animation: scale-in 0.45s var(--ease-spring) both;
}
.reg-success h1 { font-family: var(--serif); font-size: 25px; color: var(--brand-2); margin: 18px 0 8px; }
.reg-success .sub { color: var(--ink-2); font-size: 14px; margin: 0 0 26px; }
.success-check svg { display: block; margin: 0 auto; }
.check-circle { stroke: var(--good); stroke-dasharray: 202; stroke-dashoffset: 202; animation: draw-stroke 0.7s var(--ease-out) 0.15s forwards; }
.check-mark { stroke: var(--good-ink); stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw-stroke 0.45s var(--ease-out) 0.75s forwards; }

.timeline { list-style: none; margin: 0 0 28px; padding: 0; text-align: left; }
.tl-item { position: relative; padding: 0 0 20px 34px; opacity: 0; animation: fade-up 0.5s var(--ease-out) forwards; }
.tl-item:nth-child(1) { animation-delay: 1.0s; }
.tl-item:nth-child(2) { animation-delay: 1.25s; }
.tl-item:nth-child(3) { animation-delay: 1.5s; }
.tl-item::before {
  content: ""; position: absolute; left: 8px; top: 6px; width: 10px; height: 10px;
  border-radius: 50%; border: 2.5px solid var(--muted); background: #fff;
}
.tl-item.tl-done::before { background: var(--good); border-color: var(--good); }
.tl-item::after { content: ""; position: absolute; left: 14px; top: 22px; bottom: 2px; width: 2px; background: var(--grid); }
.tl-item:last-child::after { display: none; }
.tl-item strong { display: block; font-size: 14px; color: var(--ink); }
.tl-item span { font-size: 12.5px; color: var(--muted); }

.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 60; }
.confetti i {
  position: absolute; top: -14px; display: block;
  animation-name: confetti-fall; animation-timing-function: cubic-bezier(0.25, 0.4, 0.55, 1);
  animation-fill-mode: both;
}

@media (max-width: 760px) {
  .reg-shell { flex-direction: column; min-height: 0; }
  .reg-side { width: 100%; padding: 22px 24px; }
  .reg-side #side-blurb { min-height: 0; margin-bottom: 16px; }
  .reg-steps { flex-direction: row; gap: 4px; }
  .reg-step { padding: 8px; font-size: 0; gap: 0; }
  .reg-step .reg-dot { font-size: 12px; }
  .reg-step.done .reg-dot::before { font-size: 13px; }
  .reg-side-foot { display: none; }
  .reg-main { padding: 24px 22px 20px; }
}

/* ── Portal shell ────────────────────────────────────────── */
.portal { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex-shrink: 0; color: #d6dfeb;
  background: linear-gradient(180deg, #0e2c4e 0%, var(--navy-deep) 100%);
  display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh;
}
.sidebar::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 180px;
  background: radial-gradient(ellipse at 30% -20%, rgba(42, 120, 214, 0.3), transparent 70%);
  pointer-events: none;
}
.sidebar .logo {
  color: #fff; margin: 0 4px 22px; padding: 0 4px 18px; position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.sidebar .logo small { color: #7d94b3; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 8px;
  color: #a9bcd4; font-size: 14px; font-weight: 600; cursor: pointer; border: none;
  background: transparent; width: 100%; text-align: left; font-family: var(--sans); margin-bottom: 3px;
  position: relative;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.nav-item::before {
  content: ""; position: absolute; left: 0; top: 50%; translate: 0 -50%;
  width: 3px; height: 0; border-radius: 999px; background: #22b8cf;
  transition: height var(--t-med) var(--ease-out);
}
.nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; transform: translateX(2px); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(34, 184, 207, 0.16), rgba(255, 255, 255, 0.07) 60%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav-item.active::before { height: 58%; }
.nav-ico { width: 16px; height: 16px; flex-shrink: 0; transition: transform var(--t-med) var(--ease-spring); }
.nav-item:hover .nav-ico { transform: scale(1.12); }
.sidebar .spacer { flex: 1; }
.sidebar .who {
  margin: 0 4px 8px; padding: 11px 12px; font-size: 12.5px; color: #7d94b3;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px; overflow-wrap: anywhere;
}
.sidebar .who strong { color: #fff; display: block; font-size: 13px; }

.main { flex: 1; padding: 32px 42px 72px; min-width: 0; max-width: 1460px; }
.page-title {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
  gap: 12px; margin-bottom: 24px; padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline); position: relative;
}
.page-title::after {
  /* Brand signature: a short flame-gradient tick on the title rule */
  content: ""; position: absolute; left: 0; bottom: -1.5px; width: 52px; height: 2.5px;
  background: var(--grad-text); border-radius: 2px;
}
.page-title h1 { font-family: var(--serif); font-size: 27px; margin: 0; color: var(--brand-2); letter-spacing: -0.015em; }
.page-title .sub { color: var(--muted); font-size: 13.5px; }
.view { display: none; }
.view.active { display: block; animation: fade-up 0.4s var(--ease-out) both; }

/* ── Deck header ─────────────────────────────────────────── */
.deck-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  margin-bottom: 26px; flex-wrap: wrap; padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline); position: relative;
}
.deck-head::after {
  content: ""; position: absolute; left: 0; bottom: -1.5px; width: 52px; height: 2.5px;
  background: var(--grad-text); border-radius: 2px;
}
.deck-date { margin: 0 0 2px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.deck-head h1 { font-family: var(--serif); font-size: 30px; margin: 0 0 6px; color: var(--brand-2); letter-spacing: -0.015em; }
.deck-sub { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.rate-stamp {
  align-self: center; text-align: center; padding: 11px 20px 13px;
  border: 1.5px solid var(--rule); border-radius: 12px; color: var(--brand);
  background: linear-gradient(180deg, #fffffd, rgba(255, 254, 251, 0.7));
  box-shadow: var(--shadow-1); position: relative; overflow: hidden;
}
.rate-stamp::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2.5px;
  background: var(--grad-text);
}
.rate-stamp span { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.rate-stamp strong { font-family: var(--serif); font-size: 24px; line-height: 1.15; }

/* ── Stat strip: ruled columns, not cards ────────────────── */
.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  /* Ledger convention: a firm rule above the figures, a light one below */
  border-top: 2px solid var(--brand-2); border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.65), transparent 80%);
}
.stat {
  padding: 18px 20px 16px; position: relative;
  opacity: 0; animation: fade-up 0.5s var(--ease-out) forwards;
}
.stat:nth-child(1) { animation-delay: 0ms; } .stat:nth-child(2) { animation-delay: 70ms; }
.stat:nth-child(3) { animation-delay: 140ms; } .stat:nth-child(4) { animation-delay: 210ms; }
.stat:nth-child(5) { animation-delay: 280ms; }
.stat + .stat { border-left: 1px solid var(--hairline); }
.stat-label { display: block; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.stat-value { display: block; font-family: var(--serif); font-size: 27px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; font-variant-numeric: lining-nums; }
.stat-hero .stat-value { color: var(--good-ink); }
.stat-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat-sub.up { color: var(--good-ink); }
.stat-sub.down { color: var(--critical-ink); }
.stat-value.loading {
  color: transparent !important; border-radius: 6px; min-height: 1em; width: 70%;
  background: linear-gradient(90deg, var(--grid) 25%, #f7f5ec 40%, var(--grid) 55%);
  background-size: 300px 100%; animation: shimmer 1.1s linear infinite;
}
.stat-arc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.arc-gauge { width: 54px; height: 54px; }
.arc-track { stroke: var(--grid); stroke-width: 6; }
.arc-fill { stroke: var(--accent); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.9s var(--ease-out); }
.arc-text { font-family: var(--serif); font-size: 15px; font-weight: 700; fill: var(--ink); }
.stat-arc .stat-sub { flex-basis: 100%; margin-top: 2px; }

/* ── Deck grid & panels ──────────────────────────────────── */
.deck-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.deck-main, .deck-rail { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 1080px) { .deck-grid { grid-template-columns: 1fr; } }

.panel, .card {
  background: linear-gradient(180deg, #fffffd 0%, var(--card) 100%);
  border: 1px solid var(--hairline); border-radius: var(--radius);
  box-shadow: var(--shadow-1); padding: 21px 24px; margin: 0;
}
.card { margin-bottom: 20px; }
.panel h2, .card h2 { font-size: 12px; margin: 0 0 14px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--grid); padding-bottom: 10px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; }
.panel-note { font-size: 12px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }

/* ── Column chart ────────────────────────────────────────── */
.colchart { display: flex; align-items: flex-end; gap: 12px; padding-top: 6px; }
.col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.col-value { font-size: 12px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; min-height: 16px; }
.col-track { height: 132px; width: 100%; max-width: 48px; display: flex; align-items: flex-end; border-bottom: 1.5px solid var(--rule); }
.col-fill { width: 100%; height: 0; background: var(--accent); border-radius: 3px 3px 0 0; transition: height 0.8s var(--ease-out); }
.col:hover .col-fill { background: var(--accent-strong); }
.col-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.col-sub { font-size: 10.5px; color: var(--muted); }

/* ── Pipeline board ──────────────────────────────────────── */
.pipe-track { display: flex; gap: 3px; height: 36px; border-radius: 7px; overflow: hidden; }
.pipe-seg {
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 14px;
  transition: filter var(--t-fast);
}
.pipe-seg:hover { filter: brightness(0.94); }
.pipe-seg.pipe-submitted { background: #9ec5f4; color: var(--brand-2); }
.pipe-seg.pipe-in_progress { background: #f6d47c; color: var(--warning-ink); }
.pipe-seg.pipe-won { background: #8fd48f; color: var(--good-ink); }
.pipe-seg.pipe-lost { background: #dcd7c8; color: var(--ink-2); }
.pipe-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.pipe-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.pipe-dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.pipe-dot.pipe-submitted { background: #9ec5f4; }
.pipe-dot.pipe-in_progress { background: #f6d47c; }
.pipe-dot.pipe-won { background: #8fd48f; }
.pipe-dot.pipe-lost { background: #dcd7c8; }

/* ── Commission statement ────────────────────────────────── */
.stmt { display: flex; flex-direction: column; }
.stmt-row { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; }
.stmt-label { font-size: 13px; color: var(--ink-2); }
.stmt-leader { flex: 1; border-bottom: 1px dotted var(--rule); transform: translateY(-3px); }
.stmt-value { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.stmt-strong .stmt-value { font-family: var(--serif); font-size: 20px; color: var(--good-ink); }
.stmt-note { font-family: var(--serif); font-style: italic; font-size: 12.5px; color: var(--muted); margin: 14px 0 0; border-top: 1px solid var(--grid); padding-top: 12px; }

/* ── Aging list / queues / feeds ─────────────────────────── */
.age-list, .action-queue, .feed { list-style: none; margin: 0; padding: 0; }
.age-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.age-item:last-child { border-bottom: none; }
.age-body { flex: 1; min-width: 0; }
.age-body strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.age-chip {
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.age-chip.age-stale { color: var(--critical-ink); border-color: rgba(208, 59, 59, 0.4); background: rgba(208, 59, 59, 0.06); }
.age-empty { padding: 10px 0; font-size: 13px; color: var(--muted); }

.queue-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--grid); font-size: 13.5px; }
.queue-item:last-child { border-bottom: none; }

.feed-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--grid); font-size: 13px; }
.feed-item:last-child { border-bottom: none; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-top: 6px; flex-shrink: 0; }
.feed-dot.feed-partner { background: var(--accent); }
.feed-dot.feed-admin { background: var(--brand); }
.feed-body { flex: 1; min-width: 0; }
.feed-body strong { display: block; font-size: 13px; }
.feed-body .commission-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.feed-time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ── Explore services (coming soon) ──────────────────────── */
.explore-soon { max-width: 620px; margin: 24px auto 0; text-align: center; padding: 48px 40px; }
.explore-flame { width: 64px; height: 64px; margin: 0 auto 14px; display: block; filter: drop-shadow(0 4px 10px rgba(238, 75, 60, 0.25)); }
.explore-badge {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brand); border: 1px solid var(--rule);
  border-radius: 999px; padding: 4px 14px; margin-bottom: 14px;
  background: rgba(255, 254, 251, 0.8);
}
.explore-soon h2 { font-family: var(--serif); font-size: 23px; margin: 0 0 10px; color: var(--brand-2); }
.explore-soon p { margin: 0 auto 14px; max-width: 46ch; font-size: 14.5px; color: var(--ink-2); }
.explore-soon .btn { margin-top: 8px; }

/* ── Feedback charts ─────────────────────────────────────── */
.fb-charts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px; margin-bottom: 20px;
}
/* Question averages carry the brand flame; star columns go gold */
#fbc-avgs .hbar-fill { background: linear-gradient(90deg, #f7941d, #ee4b3c 55%, #d6336c); }
#fbc-avgs .hbar-row:hover .hbar-fill { filter: brightness(0.95); }
#fbc-dist .col-fill { background: var(--warning); } /* fallback; JS sets a per-rating colour */
#fbc-dist .col:hover .col-fill { filter: brightness(0.93); }
.fb-gauges { display: flex; justify-content: space-around; gap: 12px; padding-top: 6px; flex-wrap: wrap; }
.fb-gauge { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.fb-gauge .arc-gauge { width: 64px; height: 64px; }

/* ── Inline feedback cell (opportunity / project tables) ─── */
.cell-feedback { white-space: nowrap; }
.cell-feedback .btn-sm { padding: 4px 12px; }
.fb-rated { font-size: 12px; font-weight: 700; color: var(--warning-ink); white-space: nowrap; }

/* ── Feedback stars ──────────────────────────────────────── */
.fb-rows { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.fb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--grid); }
.fb-row:last-child { border-bottom: none; }
.fb-label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.fb-stars { display: inline-flex; gap: 2px; }
.fb-star {
  border: none; background: none; cursor: pointer; padding: 2px 3px;
  font-size: 21px; line-height: 1; color: var(--rule);
  transition: color var(--t-fast), transform var(--t-fast) var(--ease-spring);
}
.fb-star:hover { transform: scale(1.18); }
.fb-star.on { color: var(--warning); }
.fb-star:focus-visible { outline: none; border-radius: 4px; box-shadow: var(--ring); }
.fb-cell { color: var(--warning-ink); font-size: 12px; letter-spacing: 0.05em; white-space: nowrap; }
.fb-comment-cell { max-width: 220px; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-yes { color: var(--good-ink); font-weight: 700; font-size: 12.5px; }
.fb-no { color: var(--critical-ink); font-weight: 700; font-size: 12.5px; }
.fb-label { max-width: 62%; }
.fb-choices { display: inline-flex; gap: 6px; }
.fb-choice {
  border: 1.5px solid var(--rule); background: #fffefb; color: var(--ink-2);
  font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  padding: 5px 16px; border-radius: 999px;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.fb-choice:hover { border-color: var(--brand); color: var(--brand); }
.fb-choice.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.fb-choice:focus-visible { outline: none; box-shadow: var(--ring); }
.fbd-row .stmt-label { max-width: 68%; color: var(--ink); }
.fbd-row .stmt-value { color: var(--warning-ink); }

/* ── Attachments ─────────────────────────────────────────── */
.attach-list { list-style: none; margin: 6px 0 0; padding: 0; }
.attach-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 0;
  border-bottom: 1px solid var(--grid); font-size: 13px;
}
.attach-item:last-child { border-bottom: none; }
.attach-item::before {
  content: ""; width: 14px; height: 14px; flex-shrink: 0; opacity: 0.65;
  background: no-repeat center / contain
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="%23837f72" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M13 7.5 8.3 12.2a3.2 3.2 0 0 1-4.5-4.5L8.9 2.6a2.1 2.1 0 0 1 3 3l-5 5a1 1 0 0 1-1.5-1.4L9.9 4.7"/></svg>');
}
.attach-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink); }
a.attach-name { color: var(--accent-strong); }
.attach-size { font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.attach-item .btn-ghost { padding: 1px 7px; flex-shrink: 0; }
.field input[type="file"] {
  padding: 8px; border: 1.5px dashed #d3cec0; border-radius: 8px; width: 100%;
  font-size: 13px; color: var(--ink-2); background: #fff; cursor: pointer;
  transition: border-color var(--t-fast);
}
.field input[type="file"]:hover { border-color: var(--accent); }
.update-composer input[type="file"] { flex: 1; padding: 6px; border: 1.5px dashed #d3cec0; border-radius: 8px; font-size: 12.5px; background: #fff; }

/* ── Announcements ───────────────────────────────────────── */
.ann-list { list-style: none; margin: 0; padding: 0; }
.ann-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.ann-item:last-child { border-bottom: none; }
.ann-item::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px;
  background: var(--grad-text);
}
.ann-body { flex: 1; min-width: 0; }
.ann-text { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ann-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.ann-tag {
  font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand); border: 1px solid var(--rule); border-radius: 999px; padding: 1px 8px;
  background: rgba(255, 254, 251, 0.7);
}
.ann-date { font-size: 11.5px; color: var(--muted); }
.ann-item .btn-ghost { padding: 2px 8px; flex-shrink: 0; }

/* ── News / newsletters ──────────────────────────────────── */
.news-list { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.news-item { opacity: 0; animation: fade-up 0.45s var(--ease-out) forwards; }
.news-date { margin: 0 0 2px; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.news-title { font-family: var(--serif); font-size: 19px; margin: 0 0 10px; color: var(--brand-2); }
.news-para { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.news-para:last-child { margin-bottom: 0; }
.news-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.news-compact { border-bottom: 1px solid var(--grid); padding-bottom: 16px; }
.news-compact:last-child { border-bottom: none; padding-bottom: 0; }
.news-compact .news-title { font-size: 16px; margin-bottom: 6px; }
.news-compact .news-para { font-size: 13px; }

/* ── Leaderboard ─────────────────────────────────────────── */
.leaderboard { list-style: none; margin: 0; padding: 0; }
.lb-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--grid); }
.lb-row:last-child { border-bottom: none; }
.lb-rank { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--rule); width: 26px; text-align: center; flex-shrink: 0; }
.lb-row:first-child .lb-rank { color: var(--brand); }
.lb-mid { flex: 1; min-width: 0; }
.lb-name { font-size: 14px; }
.lb-track { height: 6px; background: var(--grid); border-radius: 3px; margin: 6px 0 5px; overflow: hidden; }
.lb-fill { height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width 0.8s var(--ease-out); }
.lb-value { font-family: var(--serif); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; padding: 10px 12px; color: var(--muted); font-size: 11px; font-weight: 800;
  letter-spacing: 0.09em; text-transform: uppercase; border-bottom: 1.5px solid var(--rule); white-space: nowrap;
}
table.data td { padding: 12px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
table.data th:first-child, table.data td:first-child { padding-left: 4px; }
table.data th:last-child, table.data td:last-child { padding-right: 4px; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background var(--t-fast), box-shadow var(--t-fast); }
table.data tbody tr.row-in { opacity: 0; animation: fade-up 0.4s var(--ease-out) forwards; }
table.data tbody tr:hover { background: rgba(42, 120, 214, 0.05); box-shadow: inset 3px 0 0 var(--accent); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .empty-row td {
  text-align: center; color: var(--muted); padding: 38px 20px;
  font-family: var(--serif); font-style: italic; font-size: 14px;
}
table.data .empty-row:hover { background: transparent; box-shadow: none; }

/* ── Badges: small stamps ────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2.5px 9px; border-radius: 4px;
  font-size: 11px; font-weight: 800; white-space: nowrap; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid currentColor; background: transparent;
  transition: transform var(--t-fast) var(--ease-out);
}
tr:hover .badge { transform: scale(1.03); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-submitted { color: var(--accent-strong); }
.badge-in_progress { color: var(--warning-ink); }
.badge-in_progress::before { animation: pulse-dot 2.2s ease-out infinite; }
.badge-won { color: var(--good-ink); }
.badge-lost { color: var(--critical-ink); }
.badge-pending { color: var(--warning-ink); }
.badge-pending::before { animation: pulse-dot 2.2s ease-out infinite; }
.badge-approved { color: var(--good-ink); }
.badge-rejected { color: var(--critical-ink); }
.badge-suspended { color: var(--ink-2); }
.badge-active { color: var(--good-ink); }
.badge-inactive { color: var(--ink-2); }
.badge-kickoff { color: var(--accent-strong); }
.badge-on_hold { color: var(--warning-ink); }
.badge-on_hold::before { animation: pulse-dot 2.2s ease-out infinite; }
.badge-completed { color: var(--good-ink); }

/* ── Filters ─────────────────────────────────────────────── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filters select, .filters input {
  padding: 8px 13px; border: 1.5px solid #d3cec0; border-radius: 9px; font-size: 13.5px;
  font-family: inherit; background: #fffefb; color: var(--ink); height: 37px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.filters select:hover, .filters input:hover { border-color: #bcb5a2; }
.filters select:focus, .filters input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.filters input[type="search"] { min-width: 220px; }
.filters .check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; user-select: none; }
.filters .check-inline input[type="checkbox"] {
  width: 15px; height: 15px; min-width: 0; padding: 0; margin: 0;
  border: none; background: none; accent-color: var(--accent); cursor: pointer;
}

/* ── Typeahead (partner filter) ──────────────────────────── */
.typeahead { position: relative; }
.typeahead input {
  min-width: 200px; padding: 8px 13px; border: 1.5px solid #d3cec0; border-radius: 8px;
  font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.typeahead input:hover { border-color: #bcb5a2; }
.typeahead input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.ta-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  max-height: 260px; overflow-y: auto; background: var(--card);
  border: 1px solid var(--hairline); border-radius: 10px; box-shadow: var(--shadow-2);
  padding: 4px;
}
.ta-item {
  padding: 8px 10px; border-radius: 7px; font-size: 13.5px; color: var(--ink);
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ta-item:hover { background: rgba(42, 120, 214, 0.08); }
.ta-item.ta-active { background: rgba(42, 120, 214, 0.12); font-weight: 700; color: var(--accent-strong); }
.ta-empty { padding: 8px 10px; font-size: 13px; color: var(--muted); }

/* ── Horizontal bars ─────────────────────────────────────── */
.hbar-chart { display: flex; flex-direction: column; gap: 12px; }
.hbar-row { display: grid; grid-template-columns: 110px 1fr 76px; align-items: center; gap: 10px; font-size: 13px; }
.hbar-row .hbar-label { color: var(--ink-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { background: var(--grid); border-radius: 4px; height: 14px; overflow: hidden; }
.hbar-fill { background: var(--accent); border-radius: 4px; height: 100%; min-width: 2px; width: 0; transition: width 0.9s var(--ease-out); }
.hbar-row:hover .hbar-fill { background: var(--accent-strong); }
.hbar-row .hbar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 700; }
.chart-note { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 18, 33, 0.55); display: none;
  align-items: center; justify-content: center; z-index: 90; padding: 20px;
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.modal-backdrop.show { display: flex; animation: fade-in 0.2s ease both; }
.modal {
  background: var(--card); border-radius: 16px; padding: 30px; width: 100%; max-width: 470px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  animation: scale-in 0.3s var(--ease-spring) both;
  max-height: 90vh; overflow-y: auto;
}
.modal h3 { font-family: var(--serif); margin: 0 0 8px; font-size: 19px; color: var(--brand-2); }
.modal .sub { color: var(--ink-2); font-size: 13.5px; margin: 0 0 18px; }
.modal .form-actions { justify-content: flex-end; }

/* ── Misc ────────────────────────────────────────────────── */
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.mt-0 { margin-top: 0; }
.hidden { display: none !important; }
.error-page { text-align: center; padding: 100px 20px; animation: fade-up var(--t-slow) var(--ease-out) both; }
.error-page h1 {
  font-family: var(--serif); font-size: 88px; margin: 0 0 6px; font-weight: 700;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.error-page p { color: var(--ink-2); margin-bottom: 26px; }
.commission-hint { font-size: 12px; color: var(--muted); }
.inline-input {
  width: 78px; padding: 5px 9px; border: 1.5px solid #d3cec0; border-radius: 7px;
  font-size: 13px; font-family: inherit; text-align: right;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.inline-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

@media (max-width: 860px) {
  .portal { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 12px; }
  .sidebar .logo { margin: 0 12px 0 4px; }
  .sidebar .spacer, .sidebar .who { display: none; }
  .nav-item { width: auto; }
  .main { padding: 18px 16px 50px; }
  .hero { padding-top: 56px; }
  .rate-stamp { display: none; }
  .stat + .stat { border-left: none; }
  .stat { border-top: 1px solid var(--hairline); }
  .stat:first-child { border-top: none; }
}

/* ── Projects ────────────────────────────────────────────── */
.proj-list { display: flex; flex-direction: column; gap: 16px; }
.proj-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
  box-shadow: var(--shadow-1); padding: 20px 22px;
  opacity: 0; animation: fade-up 0.45s var(--ease-out) forwards;
}
.proj-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.proj-title h3 { font-family: var(--serif); font-size: 17px; margin: 0 0 3px; color: var(--brand-2); }
.proj-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chip-paid { background: rgba(12, 163, 12, 0.1); color: var(--good-ink); }
.chip-due { background: rgba(250, 178, 25, 0.16); color: var(--warning-ink); }

/* In-table progress cell: mini bar + percent */
.cell-progress { white-space: nowrap; }
.mini-track {
  display: inline-block; vertical-align: middle; width: 64px; height: 7px;
  border-radius: 4px; background: var(--grid); overflow: hidden; margin-right: 7px;
}
.mini-fill { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.mini-fill.tl-done { background: var(--good); }
.mini-fill.tl-overdue { background: var(--critical); }
.mini-pct { font-size: 12px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; vertical-align: middle; }

/* Contract/delivery timeline bar */
.tl-bar { margin-bottom: 14px; }
.tl-bar-track { height: 10px; border-radius: 5px; background: var(--grid); overflow: hidden; }
.tl-bar-fill { height: 100%; width: 0; border-radius: 5px; background: var(--accent); transition: width 0.9s var(--ease-out); }
.tl-bar-fill.tl-done { background: var(--good); }
.tl-bar-fill.tl-overdue { background: var(--critical); }
.tl-bar-label { margin-top: 6px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-overdue-text { color: var(--critical-ink); font-weight: 600; }

.proj-updates { border-top: 1px solid var(--grid); padding-top: 12px; }
.proj-updates h4 { margin: 0 0 8px; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.update-composer { display: flex; gap: 8px; margin-top: 10px; }
.update-composer input {
  flex: 1; padding: 8px 12px; border: 1.5px solid #d3cec0; border-radius: 8px;
  font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.update-composer input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

/* ── Partner project fund ribbon ─────────────────────────────
   A quiet financial ticker, not an announcement banner: centered
   composition, small-caps label, serif figures, and the availability
   meter architected into the bar's bottom hairline. */
.fund-bar {
  display: none; position: relative; z-index: 60;
  background: linear-gradient(180deg, #0a2240 0%, var(--navy-deep) 100%);
  color: #cfe0f5;
}
.fund-bar.show { display: block; animation: fade-in 0.5s ease both; }
.fund-inner {
  display: flex; align-items: baseline; justify-content: center;
  gap: 20px; padding: 10px 5vw 12px; flex-wrap: wrap; row-gap: 4px;
}
.fund-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: #7d94b3; white-space: nowrap;
  align-self: center;
}
.fund-sep { width: 1px; height: 15px; background: rgba(255, 255, 255, 0.16); align-self: center; }
.fund-figure { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.fund-figure em {
  font-style: normal; font-family: var(--serif); font-size: 16.5px; font-weight: 700;
  color: #fff; font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0.01em;
}
.fund-figure small {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #7d94b3;
}
.fund-avail em { color: #a4ecbc; }
.fund-live {
  width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  align-self: center; animation: pulse-dot 2.6s ease-out infinite;
}
.fund-edge { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.1); display: block; }
.fund-edge i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #f7941d, #ee4b3c, #d6336c);
  transition: width 1.2s var(--ease-out);
}
@media (max-width: 700px) {
  .fund-sep { display: none; }
  .fund-inner { gap: 12px; }
}

.chip-fund { background: rgba(238, 75, 60, 0.1); color: #b23c14; }
.fund-edit { border-top: 1px solid var(--grid); margin-top: 14px; padding-top: 14px; }
.fund-edit .field { margin-bottom: 10px; }

/* ── Partner logos & identity ────────────────────────────── */
.avatar {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: var(--grid); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; letter-spacing: 0.02em; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.avatar-lg { width: 56px; height: 56px; border-radius: 12px; font-size: 17px; }
.avatar-xl { width: 72px; height: 72px; border-radius: 16px; font-size: 24px; }
.company-cell { display: flex; align-items: center; gap: 10px; }

/* ── Partner master list ─────────────────────────────────── */
.plist { display: flex; flex-direction: column; gap: 10px; }
.plist-row {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  padding: 16px 18px; background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: var(--shadow-1); cursor: pointer;
  font-family: var(--sans); color: var(--ink);
  opacity: 0; animation: fade-up 0.4s var(--ease-out) forwards;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.plist-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--rule); }
.plist-row:focus-visible { outline: none; box-shadow: var(--ring); }
.plist-mid { flex: 1; min-width: 0; }
.plist-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plist-name strong { font-family: var(--serif); font-size: 16.5px; color: var(--brand-2); }
.plist-counters { display: flex; gap: 18px; flex-shrink: 0; }
.plist-counter { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.plist-counter em { font-style: normal; font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.plist-counter small { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.plist-chevron { font-size: 22px; color: var(--rule); flex-shrink: 0; transition: color var(--t-fast), transform var(--t-fast); }
.plist-row:hover .plist-chevron { color: var(--accent); transform: translateX(2px); }
#partner-search { padding: 8px 13px; border: 1.5px solid #d3cec0; border-radius: 8px; font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink); min-width: 240px; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
#partner-search:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
@media (max-width: 520px) { .plist-counters { gap: 12px; } .plist-counter small { display: none; } }

/* ── Partner detail page ─────────────────────────────────── */
#pd-back { margin-bottom: 14px; }
.pd-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.pd-head-main { flex: 1; min-width: 0; }
.pd-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pd-title-row h1 { font-family: var(--serif); font-size: 27px; margin: 0; color: var(--brand-2); }
.pd-meta { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.pd-head-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* The partner's own logo in their sidebar — a small "we know you" touch */
.side-logo {
  display: none; align-items: center; gap: 10px; margin: 0 4px 10px;
  padding: 10px 12px; background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px;
}
.side-logo.show { display: flex; animation: fade-up 0.5s var(--ease-out) both; }
.side-logo img { max-height: 32px; max-width: 64px; object-fit: contain; border-radius: 6px; background: #fff; padding: 2px; }
.side-logo span { font-size: 12px; font-weight: 700; color: #cfe0f5; line-height: 1.3; }

.row-click { cursor: pointer; }
.pm-profile { border-top: 1px solid var(--grid); margin-top: 16px; padding-top: 14px; }
.pm-profile h4 { margin: 0 0 10px; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.pm-logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.om-desc { font-size: 13.5px; color: var(--ink-2); background: var(--grid); border-radius: 8px; padding: 10px 14px; margin: 12px 0 16px; white-space: pre-wrap; }

/* ── Payouts & misc admin bits ───────────────────────────── */
.payout-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.payout-amount { font-family: var(--serif); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.inline-select {
  padding: 5px 8px; border: 1.5px solid #d3cec0; border-radius: 7px; font-size: 12.5px;
  font-family: inherit; background: #fff; color: var(--ink); max-width: 220px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.inline-select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.modal-lg { max-width: 620px; }
.pm-add { border-top: 1px solid var(--grid); margin-top: 16px; padding-top: 16px; }
.who-role { display: block; margin-top: 3px; font-size: 11px; font-weight: 700; color: #22b8cf; letter-spacing: 0.05em; text-transform: uppercase; }

/* ── Reduced motion: instant content, nothing drifts ─────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .aurora i { animation: none; }
}
