:root {
  --bg-pitch: #000000;
  --bg-obsidian: #000000;
  --bg-card-dark: #0b0a0c;
  --bg-light: #0b0a0c;
  --bg-editorial: #000000;
  --bg-muted: #060507;
  --bg-subtle: #121013;
  --text-dark: #fafafa;
  --text-muted: #a19da6;
  --text-light: #ffffff;
  --text-light-muted: #b0abb5;
  --border-light: #211d22;
  --border-dark: #211d22;
  --pink: #ff2d8a;
  --pink-hover: #e31975;
  --pink-soft: rgba(255, 45, 138, 0.14);
  --pink-glow: rgba(255, 45, 138, 0.38);
  --success-bg: rgba(16, 185, 129, 0.14);
  --success-fg: #5eead4;
  --warn-bg: rgba(245, 158, 11, 0.15);
  --warn-fg: #fcd34d;
  --danger-bg: rgba(244, 63, 94, 0.15);
  --danger-fg: #fda4af;
  --info-bg: rgba(255, 45, 138, 0.14);
  --info-fg: #ff85bc;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 24px 56px rgba(0, 0, 0, 0.62);
  --font-display: "Space Grotesk", "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background: #000000;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.94rem + 0.24vw, 1.125rem);
  color: var(--text-dark);
  background: #000000;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

main {
  background: #000000;
}

h1, h2, h3, h4, .hero-title, .nav-links a, .btn, .portal-page-title {
  font-family: var(--font-display);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: min(1420px, calc(100% - 3rem));
  margin-inline: auto;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
  color: var(--text-light);
  border-bottom: 1px solid var(--border-dark);
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
  border-bottom-color: #2c262e;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 76px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.45rem;
}

.nav-links a {
  position: relative;
  padding-block: 0.3rem;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-light-muted);
  transition: color 0.16s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--pink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-light);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--text-light);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  background: var(--bg-obsidian);
  border-top: 1px solid var(--border-dark);
  padding: 1rem;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer a {
  display: block;
  padding: 0.65rem 0.5rem;
  text-decoration: none;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-dark);
  font-weight: 500;
  font-size: 0.92rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.84rem 1.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.btn-sm {
  padding: 0.54rem 1rem;
  font-size: 0.84rem;
}

.btn-primary {
  background: var(--pink);
  color: var(--text-light);
}

.btn-primary:hover {
  background: var(--pink-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(255, 45, 138, 0.34);
}

.btn:active {
  transform: translateY(0);
}

.btn-dark {
  background: #18151a;
  color: var(--text-light);
  border-color: #2f2933;
}

.btn-dark:hover {
  background: #221d26;
  border-color: #423947;
  transform: translateY(-1px);
}

.btn-outline-light {
  background: transparent;
  color: var(--text-light);
  border-color: #362f3b;
}

.btn-outline-light:hover {
  border-color: var(--text-light);
  background: rgba(255, 255, 255, 0.05);
}

.btn-outline-dark {
  background: transparent;
  color: var(--text-light);
  border-color: #2f2933;
}

.btn-outline-dark:hover {
  border-color: var(--pink);
  background: rgba(255, 45, 138, 0.08);
}

.btn-danger {
  background: #c81e3a;
  color: var(--text-light);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pink);
  font-weight: 600;
  margin-bottom: 0.85rem;
}

/* Editorial Hero & Large-Screen Scale */
.hero-editorial {
  background: var(--bg-pitch);
  color: var(--text-light);
  padding: clamp(4.25rem, 6.5vw, 6.5rem) 0 clamp(3.75rem, 5.5vw, 5.5rem);
  border-bottom: 1px solid var(--border-dark);
  background-image: radial-gradient(circle at 78% 24%, rgba(255, 45, 138, 0.16), transparent 46%);
}

.hero-editorial-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(2.25rem, 4.5vw, 4.5rem);
  align-items: center;
}

.hero-dark {
  background: var(--bg-pitch);
  color: var(--text-light);
  padding: clamp(3.75rem, 5.5vw, 5.5rem) 0;
  border-bottom: 1px solid var(--border-dark);
  background-image: radial-gradient(circle at 85% 20%, rgba(255, 45, 138, 0.14), transparent 45%);
}

