/* ============================================================
   SHAHDAD AI — Design System (Light Mode)
   ============================================================ */
:root {
  /* Dark theme: deep navy canvas, frost text, gold + cyan accents */
  --bg-page:      #04101C;
  --bg-card:      rgba(14,46,78,0.55);
  --bg-soft:      rgba(0,212,255,0.05);
  --bg-tint:      rgba(10,37,64,0.5);

  --bg-portal:    #04101C;
  --bg-portal-2:  #0A2540;

  --navy:         #1A3A4E;
  --navy-light:   #2E5F6C;
  --text:         #EEF6FA;
  --text-soft:    #A8D5E8;
  --text-mute:    rgba(168,213,232,0.6);

  --cyan:         #00D4FF;
  --cyan-dark:    #00D4FF;
  --cyan-soft:    #5BA3BF;
  --cyan-tint:    rgba(0,212,255,0.15);

  --gold:         #C9A96E;
  --gold-soft:    #d8c08c;
  --gold-tint:    rgba(201,169,110,0.15);

  --sage:         #6B9E8A;
  --danger:       #FF6B6B;
  --danger-soft:  rgba(255,107,107,0.15);

  --frost:        #A8D5E8;
  --ice-white:    #EEF6FA;

  --line:         rgba(168,213,232,0.12);
  --line-strong:  rgba(168,213,232,0.22);
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 14px -4px rgba(0,0,0,0.4);
  --shadow-lg:    0 14px 36px -10px rgba(0,0,0,0.6);
  --shadow-gold:  0 8px 24px -8px rgba(201,169,110,0.45);
  --shadow-cyan:  0 8px 24px -8px rgba(0,212,255,0.45);

  --font-fa: "Vazirmatn", "IRANSansX", "Nazanin", "Tahoma", system-ui, sans-serif;
  --font-en: "Inter", "Poppins", system-ui, sans-serif;
  --font-display: "Poppins", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font-fa);
  font-feature-settings: "ss01","ss02";
  overflow: hidden;
  height: 100%;
}
html[dir="ltr"] body { font-family: var(--font-en); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; background: transparent; border: none; outline: none; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

#root {
  min-height: 100vh;
  background:
    radial-gradient(1200px 800px at 70% 10%, rgba(0,212,255,0.07), transparent 60%),
    radial-gradient(900px 700px at 10% 90%, rgba(201,169,110,0.06), transparent 60%),
    linear-gradient(180deg, #04101C 0%, #061a2e 50%, #04101C 100%);
}

/* ============================================================
   DECORATIVE BACKGROUND (faint cyan/gold dots + drifting rings)
   ============================================================ */
.bg-decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.bg-decor .dot {
  position: absolute; border-radius: 50%;
  background: var(--cyan);
  opacity: 0.5;
  animation: dot-pulse 4s ease-in-out infinite;
}
.bg-decor .dot.g { background: var(--gold); }
@keyframes dot-pulse {
  0%,100% { opacity: 0.15; transform: scale(0.8);}
  50%     { opacity: 0.6;  transform: scale(1.2);}
}

.bg-decor .ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.10);
  animation: ring-drift 60s linear infinite;
}
.bg-decor .ring.g { border-color: rgba(201,169,110,0.10); }
@keyframes ring-drift { to { transform: rotate(360deg); } }

.bg-decor svg.wires {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.18;
}
.bg-decor svg.wires path {
  stroke: var(--cyan); stroke-width: 1; fill: none;
  stroke-dasharray: 4 8;
  animation: wires-flow 22s linear infinite;
}
.bg-decor svg.wires path.gold { stroke: var(--gold); animation-duration: 28s; }
@keyframes wires-flow { to { stroke-dashoffset: -200; } }

/* ============================================================
   LOADING SCREEN
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  background:
    radial-gradient(900px 520px at 50% 44%, rgba(0,212,255,0.12), transparent 64%),
    radial-gradient(760px 420px at 50% 54%, rgba(201,169,110,0.08), transparent 68%),
    linear-gradient(180deg, #04101c 0%, #06182b 54%, #020a13 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.8s var(--ease), visibility 0.8s var(--ease);
}
.loader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.loader.hide .loader-mark {
  transform: translateY(-18px) scale(.92);
  opacity: 0;
}

.loader-mark {
  width: min(420px, 72vw);
  aspect-ratio: 2400 / 1559;
  position: relative;
  animation: markIn 1.4s var(--ease) both;
  transition: transform .55s var(--ease), opacity .45s var(--ease);
}
@keyframes markIn { from { transform: scale(0.6); opacity: 0;} to { transform: scale(1); opacity: 1;} }

.loader-mark .glow {
  position: absolute; inset: -30%;
  background: radial-gradient(circle, rgba(0,212,255,0.18), transparent 62%);
  filter: blur(34px);
  animation: pulseGlow 2.6s ease-in-out infinite;
}
@keyframes pulseGlow { 0%,100% { opacity: 0.45; transform: scale(0.85);} 50% { opacity: 0.9; transform: scale(1.08);} }

.loader-logo-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: saturate(1.04) contrast(1.02) drop-shadow(0 16px 28px rgba(0,0,0,.34)) drop-shadow(0 0 18px rgba(107,200,157,.18));
  animation: logoReveal .9s var(--ease) both, logoBreath 3.2s .9s ease-in-out infinite;
}
.loader-logo-shine {
  position: absolute;
  z-index: 3;
  left: 24%;
  right: 24%;
  bottom: 10%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(232,193,91,.2), rgba(232,193,91,.92), rgba(107,200,157,.2), transparent);
  box-shadow: 0 0 18px rgba(232,193,91,.48);
  animation: logoShine 2.8s ease-in-out infinite;
}
@keyframes logoBreath {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.012); }
}
@keyframes logoReveal {
  from { opacity: 0; transform: translateY(18px) scale(.96); filter: blur(8px) drop-shadow(0 0 0 rgba(0,212,255,0)); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0) saturate(1.04) contrast(1.02) drop-shadow(0 16px 28px rgba(0,0,0,.34)) drop-shadow(0 0 18px rgba(107,200,157,.18)); }
}
@keyframes logoShine {
  0%,100% { opacity: .35; transform: scaleX(.72); }
  50% { opacity: 1; transform: scaleX(1); }
}

.loader-mark svg {
  position: relative;
  z-index: 1;
  overflow: visible;
}
.loader-mark .ld-head {
  filter: drop-shadow(0 0 10px rgba(201,169,110,0.45));
  transform-origin: 110px 28px;
  animation: ldDrop 0.7s 0.15s var(--ease) both, ldGlow 2.8s 1s ease-in-out infinite;
}
.loader-mark .ld-spine,
.loader-mark .ld-d-bowl,
.loader-mark .ld-beam,
.loader-mark .ld-chains,
.loader-mark .ld-base {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  filter: drop-shadow(0 0 7px rgba(201,169,110,0.24));
  animation: ldDraw 1.15s 0.35s var(--ease) both;
}
.loader-mark .ld-d-bowl { animation-delay: 0.72s; }
.loader-mark .ld-beam { animation-delay: 0.55s; filter: drop-shadow(0 0 9px rgba(0,212,255,0.34)); }
.loader-mark .ld-chains { animation-delay: 0.9s; }
.loader-mark .ld-base { animation-delay: 1.05s; }
.loader-mark .ld-halo {
  animation: ldHalo 3s ease-in-out infinite;
  transform-origin: center;
}
.hemi { transform-origin: center; animation: think 2.6s ease-in-out infinite, ldPanIn 0.95s 0.95s var(--ease) both; }
.hemi.right { animation-delay: 0.3s, 1.05s; }
@keyframes think {
  0%,100% { transform: scaleY(1); opacity: 0.9; }
  50%     { transform: scaleY(1.06); opacity: 1; }
}
@keyframes ldDraw { to { stroke-dashoffset: 0; } }
@keyframes ldDrop {
  from { opacity: 0; transform: translateY(-18px) scale(0.74); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ldPanIn {
  from { opacity: 0; transform: translateY(10px) scale(0.86); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ldGlow {
  0%,100% { filter: drop-shadow(0 0 7px rgba(201,169,110,0.32)); }
  50% { filter: drop-shadow(0 0 16px rgba(201,169,110,0.66)); }
}
@keyframes ldHalo {
  0%,100% { opacity: .7; transform: scale(.98); }
  50% { opacity: 1; transform: scale(1.03); }
}

.loader-ring {
  position: absolute; inset: -8%;
  border-radius: 50%;
  border: 1px solid rgba(201,169,110,0.22);
  box-shadow: 0 0 40px rgba(107,200,157,.08), inset 0 0 30px rgba(232,193,91,.045);
  animation: loaderHalo 3.2s ease-in-out infinite, fadeIn 0.6s 0.5s var(--ease) both;
}
@keyframes loaderHalo {
  0%, 100% { opacity: .36; transform: scale(.985); }
  50% { opacity: .68; transform: scale(1.015); }
}
@keyframes fadeIn { from { opacity: 0;} to { opacity: 1;} }

.loader-word { display: none !important; }
.loader-type {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(8px);
  animation: typeIn .55s .55s var(--ease) both;
}
.loader-type-en {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 28px);
  font-weight: 300;
  letter-spacing: .34em;
  direction: ltr;
  color: var(--ice-white);
  text-shadow: 0 0 16px rgba(0,212,255,.22);
  padding-inline-start: .34em;
}
.loader-type-fa {
  font-size: clamp(11px, 1.2vw, 14px);
  font-weight: 400;
  color: var(--text-soft);
  letter-spacing: 0;
}
@keyframes typeIn {
  to { opacity: 1; transform: translateY(0); }
}
.loader-word span { display: none; }
@keyframes letter { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: translateY(0);} }

.loader-prog {
  margin-top: 12px;
  width: 220px; height: 2px;
  background: rgba(26,58,78,0.08); border-radius: 4px; overflow: hidden;
  opacity: 0; animation: fadeIn 0.4s 0.3s var(--ease) both;
}
.loader-prog i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); animation: load 2.8s var(--ease) both; }
@keyframes load { to { transform: scaleX(1); } }

.loader-enter {
  margin-top: 26px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--navy), #2E5F6C);
  color: var(--ice-white);
  border-radius: 14px;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 28px -8px rgba(26,58,78,0.35), 0 0 0 1px rgba(201,169,110,0.2);
  opacity: 0; animation: fadeIn 0.5s 1.8s var(--ease) both;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.loader-enter:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -8px rgba(26,58,78,0.45), 0 0 0 1px rgba(201,169,110,0.5); }
.loader-enter small { font-family: var(--font-en); font-size: 9.5px; opacity: 0.7; letter-spacing: 0.18em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  .loader-mark .ld-head,
  .loader-mark .ld-spine,
  .loader-mark .ld-d-bowl,
  .loader-mark .ld-beam,
  .loader-mark .ld-chains,
  .loader-mark .ld-base,
  .loader-mark .ld-halo,
  .loader-logo-img,
  .loader-logo-shine,
  .hemi,
  .loader-ring,
  .loader-word span,
  .loader-prog i {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ============================================================
   APP LAYOUT (no bottom nav anymore)
   ============================================================ */
.app {
  position: relative; z-index: 1;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 76px 1fr;
  overflow: hidden;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  grid-column: 1 / -1; grid-row: 1;
  display: grid; grid-template-columns: 264px 1fr auto; align-items: center;
  padding: 0 22px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(4,16,28,0.85), rgba(4,16,28,0.55));
  backdrop-filter: blur(12px);
  z-index: 5;
}

.brand { display: flex; align-items: center; justify-content: center; padding-inline-end: 14px; }
.brand-logo-img {
  width: 100px;
  height: 65px;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(0,0,0,.2)) drop-shadow(0 0 10px rgba(107,200,157,.12));
  flex-shrink: 0;
}
.brand-mark { width: 42px; height: 42px; flex-shrink: 0; }
.brand-mark svg { display: block; }
.brand-text { line-height: 1.15; }
.brand-text.brand-center { text-align: center; }
.brand-text.brand-center .name { justify-content: center; }
.brand-text .name {
  font-family: var(--font-display); font-weight: 500;
  font-size: 16px; letter-spacing: 0.16em;
  color: var(--ice-white);
  display: inline-flex; align-items: baseline; gap: 6px;
  direction: ltr;
  unicode-bidi: isolate;
}
.brand-text .name b { color: var(--gold); font-weight: 500; letter-spacing: 0.06em; font-family: var(--font-en); }
.brand-text .sub { font-size: 10.5px; color: var(--text-soft); margin-top: 3px; letter-spacing: 0.02em; }

.top-middle { display: flex; align-items: center; justify-content: center; padding: 0 24px; }

.searchbar {
  height: 38px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  transition: all 0.25s var(--ease);
  width: 100%; max-width: 640px;
  box-shadow: var(--shadow-sm);
}
.searchbar:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-tint), var(--shadow-md); max-width: 680px; }
.searchbar .search-ico {
  color: var(--text-soft); flex-shrink: 0; transform-origin: center;
  transition: color 0.25s var(--ease);
  animation: searchFloat 3.4s ease-in-out infinite;
}
.searchbar:focus-within .search-ico { color: var(--cyan); animation-duration: 1.6s; }
@keyframes searchFloat { 0%,100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.2) rotate(-12deg); } }
.searchbar input { width: 100%; font-size: 13px; color: var(--text); }
.searchbar input::placeholder { color: var(--text-mute); }
.searchbar .ai-chip {
  font-size: 9.5px; padding: 2px 6px; border-radius: 6px;
  background: var(--cyan-tint); color: var(--cyan-dark);
  font-weight: 700; letter-spacing: 0.08em;
  border: 1px solid rgba(0,212,255,0.3);
}

.title-center { text-align: center; line-height: 1.1; min-width: 220px; }
.title-center .t { font-size: 15px; font-weight: 500; color: var(--ice-white); letter-spacing: 0.04em; }
.title-center .ts { font-size: 11px; color: var(--gold); font-weight: 500; letter-spacing: 0.08em; margin-top: 4px; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.account-pill {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--ice-white);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(168,213,232,0.14);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.account-pill svg { color: var(--cyan-dark); }
.account-pill.plan { border-color: rgba(201,169,110,0.24); }
.account-pill.plan svg { color: var(--gold); }
.account-pill.locked { color: var(--text-soft); opacity: .82; }
.account-pill:hover { transform: translateY(-1px); border-color: var(--cyan); box-shadow: var(--shadow-cyan); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  display: grid; place-items: center;
  color: var(--text-soft);
  position: relative;
  transition: all 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.icon-btn:hover { color: var(--cyan-dark); border-color: var(--cyan); transform: translateY(-2px); box-shadow: var(--shadow-cyan); }
.icon-btn .badge {
  position: absolute; top: -4px; inset-inline-end: -4px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px;
  background: var(--danger); color: white; font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--bg-page);
}
.icon-btn .badge.gold { background: var(--gold); color: #1a1a1a; }
.icon-btn.ai {
  background: linear-gradient(135deg, var(--cyan-tint), var(--gold-tint));
  border-color: rgba(0,212,255,0.4); color: var(--cyan-dark);
  font-weight: 700; font-size: 11px; letter-spacing: 0.08em;
}

/* Top-bar dropdown popovers (notifications / recent activity) */
.tb-pop { position: relative; display: inline-flex; }
.icon-btn.active { color: var(--cyan-dark); border-color: var(--cyan); box-shadow: var(--shadow-cyan); }
.tb-dropdown {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0;
  width: 268px; padding: 8px; z-index: 80;
  border-radius: 14px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #0a2540, #061a2e);
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,255,0.06);
  animation: tbDrop 0.18s var(--ease) both;
}
@keyframes tbDrop { from { transform: translateY(-6px); } to { transform: translateY(0); } }
.tb-drop-head {
  font-size: 11px; font-weight: 600; color: var(--text-soft);
  letter-spacing: 0.04em; padding: 4px 8px 8px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.tb-drop-item {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 8px; border-radius: 9px; transition: background 0.15s var(--ease);
}
.tb-drop-item:hover { background: var(--bg-soft); }
.tb-pin, .tb-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.tb-dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.notif-warn .tb-pin   { background: var(--gold);   box-shadow: 0 0 8px var(--gold); }
.notif-danger .tb-pin { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.notif-ok .tb-pin     { background: var(--sage);   box-shadow: 0 0 8px var(--sage); }
.tb-line, .tb-txt { font-size: 11px; line-height: 1.45; color: var(--ice-white); }
.tb-time { font-size: 9.5px; color: var(--text-mute); margin-top: 2px; }

.lang-toggle {
  height: 42px; padding: 0 4px; border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  display: inline-flex; align-items: center;
  box-shadow: var(--shadow-sm);
}
.lang-toggle button {
  height: 34px; padding: 0 12px; border-radius: 9px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--text-soft); transition: all 0.2s var(--ease);
}
.lang-toggle button.on {
  background: linear-gradient(135deg, var(--gold), #b3935a); color: #1a1a1a;
  box-shadow: var(--shadow-gold);
}

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 30px;
  border: 1px solid var(--line); background: var(--bg-card);
  cursor: pointer; transition: all 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.user-chip:hover { border-color: var(--gold); box-shadow: var(--shadow-gold); }
.user-chip .av {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--cyan-dark));
  display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--ice-white);
  position: relative;
}
.user-chip .av::after {
  content: ""; position: absolute; bottom: -1px; inset-inline-end: -1px;
  width: 10px; height: 10px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 2px var(--bg-card);
}
.user-chip .meta { line-height: 1.15; }
.user-chip .nm { font-size: 13px; font-weight: 500; color: var(--ice-white); white-space: nowrap; }
.user-chip .rl { font-size: 10.5px; color: var(--frost); opacity: 0.7; margin-top: 2px; white-space: nowrap; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  grid-row: 2; grid-column: 1;
  padding: 18px 14px;
  border-inline-end: 1px solid var(--line);
  overflow-y: auto;
  background: rgba(4,16,28,0.5);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--text-soft); font-size: 12.5px; font-weight: 400;
  transition: all 0.18s var(--ease); cursor: pointer; position: relative;
  border: 1px solid transparent;
  text-align: start;
}
.nav-item .ico { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item .lbl { flex: 1; }
.nav-item .sub-lbl { font-size: 10px; color: var(--text-mute); margin-top: 2px; display: block; }
.nav-item:hover { background: var(--bg-soft); color: var(--ice-white); }
.nav-item.active {
  background: linear-gradient(90deg, var(--gold-tint), transparent);
  border-color: rgba(201,169,110,0.35);
  color: var(--gold-soft);
}
.nav-item.active .ico { color: var(--gold); }
.nav-item.active::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 9px; bottom: 9px;
  width: 3px; background: var(--gold); border-radius: 4px; box-shadow: 0 0 10px var(--gold);
}

.tag-new {
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 5px;
  background: var(--gold); color: #1a1a1a; letter-spacing: 0.05em; margin-inline-start: 6px;
  box-shadow: 0 0 12px rgba(201,169,110,0.4);
}

.sidebar-ai {
  margin-top: 18px; padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,212,255,0.3);
  background: linear-gradient(135deg, var(--cyan-tint), var(--bg-card));
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.sidebar-ai::before {
  content:""; position: absolute; inset: -30%;
  background: radial-gradient(circle, rgba(0,212,255,0.18), transparent 60%);
  animation: pulseGlow 3s ease-in-out infinite;
}
.sidebar-ai .head { display: flex; align-items: center; gap: 10px; position: relative; }
.sidebar-ai .botico {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--navy));
  display: grid; place-items: center;
  box-shadow: 0 0 16px rgba(0,212,255,0.45);
}
.sidebar-ai h4 { font-size: 12.5px; color: var(--ice-white); font-weight: 600; }
.sidebar-ai p { font-size: 10.5px; color: var(--text-soft); margin-top: 8px; position: relative; line-height: 1.55; }
.sidebar-ai button {
  margin-top: 12px; width: 100%; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
  color: white; font-weight: 600; font-size: 12px; position: relative;
  box-shadow: var(--shadow-cyan);
  transition: transform 0.2s var(--ease);
}
.sidebar-ai button:hover { transform: translateY(-1px); }

/* ============================================================
   MAIN
   ============================================================ */
.main {
  grid-row: 2; grid-column: 1;
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-rows: 1fr;
  gap: 14px;
  padding: 16px 22px;
  overflow: hidden;
  min-height: 0; min-width: 0;
}

.portal-area {
  grid-column: 1; grid-row: 1 / -1;
  min-height: 0; position: relative; overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 50%, var(--bg-portal-2) 0%, var(--bg-portal) 70%),
    var(--bg-portal);
  border: 1px solid rgba(0,212,255,0.18);
  box-shadow: 0 24px 60px -20px rgba(4,16,28,0.45), 0 0 0 1px rgba(0,212,255,0.12), inset 0 0 60px rgba(0,212,255,0.06);
}

.right-col { grid-column: 2; grid-row: 1 / -1; overflow: hidden; min-height: 0; position: relative; }
.rc-fit { display: flex; flex-direction: column; gap: 10px; height: 100%; transform-origin: top center; }
html[dir="rtl"] .rc-fit { transform-origin: top right; }
html[dir="ltr"] .rc-fit { transform-origin: top left; }
.bottom-row { display: grid; grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) auto; gap: 10px; min-height: 0; flex: 1; }
.bottom-row > *:first-child { min-height: 0; overflow: hidden; }

/* ============================================================
   QUICK ACTIONS
   ============================================================ */
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.qa {
  height: 68px; border-radius: 12px; padding: 9px 10px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--ice-white); position: relative; overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer; transition: all 0.2s var(--ease);
  text-align: start;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}
