/* ===========================
   Technyder , Design System
   =========================== */
/* Google Fonts loaded asynchronously via <link> in index.html — removed @import to eliminate render-blocking CSS chain */

:root {
  /* Technyder brand , from 2024 Brand Guide */
  --brand-navy: #0A1628;        /* Primary , Navy 900 (from 05B brand book) */
  --brand-navy-deep: #070E1C;   /* Background , Navy Deep */
  --brand-navy-800: #0F1E36;    /* Surface 2 , Navy 800 */
  --brand-gold: #DD9C6B;        /* Premium accent , used sparingly */
  --brand-gold-soft: #F0D5BB;
  --brand-cyan: #22D3EE;        /* Primary signal , live, system, online */
  --brand-cyan-soft: #67E8F9;
  --brand-electric: #3B82F6;
  --brand-silver: #C0C0C0;
  --brand-silver-dark: #545454;

  --bg: #FFFFFF;
  --bg-2: #F7F8FA;              /* Paper from brand book */
  --bg-3: #EEF1F6;              /* Paper-2 */
  --ink: #0A1628;               /* navy as primary ink */
  --ink-2: #3D4A60;             /* slate-700 */
  --muted: #6B7891;             /* slate-500 */
  --line: #E2E7EF;              /* mist */
  --line-2: #C5CCDA;
  --accent: #22D3EE;            /* PRIMARY signal , cyan */
  --accent-ink: #0A4F5C;
  --accent-wash: #E0FBFF;
  --accent-2: #DD9C6B;          /* Gold , rare premium accent */
  --warn: #FBBF24;

  --f-sans: 'Lexend', system-ui, -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  --max: 1280px;
  --pad: clamp(20px, 4vw, 48px);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  font-weight: 400;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--ink); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(64px, 10vw, 128px) 0; }
.section-tight { padding: clamp(40px, 6vw, 80px) 0; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
.h-display {
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}
.h-1 { font-size: clamp(36px, 5vw, 64px); font-weight: 400; letter-spacing: -0.03em; }
.h-2 { font-size: clamp(28px, 3.5vw, 44px); font-weight: 500; }
.h-3 { font-size: clamp(20px, 2vw, 26px); font-weight: 500; }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.small { font-size: 13px; color: var(--muted); }
.mono { font-family: var(--f-mono); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-navy);
  color: #fff;
  position: relative;
}
.btn-primary:hover {
  background: var(--brand-navy-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(10,22,40,0.45);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 6px -2px rgba(10,22,40,0.4); }
.btn-primary .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.btn-accent {
  background: var(--accent);
  color: var(--brand-navy);
  font-weight: 600;
}
.btn-accent:hover {
  background: var(--brand-navy);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(34,211,238,0.55);
}
.btn-accent:active { transform: translateY(0); box-shadow: 0 2px 8px -2px rgba(34,211,238,0.5); }

.btn-ghost {
  color: var(--ink);
  border-color: var(--line-2);
  background: transparent;
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.btn-sm { padding: 10px 16px; font-size: 14px; }

.arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 28px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--ink); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.brand img.logo-full { height: 36px !important; width: auto !important; max-width: none; display: block; flex-shrink: 0; }
.brand-mark {
  width: 28px; height: 28px;
  background: var(--brand-navy);
  border-radius: 8px;
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
}
.brand-mark::before {
  content: "T";
  color: var(--brand-gold);
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.brand-mark::after {
  content: "";
  position: absolute;
  right: -2px; bottom: -2px;
  width: 10px; height: 10px;
  background: var(--brand-gold);
  border-radius: 2px;
  transform: rotate(45deg);
}
.nav-links {
  display: flex; gap: 4px;
  font-size: 14px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  transition: background .15s ease, color .15s ease;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active { background: var(--bg-2); color: var(--ink); }
.nav-cta { display: flex; gap: 8px; align-items: center; }

@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--brand-navy-deep);
  color: var(--bg);
  padding: 80px 0 32px;
  margin-top: 0;
  position: relative;
}
.footer::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-navy) 0%, var(--brand-gold) 50%, var(--brand-navy) 100%);
}
.footer .wrap { color: var(--bg); }
.footer a { color: var(--bg); opacity: .75; }
.footer a:hover { opacity: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid #2a2a2d;
}
.footer-col h5 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a8a8e;
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 12px;
  color: #8a8a8e;
  font-family: var(--f-mono);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1), filter .8s cubic-bezier(.2,.7,.2,1);
  filter: blur(4px);
}
.reveal.in { opacity: 1; transform: none; filter: blur(0); }

/* Variants */
.reveal-left  { transform: translateX(-40px); }
.reveal-left.in  { transform: none; }
.reveal-right { transform: translateX(40px); }
.reveal-right.in { transform: none; }
.reveal-scale { transform: scale(.92); }
.reveal-scale.in { transform: none; }

/* Stagger: parent opt-in, children animate in sequence */
.stagger > .reveal { transition-delay: 0ms; }
.stagger.in > .reveal:nth-child(1)  { transition-delay: 40ms; }
.stagger.in > .reveal:nth-child(2)  { transition-delay: 120ms; }
.stagger.in > .reveal:nth-child(3)  { transition-delay: 200ms; }
.stagger.in > .reveal:nth-child(4)  { transition-delay: 280ms; }
.stagger.in > .reveal:nth-child(5)  { transition-delay: 360ms; }
.stagger.in > .reveal:nth-child(6)  { transition-delay: 440ms; }
.stagger.in > .reveal:nth-child(7)  { transition-delay: 520ms; }
.stagger.in > .reveal:nth-child(8)  { transition-delay: 600ms; }

/* Count-up numbers */
.count-up { display: inline-block; font-variant-numeric: tabular-nums; }

/* Shimmer for loading / section headers */
@keyframes shimmer {
  0%   { background-position: -220px 0; }
  100% { background-position: 520px 0; }
}
.shimmer {
  position: relative;
  background: linear-gradient(90deg,
    rgba(0,0,0,0) 0%,
    rgba(221,156,107,.18) 40%,
    rgba(221,156,107,.05) 60%,
    rgba(0,0,0,0) 100%);
  background-size: 740px 100%;
  animation: shimmer 2.4s linear infinite;
}

/* Floating idle nudge for key CTAs */
@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-3px); }
}
.float-idle { animation: floaty 3s ease-in-out infinite; }

/* Underline draw-in on section titles */
.eyebrow.reveal::after {
  content: '';
  display: block;
  height: 2px;
  margin-top: 8px;
  width: 0;
  background: var(--accent);
  transition: width .8s cubic-bezier(.2,.7,.2,1) .15s;
}
.eyebrow.reveal.in::after { width: 32px; }

/* Marquee-style client logos smooth loop */
@keyframes marq {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track { animation: marq 38s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }

/* Card hover lift (used by cards + grid tiles) */
.lift { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .25s; }
.lift:hover { transform: translateY(-4px); box-shadow: 0 24px 48px rgba(0,35,76,.08); }

/* Progressive image blur-up */
.img-load {
  filter: blur(10px);
  transition: filter .6s ease, transform .6s ease;
  transform: scale(1.04);
}
.img-load.loaded { filter: blur(0); transform: none; }

/* ---------- Sticky mid-scroll prompt ---------- */
.prompt-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 14px 12px 20px;
  border-radius: 999px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
  z-index: 40;
  font-size: 14px;
  max-width: calc(100vw - 40px);
}
.prompt-bar.show { transform: translateX(-50%) translateY(0); }
.prompt-bar .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(221,156,107,.7); }
  70% { box-shadow: 0 0 0 10px rgba(221,156,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(221,156,107,0); }
}
.prompt-bar button.close {
  color: var(--bg); opacity: .6; padding: 0 6px;
}
.prompt-bar button.close:hover { opacity: 1; }

/* ---------- Hairline ---------- */
.hr { height: 1px; background: var(--line); border: 0; }

/* ---------- Utility ---------- */
.flex { display: flex; }
.grid { display: grid; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-muted { color: var(--muted); }
.text-ink2 { color: var(--ink-2); }
.mt-2{margin-top:8px}.mt-4{margin-top:16px}.mt-6{margin-top:24px}.mt-8{margin-top:32px}.mt-12{margin-top:48px}.mt-16{margin-top:64px}
.mb-2{margin-bottom:8px}.mb-4{margin-bottom:16px}.mb-6{margin-bottom:24px}.mb-8{margin-bottom:32px}.mb-12{margin-bottom:48px}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-family: var(--f-mono);
  color: var(--ink-2);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- Forms ---------- */
.field {
  display: flex; flex-direction: column; gap: 8px;
}
.field label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea, .field select {
  font-family: var(--f-sans);
  font-size: 16px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 4px rgba(221,156,107,.2);
}
.field textarea { resize: vertical; min-height: 120px; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink-2);
  transition: all .15s;
  display: inline-flex; align-items: center; gap: 8px;
  user-select: none;
}
.chip:hover { border-color: var(--ink); }
.chip.active {
  background: var(--brand-navy);
  color: var(--bg);
  border-color: var(--brand-navy);
}
.chip.active .chip-check {
  background: var(--accent);
}
.chip-check {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid currentColor;
  display: inline-grid; place-items: center;
  transition: all .15s;
}

/* Screen transitions */
.page {
  animation: pageFadeIn .3s ease both;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 280px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 14px;
  padding: 16px;
  z-index: 100;
  font-size: 13px;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  display: none;
}
.tweaks-panel.show { display: block; }
.tweaks-panel h6 {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: #8a8a8e; font-weight: 500;
  margin-bottom: 10px;
}
.tweaks-panel .opt {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  color: #c7c7ca; font-size: 13px;
}
.tweaks-panel .opt:hover { background: #1e1e21; color: var(--bg); }
.tweaks-panel .opt.active { background: var(--accent); color: var(--ink); font-weight: 500; }
.tweaks-panel .opt .k { font-family: var(--f-mono); font-size: 10px; opacity: .6; }

/* Hero canvas */
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- WhatsApp floating chat ---------- */
.wa-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px -8px rgba(37,211,102,0.55), 0 4px 10px rgba(0,0,0,0.12);
  z-index: 90;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.wa-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 16px 32px -8px rgba(37,211,102,0.65), 0 6px 14px rgba(0,0,0,0.15); }