.hero-title {
  font-size: clamp(2.35rem, 4.6vw, 4.15rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
  margin: 0 0 1.35rem;
  font-weight: 700;
}

.hero-lead {
  font-size: clamp(1.06rem, 1.35vw, 1.28rem);
  color: var(--text-light-muted);
  margin: 0 0 2.1rem;
  max-width: 54ch;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.a-cut-stage {
  position: relative;
  padding-bottom: 14px;
  padding-right: 14px;
}

.a-cut-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  clip-path: polygon(0 0, 100% 0, 100% 82%, 85% 100%, 0 100%);
  background: #121013;
  box-shadow: var(--shadow-md);
}

.a-cut-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.a-cut-slash {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 120px;
  height: 120px;
  pointer-events: none;
}

/* Hero Friendly Liquid-Silver Humanoid Aris Stage & Live Ask Console */
.aris-hero-stage {
  position: relative;
  width: 100%;
  max-width: 490px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: visible;
  cursor: default;
}

.aris-hero-aura {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.11) 0%, rgba(255, 45, 138, 0.14) 42%, rgba(0, 0, 0, 0) 74%);
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
  transition: background 0.3s ease;
  animation: arisAuraBreathe 5.2s ease-in-out infinite;
}

.aris-hero-stage.is-greeting .aris-hero-aura {
  background: radial-gradient(circle, rgba(255, 133, 192, 0.22) 0%, rgba(255, 45, 138, 0.18) 46%, rgba(0, 0, 0, 0) 74%);
}