.qa::before { content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0.95; }
.qa:nth-child(1)::before { background: linear-gradient(135deg, var(--navy), var(--navy-light)); }
.qa:nth-child(2)::before { background: linear-gradient(135deg, #1A3A4E, var(--cyan-dark)); }
.qa:nth-child(3)::before { background: linear-gradient(135deg, #1A3A4E, var(--sage)); }
.qa:nth-child(4)::before { background: linear-gradient(135deg, #1A3A4E, var(--gold)); }
.qa > * { position: relative; z-index: 1; }
.qa .icoR {
  width: 28px; height: 28px; border-radius: 9px;
  background: rgba(255,255,255,0.16);
  display: grid; place-items: center; backdrop-filter: blur(4px);
}
.qa .lbl { font-size: 12px; font-weight: 500; line-height: 1.25; }
.qa:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -12px rgba(26,58,78,0.25); }
.qa .dot { position: absolute; top: 8px; inset-inline-end: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px rgba(0,0,0,0.3), 0 0 8px var(--danger); }

/* ============================================================
   PANELS (cards on white)
   ============================================================ */
.panel {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 14px;
  box-shadow: var(--shadow-md);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel-head h3 { font-size: 12.5px; font-weight: 600; color: var(--ice-white); letter-spacing: 0.04em; }
.panel-head .more { font-size: 11px; color: var(--cyan-dark); cursor: pointer; transition: color 0.2s; }
.panel-head .more:hover { color: var(--cyan); }

/* ============================================================
   MODULE GRID (24 items)
   ============================================================ */
.module-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  flex: 1; overflow-y: auto; overflow-x: hidden;
  min-height: 0; min-width: 0;
}
.module-grid::-webkit-scrollbar { width: 4px; }
.module-grid::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.mod {
  aspect-ratio: 1; border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 6px;
  color: var(--text-soft);
  transition: all 0.2s var(--ease);
  cursor: pointer; position: relative;
}
.mod:hover {
  border-color: var(--cyan); color: var(--ice-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-cyan);
}
.mod .ico { width: 22px; height: 22px; }
.mod .lbl { font-size: 9px; text-align: center; line-height: 1.15; color: var(--ice-white); font-weight: 500; }
.mod .new { position: absolute; top: 6px; inset-inline-end: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.mod.t1 .ico { color: var(--sage); }
.mod.t2 .ico { color: var(--cyan-dark); }
.mod.t3 .ico { color: var(--gold); }
.mod.t4 .ico { color: var(--cyan-soft); }
.mod.t5 .ico { color: #b08fc7; }

/* ============================================================
   BOTTOM ROW
   ============================================================ */
.bottom-row .panel { padding: 10px 12px; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.bottom-row .panel-head h3 { font-size: 10.5px; }
.bottom-row .panel-head { margin-bottom: 6px; }

.stats-card.stats-social-proof {
  --proof-mint: #b8ebd7;
  --proof-lilac: #d7cdfb;
  --proof-white: #f6faf8;
  --proof-soft: #a8bec1;
  --proof-line: rgba(184, 235, 215, 0.14);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 14px 15px;
  border-color: var(--proof-line);
  background:
    radial-gradient(circle at 10% 6%, rgba(184, 235, 215, 0.09), transparent 36%),
    radial-gradient(circle at 92% 92%, rgba(215, 205, 251, 0.075), transparent 38%),
    linear-gradient(160deg, rgba(7, 22, 27, 0.99), rgba(5, 18, 28, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 18px 45px -32px rgba(0, 0, 0, 0.9);
}
.stats-card.stats-social-proof::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: 0.17;
  background-image: linear-gradient(rgba(184,235,215,0.13) 1px, transparent 1px);
  background-size: 100% 32px;
  -webkit-mask-image: linear-gradient(125deg, #000, transparent 60%);
  mask-image: linear-gradient(125deg, #000, transparent 60%);
  pointer-events: none;
}
.proof-ambient {
  position: absolute;
  z-index: -1;
  width: 170px;
  height: 170px;
  inset-block-start: -96px;
  inset-inline-end: -72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215,205,251,0.15), rgba(184,235,215,0.025) 48%, transparent 70%);
  filter: blur(2px);
  animation: proofAmbientBreath 12s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes proofAmbientBreath {
  from { transform: scale(0.94); opacity: 0.58; }
  to { transform: scale(1.07); opacity: 0.92; }
}

.proof-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.proof-head > div { min-width: 0; }
.proof-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--proof-mint);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.055em;
}
.proof-head h3 {
  color: var(--proof-white);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}
.proof-period {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid rgba(215, 205, 251, 0.18);
  border-radius: 999px;
  color: var(--proof-lilac);
  background: rgba(215, 205, 251, 0.055);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}
.proof-summary {
  position: relative;
  z-index: 1;
  margin: 6px 0 0;
  color: rgba(219, 234, 235, 0.74);
  font-size: 11px;
  line-height: 1.5;
}

.proof-stages {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  margin: 11px 0 0;
  padding: 4px 0 0;
}
.proof-stages::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline: 10%;
  inset-block-start: 47%;
  height: 1px;
  background: linear-gradient(90deg, rgba(184,235,215,0.18), rgba(215,205,251,0.5), rgba(184,235,215,0.18));
  pointer-events: none;
}
.proof-stage {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 84px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 5px;
  border: 1px solid rgba(184, 235, 215, 0.12);
  border-radius: 13px;
  text-align: center;
  background: rgba(12, 34, 40, 0.88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}
.proof-stage.is-tools {
  min-height: 90px;
  transform: translateY(-2px);
  border-color: rgba(184, 235, 215, 0.3);
  background: linear-gradient(155deg, rgba(25, 61, 61, 0.9), rgba(12, 34, 42, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 10px 26px -22px rgba(184, 235, 215, 0.75);
}
.proof-stage-icon {
  order: 1;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(184, 235, 215, 0.18);
  border-radius: 8px;
  color: var(--proof-mint);
  background: rgba(184, 235, 215, 0.06);
}
.proof-stage.is-transactions .proof-stage-icon {
  border-color: rgba(215, 205, 251, 0.2);
  color: var(--proof-lilac);
  background: rgba(215, 205, 251, 0.065);
}
.proof-stage-copy {
  order: 3;
  min-width: 0;
}
.proof-stage-copy dt {
  color: rgba(238, 247, 246, 0.88);
  font-size: 10.5px;
  font-weight: 680;
  line-height: 1.28;
}
.proof-stage-copy span {
  display: block;
  margin-top: 1px;
  color: rgba(168, 190, 193, 0.72);
  font-size: 9.5px;
  line-height: 1.28;
}
.proof-stage dd {
  order: 2;
  margin: 0;
  color: var(--proof-white);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.proof-stage.is-tools dd {
  color: var(--proof-mint);
  font-size: 23px;
}

.proof-breakdown {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid rgba(215, 205, 251, 0.12);
  border-radius: 13px;
  background: rgba(7, 22, 29, 0.58);
}
.proof-breakdown::before {
  content: "";
  position: absolute;
  inset-block-start: -11px;
  inset-inline-start: 50%;
  width: 1px;
  height: 10px;
  background: linear-gradient(var(--proof-mint), rgba(184,235,215,0.15));
  pointer-events: none;
}
.proof-breakdown > header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(224, 238, 239, 0.76);
}
.proof-breakdown > header > span {
  display: grid;
  place-items: center;
  color: var(--proof-lilac);
}
.proof-breakdown h4 {
  font-size: 10.5px;
  font-weight: 680;
  line-height: 1.35;
}
.proof-tool-branches {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 7px 0 0;
}
.proof-tool {
  display: flex;
  min-width: 0;
  min-height: 61px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  border: 1px solid rgba(184, 235, 215, 0.1);
  border-radius: 10px;
  text-align: center;
  background: rgba(255,255,255,0.022);
}
.proof-tool > span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  color: var(--proof-mint);
  background: rgba(184, 235, 215, 0.06);
}
.proof-tool.is-calculators > span {
  color: var(--proof-lilac);
  background: rgba(215, 205, 251, 0.065);
}
.proof-tool.is-other-tools > span { color: var(--proof-soft); }
.proof-tool dt {
  min-height: 2.45em;
  color: rgba(216, 231, 233, 0.78);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.22;
}
.proof-tool dd {
  margin: 0;
  color: var(--proof-white);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 720;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.proof-provenance {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(184, 235, 215, 0.09);
}
.proof-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  min-height: 23px;
  padding: 3px 6px;
  border: 1px solid rgba(215, 205, 251, 0.16);
  border-radius: 999px;
  color: var(--proof-lilac);
  background: rgba(215, 205, 251, 0.045);
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}
.proof-provenance p {
  min-width: 0;
  margin: 0;
  color: rgba(168, 190, 193, 0.7);
  font-size: 9.5px;
  line-height: 1.4;
}

@media (max-width: 540px) {
  .stats-card.stats-social-proof { padding: 16px 14px; }
  .proof-head h3 { font-size: 16px; }
  .proof-kicker,
  .proof-period,
  .proof-stage-copy dt,
  .proof-breakdown h4 { font-size: 11px; }
  .proof-summary { font-size: 12px; }
  .proof-stages {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0;
  }
  .proof-stages::before {
    inset-block: 28px;
    inset-inline-start: 21px;
    inset-inline-end: auto;
    width: 1px;
    height: auto;
  }
  .proof-stage,
  .proof-stage.is-tools {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    min-height: 62px;
    gap: 2px 9px;
    padding: 9px 10px;
    transform: none;
    text-align: start;
  }
  .proof-stage-icon {
    grid-column: 1;
    grid-row: 1 / 3;
    order: initial;
    align-self: center;
  }
  .proof-stage-copy {
    grid-column: 2;
    grid-row: 1 / 3;
    order: initial;
    align-self: center;
  }
  .proof-stage-copy span { font-size: 10.5px; }
  .proof-stage dd,
  .proof-stage.is-tools dd {
    grid-column: 3;
    grid-row: 1 / 3;
    order: initial;
    align-self: center;
    font-size: 23px;
  }
  .proof-tool dt,
  .proof-status,
  .proof-provenance p { font-size: 10.5px; }
  .proof-tool dd { font-size: 17px; }
}
@media (max-width: 360px) {
  .proof-period { padding-inline: 6px; }
  .proof-tool-branches { gap: 4px; }
  .proof-tool { padding-inline: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .proof-ambient { animation: none !important; }
}

/* v31.104 — quiet social-proof schematic.
   This intentionally flattens the earlier card-within-card exploration. */
.stats-card.stats-social-proof {
  --proof-mint: #c8f0df;
  --proof-lilac: #ded6fb;
  padding: 15px 16px;
  border-color: rgba(200, 240, 223, 0.22);
  background:
    linear-gradient(145deg, rgba(31, 70, 72, 0.86), rgba(18, 43, 55, 0.9)),
    rgba(20, 49, 57, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(118%);
  backdrop-filter: blur(16px) saturate(118%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.075),
    0 18px 42px -30px rgba(0,0,0,0.72);
}
.stats-card.stats-social-proof::after { display: none; }
.proof-kicker { margin-bottom: 1px; font-size: 10px; letter-spacing: 0.04em; }
.proof-head h3 { color: #f8fcfa; font-size: 15px; }
.proof-period {
  min-height: 25px;
  padding: 3px 8px;
  border-color: rgba(222,214,251,0.2);
  color: rgba(240,235,255,0.9);
  background: rgba(222,214,251,0.07);
  font-size: 10px;
}

.proof-flow {
  position: relative;
  margin-top: 17px;
}
.proof-track {
  position: absolute;
  z-index: 0;
  inset-inline: 15%;
  inset-block-start: 11px;
  height: 1px;
  background: linear-gradient(90deg, rgba(200,240,223,0.24), rgba(222,214,251,0.56), rgba(200,240,223,0.24));
  pointer-events: none;
}
.proof-track i {
  position: absolute;
  inset-block-start: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b8e3d2;
  transform: translate(50%, -50%);
  box-shadow: 0 0 0 3px rgba(28,64,68,0.96);
}
html[dir="ltr"] .proof-track i { transform: translate(-50%, -50%); }
.proof-track i:nth-child(1) { inset-inline-start: 0; }
.proof-track i:nth-child(2) { inset-inline-start: 50%; background: var(--proof-mint); }
.proof-track i:nth-child(3) { inset-inline-start: 100%; background: var(--proof-lilac); }

.proof-stages {
  z-index: 1;
  align-items: start;
  gap: 5px;
  margin: 0;
  padding: 0;
}
.proof-stages::before { display: none; }
.proof-stage,
.proof-stage.is-tools {
  min-height: 72px;
  gap: 4px;
  padding: 0 3px;
  border: 0;
  border-radius: 0;
  transform: none;
  background: transparent;
  box-shadow: none;
}
.proof-stage-icon {
  order: 1;
  width: 23px;
  height: 23px;
  border: 0;
  border-radius: 50%;
  color: var(--proof-mint);
  background: rgba(16, 42, 48, 0.58);
}
.proof-stage.is-transactions .proof-stage-icon {
  border: 0;
  color: var(--proof-lilac);
  background: rgba(16, 42, 48, 0.58);
}
.proof-stage dt {
  order: 3;
  min-height: 2.45em;
  color: rgba(238, 247, 244, 0.82);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.22;
}
.proof-stage dd,
.proof-stage.is-tools dd {
  order: 2;
  margin: 1px 0 0;
  color: var(--proof-white);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 720;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.proof-stage.is-tools dd {
  color: var(--proof-mint);
  font-size: 25px;
}

.proof-mix {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(200,240,223,0.14);
}
.proof-mix > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.proof-mix h4 {
  color: rgba(244, 250, 248, 0.84);
  font-size: 11px;
  font-weight: 650;
}
.proof-mix-bar {
  display: flex;
  gap: 2px;
  height: 4px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}
.proof-mix-bar i {
  display: block;
  width: var(--proof-share);
  height: 100%;
  background: var(--proof-mint);
}
.proof-mix-bar i.is-calculators { background: var(--proof-lilac); }
.proof-mix-bar i.is-other-tools { background: #8ea7aa; }
.proof-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0 0;
}
.proof-legend-item { min-width: 0; }
.proof-legend-item dt {
  display: flex;
  min-height: 2.4em;
  align-items: flex-start;
  gap: 4px;
  color: rgba(232,243,241,0.76);
  font-size: 10.5px;
  font-weight: 550;
  line-height: 1.2;
}
.proof-legend-item dt span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--proof-mint);
}
.proof-legend-item.is-calculators dt span { color: var(--proof-lilac); }
.proof-legend-item.is-other-tools dt span { color: #8ea7aa; }
.proof-legend-item dd {
  margin: 4px 0 0;
  color: rgba(250,253,252,0.96);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 680;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.proof-provenance {
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top-color: rgba(200, 240, 223, 0.12);
}
.proof-status {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--proof-lilac);
  background: transparent;
}
.proof-provenance p {
  color: rgba(226, 239, 237, 0.72);
  font-size: 10px;
  line-height: 1.35;
}

@media (max-width: 540px) {
  .stats-card.stats-social-proof { padding: 15px 14px; }
  .proof-head h3 { font-size: 15px; }
  .proof-kicker, .proof-period { font-size: 10px; }
  .proof-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .proof-stages::before { display: none; }
  .proof-stage,
  .proof-stage.is-tools {
    display: flex;
    min-height: 76px;
    gap: 4px;
    padding: 0 2px;
    transform: none;
    text-align: center;
  }
  .proof-stage-icon,
  .proof-stage-copy,
  .proof-stage dd,
  .proof-stage.is-tools dd {
    grid-column: auto;
    grid-row: auto;
    align-self: auto;
    order: initial;
  }
  .proof-stage-icon { order: 1; }
  .proof-stage dt { order: 3; font-size: 10.5px; }
  .proof-stage dd,
  .proof-stage.is-tools dd { order: 2; font-size: 21px; }
  .proof-stage.is-tools dd { font-size: 26px; }
  .proof-mix h4 { font-size: 11px; }
  .proof-legend-item dt,
  .proof-provenance p { font-size: 10px; }
  .proof-legend-item dd { font-size: 15px; }
}
@media (max-width: 360px) {
  .proof-head { gap: 6px; }
  .proof-period { padding-inline: 5px; }
  .proof-legend { gap: 4px; }
  .proof-legend-item dt { font-size: 9.5px; }
}

.feed-item { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.feed-item:last-child { border-bottom: none; }
.feed-item .dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.feed-item .txt { font-size: 10px; line-height: 1.4; color: var(--ice-white); }
.feed-item .time { font-size: 9px; color: var(--text-mute); margin-top: 1px; }

.ai-widget {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 8px; text-align: center; cursor: pointer; flex: 1;
}
.ai-circle {
  width: 48px; height: 48px; border-radius: 50%;
  background: radial-gradient(circle, var(--cyan) 0%, var(--navy) 75%);
  display: grid; place-items: center; color: white; font-weight: 700; font-size: 13px;
  font-family: var(--font-display); letter-spacing: 0.08em;
  position: relative; animation: aiPulse 2.4s ease-in-out infinite;
}
.ai-circle::before, .ai-circle::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.5);
  animation: ripple 2.4s ease-out infinite;
}
.ai-circle::after { animation-delay: 1.2s; }
@keyframes aiPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(0,212,255,0.5); } 50% { box-shadow: 0 0 28px 8px rgba(0,212,255,0.4); } }
@keyframes ripple  { 0% { inset: -6px; opacity: 0.7;} 100% { inset: -22px; opacity: 0;} }
.ai-widget h4 { font-size: 11px; color: var(--ice-white); font-weight: 500; }
.ai-widget p  { font-size: 9.5px; color: var(--text-soft); line-height: 1.4; }

.notif-item { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.notif-item .pin { width: 6px; height: 6px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.notif-item.warn .pin   { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.notif-item.danger .pin { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.notif-item.ok .pin     { background: var(--sage); box-shadow: 0 0 8px var(--sage); }
.notif-item .txt { font-size: 9.5px; line-height: 1.4; color: var(--ice-white); }

/* Clock row above calendar */
.cal-card { gap: 4px; }
.clock-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 6px; margin-bottom: 4px;
  border-bottom: 1px dashed var(--line);
}
.clock-time {
  font-family: var(--font-display); font-weight: 500; font-size: 19px;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffffff, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 22px rgba(0,212,255,0.18);
}
.clock-tz {
  font-size: 9px; letter-spacing: 0.12em; color: var(--gold);
  opacity: 0.85; font-weight: 500;
}

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cal-head .m { font-size: 10px; color: var(--ice-white); font-weight: 500; }
.cal-head .nav { display: flex; gap: 4px; }
.cal-head .nav button { width: 18px; height: 18px; border-radius: 4px; color: var(--text-soft); display: grid; place-items: center; }
.cal-head .nav button:hover { background: var(--bg-soft); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; font-size: 9px; text-align: center; }
.cal-grid .dow { color: var(--text-mute); padding: 1px 0; font-weight: 600; }
.cal-grid .d { padding: 2px 0; border-radius: 4px; color: var(--text-soft); cursor: pointer; transition: all 0.15s; position: relative; }
.cal-grid .d.has-event::after { content: ""; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%); width: 3px; height: 3px; border-radius: 50%; background: var(--cyan); }
.cal-grid .d.today { background: var(--cyan-dark); color: white; font-weight: 700; }
.cal-grid .d.sel   { border: 1px solid var(--cyan); color: var(--cyan-dark); }
.cal-grid .d:hover { background: var(--cyan-tint); }
.cal-grid .d.mute  { opacity: 0.25; }
.cal-grid .d.has-plan { border: 1px solid rgba(var(--mini-plan-rgb),0.78); background: var(--mini-plan-fill); color: #fff; font-weight: 750; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), 0 2px 8px rgba(var(--mini-plan-rgb),0.2); text-shadow: 0 1px 4px rgba(0,0,0,0.48); }
.cal-grid .d.has-plan::after { display: none; }
.cal-grid .d.has-plan[data-mixed="true"] { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2), 0 2px 9px rgba(var(--mini-plan-rgb),0.24); }
.cal-grid .d.today.has-plan { background: var(--mini-plan-fill); color: #fff; outline: 1px solid rgba(255,255,255,0.92); outline-offset: 1px; }
.cal-grid .d.has-plan:hover { background: var(--mini-plan-fill); filter: brightness(1.16); transform: translateY(-1px); }

/* Clickable cal-card (opens calendar/agenda panel) */
.cal-card.clickable { cursor: pointer; transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease); }
.cal-card.clickable:hover { border-color: var(--cyan); box-shadow: var(--shadow-cyan); transform: translateY(-2px); }
.cal-card.clickable:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Advanced calendar uses the full workspace instead of the generic compact modal. */
.modal.calendar-modal { width: min(1440px, calc(100vw - 20px)); height: min(920px, calc(100dvh - 20px)); max-height: calc(100dvh - 20px); overflow: hidden; }
.modal.calendar-modal .modal-head { flex: 0 0 auto; padding: 12px 18px; }
.modal.calendar-modal .modal-body { min-height: 0; padding: 0; overflow: hidden; }
.modal.calendar-modal .pc-shell { width: 100%; height: 100%; min-height: 0; max-height: none; border: 0; border-radius: 0; }
@media (max-width: 820px) {
  .modal.calendar-modal { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .modal.calendar-modal .modal-head { padding: 9px 11px; }
}

/* Let the advanced calendar fill the larger modal instead of keeping compact card metrics. */
.modal.calendar-modal .pc-workspace {
  height: 100%;
  grid-template-columns: clamp(168px, 14vw, 210px) minmax(500px, 1.9fr) clamp(245px, 21vw, 320px);
}
.modal.calendar-modal .pc-sidebar,
.modal.calendar-modal .pc-calendar,
.modal.calendar-modal .pc-agenda { height: 100%; min-height: 0; }
.modal.calendar-modal .pc-sidebar { grid-template-rows: auto minmax(0, 1fr) auto; align-content: stretch; }
.modal.calendar-modal .pc-sidebar nav { align-content: start; }
.modal.calendar-modal .pc-calendar { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.modal.calendar-modal .pc-grid {
  width: 100%;
  height: 100%;
  min-height: 0;
  align-content: stretch;
  grid-auto-rows: minmax(58px, 1fr);
  gap: clamp(4px, .45vw, 8px);
  padding: clamp(6px, .7vw, 11px);
}
.modal.calendar-modal .pc-day {
  width: 100%;
  height: 100%;
  min-height: 0;
  align-content: start;
  gap: clamp(5px, .65vh, 9px);
  padding: clamp(7px, .7vw, 11px);
  border-radius: clamp(9px, .8vw, 13px);
}
.modal.calendar-modal .pc-day > strong { font-size: clamp(.76rem, .78vw, .94rem); }
.modal.calendar-modal .pc-day i { font-size: clamp(.55rem, .58vw, .7rem); line-height: 1.55; }
.modal.calendar-modal .pc-calendar h3,
.modal.calendar-modal .pc-agenda h3 { font-size: clamp(.92rem, .9vw, 1.08rem); }
.modal.calendar-modal .pc-agenda { grid-template-rows: auto minmax(0, 1fr); }
.modal.calendar-modal .pc-list { height: 100%; min-height: 0; padding: clamp(10px, .8vw, 15px); }
.modal.calendar-modal .pc-card { padding: clamp(11px, .9vw, 16px); }
@media (max-width: 1100px) and (min-width: 821px) {
  .modal.calendar-modal .pc-workspace { grid-template-columns: 164px minmax(390px, 1.65fr) minmax(220px, .72fr); }
  .modal.calendar-modal .pc-grid { grid-auto-rows: minmax(50px, 1fr); }
  .modal.calendar-modal .pc-day { padding: 6px; }
}
@media (max-width: 820px) {
  .modal.calendar-modal .pc-workspace { height: auto; }
  .modal.calendar-modal .pc-sidebar,
  .modal.calendar-modal .pc-calendar,
  .modal.calendar-modal .pc-agenda { height: auto; }
  .modal.calendar-modal .pc-grid { height: auto; grid-auto-rows: minmax(52px, auto); gap: 3px; padding: 5px; }
  .modal.calendar-modal .pc-day { height: auto; min-height: 52px; padding: 5px; border-radius: 8px; }
}
@media (max-height: 760px) and (min-width: 821px) {
  .modal.calendar-modal .pc-grid { grid-auto-rows: minmax(40px, 1fr); padding-block: 4px; }
  .modal.calendar-modal .pc-day { padding-block: 4px; gap: 3px; }
}

/* Calendar / clock module popup */
.cal-clock {
  padding: 14px 18px; border-radius: 14px; min-width: 170px;
  border: 1px solid rgba(0,212,255,0.3);
  background: linear-gradient(135deg, var(--cyan-tint), var(--bg-soft));
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.cal-clock .cc-time { font-family: var(--font-display); font-size: 30px; font-weight: 600; color: var(--ice-white); letter-spacing: 0.04em; }
.cal-clock .cc-zone { font-size: 10px; color: var(--cyan-dark); letter-spacing: 0.04em; }
.cal-clock .cc-date { font-size: 12px; color: var(--text-soft); margin-top: 2px; }

.cal-split { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.cal-month { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--bg-soft); }
.cal-month .cal-grid { font-size: 12.5px; gap: 2px; margin-top: 4px; }
.cal-month .cal-grid .d { padding: 7px 0; border-radius: 6px; }
.cal-month .cal-grid .dow { padding: 4px 0; font-size: 11px; }
.cal-month .cal-grid .d.has-event::after { width: 4px; height: 4px; bottom: 2px; }
.cal-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 10px; color: var(--text-soft); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend .lg { width: 8px; height: 8px; border-radius: 50%; }
.cal-legend .lg.today { background: var(--cyan-dark); }
.cal-legend .lg.ev { background: var(--cyan); }

.cal-agenda { display: flex; flex-direction: column; gap: 8px; }
.agenda-title { font-size: 12.5px; font-weight: 600; color: var(--ice-white); margin-bottom: 2px; }
.agenda-item {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-card);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.agenda-item:hover { border-color: var(--cyan); box-shadow: var(--shadow-cyan); }
.agenda-item .ag-date { width: 48px; flex-shrink: 0; text-align: center; border-inline-end: 1px solid var(--line); padding-inline-end: 10px; }
.agenda-item .ag-day { font-family: var(--font-display); font-size: 21px; font-weight: 600; color: var(--cyan-dark); line-height: 1; }
.agenda-item .ag-mon { font-size: 9.5px; color: var(--text-mute); margin-top: 3px; }
.agenda-item .ag-body { flex: 1; min-width: 0; }
.agenda-item .ag-title { font-size: 12.5px; color: var(--ice-white); font-weight: 500; }
.agenda-item .ag-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.agenda-item .ag-time { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--text-soft); }
.agenda-item .ag-meta .pill { display: inline-flex; align-items: center; gap: 4px; }
.agenda-item .ag-case { font-size: 10px; color: var(--gold); font-weight: 600; }

@media (max-width: 640px) {
  .cal-split { grid-template-columns: 1fr; }
}

/* ============================================================
   PORTAL (HEX WHEEL) — kept dark for hero contrast
   ============================================================ */
.portal { position: absolute; inset: 0; display: grid; place-items: center; }
.portal-center { width: 460px; height: 460px; position: relative; }

.ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(0,212,255,0.28); }
.ring.r1 { inset: 0; border-style: dashed; animation: rspin 60s linear infinite; }
.ring.r2 { inset: 32px; border-style: dotted; border-color: rgba(0,212,255,0.18); animation: rspinR 75s linear infinite; }
.ring.r3 { inset: 68px; border-color: rgba(201,169,110,0.22); animation: rspin 90s linear infinite; }
.ring.r4 { inset: 110px; border-style: dashed; border-color: rgba(0,212,255,0.32); animation: rspinR 50s linear infinite; }
.ring.r5 { inset: 154px; border-color: rgba(168,213,232,0.18); animation: rspin 110s linear infinite; }
@keyframes rspin  { to { transform: rotate(360deg); } }
@keyframes rspinR { to { transform: rotate(-360deg); } }

/* Tilted orbital planes with travelling satellites (depth) */
.orbit-plane {
  position: absolute; left: 50%; top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.10);
  pointer-events: none;
  transform-style: preserve-3d;
}
.orbit-plane.op1 { transform: rotateX(74deg) rotateZ(0deg);   animation: ospin 26s linear infinite; }
.orbit-plane.op2 { transform: rotateX(68deg) rotateZ(60deg);  border-color: rgba(201,169,110,0.10); animation: ospinR 34s linear infinite; }
.orbit-plane.op3 { transform: rotateX(80deg) rotateZ(120deg); animation: ospin 20s linear infinite; }
.orbit-plane.op4 { transform: rotateX(63deg) rotateZ(30deg);  border-color: rgba(168,213,232,0.10); animation: ospinR 16s linear infinite; }
.orbit-plane.op5 { transform: rotateX(77deg) rotateZ(95deg);  border-color: rgba(201,169,110,0.08); animation: ospin 42s linear infinite; }
.orbit-plane .sat {
  position: absolute; top: -3px; left: 50%; margin-left: -3px;
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(0,212,255,0.9);
  box-shadow: 0 0 10px 2px rgba(0,212,255,0.6);
}
.orbit-plane .sat.g {
  background: rgba(201,169,110,0.9);
  box-shadow: 0 0 10px 2px rgba(201,169,110,0.6);
}
.orbit-plane .sat.sm { width: 4px; height: 4px; margin-left: -2px; top: -2px; }
@keyframes ospin  { to { transform: rotateX(74deg) rotateZ(360deg); } }
@keyframes ospinR { to { transform: rotateX(68deg) rotateZ(-300deg); } }

/* Abstract glowing core (no logo) */
.core-orb {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none;
}
.core-hit {
  pointer-events: auto; position: relative; z-index: 4;
  width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; border: none; cursor: pointer;
  transition: transform 0.25s var(--ease);
}
.core-hit:hover { transform: scale(1.14); }
.core-hit:hover .orb-dot { box-shadow: 0 0 34px var(--cyan), 0 0 68px rgba(0,212,255,0.85); }
.orb-ai {
  position: absolute; top: calc(50% - 34px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-en); font-size: 10px; font-weight: 700; letter-spacing: 0.32em;
  color: var(--cyan); text-shadow: 0 0 10px rgba(0,212,255,0.6);
  pointer-events: none;
}
.orb-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle, #ffffff, var(--cyan) 60%);
  box-shadow: 0 0 24px var(--cyan), 0 0 48px rgba(0,212,255,0.6);
  animation: orb-breathe 2.6s ease-in-out infinite;
}
@keyframes orb-breathe {
  0%,100% { transform: scale(1); box-shadow: 0 0 22px var(--cyan), 0 0 46px rgba(0,212,255,0.5); }
  50%     { transform: scale(1.18); box-shadow: 0 0 36px var(--cyan), 0 0 72px rgba(0,212,255,0.7); }
}
.orb-pulse {
  position: absolute; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.6);
  animation: orb-ripple 2.8s ease-out infinite;
}
.orb-pulse.d2 { animation-delay: 1.4s; border-color: rgba(201,169,110,0.5); }
@keyframes orb-ripple {
  0%   { width: 24px; height: 24px; opacity: 0.9; }
  100% { width: 140px; height: 140px; opacity: 0; }
}
.orb-label {
  position: absolute; top: calc(50% + 38px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 300;
  font-size: 14px; letter-spacing: 0.45em; color: var(--gold);
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(201,169,110,0.4);
}
html[dir="rtl"] .orb-label { letter-spacing: 0.12em; font-family: var(--font-fa); }
@media (max-width: 540px) {
  .orb-label { font-size: 11px; top: calc(50% + 28px); }
  .orb-dot { width: 14px; height: 14px; }
}

/* Hide legacy scales-core if still present */
.scales-core { display: none; }

.hex-wheel { position: absolute; inset: 0; animation: hex-rotate 90s linear infinite; transform-origin: center; }
.hex-wheel.paused { animation-play-state: paused; }
.hex-node { position: absolute; left: 50%; top: 50%; width: 92px; height: 80px; transform-origin: center; }
.hex-inner { width: 100%; height: 100%; animation: hex-counter 90s linear infinite; transform-origin: center; display: grid; place-items: center; }
.hex-wheel.paused .hex-inner { animation-play-state: paused; }
@keyframes hex-rotate  { to { transform: rotate(360deg); } }
@keyframes hex-counter { to { transform: rotate(-360deg); } }

.hex-shape {
  width: 100%; height: 100%;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
  background: linear-gradient(135deg, rgba(10,37,64,0.95), rgba(26,58,78,0.7));
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--frost);
  cursor: pointer; transition: all 0.25s var(--ease);
  padding: 0 8px; text-align: center;
}
.hex-shape::before {
  content: ""; position: absolute; inset: 1px;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
  background: linear-gradient(135deg, rgba(14,46,78,0.95), rgba(8,28,48,0.95));
  z-index: 0;
}
.hex-shape > * { position: relative; z-index: 1; }
.hex-shape .ico { width: 22px; height: 22px; color: var(--cyan); }
.hex-shape .lbl { font-size: 9.5px; line-height: 1.15; color: var(--ice-white); font-weight: 500; }
.hex-shape:hover { transform: scale(1.1); }
.hex-shape:hover::before { background: linear-gradient(135deg, rgba(201,169,110,0.25), rgba(26,58,78,0.95)); }
.hex-shape:hover .ico { color: var(--gold); }
.hex-shape:hover .lbl { color: var(--gold-soft); }
.hex-shape.v-sage .ico { color: var(--sage); }
.hex-shape.v-gold .ico { color: var(--gold); }
.hex-shape.v-purple .ico { color: #b08fc7; }
.hex-shape.v-cyan .ico { color: var(--cyan); }
.hex-new-badge {
  position: absolute; top: 8px; inset-inline-end: 18px; font-size: 8px; padding: 1px 5px;
  border-radius: 4px; background: var(--gold); color: #1a1a1a; font-weight: 700;
  z-index: 2; box-shadow: 0 0 8px rgba(201,169,110,0.5);
}

.portal-legend {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 14px; font-size: 10px; color: var(--frost);
}
.portal-legend span { display: flex; align-items: center; gap: 5px; }
.portal-legend i { width: 8px; height: 8px; border-radius: 50%; }

/* ============================================================
   CLOCKWORK MECHANISM — layered neon-glass interlocking gears
   ============================================================ */
.mech {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  --px: 0; --py: 0;            /* pointer parallax, -1..1, set from JS */
}

/* soft depth wash behind the gears */
.mech-wash {
  position: absolute; inset: -6%;
  background:
    radial-gradient(34% 34% at 50% 49%, rgba(0,212,255,0.20), transparent 70%),
    radial-gradient(60% 56% at 50% 52%, rgba(16,46,92,0.5), transparent 76%);
  filter: blur(10px);
  pointer-events: none;
}

/* each depth layer translates with the pointer; --pf set inline (px) */
.mech-layer {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  transform: translate(calc(var(--px) * var(--pf)), calc(var(--py) * var(--pf)));
  transition: transform 0.45s cubic-bezier(0.22,0.61,0.36,1);
  will-change: transform;
}
.mech-layer.deep  { filter: blur(2px) brightness(0.6); opacity: 0.6; z-index: 1; }
.mech-layer.front { z-index: 3; }

/* ---- a single gear ---- */
.gear {
  position: absolute; left: 50%; top: 50%;
  width: var(--s); height: var(--s);
  transform: translate(-50%, -50%) translate(var(--x), var(--y));
  border: 0; background: none; padding: 0;
}
.gear-btn { cursor: pointer; }

.gear-spin {
  position: absolute; inset: 0;
  animation: gspin var(--dur) linear infinite;
  transform-origin: 50% 50%;
}
.gear-spin.rev { animation-name: gspinR; }
@keyframes gspin  { to { transform: rotate(360deg); } }
@keyframes gspinR { to { transform: rotate(-360deg); } }

/* toothed neon rim — repeating wedges masked to a thin annulus */
.teeth {
  position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg,
    var(--gc) 0deg calc(360deg / var(--teeth) / 2),
    transparent calc(360deg / var(--teeth) / 2) calc(360deg / var(--teeth)));
  -webkit-mask: radial-gradient(circle, transparent calc(50% - var(--td)), #000 calc(50% - var(--td)));
          mask: radial-gradient(circle, transparent calc(50% - var(--td)), #000 calc(50% - var(--td)));
  filter: drop-shadow(0 0 calc(var(--glow) * 0.45) var(--gc));
}

/* glass rim band (open centre so gears behind show through = depth) */
.gear-band {
  position: absolute; inset: var(--td); border-radius: 50%;
  background: radial-gradient(circle at 38% 32%,
    rgba(150,215,255,0.16), rgba(18,42,76,0.22) 55%, transparent 60%);
  box-shadow:
    inset 0 0 0 1.2px rgba(150,210,255,0.32),
    inset 0 0 14px rgba(80,170,255,0.14);
}
/* a second ring stroke marks the inner edge of the rim band */
.gear-band::after {
  content: ""; position: absolute; inset: 16%; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(150,210,255,0.22);
}

/* radial spokes connecting hub to rim */
.gear-spokes {
  position: absolute; inset: var(--td); border-radius: 50%;
  background: repeating-conic-gradient(from 9deg,
    rgba(150,212,255,0.34) 0deg 11deg, transparent 11deg 72deg);
  -webkit-mask: radial-gradient(circle,
    transparent calc(var(--hub) - 1px), #000 var(--hub),
    #000 calc(var(--inner) - 2px), transparent calc(var(--inner) - 1.5px));
          mask: radial-gradient(circle,
    transparent calc(var(--hub) - 1px), #000 var(--hub),
    #000 calc(var(--inner) - 2px), transparent calc(var(--inner) - 1.5px));
}

/* centre hub disc */
.gear-hubdisc {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--hub) * 2); height: calc(var(--hub) * 2);
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 40% 34%, rgba(195,235,255,0.55), rgba(20,46,82,0.6) 70%);
  box-shadow: 0 0 0 1px rgba(150,210,255,0.4), inset 0 0 6px rgba(0,0,0,0.4);
}

/* icy-blue glossy reflection (static — like a fixed light source) */
.gloss {
  position: absolute; inset: var(--td); border-radius: 50%;
  overflow: hidden; pointer-events: none;
}
.gloss::before {
  content: ""; position: absolute; top: -32%; left: -12%;
  width: 80%; height: 70%; border-radius: 50%;
  background: linear-gradient(142deg,
    rgba(255,255,255,0.45), rgba(150,222,255,0.14) 44%, transparent 72%);
  filter: blur(3px); transform: rotate(-16deg);
}

/* module icon — pinned upright, does not spin */
.gear-hub {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid; place-items: center; z-index: 4;
}
.gear-hub::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: calc(var(--ico) + 14px); height: calc(var(--ico) + 14px);
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(10,28,54,0.92), rgba(10,28,54,0.5) 70%, transparent);
}
.gear-hub .ico {
  position: relative;
  width: var(--ico); height: var(--ico);
  color: #EAF8FF;
  filter: drop-shadow(0 0 7px var(--gc)) drop-shadow(0 1px 1px rgba(0,0,0,0.5));
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
}
.gear-new {
  position: absolute; top: -10%; inset-inline-end: -26%;
  font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 5px;
  background: var(--gold); color: #14110a; letter-spacing: 0.04em;
  box-shadow: 0 0 10px rgba(201,169,110,0.6); white-space: nowrap;
}

/* hover: freeze that gear's spin, intensify glow */
.gear-btn:hover { z-index: 9; }
.gear-btn:hover .gear-spin { animation-play-state: paused; }
.gear-btn:hover .teeth { filter: drop-shadow(0 0 calc(var(--glow) * 0.9) var(--gc)) brightness(1.25); }
.gear-btn:hover .gear-band { box-shadow: inset 0 0 0 1.4px rgba(200,240,255,0.6), inset 0 0 22px rgba(120,205,255,0.3); }
.gear-btn:hover .gear-hub .ico { transform: scale(1.16); filter: drop-shadow(0 0 12px var(--gc)); }
.gear-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 50%; }

/* core (brand) gear — translucent so the centre glow shows through */
.gear.core .gear-band {
  background: radial-gradient(circle at 42% 34%, rgba(0,212,255,0.16), rgba(10,30,58,0.18) 55%, transparent 60%);
  box-shadow: inset 0 0 0 1.4px rgba(0,212,255,0.34), inset 0 0 26px rgba(0,212,255,0.18);
}
.gear.core .teeth { filter: drop-shadow(0 0 calc(var(--glow) * 0.7) var(--gc)) brightness(1.2); }
.gear.core .gear-hubdisc { display: none; }
.gear-coreglow {
  position: absolute; left: 50%; top: 50%; width: 60%; height: 60%;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.3), transparent 70%);
  filter: blur(6px);
}

/* brand core pinned to centre */
.mech-core {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid; place-items: center; z-index: 5; pointer-events: none;
}
.mech-core-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle, #ffffff, var(--cyan) 62%);
  box-shadow: 0 0 24px var(--cyan), 0 0 52px rgba(0,212,255,0.65);
  animation: orb-breathe 2.8s ease-in-out infinite;
}
.mech-core-pulse {
  position: absolute; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.6);
  animation: orb-ripple 3s ease-out infinite;
}
.mech-core-pulse.d2 { animation-delay: 1.5s; border-color: rgba(201,169,110,0.5); }
.mech-core-label {
  position: absolute; top: calc(50% + 40px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-fa); font-weight: 500;
  font-size: 13px; letter-spacing: 0.14em; color: var(--gold);
  white-space: nowrap; text-shadow: 0 0 12px rgba(201,169,110,0.45);
}
html[dir="ltr"] .mech-core-label { font-family: var(--font-display); font-weight: 300; letter-spacing: 0.42em; }

/* travelling neon line tracing the portal frame */
@property --shang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --gap { syntax: "<length>"; inherits: true; initial-value: 0px; }
.portal-frame {
  position: absolute; inset: 0; border-radius: 24px;
  pointer-events: none; z-index: 6;
}
/* single PCB-trace thread per racing line */
.pf-thread {
  position: absolute; border-radius: 24px; padding: 1.1px;
  inset: 0;
  border-radius: 24px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
}
.pf-thread.t-a { --i: 0; }
.pf-thread.t-b { --i: 1; }
.pf-thread.t-c { --i: 2; }

/* three lines race the frame at different speeds without splitting */

.portal-frame.f1 .pf-thread {
  background: conic-gradient(from var(--shang),
    transparent 0deg 332deg,
    rgba(0,212,255,0.10) 339deg, var(--cyan) 350deg, #eafdff 355deg, var(--cyan) 360deg);
  animation: shframe 6s linear infinite;
}
.portal-frame.f2 .pf-thread {
  background: conic-gradient(from var(--shang),
    transparent 0deg 334deg,
    rgba(201,169,110,0.10) 341deg, var(--gold) 351deg, #fff4dc 356deg, var(--gold) 360deg);
  animation: shframe 9s linear infinite;
}
.portal-frame.f3 .pf-thread {
  background: conic-gradient(from var(--shang),
    transparent 0deg 338deg,
    rgba(168,213,232,0.10) 344deg, #a8d5e8 352deg, #ffffff 357deg, #a8d5e8 360deg);
  animation: shframe 12s linear infinite;
}
/* one shared soft glow on the line container instead of per-thread filters (cheaper) */
.portal-frame.f1 { filter: drop-shadow(0 0 4px rgba(0,212,255,0.5)); }
.portal-frame.f2 { filter: drop-shadow(0 0 4px rgba(201,169,110,0.45)); }
.portal-frame.f3 { filter: drop-shadow(0 0 4px rgba(168,213,232,0.4)); }
@keyframes shframe { to { --shang: 360deg; } }

/* ============================================================
   PORTAL DEEP-SPACE BACKGROUND
   ============================================================ */
.space-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: 24px; pointer-events: none; }
.space-bg .nebula { position: absolute; border-radius: 50%; filter: blur(48px); opacity: 0.42; }
.space-bg .n1 { width: 360px; height: 360px; top: -8%; right: -6%; background: radial-gradient(circle, rgba(0,212,255,0.22), transparent 68%); }
.space-bg .n2 { width: 300px; height: 300px; bottom: -10%; left: -8%; background: radial-gradient(circle, rgba(201,169,110,0.16), transparent 68%); }
.space-bg .n3 { width: 240px; height: 240px; top: 40%; left: 30%; background: radial-gradient(circle, rgba(110,90,180,0.14), transparent 70%); }
@keyframes nebDrift { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(14px,-12px) scale(1.08); } }

/* Milky-Way band — a soft diagonal galactic haze with denser star dust */
.milkyway {
  position: absolute; inset: -20%;
  background:
    radial-gradient(ellipse 60% 22% at 50% 50%, rgba(180,210,255,0.10) 0%, rgba(150,185,235,0.05) 38%, transparent 66%),
    radial-gradient(ellipse 42% 14% at 42% 46%, rgba(214,230,255,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 38% 12% at 60% 56%, rgba(201,169,110,0.05) 0%, transparent 60%);
  transform: rotate(-24deg); filter: blur(8px); opacity: 0.9; pointer-events: none;
}
.starfield { position: absolute; inset: 0; }
.star { position: absolute; border-radius: 50%; background: #eafdff; }
.star.tw { animation: twinkle var(--tw,3s) ease-in-out infinite; will-change: opacity; }
@keyframes twinkle { 0%,100% { opacity: 0.08; } 50% { opacity: 1; } }

.constellation { position: absolute; opacity: 0.85; overflow: visible; }
.constellation .con-lines line { stroke: rgba(201,169,110,0.32); stroke-width: 0.35; stroke-dasharray: 1 1.2; }
.constellation .con-star { fill: #fff4dc; filter: drop-shadow(0 0 1.5px rgba(201,169,110,0.9)); animation: starGlow 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes starGlow { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }

/* slow ambient sky rotation — the whole celestial sphere turns gently */
.sky-rotate { position: absolute; inset: -12%; transform-origin: 50% 50%; animation: skySpin 150s linear infinite; will-change: transform; }
@keyframes skySpin { to { transform: rotate(360deg); } }

/* comets: streak diagonally with a trailing tail aligned to motion */
.comet { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 2px rgba(234,253,255,0.95); opacity: 0; will-change: transform, opacity; }
.comet::after { content: ""; position: absolute; top: 50%; left: 3px; width: 110px; height: 1.6px; transform: translateY(-50%); background: linear-gradient(to right, rgba(234,253,255,0.95), transparent); border-radius: 2px; }
.comet.c1 { top: 12%; left: 86%; animation: cometRun 11s ease-in 2s infinite; }
.comet.c2 { top: 58%; left: 96%; animation: cometRun 15s ease-in 7.5s infinite; --ang: -26deg; --dist: -880px; }
@keyframes cometRun {
  0%   { transform: rotate(var(--ang, -19deg)) translateX(0);            opacity: 0; }
  5%   { opacity: 1; }
  38%  { opacity: 1; }
  55%  { transform: rotate(var(--ang, -19deg)) translateX(var(--dist, -760px)); opacity: 0; }
  100% { transform: rotate(var(--ang, -19deg)) translateX(var(--dist, -760px)); opacity: 0; }
}

/* Lightweight portal sky: static optimized photo + sparse CSS-only twinkles. */
.space-bg {
  background:
    linear-gradient(180deg, rgba(1,6,18,0.36), rgba(1,7,20,0.58)),
    radial-gradient(circle at 50% 46%, rgba(91,72,150,0.18), transparent 54%),
    url("uploads/portal-stars-bg-full.jpg") center / cover no-repeat,
    #050914;
}
.space-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 52%, transparent 0 38%, rgba(2,8,20,0.42) 78%),
    linear-gradient(90deg, rgba(2,7,18,0.46), transparent 24% 76%, rgba(2,7,18,0.46));
  pointer-events: none;
}
.space-bg .starfield {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.star.twinkle-star {
  opacity: 0.12;
  background: radial-gradient(circle, #ffffff 0 30%, #b9d7ff 54%, transparent 72%);
  box-shadow: 0 0 8px rgba(180,210,255,0.68), 0 0 18px rgba(105,95,210,0.28);
  animation: starPulse var(--tw,5.8s) ease-in-out infinite;
  will-change: opacity, transform;
}
.twinkle-star.phase-1 { animation-duration: calc(var(--tw,5.8s) * 1.12); }
.twinkle-star.phase-2 { animation-duration: calc(var(--tw,5.8s) * 0.94); }
.twinkle-star.phase-3 { animation-duration: calc(var(--tw,5.8s) * 1.24); }
.twinkle-star.phase-4 { animation-duration: calc(var(--tw,5.8s) * 0.86); }
.twinkle-star.phase-5 { animation-duration: calc(var(--tw,5.8s) * 1.36); }
@keyframes starPulse {
  0%, 100% { opacity: 0.10; transform: scale(0.72); }
  8% { opacity: 0.92; transform: scale(1.22); }
  16% { opacity: 0.18; transform: scale(0.82); }
  34% { opacity: 0.72; transform: scale(1.08); }
  44% { opacity: 0.14; transform: scale(0.76); }
  64% { opacity: 1; transform: scale(1.32); }
  74% { opacity: 0.16; transform: scale(0.82); }
  88% { opacity: 0.58; transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .gear-spin, .mech-core-dot, .mech-core-pulse, .portal-frame, .pf-thread, .star.tw, .twinkle-star,
  .comet, .nebula, .con-star, .sky-rotate, .sun-corona, .sun-flare { animation: none !important; }
  .comet { opacity: 0; }
}

/* ============================================================
   MODAL / POP-UP
   ============================================================ */
.backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4,16,28,0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  animation: bdIn 0.3s var(--ease) forwards;
}
@keyframes bdIn { from { opacity: 0;} to { opacity: 1;} }

.modal {
  width: min(900px, 90vw); max-height: 82vh;
  border-radius: 22px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -12px rgba(26,58,78,0.25), 0 0 0 1px rgba(0,212,255,0.08);
  animation: mIn 0.3s var(--ease) forwards;
  display: flex; flex-direction: column; overflow: hidden;
}
@keyframes mIn { from { opacity: 0; transform: scale(0.96);} to { opacity: 1; transform: scale(1);} }

.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.modal-head .lh { display: flex; align-items: center; gap: 12px; }
.modal-head .ic {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cyan-tint), var(--gold-tint));
  border: 1px solid rgba(0,212,255,0.3); color: var(--cyan-dark);
}
.modal-head .ti { font-size: 16px; font-weight: 600; color: var(--ice-white); }
.modal-head .st { font-size: 11px; color: var(--text-soft); margin-top: 2px; letter-spacing: 0.02em; }
.modal-head .rh { display: flex; gap: 6px; }
.modal-head .rh button { width: 32px; height: 32px; border-radius: 8px; color: var(--text-soft); display: grid; place-items: center; transition: all 0.15s; }
.modal-head .rh button:hover { background: var(--cyan-tint); color: var(--cyan-dark); }
.modal-head .rh button.close:hover { background: var(--danger-soft); color: var(--danger); }
.modal-head .rh button:hover svg { transform: none !important; animation: none !important; }

.modal-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

/* ============================================================
   FORM ELEMENTS / TABS / TABLES / BUTTONS
   ============================================================ */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); width: fit-content; margin-bottom: 14px; }
.tab { padding: 7px 14px; border-radius: 7px; font-size: 12px; color: var(--text-soft); cursor: pointer; transition: all 0.15s; }
.tab.on { background: var(--bg-card); color: var(--cyan-dark); box-shadow: var(--shadow-sm); }
.tab:hover:not(.on) { color: var(--ice-white); }

.table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 12px; }
.table th { text-align: start; padding: 6px 10px; color: var(--text-soft); font-weight: 500; font-size: 10.5px; letter-spacing: 0.02em; }
.table td { padding: 10px; background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ice-white); }
.table tr td:first-child { border-inline-start: 1px solid var(--line); border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.table tr td:last-child  { border-inline-end: 1px solid var(--line); border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
html[dir="rtl"] .table tr td:first-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
html[dir="rtl"] .table tr td:last-child  { border-top-left-radius: 8px; border-bottom-left-radius: 8px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.table tr:hover td { background: var(--cyan-tint); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 10.5px; font-weight: 500; border: 1px solid; }
.pill.ok      { color: var(--sage);   background: rgba(107,158,138,0.10); border-color: rgba(107,158,138,0.3); }
.pill.warn    { color: #997637;       background: rgba(201,169,110,0.14); border-color: rgba(201,169,110,0.4); }
.pill.info    { color: var(--cyan-dark); background: rgba(0,212,255,0.10); border-color: rgba(0,212,255,0.3); }
.pill.danger  { color: var(--danger); background: var(--danger-soft);     border-color: rgba(229,86,75,0.35); }
.pill.neutral { color: var(--text-soft); background: var(--bg-soft); border-color: var(--line-strong); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; font-size: 12px; font-weight: 500; transition: all 0.15s; border: 1px solid; cursor: pointer; }
.btn.primary { background: linear-gradient(135deg, var(--cyan), var(--cyan-dark)); color: white; border-color: transparent; box-shadow: var(--shadow-cyan); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(0,212,255,0.5); }
.btn.gold { background: linear-gradient(135deg, var(--gold), #b3935a); color: #1a1a1a; border-color: transparent; box-shadow: var(--shadow-gold); }
.btn.ghost { background: var(--bg-card); color: var(--text-soft); border-color: var(--line); }
.btn.ghost:hover { color: var(--cyan-dark); border-color: var(--cyan); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 10.5px; color: var(--text-soft); font-weight: 500; letter-spacing: 0.02em; }
.field input, .field select, .field textarea {
  height: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-card);
  color: var(--ice-white); font-size: 12.5px; width:100%; min-width:0; box-sizing:border-box;
}
.legal-calculator .field input[inputmode="decimal"] { direction:ltr; text-align:right; font-variant-numeric:tabular-nums; letter-spacing:.02em; }
.field textarea { min-height: 80px; padding: 10px 12px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-tint); }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lcard { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-card); position: relative; box-shadow: var(--shadow-sm); transition: all 0.2s var(--ease); }
.lcard:hover { border-color: var(--cyan); box-shadow: var(--shadow-cyan); transform: translateY(-2px); }
.lcard .av { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--cyan-dark)); display: grid; place-items: center; font-weight: 600; color: var(--ice-white); margin-bottom: 10px; }
.lcard h5 { font-size: 13px; color: var(--ice-white); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.lcard .sp { font-size: 10.5px; color: var(--gold); margin-top: 2px; }
.lcard .meta { display: flex; gap: 10px; margin-top: 10px; font-size: 11px; color: var(--text-soft); }
.lcard .meta b { color: var(--ice-white); font-weight: 600; }
.lcard .price { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: center; }
.lcard .price .n { font-size: 14px; color: var(--cyan-dark); font-weight: 600; font-family: var(--font-display); }
.verified { color: var(--cyan-dark); }

.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-soft); }
.kpi .n { font-size: 26px; font-weight: 600; color: var(--ice-white); font-family: var(--font-display); }
.kpi .l { font-size: 10.5px; color: var(--text-soft); margin-top: 4px; }
.kpi .d { font-size: 10.5px; margin-top: 6px; color: #16a34a; font-weight: 600; }

.risk-ring { position: relative; width: 160px; height: 160px; }
.risk-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.risk-ring .label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.risk-ring .label .n { font-size: 38px; font-weight: 200; color: var(--ice-white); font-family: var(--font-display); }
.risk-ring .label .l { font-size: 10px; color: var(--text-soft); letter-spacing: 0.12em; margin-top: 2px; }

.chat-window { display: flex; flex-direction: column; height: 480px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 6px 4px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 12.5px; line-height: 1.6; }
.msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--cyan), var(--cyan-dark)); color: white; border-bottom-right-radius: 4px; }
.msg.ai   { align-self: flex-start; background: rgba(14,46,78,0.7); border: 1px solid var(--line); color: var(--ice-white); border-bottom-left-radius: 4px; }
html[dir="rtl"] .msg.user { border-bottom-right-radius: 14px; border-bottom-left-radius: 4px; }
html[dir="rtl"] .msg.ai   { border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
.msg cite { color: var(--cyan-dark); font-style: normal; font-weight: 600; cursor: pointer; }
.chat-input { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; height: 44px; border-radius: 12px; padding: 0 14px; background: rgba(4,16,28,0.5); border: 1px solid var(--line); color: var(--ice-white); }
.chat-input button { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--cyan), var(--cyan-dark)); color: white; display: grid; place-items: center; }
.chat-input .small { width: 44px; background: var(--bg-card); border: 1px solid var(--line); color: var(--text-soft); }