.wa-fab:active { transform: translateY(0) scale(1); }
.wa-fab-active { background: var(--ink); box-shadow: 0 8px 20px -6px rgba(10,22,40,0.4); }
.wa-fab-active:hover { background: var(--ink); box-shadow: 0 12px 24px -6px rgba(10,22,40,0.5); }
.wa-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  opacity: .35;
  animation: waPulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes waPulse {
  0% { transform: scale(1); opacity: .35; }
  100% { transform: scale(1.7); opacity: 0; }
}

.wa-card {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 320px;
  max-width: calc(100vw - 48px);
  background: var(--bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 48px -16px rgba(10,22,40,0.30), 0 8px 20px -8px rgba(10,22,40,0.18);
  z-index: 91;
  animation: waCardIn .25s cubic-bezier(.2,.8,.2,1) both;
  display: flex;
  flex-direction: column;
}
@keyframes waCardIn {
  from { opacity: 0; transform: translateY(12px) scale(.96); transform-origin: bottom right; }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.wa-card-head {
  background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wa-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.wa-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s;
}
.wa-close:hover { background: rgba(255,255,255,.25); }
.wa-card-body {
  background:
    radial-gradient(circle at 30% 20%, rgba(34,211,238,.04), transparent 40%),
    #ECE5DD;
  padding: 24px 16px 16px;
  min-height: 120px;
}
.wa-bubble {
  background: #fff;
  border-radius: 12px;
  border-top-left-radius: 2px;
  padding: 12px 14px;
  max-width: 90%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.wa-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  text-decoration: none;
  padding: 14px;
  font-weight: 600;
  font-size: 14px;
  transition: background .15s;
}
.wa-cta:hover { background: #1ebe57; color: #fff; }

@media (max-width: 480px) {
  .wa-fab { bottom: 18px; right: 18px; width: 54px; height: 54px; }
  .wa-card { right: 12px; bottom: 86px; width: calc(100vw - 24px); }
}


/* ===========================
   AUTH , split-screen shell
   =========================== */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #0b0b0d;
  color: #fff;
}
@media (max-width: 960px) { .auth-shell { grid-template-columns: 1fr; } .auth-brand-col { display: none; } }

.auth-form-col {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 32px;
  background: linear-gradient(180deg, #0f0f12 0%, #0b0b0d 100%);
  position: relative;
  overflow-y: auto;
}
.auth-form-col::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(221,156,107,0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(221,156,107,0.05) 0%, transparent 40%);
  pointer-events: none;
}
.auth-form-inner {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 1;
  padding: 40px 0;
}
.auth-brand {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.auth-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.auth-footer { padding-top: 20px; border-top: 1px solid rgba(255,255,255,.06); }

/* Brand column */
.auth-brand-col {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 30%, #1a1a1e 0%, #060608 100%);
  border-left: 1px solid rgba(255,255,255,.05);
}
.auth-brand-content {
  position: absolute; inset: 0;
  padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  z-index: 2;
}
.auth-quote {
  font-size: clamp(32px, 3.5vw, 52px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
  text-wrap: balance;
  margin-top: 48px;
}
.auth-meta {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  backdrop-filter: blur(8px);
}
.auth-meta-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }

/* Form bits */
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-field { display: flex; flex-direction: column; gap: 8px; }
.auth-label {
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.55); font-weight: 500;
}
.auth-input {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 14px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  transition: border-color .15s, background .15s, box-shadow .15s;
  outline: none;
}
select.auth-input { appearance: none; -webkit-appearance: none; background-color: #1a1a1e; cursor: pointer; }
.auth-input::placeholder { color: rgba(255,255,255,.3); }
.auth-input:focus {
  border-color: var(--brand-gold);
  background: rgba(221,156,107,.04);
  box-shadow: 0 0 0 3px rgba(221,156,107,.12);
}
.auth-input-suffix {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em;
  color: rgba(255,255,255,.5); background: none; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: 4px;
}
.auth-input-suffix:hover { color: #fff; background: rgba(255,255,255,.06); }

.auth-hint { font-size: 12px; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.auth-hint.warn { color: #e8a268; }
.auth-hint.ok { color: #7fc58e; }

.auth-link { color: var(--brand-gold); cursor: pointer; }
.auth-link:hover { text-decoration: underline; }
.auth-link-inline { color: var(--brand-gold); cursor: pointer; font-size: 12px; font-family: var(--f-mono); }
.auth-link-muted { color: rgba(255,255,255,.4); cursor: pointer; }
.auth-link-muted:hover { color: #fff; }

.auth-alert {
  border-radius: 10px; padding: 12px 14px; font-size: 13px;
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid;
}
.auth-alert.error {
  background: rgba(192,90,46,.1);
  border-color: rgba(192,90,46,.35);
  color: #f5c7a8;
}
.auth-alert strong { color: #fff; font-weight: 500; }

.auth-remember { padding-top: 4px; }
.auth-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: rgba(255,255,255,.75); }
.auth-check input { position: absolute; opacity: 0; pointer-events: none; }
.auth-check-box {
  width: 18px; height: 18px; border: 1px solid rgba(255,255,255,.25); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
  color: transparent;
}
.auth-check input:checked ~ .auth-check-box { background: var(--brand-gold); border-color: var(--brand-gold); color: #0b0b0d; }

.auth-submit {
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 15px; font-weight: 500;
  background: var(--brand-gold);
  color: #0b0b0d;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid transparent;
  transition: background .15s, transform .1s, opacity .15s;
}
.auth-submit:hover:not(:disabled) { background: #e8a871; }
.auth-submit:active:not(:disabled) { transform: scale(.99); }
.auth-submit:disabled { opacity: .45; cursor: not-allowed; }
.auth-submit.ghost {
  background: transparent; color: #fff;
  border-color: rgba(255,255,255,.18);
}
.auth-submit.ghost:hover:not(:disabled) { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.3); }

.auth-divider {
  position: relative; text-align: center; margin: 4px 0;
  font-family: var(--f-mono); font-size: 11px; color: rgba(255,255,255,.4); letter-spacing: .08em;
}
.auth-divider::before, .auth-divider::after {
  content: ""; position: absolute; top: 50%; width: 42%; height: 1px; background: rgba(255,255,255,.1);
}
.auth-divider::before { left: 0; } .auth-divider::after { right: 0; }
.auth-divider span { background: #0b0b0d; padding: 0 10px; position: relative; }

/* Workspace picker */
.auth-workspace {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: border-color .15s;
}
.auth-workspace:hover { border-color: rgba(255,255,255,.25); }
.auth-workspace-badge {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-gold), #8a5b2e);
  color: #0b0b0d;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .02em;
  flex-shrink: 0;
}
.auth-workspace-badge.sm { width: 26px; height: 26px; font-size: 10px; border-radius: 6px; }
.auth-workspace-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 10;
  background: #15151a; border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; padding: 4px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
}
.auth-workspace-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 6px; cursor: pointer;
  color: rgba(255,255,255,.75);
}
.auth-workspace-item:hover { background: rgba(255,255,255,.05); }
.auth-workspace-item.active { background: rgba(221,156,107,.08); color: #fff; }

/* Success state */
.auth-success { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 0; }
.auth-success-ring {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(221,156,107,.12);
  border: 1px solid rgba(221,156,107,.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-gold);
  animation: pop .4s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.auth-mailbox { margin-top: 10px; animation: pop .4s both; }
.auth-help {
  margin-top: 28px; padding: 16px; width: 100%;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(255,255,255,.02);
  font-size: 13px; color: rgba(255,255,255,.65);
  text-align: left;
}
.auth-help strong { color: #fff; font-weight: 500; }
.auth-help ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.auth-help li { padding-left: 16px; position: relative; }
.auth-help li::before { content: "·"; position: absolute; left: 4px; color: var(--brand-gold); }
.auth-help code, .auth-code {
  font-family: var(--f-mono); font-size: 11px;
  background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 4px;
  color: var(--brand-gold);
}

/* Strength meter */
.auth-strength { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.auth-strength-bar { display: flex; gap: 3px; flex: 1; }
.auth-strength-bar .seg {
  height: 3px; flex: 1; background: rgba(255,255,255,.08); border-radius: 2px;
  transition: background .2s;
}
.auth-strength-bar .seg.fill-1, .auth-strength-bar .seg.fill-2 { background: #c05a2e; }
.auth-strength-bar .seg.fill-3 { background: #dda658; }
.auth-strength-bar .seg.fill-4, .auth-strength-bar .seg.fill-5 { background: #7fc58e; }

/* OTP */
.auth-otp { display: flex; gap: 10px; }
.auth-otp-input {
  width: 54px; height: 62px;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 24px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  color: #fff;
  outline: none;
  transition: border-color .15s, background .15s;
}
.auth-otp-input:focus { border-color: var(--brand-gold); background: rgba(221,156,107,.05); box-shadow: 0 0 0 3px rgba(221,156,107,.1); }
.auth-otp-input.error { border-color: #c05a2e; background: rgba(192,90,46,.08); animation: shake .4s; }
@keyframes shake { 0%,100% {transform:translateX(0);} 25% {transform:translateX(-4px);} 75% {transform:translateX(4px);} }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-gold); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(221,156,107,.6); } 70% { box-shadow: 0 0 0 8px rgba(221,156,107,0); } }

/* Spinner */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(0,0,0,.2);
  border-top-color: #0b0b0d;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================
   PORTAL , dashboard shell
   =========================== */
.portal {
  --portal-bg: #0b0b0d;
  --portal-bg-elevated: rgba(255,255,255,.015);
  --portal-bg-soft: rgba(255,255,255,.03);
  --portal-bg-strong: rgba(255,255,255,.05);
  --portal-sidebar-bg: #08080a;
  --portal-topbar-bg: rgba(11,11,13,.8);
  --portal-border: rgba(255,255,255,.06);
  --portal-border-strong: rgba(255,255,255,.12);
  --portal-border-soft: rgba(255,255,255,.04);
  --portal-text: #fff;
  --portal-text-soft: rgba(255,255,255,.75);
  --portal-text-muted: rgba(255,255,255,.55);
  --portal-text-faint: rgba(255,255,255,.4);
  --portal-hover: rgba(255,255,255,.04);
  --portal-hover-strong: rgba(255,255,255,.08);
  --portal-pill-bg: rgba(255,255,255,.04);
  --portal-pill-text: rgba(255,255,255,.65);
  --portal-input-bg: rgba(255,255,255,.04);
  --portal-input-border: rgba(255,255,255,.08);
  --portal-table-head-bg: rgba(255,255,255,.03);
  --portal-badge-border: #0b0b0d;
  --portal-shadow: 0 30px 80px rgba(0,0,0,.6);
  --portal-scrim: rgba(0,0,0,.6);
  --portal-avatar-ink: #0b0b0d;
  --portal-neutral-chip-bg: rgba(255,255,255,.06);
  --portal-neutral-chip-text: rgba(255,255,255,.6);
  --portal-chip-success-bg: rgba(127,197,142,.16);
  --portal-chip-success-text: #b7e8c2;
  --portal-chip-warn-bg: rgba(221,156,107,.16);
  --portal-chip-warn-text: #f1c39e;
  --portal-chip-danger-bg: rgba(192,90,46,.18);
  --portal-chip-danger-text: #f0b48e;
  --portal-chip-info-bg: rgba(100,140,220,.18);
  --portal-chip-info-text: #aecaef;
  --portal-chip-review-bg: rgba(160,120,200,.18);
  --portal-chip-review-text: #d2b9e8;
  --portal-thread-active: rgba(221,156,107,.06);
  --portal-danger: #f87171;
  --portal-danger-border: rgba(248,113,113,.3);
  min-height: 100vh;
  background: var(--portal-bg);
  color: var(--portal-text);
  font-family: var(--f-sans);
}
.portal[data-theme="light"] {
  --portal-bg: #f6f1e8;
  --portal-bg-elevated: rgba(255,250,244,.82);
  --portal-bg-soft: rgba(10,22,40,.04);
  --portal-bg-strong: rgba(10,22,40,.07);
  --portal-sidebar-bg: #fcf8f1;
  --portal-topbar-bg: rgba(252,248,241,.9);
  --portal-border: rgba(10,22,40,.14);
  --portal-border-strong: rgba(10,22,40,.22);
  --portal-border-soft: rgba(10,22,40,.11);
  --portal-text: #0f223a;
  --portal-text-soft: rgba(15,34,58,.88);
  --portal-text-muted: rgba(15,34,58,.74);
  --portal-text-faint: rgba(15,34,58,.62);
  --portal-hover: rgba(10,22,40,.065);
  --portal-hover-strong: rgba(10,22,40,.12);
  --portal-pill-bg: rgba(10,22,40,.07);
  --portal-pill-text: rgba(15,34,58,.8);
  --portal-input-bg: rgba(255,255,255,.75);
  --portal-input-border: rgba(10,22,40,.16);
  --portal-table-head-bg: rgba(10,22,40,.07);
  --portal-nav-text: rgba(15,34,58,.82);
  --portal-badge-border: #fcf8f1;
  --portal-shadow: 0 30px 80px rgba(10,22,40,.18);
  --portal-scrim: rgba(7,14,28,.22);
  --portal-avatar-ink: #0b0b0d;
  --portal-neutral-chip-bg: rgba(10,22,40,.10);
  --portal-neutral-chip-text: rgba(15,34,58,.74);
  --portal-chip-success-bg: rgba(84,146,96,.18);
  --portal-chip-success-text: #275b35;
  --portal-chip-warn-bg: rgba(221,156,107,.24);
  --portal-chip-warn-text: #7a4c22;
  --portal-chip-danger-bg: rgba(192,90,46,.22);
  --portal-chip-danger-text: #7c3212;
  --portal-chip-info-bg: rgba(59,130,246,.18);
  --portal-chip-info-text: #234f93;
  --portal-chip-review-bg: rgba(127,86,217,.18);
  --portal-chip-review-text: #5f3b9b;
  --portal-thread-active: rgba(221,156,107,.12);
}
.portal-side {
  --portal-nav-text: var(--portal-text-muted);
  width: 240px;
  background: var(--portal-sidebar-bg);
  border-right: 1px solid var(--portal-border);
  display: flex; flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  transition: all .2s ease;
  overflow: hidden;
  z-index: 20;
}
.portal-side.collapsed { width: 64px; }
.portal-side-top { padding: 16px; border-bottom: 1px solid var(--portal-border); }
.portal-workspace {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 8px;
  background: var(--portal-bg-soft);
}
.portal-workspace-badge {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-gold), #8a5b2e);
  color: #0b0b0d;
  font-family: var(--f-mono); font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.portal-nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.portal-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--portal-nav-text);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: background .12s, color .12s;
}
.portal-nav-item:hover { background: var(--portal-hover); color: var(--portal-text); }
.portal-nav-item.active { background: rgba(221,156,107,.1); color: var(--brand-gold); }
.portal-nav-ico { display: inline-flex; }
.portal-nav-badge {
  font-family: var(--f-mono); font-size: 10px;
  background: var(--portal-bg-strong); color: var(--portal-text-soft);
  padding: 2px 6px; border-radius: 10px; min-width: 20px; text-align: center;
}
.portal-nav-item.active .portal-nav-badge { background: rgba(221,156,107,.2); color: var(--brand-gold); }

.portal-side-bot {
  flex: 0 0 auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--portal-border);
}
.portal-side-mini { align-self: flex-start; color: var(--portal-text-muted); padding: 6px; border-radius: 6px; }
.portal-side-mini:hover { background: var(--portal-hover); color: var(--portal-text); }
.portal-help-card {
  padding: 14px;
  border: 1px solid rgba(221,156,107,.25);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(221,156,107,.05), transparent);
}
.portal-help-btn {
  margin-top: 10px; width: 100%;
  padding: 8px; border-radius: 6px;
  background: var(--brand-gold); color: #0b0b0d;
  font-size: 12px; font-weight: 500;
}

@media (max-height: 860px) {
  .portal-side-top { padding: 14px; }
  .portal-nav { padding: 10px 8px; }
  .portal-nav-item { padding: 8px 10px; font-size: 13px; }
  .portal-side-bot { padding: 10px; gap: 8px; }
  .portal-help-card { padding: 12px; }
  .portal-help-btn { margin-top: 8px; padding: 7px; }
}

@media (max-height: 760px) {
  .portal-side-top { padding: 12px; }
  .portal-workspace { padding: 7px; }
  .portal-workspace-badge { width: 28px; height: 28px; }
  .portal-nav { padding: 8px 8px; gap: 1px; }
  .portal-nav-item { padding: 7px 10px; font-size: 12.5px; }
  .portal-side-bot { padding: 8px; gap: 6px; }
  .portal-help-card { padding: 10px; }
  .portal-help-card .mono.small { font-size: 10px; }
  .portal-help-card > div:last-of-type { font-size: 11px !important; margin-top: 4px !important; }
  .portal-help-btn { margin-top: 6px; padding: 6px 8px; font-size: 11px; }
}

/* Main */
.portal-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  margin-left: 240px;
}
.portal-side.collapsed + .portal-main { margin-left: 64px; }
.portal-top {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--portal-border);
  background: var(--portal-topbar-bg);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.portal-search-btn {
  display: flex; align-items: center; gap: 10px;
  flex: 1; max-width: 480px;
  padding: 9px 14px;
  background: var(--portal-input-bg);
  border: 1px solid var(--portal-input-border);
  border-radius: 8px;
  color: var(--portal-text-muted);
  font-size: 13px; text-align: left;
}
.portal-search-btn:hover { border-color: var(--portal-border-strong); }
.portal-top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.portal-icon-btn {
  position: relative; padding: 9px; border-radius: 8px;
  color: var(--portal-text-soft);
}
.portal-icon-btn:hover { background: var(--portal-hover); color: var(--portal-text); }
.portal-theme-btn[aria-pressed="true"] { background: rgba(221,156,107,.1); color: var(--brand-gold); }
.portal-badge-dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-gold); border: 1.5px solid var(--portal-badge-border);
}
.portal-user {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 5px; border-radius: 999px;
  background: var(--portal-bg-soft);
}
.portal-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 11px; font-weight: 600;
  color: var(--portal-avatar-ink);
}

.portal-content { padding: 32px; max-width: 1400px; width: 100%; }

/* Page head */
.portal-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.portal-h1 { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; color: var(--portal-text); margin-top: 4px; }
.portal-sub { color: var(--portal-text-muted); font-size: 14px; margin-top: 6px; }
.portal-backlink {
  display: inline-block; margin-bottom: 12px;
  font-family: var(--f-mono); font-size: 12px;
  color: var(--portal-text-muted); cursor: pointer;
}
.portal-backlink:hover { color: var(--brand-gold); }

/* Buttons */
.portal-btn {
  padding: 9px 16px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .15s, border-color .15s, color .15s;
  border: 1px solid transparent;
}
.portal-btn.primary { background: var(--brand-gold); color: #0b0b0d; }
.portal-btn.primary:hover { background: #e8a871; }
.portal-btn.ghost { background: transparent; color: var(--portal-text-soft); border-color: var(--portal-border-strong); }
.portal-btn.ghost:hover { border-color: color-mix(in srgb, var(--portal-border-strong) 85%, var(--brand-gold)); color: var(--portal-text); background: var(--portal-hover); }

/* Stats grid */
.portal-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
@media (max-width: 900px) { .portal-stats { grid-template-columns: repeat(2, 1fr); } }
.portal-stat {
  padding: 18px;
  border: 1px solid var(--portal-input-border);
  border-radius: 12px;
  background: var(--portal-bg-soft);
  transition: border-color .15s;
}
.portal-stat:hover { border-color: var(--portal-border-strong); }
.portal-stat.accent { border-color: rgba(221,156,107,.25); background: linear-gradient(180deg, rgba(221,156,107,.08), var(--portal-bg-soft)); }
.portal-stat-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--portal-text-muted); }
.portal-stat-val { font-size: 28px; font-weight: 500; color: var(--portal-text); margin-top: 8px; letter-spacing: -0.02em; }
.portal-stat-delta { font-family: var(--f-mono); font-size: 11px; color: var(--portal-text-muted); margin-top: 4px; }

/* Grid 2-col */
.portal-grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 1100px) { .portal-grid-2 { grid-template-columns: 1fr; } }

/* Card */
.portal-card {
  padding: 20px;
  border: 1px solid var(--portal-input-border);
  border-radius: 14px;
  background: var(--portal-bg-elevated);
}
.portal-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.portal-card-head h3 { font-size: 15px; font-weight: 500; color: var(--portal-text); }
.portal-link { color: var(--brand-gold); font-size: 12px; cursor: pointer; font-family: var(--f-mono); }

/* Project rows */
.portal-proj-list { display: flex; flex-direction: column; }
.portal-proj-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px; border-radius: 8px; cursor: pointer;
  border-bottom: 1px solid var(--portal-border-soft);
}
.portal-proj-row:last-child { border-bottom: none; }
.portal-proj-row:hover { background: var(--portal-hover); }
.portal-proj-avatar {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, #2a4b82, #1a2f54);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 13px; font-weight: 600;
}
.portal-proj-meter { display: flex; align-items: center; gap: 10px; min-width: 110px; }
.portal-proj-bar {
  flex: 1; height: 4px; background: var(--portal-bg-strong); border-radius: 2px; overflow: hidden; min-width: 60px;
}
.portal-proj-bar span { display: block; height: 100%; background: var(--brand-gold); transition: width .4s; }

/* Chip */
.portal-chip {
  font-family: var(--f-mono); font-size: 11px; padding: 3px 8px; border-radius: 999px;
  letter-spacing: .02em; white-space: nowrap; text-transform: capitalize;
}
.portal-chip.small { font-size: 10px; padding: 2px 6px; }
.portal-chip.on-track, .portal-chip.sent { background: var(--portal-chip-success-bg); color: var(--portal-chip-success-text); }
.portal-chip.at-risk { background: var(--portal-chip-warn-bg); color: var(--portal-chip-warn-text); }
.portal-chip.blocked, .portal-chip.overdue { background: var(--portal-chip-danger-bg); color: var(--portal-chip-danger-text); }
.portal-chip.done, .portal-chip.paid { background: var(--portal-neutral-chip-bg); color: var(--portal-neutral-chip-text); }
.portal-chip.kickoff { background: var(--portal-chip-info-bg); color: var(--portal-chip-info-text); }
.portal-chip.demo { background: var(--portal-chip-warn-bg); color: var(--portal-chip-warn-text); }
.portal-chip.review { background: var(--portal-chip-review-bg); color: var(--portal-chip-review-text); }
.portal-chip.deadline { background: var(--portal-chip-danger-bg); color: var(--portal-chip-danger-text); }

/* Feed */
.portal-feed { display: flex; flex-direction: column; }
.portal-feed-row {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--portal-border-soft);
}
.portal-feed-row:last-child { border-bottom: none; }
.portal-feed-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--portal-border-strong); margin-top: 7px; flex-shrink: 0;
}
.portal-feed-dot.ship { background: #7fc58e; }
.portal-feed-dot.comment { background: #8fb4e8; }
.portal-feed-dot.approve { background: var(--brand-gold); }
.portal-feed-dot.pr { background: #c4a6d9; }
.portal-feed-dot.system { background: var(--portal-border-strong); }

/* Week bars */
.portal-week { display: flex; gap: 14px; align-items: flex-end; padding: 10px 4px; height: 180px; }
.portal-week-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.portal-week-bar {
  flex: 1; width: 100%; display: flex; align-items: flex-end;
  background: var(--portal-bg-soft); border-radius: 6px; overflow: hidden;
  min-height: 20px;
}
.portal-week-bar span { display: block; width: 100%; border-radius: 6px 6px 0 0; min-height: 2px; transition: height .5s; }

/* Upcoming */
.portal-upcoming { display: flex; flex-direction: column; }
.portal-upcoming-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--portal-border-soft);
}
.portal-upcoming-row:last-child { border-bottom: none; }
.portal-upcoming-d {
  font-family: var(--f-mono); font-size: 12px;
  color: var(--portal-text-soft);
  width: 50px;
}

/* Filters */
.portal-filters { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.portal-pill {
  padding: 7px 13px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em;
  background: var(--portal-pill-bg); color: var(--portal-pill-text);
  border: 1px solid transparent;
}
.portal-pill.active { background: rgba(221,156,107,.12); color: var(--brand-gold); border-color: rgba(221,156,107,.25); }
.portal-pill:hover:not(.active) { background: var(--portal-hover-strong); color: var(--portal-text); }

/* Table */
.portal-table {
  border: 1px solid var(--portal-input-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--portal-bg-elevated);
}
.portal-thead, .portal-trow {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr 1.3fr 1fr;
  gap: 16px; align-items: center;
  padding: 14px 18px;
}
.portal-thead.inv, .portal-trow.inv {
  grid-template-columns: 1fr 1.4fr 1fr 1fr 1fr 1fr;
}
.portal-thead {
  background: var(--portal-table-head-bg);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--portal-text-muted);
  border-bottom: 1px solid var(--portal-border);
}
.portal-trow { border-bottom: 1px solid var(--portal-border-soft); cursor: pointer; transition: background .1s; }
.portal-trow:hover { background: var(--portal-hover); }
.portal-trow:last-child { border-bottom: none; }

.portal-pod-stack { display: flex; }
.portal-pod-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #8a5b2e, #5a3a1e);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 10px; font-weight: 600;
  border: 2px solid var(--portal-badge-border);
  margin-left: -8px;
}
.portal-pod-avatar:first-child { margin-left: 0; }
.portal-pod-avatar.lg { width: 36px; height: 36px; font-size: 12px; margin-left: -10px; }