/* Robotic HUD Speech Balloon Pop-Up (dead-center symmetrical above head) */
.aris-speech-bubble {
  position: absolute;
  top: -34px;
  left: 50%;
  right: auto;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  padding: 0.52rem 0.94rem;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 45, 138, 0.045) 0px,
      rgba(255, 45, 138, 0.045) 1px,
      transparent 1px,
      transparent 3px
    ),
    rgba(10, 9, 13, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 45, 138, 0.85);
  border-left: 3px solid var(--pink);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  color: #f8f5fa;
  font-family: var(--font-mono);
  font-size: 0.77rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.72), 0 0 24px rgba(255, 45, 138, 0.34);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.94);
  transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1), transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.aris-hero-stage.is-greeting .aris-speech-bubble {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.aris-hud-tag {
  color: var(--pink);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.aris-hud-cursor {
  display: inline-block;
  color: var(--pink);
  font-weight: 700;
  margin-left: 2px;
  animation: arisCursorBlink 0.9s steps(2, start) infinite;
}

@keyframes arisCursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.aris-3d-canvas-wrap {
  position: relative;
  z-index: 2;
  width: clamp(320px, 33vw, 445px);
  height: clamp(295px, 29vw, 390px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.aris-3d-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.aris-bot-svg {
  position: relative;
  z-index: 2;
  width: clamp(305px, 31vw, 435px);
  height: auto;
  display: block;
  filter: drop-shadow(0 26px 46px rgba(0, 0, 0, 0.85));
}

/* Head group: ONLY element that tilts & follows cursor on hover */
.aris-head-group {
  transform-origin: 240px 184px;
  will-change: transform;
}

/* Grok-Style Cute Expressive Anime Eyelids */
.aris-eyes-working {
  opacity: 1;
  transform-origin: 240px 115px;
  transition: opacity 0.18s ease, transform 0.2s ease;
  animation: arisEyesBlink 5.4s ease-in-out infinite;
}

.aris-eyes-happy {
  opacity: 0;
  transform-origin: 240px 115px;
  transform: scale(0.92);
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.aris-hero-stage.is-greeting .aris-eyes-working {
  opacity: 0;
  animation: none;
}

.aris-hero-stage.is-greeting .aris-eyes-happy {
  opacity: 1;
  transform: scale(1);
}

/* Real-Time Working Animations (Hands Typing + Live Laptop Telemetry) */
.aris-hand-left {
  transform-origin: 165px 354px;
  animation: arisTypeLeft 0.68s ease-in-out infinite;
}

.aris-hand-right {
  transform-origin: 315px 354px;
  animation: arisTypeRight 0.74s ease-in-out infinite;
}

.aris-keys-glow {
  animation: arisKeysFlicker 1.3s steps(3, end) infinite;
}

.aris-work-bar {
  transform-box: fill-box;
  transform-origin: left center;
  animation: arisWorkScan 2.2s ease-in-out infinite;
}

.aris-screen-ambient {
  animation: arisScreenPulse 2.8s ease-in-out infinite;
}

/* Pause typing politely to greet the user when hovering over Aris */
.aris-hero-stage.is-greeting .aris-hand-left,
.aris-hero-stage.is-greeting .aris-hand-right {
  animation: none;
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

.aris-hero-stage.is-greeting .aris-work-bar,
.aris-hero-stage.is-greeting .aris-keys-glow {
  animation-play-state: paused;
}

@keyframes arisTypeLeft {
  0%, 100% { transform: translate(0px, 0px) rotate(0deg); }
  25% { transform: translate(3px, 2.5px) rotate(2deg); }
  55% { transform: translate(-2px, -1.5px) rotate(-1.5deg); }
  80% { transform: translate(2px, 2px) rotate(1deg); }
}

@keyframes arisTypeRight {
  0%, 100% { transform: translate(0px, 0px) rotate(0deg); }
  30% { transform: translate(-3px, 2.5px) rotate(-2deg); }
  60% { transform: translate(2px, -1.5px) rotate(1.5deg); }
  85% { transform: translate(-2px, 2px) rotate(-1deg); }
}

@keyframes arisKeysFlicker {
  0%, 100% { stroke-opacity: 0.42; }
  50% { stroke-opacity: 0.85; }
}

@keyframes arisWorkScan {
  0%, 100% { transform: translateX(0px) scaleX(0.65); }
  50% { transform: translateX(38px) scaleX(1.1); }
}

@keyframes arisScreenPulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

@keyframes arisEyesBlink {
  0%, 91%, 97%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(0.1); }
}

@keyframes arisAuraBreathe {
  0%, 100% { opacity: 0.78; transform: translate(-50%, -50%) scale(0.96); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes arisPinkEdgeGlow {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(255, 45, 138, 0.42), 0 0 26px rgba(255, 45, 138, 0.38), 0 16px 36px rgba(0, 0, 0, 0.58);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(255, 95, 168, 0.62), 0 0 38px rgba(255, 45, 138, 0.56), 0 18px 40px rgba(0, 0, 0, 0.64);
  }
}

.aris-hero-console {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 445px;
  margin-top: -26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.aris-hero-quick-form {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.44rem 0.44rem 0.44rem 0.9rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #131116 0%, #0b0a0d 100%);
  border: 1.5px solid #2b2630;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}

.aris-hero-stage.is-greeting .aris-hero-quick-form,
.aris-hero-quick-form:focus-within {
  border-color: var(--pink);
  transform: translateY(-1px);
  animation: arisPinkEdgeGlow 2.1s ease-in-out infinite;
}

.aris-quick-spark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pink);
  flex-shrink: 0;
  opacity: 0.85;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.aris-hero-stage.is-greeting .aris-quick-spark,
.aris-hero-quick-form:focus-within .aris-quick-spark {
  opacity: 1;
  transform: scale(1.12);
}

.aris-hero-quick-form input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.48rem 0.2rem;
  font-size: 0.9rem;
  color: var(--text-light);
  box-shadow: none;
}

.aris-hero-quick-form input[type="text"]::placeholder {
  color: var(--text-muted);
}

.aris-hero-quick-form input[type="text"]:focus {
  border: none;
  box-shadow: none;
  outline: none;
}

.aris-hero-quick-form .btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.58rem 1.05rem;
  border-radius: 10px;
}

/* Container-Free Rotating Horizontal 3D Dialaris A */
.hero-svg-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.dialaris-3d-stage {
  position: relative;
  width: 100%;
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 900px;
  overflow: visible;
  background: transparent;
}

.dialaris-3d-stage--compact {
  padding: 0.75rem 0;
}

.dialaris-3d-aura {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 45, 138, 0.26) 0%, rgba(255, 45, 138, 0) 70%);
  filter: blur(22px);
  animation: dialarisAuraPulse 4.4s ease-in-out infinite;
  pointer-events: none;
}

.dialaris-3d-spinner {
  position: relative;
  z-index: 2;
  width: clamp(140px, 14vw, 195px);
  height: clamp(140px, 14vw, 195px);
  transform-origin: center center;
  transform-style: preserve-3d;
  will-change: transform;
  animation: dialarisVortexSpin 4.4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.dialaris-3d-stage--compact .dialaris-3d-spinner {
  width: clamp(120px, 11vw, 160px);
  height: clamp(120px, 11vw, 160px);
}

.dialaris-3d-mark {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 14px 28px rgba(255, 45, 138, 0.28));
}

.dialaris-3d-floor {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 45, 138, 0.45) 0%, rgba(255, 45, 138, 0) 72%);
  filter: blur(6px);
  animation: dialarisFloorPulse 4.4s ease-in-out infinite;
}

.pink-pulse-fill {
  animation: dialarisPinkPulse 3.2s ease-in-out infinite;
}

/* 2.0s crisp hold at upright A (0% -> 45.45%), then 2.4s horizontal-axis vortex spin */
@keyframes dialarisVortexSpin {
  0%, 45.45% { transform: rotateY(0deg) scale(1); }
  72.7% { transform: rotateY(180deg) scale(1.04); }
  100% { transform: rotateY(360deg) scale(1); }
}

@keyframes dialarisAuraPulse {
  0%, 45.45% { opacity: 0.72; transform: scale(0.96); }
  72.7% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.72; transform: scale(0.96); }
}