.modal:has(.smart-chat) { width: min(1180px, 96vw); max-height: 88vh; }
.smart-chat {
  direction: ltr;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  min-height: 610px;
}
.smart-chat > * { direction: rtl; }
.smart-chat-side,
.smart-chat-main {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025)), rgba(7,25,43,0.78);
  box-shadow: var(--shadow-sm);
}
.smart-chat-side {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sc-model-card {
  display: grid;
  place-items: center;
  gap: 7px;
  text-align: center;
  padding: 18px 12px;
  border-radius: 15px;
  background: radial-gradient(circle at 50% 15%, rgba(0,212,255,.16), transparent 48%), rgba(255,255,255,.04);
  border: 1px solid rgba(0,212,255,.18);
}
.sc-orb {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--cyan-dark);
  background: rgba(0,212,255,.13);
  box-shadow: 0 0 0 14px rgba(0,212,255,.035), 0 0 34px rgba(0,212,255,.18);
  animation: aiBreath 2.6s ease-in-out infinite;
}
@keyframes aiBreath { 0%,100% { transform: scale(.96); } 50% { transform: scale(1.04); } }
.sc-model-card b { color: var(--ice-white); font-size: 13px; }
.sc-model-card span { color: var(--text-soft); font-size: 11px; }
.sc-setting, .sc-files {
  display: grid;
  gap: 8px;
  padding: 11px;
  border-radius: 13px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(168,213,232,.12);
}
.sc-setting label, .sc-files label { color: var(--ice-white); font-size: 11.5px; font-weight: 800; }
.sc-setting div, .sc-files div { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.sc-setting button, .sc-files button {
  min-height: 32px;
  border-radius: 9px;
  color: var(--text-soft);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(168,213,232,.12);
  font-size: 10.5px;
}
.sc-setting button.on {
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  border-color: transparent;
  font-weight: 850;
}
.smart-chat-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto auto;
  overflow: hidden;
}
.sc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(5,18,34,.48);
}
.sc-head h3 { margin: 0; color: var(--ice-white); font-size: 18px; }
.sc-head span { color: var(--text-soft); font-size: 11.5px; }
.sc-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan-dark);
  background: var(--cyan-tint);
  border: 1px solid rgba(0,212,255,.22);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.sc-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 12px rgba(117,184,150,.75);
}
.chat-msgs.smart { padding: 18px; }
.file-chip {
  align-self: flex-start;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  grid-template-rows: auto auto;
  gap: 3px 9px;
  max-width: 480px;
  padding: 10px 11px;
  border-radius: 13px;
  color: var(--frost);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(0,212,255,.18);
}
.file-chip svg { grid-row: 1 / span 2; color: var(--cyan-dark); margin-top: 3px; }
.file-chip b { color: var(--ice-white); font-size: 12px; }
.file-chip span { color: var(--text-soft); font-size: 10.5px; }
.file-chip button {
  grid-column: 3;
  grid-row: 1 / span 2;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  font-size: 10.5px;
  font-weight: 850;
}
.thinking-card { width: min(520px, 82%); }
.thinking-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ice-white);
}
.thinking-line i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(0,212,255,.75);
  animation: pulse 1.1s ease-in-out infinite;
}
.thinking-bar {
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(168,213,232,.10);
}
.thinking-bar em {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  animation: thinkMove 1.35s ease-in-out infinite;
}
@keyframes thinkMove { 0% { transform: translateX(170%); } 100% { transform: translateX(-260%); } }
.quick-prompts {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 10px 13px 0;
}
.quick-prompts button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(168,213,232,.12);
  font-size: 10.5px;
}
.quick-prompts button:hover { color: var(--cyan-dark); border-color: rgba(0,212,255,.32); }
.smart-input { margin: 10px 13px 13px; padding-top: 10px; }

.account-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.account-tabs button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 11px;
  color: var(--text-soft);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(168,213,232,.12);
  font-size: 12px;
}
.account-tabs button.on {
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  border-color: transparent;
  font-weight: 850;
}
.wallet-panel { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; margin-top: 16px; }
.wallet-balance, .wallet-list, .plan-card, .security-card {
  border-radius: 14px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(168,213,232,.12);
}
.wallet-balance { padding: 16px; display: grid; gap: 10px; }
.wallet-balance span, .wallet-balance small { color: var(--text-soft); }
.wallet-balance b { color: var(--ice-white); font-size: 24px; }
.wallet-balance div { display: flex; gap: 8px; flex-wrap: wrap; }
.wallet-list { padding: 10px; display: grid; gap: 8px; }
.wallet-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 11px;
  background: rgba(255,255,255,.035);
  color: var(--frost);
  font-size: 12px;
}
.wallet-row b { color: var(--gold); }
.wallet-row small { color: var(--text-soft); }
.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.plan-card { padding: 15px; display: grid; gap: 9px; }
.plan-card.active { border-color: rgba(201,169,110,.38); box-shadow: var(--shadow-gold); }
.plan-card span { color: var(--ice-white); font-weight: 850; }
.plan-card b { color: var(--gold); font-size: 20px; }
.plan-card small { color: var(--text-soft); }
.security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.security-card { padding: 14px; display: grid; gap: 7px; color: var(--frost); }
.security-card svg { color: var(--cyan-dark); }
.security-card b { color: var(--ice-white); }
.security-card span { color: var(--text-soft); font-size: 11.5px; }

.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); animation: typing 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%,80%,100% { opacity: 0.25; transform: translateY(0);} 40% { opacity: 1; transform: translateY(-3px);}}

.calc-result {
  padding: 18px; border-radius: 14px;
  background: linear-gradient(135deg, var(--gold-tint), var(--bg-soft));
  border: 1px solid rgba(201,169,110,0.35); margin-top: 14px;
}
.calc-result .l { font-size: 11px; color: var(--gold); letter-spacing: 0.06em; font-weight: 600; }
.calc-result .n { font-size: 30px; font-family: var(--font-display); font-weight: 300; color: var(--ice-white); margin-top: 6px; }
.calc-result .s { font-size: 11px; color: var(--text-soft); margin-top: 8px; line-height: 1.6; }
.calc-result .breakdown { margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(201,169,110,0.4); display: grid; gap: 6px; }
.calc-result .breakdown .li { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-soft); }
.calc-result .breakdown .li b { color: var(--ice-white); font-weight: 500; }

.legal-calculator { display:grid; gap:16px; }
.calc-intro { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:15px 17px; border:1px solid rgba(107,207,226,.18); border-radius:15px; background:linear-gradient(135deg,rgba(69,160,185,.10),rgba(255,255,255,.025)); }
.calc-intro>div { display:grid; gap:5px; }
.calc-intro b { color:var(--ice-white); font-size:14px; }
.calc-intro span { color:var(--text-soft); font-size:11.5px; line-height:1.7; }
.calc-source-badge { white-space:nowrap; color:var(--gold)!important; border:1px solid rgba(201,169,110,.34); border-radius:999px; padding:5px 9px; background:rgba(201,169,110,.08); }
.calc-tool-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.calc-tool { min-height:54px; display:flex; gap:9px; align-items:center; justify-content:flex-start; text-align:start; padding:10px 12px; color:var(--frost); border:1px solid rgba(168,213,232,.13); border-radius:12px; background:rgba(255,255,255,.035); transition:.2s ease; }
.calc-tool:hover { transform:translateY(-1px); border-color:rgba(107,207,226,.34); background:rgba(107,207,226,.075); }
.calc-tool.on { color:var(--ice-white); border-color:rgba(201,169,110,.48); background:linear-gradient(135deg,rgba(201,169,110,.14),rgba(107,207,226,.07)); box-shadow:inset 0 0 18px rgba(201,169,110,.055); }
.calc-tool svg { color:var(--gold); flex:0 0 auto; }
.calc-tool span { font-size:11.5px; font-weight:650; }
.calc-workspace { display:grid; grid-template-columns:minmax(0,1.12fr) minmax(260px,.88fr); gap:14px; align-items:start; }
.calc-form { padding:17px; border:1px solid rgba(168,213,232,.14); background:rgba(255,255,255,.03); border-radius:15px; display:grid; gap:11px; }
.calc-section-title { color:var(--ice-white); font-weight:750; font-size:13px; padding-bottom:10px; border-bottom:1px solid rgba(168,213,232,.10); }
.calc-section-sub { color:var(--gold); font-size:11px; font-weight:700; margin-top:2px; }
.calc-fields { display:grid; gap:10px; }
.calc-fields.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.calc-hint { color:var(--text-soft); font-size:10.8px; line-height:1.8; padding:9px 11px; border-inline-start:2px solid rgba(201,169,110,.58); background:rgba(201,169,110,.055); border-radius:8px; }
.calc-hint.danger { color:#ffd8d4; border-inline-start-color:var(--danger); background:rgba(229,86,75,.11); }
.block-boundary-card { padding:12px; border:1px solid rgba(122,181,197,.2); border-radius:12px; background:rgba(95,158,176,.07); color:var(--text-soft); font-size:11px; line-height:1.8; }
.block-boundary-card>b { display:block; color:var(--text); margin-bottom:7px; }
.block-boundary-card>div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px 12px; }
.block-boundary-card span { min-width:0; }
.block-boundary-card strong { color:var(--frost); }
.block-boundary-card p { margin:0 0 7px; color:var(--text-soft); }
.calc-readonly-value { min-height:42px; display:flex; align-items:center; padding:10px 12px; border:1px solid rgba(168,213,232,.12); border-radius:10px; background:rgba(255,255,255,.025); color:var(--frost); font-size:11.5px; line-height:1.7; }
.regional-rates { margin-top:2px; }
.regional-rates>div { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media (max-width:720px) { .regional-rates>div { grid-template-columns:1fr; } }
.calc-check { display:flex; gap:8px; align-items:center; color:var(--frost); font-size:11.5px; }
.calc-details { border:1px solid rgba(168,213,232,.12); border-radius:10px; padding:9px 11px; color:var(--text-soft); font-size:11px; background:rgba(255,255,255,.025); }
.calc-details summary { cursor:pointer; color:var(--frost); font-weight:650; }
.calc-details span { display:block; padding-top:8px; line-height:1.7; }
.complete-diye { display:grid; gap:12px; }
.complete-result { margin-top:2px; }
.legal-output { margin-top:10px; padding:10px 12px; border-radius:10px; background:rgba(255,255,255,.035); color:var(--frost); font-size:11.5px; line-height:1.9; white-space:pre-line; }
.selected-damage { margin-top:12px; color:var(--gold); font-size:11px; line-height:1.8; border-top:1px dashed rgba(201,169,110,.3); padding-top:10px; }
.legal-result { margin-top:0; min-height:160px; }
.legal-result .n small { font-size:12px; color:var(--frost); }
.calc-empty { min-height:190px; border:1px dashed rgba(168,213,232,.2); border-radius:15px; display:grid; place-items:center; align-content:center; gap:9px; padding:22px; text-align:center; color:var(--text-soft); background:rgba(255,255,255,.025); }
.calc-empty svg,.calc-empty b { color:var(--gold); }
.calc-empty span { max-width:560px; font-size:11.5px; line-height:1.8; }
.calc-legal-note { display:flex; gap:10px; align-items:flex-start; padding:11px 13px; border-radius:11px; background:rgba(193,112,75,.07); border:1px solid rgba(193,112,75,.18); color:var(--text-soft); font-size:10.7px; line-height:1.75; }
.calc-legal-note b { color:#dfaa8d; white-space:nowrap; }
@media(max-width:760px){ .calc-tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.calc-workspace{grid-template-columns:1fr}.calc-fields.two,.block-boundary-card>div{grid-template-columns:1fr}.calc-intro{align-items:flex-start}.calc-source-badge{display:none} }
@media(max-width:440px){ .calc-tool-grid{grid-template-columns:1fr}.calc-legal-note{display:grid} }

/* ============================================================
   PERSIAN NUMERALS + UTILITIES
   ============================================================ */
.fa-num { font-family: var(--font-fa); font-variant-numeric: tabular-nums; }
.flex { display: flex; }
.gap-2 { gap: 8px;} .gap-3 { gap: 12px;} .gap-4 { gap: 16px;}
.mt-2 { margin-top: 8px;} .mt-3 { margin-top: 12px;} .mt-4 { margin-top: 16px;}
.center { display: grid; place-items: center;}
.between { display: flex; align-items: center; justify-content: space-between;}

html[dir="ltr"] .brand-text .name { letter-spacing: 0.28em; }
html[dir="ltr"] .nav-item .sub-lbl { letter-spacing: 0; }

/* ============================================================
   ICON BASE + PER-ICON HOVER MICRO-ANIMATIONS
   ============================================================ */
.ic { transition: transform 0.25s var(--ease), filter 0.25s var(--ease); transform-origin: center; will-change: transform; display: inline-block; }
.brand-svg { transition: transform 0.4s var(--ease); }
.brand:hover .brand-svg { transform: rotate(-6deg) scale(1.08); }

/* All interactive ancestors that should trigger micro-animations on their child icons */
/* Each rule lists ancestors that share the same hover-icon behavior */

/* CHAT: small bounce */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button, .feed-item, .sidebar-ai, .user-chip):hover .ic-chat
{ animation: ic-bounce 0.55s var(--ease); }
@keyframes ic-bounce { 0%,100% { transform: translateY(0); } 30% { transform: translateY(-3px) scale(1.08); } 60% { transform: translateY(0); } 80% { transform: translateY(-1px); } }

/* CAL: tiny page-flip */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button, .feed-item):hover .ic-cal
{ animation: ic-flip 0.55s var(--ease); }
@keyframes ic-flip { 0% { transform: perspective(60px) rotateX(0); } 50% { transform: perspective(60px) rotateX(-25deg) scale(1.05); } 100% { transform: perspective(60px) rotateX(0); } }

/* GAVEL: tap/strike */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button, .feed-item):hover .ic-gavel
{ animation: ic-strike 0.5s var(--ease); transform-origin: 30% 70%; }
@keyframes ic-strike { 0%,100% { transform: rotate(0);} 35% { transform: rotate(-22deg);} 65% { transform: rotate(8deg);} }

/* DOC: paper curl */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button, .feed-item):hover :is(.ic-doc, .ic-docEdit, .ic-scroll)
{ animation: ic-curl 0.5s var(--ease); transform-origin: top right; }
@keyframes ic-curl { 0%,100% { transform: skew(0,0);} 50% { transform: skew(-4deg,2deg) translateY(-1px);} }

/* CALC: numbers pulse */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-calc
{ animation: ic-pulse 0.5s var(--ease); }
@keyframes ic-pulse { 0%,100% { transform: scale(1);} 40% { transform: scale(1.12);} 70% { transform: scale(0.96);} }

/* SETTINGS: quarter rotation */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-settings
{ animation: ic-rotate 0.6s var(--ease); }
@keyframes ic-rotate { from { transform: rotate(0);} to { transform: rotate(90deg);} }

/* BELL: ring */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-bell
{ animation: ic-ring 0.5s var(--ease); transform-origin: top center; }
@keyframes ic-ring { 0%,100% { transform: rotate(0);} 20% { transform: rotate(-12deg);} 40% { transform: rotate(10deg);} 60% { transform: rotate(-6deg);} 80% { transform: rotate(3deg);} }

/* SEARCH: zoom */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-search
{ animation: ic-zoom 0.5s var(--ease); }
@keyframes ic-zoom { 0%,100% { transform: scale(1) rotate(0);} 50% { transform: scale(1.15) rotate(-8deg);} }

/* AI / BOT / BRAIN-like: neuron pulse flash */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button, .sidebar-ai):hover .ic-bot
{ animation: ic-neuron 0.7s var(--ease); }
@keyframes ic-neuron { 0%,100% { filter: brightness(1); transform: scale(1);} 30% { filter: brightness(1.4); transform: scale(1.08);} 60% { filter: brightness(0.9);} }

/* SHIELD: glow pulse */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover :is(.ic-shield, .ic-shieldAlert, .ic-shieldCheck)
{ animation: ic-shieldglow 0.7s var(--ease); }
@keyframes ic-shieldglow { 0%,100% { filter: drop-shadow(0 0 0 transparent);} 50% { filter: drop-shadow(0 0 6px rgba(0,212,255,0.7));} }

/* USER: head tilt */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button, .user-chip):hover .ic-user
{ animation: ic-tilt 0.55s var(--ease); transform-origin: bottom center; }
@keyframes ic-tilt { 0%,100% { transform: rotate(0);} 50% { transform: rotate(-8deg);} }

/* CHIP / API: LED blink */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-chip
{ animation: ic-blink 0.6s var(--ease); }
@keyframes ic-blink { 0%,100% { opacity: 1; transform: scale(1);} 25% { opacity: 0.4;} 50% { opacity: 1; transform: scale(1.08);} 75% { opacity: 0.5;} }

/* MIC: soundwave ripple */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover :is(.ic-mic, .ic-micSmall)
{ animation: ic-mic 0.6s var(--ease); }
@keyframes ic-mic { 0%,100% { filter: drop-shadow(0 0 0 transparent); transform: scale(1);} 50% { filter: drop-shadow(0 0 6px rgba(0,212,255,0.6)); transform: scale(1.08);} }

/* FOLDER: open flap */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-folder
{ animation: ic-folder 0.5s var(--ease); transform-origin: bottom left; }
@keyframes ic-folder { 0%,100% { transform: skew(0,0) scale(1);} 50% { transform: skew(-6deg, 0) translateY(-1px) scale(1.04);} }

/* HOME: small bounce */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-home
{ animation: ic-bounce 0.5s var(--ease); }

/* CAP / education: graduation cap tip */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-cap
{ animation: ic-strike 0.55s var(--ease); transform-origin: bottom center; }

/* HEART: heartbeat */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-heart
{ animation: ic-heart 0.55s var(--ease); }
@keyframes ic-heart { 0%,100% { transform: scale(1);} 20% { transform: scale(1.15);} 40% { transform: scale(1);} 60% { transform: scale(1.1);} }

/* SCALE: balance tilt */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-scale
{ animation: ic-balance 0.6s var(--ease); transform-origin: center 40%; }
@keyframes ic-balance { 0%,100% { transform: rotate(0);} 30% { transform: rotate(-4deg);} 70% { transform: rotate(4deg);} }

/* GROUP / people: subtle bob */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-group
{ animation: ic-bob 0.5s var(--ease); }
@keyframes ic-bob { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-3px);} }

/* MICROSCOPE: tilt focus */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-microscope
{ animation: ic-strike 0.5s var(--ease); transform-origin: bottom right; }

/* CLOCK: tick */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-clock
{ animation: ic-rotate 0.6s var(--ease); }

/* BUILDING: subtle rise */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-building
{ animation: ic-bob 0.5s var(--ease); }

/* COIN / WALLET: spin */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover :is(.ic-coin, .ic-card)
{ animation: ic-spin 0.6s var(--ease); }
@keyframes ic-spin { 0% { transform: rotateY(0);} 100% { transform: rotateY(360deg);} }