/* Project hero */
.portal-proj-hero {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding: 24px; margin-bottom: 20px;
  border: 1px solid var(--portal-input-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(221,156,107,.04), transparent);
}
@media (max-width: 900px) { .portal-proj-hero { grid-template-columns: repeat(2, 1fr); } }

/* Tabs */
.portal-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--portal-input-border); margin-bottom: 24px; }
.portal-tab {
  padding: 10px 16px; font-size: 13px; font-weight: 500;
  color: var(--portal-text-muted);
  border-bottom: 2px solid transparent;
  transition: all .15s;
}
.portal-tab:hover { color: var(--portal-text); }
.portal-tab.active { color: var(--brand-gold); border-bottom-color: var(--brand-gold); }

/* Timeline */
.portal-timeline { display: flex; flex-direction: column; position: relative; }
.portal-timeline::before {
  content: ""; position: absolute; left: 78px; top: 14px; bottom: 14px;
  width: 1px; background: var(--portal-input-border);
}
.portal-tl-row { display: grid; grid-template-columns: 70px 16px 1fr; gap: 12px; padding: 8px 0; align-items: flex-start; position: relative; }
.portal-tl-date { color: var(--portal-text-muted); font-size: 12px; padding-top: 14px; }
.portal-tl-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--portal-border-strong);
  margin-top: 16px; margin-left: 3px;
  position: relative; z-index: 1;
}
.portal-tl-row.done .portal-tl-dot { background: #7fc58e; }
.portal-tl-row.active .portal-tl-dot {
  background: var(--brand-gold);
  box-shadow: 0 0 0 4px rgba(221,156,107,.2);
  animation: pulse 1.6s infinite;
}
.portal-tl-card {
  padding: 12px 16px;
  border: 1px solid var(--portal-border);
  border-radius: 10px;
  background: var(--portal-bg-soft);
}
.portal-tl-row.active .portal-tl-card { border-color: rgba(221,156,107,.25); background: rgba(221,156,107,.04); }

/* Milestones */
.portal-milestones { display: flex; flex-direction: column; gap: 8px; }
.portal-mstone {
  display: grid; grid-template-columns: 40px 1fr auto auto; gap: 16px; align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--portal-border);
  border-radius: 10px;
  background: var(--portal-bg-elevated);
}