@keyframes dialarisFloorPulse {
  0%, 45.45%, 100% { transform: scaleX(1); opacity: 0.85; }
  62%, 86% { transform: scaleX(0.45); opacity: 0.45; }
}

@keyframes dialarisPinkPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 45, 138, 0.35)); opacity: 0.92; }
  50% { filter: drop-shadow(0 0 12px rgba(255, 95, 168, 0.85)); opacity: 1; }
}

.dialaris-emblem-svg {
  display: block;
}

/* Kinetic Typography, Variable Font Dynamics & Scroll Reveal */
.hero-title {
  font-variation-settings: "wght" 720;
  transition: font-variation-settings 0.35s ease, letter-spacing 0.35s ease;
}

.kinetic-rotator {
  display: inline-block;
  color: var(--pink);
  position: relative;
  min-width: 7.4ch;
  vertical-align: baseline;
}

.kinetic-word {
  display: inline-block;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), font-variation-settings 0.28s ease;
  font-variation-settings: "wght" 780;
}

.kinetic-word.is-switching {
  opacity: 0;
  transform: translateY(8px);
  font-variation-settings: "wght" 420;
}

.display-dynamic {
  font-variation-settings: "wght" 680;
  transition: font-variation-settings 0.28s ease, letter-spacing 0.28s ease, color 0.2s ease;
}

.bento-card:hover .display-dynamic,
.service-index-item:hover h3 {
  font-variation-settings: "wght" 780;
  letter-spacing: -0.025em;
}

.btn svg,
.link-arrow svg {
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn:hover svg,
.link-arrow:hover svg {
  transform: translateX(3px);
}

.card-spotlight {
  position: relative;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card-spotlight:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 45, 138, 0.45);
  box-shadow: var(--shadow-sm), 0 10px 26px rgba(255, 45, 138, 0.14);
}

html.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