/* HANDSHAKE: shake */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-handshake
{ animation: ic-shake 0.55s var(--ease); }
@keyframes ic-shake { 0%,100% { transform: translateX(0);} 25% { transform: translateX(-2px);} 75% { transform: translateX(2px);} }

/* MAGNIFIER: zoom */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-magnifier
{ animation: ic-zoom 0.5s var(--ease); }

/* TRENDING: rise */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-trending
{ animation: ic-rise 0.55s var(--ease); }
@keyframes ic-rise { 0% { transform: translate(2px, 3px) scale(0.96);} 100% { transform: translate(0,0) scale(1);} }

/* BRIEFCASE: tip */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-briefcase
{ animation: ic-strike 0.5s var(--ease); }

/* BARCHART: bar rise */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-barchart
{ animation: ic-pulse 0.5s var(--ease); transform-origin: bottom; }

/* IDCARD: flip */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-idcard
{ animation: ic-flip 0.5s var(--ease); }

/* STAR: twinkle */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-star
{ animation: ic-twinkle 0.55s var(--ease); }
@keyframes ic-twinkle { 0%,100% { transform: rotate(0) scale(1);} 50% { transform: rotate(180deg) scale(1.15); filter: drop-shadow(0 0 6px rgba(201,169,110,0.7));} }

/* MEGAPHONE: shout */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-megaphone
{ animation: ic-shake 0.4s var(--ease); }

/* LEAF: sway */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-leaf
{ animation: ic-sway 0.6s var(--ease); transform-origin: bottom; }
@keyframes ic-sway { 0%,100% { transform: rotate(0);} 25% { transform: rotate(-8deg);} 75% { transform: rotate(8deg);} }

/* STORE: bob */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-store
{ animation: ic-bob 0.5s var(--ease); }

/* LIFEBUOY: rotate */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-lifebuoy
{ animation: ic-rotate 0.6s var(--ease); }

/* CHEV / SEND / NAV ARROWS: shift */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button, .panel-head):hover :is(.ic-chevR, .ic-chevL, .ic-send)
{ animation: ic-shift 0.4s var(--ease); }
@keyframes ic-shift { 0%,100% { transform: translateX(0);} 50% { transform: translateX(3px);} }

/* CLOSE / MINUS / PLUS / EXPAND: restrained feedback */
:is(.icon-btn, button):not(.modal-head .rh button):hover :is(.ic-close, .ic-minus, .ic-plus, .ic-expand)
{ animation: ic-rotate 0.4s var(--ease); }

/* SPEAKER: pulse */
:is(.icon-btn):hover :is(.ic-speaker, .ic-speakerMute)
{ animation: ic-pulse 0.5s var(--ease); }

/* SUN / MOON: gentle rotate */
:is(.icon-btn):hover :is(.ic-sun, .ic-moon)
{ animation: ic-twinkle 0.6s var(--ease); }

/* PAPERCLIP: nudge */
:is(.nav-item, .hex-shape, .mod, .icon-btn, .qa, .lcard, button):hover .ic-paperclip
{ animation: ic-shift 0.5s var(--ease); }

/* SHIELDALERT (in active state) — gentle wobble */
.nav-item.active .ic-shieldAlert { animation: ic-pulse 2.6s ease-in-out infinite; }


/* ============================================================
   RESPONSIVE — TABLET / MOBILE
   ============================================================ */
@media (max-width: 1280px) {
  .main { grid-template-columns: 1fr 380px; }
}

@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }
  .main { grid-template-columns: 1fr 320px; padding: 12px 14px; }
  .portal-center { width: 380px; height: 380px; }
  .hex-node { width: 78px; height: 68px; }
  .title-center, .top-middle .searchbar { display: none; }
  .top-middle { grid-template-columns: 1fr; padding: 0; }
}

@media (max-width: 700px) {
  /* phones: kill the GPU-heavy continuous animations (system is static here) */
  .pf-thread, .sky-rotate, .star.tw, .twinkle-star, .sun-corona, .sun-flare,
  .portal-frame.f1, .portal-frame.f2, .portal-frame.f3 { animation: none !important; }
  .sun-flare { display: none; }
  .nebula { display: none; }
  /* About/Contact never inside the portal on phones — they live in the page-bottom footer */
  .portal-footer { display: none !important; }
  .mobile-footer { display: grid !important; }
}

@media (max-width: 900px) {
  /* Convert to mobile: collapse sidebar, stack main panels, scrollable */
  html, body { overflow-x: hidden; overflow-y: auto; height: auto; }
  body { -webkit-text-size-adjust: 100%; }

  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    height: auto; min-height: 100vh;
    overflow: visible;
  }
  .topbar {
    grid-template-columns: auto 1fr auto;
    grid-column: 1 / -1; grid-row: 1;
    padding: 0 12px; height: 60px;
    position: sticky; top: 0;
  }
  .brand { padding-inline-end: 0; gap: 8px; }
  .brand-logo-img { width: 82px; height: 54px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-text .name { font-size: 14px; letter-spacing: 0.1em; }
  .brand-text .sub { display: none; }
  .top-middle { display: none; }
  .top-actions { gap: 4px; }
  .top-actions .icon-btn:not(.ai),
  .top-actions .lang-toggle { display: none; }
  .top-actions .icon-btn.ai,
  .top-actions .user-chip { display: flex; }
  /* one clean account control on mobile: keep the Sign-in pill, drop the redundant guest avatar chip */
  .user-chip.guest { display: none; }
  .user-chip { padding: 4px 8px 4px 4px; }
  .user-chip .meta { display: none; }
  .btn-login { height: 38px; padding: 0 14px; }
  .btn-login span { display: inline; font-size: 12px; }

  /* About/Contact move to the very bottom of the page on mobile */
  .portal-footer { display: none; }
  .mobile-footer {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    padding: 14px; margin-top: 4px;
  }
  .mfoot-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px; border-radius: 13px; cursor: pointer;
    font-family: var(--font-fa); font-size: 13px; font-weight: 600;
    color: var(--frost); background: var(--bg-soft); border: 1px solid var(--line);
  }
  html[dir="ltr"] .mfoot-btn { font-family: var(--font-en); }
  .mfoot-btn svg { color: var(--cyan-dark); }
  .mfoot-btn:active { background: rgba(0,212,255,0.08); border-color: var(--cyan); }

  /* Sidebar becomes off-canvas drawer (closed by default) */
  .sidebar {
    grid-row: 2; grid-column: 1;
    position: fixed; inset-block-start: 60px; inset-inline-start: 0;
    inset-block-end: 0; width: 80vw; max-width: 280px;
    z-index: 50;
    transform: translateX(calc(-1 * var(--rtl-flip, 100%)));
    transition: transform 0.3s var(--ease);
    background: linear-gradient(180deg, #04101C, #061a2e);
    border-inline-end: 1px solid var(--line-strong);
    box-shadow: 24px 0 60px rgba(0,0,0,0.5);
  }
  html[dir="rtl"] .sidebar { transform: translateX(100%); }
  html[dir="ltr"] .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0) !important; }

.menu-btn {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  display: none;
  place-items: center;
  color: var(--frost);
  flex-shrink: 0;
}
.menu-btn.mobile-only { display: none; }
@media (max-width: 900px) {
  .menu-btn.mobile-only { display: grid; }
}

  /* Sidebar backdrop overlay when open */
  .sidebar-bd {
    display: none;
    position: fixed; inset: 60px 0 0 0;
    background: rgba(4,16,28,0.6); backdrop-filter: blur(4px);
    z-index: 49;
  }
  .sidebar-bd.open { display: block; }

  /* Main becomes stacked single-column */
  .main {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 12px; padding: 12px;
    overflow: visible; height: auto;
  }
  .portal-area {
    grid-column: 1; grid-row: 1;
    height: 72vh; min-height: 420px; max-height: none;
    aspect-ratio: auto; border-radius: 18px;
  }
  /* solar system is JS-sized from the portal box; just trim its chrome on small screens */
  .portal-footer { bottom: 10px; gap: 6px; padding: 5px 8px; }
  .pfoot-btn { padding: 5px 11px; font-size: 11.5px; }
  /* mobile: system is static, so planets don't overlap — show bold readable names */
  .planet-label {
    display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
    color: #fff; padding: 2px 7px; border-radius: 8px;
    background: rgba(6,18,30,0.62); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    text-shadow: 0 1px 3px rgba(0,0,0,0.9); max-width: 96px; white-space: normal;
    text-wrap: balance; line-height: 1.15;
  }
  .portal-hint { display: none; }

  .right-col {
    grid-column: 1; grid-row: 2;
    overflow: visible; height: auto;
  }
  .rc-fit { height: auto; transform: none !important; width: 100% !important; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .qa { height: 84px; }

  .module-grid {
    grid-template-columns: repeat(4, 1fr);
    max-height: none; overflow: visible;
  }
  .mod { aspect-ratio: 1; }

  .bottom-row {
    grid-column: 1; grid-row: 3;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(140px, auto);
    gap: 10px;
  }
  .bottom-row .panel { min-height: 140px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(3, 1fr); }
  .bottom-row { grid-template-columns: 1fr; }
  .portal-area { height: 70vh; min-height: 400px; }
  .modal { width: 96vw; max-height: 88vh; border-radius: 16px; }
  .modal-head { padding: 12px 14px; }
  .modal-body { padding: 14px; }
  .modal-head .ti { font-size: 14px; }
  .row { flex-direction: column; }
  .row > * { width: 100%; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card-grid { grid-template-columns: 1fr; }
  .tabs { width: 100%; overflow-x: auto; }
  .table { font-size: 11px; }
  .table th, .table td { padding: 6px 8px; }
  .chat-window { height: 60vh; }
  .topbar { padding: 0 8px; }
  .brand-text .name { font-size: 12px; letter-spacing: 0.06em; }
  .brand-text .sub { display: none; }
  .qa { height: 76px; padding: 10px; }
  .qa .lbl { font-size: 11px; }
  .qa .icoR { width: 32px; height: 32px; }
}

@media (max-width: 380px) {
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .module-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hex-node { width: 48px; height: 42px; }
  .hex-shape .ico { width: 14px; height: 14px; }
  .hex-shape .lbl { font-size: 7px; }
}

/* ============================================================
   LEVEL 1 — HERO QUESTION · TRUST BAND · GUEST · AUTH · NUDGE
   ============================================================ */
.hero {
  grid-column: 1 / -1; grid-row: 2;
  display: flex; justify-content: center;
  padding: 14px 22px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0,212,255,0.045), rgba(4,16,28,0));
  z-index: 4;
}
.hero-inner {
  width: 100%; max-width: 760px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.hero-q { font-size: 21px; font-weight: 600; color: var(--ice-white); letter-spacing: 0.01em; }
.hero-sub { font-size: 12.5px; color: var(--frost); opacity: 0.78; margin-top: 0; }

.hero-ask {
  width: 100%; height: 48px; margin-top: 3px;
  display: flex; align-items: center; gap: 12px;
  padding-inline: 18px 7px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.hero-ask:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-tint), var(--shadow-md); }
.hero-ask-ico { color: var(--cyan); flex-shrink: 0; }
.hero-ask input { flex: 1; font-size: 14px; color: var(--text); min-width: 0; }
.hero-ask input::placeholder { color: var(--text-mute); }
.hero-ask-btn {
  display: flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #04101C;
  background: linear-gradient(135deg, var(--cyan), #00a9cc);
  box-shadow: var(--shadow-cyan); flex-shrink: 0;
  transition: filter 0.2s var(--ease);
}
.hero-ask-btn:hover { filter: brightness(1.07); }

.trust-band { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-top: 2px; }
.trust-item { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--text-mute); }
.trust-item svg { color: var(--sage); flex-shrink: 0; }

/* Top-bar login button + guest chip */
.btn-login {
  display: flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 16px; border-radius: 12px;
  font-size: 12.5px; font-weight: 600; color: #04101C; white-space: nowrap;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  box-shadow: var(--shadow-gold);
  transition: filter 0.2s var(--ease);
}
.btn-login:hover { filter: brightness(1.06); }
.av.guest {
  background: rgba(168,213,232,0.12);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center; color: var(--frost);
}
.av.guest::after { display: none; }

/* Soft signup nudge (bottom-start toast) */
.guest-nudge {
  position: fixed; inset-inline-start: 22px; bottom: 22px; z-index: 60;
  display: flex; align-items: center; gap: 12px; max-width: 388px;
  padding: 12px 12px 12px 16px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(14,46,78,0.97), rgba(10,37,64,0.97));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  animation: nudgeIn 0.4s var(--ease);
}
@keyframes nudgeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.guest-nudge .gn-ico {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--gold-tint); color: var(--gold);
}
.guest-nudge .gn-body { flex: 1; }
.guest-nudge .gn-title { font-size: 12.5px; color: var(--ice-white); line-height: 1.5; }
.guest-nudge .gn-cta {
  height: 32px; padding: 0 14px; border-radius: 9px; flex-shrink: 0;
  font-size: 12px; font-weight: 600; color: #04101C; background: var(--cyan);
  transition: filter 0.2s var(--ease);
}
.guest-nudge .gn-cta:hover { filter: brightness(1.07); }
.guest-nudge .gn-x {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--frost);
}
.guest-nudge .gn-x:hover { background: rgba(255,255,255,0.06); }

/* Authentication center — v31.96 */
.modal.auth-modal {
  width: min(980px, calc(100vw - 32px));
  height: min(780px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border-color: rgba(126, 226, 184, .2);
  background: #061525;
  box-shadow:
    0 34px 100px rgba(0, 0, 0, .66),
    0 0 0 1px rgba(197, 184, 255, .04),
    0 0 62px rgba(126, 226, 184, .07);
}
.modal.auth-modal .modal-head {
  flex: 0 0 auto;
  border-bottom-color: rgba(126, 226, 184, .13);
  background: rgba(5, 19, 34, .98);
}
.modal.auth-modal .modal-head .ic {
  color: #7ee2b8;
  border-color: rgba(126, 226, 184, .22);
  background: rgba(126, 226, 184, .08);
}
.modal.auth-modal .modal-body {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #061525;
}

.auth-center {
  --auth-mint: #7ee2b8;
  --auth-mint-strong: #9aebca;
  --auth-lilac: #c5b8ff;
  --auth-white: #f7fbff;
  --auth-danger: #ff9d9d;
  --auth-surface: rgba(255, 255, 255, .038);
  --auth-surface-strong: rgba(255, 255, 255, .065);
  --auth-line: rgba(210, 231, 241, .13);
  --auth-line-strong: rgba(210, 231, 241, .22);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  color: #dcebf3;
  background:
    radial-gradient(680px 420px at 98% -8%, rgba(126, 226, 184, .08), transparent 68%),
    radial-gradient(620px 420px at -4% 106%, rgba(197, 184, 255, .065), transparent 70%),
    #061525;
}
.auth-center :is(button, input):focus-visible {
  outline: 3px solid rgba(126, 226, 184, .42);
  outline-offset: 2px;
}
.auth-layout {
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(460px, 1.18fr);
  height: 100%;
  min-height: 0;
}
.auth-trust-panel {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: clamp(28px, 3.2vw, 42px);
  overflow: hidden;
  border-inline-end: 1px solid var(--auth-line);
  background:
    linear-gradient(145deg, rgba(126, 226, 184, .08), rgba(197, 184, 255, .035) 52%, transparent 78%),
    rgba(8, 29, 48, .75);
}
.auth-trust-panel::before {
  content: "";
  position: absolute;
  width: 320px;
  aspect-ratio: 1;
  inset-inline-end: -170px;
  top: -165px;
  border-radius: 50%;
  border: 1px solid rgba(126, 226, 184, .12);
  box-shadow: 0 0 80px rgba(126, 226, 184, .05);
  z-index: 0;
  pointer-events: none;
}
.auth-trust-panel::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 280px;
  aspect-ratio: 1;
  inset-inline-start: -155px;
  bottom: -165px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 184, 255, .105), rgba(126, 226, 184, .035) 42%, transparent 70%);
  filter: blur(5px);
  opacity: .72;
  pointer-events: none;
  animation: auth-panel-ambient 14s ease-in-out infinite alternate;
}
.auth-trust-panel > * {
  position: relative;
  z-index: 1;
}
.auth-orbit {
  position: relative;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  pointer-events: none;
}
.auth-orbit::before,
.auth-orbit::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(126, 226, 184, .22);
  border-radius: 50%;
}
.auth-orbit::before {
  animation: auth-orbit-turn 24s linear infinite;
}
.auth-orbit::after {
  inset: 9px -5px;
  border-color: rgba(197, 184, 255, .18);
  transform: rotate(42deg);
  animation: auth-orbit-turn-reverse 29s linear infinite;
}
.auth-orbit-core {
  position: relative;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(126, 226, 184, .25);
  border-radius: 18px;
  color: var(--auth-mint);
  background: linear-gradient(145deg, rgba(126, 226, 184, .12), rgba(197, 184, 255, .07));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28), 0 0 26px rgba(126, 226, 184, .08);
  animation: auth-orbit-float 6.8s ease-in-out infinite;
}
.auth-orbit-symbol {
  display: grid;
  place-items: center;
  animation: auth-symbol-enter .24s var(--ease);
}
.auth-orbit > span {
  position: absolute;
  z-index: 3;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--auth-mint);
  box-shadow: 0 0 12px rgba(126, 226, 184, .7);
}
.auth-orbit > span:nth-child(1) { inset-inline-start: 2px; top: 17px; }
.auth-orbit > span:nth-child(2) { inset-inline-end: 4px; bottom: 13px; background: var(--auth-lilac); }
.auth-orbit > span:nth-child(3) { inset-inline-start: 29px; bottom: -2px; width: 4px; height: 4px; }
.auth-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  color: var(--auth-mint-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.auth-eyebrow > span {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--auth-mint), var(--auth-lilac));
}
.auth-trust-panel h2 {
  max-width: 330px;
  color: var(--auth-white);
  font-size: clamp(22px, 2.2vw, 29px);
  line-height: 1.42;
  font-weight: 760;
  letter-spacing: -.018em;
}
.auth-trust-lead {
  max-width: 340px;
  margin-top: 12px;
  color: rgba(220, 235, 243, .69);
  font-size: 12.5px;
  line-height: 1.85;
}
.auth-return-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 21px;
  padding: 12px 13px;
  border: 1px solid rgba(197, 184, 255, .16);
  border-radius: 14px;
  color: #e8e3ff;
  background: rgba(197, 184, 255, .06);
}
.auth-return-card > svg { flex: 0 0 auto; color: var(--auth-lilac); }
.auth-return-card p { font-size: 11.5px; line-height: 1.65; }
.auth-return-card strong { color: var(--auth-white); font-weight: 700; }
.auth-benefits {
  display: grid;
  gap: 13px;
  margin-top: 26px;
  padding: 0;
  list-style: none;
}
.auth-benefit {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 11px;
  align-items: start;
  padding: 4px 0;
  color: inherit;
  text-align: inherit;
}
.auth-benefit-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--auth-line);
  border-radius: 11px;
  color: var(--auth-mint);
  background: var(--auth-surface);
}
.auth-benefit-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding-top: 1px;
}
.auth-benefit-copy strong {
  color: #edf7fb;
  font-size: 12px;
  font-weight: 650;
}
.auth-benefit-copy > span {
  color: rgba(183, 211, 225, .62);
  font-size: 10.5px;
  line-height: 1.55;
}
.auth-service-state {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 25px;
  padding: 7px 10px;
  border: 1px solid rgba(232, 201, 143, .16);
  border-radius: 999px;
  color: #e8c98f;
  background: rgba(232, 201, 143, .055);
  font-size: 10.5px;
  line-height: 1.4;
}
.auth-state-dot {
  width: 7px;
  height: 7px;
  border: 2px solid rgba(232, 201, 143, .28);
  border-radius: 50%;
  background: #e8c98f;
  box-shadow: 0 0 0 3px rgba(232, 201, 143, .08);
}