/* Files */
.portal-files { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 900px) { .portal-files { grid-template-columns: 1fr; } }
.portal-file {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border: 1px solid var(--portal-border);
  border-radius: 10px;
  background: var(--portal-bg-soft);
  cursor: pointer; transition: border-color .15s;
}
.portal-file:hover { border-color: rgba(221,156,107,.25); }
.portal-file-ico {
  width: 38px; height: 38px; border-radius: 8px;
  background: rgba(221,156,107,.1); color: var(--brand-gold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Team */
.portal-team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.portal-team-card {
  padding: 20px;
  border: 1px solid var(--portal-input-border);
  border-radius: 12px;
  background: var(--portal-bg-soft);
  text-align: center;
}
.portal-team-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 14px; font-weight: 600;
  color: #fff;
}
.portal-team-avatar.lg { width: 56px; height: 56px; font-size: 16px; }

.portal-team-list { display: flex; flex-direction: column; gap: 8px; }
.portal-team-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--portal-border);
  border-radius: 12px;
  background: var(--portal-bg-elevated);
}
.portal-skill {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .02em;
  padding: 3px 8px; border-radius: 999px;
  background: var(--portal-bg-strong);
  color: var(--portal-text-soft);
}

/* Messages */
.portal-msg { display: grid; grid-template-columns: 320px 1fr; gap: 16px; height: 620px; }
@media (max-width: 900px) { .portal-msg { grid-template-columns: 1fr; height: auto; } }
.portal-msg-list {
  border: 1px solid var(--portal-input-border); border-radius: 12px;
  background: var(--portal-bg-elevated);
  overflow-y: auto;
}
.portal-msg-thread {
  display: flex; gap: 10px; padding: 14px;
  border-bottom: 1px solid var(--portal-border-soft);
  cursor: pointer; transition: background .1s;
}
.portal-msg-thread:hover { background: var(--portal-hover); }
.portal-msg-thread.active { background: var(--portal-thread-active); border-left: 2px solid var(--brand-gold); }
.portal-msg-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 11px; font-weight: 600;
  color: #fff; flex-shrink: 0;
}
.portal-msg-avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.portal-msg-unread {
  background: var(--brand-gold); color: #0b0b0d;
  font-family: var(--f-mono); font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 10px; align-self: flex-start;
  margin-top: 4px;
}
.portal-msg-pane {
  display: flex; flex-direction: column;
  border: 1px solid var(--portal-input-border); border-radius: 12px;
  background: var(--portal-bg-elevated);
  overflow: hidden;
}
.portal-msg-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--portal-border);
}
.portal-msg-body { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.portal-msg-row { display: flex; gap: 10px; max-width: 75%; }
.portal-msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
.portal-msg-bubble {
  padding: 10px 14px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.5;
  background: var(--portal-bg-strong); color: var(--portal-text);
}
.portal-msg-bubble.me { background: var(--brand-gold); color: #0b0b0d; }
.portal-msg-composer {
  display: flex; gap: 8px; padding: 14px;
  border-top: 1px solid var(--portal-border);
}
.portal-msg-input {
  flex: 1; background: var(--portal-input-bg);
  border: 1px solid var(--portal-input-border); border-radius: 8px;
  padding: 10px 14px; color: var(--portal-text); font-family: inherit; font-size: 13.5px;
  outline: none;
}
.portal-msg-input::placeholder { color: var(--portal-text-faint); }
.portal-msg-input:focus { border-color: var(--brand-gold); }

/* Command palette */
.portal-cmd-wrap {
  position: fixed; inset: 0; z-index: 100;
  background: var(--portal-scrim); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  animation: fadeIn .15s;
}
.portal-cmd {
  width: 600px; max-width: 92vw;
  background: var(--portal-bg);
  border: 1px solid var(--portal-border-strong);
  border-radius: 12px;
  box-shadow: var(--portal-shadow);
}
.portal-cmd-input {
  width: 100%; background: none; border: none; outline: none;
  color: var(--portal-text); font-size: 15px; padding: 16px 20px;
  border-bottom: 1px solid var(--portal-border);
}
.portal-cmd-input::placeholder { color: var(--portal-text-faint); }
.portal-cmd-list { max-height: 300px; overflow-y: auto; padding: 6px; }
.portal-cmd-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-radius: 6px; cursor: pointer;
  color: var(--portal-text); font-size: 13.5px;
}
.portal-cmd-item:hover { background: rgba(221,156,107,.08); }
.portal-cmd-empty { padding: 20px; text-align: center; color: var(--portal-text-faint); font-size: 13px; }
.portal-cmd-foot {
  display: flex; gap: 16px; padding: 10px 20px;
  border-top: 1px solid var(--portal-border);
  color: var(--portal-text-faint); font-size: 11px;
}


/* =========================================================
   Dynamic pages , article, case detail, service detail,
   legal, search
   ========================================================= */

.article-body h2 { font-family: var(--f-sans); font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
.article-body p { }

/* ---------- Insight (article) detail page ---------- */
.article-page { background: var(--bg); }

.article-progress {
  position: sticky;
  top: 64px;
  z-index: 30;
  height: 3px;
  background: rgba(11,26,58,0.06);
  margin-top: 0;
}
.article-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-navy), var(--brand-gold));
  transition: width 80ms linear;
}