html.js-motion [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Swiss Vector Panel Transition */
[data-solution-svg] {
  display: none;
}

[data-solution-svg].is-active {
  display: block;
  animation: svgPanelIn 0.26s ease;
}

@keyframes svgPanelIn {
  from { opacity: 0.2; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-caption-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-dark);
  font-size: 0.88rem;
  color: var(--text-light-muted);
}

.hero-caption-bar strong {
  color: var(--text-light);
  font-family: var(--font-display);
}

/* Sections & Cards */
.section {
  padding: clamp(4.25rem, 6vw, 6.25rem) 0;
  background: var(--bg-pitch);
}

.section-editorial {
  background: var(--bg-editorial);
  border-block: 1px solid var(--border-light);
}

.section-muted {
  background: var(--bg-muted);
  border-block: 1px solid var(--border-light);
}

.section-dark {
  background: var(--bg-obsidian);
  color: var(--text-light);
}

.section-head {
  max-width: 72ch;
  margin-bottom: clamp(2.25rem, 3.2vw, 3rem);
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.1vw, 2.85rem);
  line-height: 1.12;
  margin: 0 0 0.85rem;
  letter-spacing: -0.028em;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.15vw, 1.14rem);
}

.section-dark .section-head p {
  color: var(--text-light-muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.card-dark {
  background: var(--bg-card-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  color: var(--text-light);
}

.card h3,
.card-dark h3 {
  margin: 0 0 0.55rem;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}

.card p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.card-dark p {
  margin: 0 0 1rem;
  color: var(--text-light-muted);
  font-size: 0.94rem;
}

.link-arrow {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--pink);
  text-decoration: none;
  font-size: 0.9rem;
}

.link-arrow:hover {
  text-decoration: underline;
}

/* Interactive Service Explorer */
.explorer-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 2rem;
  align-items: start;
}

.explorer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.explorer-tab {
  width: 100%;
  text-align: left;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.explorer-tab:hover {
  border-color: #38313d;
  background: #121013;
}

.explorer-tab.is-active {
  background: #161318;
  color: var(--text-light);
  border-color: var(--pink);
  box-shadow: 0 0 0 1px rgba(255, 45, 138, 0.28), var(--shadow-sm);
}

.explorer-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pink);
  padding-top: 0.18rem;
  flex-shrink: 0;
}

.explorer-tab-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}

.explorer-tab-sub {
  display: block;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.explorer-tab.is-active .explorer-tab-sub {
  color: var(--text-light-muted);
}

.explorer-stage {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.explorer-stage-head {
  background: var(--bg-pitch);
  color: var(--text-light);
  padding: 1.35rem 1.65rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  border-bottom: 1px solid var(--border-dark);
}

.explorer-stage-head h3 {
  margin: 0;
  font-size: clamp(1.18rem, 2vw, 1.42rem);
  letter-spacing: -0.02em;
  color: var(--text-light);
}

.explorer-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.1rem 0 1.25rem;
}

.explorer-pillar {
  background: var(--bg-editorial);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.explorer-pillar strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.explorer-pillar span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.explorer-body {
  padding: 1.65rem;
}

.explorer-brief-box {
  margin-top: 1.15rem;
  padding: 1.15rem;
  border-radius: var(--radius-md);
  background: var(--bg-editorial);
  border: 1px solid var(--border-light);
}

.cadence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border-dark);
  border-left: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cadence-step {
  background: var(--bg-card-dark);
  border-right: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
  padding: 1.6rem 1.4rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.cadence-step:hover {
  background: #151217;
}

.cadence-num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1;
  color: var(--pink);
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.cadence-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light-muted);
  margin-bottom: 0.45rem;
}

/* Compact Service Index & Program Story */
.service-index-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border-light);
  border-left: 1px solid var(--border-light);
}

.service-index-item {
  padding: 1.35rem;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-light);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  transition: background-color 0.15s ease;
}

.service-index-item:hover {
  background: var(--bg-editorial);
}

.story-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.story-step {
  background: var(--bg-card-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  position: relative;
}

.story-step-num {
  font-family: var(--font-mono);
  color: var(--pink);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Split Auth & Portal Entry Studio */
.auth-section {
  background: var(--bg-editorial);
  border-bottom: 1px solid var(--border-light);
  padding: 4rem 0 4.75rem;
}

.auth-split {
  display: grid;
  grid-template-columns: 0.94fr 1.06fr;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  box-shadow: 0 26px 64px rgba(8, 8, 14, 0.12), 0 2px 8px rgba(8, 8, 14, 0.04);
  background: var(--bg-light);
}

.auth-aside {
  position: relative;
  overflow: hidden;
  background: #070608;
  color: var(--text-light);
  padding: 2.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  background-image:
    radial-gradient(circle at 88% 88%, rgba(255, 45, 138, 0.18), transparent 56%),
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.05), transparent 40%);
}