.auth-form-panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: clamp(24px, 3vw, 38px) clamp(26px, 4vw, 48px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(126, 226, 184, .25) transparent;
}
@media (min-width: 841px) {
  .auth-form-panel-signup {
    padding-block: 28px;
  }
  .auth-form-panel-signup .auth-heading {
    margin-top: 18px;
  }
  .auth-form-panel-signup .auth-stepper {
    margin-top: 14px;
  }
  .auth-form-panel-signup .auth-form {
    gap: 12px;
    margin-top: 16px;
  }
}
.auth-mobile-return { display: none; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  min-height: 48px;
  padding: 4px;
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
}
.auth-tabs button {
  min-height: 40px;
  border-radius: 10px;
  color: rgba(207, 228, 239, .68);
  font-size: 12.5px;
  font-weight: 650;
  transition: color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.auth-tabs button:hover { color: var(--auth-white); }
.auth-tabs button.active {
  color: #082235;
  background: linear-gradient(135deg, var(--auth-mint), #a5ecd0);
  box-shadow: 0 9px 22px rgba(126, 226, 184, .14);
}
.auth-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  margin: -7px 0 5px;
  padding: 0 5px;
  color: var(--auth-mint);
  font-size: 11.5px;
  font-weight: 650;
}
.auth-back:hover { color: var(--auth-white); }
.auth-heading { margin-top: 24px; }
.auth-heading h2 {
  color: var(--auth-white);
  font-size: clamp(21px, 2.1vw, 27px);
  line-height: 1.4;
  font-weight: 760;
  letter-spacing: -.018em;
}
.auth-heading p {
  margin-top: 6px;
  color: rgba(193, 218, 231, .67);
  font-size: 11.5px;
  line-height: 1.75;
}
.auth-stepper {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 18px 0 2px;
}
.auth-stepper > div {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(193, 218, 231, .48);
}
.auth-stepper > div span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid var(--auth-line);
  border-radius: 50%;
  font: 600 10px/1 var(--font-en);
}
.auth-stepper > div b { font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.auth-stepper > div.active { color: var(--auth-mint); }
.auth-stepper > div.active span {
  border-color: rgba(126, 226, 184, .34);
  color: #082235;
  background: var(--auth-mint);
}
.auth-stepper > i {
  height: 1px;
  background: linear-gradient(90deg, rgba(126, 226, 184, .26), var(--auth-line));
}
.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.auth-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.auth-field > label {
  color: rgba(222, 238, 246, .82);
  font-size: 11px;
  font-weight: 620;
}
.auth-input-shell {
  position: relative;
  display: flex;
  min-width: 0;
  height: 50px;
  align-items: center;
  border: 1px solid var(--auth-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .038);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
@media (hover: hover) {
  .auth-input-shell:hover {
    border-color: rgba(126, 226, 184, .34);
    background: rgba(126, 226, 184, .025);
  }
}
.auth-input-shell:focus-within {
  border-color: rgba(126, 226, 184, .7);
  background: rgba(126, 226, 184, .045);
  box-shadow: 0 0 0 3px rgba(126, 226, 184, .11);
}
.auth-field.invalid .auth-input-shell {
  border-color: rgba(255, 157, 157, .62);
  box-shadow: 0 0 0 3px rgba(255, 157, 157, .07);
}
.auth-input-icon {
  flex: 0 0 auto;
  margin-inline-start: 14px;
  color: rgba(126, 226, 184, .78);
}
.auth-input-shell input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  color: var(--auth-white);
  background: transparent;
  font-size: 14px;
  caret-color: var(--auth-mint);
}
.auth-input-shell input[dir="ltr"] {
  text-align: left;
  font-family: var(--font-en);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.auth-input-shell input::placeholder { color: rgba(174, 203, 218, .37); }
.auth-input-shell > input:focus-visible { outline: none; }
.auth-password-toggle {
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 42px;
  margin-inline-end: 4px;
  padding: 0 9px;
  border-radius: 10px;
  color: var(--auth-mint);
  font-size: 10.5px;
  font-weight: 650;
}
.auth-password-toggle:hover { background: rgba(126, 226, 184, .07); }
.auth-field-hint,
.auth-field-error {
  min-height: 16px;
  font-size: 9.8px;
  line-height: 1.55;
}
.auth-field-hint { color: rgba(180, 208, 222, .56); }
.auth-field-error { color: var(--auth-danger); }
.auth-strength {
  display: grid;
  gap: 6px;
  margin-top: -6px;
}
.auth-strength > div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.auth-strength > div span {
  height: 3px;
  border-radius: 99px;
  background: var(--auth-line);
}
.auth-strength[data-score="1"] > div span:nth-child(-n+1) { background: var(--auth-danger); }
.auth-strength[data-score="2"] > div span:nth-child(-n+2) { background: #e8c98f; }
.auth-strength[data-score="3"] > div span:nth-child(-n+3) { background: #9fdbca; }
.auth-strength[data-score="4"] > div span { background: var(--auth-mint); }
.auth-strength p {
  color: rgba(180, 208, 222, .52);
  font-size: 9.6px;
  line-height: 1.5;
}
.auth-strength p b { color: rgba(229, 241, 247, .8); font-weight: 650; }
.auth-form-options {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.auth-check {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 9px;
  color: rgba(213, 233, 242, .75);
  cursor: pointer;
}
.auth-check input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--auth-mint);
}
.auth-check > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.auth-check b { font-size: 10.5px; font-weight: 620; line-height: 1.5; }
.auth-check small {
  max-width: 235px;
  color: rgba(180, 208, 222, .45);
  font-size: 8.9px;
  line-height: 1.45;
}
.auth-check.invalid b { color: var(--auth-danger); }
.auth-consent { padding: 3px 0 0; }
.auth-text-button {
  flex: 0 0 auto;
  min-height: 32px;
  color: var(--auth-mint);
  font-size: 10.5px;
  font-weight: 650;
}
.auth-text-button:hover { color: var(--auth-white); }
.auth-notice {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid rgba(232, 201, 143, .2);
  border-radius: 12px;
  color: #f0d8a8;
  background: rgba(232, 201, 143, .07);
}
.auth-notice svg { margin-top: 1px; }
.auth-notice p { font-size: 10.5px; line-height: 1.65; }
.auth-submit {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 1px;
  border-radius: 13px;
  color: #082235;
  background: linear-gradient(135deg, var(--auth-mint), #a6edd1 58%, #d7f5e7);
  box-shadow: 0 13px 30px rgba(126, 226, 184, .15);
  font-size: 12.5px;
  font-weight: 760;
  transition: transform .18s var(--ease), filter .18s var(--ease), box-shadow .18s var(--ease);
}
.auth-submit:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.035);
  box-shadow: 0 16px 34px rgba(126, 226, 184, .21);
}
.auth-submit:disabled { cursor: wait; opacity: .72; }
.auth-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(8, 34, 53, .25);
  border-top-color: #082235;
  border-radius: 50%;
  animation: authSpin .7s linear infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }
.auth-method-toggle,
.auth-guest {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  color: rgba(221, 238, 246, .78);
  background: rgba(255, 255, 255, .025);
  font-size: 11.5px;
  font-weight: 620;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.auth-method-toggle { margin-top: -3px; color: var(--auth-mint); }
.auth-method-toggle:hover,
.auth-guest:hover {
  color: var(--auth-white);
  border-color: rgba(126, 226, 184, .32);
  background: rgba(126, 226, 184, .055);
}
.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 11px;
  margin: 18px 0 13px;
}
.auth-divider span { height: 1px; background: var(--auth-line); }
.auth-divider b {
  color: rgba(177, 205, 219, .46);
  font-size: 9.5px;
  font-weight: 500;
}
.auth-legal {
  margin-top: 13px;
  text-align: center;
}
.auth-legal p {
  color: rgba(174, 203, 218, .48);
  font-size: 9.3px;
  line-height: 1.65;
}

@media (max-width: 840px) {
  .modal.auth-modal {
    width: min(640px, calc(100vw - 24px));
    height: min(880px, calc(100dvh - 24px));
    max-height: calc(100dvh - 24px);
  }
  .modal.auth-modal .modal-body {
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .auth-center { height: auto; min-height: 100%; overflow: visible; }
  .auth-layout { grid-template-columns: 1fr; height: auto; min-height: 100%; }
  .auth-trust-panel {
    padding: 22px 28px;
    border-inline-end: 0;
    border-bottom: 1px solid var(--auth-line);
  }
  .auth-orbit {
    position: absolute;
    inset-inline-end: 28px;
    top: 21px;
    width: 66px;
    height: 66px;
    margin: 0;
    opacity: .72;
  }
  .auth-orbit > div { width: 44px; height: 44px; border-radius: 14px; }
  .auth-trust-panel h2 { max-width: calc(100% - 92px); font-size: 21px; }
  .auth-trust-lead { max-width: calc(100% - 80px); margin-top: 7px; }
  .auth-return-card { max-width: calc(100% - 78px); margin-top: 12px; }
  .auth-benefits { display: none; }
  .auth-service-state { margin-top: 12px; }
  .auth-form-panel { height: auto; overflow: visible; }
}

@media (max-width: 640px) {
  .modal.auth-modal {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .modal.auth-modal .modal-head {
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: 68px;
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  }
  .modal.auth-modal .modal-head .st { max-width: 235px; line-height: 1.45; }
  .modal.auth-modal .modal-body { overflow-y: auto; overscroll-behavior: contain; }
  .auth-center { height: auto; min-height: auto; }
  .auth-trust-panel { padding: 16px; }
  .auth-orbit { display: none; }
  .auth-eyebrow { margin-bottom: 6px; }
  .auth-trust-panel h2 { max-width: none; font-size: 18px; }
  .auth-trust-lead { display: none; }
  .auth-return-card { display: none; }
  .auth-service-state { margin-top: 9px; }
  .auth-form-panel {
    padding: 18px 16px max(22px, env(safe-area-inset-bottom));
    overflow: visible;
  }
  .auth-mobile-return {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 13px;
    padding: 9px 10px;
    border: 1px solid rgba(197, 184, 255, .15);
    border-radius: 11px;
    color: #ded7ff;
    background: rgba(197, 184, 255, .05);
    font-size: 9.8px;
    line-height: 1.5;
  }
  .auth-mobile-return svg { flex: 0 0 auto; color: var(--auth-lilac); }
  .auth-tabs { min-height: 50px; }
  .auth-tabs button { min-height: 42px; font-size: 13px; }
  .auth-heading { margin-top: 20px; }
  .auth-heading h2 { font-size: 22px; }
  .auth-heading p { font-size: 11px; }
  .auth-form { gap: 15px; margin-top: 18px; }
  .auth-input-shell { height: 52px; }
  .auth-input-shell input { font-size: 16px; }
  .auth-password-toggle { min-height: 44px; }
  .auth-submit { min-height: 52px; font-size: 13px; }
  .auth-method-toggle, .auth-guest { min-height: 48px; }
  .auth-form-options { align-items: flex-start; }
  .auth-check small { max-width: 190px; }
  .guest-nudge {
    display: grid;
    grid-template-columns: 34px 1fr 44px;
    gap: 9px;
  }
  .guest-nudge .gn-cta {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
  }
  .guest-nudge .gn-x { width: 44px; height: 44px; }
}

@media (max-width: 380px) {
  .modal.auth-modal .modal-head .st { display: none; }
  .auth-stepper > div b { display: none; }
  .auth-stepper { grid-template-columns: 25px 1fr 25px; }
  .auth-form-options { flex-direction: column; gap: 5px; }
  .auth-text-button { min-height: 38px; }
  .auth-check small { max-width: none; }
}

@media (max-height: 780px) and (min-width: 841px) {
  .auth-trust-panel {
    padding: 22px 28px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: rgba(126, 226, 184, .2) transparent;
  }
  .auth-orbit {
    width: 66px;
    height: 66px;
    margin-bottom: 14px;
  }
  .auth-orbit-core {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }
  .auth-trust-panel h2 {
    font-size: 22px;
    line-height: 1.35;
  }
  .auth-trust-lead {
    margin-top: 8px;
    font-size: 11.5px;
    line-height: 1.65;
  }
  .auth-return-card {
    margin-top: 12px;
    padding: 9px 11px;
  }
  .auth-benefits {
    gap: 7px;
    margin-top: 14px;
  }
  .auth-service-state {
    margin-top: 12px;
  }
}

@media (max-height: 620px) and (min-width: 641px) {
  .modal.auth-modal { height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-trust-panel { display: none; }
  .auth-form-panel { padding-block: 22px; }
}

@keyframes auth-orbit-turn {
  to { transform: rotate(360deg); }
}
@keyframes auth-orbit-turn-reverse {
  to { transform: rotate(-318deg); }
}
@keyframes auth-orbit-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@keyframes auth-symbol-enter {
  from { opacity: .5; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes auth-panel-ambient {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: .58; }
  to { transform: translate3d(18px, -12px, 0) scale(1.06); opacity: .78; }
}

@media (prefers-reduced-motion: reduce) {
  .modal.auth-modal,
  .modal.auth-modal + *,
  .auth-spinner,
  .auth-orbit::before,
  .auth-orbit::after,
  .auth-orbit-core,
  .auth-orbit-symbol,
  .auth-trust-panel::after { animation: none !important; }
  .auth-submit,
  .auth-tabs button,
  .auth-input-shell { transition: none !important; }
  .guest-nudge { animation: none !important; }
  .auth-submit:hover { transform: none !important; }
}

@media (max-width: 640px) {
  .hero { padding: 12px 14px 14px; }
  .hero-q { font-size: 18px; }
  .hero-sub { font-size: 11.5px; }
  .hero-ask { height: 44px; }
  .hero-ask-btn span { display: none; }
  .btn-login span { display: none; }
  .btn-login { padding: 0 12px; }
  .guest-nudge { inset-inline-start: 12px; inset-inline-end: 12px; bottom: 12px; max-width: none; }
}

/* ============================================================
   LEVEL 2 — ECOSYSTEM MAP
   ============================================================ */
/* Hero entry pill */
.eco-entry {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 8px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(0,212,255,0.06);
  font-size: 12px; font-weight: 500; color: var(--text-soft);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.eco-entry:hover { border-color: var(--cyan); color: var(--ice-white); background: var(--cyan-tint); }
.eco-entry .eco-entry-meta { font-size: 10.5px; color: var(--text-mute); padding-inline-start: 8px; border-inline-start: 1px solid var(--line); }
.eco-entry .ic-chevL { opacity: 0.6; }

/* Widen the modal when it hosts the ecosystem map */
.modal:has(.eco) { width: min(1180px, 94vw); max-height: 88vh; }

.eco-hero { text-align: center; padding: 4px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.eco-title { font-size: 24px; font-weight: 700; color: var(--ice-white); letter-spacing: 0.01em; }
.eco-sub { font-size: 12.5px; color: var(--frost); opacity: 0.8; margin-top: 6px; }
.eco-stats { display: flex; justify-content: center; gap: 36px; margin-top: 16px; }
.eco-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.eco-stat b { font-size: 26px; font-weight: 600; color: var(--cyan); font-family: var(--font-display); line-height: 1; }
.eco-stat span { font-size: 10.5px; color: var(--text-mute); }

.eco-layers { display: flex; flex-direction: column; gap: 12px; }

.eco-layer {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, var(--lt), rgba(4,16,28,0));
  transition: border-color 0.25s var(--ease);
}
.eco-layer.open { border-color: color-mix(in oklab, var(--lc) 45%, var(--line)); }

.eco-layer-head {
  width: 100%; display: flex; align-items: center; gap: 16px;
  padding: 16px 18px; text-align: start; cursor: pointer;
}
.eco-l-num {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 700; font-family: var(--font-display);
  color: var(--lc); background: var(--lt); border: 1px solid color-mix(in oklab, var(--lc) 35%, transparent);
}
.eco-l-ico {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
  display: grid; place-items: center; color: var(--lc);
  background: rgba(255,255,255,0.02); border: 1px solid var(--line);
}
.eco-l-txt { flex: 1; min-width: 0; }
.eco-l-name { font-size: 15px; font-weight: 600; color: var(--ice-white); }
.eco-l-name .lat { font-size: 11px; font-weight: 400; color: var(--text-mute); font-family: var(--font-en); letter-spacing: 0.02em; }
.eco-l-desc { font-size: 11.5px; color: var(--frost); opacity: 0.78; margin-top: 3px; }
.eco-l-count { flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--text-soft); white-space: nowrap; }
.eco-l-count span { font-size: 10px; color: var(--text-mute); font-weight: 400; }
.eco-l-chev { flex-shrink: 0; color: var(--text-mute); transform: rotate(-90deg); transition: transform 0.25s var(--ease); }
.eco-layer.open .eco-l-chev { transform: rotate(90deg); }

.eco-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px;
  padding: 4px 18px 18px;
  animation: ecoGridIn 0.3s var(--ease);
}
@keyframes ecoGridIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.eco-card {
  position: relative; text-align: start;
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 12px 30px; border-radius: 13px;
  border: 1px solid var(--line); background: var(--bg-card);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.eco-card:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--lc) 50%, var(--line)); box-shadow: var(--shadow-md); }
.eco-card .ec-top { display: flex; align-items: center; justify-content: space-between; }
.eco-card .ec-ico {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  color: var(--lc); background: var(--lt); border: 1px solid color-mix(in oklab, var(--lc) 28%, transparent);
}
.eco-card .ec-num { font-size: 11px; font-weight: 700; color: var(--text-mute); font-family: var(--font-display); }
.eco-card .ec-name { font-size: 12.5px; font-weight: 600; color: var(--ice-white); line-height: 1.4; }
.eco-card .ec-desc { font-size: 10.5px; color: var(--frost); opacity: 0.72; line-height: 1.55; }
.ec-badge {
  position: absolute; inset-block-end: 10px; inset-inline-start: 12px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 999px;
}
.ec-badge.key { color: var(--gold); background: var(--gold-tint); border: 1px solid rgba(201,169,110,0.35); }
.ec-badge.active { color: var(--sage); background: rgba(107,158,138,0.15); border: 1px solid rgba(107,158,138,0.35); }
.ec-badge.soon { color: var(--text-mute); background: rgba(168,213,232,0.08); border: 1px solid var(--line); }
.eco-card.k-key { border-color: rgba(201,169,110,0.3); }

/* Vision intro sheet */
.eco-intro-bd {
  position: fixed; inset: 0; z-index: 240;
  background: rgba(4,16,28,0.6); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 24px;
  animation: bdIn 0.2s var(--ease);
}
.eco-intro {
  width: min(420px, 92vw); border-radius: 18px; padding: 22px;
  background: linear-gradient(180deg, rgba(14,46,78,0.98), rgba(10,37,64,0.98));
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
  animation: mIn 0.25s var(--ease);
}
.eco-intro .ei-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.eco-intro .ei-ico {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  color: var(--lc); background: color-mix(in oklab, var(--lc) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--lc) 30%, transparent);
}
.eco-intro .ei-num { font-size: 11px; font-weight: 700; color: var(--text-mute); font-family: var(--font-display); letter-spacing: 0.04em; }
.eco-intro .ei-name { font-size: 19px; font-weight: 600; color: var(--ice-white); margin-top: 4px; }
.eco-intro .ei-lat { font-size: 11.5px; color: var(--text-mute); font-family: var(--font-en); margin-top: 3px; }
.eco-intro .ei-desc { font-size: 12.5px; color: var(--frost); line-height: 1.7; margin-top: 12px; }
.eco-intro .ei-actions { display: flex; gap: 8px; margin-top: 18px; }
.eco-intro .ei-actions .btn { flex: 1; justify-content: center; }

@media (max-width: 640px) {
  .eco-grid { grid-template-columns: 1fr 1fr; padding: 4px 12px 14px; }
  .eco-stats { gap: 22px; }
  .eco-l-count span { display: none; }
  .eco-layer-head { gap: 10px; padding: 12px; }
  .eco-l-ico { display: none; }
}

/* ============================================================
   LEVEL 3 — SMART LEGAL CONSULTATION (text · live · avatar)
   ============================================================ */
.modal:has(.consult) { width: min(1080px, 94vw); max-height: 86vh; }
.modal:has(.consult-text-scene) { width: min(1180px, 96vw); }
.modal:has(.consult-video-scene) { width: min(1180px, 96vw); }
.modal:has(.consult-voice-scene),
.modal:has(.consult-avatar-scene),
.modal:has(.consult-webinar-scene) { width: min(1180px, 96vw); }

.consult-entry {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  min-height: 360px;
  padding: 8px 6px 14px;
}
.consult-entry-hero { text-align: center; padding: 4px 16px 0; }
.ce-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--cyan-dark);
  background: var(--cyan-tint);
  border: 1px solid rgba(0,212,255,0.25);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 12px;
}
.consult-entry-hero h3 { margin: 0; font-size: 22px; color: var(--ice-white); font-weight: 800; }
.consult-entry-hero p {
  max-width: 640px;
  margin: 10px auto 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.9;
}
.consult-entry-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.consult-entry-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 9px;
  padding: 18px 12px 14px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025)), rgba(8,28,46,0.72);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.consult-entry-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0,212,255,0.42);
  background: linear-gradient(180deg, rgba(0,212,255,0.10), rgba(201,169,110,0.035)), rgba(8,28,46,0.82);
}
.consult-entry-card.selected {
  border-color: rgba(0,212,255,0.72);
  background: linear-gradient(180deg, rgba(0,212,255,0.15), rgba(201,169,110,0.055)), rgba(8,28,46,0.88);
  box-shadow: 0 0 0 1px rgba(0,212,255,0.16), 0 18px 42px rgba(0,212,255,0.10);
}
.cec-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--cyan-dark);
  background: linear-gradient(135deg, rgba(0,212,255,0.16), rgba(201,169,110,0.10));
  border: 1px solid rgba(0,212,255,0.16);
}
.cec-title { color: var(--ice-white); font-size: 14px; font-weight: 800; }
.cec-desc { min-height: 42px; color: var(--text-soft); font-size: 11.5px; line-height: 1.55; }
.cec-cta {
  margin-top: auto;
  width: 100%;
  min-height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  font-size: 12px;
  font-weight: 800;
}
.consult-entry-card.selected .cec-cta {
  color: var(--cyan-dark);
  background: rgba(0,212,255,0.12);
  border: 1px solid rgba(0,212,255,0.34);
}
.consult-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  margin-bottom: 12px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 12px;
  cursor: pointer;
}
.consult-text-scene {
  direction: ltr;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 12px;
  min-height: 520px;
}
.consult-text-scene > * { direction: rtl; }
.ct-panel,
.ct-chat-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025)), rgba(7, 25, 43, 0.76);
  box-shadow: var(--shadow-sm);
}
.ct-panel {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ct-back {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  cursor: pointer;
}
.ct-panel-title {
  color: var(--ice-white);
  font-size: 13px;
  font-weight: 800;
}
.ct-case-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 2px;
}
.ct-case-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-mute);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(168,213,232,0.10);
}
.ct-case-row b {
  color: var(--frost);
  font-weight: 700;
  text-align: left;
}
.ct-case-action,
.ct-specialist {
  min-height: 36px;
  border-radius: 10px;
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  font-size: 12px;
  font-weight: 800;
}
.ct-doc-box {
  margin-top: auto;
  display: grid;
  gap: 8px;
  color: var(--text-mute);
  font-size: 11.5px;
}
.ct-doc-box button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  color: var(--cyan-dark);
  background: var(--cyan-tint);
  border: 1px solid rgba(0,212,255,0.22);
}
.ct-chat-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ct-chat-head {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 18, 34, 0.42);
}
.ct-chat-head h3 {
  margin: 0;
  color: var(--ice-white);
  font-size: 18px;
  font-weight: 850;
}
.ct-chat-head span {
  color: var(--text-soft);
  font-size: 11.5px;
}
.ct-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--cyan-dark) !important;
  background: var(--cyan-tint);
  border: 1px solid rgba(0,212,255,0.22);
  font-weight: 800;
}
.ct-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 12px rgba(117, 184, 150, 0.75);
}
.ct-message-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow-y: auto;
}
.ct-empty,
.cv-empty {
  margin: auto;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.7;
}
.ct-empty svg,
.cv-empty svg { color: var(--cyan-dark); }
.ct-empty b { color: var(--ice-white); font-size: 14px; }
.ct-bubble {
  max-width: min(78%, 540px);
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--frost);
  font-size: 13px;
  line-height: 1.8;
  border: 1px solid rgba(168,213,232,0.12);
}
.ct-bubble.ai {
  align-self: flex-start;
  background: rgba(255,255,255,0.055);
  border-top-right-radius: 5px;
}
.ct-bubble.user {
  align-self: flex-end;
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  border-color: rgba(255,255,255,0.16);
  border-top-left-radius: 5px;
}
.ct-inputbar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(5, 18, 34, 0.48);
}
.ct-inputbar button,
.ct-inputbar input {
  min-height: 42px;
  border-radius: 12px;
}
.ct-inputbar button {
  display: grid;
  place-items: center;
  color: var(--text-soft);
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--line);
}
.ct-inputbar input {
  min-width: 0;
  color: var(--ice-white);
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--line);
  padding: 0 13px;
  outline: none;
}
.ct-inputbar input:focus {
  border-color: rgba(0,212,255,0.48);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.08);
}
.ct-inputbar .ct-send {
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  border: none;
}
.ct-tool-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ct-tool {
  min-height: 62px;
  display: grid;
  grid-template-columns: 34px 1fr 14px;
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-items: center;
  padding: 9px;
  border-radius: 12px;
  color: var(--frost);
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--line);
  text-align: right;
}
.ct-tool span {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--cyan-dark);
  background: var(--cyan-tint);
}
.ct-tool b {
  font-size: 12px;
  color: var(--ice-white);
}
.ct-tool small {
  font-size: 10.5px;
  color: var(--text-mute);
}
.ct-tool > svg {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: var(--text-mute);
}
.ct-specialist { margin-top: auto; }

.consult-video-scene {
  direction: ltr;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 12px;
  min-height: 520px;
}
.consult-video-scene > * { direction: rtl; }
.cv-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025)), rgba(7, 25, 43, 0.78);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cv-session-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cv-end {
  min-height: 36px;
  border-radius: 10px;
  color: var(--ice-white);
  background: rgba(238, 91, 91, 0.18);
  border: 1px solid rgba(238, 91, 91, 0.35);
  font-size: 12px;
  font-weight: 800;
}
.cv-note {
  margin-top: auto;
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 12px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(168,213,232,0.12);
  font-size: 11.5px;
  line-height: 1.7;
}
.cv-note b { color: var(--ice-white); font-size: 12px; }
.cv-stage {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}
.cv-video-frame {
  position: relative;
  min-height: 438px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 24%, rgba(0,212,255,0.12), transparent 30%),
    linear-gradient(145deg, rgba(10, 31, 52, 0.98), rgba(4, 13, 26, 0.96));
  box-shadow: var(--shadow-md);
}
.cv-live-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--ice-white);
  background: rgba(117,184,150,0.26);
  border: 1px solid rgba(117,184,150,0.44);
  font-size: 11px;
  font-weight: 800;
}
.cv-lawyer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.cv-lawyer-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(255,255,255,0.035) 22% 23%, transparent 23% 78%, rgba(255,255,255,0.035) 78% 79%, transparent 79%),
    radial-gradient(circle at 50% 72%, rgba(201,169,110,0.16), transparent 28%);
}
.cv-lawyer-avatar {
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
  border-radius: 34px;
  color: var(--cyan-dark);
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(145deg, rgba(0,212,255,0.18), rgba(201,169,110,0.10));
  border: 1px solid rgba(0,212,255,0.30);
  box-shadow: 0 28px 90px rgba(0,0,0,0.34), inset 0 0 0 1px rgba(255,255,255,0.08);
  z-index: 1;
}
.cv-nameplate {
  position: absolute;
  bottom: 18px;
  right: 18px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ice-white);
  background: rgba(3, 13, 25, 0.68);
  border: 1px solid rgba(168,213,232,0.18);
  backdrop-filter: blur(12px);
}
.cv-nameplate span { color: var(--text-soft); font-size: 11px; }
.cv-self-preview {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 124px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--cyan-dark);
  background: linear-gradient(145deg, rgba(12, 37, 60, 0.9), rgba(2, 10, 22, 0.9));
  border: 1px solid rgba(0,212,255,0.22);
}
.cv-self-preview span {
  color: var(--text-soft);
  font-size: 11px;
}
.cv-controls {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(7, 25, 43, 0.78);
}
.cv-controls button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--frost);
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(168,213,232,0.12);
}
.cv-controls button.off {
  color: var(--danger);
  background: rgba(238,91,91,0.16);
  border-color: rgba(238,91,91,0.38);
  box-shadow: inset 0 0 0 1px rgba(238,91,91,0.10);
}
.cv-controls button.danger {
  color: #fff;
  background: var(--danger);
  border-color: rgba(238,91,91,0.65);
}
.cv-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cv-chat-head button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--line);
}
.cv-chat-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.cv-msg {
  padding: 10px 11px;
  border-radius: 12px;
  color: var(--frost);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(168,213,232,0.12);
  font-size: 11.5px;
  line-height: 1.7;
}
.cv-msg.user {
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
}
.cv-msg span {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.78;
}
.cv-chat-input {
  display: grid;
  grid-template-columns: 1fr 36px;
  gap: 8px;
}
.cv-chat-input input,
.cv-chat-input button {
  min-height: 38px;
  border-radius: 11px;
}
.cv-chat-input input {
  min-width: 0;
  color: var(--ice-white);
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--line);
  padding: 0 10px;
  outline: none;
}
.cv-chat-input button {
  display: grid;
  place-items: center;
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
}

.consult-voice-scene,
.consult-avatar-scene,
.consult-webinar-scene {
  direction: ltr;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 12px;
  min-height: 520px;
}
.consult-voice-scene > *,
.consult-avatar-scene > *,
.consult-webinar-scene > * { direction: rtl; }
.voice-stage,
.avatar-stage,
.webinar-stage {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: radial-gradient(circle at 50% 30%, rgba(0,212,255,0.14), transparent 34%), rgba(7,25,43,0.78);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.voice-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 72px;
}
.voice-orbit {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}
.voice-avatar {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--cyan-dark);
  background: rgba(0,212,255,0.14);
  border: 1px solid rgba(0,212,255,0.30);
  box-shadow: 0 0 0 18px rgba(0,212,255,0.035);
}
.voice-wave {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.voice-wave i {
  width: 5px;
  height: 18px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--cyan), var(--gold));
  animation: voiceWave 1.2s ease-in-out infinite;
}
.voice-wave i:nth-child(2), .voice-wave i:nth-child(6) { height: 30px; animation-delay: .12s; }
.voice-wave i:nth-child(3), .voice-wave i:nth-child(5) { height: 44px; animation-delay: .24s; }
.voice-wave i:nth-child(4) { height: 52px; animation-delay: .36s; }
@keyframes voiceWave { 0%,100% { transform: scaleY(.55); opacity: .58; } 50% { transform: scaleY(1); opacity: 1; } }
.voice-orbit h3 { margin: 0; color: var(--ice-white); font-size: 20px; }
.voice-orbit span { color: var(--text-soft); font-size: 12px; }
.voice-orbit strong { color: var(--cyan-dark); font-size: 18px; }
.voice-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: rgba(5,18,34,0.48);
}
.voice-controls button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--frost);
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(168,213,232,0.14);
}
.voice-controls .danger { color: #fff; background: var(--danger); }
.voice-controls .off { color: var(--gold); background: rgba(201,169,110,0.15); }
.voice-note {
  padding: 10px;
  border-radius: 11px;
  color: var(--frost);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(168,213,232,0.12);
  font-size: 11.5px;
  line-height: 1.7;
}
.voice-memo, .voice-record {
  padding: 12px;
  border-radius: 12px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(168,213,232,0.12);
  font-size: 11.5px;
  line-height: 1.8;
}
.voice-memo-input {
  min-height: 190px;
  resize: vertical;
  padding: 12px;
  border-radius: 12px;
  color: var(--ice-white);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(168,213,232,0.12);
  outline: none;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.8;
}
.voice-memo-input:focus {
  border-color: rgba(0,212,255,0.45);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.08);
}
.voice-record { margin-top: auto; display: flex; align-items: center; gap: 8px; color: var(--frost); }
.voice-record i { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 12px rgba(238,91,91,.8); }

.avatar-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 66px;
}
.avatar-figure {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
}
.avatar-halo {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.14);
  box-shadow: inset 0 0 70px rgba(0,212,255,0.08), 0 0 80px rgba(0,212,255,0.08);
}
.avatar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.20);
  animation: avatarRing 4.4s ease-in-out infinite;
}
.avatar-ring.r1 { width: 210px; height: 210px; }
.avatar-ring.r2 { width: 360px; height: 360px; animation-delay: 1.1s; opacity: .45; }
@keyframes avatarRing {
  0%,100% { transform: scale(.92); opacity: .35; }
  50% { transform: scale(1.06); opacity: .85; }
}
.avatar-face {
  z-index: 1;
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--cyan-dark);
  background: linear-gradient(145deg, rgba(0,212,255,0.18), rgba(201,169,110,0.08));
  border: 1px solid rgba(0,212,255,0.28);
}
.avatar-suit {
  z-index: 1;
  width: 230px;
  height: 130px;
  margin-top: -18px;
  border-radius: 55px 55px 20px 20px;
  background: linear-gradient(120deg, #14243b, #071626 55%, #243a54);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.avatar-caption { z-index: 1; text-align: center; }
.avatar-caption h3 { margin: 0; color: var(--ice-white); font-size: 20px; }
.avatar-caption span { color: var(--cyan-dark); font-size: 12px; }
.avatar-input {
  display: grid;
  grid-template-columns: 1fr 44px 44px;
  gap: 8px;
  padding: 11px;
  border-top: 1px solid var(--line);
  background: rgba(5,18,34,0.48);
}
.avatar-input input, .avatar-input button { min-height: 44px; border-radius: 12px; }
.avatar-input input {
  min-width: 0;
  color: var(--ice-white);
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--line);
  padding: 0 12px;
}
.avatar-input button {
  display: grid;
  place-items: center;
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
}
.avatar-setting {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px;
  border-radius: 11px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(168,213,232,0.12);
  font-size: 11.5px;
}
.avatar-setting b { color: var(--ice-white); }
.avatar-control {
  display: grid;
  gap: 8px;
  padding: 11px;
  border-radius: 12px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(168,213,232,0.12);
  font-size: 11.5px;
}
.avatar-control div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.avatar-control button {
  min-height: 30px;
  border-radius: 9px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(168,213,232,0.12);
  font-size: 10.5px;
}
.avatar-control button.on {
  color: #03131f;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  border-color: transparent;
}
.avatar-transcript { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.avatar-line {
  padding: 10px 11px;
  border-radius: 12px;
  color: var(--frost);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(168,213,232,0.12);
  font-size: 11.5px;
  line-height: 1.75;
}
.avatar-line.user { color: #03131f; background: linear-gradient(135deg, var(--cyan), var(--gold)); }
.avatar-line span { display: block; margin-bottom: 4px; font-size: 10px; font-weight: 800; opacity: .75; }

.webinar-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 66px;
}
.webinar-slide {
  position: relative;
  margin: 18px;
  border-radius: 16px;
  min-height: 390px;
  padding: 44px;
  color: var(--ice-white);
  background:
    radial-gradient(circle at 20% 20%, rgba(0,212,255,0.18), transparent 34%),
    linear-gradient(135deg, rgba(10,31,52,0.98), rgba(4,13,26,0.96));
  border: 1px solid rgba(0,212,255,0.16);
  overflow: hidden;
}
.webinar-slide span { color: #37556c; font-size: 15px; font-weight: 800; }
.webinar-slide h3 { margin: 12px 0 18px; font-size: 30px; color: #0e1b2d; }
.webinar-slide ul { display: grid; gap: 11px; color: #22364d; font-size: 15px; line-height: 1.8; }
.webinar-slide svg {
  position: absolute;
  left: 54px;
  bottom: 42px;
  color: rgba(99, 65, 32, 0.72);
  transform: rotate(-14deg);
}
.webinar-empty-slide {
  height: 100%;
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}
.webinar-empty-slide svg { color: var(--cyan-dark); transform: none; position: static; }
.webinar-empty-slide h3 { margin: 0; color: var(--ice-white); font-size: 26px; }
.webinar-empty-slide span { color: var(--text-soft); font-size: 13px; }
.webinar-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: rgba(5,18,34,0.48);
}
.webinar-controls button {
  min-width: 44px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 12px;
  color: var(--frost);
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(168,213,232,0.14);
  font-size: 12px;
}
.webinar-controls .danger { color: #fff; background: var(--danger); border-color: rgba(238,91,91,.55); }
.webinar-attendees { display: grid; gap: 8px; }
.webinar-attendees span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--frost);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(168,213,232,0.12);
  padding: 9px 10px;
  border-radius: 11px;
  font-size: 11.5px;
}
.webinar-question {
  margin-top: auto;
  padding: 12px;
  border-radius: 12px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(168,213,232,0.12);
  font-size: 11.5px;
  line-height: 1.8;
}
.webinar-question b { color: var(--ice-white); }

[data-tip] {
  position: relative;
}
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  min-width: max-content;
  max-width: 190px;
  padding: 6px 9px;
  border-radius: 9px;
  color: var(--ice-white);
  background: rgba(3, 13, 25, 0.96);
  border: 1px solid rgba(0,212,255,0.22);
  box-shadow: 0 12px 28px rgba(0,0,0,0.32);
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
  z-index: 20;
}
[data-tip]:hover::after,
[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cmode { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); width: fit-content; margin-bottom: 16px; }
.cmode-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 9px; font-size: 12.5px; font-weight: 500; color: var(--text-soft); transition: all 0.15s var(--ease); white-space: nowrap; }
.cmode-btn:hover { color: var(--ice-white); }
.cmode-btn.on { background: var(--bg-card); color: var(--cyan-dark); box-shadow: var(--shadow-sm); }

.consult-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.consult-main { min-width: 0; }

/* --- Case analysis rail --- */
.case-rail { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-tint); padding: 14px; align-self: stretch; }
.cr-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ice-white); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cr-head svg { color: var(--cyan); }
.cr-ai { margin-inline-start: auto; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; color: var(--cyan-dark); background: var(--cyan-tint); border: 1px solid rgba(0,212,255,0.3); padding: 2px 7px; border-radius: 6px; }
.cr-empty { font-size: 11.5px; color: var(--text-mute); line-height: 1.7; padding: 16px 4px; text-align: center; }
.cr-sec { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cr-sec:last-child { border-bottom: none; }
.cr-label { font-size: 10px; font-weight: 600; color: var(--text-mute); letter-spacing: 0.04em; margin-bottom: 8px; }
.cr-topic { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--cyan-dark); background: var(--cyan-tint); border: 1px solid rgba(0,212,255,0.3); padding: 5px 11px; border-radius: 999px; }
.cr-facts, .cr-strat { display: flex; flex-direction: column; gap: 7px; }
.cr-facts li { display: flex; align-items: flex-start; gap: 6px; font-size: 11.5px; color: var(--frost); line-height: 1.55; }
.cr-facts li svg { color: var(--cyan); flex-shrink: 0; margin-top: 3px; }
.cr-risk { display: flex; align-items: center; gap: 10px; }
.cr-bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(168,213,232,0.14); overflow: hidden; }
.cr-bar-fill { height: 100%; border-radius: 6px; transition: width 0.6s var(--ease); }
.cr-bar-fill.ok { background: var(--sage); }
.cr-bar-fill.warn { background: var(--gold); }
.cr-bar-fill.danger { background: var(--danger); }
.cr-strat li { display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: var(--frost); line-height: 1.55; }
.cr-step { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--cyan-dark); background: var(--cyan-tint); }
.cr-docs { display: flex; flex-direction: column; gap: 6px; }
.cr-doc { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-card); font-size: 11.5px; color: var(--text-soft); text-align: start; transition: all 0.15s; }
.cr-doc:hover { border-color: var(--cyan); color: var(--ice-white); }
.cr-doc svg { color: var(--gold); flex-shrink: 0; }

/* --- Text mode --- */
.ctext { display: flex; flex-direction: column; height: 460px; }
.ctext-msgs { flex: 1; }
.msg.cans { max-width: 88%; }
.cans-body { white-space: pre-wrap; }
.cans-levels { display: flex; align-items: center; gap: 5px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.cl-label { font-size: 10px; color: var(--text-mute); }
.cl-pill { font-size: 10.5px; padding: 3px 10px; border-radius: 999px; color: var(--text-soft); border: 1px solid var(--line); transition: all 0.15s; }
.cl-pill:hover { color: var(--ice-white); border-color: var(--line-strong); }
.cl-pill.on { color: var(--cyan-dark); background: var(--cyan-tint); border-color: rgba(0,212,255,0.4); font-weight: 600; }
.cans-cites { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.cite-block { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: rgba(4,16,28,0.35); }
.cite-head { width: 100%; display: flex; align-items: center; gap: 7px; padding: 8px 11px; font-size: 11px; font-weight: 600; color: var(--text-soft); text-align: start; }
.cite-head:hover { color: var(--ice-white); }
.cite-head svg:first-child { color: var(--gold); }
.cite-count { margin-inline-start: auto; font-size: 9.5px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.cite-chev { transition: transform 0.2s var(--ease); }
.cite-chev.open { transform: rotate(-90deg); }
.cite-list { padding: 2px 11px 10px; display: flex; flex-direction: column; gap: 6px; }
.cite-list li { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; color: var(--frost); line-height: 1.5; }
.cite-list li svg { color: var(--cyan); flex-shrink: 0; margin-top: 2px; }

/* --- Live mode --- */
.clive { display: grid; grid-template-columns: 1fr; gap: 18px; }
.cl-step-label { font-size: 11px; font-weight: 600; color: var(--text-soft); letter-spacing: 0.02em; margin: 14px 0 9px; }
.cl-step-label:first-child { margin-top: 0; }
.ltype-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ltype { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-card); text-align: start; transition: all 0.15s; }
.ltype:hover { border-color: var(--line-strong); }
.ltype.on { border-color: var(--cyan); background: var(--cyan-tint); }
.lt-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--cyan); background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.25); }
.lt-name { font-size: 12.5px; font-weight: 600; color: var(--ice-white); margin-top: 4px; }
.lt-note { font-size: 10.5px; color: var(--text-mute); line-height: 1.4; }
.lpick-row { display: flex; flex-direction: column; gap: 7px; }
.lpick { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-card); transition: all 0.15s; }
.lpick:hover { border-color: var(--line-strong); }
.lpick.on { border-color: var(--cyan); background: var(--cyan-tint); }
.lpick .av { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--navy), var(--cyan-dark)); display: grid; place-items: center; font-weight: 600; color: var(--ice-white); font-size: 14px; }
.lpick .lp-meta { flex: 1; text-align: start; min-width: 0; }
.lpick .lp-name { font-size: 12.5px; font-weight: 600; color: var(--ice-white); display: flex; align-items: center; gap: 5px; }
.lpick .lp-sp { font-size: 10.5px; color: var(--gold); margin-top: 1px; }
.lpick .lp-rate { font-size: 11.5px; color: var(--text-soft); display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.slot-days, .slot-times { display: flex; gap: 7px; flex-wrap: wrap; }
.slot-times { margin-top: 8px; }
.slot { padding: 7px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-card); font-size: 12px; color: var(--text-soft); transition: all 0.15s; }
.slot:hover { color: var(--ice-white); border-color: var(--line-strong); }
.slot.on { color: var(--cyan-dark); background: var(--cyan-tint); border-color: rgba(0,212,255,0.4); font-weight: 600; }
.book-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg-soft); }
.book-price { display: flex; flex-direction: column; }
.bp-l { font-size: 10.5px; color: var(--text-mute); }
.bp-n { font-size: 18px; font-weight: 700; color: var(--cyan-dark); font-family: var(--font-display); }
.bp-n small { font-size: 10px; color: var(--text-mute); font-weight: 400; }
.book-ok { margin-top: 10px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; font-size: 12px; color: var(--sage); background: rgba(107,158,138,0.12); border: 1px solid rgba(107,158,138,0.3); }
.clive-sessions { }
.sess-card { padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-card); margin-bottom: 8px; }
.sess-top { display: flex; align-items: center; gap: 10px; }
.sess-ico { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; color: var(--cyan); background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.22); }
.sess-meta { flex: 1; min-width: 0; }
.sess-line { font-size: 12px; color: var(--text-soft); }
.sess-line b { color: var(--ice-white); font-weight: 600; }
.sess-sub { font-size: 10.5px; color: var(--text-mute); margin-top: 2px; }
.sess-actions { display: flex; align-items: center; gap: 12px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); }
.rec-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--danger); }
.rec-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 6px var(--danger); }
.cl-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--cyan-dark); margin-inline-start: auto; }
.cl-link:hover { color: var(--cyan); }
.cl-link svg:first-child { color: var(--cyan); }
.sess-summary { margin-top: 9px; font-size: 11.5px; color: var(--frost); line-height: 1.7; padding: 10px 12px; border-radius: 9px; background: rgba(0,212,255,0.04); border: 1px dashed var(--line-strong); }