.article-hero {
  padding: 56px 0 64px;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.article-back {
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .18s ease;
}
.article-back:hover { color: var(--brand-navy); }

.article-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
  margin-top: 24px;
}
@media (max-width: 960px) {
  .article-hero-grid { grid-template-columns: 1fr; gap: 32px; }
}

.article-meta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.article-meta-row .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--muted); opacity: 0.5;
}
.article-cat {
  font-family: var(--f-mono);
  font-size: 12px;
  background: var(--accent-wash);
  color: var(--accent-ink);
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.article-title {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-top: 20px;
  text-wrap: balance;
}
.article-dek {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-top: 18px;
  max-width: 620px;
  text-wrap: pretty;
}

.article-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.article-hero-tag {
  font-family: var(--f-mono);
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  background: #fff;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.article-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-gold));
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}
.article-avatar.lg { width: 64px; height: 64px; font-size: 16px; }
.article-author-name { font-weight: 500; font-size: 15px; color: var(--ink); }
.article-share { margin-left: auto; }
.article-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s ease;
}
.article-share-btn:hover { border-color: var(--brand-navy); color: var(--brand-navy); }

/* Feature image */
.article-feature {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px rgba(11,26,58,0.25);
}
.article-cover {
  aspect-ratio: 16/10;
  width: 100%;
  background: var(--brand-navy);
}
.article-cover svg { width: 100%; height: 100%; display: block; }
.article-feature-caption {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

/* Body grid */
.article-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  gap: 64px;
  padding: 64px 0 80px;
  align-items: start;
  justify-content: center;
}
@media (max-width: 1100px) {
  .article-grid { grid-template-columns: minmax(0, 760px); justify-content: center; }
  .article-rail { display: none; }
}

.article-rail-inner {
  position: sticky;
  top: 100px;
}
.article-toc {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.article-toc li a {
  display: flex;
  gap: 10px;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: all .15s ease;
}
.article-toc li a:hover { color: var(--ink); }
.article-toc li.is-active a {
  color: var(--brand-navy);
  border-left-color: var(--brand-gold);
  font-weight: 500;
}
.article-toc-num {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--brand-gold);
  flex-shrink: 0;
}

.article-rail-cta {
  margin-top: 32px;
  padding: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

/* Article body typography */
.article-body { max-width: 720px; }
.article-lead {
  font-size: 22px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
  margin: 0 0 32px;
  text-wrap: pretty;
}
.article-dropcap {
  float: left;
  font-family: var(--f-sans);
  font-size: 64px;
  font-weight: 500;
  line-height: 0.9;
  margin: 6px 12px 0 0;
  color: var(--brand-gold);
  letter-spacing: -0.04em;
}
.article-h2 {
  font-family: var(--f-sans);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 48px 0 16px;
  scroll-margin-top: 100px;
  position: relative;
}
.article-h2-anchor {
  position: absolute;
  left: -28px;
  color: var(--brand-gold);
  opacity: 0;
  font-weight: 400;
  text-decoration: none;
  transition: opacity .15s ease;
}
.article-h2:hover .article-h2-anchor { opacity: 1; }
.article-p {
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink-2);
  margin: 0 0 22px;
  text-wrap: pretty;
}
.article-pullquote {
  margin: 40px 0;
  padding: 28px 32px;
  background: var(--bg-2);
  border-left: 3px solid var(--brand-gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  position: relative;
}
.article-pullquote-mark {
  color: var(--brand-gold);
  opacity: 0.3;
  margin-bottom: 8px;
  display: block;
}
.article-pullquote blockquote {
  margin: 0;
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.article-pullquote figcaption {
  margin-top: 12px;
  color: var(--muted);
}

/* Footer */
.article-footer {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.article-tag {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  background: #fff;
}
.article-author-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  margin-top: 32px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
@media (max-width: 700px) {
  .article-author-card { flex-direction: column; }
}

/* Related */
.article-related {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 64px 0 80px;
}
.article-related-card {
  cursor: pointer;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: all .2s ease;
}
.article-related-card:hover {
  border-color: var(--brand-navy);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -16px rgba(11,26,58,0.2);
}
.article-related-num {
  position: absolute;
  top: 18px;
  right: 20px;
  color: var(--brand-gold);
  opacity: 0.6;
  font-size: 11px;
}
.article-related-cat { color: var(--accent-ink); }
.article-related-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* Legal */
.legal-toc {
  display: block; padding: 6px 10px; font-size: 13px;
  color: var(--muted); cursor: pointer; border-radius: 4px;
  text-decoration: none; border-left: 2px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.legal-toc:hover { color: var(--ink); }
.legal-toc.active { color: var(--accent-ink); border-left-color: var(--accent); background: var(--accent-wash); }

.legal-section {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.legal-head {
  display: flex; align-items: center; gap: 18px;
  width: 100%; padding: 22px 0;
  background: none; border: none; cursor: pointer;
  text-align: left; color: var(--ink);
  font-family: inherit;
}
.legal-head:hover { color: var(--accent-ink); }
.legal-body { padding: 0 0 28px 58px; }
.legal-plain {
  padding: 14px 18px; background: var(--accent-wash);
  border-radius: var(--r-sm); margin-bottom: 20px;
  border-left: 3px solid var(--accent);
}
.legal-plain p { font-size: 14px; color: var(--accent-ink); line-height: 1.5; font-weight: 500; }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,35,76,.45); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 10vh;
  animation: fadeIn .15s;
}
.search-box {
  width: 640px; max-width: 94vw;
  background: #fff; border-radius: var(--r-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  overflow: hidden;
}
.search-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.search-input {
  flex: 1; border: none; outline: none; background: none;
  font-family: inherit; font-size: 16px; color: var(--ink);
}
.search-results { max-height: 440px; overflow-y: auto; padding: 8px; }
.search-result {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: var(--r-sm); cursor: pointer;
  color: var(--ink); transition: background .1s;
}
.search-result:hover { background: var(--accent-wash); }
.search-result-type {
  padding: 3px 8px; background: var(--bg-2);
  border-radius: 4px; color: var(--muted);
  min-width: 80px; text-align: center;
}
.search-empty { padding: 28px 22px; color: var(--muted); font-size: 14px; }
.search-tag {
  padding: 5px 12px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--f-mono); font-size: 12px;
  color: var(--ink); cursor: pointer;
}
.search-tag:hover { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-ink); }

/* Nav search button */
.nav-search-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--muted); cursor: pointer;
  font-family: var(--f-mono); font-size: 11.5px;
  transition: all .15s;
}
.nav-search-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.nav-search-btn kbd {
  padding: 2px 6px; background: #fff;
  border: 1px solid var(--line); border-radius: 3px;
  font-family: inherit; font-size: 10px;
}

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