.auth-aside > *:not(.auth-watermark-svg) {
  position: relative;
  z-index: 1;
}

.auth-watermark-svg {
  position: absolute;
  right: -64px;
  bottom: -58px;
  width: 310px;
  height: 310px;
  pointer-events: none;
  z-index: 0;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.auth-app-jewel {
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

.auth-brand-meta {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
}

.auth-brand-title {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.auth-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
  display: inline-block;
}

.auth-brand-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-light-muted);
}

.auth-aside-title {
  margin: 0 0 0.7rem;
  font-size: clamp(1.5rem, 2.3vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-light);
}

.auth-aside-lead {
  color: var(--text-light-muted);
  margin: 0 0 1.65rem;
  font-size: 0.94rem;
  line-height: 1.55;
  max-width: 34ch;
}

.auth-spec-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-spec-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.68rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  color: #dcd8e0;
}

.auth-spec-idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--pink);
  flex-shrink: 0;
}

.auth-aside-footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.82rem;
  color: var(--text-light-muted);
  line-height: 1.5;
}

.auth-aside-footer strong {
  color: var(--text-light);
  display: block;
  margin-bottom: 0.18rem;
}

.auth-main {
  padding: 2.65rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-links-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.84rem;
}

.auth-links-row a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.16s ease;
}

.auth-links-row a:hover {
  color: var(--pink-hover);
}

.auth-gateway-card {
  background: var(--bg-editorial);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.auth-gateway-card:last-child {
  margin-bottom: 0;
}

.auth-gateway-card:hover {
  border-color: rgba(255, 45, 138, 0.45);
  background: var(--bg-light);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(8, 8, 14, 0.07);
}

.auth-gateway-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.auth-gateway-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #0c0a0d;
  color: var(--pink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-gateway-card h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.auth-gateway-card p {
  margin: 0 0 0.9rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input {
  padding-right: 4.5rem;
}

.password-toggle {
  position: absolute;
  right: 0.5rem;
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.28rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.role-switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.role-choice-card {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  cursor: pointer;
  background: var(--bg-editorial);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.role-choice-card.is-selected {
  border-color: var(--pink);
  background: var(--bg-light);
  box-shadow: 0 0 0 3px var(--pink-soft);
}

.brief-preview-card {
  position: sticky;
  top: 96px;
  background: var(--bg-pitch);
  color: var(--text-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-dark);
}

.brief-preview-row {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-dark);
  font-size: 0.88rem;
}

.brief-preview-row:last-child {
  border-bottom: none;
}

.brief-preview-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 0.2rem;
}

/* Footer */
.site-footer {
  background: var(--bg-pitch);
  color: var(--text-light);
  padding: 3.75rem 0 2.25rem;
  border-top: 1px solid var(--border-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-dark);
}

.footer-col h4 {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light-muted);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.48rem;
}

.footer-col a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--pink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.4rem;
  font-size: 0.84rem;
  color: var(--text-light-muted);
}

.social-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #110f13;
  border: 1px solid #29242c;
  color: #dcd8e0;
  text-decoration: none;
  transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

.social-btn:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: rgba(255, 45, 138, 0.1);
  transform: translateY(-2px);
}

/* Forms & Alerts */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-dark);
}

.field .help {
  font-size: 0.8rem;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
select,
textarea {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1px solid #29242c;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
  background: #0c0a0d;
  color: var(--text-light);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
select:focus,
textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-soft);
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.46rem 0.78rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
}

.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  border-left: 4px solid;
  font-size: 0.92rem;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-fg);
  border-color: var(--success-fg);
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger-fg);
  border-color: var(--danger-fg);
}

.alert-info {
  background: var(--info-bg);
  color: var(--info-fg);
  border-color: var(--info-fg);
}

.alert-warn {
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-color: var(--warn-fg);
}

/* Portal Shell & Role-Specific Workspaces */
.portal-body {
  background: var(--bg-muted);
}