/* --- Avatar mode --- */
.cavatar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.av-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 360px; border-radius: 16px; border: 1px solid var(--line); background: radial-gradient(120% 120% at 50% 0%, rgba(0,212,255,0.06), rgba(4,16,28,0)); overflow: hidden; }
.av-rings { position: absolute; top: 96px; width: 200px; height: 200px; }
.av-rings i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(0,212,255,0.18); animation: avPulse 3s ease-out infinite; }
.av-rings i:nth-child(2) { animation-delay: 1s; }
.av-rings i:nth-child(3) { animation-delay: 2s; }
@keyframes avPulse { 0% { transform: scale(0.7); opacity: 0.7; } 100% { transform: scale(1.3); opacity: 0; } }
.av-portrait { position: relative; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; color: var(--frost); background: repeating-linear-gradient(45deg, rgba(168,213,232,0.06) 0 8px, rgba(168,213,232,0.02) 8px 16px); border: 1px solid var(--line-strong); box-shadow: 0 0 0 6px rgba(0,212,255,0.06), var(--shadow-cyan); }
.av-stage.st-speaking .av-portrait { box-shadow: 0 0 0 6px rgba(0,212,255,0.14), 0 8px 30px -6px rgba(0,212,255,0.5); border-color: var(--cyan); }
.av-ph-tag { position: absolute; bottom: -22px; white-space: nowrap; font-family: var(--font-en); font-size: 8.5px; letter-spacing: 0.06em; color: var(--text-mute); }
.av-wave { display: flex; align-items: flex-end; gap: 3px; height: 22px; margin-top: 8px; }
.av-wave i { width: 3px; background: var(--cyan); border-radius: 2px; animation: avWave 0.9s ease-in-out infinite; }
.av-wave i:nth-child(1){ height: 30%; animation-delay: 0s; } .av-wave i:nth-child(2){ height: 70%; animation-delay: 0.15s; }
.av-wave i:nth-child(3){ height: 100%; animation-delay: 0.3s; } .av-wave i:nth-child(4){ height: 60%; animation-delay: 0.45s; } .av-wave i:nth-child(5){ height: 40%; animation-delay: 0.6s; }
@keyframes avWave { 0%,100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }
.av-name { font-size: 14px; font-weight: 600; color: var(--ice-white); margin-top: 14px; }
.av-state { font-size: 11px; color: var(--cyan-dark); }
.av-stage.st-listening .av-state { color: var(--gold); }
.av-side { display: flex; flex-direction: column; min-width: 0; }
.av-transcript { flex: 1; min-height: 250px; max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px; }
.av-line { display: flex; flex-direction: column; gap: 2px; }
.av-line .av-who { font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--text-mute); }
.av-line.user .av-who { color: var(--cyan-dark); }
.av-line .av-text { font-size: 12px; line-height: 1.6; color: var(--frost); }
.av-line.user .av-text { color: var(--ice-white); }
.av-controls { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.av-mic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-card); color: var(--text-soft); display: grid; place-items: center; transition: all 0.15s; }
.av-mic.on { color: var(--gold); border-color: var(--gold); background: var(--gold-tint); }
.av-controls input { flex: 1; height: 44px; border-radius: 12px; padding: 0 14px; background: rgba(4,16,28,0.5); border: 1px solid var(--line); color: var(--ice-white); }
.av-send { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: linear-gradient(135deg, var(--cyan), var(--cyan-dark)); color: white; display: grid; place-items: center; }

@media (max-width: 820px) {
  .consult-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .consult-entry-card { min-height: 160px; }
  .consult-layout { grid-template-columns: 1fr; }
  .case-rail { order: -1; }
  .cavatar { grid-template-columns: 1fr; }
  .ltype-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .consult-entry-grid { grid-template-columns: 1fr; }
  .consult-entry-hero h3 { font-size: 19px; }
}

/* ============================================================
   TEAMMATE REVISION — merged search/ask · portal trust · eco CTA
   ============================================================ */
/* Top search bar now doubles as the assistant ask field */
.top-middle .searchbar input { flex: 1; min-width: 0; width: auto; }
.searchbar-go { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; color: #04101C; background: linear-gradient(135deg, var(--cyan), #00a9cc); box-shadow: var(--shadow-cyan); transition: filter 0.15s var(--ease); }
.searchbar-go:hover { filter: brightness(1.08); }

/* Trust band relocated into the portal (replaces the old legend) */
.portal-trust { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); gap: 14px; margin-top: 0; max-width: 92%; flex-wrap: wrap; }

/* Ecosystem CTA fills the slot the module grid used to occupy */
.eco-card-cta { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(0,212,255,0.07), rgba(201,169,110,0.04)); text-align: start; transition: all 0.2s var(--ease); flex-shrink: 0; }
.eco-card-cta:hover { border-color: var(--cyan); box-shadow: var(--shadow-cyan); transform: translateY(-1px); }
.eco-card-cta > svg:first-child { color: var(--cyan); flex-shrink: 0; }
.eco-card-cta .ecc-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.eco-card-cta .ecc-title { font-size: 12.5px; font-weight: 600; color: var(--ice-white); }
.eco-card-cta .ecc-meta { font-size: 10px; color: var(--text-mute); }
.eco-card-cta > svg:last-child { color: var(--text-mute); flex-shrink: 0; }

/* ============================================================
   2.5D SOLAR SYSTEM  (sun = Shahdad core · 16 orbiting planets)
   ============================================================ */
.portal.solar { position: absolute; inset: 0; display: block; }
.solar-stage { position: absolute; inset: 0; z-index: 2; }

/* tilted orbit ellipses */
.orbit-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.orbit-ell { fill: none; stroke: rgba(140,190,225,0.10); stroke-width: 1.2; vector-effect: non-scaling-stroke; transition: stroke 0.3s var(--ease); }
.orbit-ell.ov0 { stroke: rgba(168,213,232,0.13); filter: drop-shadow(0 0 3px rgba(168,213,232,0.4)); }
.orbit-ell.ov1 { stroke: rgba(201,169,110,0.12); filter: drop-shadow(0 0 3px rgba(201,169,110,0.4)); }
.orbit-ell.ov2 { stroke: rgba(168,213,232,0.11); filter: drop-shadow(0 0 3px rgba(168,213,232,0.38)); }
.orbit-ell.ov3 { stroke: rgba(201,169,110,0.10); filter: drop-shadow(0 0 3px rgba(201,169,110,0.36)); }
.orbit-ell.ov4 { stroke: rgba(150,210,235,0.11); filter: drop-shadow(0 0 3px rgba(150,210,235,0.38)); }
.orbit-ell.on { stroke: rgba(0,212,255,0.5) !important; stroke-width: 2; filter: drop-shadow(0 0 6px rgba(0,212,255,0.7)); }

/* ---- the sun: Shahdad AI core (logo disc) ---- */
.sun-core {
  position: absolute; transform: translate(-50%, -50%);
  border-radius: 50%; z-index: 1000; cursor: pointer;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 35% 28%, rgba(238,246,250,.92) 0%, rgba(168,213,232,.36) 14%, transparent 32%),
    radial-gradient(circle at 52% 55%, rgba(0,212,255,.42), rgba(0,122,170,.26) 44%, rgba(4,16,28,.86) 76%);
  border: 1px solid rgba(168,213,232,.38);
  padding: 0;
  overflow: hidden;
  box-shadow:
    inset 0 0 22px rgba(0,212,255,.13),
    0 0 28px rgba(0,212,255,.18),
    0 0 46px rgba(201,169,110,.08);
}
/* keep the neon halo pulses behind the logo */
.sun-core .sun-corona {
  position: absolute; inset: -90%; border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0,212,255,0.32) 0%, rgba(0,212,255,0.18) 22%, rgba(0,212,255,0.08) 40%, rgba(0,212,255,0.03) 56%, transparent 72%);
  animation: sunPulse 5.5s ease-in-out infinite; filter: blur(14px);
}
.sun-core .sun-flare {
  position: absolute; inset: -40%; border-radius: 50%;
  background: radial-gradient(circle, rgba(174,243,255,0.22) 0%, rgba(174,243,255,0.06) 38%, transparent 60%);
  animation: sunPulse 7s ease-in-out infinite reverse; filter: blur(10px); opacity: 0.9;
}
@keyframes sunPulse { 0%,100% { transform: scale(0.96); opacity: 0.8; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes sunSpin { to { transform: rotate(360deg); } }
.sun-core .sun-logo { display: none; }
.sun-core .sun-body {
  position: absolute;
  inset: 17%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255,255,255,.9), rgba(168,213,232,.22) 22%, transparent 46%),
    radial-gradient(circle, rgba(0,212,255,.38), rgba(5,31,52,.82) 72%);
  box-shadow:
    inset 0 0 18px rgba(238,246,250,.18),
    0 0 24px rgba(0,212,255,.36);
}
.sun-core .sun-body::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px solid rgba(201,169,110,.34);
}
.sun-core .sun-ai {
  position: relative;
  z-index: 2;
  font-family: var(--font-en);
  font-size: clamp(13px, 1.5vw, 22px);
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ice-white);
  text-shadow: 0 0 16px rgba(0,212,255,.8);
}
.sun-core .sun-label {
  position: absolute;
  z-index: 2;
  bottom: 18%;
  font-family: var(--font-en);
  font-size: 8px;
  letter-spacing: .16em;
  color: rgba(238,246,250,.72);
}
.sun-core:focus-visible { outline: 2px solid var(--cyan); outline-offset: 6px; }