/* =========================================================
   MOBILE RESPONSIVE LAYER , hamburger + grid collapses
   ========================================================= */

/* Hamburger , hidden on desktop */
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  align-items: center; justify-content: center;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}
.nav-burger:hover { background: var(--bg-2); }
.burger { position: relative; width: 18px; height: 14px; display: inline-block; }
.burger i {
  position: absolute; left: 0; right: 0; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform .25s ease, opacity .15s ease, top .25s ease;
}
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 6px; }
.burger i:nth-child(3) { top: 12px; }
.burger.open i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.burger.open i:nth-child(2) { opacity: 0; }
.burger.open i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Mobile sheet */
.nav-sheet {
  position: fixed;
  top: 64px; left: 0; right: 0;
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  background: var(--bg);
  border-top: 1px solid var(--line);
  z-index: 49;
  padding: 20px var(--pad) 32px;
  animation: sheetIn .25s cubic-bezier(.2,.7,.2,1) both;
  display: none;
}
@keyframes sheetIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.nav-sheet-links { display: flex; flex-direction: column; }
.nav-sheet-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 4px;
  font-size: 22px; font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.nav-sheet-link.active { color: var(--accent-ink); }
.nav-sheet-link:last-child { border-bottom: none; }
.nav-sheet-cta { margin-top: 24px; }

/* Breakpoints , collapse multi-col grids on tablet/phone */
@media (max-width: 960px) {
  .nav-booking { display: none; }
  .nav-search-btn kbd { display: none; }
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .hero-credentials { max-width: 520px; }
}

@media (max-width: 820px) {
  .nav-burger { display: inline-flex; }
  .nav-sheet { display: block; }
  .nav-cta-btn { display: none; }
  .nav-signin { display: none; }
  .nav-search-btn {
    padding: 8px; width: 36px; height: 36px;
    justify-content: center; gap: 0; font-size: 0;
  }
  .nav-search-btn svg { margin: 0; }
  .nav-inner { gap: 8px; }
  .brand img.logo-full { height: 28px !important; }

  /* Footer bottom stacks */
  .footer { padding: 56px 0 24px; }
  .footer-bottom {
    flex-direction: column; gap: 14px;
    align-items: flex-start;
    text-align: left;
  }

  /* Prompt bar , slim on mobile */
  .prompt-bar {
    bottom: 12px;
    left: 12px; right: 12px;
    transform: translateY(150%);
    max-width: none;
    padding: 10px 10px 10px 16px;
    font-size: 13px;
  }
  .prompt-bar.show { transform: translateY(0); }
  .prompt-bar > span:first-of-type { flex: 1; }
  .prompt-bar button.btn-sm { padding: 8px 12px; font-size: 12px; }

  /* Legal page , TOC over body */
  .legal-page-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .legal-page-grid aside { position: relative !important; top: auto !important; }
  .legal-body { padding: 0 0 24px 0 !important; }
  .legal-head { padding: 18px 0 !important; gap: 12px !important; }
  .legal-head > span:first-child { min-width: 30px !important; }

  /* Tweaks panel */
  .tweaks-panel {
    right: 12px; left: 12px; bottom: 12px;
    width: auto;
  }

  /* Search overlay */
  .search-overlay { padding-top: 5vh; }
  .search-box { width: calc(100vw - 24px); }
  .search-input-wrap { padding: 14px 16px; }
  .search-result-type { min-width: 60px; font-size: 10px; }

  /* Sections less padded */
  .section { padding: 64px 0; }
  .section-tight { padding: 40px 0; }

  /* Typography hairlines */
  .h-display { font-size: clamp(40px, 10vw, 64px); line-height: 1.02; }

  /* Buttons more tappable */
  .btn { padding: 13px 18px; }
  .btn-sm { padding: 10px 14px; }
}

/* Tight phones , aggressive 1-col collapse for ANY inline grids */
@media (max-width: 720px) {
  /* Catch-all: any element with inline gridTemplateColumns of 2+ cols drops to 1 */
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(4"],
  [style*="gridTemplateColumns: 'repeat(2"],
  [style*="gridTemplateColumns: 'repeat(3"],
  [style*="gridTemplateColumns: 'repeat(4"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns: 1.4fr 1fr"],
  [style*="grid-template-columns: 1.3fr 1fr"],
  [style*="grid-template-columns: 220px"],
  [style*="grid-template-columns: 320px"],
  [style*="grid-template-columns: 240px"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  /* Exception: we want the nav sheet's natural flex layout */
  .nav-sheet-links { display: flex !important; }

  /* Footer grid */
  .footer-grid { grid-template-columns: 1fr !important; gap: 28px !important; padding-bottom: 36px; }

  /* Portal dashboard sidebars hide on phone */
  .portal { display: block !important; }
  .portal-side { display: none !important; }
  .portal-main { margin-left: 0 !important; min-height: auto; }
  .portal-top { padding: 12px 16px; gap: 10px; }
  .portal-search-btn { flex: 1; font-size: 12px; padding: 8px 10px; }
  .portal-top-actions { gap: 6px; }
  .portal-user .mono { display: none; }
  .portal-content { padding: 20px 16px; }
  .portal-h1 { font-size: 22px; }
  .portal-stats { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .portal-stat { padding: 14px; }
  .portal-stat-val { font-size: 22px; }
  .portal-page-head { gap: 12px; margin-bottom: 20px; }
  .portal-grid-2 { grid-template-columns: 1fr !important; }
  .portal-proj-hero { grid-template-columns: 1fr 1fr !important; gap: 16px !important; padding: 18px !important; }
  .portal-team-grid { grid-template-columns: 1fr 1fr !important; }
  .portal-week { height: 140px; gap: 6px; }
  .portal-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .portal-tab { padding: 10px 12px; white-space: nowrap; font-size: 12px; }
  .portal-filters { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .portal-pill { white-space: nowrap; flex-shrink: 0; }

  /* Portal tables become cards */
  .portal-table { border-radius: 10px; }
  .portal-thead { display: none; }
  .portal-trow, .portal-trow.inv {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
  }
  .portal-trow > * { font-size: 13px; }
  .portal-mstone { grid-template-columns: 28px 1fr !important; gap: 10px !important; padding: 12px 14px !important; }
  .portal-mstone > *:nth-child(3), .portal-mstone > *:nth-child(4) { grid-column: 2; }

  /* Messages single-column */
  .portal-msg { grid-template-columns: 1fr !important; height: auto !important; }
  .portal-msg-list { max-height: 320px; }

  /* Timeline line shifts */
  .portal-timeline::before { left: 58px !important; }
  .portal-tl-row { grid-template-columns: 54px 14px 1fr !important; gap: 8px !important; }
  .portal-tl-date { font-size: 11px !important; }

  /* Auth form padding */
  .auth-form-col { padding: 20px; }
  .auth-form-inner { padding: 20px 0; gap: 28px; }
  .auth-otp { gap: 6px; }
  .auth-otp-input { width: 44px; height: 52px; font-size: 20px; }

  /* Hero typography tames */
  .h-display { font-size: clamp(36px, 11vw, 56px); }
  .h-1 { font-size: clamp(30px, 8vw, 44px); }
  .h-2 { font-size: clamp(24px, 6vw, 32px); }
  .lead { font-size: 16px; }

  /* Card padding */
  .card { padding: 22px; }

  /* Chip group wraps tightly */
  .chip { padding: 9px 14px; font-size: 13px; }
  .chip-group { gap: 6px; }

  /* Form fields full-width */
  .field input, .field textarea, .field select { font-size: 16px; padding: 13px 14px; }

  /* Nav links full-width tap area */
  .nav-sheet-link { font-size: 20px; padding: 16px 4px; }

  /* Contact/CTA big blocks */
  .section { padding: 48px 0; }
}

/* Very small phones */
@media (max-width: 420px) {
  :root { --pad: 18px; }
  .btn { padding: 12px 16px; font-size: 14px; }
  .btn-sm { padding: 9px 13px; font-size: 13px; }
  .pill { font-size: 11px; padding: 5px 10px; }
  .portal-stats { grid-template-columns: 1fr !important; }
  .portal-proj-hero { grid-template-columns: 1fr !important; }
  .portal-team-grid { grid-template-columns: 1fr !important; }
  .h-display { font-size: clamp(32px, 12vw, 44px); }
  .auth-otp-input { width: 38px; height: 46px; font-size: 18px; }
}

/* Landscape phones , keep vertical room */
@media (max-height: 480px) and (orientation: landscape) {
  .nav-sheet { max-height: calc(100dvh - 56px); }
}

/* Make sure horizontal overflow never happens */
html, body { overflow-x: hidden; max-width: 100vw; }
img, svg, video, canvas { max-width: 100%; height: auto; }
table { max-width: 100%; }

/* ============================================================ */
/* Testimonials slider , 3-up paged with auto-advance            */
/* ============================================================ */
.testi-track-wrap {
  overflow: hidden;
  margin-left: -8px; margin-right: -8px;
  padding: 8px;
}
.testi-track {
  display: flex;
  transition: transform .55s cubic-bezier(.22,.8,.22,1);
  will-change: transform;
}
.testi-page {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 4px;
}
.testi-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 320px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.testi-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10,22,40,.06);
}
.testi-quote {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.testi-attr {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  min-width: 0;
}
.testi-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  color: #fff;
  display: grid; place-items: center;
  font-weight: 500; font-size: 15px;
  flex-shrink: 0;
}
.testi-name { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.testi-role { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.testi-date { color: var(--muted); flex-shrink: 0; font-size: 11px; margin-left: auto; }

.testi-nav-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all .15s ease;
}
.testi-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent-wash);
}

.testi-dots {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 24px;
}
.testi-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line-2);
  border: none;
  cursor: pointer;
  transition: all .2s ease;
  padding: 0;
}
.testi-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 3px;
}