.portal-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
}

.portal-sidebar {
  background: var(--bg-pitch);
  color: var(--text-light);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  border-right: 1px solid var(--border-dark);
}

.portal-identity-card {
  padding: 0.72rem 0.82rem;
  background: #110f13;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
}

.portal-identity-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}

.portal-identity-role {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.portal-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.portal-nav-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #857f8c;
  margin: 0.85rem 0 0.35rem 0.65rem;
}

.portal-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.56rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-light-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.portal-nav a:hover {
  background: #161318;
  color: var(--text-light);
}

.portal-nav a[aria-current="page"] {
  background: var(--pink-soft);
  color: var(--text-light);
  border-left: 3px solid var(--pink);
}

.portal-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.portal-topbar {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portal-content {
  padding: 1.5rem;
  max-width: 1320px;
  width: 100%;
}

.portal-mobile-toggle {
  display: none;
  background: var(--bg-pitch);
  color: var(--text-light);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.workspace-hero-card {
  background: var(--bg-pitch);
  color: var(--text-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
}

.returned-lead-card {
  border: 1px solid rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.08);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-bottom: 0.85rem;
}

.settlement-preview-box {
  background: #121013;
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--pink);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.crm-subcard {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #0c0a0d;
  margin-bottom: 0.9rem;
}

.crm-pill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  background: #151217;
  border: 1px solid #29242c;
  color: var(--text-light);
  border-radius: 6px;
  font-size: 0.8rem;
}

.crm-muted {
  color: var(--text-muted);
}

.queue-drawer {
  background: var(--bg-editorial);
  border-top: 1px solid var(--border-light);
  padding: 1.15rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.kpi-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  margin-top: 0.25rem;
  letter-spacing: -0.02em;
}

.table-wrap {
  overflow-x: auto;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.72rem 0.9rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

tbody tr {
  transition: background-color 0.14s ease;
}

tbody tr:hover {
  background: var(--bg-editorial);
}

th {
  background: var(--bg-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

td.mono,
th.mono {
  white-space: nowrap;
}

.status-pill {
  display: inline-block;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-submitted,
.status-pending,
.status-draft {
  background: var(--info-bg);
  color: var(--info-fg);
}

.status-under_review {
  background: rgba(168, 85, 247, 0.16);
  color: #d8b4fe;
}

.status-needs_changes,
.status-archived {
  background: var(--warn-bg);
  color: var(--warn-fg);
}

.status-approved,
.status-active,
.status-credit,
.status-sent,
.status-staging_captured {
  background: var(--success-bg);
  color: var(--success-fg);
}

.status-rejected,
.status-declined,
.status-reversal,
.status-failed,
.status-inactive {
  background: var(--danger-bg);
  color: var(--danger-fg);
}

.status-adjustment {
  background: rgba(168, 85, 247, 0.16);
  color: #d8b4fe;
}

/* Redesigned Aris Concierge Dock & Drawer */
.aris-dock {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
}

.aris-beacon {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  background: var(--bg-pitch);
  color: var(--text-light);
  border: 1.5px solid #29242c;
  border-radius: 999px;
  padding: 0.44rem 0.95rem 0.44rem 0.46rem;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 45, 138, 0.3);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.aris-beacon:hover {
  transform: translateY(-2px);
  border-color: var(--pink);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34), 0 0 0 3px var(--pink-glow);
}

.aris-beacon-emblem {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #121013;
  border: 2px solid var(--pink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aris-beacon-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.aris-beacon-pulse {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid var(--bg-pitch);
  animation: arisPulse 2.4s infinite ease-in-out;
}

@keyframes arisPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

.aris-beacon-copy {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.aris-beacon-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
}

.aris-beacon-sub {
  font-size: 0.72rem;
  color: var(--text-light-muted);
}

.aris-beacon-chevron {
  color: var(--pink);
  display: inline-flex;
  align-items: center;
}

.aris-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5.25rem;
  width: min(400px, calc(100vw - 1.75rem));
  max-height: calc(100vh - 6.25rem);
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 60;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.aris-panel.is-open {
  display: flex;
}

.aris-head {
  flex-shrink: 0;
  background: var(--bg-pitch);
  color: var(--text-light);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--pink);
}

.aris-head-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.aris-head-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--pink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #121013;
}

.aris-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.aris-head-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.aris-status-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: var(--pink-soft);
  color: #ff85bc;
  border: 1px solid rgba(255, 45, 138, 0.4);
}

.aris-head-sub {
  display: block;
  font-size: 0.74rem;
  color: var(--text-light-muted);
}

.aris-close-btn {
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--text-light);
  border-radius: var(--radius-sm);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.aris-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #121013;
  border-bottom: 1px solid var(--border-dark);
}

.aris-tab {
  background: transparent;
  border: none;
  color: var(--text-light-muted);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.55rem 0.4rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.aris-tab.is-active {
  color: var(--text-light);
  border-bottom-color: var(--pink);
}

.aris-body {
  flex: 1 1 auto;
  min-height: 140px;
  padding: 1rem;
  overflow-y: auto;
  font-size: 0.89rem;
  background: var(--bg-editorial);
}

.aris-msg {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  margin-bottom: 0.65rem;
}

.aris-msg-bot {
  background: #151217;
  color: var(--text-light);
  border: 1px solid var(--border-light);
}

.aris-msg-user {
  background: var(--pink);
  color: var(--text-light);
  margin-left: 2rem;
}

.aris-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.55rem 0;
}

.aris-chip {
  border: 1px solid #29242c;
  background: #121013;
  color: var(--text-light);
  border-radius: 999px;
  padding: 0.34rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.aris-chip:hover {
  border-color: var(--pink);
  color: #ff85bc;
}

.aris-chip.is-hidden {
  display: none;
}

.aris-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-light);
  background: #0c0a0d;
}

.aris-action-pill {
  background: #151217;
  border: 1px solid var(--border-dark);
  color: var(--text-light-muted);
  border-radius: 999px;
  padding: 0.24rem 0.62rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.aris-action-pill:hover,
.aris-action-pill[aria-expanded="true"] {
  color: var(--text-light);
  border-color: var(--pink);
}

.aris-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-light);
}