/* ---- planets: glassy neon bubbles ---- */
.planet-node { position: absolute; left: 0; top: 0; width: 0; height: 0; cursor: pointer; will-change: transform; }
.planet-body {
  position: absolute; left: 0; top: 0; border-radius: 50%; overflow: visible;
  transform: translate(-50%, -50%) scale(var(--s, 1)); transform-origin: center;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.35) 14%, transparent 38%),
    radial-gradient(circle at 68% 74%, var(--accent, #00d4ff) 0%, transparent 56%),
    radial-gradient(circle at 50% 50%, var(--tint, rgba(0,212,255,0.22)) 0%, rgba(8,18,32,0.55) 78%, rgba(4,10,20,0.8) 100%);
  border: 1px solid var(--edge, rgba(120,235,255,0.55));
  box-shadow:
    inset 6px 8px 14px rgba(255,255,255,0.32),
    inset -8px -10px 18px rgba(0,0,0,0.55),
    inset 0 0 12px var(--tint, rgba(0,212,255,0.2)),
    0 0 14px var(--glow, rgba(0,212,255,0.5)), 0 0 4px var(--accent, #00d4ff);
}
/* bright specular hotspot */
.planet-body::before {
  content: ""; position: absolute; top: 12%; left: 18%; width: 34%; height: 26%;
  border-radius: 50%; background: radial-gradient(circle at 42% 42%, rgba(255,255,255,1), rgba(255,255,255,0.2) 60%, transparent 74%);
  filter: blur(0.4px); pointer-events: none; z-index: 3;
}
/* lower rim-light for glassy depth */
.planet-body::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 70% 82%, var(--glow, rgba(0,212,255,0.4)) 0%, transparent 38%);
  opacity: 0.7;
}
.ic { shape-rendering: geometricPrecision; }
.planet-ico { position: relative; z-index: 4; color: #ffffff; opacity: 1; stroke-width: 1.9; shape-rendering: geometricPrecision; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.6)); }
.planet-label {
  position: absolute; left: 0; transform: translateX(-50%);
  font-family: var(--font-fa); font-size: 10.5px; font-weight: 500; line-height: 1.1;
  color: var(--frost); white-space: nowrap; text-align: center; pointer-events: none;
  text-shadow: 0 1px 4px rgba(2,10,20,0.95), 0 0 8px rgba(2,10,20,0.8);
  opacity: var(--lo, 1);
  transition: color 0.2s var(--ease);
}
html[dir="ltr"] .planet-label { font-family: var(--font-en); }
.planet-node.hovered .planet-label { color: #fff; font-weight: 700; z-index: 99999; }
.planet-node.hovered .planet-ico { opacity: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6)) drop-shadow(0 0 5px var(--glow, rgba(0,212,255,0.5))); }
.planet-node.hovered .planet-body { box-shadow: inset 0 0 12px rgba(255,255,255,0.4), inset 0 -5px 10px rgba(0,0,0,0.3), 0 0 22px var(--glow, rgba(0,212,255,0.7)), 0 0 8px var(--accent, #00d4ff); }

/* Saturn-style glassy ring */
.planet-ring {
  position: absolute; left: 50%; top: 50%; width: 220%; height: 66%;
  transform: translate(-50%, -50%) rotateX(74deg) rotate(-18deg);
  border-radius: 50%; border: 2.5px solid var(--edge, rgba(220,230,255,0.5));
  box-shadow: 0 0 8px var(--glow, rgba(180,210,255,0.4)); pointer-events: none;
}
.planet-ring::after {
  content: ""; position: absolute; inset: 14%; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
}

/* planet materials — each just sets the neon accent (tint / edge / glow) */
.planet-body.m-cyan   { --accent:#00d4ff; --tint:rgba(0,212,255,0.18);  --edge:rgba(140,240,255,0.7);  --glow:rgba(0,212,255,0.55); }
.planet-body.m-ice    { --accent:#a8d5e8; --tint:rgba(168,213,232,0.16); --edge:rgba(210,240,250,0.7);  --glow:rgba(168,213,232,0.5); }
.planet-body.m-violet { --accent:#9a6fe0; --tint:rgba(154,111,224,0.2);  --edge:rgba(200,170,255,0.7);  --glow:rgba(154,111,224,0.55); }
.planet-body.m-rust   { --accent:#e08a4a; --tint:rgba(224,138,74,0.2);   --edge:rgba(255,200,150,0.7);  --glow:rgba(224,138,74,0.5); }
.planet-body.m-gold   { --accent:#d9b25a; --tint:rgba(217,178,90,0.2);   --edge:rgba(245,220,150,0.75); --glow:rgba(217,178,90,0.55); }
.planet-body.m-slate  { --accent:#8aa0b8; --tint:rgba(138,160,184,0.18); --edge:rgba(200,215,230,0.65); --glow:rgba(138,160,184,0.45); }
.planet-body.m-sage   { --accent:#6b9e8a; --tint:rgba(107,158,138,0.2);  --edge:rgba(170,220,200,0.7);  --glow:rgba(107,158,138,0.5); }
.planet-body.m-blue   { --accent:#5b86c4; --tint:rgba(91,134,196,0.2);   --edge:rgba(170,200,255,0.7);  --glow:rgba(91,134,196,0.5); }

@media (max-width: 900px) {
  .sun-core .sun-label { font-size: 13px; bottom: -22px; font-weight: 700; }
}
@media (prefers-reduced-motion: reduce) {
  .sun-corona, .sun-flare { animation: none !important; }
}

/* ============================================================
   BUTTON HOVER — a neon line runs around the border once, THEN it glows
   ============================================================ */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.qa, .icon-btn, .user-chip, .lang-toggle button,
.eco-card-cta, .searchbar-go, .btn {
  position: relative;
  --neon: #00d4ff; --neon-glow: rgba(0,212,255,0.5);
  transition: transform 0.2s var(--ease),
              box-shadow 0.3s ease 0.5s,
              border-color 0.3s ease 0.5s,
              filter 0.2s var(--ease),
              background 0.2s var(--ease),
              color 0.2s var(--ease);
}
.user-chip, .lang-toggle button { --neon: #d9b25a; --neon-glow: rgba(201,169,110,0.5); }

/* the travelling ring (masked conic border), hidden until hover */
.qa::after, .icon-btn::after, .user-chip::after, .lang-toggle button::after,
.eco-card-cta::after, .searchbar-go::after, .btn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1.5px; z-index: 4; opacity: 0; pointer-events: none;
  background: conic-gradient(from var(--ang),
    transparent 0deg 338deg, color-mix(in srgb, var(--neon) 40%, transparent) 346deg,
    var(--neon) 353deg, #ffffff 358deg, var(--neon) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  filter: drop-shadow(0 0 3px var(--neon-glow));
}
/* on hover: run the ring once (it fades out as it completes) */
.qa:hover::after, .icon-btn:hover::after, .user-chip:hover::after,
.lang-toggle button:hover::after, .eco-card-cta:hover::after,
.searchbar-go:hover::after, .btn:hover::after {
  animation: ringRun 1.15s cubic-bezier(0.33, 0, 0.2, 1);
}
@keyframes ringRun {
  0%   { --ang: 0deg;   opacity: 1; }
  92%  { opacity: 1; }
  100% { --ang: 360deg; opacity: 0; }
}
/* the glow arrives after the ring (transition-delay above) */
.qa:hover, .icon-btn:hover, .user-chip:hover, .lang-toggle button:hover,
.eco-card-cta:hover, .searchbar-go:hover, .btn:hover {
  box-shadow: 0 0 0 1px var(--neon), 0 0 18px var(--neon-glow) !important;
  border-color: var(--neon) !important;
}

@media (prefers-reduced-motion: reduce) {
  .qa:hover::after, .icon-btn:hover::after, .user-chip:hover::after,
  .lang-toggle button:hover::after, .eco-card-cta:hover::after,
  .searchbar-go:hover::after, .btn:hover::after { animation: none !important; opacity: 0; }
}

/* ============================================================
   PORTAL FOOTER — About / Contact  + their module views
   ============================================================ */
.portal-footer {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 7; display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: 14px;
  background: rgba(8,24,40,0.78); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px -10px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
}
.pfoot-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 10px; cursor: pointer;
  font-family: var(--font-fa); font-size: 12.5px; font-weight: 500;
  color: var(--frost); transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
html[dir="ltr"] .pfoot-btn { font-family: var(--font-en); }
.pfoot-btn svg { color: var(--cyan-dark); transition: transform 0.2s var(--ease); }
.pfoot-btn:hover { color: var(--ice-white); background: rgba(0,212,255,0.08); }
.pfoot-btn:hover svg { transform: translateY(-1px) scale(1.08); }
.pfoot-sep { width: 1px; height: 18px; background: var(--line-strong); }
.portal-hint { display: none; }

/* mobile-only bottom footer (About / Contact) */
.mobile-footer { display: none; }

/* About view */
.about-values { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.about-value { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 13px; color: var(--ice-white); }
.about-value .av-ic { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: rgba(0,212,255,0.12); color: var(--cyan-dark); }

/* Contact view */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-card { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border-radius: 13px; background: var(--bg-soft); border: 1px solid var(--line); transition: border-color 0.2s var(--ease); }
.contact-card:hover { border-color: var(--cyan); }
.contact-card .cc-ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(0,212,255,0.14), rgba(201,169,110,0.08)); color: var(--cyan-dark); }
.contact-card .cc-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.contact-card .cc-label { font-size: 10.5px; color: var(--text-mute); font-weight: 500; }
.contact-card .cc-val { font-size: 13px; color: var(--ice-white); font-weight: 500; line-height: 1.5; }
.contact-card .cc-val.ltr { direction: ltr; text-align: start; font-family: var(--font-en); letter-spacing: 0.02em; }
.about-contact { display: flex; flex-direction: column; gap: 16px; }
.about-contact-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,212,255,0.07), rgba(201,169,110,0.045));
}
.about-contact-head h3 {
  margin: 0 0 9px;
  font-size: 17px;
  color: var(--ice-white);
  font-weight: 700;
}
.about-contact-head p {
  margin: 0;
  font-size: 13px;
  line-height: 2;
  color: var(--frost);
}
.enamad-seal {
  width: 104px;
  min-height: 104px;
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(234,253,255,0.95), rgba(210,225,238,0.9));
  border: 1px solid rgba(255,255,255,0.24);
  text-decoration: none;
}
.enamad-seal img {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 88px;
  max-height: 88px;
  object-fit: contain;
}
.enamad-fallback {
  position: absolute;
  inset: 9px;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 9px;
  border: 1px solid rgba(15,38,58,0.12);
  color: #153047;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.7;
}
.contact-section-title {
  margin: 0;
  color: var(--ice-white);
  font-size: 14px;
  font-weight: 700;
}
.about-contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.about-contact-grid .contact-card:first-child { grid-column: span 2; }
.social-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--frost);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), color 0.2s var(--ease);
}
.social-link span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(0,212,255,0.11);
  color: var(--cyan-dark);
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 800;
}
.social-link b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}
.social-link:hover { color: var(--ice-white); border-color: rgba(0,212,255,0.36); transform: translateY(-1px); }
@media (max-width: 560px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .about-contact-head { grid-template-columns: 1fr; }
  .enamad-seal { width: 96px; min-height: 96px; }
  .about-contact-grid, .social-row { grid-template-columns: 1fr; }
  .about-contact-grid .contact-card:first-child { grid-column: auto; }
}
/* ============================================================
   LAWYER DIRECTORY 31.43 — spacious master/detail workspace
   ============================================================ */
.modal.lawyer-modal { width: min(1240px, 96vw); max-height: 92vh; }
.modal.lawyer-modal .modal-body { padding: 0; overflow: hidden; }
.lv-directory {
  height: min(790px, calc(92vh - 74px)); min-height: 640px; overflow-y: auto;
  color: var(--ice-white); background:
    radial-gradient(circle at 82% -10%, rgba(0,212,255,.10), transparent 34%),
    linear-gradient(180deg, rgba(7,25,43,.99), rgba(4,17,30,.99));
}
.lv-directory::-webkit-scrollbar,.lv-list::-webkit-scrollbar,.lv-profile-content::-webkit-scrollbar { width: 6px; }
.lv-directory::-webkit-scrollbar-thumb,.lv-list::-webkit-scrollbar-thumb,.lv-profile-content::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }
.lv-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 28px 30px 20px; }
.lv-intro>div:first-child>span { display: inline-flex; align-items: center; gap: 7px; color: var(--cyan-dark); font-size: 12px; font-weight: 700; }
.lv-intro h2 { margin-top: 8px; font-size: clamp(22px,2.2vw,30px); line-height: 1.35; font-weight: 700; letter-spacing: -.02em; }
.lv-intro p { max-width: 650px; margin-top: 7px; color: var(--text-soft); font-size: 12px; line-height: 1.7; }
.lv-count { min-width: 174px; padding: 14px 18px; border: 1px solid rgba(201,169,110,.28); border-radius: 15px; background: rgba(201,169,110,.07); text-align: center; }
.lv-count strong { display: block; color: var(--gold-soft); font-family: var(--font-display); font-size: 25px; line-height: 1.1; }
.lv-count span { display: block; margin-top: 6px; color: var(--text-soft); font-size: 10px; }
.lv-filter-card { margin: 0 30px; padding: 18px 20px; border: 1px solid rgba(168,213,232,.16); border-radius: 17px; background: rgba(11,35,58,.76); box-shadow: 0 18px 45px -38px rgba(0,212,255,.65); }
.lv-filter-grid { display: grid; grid-template-columns: minmax(240px,1.65fr) repeat(4,minmax(128px,1fr)); gap: 14px; align-items: end; }
.lv-filter-grid label { min-width: 0; }
.lv-filter-grid label>span,.lv-center-row>span { display: block; margin-bottom: 7px; color: var(--frost); font-size: 11px; font-weight: 500; }
.lv-filter-grid select,.lv-search>div { width: 100%; height: 44px; border: 1px solid var(--line-strong); border-radius: 11px; background: rgba(4,16,28,.72); color: var(--ice-white); transition: border-color .2s,box-shadow .2s; }
.lv-filter-grid select { padding-inline: 12px; font-size: 11px; }
.lv-search>div { display: flex; align-items: center; gap: 9px; padding: 0 13px; color: var(--cyan-dark); }
.lv-search>div:focus-within,.lv-filter-grid select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,212,255,.09); outline: none; }
.lv-search input { width: 100%; height: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ice-white); font-size: 12px; }
.lv-search input::placeholder { color: var(--text-mute); }
.lv-center-row { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 12px; margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.lv-center-row>span { margin: 0; }
.lv-center-row>div { display: flex; flex-wrap: wrap; gap: 9px; }
.lv-center-row button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-soft); background: rgba(4,16,28,.35); font-size: 10.5px; cursor: pointer; transition: color .2s,border-color .2s,background .2s; }
.lv-center-row button:hover { color: var(--ice-white); border-color: rgba(0,212,255,.36); }
.lv-center-row button.on { color: #b9f3ff; border-color: rgba(0,212,255,.56); background: rgba(0,212,255,.11); box-shadow: inset 0 0 14px rgba(0,212,255,.04); }
.lv-meta { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 30px 12px; color: var(--text-soft); font-size: 11px; }
.lv-meta small { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-size: 10px; }
.lv-layout { display: grid; grid-template-columns: minmax(360px,410px) minmax(0,1fr); gap: 24px; min-height: 510px; padding: 0 30px 30px; }
.lv-list { display: flex; flex-direction: column; gap: 12px; max-height: 555px; overflow-y: auto; padding: 1px 5px 1px 1px; }
html[dir="rtl"] .lv-list { padding: 1px 1px 1px 5px; }
.lv-card { width: 100%; display: grid; grid-template-columns: 78px 1fr; gap: 15px; padding: 15px; border: 1px solid rgba(168,213,232,.14); border-radius: 15px; background: rgba(10,32,53,.76); color: inherit; text-align: start; cursor: pointer; transition: border-color .2s,background .2s,box-shadow .2s; }
.lv-card:hover { border-color: rgba(0,212,255,.38); background: rgba(11,39,64,.9); }
.lv-card:focus-visible { outline: 3px solid rgba(0,212,255,.35); outline-offset: 2px; }
.lv-card.active { border-color: rgba(0,212,255,.60); background: linear-gradient(110deg,rgba(0,212,255,.09),rgba(11,38,63,.94)); box-shadow: inset -3px 0 0 var(--cyan),0 18px 34px -31px rgba(0,212,255,.9); }
html[dir="ltr"] .lv-card.active { box-shadow: inset 3px 0 0 var(--cyan),0 18px 34px -31px rgba(0,212,255,.9); }
.lv-card>img { width: 78px; height: 94px; border: 1px solid rgba(168,213,232,.24); border-radius: 12px; background: var(--bg-soft); object-fit: cover; object-position: center top; filter: saturate(.9) contrast(1.03); }
.lv-avatar { position: relative; width: 78px; height: 94px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(168,213,232,.25); border-radius: 12px; background: linear-gradient(145deg,rgba(27,84,117,.92),rgba(5,24,40,.98)); color: #dff8ff; isolation: isolate; }
.lv-avatar::before { content:""; position:absolute; inset:8px; border:1px solid rgba(255,255,255,.10); border-radius:50% 50% 42% 42%; background:radial-gradient(circle at 50% 24%,rgba(255,255,255,.16),transparent 45%); z-index:-1; }
.lv-avatar span { margin-top:-7px; font-family:var(--font-display); font-size:22px; font-weight:800; text-shadow:0 5px 18px rgba(0,0,0,.45); }
.lv-avatar svg { position:absolute; inset-inline-end:7px; bottom:7px; padding:4px; border:1px solid rgba(255,255,255,.18); border-radius:8px; background:rgba(3,16,28,.62); color:#b9f3ff; }
.lv-avatar.tone-blue { background:linear-gradient(145deg,#214f7d,#071a2d); }
.lv-avatar.tone-violet { background:linear-gradient(145deg,#4d3c79,#10182e); }
.lv-avatar.tone-sage { background:linear-gradient(145deg,#315f5b,#071d26); }
.lv-avatar.tone-gold { background:linear-gradient(145deg,#695536,#171c24); }
.lv-avatar.tone-rust { background:linear-gradient(145deg,#70443d,#1d1922); }
.lv-card-body { min-width: 0; }
.lv-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.lv-card-title h3 { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; line-height: 1.4; }
.lv-card-title h3 svg { color: var(--cyan-dark); }
.lv-card-title p { margin-top: 3px; color: var(--text-soft); font-size: 9.5px; line-height: 1.5; }
.lv-card-title p b { color: var(--ice-white); }
.lv-shahdad { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border: 1px solid rgba(0,212,255,.34); border-radius: 999px; background: rgba(0,212,255,.09); color: #93eaff; font-size: 8.5px; font-weight: 700; white-space: nowrap; }
.lv-shahdad.is-detail { width: max-content; margin-top: 8px; padding: 5px 9px; font-size: 9.5px; }
.lv-card-facts { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-top: 10px; color: var(--text-soft); font-size: 9.5px; }
.lv-card-facts span { display: inline-flex; align-items: center; gap: 5px; }
.lv-card-facts svg { color: var(--frost); }
.lv-card-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 10px; }
.lv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lv-tags span { padding: 4px 8px; border: 1px solid rgba(168,213,232,.14); border-radius: 7px; background: rgba(168,213,232,.06); color: #c0ddec; font-size: 9.5px; }
.lv-card-score { display: flex; align-items: center; gap: 6px; }
.lv-card-score b { color: var(--gold-soft); font-size: 11px; }
.lv-stars { display: inline-flex; align-items: center; gap: 1px; direction: ltr; color: rgba(201,169,110,.22); }
.lv-stars .on { color: var(--gold); fill: rgba(201,169,110,.26); }
.lv-profile { min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(168,213,232,.17); border-radius: 18px; background: linear-gradient(180deg,rgba(12,40,66,.96),rgba(7,25,43,.99)); box-shadow: 0 26px 58px -46px rgba(0,0,0,.9); }
.lv-profile-head { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 90% 0,rgba(201,169,110,.13),transparent 36%),rgba(9,31,52,.65); }
.lv-profile-head>img { width: 102px; height: 118px; flex: 0 0 auto; border: 2px solid rgba(168,213,232,.30); border-radius: 15px; object-fit: cover; object-position: center top; box-shadow: 0 14px 28px -20px rgba(0,0,0,.9); }
.lv-profile-head>.lv-avatar { width:102px; height:118px; flex:0 0 auto; border-width:2px; border-radius:15px; box-shadow:0 14px 28px -20px rgba(0,0,0,.9); }
.lv-profile-head>.lv-avatar span { font-size:29px; }
.expert-directory .lv-intro>div:first-child>span,.expert-directory .lv-verified { color:#8fd8ff; }
.expert-directory .lv-count { border-color:rgba(105,177,230,.32); background:rgba(61,135,190,.08); }
.expert-directory .lv-count strong { color:#a9ddff; }
.lv-profile-head>div { min-width: 0; }
.lv-verified { display: flex; align-items: center; gap: 6px; color: var(--cyan-dark); font-size: 10px; font-weight: 650; }
.lv-profile-head h3 { margin-top: 7px; font-size: 20px; font-weight: 700; line-height: 1.3; }
.lv-profile-head p { margin-top: 5px; color: var(--text-soft); font-size: 10.5px; line-height: 1.6; }
.lv-profile-head p b { color: var(--ice-white); }
.lv-profile-content { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 24px; }
.lv-bio h4,.lv-specialties h4 { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: #e5f1f7; font-size: 12px; font-weight: 650; }
.lv-bio h4 svg,.lv-specialties h4 svg { color: var(--cyan-dark); }
.lv-bio p { max-width: 72ch; color: var(--text-soft); font-size: 11px; line-height: 1.9; }
.lv-info-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-top: 18px; }
.lv-info-grid>div { min-height: 76px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(4,16,28,.34); }
.lv-info-grid span { display: flex; align-items: center; gap: 6px; color: var(--frost); font-size: 10px; }
.lv-info-grid span svg { color: var(--gold); }
.lv-info-grid b { display: block; margin-top: 8px; color: var(--ice-white); font-size: 10.5px; font-weight: 500; line-height: 1.65; }
.lv-specialties { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.lv-specialties .lv-tags span { padding: 6px 10px; font-size: 10px; }
.lv-ratings { display: grid; grid-template-columns: 130px minmax(220px,1fr) 150px; gap: 16px; margin-top: 20px; padding: 17px; border: 1px solid rgba(201,169,110,.23); border-radius: 15px; background: linear-gradient(120deg,rgba(201,169,110,.08),rgba(4,16,28,.35)); }
.lv-pro-score,.lv-client-score { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.lv-pro-score { padding-inline-end: 15px; border-inline-end: 1px solid rgba(201,169,110,.17); }
.lv-pro-score>span,.lv-client-score>span { color: var(--text-soft); font-size: 9.5px; line-height: 1.5; }
.lv-pro-score strong,.lv-client-score strong { margin: 8px 0 6px; color: var(--gold-soft); font-family: var(--font-display); font-size: 27px; line-height: 1; }
.lv-pro-score strong small,.lv-client-score strong small { color: var(--frost); font-size: 11px; }
.lv-breakdown { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.lv-score-row { display: grid; grid-template-columns: 76px 1fr 27px; align-items: center; gap: 9px; }
.lv-score-row>span { display: flex; align-items: center; gap: 5px; color: var(--text-soft); font-size: 9.5px; }
.lv-score-row>span svg { color: var(--frost); }
.lv-score-row>div { height: 6px; overflow: hidden; border-radius: 99px; background: rgba(168,213,232,.10); }
.lv-score-row i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--cyan-dark),var(--gold)); }
.lv-score-row b { color: var(--gold-soft); font-size: 10px; }
.lv-client-score { padding-inline-start: 15px; border-inline-start: 1px solid rgba(201,169,110,.17); }
.lv-client-score>span { display: flex; align-items: center; gap: 6px; }
.lv-client-score>span svg { color: var(--cyan-dark); }
.lv-client-score em { margin-top: 6px; color: var(--text-mute); font-size: 8.5px; font-style: normal; }
.lv-demo { display: flex; align-items: flex-start; gap: 6px; margin-top: 13px; color: #b9a984; font-size: 9px; line-height: 1.6; }
.lv-demo svg { flex: 0 0 auto; margin-top: 1px; }
.lv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; padding: 14px 24px; border-top: 1px solid var(--line); background: rgba(4,16,28,.52); }
.lv-actions .btn { min-height: 42px; justify-content: center; }
.lv-empty { min-height: 310px; display: grid; place-items: center; align-content: center; gap: 12px; margin: 0 30px 30px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--text-soft); text-align: center; }
.lv-empty>svg { color: var(--cyan-dark); }
.lv-empty h3 { font-size: 13px; font-weight: 500; }
.lv-loading { min-height: 520px; display: grid; place-items: center; align-content: center; gap: 12px; padding: 32px; color: var(--text-soft); text-align: center; background: linear-gradient(180deg,rgba(7,25,43,.99),rgba(4,17,30,.99)); }
.lv-loading>span { width: 34px; height: 34px; border: 3px solid rgba(168,213,232,.16); border-top-color: var(--cyan); border-radius: 50%; animation: lv-spin .8s linear infinite; }
.lv-loading h3 { color: var(--ice-white); font-size: 15px; }
.lv-loading p { font-size: 11px; }
@keyframes lv-spin { to { transform: rotate(360deg); } }
.lv-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 12px; }
.lv-pagination button { min-height: 42px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(10,32,53,.76); color: var(--ice-white); cursor: pointer; transition: border-color .2s,background .2s; }
.lv-pagination button:hover:not(:disabled) { border-color: rgba(0,212,255,.52); background: rgba(0,212,255,.10); }
.lv-pagination button:disabled { opacity: .4; cursor: not-allowed; }
.lv-pagination span { color: var(--text-soft); font-size: 10px; white-space: nowrap; }
.real-expert-directory .lv-specialties p { color: var(--text-soft); font-size: 11px; }
.real-expert-directory .lv-actions { grid-template-columns: 1fr; }
.real-expert-directory .lv-actions .is-disabled { opacity: .55; pointer-events: none; }
.real-expert-directory .lv-info-grid .is-wide { grid-column: 1 / -1; }
@media (prefers-reduced-motion: reduce) { .lv-loading>span { animation: none; } }
@media (max-width: 1050px) {
  .lv-filter-grid { grid-template-columns: 1fr 1fr; }
  .lv-layout { grid-template-columns: 1fr; }
  .lv-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-height: none; overflow: visible; }
  .lv-profile { min-height: 590px; }
}
@media (max-width: 720px) {
  .modal.lawyer-modal { width: 96vw; max-height: 92vh; }
  .modal.lawyer-modal .modal-head .rh button:not(.close) { display: none; }
  .lv-directory { height: calc(92vh - 68px); min-height: 0; }
  .lv-intro { align-items: flex-start; padding: 20px 16px 16px; }
  .lv-intro h2 { font-size: 21px; }
  .lv-count { display: none; }
  .lv-filter-card { margin: 0 16px; padding: 15px; }
  .lv-filter-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .lv-search { grid-column: 1/-1; }
  .lv-center-row { grid-template-columns: 1fr; gap: 8px; }
  .lv-center-row>div { display: grid; grid-template-columns: 1fr 1fr; }
  .lv-center-row button { min-height: 44px; padding: 0 9px; }
  .lv-meta { align-items: flex-start; flex-direction: column; padding: 13px 16px; }
  .lv-layout { gap: 18px; padding: 0 16px 22px; }
  .lv-list { grid-template-columns: 1fr; }
  .lv-profile { min-height: 610px; }
  .lv-ratings { grid-template-columns: 1fr; }
  .lv-pro-score,.lv-client-score { padding: 0 0 14px; border: 0; border-bottom: 1px solid rgba(201,169,110,.17); }
  .lv-client-score { padding: 14px 0 0; border-bottom: 0; border-top: 1px solid rgba(201,169,110,.17); }
}
@media (max-width: 480px) {
  .lv-filter-grid { grid-template-columns: 1fr; }
  .lv-search { grid-column: auto; }
  .lv-card { grid-template-columns: 68px 1fr; gap: 11px; padding: 12px; }
  .lv-card>img,.lv-card>.lv-avatar { width: 68px; height: 84px; }
  .lv-card-title { flex-direction: column; }
  .lv-card-bottom { align-items: flex-start; flex-direction: column; }
  .lv-profile-head { align-items: flex-start; padding: 18px; }
  .lv-profile-head>img,.lv-profile-head>.lv-avatar { width: 84px; height: 102px; }
  .lv-profile-head h3 { font-size: 17px; }
  .lv-profile-content { padding: 18px; }
  .lv-info-grid { grid-template-columns: 1fr; }
  .lv-actions { grid-template-columns: 1fr; padding: 13px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .lv-card,.lv-center-row button,.lv-filter-grid select,.lv-search>div { transition: none; }
}

/* ============================================================
   V31.84 — SOLAR HIJRI BIRTH-DATE PICKER
   ============================================================ */
.modal.profile-modal { width:min(1240px,96vw); height:min(820px,92vh); max-height:92vh; }
.modal.profile-modal .modal-body { padding:0; overflow:auto; background:#061525; }
.pf-shell {
  --pf-bg:#061525; --pf-surface:#0a2137; --pf-surface-2:#0d2944;
  --pf-line:rgba(168,213,232,.14); --pf-strong:rgba(168,213,232,.25);
  position:relative; min-height:690px; color:var(--ice-white); background:
  radial-gradient(circle at 92% -8%,rgba(0,212,255,.12),transparent 29%),
  radial-gradient(circle at 5% 106%,rgba(201,169,110,.12),transparent 30%),var(--pf-bg);
}
.pf-shell button,.pf-shell input,.pf-shell select { font:inherit; }
.pf-shell button { cursor:pointer; }
.pf-shell button:focus-visible,.pf-shell input:focus-visible,.pf-shell select:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.pf-toast { position:absolute; z-index:5; top:18px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:9px; padding:11px 16px; border:1px solid rgba(65,211,143,.34); border-radius:12px; color:#dfffee; background:rgba(9,54,49,.96); box-shadow:0 18px 44px rgba(0,0,0,.35); animation:pfToast .25s ease-out; }
@keyframes pfToast { from { opacity:0; transform:translate(-50%,-8px); } }
.pf-hero { min-height:154px; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:20px; padding:25px 30px; border-bottom:1px solid var(--pf-line); background:linear-gradient(90deg,rgba(11,39,65,.92),rgba(7,25,43,.68)); }
.pf-avatar { position:relative; width:84px; height:84px; display:grid; place-items:center; flex:0 0 auto; border:1px solid rgba(0,212,255,.38); border-radius:25px; color:#e7fbff; background:linear-gradient(145deg,#123d61,#08233c); box-shadow:inset 0 1px rgba(255,255,255,.1),0 16px 34px -24px rgba(0,212,255,.7); }
.pf-avatar>span { font-size:27px; font-weight:800; }
.pf-avatar>i { position:absolute; left:-5px; bottom:-5px; width:29px; height:29px; display:grid; place-items:center; border:4px solid var(--pf-bg); border-radius:50%; color:#041921; background:#5be0a4; }
.pf-eyebrow { display:flex; align-items:center; gap:7px; color:var(--cyan); font-size:11px; font-weight:700; letter-spacing:.04em; }
.pf-hero-copy h2 { margin-top:5px; font-size:23px; font-weight:750; }
.pf-meta { display:flex; align-items:center; flex-wrap:wrap; gap:10px 18px; margin-top:10px; color:var(--text-soft); font-size:11.5px; }
.pf-meta>span { display:inline-flex; align-items:center; gap:6px; }
.pf-meta b { color:var(--frost); font-weight:500; }
.pf-status { width:max-content; display:inline-flex!important; align-items:center; gap:7px; padding:6px 9px; border:1px solid var(--pf-line); border-radius:999px; font-size:10.5px; font-weight:700; }
.pf-status i { width:6px; height:6px; border-radius:50%; background:currentColor; box-shadow:0 0 9px currentColor; }
.pf-status.ok { color:#67e8ad; background:rgba(65,211,143,.08); border-color:rgba(65,211,143,.24); }
.pf-status.info { color:#63dcf5; background:rgba(0,212,255,.07); border-color:rgba(0,212,255,.22); }
.pf-status.warn { color:#e5c688; background:rgba(201,169,110,.08); border-color:rgba(201,169,110,.25); }
.pf-status.danger { color:#ff9999; background:rgba(255,107,107,.07); border-color:rgba(255,107,107,.22); }
.pf-completion { display:flex; align-items:center; gap:14px; }
.pf-completion>div { --pf-progress:90deg; width:75px; height:75px; position:relative; display:grid; place-content:center; text-align:center; border-radius:50%; background:conic-gradient(var(--cyan) var(--pf-progress),rgba(168,213,232,.10) 0); }
.pf-completion>div::before { content:""; position:absolute; inset:5px; border-radius:50%; background:#0a2137; }
.pf-completion strong,.pf-completion span { position:relative; z-index:1; }
.pf-completion strong { font-size:17px; line-height:1; }
.pf-completion span { margin-top:3px; color:var(--text-soft); font-size:8.5px; }
.pf-layout { display:grid; grid-template-columns:280px minmax(0,1fr); min-height:536px; }
.pf-roles { padding:23px 18px; border-inline-end:1px solid var(--pf-line); background:rgba(4,17,30,.48); }
.pf-side-title { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 5px 14px; }
.pf-side-title span { display:block; color:var(--cyan); font-size:10px; font-weight:700; }
.pf-side-title b { display:block; margin-top:4px; font-size:12px; }
.pf-side-title>button { width:34px; height:34px; display:grid; place-items:center; flex:0 0 auto; border:1px solid var(--pf-strong); border-radius:10px; color:var(--cyan); background:rgba(0,212,255,.07); }
.pf-role-list { display:grid; gap:7px; }
.pf-role-list>button { min-height:60px; width:100%; display:grid; grid-template-columns:38px 1fr 7px 14px; align-items:center; gap:9px; padding:8px 10px; border:1px solid transparent; border-radius:14px; text-align:start; color:var(--text-soft); background:transparent; transition:background .2s,border-color .2s,color .2s; }
.pf-role-list>button:hover { background:rgba(255,255,255,.035); color:var(--ice-white); }
.pf-role-list>button.active { color:var(--ice-white); border-color:rgba(0,212,255,.27); background:linear-gradient(90deg,rgba(0,212,255,.11),rgba(0,212,255,.025)); }
.pf-role-list>button>i:first-child { width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--pf-line); border-radius:11px; color:var(--frost); background:rgba(255,255,255,.04); }
.pf-role-list>button.active>i:first-child { color:var(--cyan); border-color:rgba(0,212,255,.28); }
.pf-role-list span b,.pf-role-list span small { display:block; }
.pf-role-list span b { font-size:12px; }
.pf-role-list span small { margin-top:3px; color:var(--text-mute); font-size:9.5px; }
.pf-role-list em { width:7px; height:7px; border-radius:50%; background:var(--text-mute); }
.pf-role-list em.ok { background:#5be0a4; }.pf-role-list em.info { background:var(--cyan); }.pf-role-list em.warn { background:var(--gold); }.pf-role-list em.danger { background:var(--danger); }
.pf-add-role { width:100%; min-height:44px; display:flex; align-items:center; justify-content:center; gap:8px; margin-top:11px; border:1px dashed rgba(168,213,232,.25); border-radius:12px; color:var(--frost); font-size:11.5px; transition:.2s; }
.pf-add-role:hover { color:var(--cyan); border-color:rgba(0,212,255,.45); background:rgba(0,212,255,.05); }
.pf-privacy { display:flex; align-items:flex-start; gap:10px; margin-top:18px; padding:13px; border:1px solid rgba(201,169,110,.16); border-radius:13px; color:var(--gold); background:rgba(201,169,110,.055); }
.pf-privacy svg { flex:0 0 auto; }
.pf-privacy b,.pf-privacy span { display:block; }
.pf-privacy b { font-size:10.5px; }.pf-privacy span { margin-top:4px; color:var(--text-soft); font-size:9.5px; line-height:1.75; }
.pf-main { min-width:0; padding:23px 25px 28px; }
.pf-role-head { display:grid; grid-template-columns:48px 1fr auto; align-items:center; gap:13px; }
.pf-role-mark { width:48px; height:48px; display:grid; place-items:center; border:1px solid rgba(201,169,110,.28); border-radius:14px; color:var(--gold); background:linear-gradient(145deg,rgba(201,169,110,.14),rgba(201,169,110,.035)); }
.pf-role-head span { color:var(--text-mute); font-size:9.5px; }.pf-role-head h3 { margin-top:2px; font-size:17px; }.pf-role-head p { margin-top:3px; color:var(--text-soft); font-size:10.5px; }
.pf-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:18px; }
.pf-metrics>div { min-width:0; padding:13px 14px; border:1px solid var(--pf-line); border-radius:14px; background:rgba(255,255,255,.035); }
.pf-metrics span { display:flex; align-items:center; gap:7px; color:var(--text-soft); font-size:9.5px; }.pf-metrics span svg { color:var(--cyan); }
.pf-metrics b { display:block; overflow:hidden; margin-top:8px; color:var(--ice-white); font-size:12.5px; text-overflow:ellipsis; white-space:nowrap; }.pf-metrics small { display:block; margin-top:4px; color:var(--text-mute); font-size:8.5px; }
.pf-content-grid { display:grid; grid-template-columns:1.06fr .94fr; gap:11px; margin-top:11px; }
.pf-card { padding:16px; border:1px solid var(--pf-line); border-radius:16px; background:linear-gradient(155deg,rgba(13,41,68,.72),rgba(7,25,43,.72)); }
.pf-card-title { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding-bottom:12px; border-bottom:1px solid var(--pf-line); }
.pf-card-title span:first-child { color:var(--cyan); font-size:8.5px; font-weight:700; }.pf-card-title h4 { margin-top:3px; font-size:13px; }
.pf-card-title>button { color:var(--cyan); font-size:9.5px; }
.pf-timeline { display:grid; gap:0; padding-top:13px; }
.pf-timeline>div { position:relative; display:grid; grid-template-columns:28px 1fr; gap:9px; min-height:50px; }
.pf-timeline>div:not(:last-child)::before { content:""; position:absolute; top:25px; bottom:0; right:13px; width:1px; background:var(--pf-line); }
[dir="ltr"] .pf-timeline>div:not(:last-child)::before { right:auto; left:13px; }
.pf-timeline>div>i { width:27px; height:27px; z-index:1; display:grid; place-items:center; border:1px solid var(--pf-line); border-radius:9px; color:var(--text-mute); background:#0a2035; font-size:9px; font-style:normal; }
.pf-timeline>div.done>i { color:#55dda0; border-color:rgba(65,211,143,.3); background:rgba(65,211,143,.09); }.pf-timeline>div.current>i { color:var(--cyan); border-color:rgba(0,212,255,.35); box-shadow:0 0 16px -8px var(--cyan); }
.pf-timeline b,.pf-timeline small { display:block; }.pf-timeline b { font-size:10.5px; }.pf-timeline small { margin-top:3px; color:var(--text-mute); font-size:8.5px; }
.pf-facts { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding-top:13px; }
.pf-facts>div { padding:10px; border-radius:10px; background:rgba(255,255,255,.028); }
.pf-facts span,.pf-facts b { display:block; }.pf-facts span { color:var(--text-mute); font-size:8.5px; }.pf-facts b { overflow:hidden; margin-top:5px; font-size:10.5px; text-overflow:ellipsis; white-space:nowrap; }
.pf-lock-note { display:flex; align-items:flex-start; gap:8px; margin-top:11px; padding:10px; border-radius:10px; color:var(--gold); background:rgba(201,169,110,.055); }
.pf-lock-note span { color:var(--text-soft); font-size:8.5px; line-height:1.7; }
.pf-next { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:11px; padding:14px 16px; border:1px solid rgba(0,212,255,.18); border-radius:15px; background:linear-gradient(90deg,rgba(0,212,255,.075),rgba(201,169,110,.045)); }
.pf-next span { color:var(--cyan); font-size:8.5px; font-weight:700; }.pf-next h4 { margin-top:3px; font-size:12px; }.pf-next p { margin-top:3px; color:var(--text-soft); font-size:9px; }

/* Wizard */
.pf-wizard { padding-bottom:22px; }
.pf-wizard-head { min-height:128px; display:grid; grid-template-columns:38px 1fr auto; align-items:center; gap:14px; padding:22px 28px; border-bottom:1px solid var(--pf-line); background:linear-gradient(90deg,rgba(11,39,65,.92),rgba(7,25,43,.68)); }
.pf-back { width:36px; height:36px; display:grid; place-items:center; border:1px solid var(--pf-line); border-radius:11px; color:var(--frost); background:rgba(255,255,255,.035); }
.pf-wizard-head span { color:var(--cyan); font-size:10px; font-weight:700; }.pf-wizard-head h2 { margin-top:4px; font-size:20px; }.pf-wizard-head p { margin-top:5px; color:var(--text-soft); font-size:10.5px; }
.pf-secure { display:flex; align-items:center; gap:8px; padding:9px 11px; border:1px solid rgba(65,211,143,.2); border-radius:10px; color:#65dfa8; background:rgba(65,211,143,.055); }.pf-secure span { color:#b9f8d6; font-size:9.5px; }
.pf-stepper { width:min(780px,calc(100% - 40px)); display:grid; grid-template-columns:repeat(4,1fr); margin:20px auto 16px; }
.pf-stepper>div { position:relative; display:grid; justify-items:center; gap:6px; color:var(--text-mute); font-size:9px; }
.pf-stepper>div:not(:last-child)::after { content:""; position:absolute; top:14px; right:calc(50% + 18px); width:calc(100% - 36px); height:1px; transform:translateX(100%); background:var(--pf-line); }
[dir="ltr"] .pf-stepper>div:not(:last-child)::after { right:auto; left:calc(50% + 18px); transform:translateX(0); }
.pf-stepper b { width:29px; height:29px; z-index:1; display:grid; place-items:center; border:1px solid var(--pf-line); border-radius:10px; color:var(--text-soft); background:#081c30; font-size:9px; }
.pf-stepper .active { color:var(--ice-white); }.pf-stepper .active b { color:#03131f; border-color:var(--cyan); background:var(--cyan); box-shadow:0 0 18px -6px var(--cyan); }.pf-stepper .done b { color:#55dda0; border-color:rgba(65,211,143,.32); background:rgba(65,211,143,.1); }
.pf-wizard-card { width:min(900px,calc(100% - 40px)); min-height:385px; margin:0 auto; padding:22px; border:1px solid var(--pf-line); border-radius:18px; background:linear-gradient(150deg,rgba(13,41,68,.84),rgba(6,21,37,.9)); box-shadow:0 28px 60px -48px #000; }
.pf-section-title>span { color:var(--cyan); font-size:9px; font-weight:700; }.pf-section-title h3 { margin-top:4px; font-size:17px; }.pf-section-title p { margin-top:6px; color:var(--text-soft); font-size:10.5px; line-height:1.7; }
.pf-role-picker { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:18px; }
.pf-role-picker>button { position:relative; min-height:120px; display:flex; flex-direction:column; align-items:flex-start; gap:8px; padding:14px; border:1px solid var(--pf-line); border-radius:14px; text-align:start; color:var(--frost); background:rgba(255,255,255,.03); transition:border-color .2s,background .2s; }
.pf-role-picker>button:hover,.pf-role-picker>button.selected { border-color:rgba(0,212,255,.4); background:rgba(0,212,255,.07); }.pf-role-picker>button>svg { color:var(--cyan); }.pf-role-picker b { color:var(--ice-white); font-size:11px; }.pf-role-picker small { color:var(--text-mute); font-size:8.5px; line-height:1.6; }.pf-role-picker button>i { position:absolute; top:10px; left:10px; width:21px; height:21px; display:none; place-items:center; border-radius:50%; color:#041921; background:#5be0a4; }.pf-role-picker button.selected>i { display:grid; }
[dir="ltr"] .pf-role-picker button>i { left:auto; right:10px; }
.pf-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; margin-top:18px; }
.pf-field { display:grid; gap:6px; }.pf-field>span,.pf-field>label { color:var(--frost); font-size:10px; }.pf-field>span i,.pf-field>label i { margin-inline-start:4px; color:#ff8e8e; font-style:normal; }
.pf-field input,.pf-field select { width:100%; min-height:45px; padding:0 12px; border:1px solid var(--pf-line); border-radius:11px; color:var(--ice-white); background:rgba(2,13,24,.58); transition:border-color .2s,box-shadow .2s; }
.pf-field input::placeholder { color:rgba(168,213,232,.32); }.pf-field input:focus,.pf-field select:focus { border-color:rgba(0,212,255,.55); box-shadow:0 0 0 3px rgba(0,212,255,.08); }.pf-field input[readonly] { color:var(--text-soft); background:rgba(255,255,255,.025); cursor:not-allowed; }.pf-field small,.pf-form-error { color:#ff9c9c; font-size:8.5px; }.pf-field small.pf-helper { color:var(--text-mute); line-height:1.65; }.pf-field.has-error input { border-color:rgba(255,107,107,.55); }
.pf-date-control { position:relative; }.pf-date-control>input { padding-inline-end:48px; }.pf-calendar-root { position:absolute; inset-inline-end:4px; top:4px; z-index:20; }.pf-date-trigger { width:37px; height:37px; display:grid; place-items:center; border:0; border-radius:9px; color:var(--cyan); background:rgba(0,212,255,.08); cursor:pointer; }.pf-date-trigger:hover { background:rgba(0,212,255,.15); }.pf-date-trigger:focus-visible,.pf-calendar button:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }.pf-date-trigger:disabled { opacity:.4; cursor:not-allowed; }
.pf-calendar { position:absolute; inset-inline-end:0; top:45px; width:292px; padding:12px; border:1px solid rgba(0,212,255,.25); border-radius:14px; color:var(--ice-white); background:#092038; box-shadow:0 22px 50px -22px #000; }.pf-calendar-head { display:grid; grid-template-columns:34px 1fr 34px; align-items:center; gap:7px; }.pf-calendar-head strong { text-align:center; font-size:10.5px; }.pf-calendar-head button { width:32px; height:32px; display:grid; place-items:center; border:1px solid var(--pf-line); border-radius:9px; color:var(--frost); background:rgba(255,255,255,.035); cursor:pointer; }.pf-calendar-head button:disabled { opacity:.35; cursor:not-allowed; }
.pf-calendar-selects { display:grid; grid-template-columns:1.35fr .8fr; gap:7px; margin-top:10px; }.pf-field .pf-calendar-selects select { min-height:37px; padding:0 9px; border-radius:9px; font-size:9.5px; }.pf-calendar-weekdays,.pf-calendar-days { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }.pf-calendar-weekdays { margin:11px 0 5px; color:var(--text-mute); text-align:center; font-size:8px; }.pf-calendar-days>span,.pf-calendar-days>button { min-width:0; height:32px; }.pf-calendar-days>button { border:1px solid transparent; border-radius:8px; color:var(--frost); background:transparent; font-size:9px; cursor:pointer; }.pf-calendar-days>button:hover { border-color:rgba(0,212,255,.3); background:rgba(0,212,255,.08); }.pf-calendar-days>button.today { border-color:rgba(201,169,110,.5); }.pf-calendar-days>button.selected { color:#03131f; background:var(--cyan); font-weight:800; }
.pf-upload { min-height:90px; grid-column:1/-1; display:grid; grid-template-columns:38px 1fr; align-items:center; column-gap:10px; padding:13px; border:1px dashed rgba(0,212,255,.28); border-radius:12px; color:var(--cyan); background:rgba(0,212,255,.035); cursor:pointer; }.pf-upload b,.pf-upload span { grid-column:2; }.pf-upload b { color:var(--ice-white); font-size:10.5px; }.pf-upload span { color:var(--text-mute); font-size:8.5px; }.pf-upload input { grid-column:2; margin-top:6px; color:var(--text-soft); font-size:9px; }
.pf-info-note { display:flex; align-items:flex-start; gap:12px; margin-top:20px; padding:17px; border:1px solid rgba(0,212,255,.18); border-radius:14px; color:var(--cyan); background:rgba(0,212,255,.045); }.pf-info-note b,.pf-info-note span { display:block; }.pf-info-note b { color:var(--ice-white); font-size:11px; }.pf-info-note span { margin-top:5px; color:var(--text-soft); font-size:9.5px; }
.pf-review { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:18px; }.pf-review>div { padding:12px; border:1px solid var(--pf-line); border-radius:11px; background:rgba(255,255,255,.025); }.pf-review span,.pf-review b { display:block; }.pf-review span { color:var(--text-mute); font-size:8.5px; }.pf-review b { margin-top:6px; font-size:11px; }
.pf-consent { display:flex; align-items:flex-start; gap:9px; margin-top:14px; padding:12px; border-radius:11px; background:rgba(201,169,110,.055); }.pf-consent input { margin-top:3px; accent-color:var(--cyan); }.pf-consent span { color:var(--text-soft); font-size:9.5px; line-height:1.7; }
.pf-wizard-actions { width:min(900px,calc(100% - 40px)); display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; margin:16px auto 0; }.pf-wizard-actions>span { color:var(--text-mute); font-size:9px; }.pf-wizard-actions>button:first-child { justify-self:start; }.pf-wizard-actions>button:last-child { justify-self:end; }
.pf-wizard-actions button:disabled { opacity:.45; cursor:not-allowed; filter:saturate(.35); box-shadow:none; }

@media (max-width:900px) {
  .modal.profile-modal { width:96vw; height:92vh; }
  .pf-hero { grid-template-columns:auto 1fr; padding:20px; }.pf-completion { grid-column:1/-1; justify-content:space-between; }.pf-layout { grid-template-columns:1fr; }.pf-roles { border-inline-end:0; border-bottom:1px solid var(--pf-line); }.pf-role-list { grid-template-columns:1fr 1fr; }.pf-privacy { display:none; }.pf-content-grid { grid-template-columns:1fr; }.pf-role-picker { grid-template-columns:1fr 1fr; }
}
@media (max-width:600px) {
  .modal.profile-modal .modal-head { position:sticky; top:0; z-index:4; }.pf-shell { min-height:100%; }.pf-hero { grid-template-columns:64px 1fr; gap:13px; padding:17px 15px; }.pf-avatar { width:62px; height:62px; border-radius:19px; }.pf-avatar>span { font-size:20px; }.pf-hero-copy h2 { font-size:18px; }.pf-meta { align-items:flex-start; flex-direction:column; gap:7px; }.pf-completion>div { width:62px; height:62px; }.pf-completion .btn { flex:1; min-height:44px; }.pf-roles,.pf-main { padding:17px 14px; }.pf-role-list { grid-template-columns:1fr; }.pf-role-head { grid-template-columns:44px 1fr; }.pf-role-head>.btn { grid-column:1/-1; width:100%; justify-content:center; }.pf-metrics { grid-template-columns:1fr; }.pf-facts { grid-template-columns:1fr; }.pf-next { align-items:flex-start; flex-direction:column; }.pf-next .btn { width:100%; justify-content:center; }.pf-wizard-head { grid-template-columns:36px 1fr; padding:16px 14px; }.pf-secure { grid-column:1/-1; justify-content:center; }.pf-stepper { width:calc(100% - 20px); }.pf-stepper span { max-width:62px; text-align:center; }.pf-wizard-card { width:calc(100% - 20px); min-height:410px; padding:17px 14px; }.pf-form-grid,.pf-review { grid-template-columns:1fr; }.pf-role-picker { grid-template-columns:1fr; }.pf-role-picker>button { min-height:92px; }.pf-wizard-actions { width:calc(100% - 20px); grid-template-columns:1fr 1fr; }.pf-wizard-actions>span { display:none; }.pf-wizard-actions .btn { min-height:44px; }.pf-calendar { width:min(292px,calc(100vw - 56px)); }
}
@media (prefers-reduced-motion:reduce) {
  .pf-toast { animation:none; }.pf-shell * { scroll-behavior:auto!important; transition-duration:.01ms!important; }
}

/* ============================================================
   V31.85 — CONFIG-DRIVEN PLAN CENTER
   ============================================================ */
html.modal-open,
html.modal-open body,
body.modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}
.modal:focus { outline: none; }
.modal-head .rh button:disabled { display: none; }
.modal-head .rh button.close { width: 44px; height: 44px; }
.modal-head .rh button.close:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.modal.plans-modal {
  width: min(1280px, 96vw);
  height: min(880px, 92dvh);
  max-height: 92dvh;
  background: #061524;
  border-color: rgba(126, 226, 184, .2);
  box-shadow: 0 34px 100px -34px rgba(0, 0, 0, .95), 0 0 0 1px rgba(197, 184, 255, .08);
}
.modal.plans-modal .modal-body {
  padding: 0;
  background:
    radial-gradient(700px 430px at 84% -5%, rgba(126, 226, 184, .09), transparent 62%),
    radial-gradient(700px 430px at 4% 12%, rgba(197, 184, 255, .09), transparent 60%),
    #061524;
}
.pricing-center {
  --pc-green: #7ee2b8;
  --pc-green-deep: #47c993;
  --pc-lilac: #c5b8ff;
  --pc-white: #f7fbff;
  --pc-surface: rgba(255, 255, 255, .038);
  --pc-surface-strong: rgba(255, 255, 255, .064);
  --pc-line: rgba(210, 231, 241, .13);
  min-height: 100%;
  padding: 28px;
  color: var(--pc-white);
}
.pricing-center button:focus-visible,
.pricing-table-wrap:focus-visible {
  outline: 2px solid var(--pc-green);
  outline-offset: 3px;
}
.pricing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 4px 2px 24px;
}
.pricing-hero-copy { max-width: 720px; }
.pricing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--pc-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
}
.pricing-hero h2 {
  margin-top: 9px;
  color: var(--pc-white);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 800;
  line-height: 1.35;
  text-wrap: balance;
}
.pricing-hero p {
  max-width: 680px;
  margin-top: 9px;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.9;
}
.pricing-current {
  min-width: 220px;
  padding: 14px 16px;
  border: 1px solid rgba(126, 226, 184, .2);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(126, 226, 184, .08), rgba(197, 184, 255, .05));
}
.pricing-current span,
.pricing-current strong { display: block; }
.pricing-current span { color: var(--text-mute); font-size: 9.5px; }
.pricing-current strong { margin-top: 5px; color: var(--pc-white); font-size: 11.5px; }

.pricing-controls {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 -6px 16px;
  padding: 9px 6px;
  background: rgba(6, 21, 36, .9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.pricing-audience,
.pricing-cycle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--pc-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .035);
}
.pricing-audience button,
.pricing-cycle button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border-radius: 9px;
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 700;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.pricing-audience button.active,
.pricing-cycle button.active {
  color: #062018;
  background: var(--pc-green);
  box-shadow: 0 10px 26px -16px rgba(126, 226, 184, .9);
}
.pricing-audience button:not(.active):hover,
.pricing-cycle button:not(.active):hover {
  color: var(--pc-white);
  background: rgba(255, 255, 255, .05);
}
.pricing-cycle button small {
  padding: 2px 6px;
  border-radius: 999px;
  color: #241d46;
  background: var(--pc-lilac);
  font-size: 8px;
  font-weight: 900;
}
.pricing-cycle button.active small { color: #062018; background: rgba(255, 255, 255, .72); }

.pricing-draft-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 15px;
  padding: 11px 13px;
  border: 1px solid rgba(197, 184, 255, .2);
  border-radius: 12px;
  color: var(--pc-lilac);
  background: rgba(197, 184, 255, .055);
}
.pricing-draft-note svg { flex: 0 0 auto; margin-top: 2px; }
.pricing-draft-note span { color: var(--text-soft); font-size: 10.5px; line-height: 1.8; }
.pricing-draft-note b { color: var(--pc-lilac); }

.pricing-grid {
  display: grid;
  align-items: stretch;
  gap: 12px;
}
.pricing-grid-individual { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pricing-grid-organization {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 850px;
  margin-inline: auto;
}
.pricing-card {
  --plan-accent: #c6d3df;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--pc-line);
  border-radius: 18px;
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--plan-accent) 7%, transparent), transparent 40%),
    linear-gradient(160deg, rgba(13, 41, 68, .84), rgba(5, 18, 31, .92));
  box-shadow: 0 22px 50px -38px #000;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.pricing-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--plan-accent) 42%, transparent);
  box-shadow: 0 28px 58px -38px color-mix(in srgb, var(--plan-accent) 50%, #000);
}
.pricing-card.tone-pluto { --plan-accent: #c6d3df; }
.pricing-card.tone-moon { --plan-accent: #b8ddf4; }
.pricing-card.tone-earth { --plan-accent: var(--pc-green); }
.pricing-card.tone-sun { --plan-accent: #f2d18a; }
.pricing-card.tone-constellation { --plan-accent: var(--pc-lilac); }
.pricing-card.tone-galaxy { --plan-accent: #e8edf7; }
.pricing-card.recommended {
  border-color: rgba(126, 226, 184, .5);
  box-shadow: 0 24px 65px -38px rgba(126, 226, 184, .8), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.pricing-card.current { border-color: color-mix(in srgb, var(--plan-accent) 62%, transparent); }
.pricing-recommended {
  position: absolute;
  top: 0;
  inset-inline-end: 16px;
  transform: translateY(-50%);
  padding: 4px 9px;
  border-radius: 999px;
  color: #062018;
  background: var(--pc-green);
  font-size: 8.5px;
  font-weight: 900;
  box-shadow: 0 9px 22px -13px var(--pc-green);
}
.pricing-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pricing-plan-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--plan-accent) 32%, transparent);
  border-radius: 14px;
  color: var(--plan-accent);
  background: color-mix(in srgb, var(--plan-accent) 10%, transparent);
}
.pricing-card-head>div>span { color: var(--plan-accent); font-size: 9px; font-weight: 800; }
.pricing-card-head h3 { margin-top: 3px; color: var(--pc-white); font-size: 19px; font-weight: 850; }
.pricing-description {
  min-height: 53px;
  margin-top: 13px;
  color: var(--text-soft);
  font-size: 10.5px;
  line-height: 1.75;
}
.pricing-price { min-height: 75px; margin-top: 10px; }
.pricing-price strong {
  display: inline;
  color: var(--pc-white);
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.pricing-price>span { margin-inline-start: 5px; color: var(--text-mute); font-size: 9px; }
.pricing-price small { display: block; margin-top: 5px; color: var(--text-mute); font-size: 8.5px; }
.pricing-divider { height: 1px; margin: 3px 0 13px; background: var(--pc-line); }
.pricing-features {
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 1;
}
.pricing-features li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  color: #d9eaf2;
  font-size: 10px;
  line-height: 1.65;
}
.pricing-features li>span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--plan-accent);
  background: color-mix(in srgb, var(--plan-accent) 8%, transparent);
}
.pricing-cta {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  border: 1px solid color-mix(in srgb, var(--plan-accent) 34%, transparent);
  border-radius: 12px;
  color: var(--pc-white);
  background: color-mix(in srgb, var(--plan-accent) 8%, transparent);
  font-size: 11px;
  font-weight: 850;
  transition: transform .18s ease, filter .18s ease, background .18s ease;
}
.pricing-cta:not(:disabled):hover { transform: translateY(-1px); background: color-mix(in srgb, var(--plan-accent) 15%, transparent); }
.pricing-cta.primary { color: #062018; border-color: transparent; background: linear-gradient(135deg, var(--pc-green), #a8edcf); }
.pricing-cta:disabled {
  cursor: default;
  color: #bcebd6;
  border-color: rgba(126, 226, 184, .17);
  background: rgba(126, 226, 184, .07);
}

.pricing-feedback {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 34px;
  align-items: start;
  gap: 10px;
  margin-top: 15px;
  padding: 13px;
  border: 1px solid rgba(126, 226, 184, .2);
  border-radius: 14px;
  background: rgba(126, 226, 184, .055);
}
.pricing-feedback.error { border-color: rgba(255, 107, 107, .28); background: rgba(255, 107, 107, .06); }
.pricing-feedback-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--pc-green);
  background: rgba(126, 226, 184, .09);
}
.pricing-feedback.error .pricing-feedback-icon { color: #ff9f9f; background: rgba(255, 107, 107, .09); }
.pricing-feedback strong { display: block; color: var(--pc-white); font-size: 11px; }
.pricing-feedback p { margin-top: 4px; color: var(--text-soft); font-size: 10px; line-height: 1.75; }
.pricing-feedback>button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--text-soft);
}
.pricing-feedback>button:hover { color: var(--pc-white); background: rgba(255, 255, 255, .05); }

.pricing-compare {
  margin-top: 28px;
  padding-top: 23px;
  border-top: 1px solid var(--pc-line);
}
.pricing-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}
.pricing-section-head span { color: var(--pc-green); font-size: 9px; font-weight: 850; }
.pricing-section-head h3 { margin-top: 4px; color: var(--pc-white); font-size: 16px; }
.pricing-section-head>small { color: var(--text-mute); font-size: 9px; }
.pricing-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--pc-line);
  border-radius: 15px;
  scrollbar-color: rgba(126, 226, 184, .3) transparent;
}
.pricing-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 10.5px;
}
.pricing-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.pricing-table th,
.pricing-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--pc-line);
  text-align: start;
}
.pricing-table tr:last-child th,
.pricing-table tr:last-child td { border-bottom: 0; }
.pricing-table thead th {
  color: var(--pc-white);
  background: rgba(255, 255, 255, .045);
  font-weight: 800;
}
.pricing-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  z-index: 2;
  color: var(--text-soft);
  background: #0a2035;
  font-weight: 650;
}
.pricing-table tbody td { color: #e1eef4; background: rgba(255, 255, 255, .018); }
.pricing-table tbody tr:hover td { background: rgba(126, 226, 184, .035); }
.pricing-footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 0 2px 5px;
  color: var(--text-mute);
  font-size: 9px;
  line-height: 1.7;
}
.pricing-footnote>span:first-child { display: inline-flex; align-items: center; gap: 6px; color: #a9dec8; }

@media (max-width: 1100px) {
  .pricing-grid-individual { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .backdrop { align-items: end; }
  .modal.plans-modal {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .modal.plans-modal .modal-head {
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .modal.plans-modal .modal-body {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .pricing-center { padding: 18px 15px 24px; }
  .pricing-hero { grid-template-columns: 1fr; gap: 14px; padding-bottom: 18px; }
  .pricing-current { min-width: 0; }
  .pricing-controls { align-items: stretch; flex-direction: column; }
  .pricing-audience,
  .pricing-cycle { width: 100%; }
  .pricing-audience button,
  .pricing-cycle button { min-height: 44px; flex: 1; padding-inline: 8px; }
  .pricing-grid-individual,
  .pricing-grid-organization { grid-template-columns: 1fr; max-width: none; }
  .pricing-description { min-height: 0; }
  .pricing-price { min-height: 65px; }
  .pricing-section-head,
  .pricing-footnote { align-items: flex-start; flex-direction: column; }
  .pricing-table { min-width: 640px; }
}
@media (max-width: 540px) {
  .account-pill.wallet { display: none; }
  .account-pill.plan {
    width: 42px;
    min-width: 42px;
    padding: 0;
    justify-content: center;
  }
  .account-pill.plan>span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .pricing-hero h2 { font-size: 22px; }
  .pricing-draft-note { padding: 10px; }
  .pricing-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .backdrop,
  .modal,
  .pricing-card { animation: none !important; }
  .pricing-card,
  .pricing-cta,
  .pricing-audience button,
  .pricing-cycle button { transition-duration: .01ms !important; }
  .pricing-card:hover,
  .pricing-cta:not(:disabled):hover { transform: none; }
}

/* ============================================================
   WALLET CENTER — v31.90
   ============================================================ */
.modal.wallet-modal {
  width: min(1180px, calc(100vw - 32px));
  height: min(900px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border-color: rgba(126, 226, 184, .2);
  background: #061525;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, .62),
    0 0 0 1px rgba(197, 184, 255, .035),
    0 0 58px rgba(126, 226, 184, .07);
}
.modal.wallet-modal .modal-head {
  border-bottom-color: rgba(126, 226, 184, .12);
  background: rgba(5, 19, 34, .96);
}
.modal.wallet-modal .modal-head .ic {
  color: #7ee2b8;
  border-color: rgba(126, 226, 184, .2);
  background: rgba(126, 226, 184, .08);
}
.modal.wallet-modal .modal-body {
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(126, 226, 184, .28) transparent;
}

.wallet-center {
  --wc-green: #7ee2b8;
  --wc-green-strong: #9aebca;
  --wc-lilac: #c5b8ff;
  --wc-gold: #e8c98f;
  --wc-white: #f7fbff;
  --wc-cyan: #75dff2;
  --wc-danger: #ff9d9d;
  --wc-surface: rgba(11, 33, 55, .82);
  --wc-surface-strong: #0b2137;
  --wc-line: rgba(183, 216, 231, .115);
  --wc-line-strong: rgba(183, 216, 231, .2);
  min-height: 100%;
  padding: clamp(20px, 2.4vw, 32px);
  color: #dcebf3;
  background:
    radial-gradient(780px 440px at 92% -8%, rgba(126, 226, 184, .09), transparent 66%),
    radial-gradient(680px 420px at -5% 32%, rgba(197, 184, 255, .07), transparent 66%),
    linear-gradient(180deg, #061525 0%, #071a2c 56%, #061522 100%);
  font-size: 13px;
  line-height: 1.65;
}
.wallet-center :is(button, input):focus-visible {
  outline: 3px solid rgba(126, 226, 184, .38);
  outline-offset: 2px;
}
.wallet-center button:disabled {
  cursor: not-allowed;
}
.wallet-center h2,
.wallet-center h3,
.wallet-center h4 {
  color: var(--wc-white);
}

.wc-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 2px 22px;
}
.wc-hero-copy {
  max-width: 660px;
}
.wc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--wc-green);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .02em;
}
.wc-hero h2 {
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -.035em;
}
.wc-hero p {
  max-width: 620px;
  margin-top: 7px;
  color: #a8c6d6;
  font-size: 13px;
}
.wc-account-state {
  min-width: 235px;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(126, 226, 184, .19);
  border-radius: 14px;
  background: rgba(126, 226, 184, .055);
}
.wc-account-state > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--wc-green);
  font-weight: 850;
}
.wc-account-state > small {
  color: #91afbf;
  font-size: 10px;
  line-height: 1.55;
}
.wc-account-state.guest {
  border-color: rgba(232, 201, 143, .22);
  background: rgba(232, 201, 143, .055);
}
.wc-account-state.guest > span {
  color: var(--wc-gold);
}

.wc-draft-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(197, 184, 255, .17);
  border-radius: 12px;
  color: #c8c1ea;
  background: rgba(197, 184, 255, .055);
  font-size: 11px;
}
.wc-draft-note svg {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--wc-lilac);
}
.wc-auth-banner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(232, 201, 143, .18);
  border-radius: 15px;
  background:
    linear-gradient(110deg, rgba(232, 201, 143, .07), rgba(126, 226, 184, .035)),
    rgba(8, 28, 47, .72);
}
.wc-auth-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--wc-gold);
  background: rgba(232, 201, 143, .1);
}
.wc-auth-banner strong {
  display: block;
  color: var(--wc-white);
  font-size: 12px;
}
.wc-auth-banner span {
  display: block;
  margin-top: 2px;
  color: #9cb9c8;
  font-size: 10.5px;
}
.wc-secondary-cta,
.wc-primary-cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 850;
  transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}
.wc-secondary-cta {
  color: #f0ddb8;
  border: 1px solid rgba(232, 201, 143, .24);
  background: rgba(232, 201, 143, .065);
}
.wc-secondary-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 201, 143, .46);
}

.wc-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(480px, 1.12fr);
  align-items: stretch;
  gap: 16px;
}
.wc-balance-card,
.wc-charge-card,
.wc-tab-panel,
.wc-budget-card,
.wc-tools-card {
  border: 1px solid var(--wc-line);
  border-radius: 19px;
  background: var(--wc-surface);
  box-shadow: 0 18px 42px -30px rgba(0, 0, 0, .9);
}
.wc-balance-card {
  min-height: 100%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(19px, 2.2vw, 27px);
  background:
    radial-gradient(430px 260px at 10% 0%, rgba(126, 226, 184, .16), transparent 66%),
    radial-gradient(370px 260px at 100% 100%, rgba(197, 184, 255, .12), transparent 64%),
    linear-gradient(145deg, #0b2940, #0a2036 54%, #101f39);
}
.wc-balance-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 190px;
  height: 190px;
  inset-inline-end: -95px;
  top: -94px;
  border: 1px solid rgba(126, 226, 184, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(126, 226, 184, .025), 0 0 0 52px rgba(197, 184, 255, .02);
}
.wc-balance-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.wc-balance-card > header > div > span {
  color: #acd0c1;
  font-size: 11px;
  font-weight: 750;
}
.wc-balance-card > header strong {
  min-height: 54px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 5px;
  color: var(--wc-white);
  font-size: clamp(30px, 4vw, 43px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.wc-balance-card > header strong small {
  color: var(--wc-green);
  font-size: 11px;
  font-weight: 800;
}
.wc-visibility {
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid rgba(126, 226, 184, .17);
  border-radius: 10px;
  color: #b8dbc9;
  background: rgba(126, 226, 184, .05);
  font-size: 9.5px;
  font-weight: 750;
}
.wc-visibility:hover {
  border-color: rgba(126, 226, 184, .36);
}
.wc-balance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 28px;
}
.wc-balance-metrics > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(183, 216, 231, .09);
  border-radius: 13px;
  background: rgba(3, 16, 29, .25);
}
.wc-balance-metrics span,
.wc-balance-metrics b {
  display: block;
}
.wc-balance-metrics span {
  color: #8baab9;
  font-size: 9.5px;
}
.wc-balance-metrics b {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #e7f3f7;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.wc-balance-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid rgba(183, 216, 231, .1);
  color: #8fadbc;
  font-size: 9px;
}
.wc-balance-foot > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.wc-balance-foot svg {
  color: var(--wc-green);
}

.wc-charge-card {
  padding: clamp(17px, 2vw, 23px);
}
.wc-charge-card > header,
.wc-budget-card > header,
.wc-tools-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.wc-charge-card > header h3,
.wc-budget-card > header h3,
.wc-tools-card > header h3,
.wc-section-head h3 {
  font-size: 15px;
  font-weight: 850;
}
.wc-charge-card > header p,
.wc-budget-card > header p,
.wc-tools-card > header p,
.wc-section-head p {
  margin-top: 3px;
  color: #8faebe;
  font-size: 10px;
}
.wc-charge-card > header > svg,
.wc-budget-card > header > svg,
.wc-tools-card > header > svg {
  color: var(--wc-green);
}
.wc-quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}
.wc-quick-amounts button {
  min-width: 0;
  min-height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 7px;
  border: 1px solid var(--wc-line);
  border-radius: 12px;
  color: #dbeaf1;
  background: rgba(255, 255, 255, .018);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.wc-quick-amounts button:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 226, 184, .28);
}
.wc-quick-amounts button[aria-pressed="true"] {
  color: #08251b;
  border-color: transparent;
  background: linear-gradient(135deg, var(--wc-green), #a9edd1);
  box-shadow: 0 10px 24px -16px rgba(126, 226, 184, .85);
}
.wc-quick-amounts b {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}
.wc-quick-amounts span {
  font-size: 8.5px;
  opacity: .72;
}
.wc-amount-field {
  margin-top: 14px;
}
.wc-amount-field > label,
.wc-methods > legend {
  display: block;
  margin-bottom: 6px;
  color: #b7cfd9;
  font-size: 10px;
  font-weight: 750;
}
.wc-amount-field > div {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--wc-line-strong);
  border-radius: 12px;
  background: rgba(3, 15, 27, .28);
}
.wc-amount-field:focus-within > div {
  border-color: rgba(126, 226, 184, .5);
  box-shadow: 0 0 0 3px rgba(126, 226, 184, .07);
}
.wc-amount-field.has-error > div {
  border-color: rgba(255, 157, 157, .52);
}
.wc-amount-field input {
  min-width: 0;
  width: 100%;
  height: 44px;
  color: var(--wc-white);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.wc-amount-field input::placeholder {
  color: #587789;
}
.wc-amount-field > div > span {
  flex: 0 0 auto;
  color: var(--wc-green);
  font-size: 10px;
  font-weight: 800;
}
.wc-amount-field > small {
  display: block;
  min-height: 20px;
  padding: 4px 2px 0;
  color: #7899aa;
  font-size: 9px;
}
.wc-amount-field.has-error > small {
  color: var(--wc-danger);
}
.wc-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  border: 0;
}
.wc-methods > legend {
  grid-column: 1 / -1;
}
.wc-methods > button {
  min-height: 58px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--wc-line);
  border-radius: 12px;
  text-align: start;
  background: rgba(255, 255, 255, .018);
}
.wc-methods > button > svg {
  color: #8baabc;
}
.wc-methods > button b,
.wc-methods > button small {
  display: block;
}
.wc-methods > button b {
  color: #dceaf0;
  font-size: 10px;
}
.wc-methods > button small {
  margin-top: 2px;
  color: #7394a6;
  font-size: 8px;
  line-height: 1.45;
}
.wc-methods > button.on {
  border-color: rgba(197, 184, 255, .35);
  background: rgba(197, 184, 255, .065);
}
.wc-methods > button.on > svg {
  color: var(--wc-lilac);
}
.wc-charge-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(3, 15, 27, .34);
}
.wc-charge-summary > div {
  min-width: 0;
}
.wc-charge-summary span,
.wc-charge-summary b {
  display: block;
}
.wc-charge-summary span {
  color: #7797a8;
  font-size: 8.5px;
}
.wc-charge-summary b {
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: #dfeef4;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.wc-primary-cta {
  width: 100%;
  margin-top: 12px;
  color: #06231a;
  background: linear-gradient(135deg, var(--wc-green), #a7eccf);
  box-shadow: 0 12px 30px -18px rgba(126, 226, 184, .9);
}
.wc-primary-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.wc-feedback {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  padding: 10px 11px;
  border: 1px solid rgba(117, 223, 242, .2);
  border-radius: 13px;
  color: #bfe5ed;
  background: rgba(117, 223, 242, .055);
  font-size: 10.5px;
}
.wc-feedback.warning {
  color: #f0dab1;
  border-color: rgba(232, 201, 143, .24);
  background: rgba(232, 201, 143, .055);
}
.wc-feedback.error {
  color: #ffc0c0;
  border-color: rgba(255, 157, 157, .27);
  background: rgba(255, 157, 157, .055);
}
.wc-feedback > button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}
.wc-feedback > button:hover {
  background: rgba(255, 255, 255, .06);
}

.wc-tabs {
  position: sticky;
  z-index: 3;
  top: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 16px;
  padding: 5px;
  border: 1px solid var(--wc-line);
  border-radius: 15px;
  background: rgba(5, 20, 35, .88);
  box-shadow: 0 12px 30px -26px #000;
  backdrop-filter: blur(16px);
}
.wc-tabs button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 11px;
  color: #8eacba;
  font-size: 10.5px;
  font-weight: 750;
}
.wc-tabs button:hover {
  color: #d6e7ee;
  background: rgba(255, 255, 255, .025);
}
.wc-tabs button.on {
  color: #09251b;
  background: var(--wc-green);
  box-shadow: 0 8px 18px -14px rgba(126, 226, 184, .9);
}
.wc-tab-panel {
  min-height: 290px;
  margin-top: 10px;
  padding: clamp(17px, 2vw, 23px);
}
.wc-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}
.wc-filters {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--wc-line);
  border-radius: 11px;
  background: rgba(3, 15, 27, .28);
}
.wc-filters button {
  min-height: 44px;
  padding: 0 13px;
  border-radius: 8px;
  color: #809faf;
  font-size: 9.5px;
}
.wc-filters button.on {
  color: #dff7eb;
  background: rgba(126, 226, 184, .11);
}
.wc-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--wc-line);
  border-radius: 14px;
  scrollbar-color: rgba(126, 226, 184, .28) transparent;
}
.wc-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 10px;
}
.wc-table th,
.wc-table td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--wc-line);
  text-align: start;
  vertical-align: middle;
}
.wc-table th {
  color: #8dabba;
  background: rgba(255, 255, 255, .025);
  font-size: 9px;
  font-weight: 750;
}
.wc-table tbody tr:last-child td {
  border-bottom: 0;
}
.wc-table tbody tr:hover td {
  background: rgba(126, 226, 184, .022);
}
.wc-table td:first-child {
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.wc-table td:first-child b,
.wc-table td:first-child small {
  display: block;
}
.wc-table td:first-child b {
  color: #dcebf1;
  font-size: 10px;
}
.wc-table td:first-child small {
  margin-top: 2px;
  color: var(--wc-lilac);
  font-size: 8px;
}
.wc-transaction-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
}
.wc-transaction-icon.income {
  color: var(--wc-green);
  background: rgba(126, 226, 184, .085);
}
.wc-transaction-icon.expense {
  color: var(--wc-lilac);
  background: rgba(197, 184, 255, .085);
}
.wc-reference {
  direction: ltr;
  color: #8aa9b9;
  font-family: var(--font-en);
  font-size: 9px;
  text-align: start;
}
.wc-amount {
  white-space: nowrap;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.wc-amount.income {
  color: var(--wc-green);
}
.wc-amount.expense {
  color: #d9cdfd;
}
.wc-status {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  color: #b8ead4;
  background: rgba(126, 226, 184, .075);
  font-size: 8.5px;
  font-weight: 750;
  white-space: nowrap;
}
.wc-status.refunded {
  color: #d8cff8;
  background: rgba(197, 184, 255, .08);
}

.wc-empty-label {
  max-width: 280px;
  padding: 7px 10px;
  border: 1px solid rgba(232, 201, 143, .15);
  border-radius: 10px;
  color: #d9c79e;
  background: rgba(232, 201, 143, .045);
  font-size: 9px;
  text-align: center;
}
.wc-invoice-grid,
.wc-method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.wc-invoice-grid > article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--wc-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .018);
}
.wc-invoice-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  grid-row: 1 / span 2;
  border-radius: 11px;
  color: var(--wc-lilac);
  background: rgba(197, 184, 255, .075);
}
.wc-invoice-grid article span {
  color: var(--wc-lilac);
  font-size: 8.5px;
}
.wc-invoice-grid h4 {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.55;
}
.wc-invoice-grid small {
  display: block;
  margin-top: 4px;
  color: #7897a7;
  font-size: 8px;
}
.wc-invoice-grid article > b {
  grid-column: 1 / -1;
  color: #dfeef4;
  font-size: 10.5px;
}
.wc-invoice-grid article > button {
  min-height: 44px;
  grid-column: 1 / -1;
  border: 1px solid var(--wc-line);
  border-radius: 10px;
  color: #a6c4d2;
  font-size: 9px;
}
.wc-invoice-grid article > button:hover {
  color: var(--wc-green);
  border-color: rgba(126, 226, 184, .28);
}