.testi-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  flex-wrap: wrap;
}
.testi-foot-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.testi-foot-num { font-size: 28px; font-weight: 400; letter-spacing: -0.02em; color: var(--ink); }
.testi-foot-lab { font-size: 12px; color: var(--muted); font-family: var(--f-mono); }
.testi-foot-divider { width: 1px; height: 36px; background: var(--line); }

@media (max-width: 960px) {
  .testi-page { grid-template-columns: 1fr; }
  .testi-foot { gap: 16px; padding: 16px; }
  .testi-foot-divider { display: none; }
}

/* ============================================================ */
/* Service detail page , 5-question structure                    */
/* ============================================================ */
.svc-detail .svc-hero {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--line);
}
.svc-back {
  color: var(--muted);
  cursor: pointer;
  display: inline-block;
  margin-bottom: 24px;
}
.svc-back:hover { color: var(--ink); }

.svc-hero-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 56px;
  align-items: start;
}
.svc-hero-tag { display: flex; align-items: center; gap: 14px; }
.svc-hero-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: var(--accent-wash);
  color: var(--accent-ink);
  display: grid; place-items: center;
}

.svc-quick {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  position: sticky;
  top: 96px;
}
.svc-quick-list {
  display: flex; flex-direction: column;
  gap: 0;
}
.svc-quick-list > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.svc-quick-list > div:last-child { border-bottom: none; padding-bottom: 0; }
.svc-quick-list dt {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
}
.svc-quick-list dd {
  font-size: 14px; font-weight: 500; color: var(--ink); text-align: right;
}
.svc-quick-stat {
  font-size: 18px !important;
  color: var(--accent-ink) !important;
  letter-spacing: -0.01em;
}

/* In-page anchor nav */
.svc-anchor-nav {
  display: flex;
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.svc-anchor-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--ink-2);
  border-right: 1px solid var(--line);
  transition: background .15s, color .15s;
}
.svc-anchor-nav a:last-child { border-right: none; }
.svc-anchor-nav a:hover { background: var(--bg-2); color: var(--ink); }
.svc-anchor-num { color: var(--muted); }
.svc-anchor-nav a > span:last-child { font-size: 14px; font-weight: 500; }

/* Question header common */
.svc-q-header {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: start;
  max-width: 880px;
}
.svc-q-num {
  font-size: 28px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1;
  padding-top: 12px;
}
.svc-q-header-dark .svc-q-num { color: rgba(255,255,255,.4); }

/* Q1 , what we build */
.svc-build-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.svc-build-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s ease, transform .2s ease;
}
.svc-build-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.svc-build-num {
  align-self: flex-start;
  background: var(--accent-wash);
  color: var(--accent-ink);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
}
.svc-build-name { font-size: 17px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.svc-build-desc { font-size: 14px; line-height: 1.55; color: var(--ink-2); flex: 1; }
.svc-build-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.svc-tag-pill {
  font-size: 10px;
  padding: 2px 8px;
  background: var(--bg-2);
  color: var(--muted);
  border-radius: 999px;
  border: 1px solid var(--line);
}

.svc-cap-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 20px 24px;
  background: var(--bg-2);
  border-radius: var(--r-md);
}
.svc-cap-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 13px; color: var(--ink-2);
  background: var(--bg);
}
.svc-cap-chip > svg { color: var(--accent-ink); }

/* Q2 , proof */
.svc-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.svc-proof-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.svc-proof-thumb { position: relative; aspect-ratio: 16/10; }
.svc-proof-overlay {
  position: absolute; inset: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.svc-proof-tag {
  align-self: flex-start;
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.9);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  backdrop-filter: blur(4px);
}
.svc-proof-outcome {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
  line-height: 1.15;
}
.svc-proof-body {
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
}
.svc-proof-body h3 { font-size: 17px; font-weight: 500; color: var(--ink); }
.svc-proof-body p { font-size: 14px; line-height: 1.5; color: var(--ink-2); flex: 1; }
.svc-proof-meta { color: var(--muted); display: flex; gap: 6px; font-size: 11px; }
.svc-proof-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--accent-ink);
  margin-top: 4px;
}

.svc-proof-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.svc-proof-stats > div { text-align: center; }
.svc-proof-stat-num {
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.svc-proof-stat-lab {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--f-mono);
  margin-top: 8px;
}

/* Q3 , your problem */
.svc-problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.svc-problem-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
}
.svc-problem-you, .svc-problem-we {
  display: flex; flex-direction: column; gap: 8px;
}
.svc-problem-label {
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; font-size: 10px;
}
.svc-problem-quote {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  font-style: italic;
}
.svc-problem-arrow {
  align-self: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent-ink);
  display: grid; place-items: center;
}
.svc-problem-answer {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}
.svc-problem-foot {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 14px; color: var(--ink-2);
}
.svc-problem-foot > span { flex: 1; }

/* Q4 , approach (dark section) */
.svc-detail .section[style*="--ink"] .eyebrow { color: var(--brand-gold); }

.svc-approach-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-md);
  overflow: hidden;
  background: rgba(255,255,255,.02);
}
.svc-approach-step {
  padding: 28px 24px;
  border-right: 1px solid rgba(255,255,255,.08);
  position: relative;
}
.svc-approach-step:last-child { border-right: none; }
.svc-approach-step::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -8px;
  width: 16px; height: 16px;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  z-index: 1;
  transform: translateY(-50%);
}
.svc-approach-step:last-child::before { display: none; }
.svc-approach-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.svc-approach-num { color: var(--brand-gold); }
.svc-approach-days {
  color: rgba(255,255,255,.5);
  padding: 2px 8px; background: rgba(255,255,255,.05); border-radius: 4px;
  font-size: 10px;
}
.svc-approach-name {
  font-size: 18px; font-weight: 500;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.svc-approach-desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,.65);
}

.svc-stack {
  display: flex; flex-direction: column; gap: 10px;
}
.svc-stack-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.svc-stack-tag {
  padding: 4px 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  border-radius: 4px;
  font-size: 11px;
}

/* Q5 , next step */
.svc-next-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 56px;
  align-items: start;
}
.svc-next-steps {
  display: flex; flex-direction: column; gap: 0;
}
.svc-next-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 20px;
  padding-bottom: 28px;
  position: relative;
}
.svc-next-rail {
  display: flex; flex-direction: column; align-items: center;
  height: 100%;
}
.svc-next-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
}
.svc-next-line {
  width: 2px; flex: 1;
  background: var(--line);
  margin-top: 4px;
  min-height: 40px;
}
.svc-next-body { padding-top: 0; }
.svc-next-when {
  color: var(--accent-ink);
  background: var(--accent-wash);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  margin-bottom: 8px;
}
.svc-next-what {
  font-size: 17px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.svc-next-detail {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 540px;
}

.svc-next-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 28px;
  position: sticky;
  top: 96px;
  display: flex; flex-direction: column; gap: 14px;
}
.svc-next-title {
  font-size: 22px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.svc-next-sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}
.svc-next-btn { width: 100%; justify-content: center; }
.svc-next-or {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  position: relative;
}
.svc-next-or::before, .svc-next-or::after {
  content: "";
  position: absolute; top: 50%;
  width: 40%; height: 1px;
  background: var(--line);
}
.svc-next-or::before { left: 0; }
.svc-next-or::after { right: 0; }
.svc-next-foot {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 14px;
  background: var(--accent-wash);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--accent-ink);
  line-height: 1.5;
}
.svc-next-foot > svg { flex-shrink: 0; margin-top: 2px; }