.aris-typing {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.82rem;
}

.aris-brief-drawer {
  flex-shrink: 0;
  padding: 0.85rem 1rem;
  background: #0c0a0d;
  border-top: 1px solid var(--border-light);
}

.aris-brief-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.82rem;
}

.aris-brief-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.aris-brief-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.aris-brief-drawer input,
.aris-brief-drawer textarea {
  font-size: 0.82rem;
  padding: 0.45rem 0.6rem;
}

.aris-brief-drawer textarea {
  min-height: 54px;
  margin-bottom: 0.5rem;
}

.aris-brief-error {
  color: var(--danger-fg);
  font-size: 0.78rem;
  margin-bottom: 0.45rem;
  font-weight: 600;
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-editorial {
    padding: 2.75rem 0 5rem;
  }

  .hero-editorial-grid,
  .explorer-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .service-index-list,
  .story-rail,
  .auth-split,
  .footer-grid,
  .form-grid,
  .role-switch-grid {
    grid-template-columns: 1fr;
  }

  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    display: none;
  }

  .portal-sidebar.is-open {
    display: flex;
  }

  .portal-mobile-toggle {
    display: inline-flex;
  }

  .explorer-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.6rem;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .explorer-nav::-webkit-scrollbar {
    display: none;
  }

  .explorer-tab {
    flex: 0 0 auto;
    width: auto;
    min-width: 215px;
    padding: 0.8rem 1rem;
    scroll-snap-align: start;
  }

  .explorer-tab-sub {
    display: none;
  }

  .explorer-pillars,
  .cadence-grid {
    grid-template-columns: 1fr;
  }

  .auth-section {
    padding: 2.25rem 0 3rem;
  }

  .auth-aside,
  .auth-main {
    padding: 1.85rem;
  }

  .auth-watermark-svg {
    width: 240px;
    height: 240px;
    right: -52px;
    bottom: -48px;
  }

  .aris-dock {
    right: 0.85rem;
    bottom: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