.wc-method-grid > article {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--wc-line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .018);
}
.wc-method-grid > article.primary {
  border-color: rgba(126, 226, 184, .18);
  background: linear-gradient(150deg, rgba(126, 226, 184, .065), rgba(255, 255, 255, .014));
}
.wc-method-grid article > div {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--wc-green);
}
.wc-method-grid article > div span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #a7dcc5;
  background: rgba(126, 226, 184, .08);
  font-size: 8px;
}
.wc-method-grid h4 {
  margin-top: 9px;
  font-size: 13px;
}
.wc-method-grid p {
  min-height: 48px;
  margin-top: 4px;
  color: #829faf;
  font-size: 9.5px;
}
.wc-method-grid small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  color: #d6be91;
  font-size: 8.5px;
}
.wc-method-grid small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wc-gold);
  box-shadow: 0 0 10px rgba(232, 201, 143, .55);
}
.wc-method-grid article > button {
  min-height: 44px;
  margin-top: 10px;
  border: 1px solid var(--wc-line);
  border-radius: 10px;
  color: #aac5d2;
  font-size: 9px;
}
.wc-method-grid article > button:hover {
  border-color: rgba(197, 184, 255, .3);
  color: var(--wc-lilac);
}

.wc-controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
  gap: 12px;
}
.wc-budget-card,
.wc-tools-card {
  padding: 17px;
  border-radius: 15px;
  box-shadow: none;
}
.wc-budget-card > label {
  display: block;
  margin-top: 16px;
}
.wc-budget-card > label > span {
  display: block;
  margin-bottom: 6px;
  color: #9fbac7;
  font-size: 9.5px;
}
.wc-budget-card > label > div {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--wc-line-strong);
  border-radius: 11px;
  background: rgba(3, 15, 27, .25);
}
.wc-budget-card input {
  min-width: 0;
  width: 100%;
  height: 42px;
  font-variant-numeric: tabular-nums;
}
.wc-budget-card label b {
  color: var(--wc-green);
  font-size: 9px;
}
.wc-budget-bar {
  height: 7px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
}
.wc-budget-bar span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--wc-green), var(--wc-lilac));
}
.wc-budget-card > small {
  display: block;
  margin-top: 5px;
  color: #718fa0;
  font-size: 8px;
}
.wc-switch-list {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}
.wc-switch-list > button {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 11px;
  text-align: start;
}
.wc-switch-list > button:hover:not(:disabled) {
  background: rgba(255, 255, 255, .025);
}
.wc-switch-list > button:disabled {
  opacity: .5;
}
.wc-switch-list b,
.wc-switch-list small {
  display: block;
}
.wc-switch-list b {
  color: #d9e8ee;
  font-size: 9.5px;
}
.wc-switch-list small {
  margin-top: 2px;
  color: #7896a6;
  font-size: 8px;
}
.wc-switch-list > button > i {
  width: 38px;
  height: 22px;
  position: relative;
  border-radius: 999px;
  background: #1b3548;
  transition: background .18s ease;
}
.wc-switch-list > button > i::after {
  content: "";
  width: 16px;
  height: 16px;
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  border-radius: 50%;
  background: #8da8b5;
  transition: inset-inline-start .18s ease, background .18s ease;
}
.wc-switch-list > button > i.on {
  background: rgba(126, 226, 184, .28);
}
.wc-switch-list > button > i.on::after {
  inset-inline-start: 19px;
  background: var(--wc-green);
}
.wc-tools-card > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}
.wc-tools-card > div > button {
  min-height: 76px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 15px;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--wc-line);
  border-radius: 12px;
  text-align: start;
  background: rgba(255, 255, 255, .018);
}
.wc-tools-card > div > button:hover {
  border-color: rgba(197, 184, 255, .28);
  background: rgba(197, 184, 255, .045);
}
.wc-tools-card > div > button > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--wc-lilac);
  background: rgba(197, 184, 255, .075);
}
.wc-tools-card > div > button b {
  color: #d6e6ed;
  font-size: 9px;
  line-height: 1.45;
}
.wc-tools-card > div > button > svg {
  color: #638395;
}
.wc-security-note {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(126, 226, 184, .13);
  border-radius: 14px;
  background: rgba(126, 226, 184, .035);
}
.wc-security-note > svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 11px;
  color: var(--wc-green);
  background: rgba(126, 226, 184, .075);
}
.wc-security-note strong,
.wc-security-note span {
  display: block;
}
.wc-security-note strong {
  color: #dff3e9;
  font-size: 10.5px;
}
.wc-security-note span {
  margin-top: 2px;
  color: #86a6b6;
  font-size: 9px;
}

@media (max-width: 980px) {
  .wc-primary-grid {
    grid-template-columns: 1fr;
  }
  .wc-balance-card {
    min-height: 330px;
  }
  .wc-controls-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 800px) {
  .wc-invoice-grid,
  .wc-method-grid {
    grid-template-columns: 1fr;
  }
  .wc-method-grid > article {
    min-height: 190px;
  }
}
@media (max-width: 720px) {
  .modal.wallet-modal {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .modal.wallet-modal .modal-head {
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .modal.wallet-modal .modal-body {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .wallet-center {
    padding: 18px 14px 25px;
  }
  .wc-hero {
    flex-direction: column;
    gap: 12px;
  }
  .wc-account-state {
    width: 100%;
    min-width: 0;
  }
  .wc-auth-banner {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .wc-auth-icon {
    width: 40px;
    height: 40px;
  }
  .wc-auth-banner .wc-secondary-cta {
    width: 100%;
    grid-column: 1 / -1;
  }
  .wc-balance-card {
    min-height: 0;
  }
  .wc-balance-metrics {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }
  .wc-balance-foot,
  .wc-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .wc-empty-label {
    max-width: none;
  }
}
@media (max-width: 620px) {
  .wc-hero h2 {
    font-size: 24px;
  }
  .wc-primary-grid {
    gap: 11px;
  }
  .wc-balance-card,
  .wc-charge-card,
  .wc-tab-panel {
    border-radius: 15px;
  }
  .wc-balance-card > header {
    align-items: flex-start;
    flex-direction: column;
  }
  .wc-balance-card > header strong {
    font-size: 32px;
  }
  .wc-visibility {
    min-height: 44px;
  }
  .wc-quick-amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wc-methods,
  .wc-charge-summary {
    grid-template-columns: 1fr;
  }
  .wc-tabs {
    overflow-x: auto;
    grid-template-columns: repeat(4, minmax(118px, 1fr));
  }
  .wc-tab-panel {
    padding: 14px;
  }
  .wc-filters {
    width: 100%;
  }
  .wc-filters button {
    min-height: 44px;
    flex: 1;
  }
  .wc-table-wrap {
    overflow: visible;
    border: 0;
  }
  .wc-table,
  .wc-table tbody,
  .wc-table tr,
  .wc-table td {
    width: 100%;
    min-width: 0;
    display: block;
  }
  .wc-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .wc-table tbody {
    display: grid;
    gap: 9px;
  }
  .wc-table tr {
    padding: 7px 11px;
    border: 1px solid var(--wc-line);
    border-radius: 13px;
    background: rgba(255, 255, 255, .018);
  }
  .wc-table td,
  .wc-table td:first-child {
    min-height: 39px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--wc-line);
    text-align: end;
  }
  .wc-table td:first-child {
    justify-content: flex-start;
    text-align: start;
  }
  .wc-table td:last-child {
    border-bottom: 0;
  }
  .wc-table td:not(:first-child)::before {
    content: attr(data-label);
    color: #7898a8;
    font-size: 8.5px;
    font-weight: 650;
  }
  .wc-reference {
    direction: ltr;
  }
  .wc-tools-card > div {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 540px) {
  .account-pill.wallet {
    width: 42px;
    min-width: 42px;
    display: inline-flex;
    justify-content: center;
    padding: 0;
  }
  .account-pill.wallet > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wallet-center *,
  .wallet-center *::before,
  .wallet-center *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .wc-secondary-cta:hover,
  .wc-primary-cta:hover,
  .wc-quick-amounts button:hover {
    transform: none;
  }
}