/* Service detail responsive */
@media (max-width: 1024px) {
  .svc-hero-grid, .svc-next-grid { grid-template-columns: 1fr; gap: 32px; }
  .svc-quick, .svc-next-card { position: static; }
  .svc-build-grid, .svc-proof-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-approach-rail { grid-template-columns: repeat(2, 1fr); }
  .svc-approach-step { border-right: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
  .svc-approach-step:nth-child(2) { border-right: none; }
  .svc-approach-step:nth-child(3), .svc-approach-step:nth-child(4) { border-bottom: none; }
  .svc-approach-step::before { display: none; }
  .svc-proof-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .svc-build-grid, .svc-proof-grid, .svc-problem-grid { grid-template-columns: 1fr; }
  .svc-approach-rail { grid-template-columns: 1fr; }
  .svc-approach-step { border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
  .svc-approach-step:last-child { border-bottom: none; }
  .svc-anchor-nav { flex-wrap: wrap; }
  .svc-anchor-nav a { flex-basis: 50%; border-bottom: 1px solid var(--line); }
  .svc-problem-card { grid-template-columns: 1fr; gap: 14px; }
  .svc-problem-arrow { transform: rotate(90deg); justify-self: start; }
  .svc-q-header { grid-template-columns: 1fr; gap: 8px; }
  .svc-q-num { padding-top: 0; }
}

/* ===========================
   SETTINGS , hub layout
   =========================== */
.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}
.settings-nav {
  background: var(--portal-bg-soft);
  border: 1px solid var(--portal-border);
  border-radius: 12px;
  overflow: hidden;
  position: sticky;
  top: 24px;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--portal-border-soft);
  color: var(--portal-text-muted);
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.settings-nav-item:last-child { border-bottom: none; }
.settings-nav-item:hover { background: var(--portal-hover); color: var(--portal-text); }
.settings-nav-item.active { background: rgba(221,156,107,.08); color: var(--brand-gold); }
.settings-nav-label { font-weight: 500; color: inherit; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.settings-nav-sub { font-size: 11px; color: var(--portal-text-faint); margin-top: 2px; font-family: var(--f-mono); }
.settings-nav-tag {
  font-size: 9px; font-family: var(--f-mono); letter-spacing: .06em;
  background: rgba(221,156,107,.15); color: var(--brand-gold);
  padding: 2px 5px; border-radius: 4px;
}
.settings-content { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* Cards */
.settings-card {
  background: var(--portal-bg-elevated);
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  padding: 24px;
}
.settings-card.danger { border-color: rgba(232,162,104,.2); }
.settings-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.settings-h2 { font-size: 17px; font-weight: 500; color: var(--portal-text); }
.settings-sub { font-size: 13px; color: var(--portal-text-muted); margin-top: 4px; }

/* Form */
.settings-form { display: flex; flex-direction: column; gap: 16px; }
.settings-row { display: grid; gap: 14px; }
.settings-row.two { grid-template-columns: 1fr 1fr; }
.settings-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; padding-top: 8px; border-top: 1px solid var(--portal-border); margin-top: 4px;
}
.settings-saved { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--brand-gold); margin-right: auto; }

/* Avatar */
.settings-avatar-row { display: flex; align-items: center; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--portal-border); margin-bottom: 4px; }
.settings-avatar-big {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #DD9C6B, #8A5B2E);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 20px; font-weight: 600; color: #0b0b0d;
}

/* Select */
.settings-select {
  background: var(--portal-input-bg); border: 1px solid var(--portal-input-border);
  color: var(--portal-text); border-radius: 8px; padding: 7px 10px; font-size: 13px;
  cursor: pointer;
}
.settings-select:focus { outline: none; border-color: var(--brand-gold); }

/* Sessions / team rows */
.settings-sessions { display: flex; flex-direction: column; gap: 0; }
.settings-session {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--portal-border-soft);
}
.settings-session:last-child { border-bottom: none; }
.settings-session-tag {
  font-size: 9px; font-family: var(--f-mono); letter-spacing: .06em;
  background: rgba(221,156,107,.15); color: var(--brand-gold);
  padding: 2px 5px; border-radius: 4px; vertical-align: middle; margin-left: 6px;
}

/* Roles grid */
.settings-roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 4px; }
.settings-role-card { background: var(--portal-bg-soft); border: 1px solid var(--portal-border); border-radius: 10px; padding: 14px; }
.settings-role-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.settings-role-badge { font-size: 12px; font-weight: 600; color: var(--portal-text); }
.settings-role-perms { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.settings-role-perms li { font-size: 12px; color: var(--portal-text-muted); display: flex; align-items: center; gap: 6px; }

/* 2FA */
.settings-2fa { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--portal-border); }
.settings-2fa-status { font-size: 13px; color: var(--portal-text-soft); display: flex; align-items: center; gap: 8px; }

/* Toggle */
.settings-toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.settings-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.settings-toggle-slider {
  width: 40px; height: 22px; background: var(--portal-bg-strong);
  border-radius: 999px; transition: background 0.2s; position: relative;
}
.settings-toggle-slider::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--portal-text); transition: transform 0.2s;
}
.settings-toggle input:checked + .settings-toggle-slider { background: var(--brand-gold); }
.settings-toggle input:checked + .settings-toggle-slider::after { transform: translateX(18px); }

/* Invite modal */
.invite-modal-wrap {
  position: fixed; inset: 0; z-index: 200;
  background: var(--portal-scrim); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn .15s;
}
.invite-modal {
  width: 100%; max-width: 460px;
  background: var(--portal-bg); border: 1px solid var(--portal-border-strong);
  border-radius: 16px; padding: 24px;
  box-shadow: var(--portal-shadow);
}
.invite-modal.invite-modal-lg {
  max-width: 720px;
  max-height: min(82vh, 860px);
  display: flex;
  flex-direction: column;
}
.invite-modal-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.invite-modal-body {
  margin-top: 18px;
  overflow-y: auto;
  padding-right: 4px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(221,156,107,.28) transparent;
}
.invite-modal-body::-webkit-scrollbar {
  width: 10px;
}
.invite-modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.invite-modal-body::-webkit-scrollbar-thumb {
  background: rgba(221,156,107,.22);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
.invite-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(221,156,107,.34);
  border: 3px solid transparent;
  background-clip: padding-box;
}

/* Custom select */
.settings-custom-select {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; text-align: left;
}
.settings-custom-select-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 200;
  background: var(--portal-bg); border: 1px solid var(--portal-border-strong);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(10,22,40,.18);
  max-height: 220px; overflow-y: auto;
}
.settings-custom-select-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; font-size: 14px; color: var(--portal-text-soft);
  cursor: pointer; transition: background .12s;
}
.settings-custom-select-item:hover { background: var(--portal-hover); color: var(--portal-text); }
.settings-custom-select-item.active { color: var(--brand-gold); }

.portal .auth-workspace-menu {
  background: var(--portal-bg);
  border: 1px solid var(--portal-border-strong);
  box-shadow: 0 18px 40px rgba(10,22,40,.18);
}

.portal .auth-workspace-item {
  color: var(--portal-text-soft);
}

.portal .auth-workspace-item:hover {
  background: var(--portal-hover);
  color: var(--portal-text);
}

.portal .auth-label {
  color: var(--portal-text-muted);
}

.portal .auth-input,
.portal select.auth-input {
  background: var(--portal-input-bg);
  border-color: var(--portal-input-border);
  color: var(--portal-text);
}

.portal .auth-input::placeholder {
  color: var(--portal-text-faint);
}

.portal .auth-input:focus {
  background: color-mix(in srgb, var(--portal-input-bg) 85%, var(--brand-gold));
}

.portal .auth-input-suffix {
  color: var(--portal-text-muted);
}

.portal .auth-input-suffix:hover {
  color: var(--portal-text);
  background: var(--portal-hover);
}

/* Responsive */
@media (max-width: 768px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; }
  .settings-row.two { grid-template-columns: 1fr; }
}

/* ============================================================
   Page Skeleton — FCP optimisation
   Painted immediately after styles.css loads (before JS executes).
   Position fixed so it overlays #root without affecting layout.
   Removed by root.jsx after first React render via #sk.gone + display:none.
   ============================================================ */
#sk {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #070E1C;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
#sk.gone { opacity: 0; }

/* Nav bar placeholder */
.sk-nav {
  height: 64px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(7,14,28,.9);
}
.sk-logo {
  width: 120px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255,255,255,.12);
}
.sk-nav-links {
  width: 260px;
  height: 14px;
  border-radius: 4px;
  background: rgba(255,255,255,.07);
}

/* Hero content placeholders */
.sk-hero {
  padding: 88px 5vw 0;
  max-width: 860px;
}
.sk-tag {
  width: 140px;
  height: 13px;
  border-radius: 3px;
  background: rgba(34,211,238,.25);
  margin-bottom: 22px;
}
.sk-h1 {
  height: 54px;
  border-radius: 6px;
  background: rgba(255,255,255,.13);
  margin-bottom: 14px;
}
.sk-w65 { width: 65%; }
.sk-sub {
  margin-top: 10px;
  width: 55%;
  height: 18px;
  border-radius: 4px;
  background: rgba(255,255,255,.07);
}
.sk-ctas {
  margin-top: 36px;
  display: flex;
  gap: 12px;
}
.sk-ctas::before,
.sk-ctas::after {
  content: '';
  height: 44px;
  border-radius: 8px;
}
.sk-ctas::before {
  width: 148px;
  background: rgba(34,211,238,.22);
}
.sk-ctas::after {
  width: 108px;
  background: rgba(255,255,255,.09);
}

/* Pulse shimmer on skeleton elements */
@keyframes sk-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .45; }
}
.sk-logo, .sk-nav-links,
.sk-tag, .sk-h1, .sk-sub,
.sk-ctas::before, .sk-ctas::after {
  animation: sk-pulse 1.6s ease-in-out infinite;
}

/* Spinner used by portal lazy-load loading state */
@keyframes spin { to { transform: rotate(360deg); } }

/* Post editor */
.post-editor-content {
  height: 320px; resize: vertical;
  font-family: var(--f-mono); font-size: 13px; line-height: 1.6;
}
.post-editor-back {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: rgba(255,255,255,.5); cursor: pointer;
  margin-bottom: 20px; background: none; border: none; padding: 0;
}
.post-editor-back:hover { color: #fff; }
