/* ==========================================================================
   ReSarAs — Setu Light Workspace · Saarathi Guidance · Shakti Appraisal
   "Connect findings. Keep the sources in view."
   ========================================================================== */

:root {
  /* Setu Light Limestone Sidebar Rail & Accents (HSL-Calibrated) */
  --ar-rail: hsl(39, 29%, 91%);
  --ar-rail-elevated: hsl(40, 50%, 98%);
  --ar-rail-hover: hsl(38, 26%, 86%);
  --ar-rail-border: hsl(39, 24%, 81%);
  --ar-brass: hsl(24, 61%, 37%);
  --ar-brass-bright: hsl(24, 58%, 46%);
  --ar-brass-deep: hsl(23, 65%, 30%);
  --ar-brass-soft: hsla(24, 61%, 37%, 0.12);

  /* Default Working Canvas — Setu Warm Archival Limestone */
  --rs-bg: hsl(39, 33%, 94%);
  --rs-surface: hsl(40, 50%, 98%);
  --rs-surface-alt: hsl(39, 36%, 92%);
  --rs-surface-subtle: hsl(38, 30%, 87%);
  --rs-input-bg: #ffffff;
  --rs-border: hsl(39, 24%, 82%);
  --rs-border-strong: hsl(39, 21%, 71%);
  --rs-ink: hsl(197, 23%, 12%);
  --rs-ink-secondary: hsl(197, 18%, 23%);
  --rs-muted: hsl(197, 11%, 38%);
  --rs-subtle: hsl(197, 9%, 47%);

  /* Action & Semantic Accents (River Teal + Setu Burnished Copper) */
  --rs-primary: hsl(184, 57%, 25%);
  --rs-primary-hover: hsl(184, 60%, 19%);
  --rs-primary-ink: #ffffff;
  --rs-primary-soft: hsl(180, 29%, 92%);
  --rs-accent: hsl(184, 57%, 30%);
  --rs-copper: hsl(24, 61%, 37%);
  --rs-copper-hover: hsl(23, 65%, 30%);
  --rs-copper-soft: hsl(23, 68%, 94%);
  --rs-brass-ink: hsl(24, 60%, 31%);
  --rs-brass-surface: hsl(27, 67%, 94%);
  --rs-brass-border: hsl(25, 46%, 76%);
  --rs-success: hsl(152, 60%, 26%);
  --rs-success-bg: hsl(146, 44%, 93%);
  --rs-warn: hsl(29, 74%, 33%);
  --rs-warn-bg: hsl(36, 93%, 94%);
  --rs-danger: hsl(0, 58%, 39%);
  --rs-danger-bg: hsl(0, 79%, 95%);

  /* Organic Multi-Stop Elevation, Specular Bevels & One UI Concentric Squircles */
  --rs-radius-lg: 22px;
  --rs-radius: 15px;
  --rs-radius-sm: 11px;
  --rs-bevel-top: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  --rs-shadow-xs: 0 1px 2px rgba(24, 34, 38, 0.04), var(--rs-bevel-top);
  --rs-shadow:
    0 1px 2px rgba(24, 34, 38, 0.03),
    0 8px 22px -5px rgba(24, 34, 38, 0.065),
    0 20px 40px -14px rgba(24, 34, 38, 0.05),
    var(--rs-bevel-top);
  --rs-shadow-hover:
    0 2px 6px rgba(24, 34, 38, 0.05),
    0 16px 34px -7px rgba(24, 34, 38, 0.095),
    0 28px 54px -14px rgba(24, 34, 38, 0.08),
    var(--rs-bevel-top);
  --rs-focus-ring: 0 0 0 3px rgba(27, 94, 99, 0.22);
  --rs-ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-serif: "Newsreader", "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --sidebar-w: 262px;
}

/* ==========================================================================
   CALM RIVER MIST MODE (OCULAR RELIEF SAGE-EUCALYPTUS CLINICAL SANCTUARY)
   ========================================================================== */
body.mist-sanctuary-mode {
  --ar-rail: hsl(175, 22%, 89.5%);
  --ar-rail-elevated: hsl(172, 33%, 98%);
  --ar-rail-hover: hsl(175, 20%, 85.5%);
  --ar-rail-border: hsl(174, 19%, 78%);
  --rs-bg: hsl(174, 24%, 93%);
  --rs-surface: hsl(172, 35%, 98.2%);
  --rs-surface-alt: hsl(174, 25%, 90.5%);
  --rs-surface-subtle: hsl(174, 21%, 86.5%);
  --rs-border: hsl(174, 20%, 80%);
  --rs-border-strong: hsl(174, 18%, 68%);
  --rs-primary: hsl(183, 60%, 24%);
  --rs-primary-hover: hsl(183, 64%, 18%);
  --rs-primary-soft: hsl(178, 35%, 89%);
}

/* ==========================================================================
   SAARATHI NIGHT MODE (MIDNIGHT INDIGO, IVORY & RESTRAINED BRASS)
   ========================================================================== */
body.night-canopy-mode {
  --ar-rail: hsl(211, 45%, 9%);
  --ar-rail-elevated: hsl(211, 42%, 14%);
  --ar-rail-hover: hsl(211, 40%, 18%);
  --ar-rail-border: rgba(245, 241, 232, 0.12);
  --ar-brass: hsl(36, 46%, 56%);
  --ar-brass-bright: hsl(38, 56%, 71%);

  --rs-bg: hsl(211, 42%, 11%);
  --rs-surface: hsl(211, 40%, 14%);
  --rs-surface-alt: hsl(211, 39%, 17%);
  --rs-surface-subtle: hsl(211, 43%, 12%);
  --rs-input-bg: hsl(211, 45%, 9%);
  --rs-border: rgba(245, 241, 232, 0.13);
  --rs-border-strong: rgba(196, 154, 91, 0.36);
  --rs-ink: hsl(39, 36%, 94%);
  --rs-ink-secondary: hsl(210, 20%, 86%);
  --rs-muted: hsl(210, 18%, 66%);
  --rs-subtle: hsl(209, 15%, 54%);

  --rs-primary: hsl(183, 49%, 43%);
  --rs-primary-hover: hsl(183, 44%, 50%);
  --rs-primary-ink: #ffffff;
  --rs-primary-soft: rgba(56, 156, 162, 0.18);
  --rs-accent: hsl(183, 50%, 59%);
  --rs-copper: hsl(36, 46%, 56%);
  --rs-copper-hover: hsl(36, 54%, 63%);
  --rs-copper-soft: rgba(196, 154, 91, 0.2);
  --rs-brass-ink: hsl(38, 70%, 80%);
  --rs-brass-surface: rgba(196, 154, 91, 0.14);
  --rs-brass-border: rgba(196, 154, 91, 0.42);
  --rs-success: hsl(149, 72%, 67%);
  --rs-success-bg: rgba(27, 107, 69, 0.25);
  --rs-warn: hsl(38, 88%, 72%);
  --rs-warn-bg: rgba(180, 110, 30, 0.22);
  --rs-danger: hsl(0, 93%, 82%);
  --rs-danger-bg: rgba(158, 42, 43, 0.25);

  --rs-bevel-top: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --rs-shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.35), var(--rs-bevel-top);
  --rs-shadow:
    0 2px 6px rgba(4, 9, 15, 0.36),
    0 12px 30px -6px rgba(4, 9, 15, 0.52),
    var(--rs-bevel-top);
  --rs-shadow-hover:
    0 4px 10px rgba(4, 9, 15, 0.44),
    0 20px 42px -8px rgba(4, 9, 15, 0.68),
    var(--rs-bevel-top);
  --rs-focus-ring: 0 0 0 3px rgba(99, 197, 203, 0.28);
  color-scheme: dark;
}

/* ==========================================================================
   BASE RESET, TACTILE ARCHIVAL VELLUM GRAIN & OPTICAL TYPOGRAPHY
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--rs-bg);
  color-scheme: light;
}

body {
  position: relative;
  margin: 0;
  font: 15px/1.58 var(--font-sans);
  color: var(--rs-ink);
  background-color: var(--rs-bg);
  background-image:
    radial-gradient(ellipse 92% 56% at 16% -8%, rgba(255, 252, 245, 0.82), transparent 64%),
    radial-gradient(ellipse 72% 50% at 88% 6%, rgba(27, 94, 99, 0.045), transparent 58%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.26s var(--rs-ease), color 0.26s var(--rs-ease);
}

body.mist-sanctuary-mode {
  background-image:
    radial-gradient(ellipse 95% 58% at 18% -10%, rgba(244, 252, 250, 0.88), transparent 65%),
    radial-gradient(ellipse 75% 52% at 86% 8%, rgba(25, 102, 106, 0.075), transparent 60%);
}

body.night-canopy-mode {
  background-image:
    radial-gradient(ellipse 85% 50% at 20% -10%, rgba(56, 156, 162, 0.11), transparent 62%),
    radial-gradient(ellipse 65% 45% at 88% 4%, rgba(196, 154, 91, 0.07), transparent 56%);
}

/* Tactile Archival Paper / Vellum Micro-Grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.night-canopy-mode::before {
  opacity: 0.028;
}

h1, h2, h3, h4 {
  color: var(--rs-ink);
  margin: 0;
}

h1, h2 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: var(--rs-primary);
  text-decoration-color: rgba(27, 94, 99, 0.35);
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
body.night-canopy-mode a {
  color: var(--ar-brass-bright);
  text-decoration-color: rgba(223, 192, 137, 0.4);
}
a:hover {
  color: var(--rs-primary-hover);
}

code, pre, .mono {
  font-family: var(--font-mono);
}

table, .pf-num, .meu-kpi-card strong, .price-num, .pt-live-cap-readout, .viva-timer-pill {
  font-variant-numeric: tabular-nums;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100, 114, 120, 0.32); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 114, 120, 0.52); }

/* ==========================================================================
   APP SHELL: SETU LIGHT LIMESTONE WORKSPACE RAIL + MAIN STAGE
   ========================================================================== */
.rs-app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

aside.rs-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--ar-rail);
  color: var(--rs-ink);
  border-right: 1px solid var(--ar-rail-border);
  padding: 20px 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 95;
}

/* Stationary 26px Single-Colour Brand Mark + Canonical ReSarAs Wordmark */
.rs-brand-box {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 10px 14px;
  border-bottom: 1px solid var(--ar-rail-border);
  text-decoration: none;
  color: var(--rs-ink) !important;
}
.rs-brand-box svg.rs-logo-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--rs-ink);
  transition: transform 0.24s var(--rs-ease);
}
.rs-brand-box:hover svg.rs-logo-mark {
  transform: translateY(-1px);
}
body.night-canopy-mode .rs-brand-box svg.rs-logo-mark {
  color: #c49a5b;
}
.rs-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}
.rs-brand-wordmark {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-transform: none !important;
  font-variant: normal !important;
  font-style: normal;
  color: var(--rs-ink);
}
.rs-brand-exact {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.04em;
  letter-spacing: -0.015em;
  text-transform: none !important;
  font-variant: normal !important;
  font-style: normal;
}
.rs-brand-sub {
  font-size: 0.71rem;
  color: var(--rs-muted);
  letter-spacing: 0.01em;
  margin-top: 2px;
}

.rs-rail-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--rs-copper);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 100%), var(--rs-copper);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.87rem;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 4px 14px rgba(154, 83, 37, 0.22);
  transition: transform 0.15s var(--rs-ease), background-color 0.15s var(--rs-ease), box-shadow 0.15s var(--rs-ease);
}
.rs-rail-cta:active {
  transform: scale(0.985);
}
body.night-canopy-mode .rs-rail-cta {
  color: #101b27 !important;
  font-weight: 700;
}
.rs-rail-cta:hover {
  background: var(--rs-copper-hover);
  border-color: var(--rs-copper-hover);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 7px 18px rgba(154, 83, 37, 0.30);
}

.rs-nav-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--rs-muted);
  padding: 4px 10px 2px;
}

.rs-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rs-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 41px;
  padding: 8px 12px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--rs-ink-secondary);
  font: 500 0.875rem/1.3 var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.rs-nav-btn:hover {
  background: var(--ar-rail-hover);
  color: var(--rs-ink);
}
.rs-nav-btn.active {
  background: var(--rs-surface);
  border-color: var(--rs-border-strong);
  color: var(--rs-primary);
  font-weight: 600;
  box-shadow: var(--rs-shadow-xs);
}
body.night-canopy-mode .rs-nav-btn.active {
  background: rgba(196, 154, 91, 0.16);
  border-color: rgba(196, 154, 91, 0.38);
  color: #f5e6cb;
}
.rs-nav-btn-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.rs-nav-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.86;
}
.rs-nav-btn.active svg {
  color: var(--rs-primary);
  opacity: 1;
}
body.night-canopy-mode .rs-nav-btn.active svg {
  color: var(--ar-brass-bright);
}
.rs-nav-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(24, 34, 38, 0.07);
  color: var(--rs-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
body.night-canopy-mode .rs-nav-badge {
  background: rgba(245, 241, 232, 0.1);
  color: #cbd5e1;
}
.rs-nav-btn.active .rs-nav-badge {
  background: var(--rs-primary-soft);
  color: var(--rs-primary);
}
body.night-canopy-mode .rs-nav-btn.active .rs-nav-badge {
  background: rgba(196, 154, 91, 0.26);
  color: #f8e9cd;
}

.rs-rail-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--ar-rail-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rs-privacy-pill {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--rs-surface);
  border: 1px solid var(--ar-rail-border);
  box-shadow: var(--rs-shadow-xs);
  font-size: 0.73rem;
  line-height: 1.4;
  color: var(--rs-muted);
}
.rs-privacy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1b6b45;
  margin-top: 4px;
  flex-shrink: 0;
}
body.night-canopy-mode .rs-privacy-dot {
  background: #6ee7a8;
}
.rs-seal-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 12px;
  background: var(--rs-surface);
  border: 1px solid var(--ar-rail-border);
  box-shadow: var(--rs-shadow-xs);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rs-ink-secondary) !important;
  transition: border-color 0.16s var(--rs-ease), transform 0.14s var(--rs-ease), background-color 0.16s var(--rs-ease);
}
.rs-seal-pill:hover {
  border-color: var(--rs-primary);
  background: var(--rs-primary-soft);
  color: var(--rs-primary) !important;
  transform: translateY(-1px);
}
body.night-canopy-mode .rs-seal-pill:hover {
  border-color: var(--ar-brass);
  background: rgba(196, 154, 91, 0.16);
  color: var(--ar-brass-bright) !important;
}
.rs-seal-pill-code {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--rs-primary-soft);
  color: var(--rs-primary);
}
body.night-canopy-mode .rs-seal-pill-code {
  background: rgba(56, 156, 162, 0.22);
  color: #99f6e4;
}

/* ==========================================================================
   MAIN COLUMN & STICKY CONTEXT COMMAND BAR
   ========================================================================== */
.rs-main-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header.app-command-bar {
  position: sticky;
  top: 0;
  z-index: 85;
  background: rgba(246, 242, 234, 0.88);
  backdrop-filter: blur(18px) saturate(155%);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
  border-bottom: 1px solid var(--rs-border);
  padding: 10px 28px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
body.mist-sanctuary-mode header.app-command-bar {
  background: rgba(233, 241, 239, 0.88);
}
body.night-canopy-mode header.app-command-bar {
  background: rgba(16, 27, 39, 0.90);
}
header.app-command-bar.is-scrolled {
  box-shadow: var(--rs-shadow-xs);
}

.cmd-bar-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Mobile inline ReSarAs header mark (hidden when desktop sidebar is visible) */
.mobile-top-brand {
  display: none;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: -0.015em;
  text-transform: none !important;
  font-variant: normal !important;
  font-style: normal;
  color: var(--rs-ink);
  text-decoration: none;
  padding-right: 10px;
  border-right: 1px solid var(--rs-border);
}
.mobile-top-brand svg.rs-logo-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--rs-ink);
}
body.night-canopy-mode .mobile-top-brand svg.rs-logo-mark {
  color: #c49a5b;
}

.ws-context-crumb {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--rs-ink);
  letter-spacing: -0.01em;
}

.v-pill {
  display: inline-flex;
  align-items: center;
  background: var(--rs-primary-soft);
  color: var(--rs-primary);
  border: 1px solid rgba(27, 94, 99, 0.24);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
body.night-canopy-mode .v-pill {
  color: #99f6e4;
  border-color: rgba(99, 197, 203, 0.35);
}

.setu-promise-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
  color: var(--rs-muted);
}

.univ-active-pill {
  display: inline-flex;
  align-items: center;
  background: var(--rs-surface);
  color: var(--rs-ink-secondary);
  border: 1px solid var(--rs-border);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.76rem;
  font-weight: 600;
}

.cmd-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Samsung One UI + Calm Segmented Sanctuary Mood Switch */
.sanctuary-mood-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border-strong);
  box-shadow: var(--rs-bevel-top);
}
.mood-seg-btn {
  min-height: 28px !important;
  padding: 4px 11px !important;
  border-radius: 999px !important;
  border: none !important;
  background: transparent !important;
  color: var(--rs-muted) !important;
  font: 600 0.75rem/1 var(--font-sans) !important;
  box-shadow: none !important;
  transition: background-color 0.16s var(--rs-ease), color 0.16s var(--rs-ease), box-shadow 0.16s var(--rs-ease);
}
.mood-seg-btn:hover {
  color: var(--rs-ink) !important;
}
.mood-seg-btn.active {
  background: var(--rs-surface) !important;
  color: var(--rs-primary) !important;
  box-shadow: 0 1px 4px rgba(24, 34, 38, 0.12) !important;
}
body.night-canopy-mode .mood-seg-btn.active {
  background: rgba(196, 154, 91, 0.24) !important;
  color: #f8e9cd !important;
}
@media (max-width: 780px) {
  .sanctuary-mood-switch {
    display: none;
  }
}

.nf-profile-chip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--rs-primary);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

/* ==========================================================================
   MAIN WORKSPACE STAGE & PROGRESSIVE PANEL SWITCHING
   ========================================================================== */
main {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 28px 84px;
  flex: 1;
}

/* Progressive Workspace Panel Visibility:
   Only active workspace displays unless body.ws-show-all is enabled */
body:not(.ws-show-all) .ws-panel {
  display: none;
}
body:not(.ws-show-all) .ws-panel.is-active {
  display: block;
  animation: wsFadeIn 0.18s ease-out;
}
body.ws-show-all .ws-panel {
  display: block;
  margin-bottom: 28px;
}

@keyframes wsFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   UNIFIED BUTTON & FORM CONTROL SYSTEM (FITTS'S LAW >= 40px)
   ========================================================================== */
button,
.btn-primary,
.btn-ghost,
.nf-btn-play,
.nf-btn-info,
.neer-btn-primary,
.neer-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--rs-radius-sm);
  font: 600 0.875rem/1.25 var(--font-sans);
  cursor: pointer;
  border: 1px solid var(--rs-primary);
  background: var(--rs-primary);
  color: var(--rs-primary-ink);
  text-decoration: none;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.12s ease, box-shadow 0.14s ease;
}

button:hover:not(:disabled),
.nf-btn-play:hover:not(:disabled),
.neer-btn-primary:hover:not(:disabled) {
  background: var(--rs-primary-hover);
  border-color: var(--rs-primary-hover);
}

button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

/* High-Value Primary Action (Warm Setu Copper Capsule in Light, Muted Brass in Night) */
.nf-btn-play {
  border-radius: 999px;
  padding: 9px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 100%), var(--rs-copper);
  border-color: var(--rs-copper);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 4px 14px rgba(154, 83, 37, 0.22);
}
.nf-btn-play:active:not(:disabled) {
  transform: scale(0.985);
}
body.night-canopy-mode .nf-btn-play {
  color: #101b27 !important;
  font-weight: 700;
}
.nf-btn-play:hover:not(:disabled) {
  background: var(--rs-copper-hover);
  border-color: var(--rs-copper-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 20px rgba(154, 83, 37, 0.30);
}
body.night-canopy-mode .nf-btn-play:hover:not(:disabled) {
  color: #101b27 !important;
}

/* Clean Secondary / Ghost Action */
.btn-ghost,
.nf-btn-info,
.neer-btn-secondary,
.theme-toggle-btn,
.promote-btn {
  background: var(--rs-surface);
  color: var(--rs-ink);
  border: 1px solid var(--rs-border-strong);
  box-shadow: var(--rs-shadow-xs);
}
.nf-btn-info,
.theme-toggle-btn,
#cmd-palette-btn {
  border-radius: 999px;
}
.btn-ghost:hover:not(:disabled),
.nf-btn-info:hover:not(:disabled),
.neer-btn-secondary:hover:not(:disabled),
.theme-toggle-btn:hover:not(:disabled),
.promote-btn:hover:not(:disabled) {
  background: var(--rs-surface-subtle);
  border-color: var(--rs-primary);
  color: var(--rs-primary);
}
body.night-canopy-mode .btn-ghost:hover:not(:disabled),
body.night-canopy-mode .theme-toggle-btn:hover:not(:disabled) {
  color: var(--ar-brass-bright);
  border-color: var(--ar-brass);
}

#cmd-palette-btn {
  background: var(--rs-surface);
  border-color: var(--rs-border-strong);
  color: var(--rs-ink-secondary);
  font-size: 0.82rem;
  padding: 6px 13px;
  min-height: 36px;
}
.cmd-kbd-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--rs-surface-subtle);
  border: 1px solid var(--rs-border);
  color: var(--rs-muted);
}

.theme-toggle-btn {
  min-height: 36px;
  padding: 6px 13px;
  font-size: 0.82rem;
}

.btn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

label {
  display: block;
  font-size: 0.855rem;
  font-weight: 600;
  color: var(--rs-ink-secondary);
  margin-bottom: 10px;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 41px;
  margin-top: 5px;
  padding: 8px 12px;
  border-radius: var(--rs-radius-sm);
  border: 1px solid var(--rs-border-strong);
  background: var(--rs-input-bg);
  color: var(--rs-ink);
  font: 400 0.92rem/1.45 var(--font-sans);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
textarea {
  min-height: 92px;
  resize: vertical;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: none;
  border-color: var(--rs-primary);
  box-shadow: var(--rs-focus-ring);
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--rs-primary);
  vertical-align: -3px;
  margin-right: 6px;
}

/* ==========================================================================
   WORKSPACE 01 · DISCOVER LAUNCHPAD (SETU RIVER HERO + SAARATHI GUIDANCE)
   ========================================================================== */
.aranya-hero-card {
  position: relative;
  border-radius: 26px;
  padding: 38px 40px 32px;
  background-color: #efe9dc;
  background-image:
    linear-gradient(92deg, rgba(246, 242, 234, 0.97) 0%, rgba(246, 242, 234, 0.91) 48%, rgba(246, 242, 234, 0.38) 100%),
    url('/hero-backdrop.jpg');
  background-size: cover;
  background-position: center right;
  color: var(--rs-ink);
  border: 1px solid var(--rs-border);
  box-shadow: var(--rs-shadow);
  margin-bottom: 18px;
}
body.mist-sanctuary-mode .aranya-hero-card {
  background-color: #e4eeec;
  background-image:
    linear-gradient(92deg, rgba(232, 242, 240, 0.98) 0%, rgba(232, 242, 240, 0.92) 50%, rgba(226, 239, 236, 0.56) 100%),
    url('/hero-backdrop.jpg');
}
body.night-canopy-mode .aranya-hero-card {
  background-color: #101b27;
  background-image:
    linear-gradient(92deg, #101b27 0%, rgba(16, 27, 39, 0.92) 50%, rgba(16, 27, 39, 0.56) 100%),
    url('/hero-backdrop.jpg');
  border-color: rgba(196, 154, 91, 0.28);
}

.aranya-hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--rs-primary);
  margin-bottom: 8px;
}
body.night-canopy-mode .aranya-hero-eyebrow {
  color: #c49a5b;
}

.aranya-hero-card h1 {
  color: var(--rs-ink);
  font-size: clamp(1.9rem, 2.9vw, 2.65rem);
  line-height: 1.13;
  max-width: 720px;
  margin-bottom: 10px;
}

.aranya-hero-sub {
  margin: 0 0 20px;
  font-size: 0.97rem;
  line-height: 1.58;
  color: var(--rs-ink-secondary);
  max-width: 720px;
}

/* Clean Ivory Capsule Search Bar with Setu Copper Capsule CTA (One UI + Lemonade) */
#status {
  margin: 0 0 14px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--rs-primary-soft);
  border: 1px solid rgba(27, 94, 99, 0.28);
  color: var(--rs-primary);
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: var(--rs-shadow-xs);
}
#status:empty {
  display: none;
}
body.night-canopy-mode #status {
  color: #99f6e4;
  border-color: rgba(99, 197, 203, 0.35);
}

.aranya-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 790px;
  background: #ffffff;
  border: 1px solid var(--rs-border-strong);
  border-radius: 999px;
  padding: 6px 7px 6px 18px;
  box-shadow: 0 10px 28px rgba(24, 34, 38, 0.085), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transition: border-color 0.18s var(--rs-ease), box-shadow 0.18s var(--rs-ease);
}
.aranya-search-bar:focus-within {
  border-color: var(--rs-primary);
  box-shadow: 0 12px 32px rgba(24, 34, 38, 0.12), 0 0 0 3px rgba(27, 94, 99, 0.18);
}
.aranya-search-bar svg {
  width: 19px;
  height: 19px;
  color: #56656b;
  flex-shrink: 0;
}
.aranya-search-bar input {
  border: none !important;
  background: transparent !important;
  color: #182226 !important;
  margin: 0 !important;
  padding: 7px 6px !important;
  min-height: 36px !important;
  font-size: 0.95rem !important;
  box-shadow: none !important;
  flex: 1;
}
.aranya-search-bar input::placeholder {
  color: #66757c;
}
.aranya-search-submit {
  border-radius: 999px !important;
  background: #9a5325 !important;
  border-color: #9a5325 !important;
  color: #ffffff !important;
  min-height: 40px !important;
  padding: 7px 24px !important;
  font-weight: 600 !important;
  box-shadow: 0 3px 10px rgba(154, 83, 37, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}
.aranya-search-submit:hover {
  background: #7f421b !important;
  border-color: #7f421b !important;
}
.aranya-search-filters {
  border-radius: 999px !important;
  background: #f3ede1 !important;
  border-color: #d6cdbc !important;
  color: #182226 !important;
  min-height: 40px !important;
  padding: 7px 16px !important;
}

.try-pills-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.try-label {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--rs-muted);
}
.try-pill {
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 600;
  background: rgba(252, 250, 246, 0.88);
  border: 1px solid var(--rs-border-strong);
  color: var(--rs-ink-secondary);
}
body.night-canopy-mode .try-pill {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(245, 241, 232, 0.22);
  color: #e6ecf2;
}
.try-pill:hover:not(:disabled) {
  background: var(--rs-primary-soft);
  border-color: var(--rs-primary);
  color: var(--rs-primary);
}
body.night-canopy-mode .try-pill:hover:not(:disabled) {
  background: rgba(196, 154, 91, 0.22);
  border-color: #c49a5b;
  color: #ffffff;
}
.protocol-thesis-box .try-pill {
  background: var(--rs-surface-alt);
  border-color: var(--rs-border-strong);
  color: var(--rs-ink-secondary);
}
.protocol-thesis-box .try-pill:hover:not(:disabled) {
  background: var(--rs-primary-soft);
  border-color: var(--rs-primary);
  color: var(--rs-primary);
}

.nf-hero-cta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rs-border);
}
.aranya-provenance-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--rs-border);
  font-size: 0.78rem;
  color: var(--rs-muted);
  max-width: 780px;
}
.aranya-provenance-strip strong {
  color: var(--rs-ink);
  font-weight: 700;
}
.aranya-hero-card .nf-btn-info {
  background: rgba(252, 250, 246, 0.92);
  border-color: var(--rs-border-strong);
  color: var(--rs-ink);
}
body.night-canopy-mode .aranya-hero-card .nf-btn-info {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(245, 241, 232, 0.24);
  color: #f5f1e8;
}
.aranya-hero-card .nf-btn-info:hover {
  background: var(--rs-primary-soft);
  border-color: var(--rs-primary);
  color: var(--rs-primary);
}
body.night-canopy-mode .aranya-hero-card .nf-btn-info:hover {
  background: rgba(196, 154, 91, 0.2);
  border-color: #c49a5b;
  color: #ffffff;
}

/* Shila 3-Step Guided Research Ribbon (03 · SHILA Reference Board) */
.shila-workflow-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.shila-workflow-step {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  padding: 15px 18px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
  color: var(--rs-ink);
  text-align: left;
  box-shadow: var(--rs-shadow-xs);
}
.shila-workflow-step:hover:not(:disabled) {
  background: var(--rs-surface);
  border-color: var(--rs-primary);
  box-shadow: var(--rs-shadow);
  transform: translateY(-1px);
}
.shila-step-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--rs-brass-surface);
  border: 1px solid var(--rs-brass-border);
  color: var(--rs-brass-ink);
  font-weight: 800;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.shila-step-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.shila-step-body strong {
  font-size: 0.94rem;
  color: var(--rs-ink);
}
.shila-step-body span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--rs-muted);
  line-height: 1.38;
}
.shila-step-arrow {
  color: var(--rs-muted);
  font-size: 1.15rem;
  font-weight: 600;
}

/* Section Surface Cards */
section,
.swimlane-box,
.wizard-box,
.protocol-thesis-box,
.prisma-workbench,
.meu-dashboard-box {
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-lg);
  padding: 24px 26px;
  margin-bottom: 20px;
  box-shadow: var(--rs-shadow);
}

.section-header-row,
.swimlane-head,
.pt-head-row,
.prisma-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.lane-title,
section h2 {
  font-family: var(--font-serif);
  font-size: 1.36rem;
  font-weight: 600;
  color: var(--rs-ink);
  line-height: 1.25;
}

.section-kicker,
.pt-kicker,
.neer-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rs-primary);
  margin-bottom: 4px;
}
body.night-canopy-mode .section-kicker,
body.night-canopy-mode .pt-kicker,
body.night-canopy-mode .neer-kicker {
  color: var(--ar-brass-bright);
}

/* Starting Path Persona Grid */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.persona-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 5px;
  padding: 16px 18px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
  color: var(--rs-ink);
  text-align: left;
  box-shadow: var(--rs-shadow-xs);
}
.persona-card:hover:not(:disabled) {
  background: var(--rs-surface);
  border-color: var(--rs-primary);
  box-shadow: var(--rs-shadow);
  transform: translateY(-1px);
}
.persona-card.active {
  background: var(--rs-primary-soft);
  border-color: var(--rs-primary);
}
.persona-kicker {
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--rs-primary);
}
body.night-canopy-mode .persona-kicker {
  color: var(--ar-brass-bright);
}
.persona-card strong {
  font-size: 0.95rem;
  color: var(--rs-ink);
}
.persona-card .p-desc {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--rs-muted);
  line-height: 1.42;
}

/* Responsive Grids Replacing Hidden Carousels (Zero Carousel Blindness!) */
.lane-paddle {
  display: none !important;
}
.resume-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 12px;
}
.collection-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.univ-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 12px;
}

.resume-card,
.collection-card,
.univ-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.collection-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--rs-border-strong);
}
.collection-card[data-collection="protocol_thesis"] { border-top-color: #9a5325; }
.collection-card[data-collection="anemia_cohort"] { border-top-color: #1b5e63; }
.collection-card[data-collection="compare_rcts"] { border-top-color: #266b52; }
.collection-card[data-collection="year1_ethics"] { border-top-color: #8f6024; }
.collection-card[data-collection="sample_journals"] { border-top-color: #21576c; }
.collection-card[data-collection="diagnostic_stard"] { border-top-color: #3d634a; }
.collection-card .btn-ghost {
  border-radius: 999px;
}
.resume-card:hover,
.collection-card:hover,
.univ-card:hover {
  border-color: var(--rs-primary);
  box-shadow: var(--rs-shadow);
  transform: translateY(-2px);
}
.univ-card.active {
  background: var(--rs-primary-soft);
  border-color: var(--rs-primary);
}

.rc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rc-badge {
  display: inline-block;
  font-size: 0.71rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--rs-brass-surface);
  border: 1px solid var(--rs-brass-border);
  color: var(--rs-brass-ink);
}
.resume-card h4,
.collection-card h4,
.univ-card h4 {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--rs-ink);
}
.collection-card p,
.univ-meta {
  margin: 4px 0 0;
  font-size: 0.83rem;
  color: var(--rs-muted);
  line-height: 1.46;
}
.ring-svg {
  width: 34px;
  height: 34px;
  color: var(--rs-ink);
}
.nf-progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--rs-border);
  overflow: hidden;
}
.nf-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--rs-primary);
}

/* Curated Study Collection Canopy Wash */
.featured-collection-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 22px 24px;
  margin-bottom: 18px;
  border-radius: 20px;
  background: linear-gradient(125deg, #10373c 0%, #1b5e63 54%, #244b42 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 32px -10px rgba(16, 55, 60, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #f7f4ec;
}
.featured-collection-banner .v-pill {
  background: rgba(247, 244, 236, 0.14);
  border-color: rgba(247, 244, 236, 0.28);
  color: #f4dfb4;
}
.featured-collection-banner h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 7px 0 5px;
  color: #f9f6ef;
}
.featured-collection-banner p {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(247, 244, 236, 0.86);
  max-width: 720px;
  line-height: 1.54;
}

#processing-location {
  margin: 0 0 18px;
  padding: 11px 16px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
  color: var(--rs-muted);
  font-size: 0.84rem;
}

/* ==========================================================================
   WORKSPACE 02 · PROTOCOL TO FINAL THESIS STUDIO (₹4,999 CAP)
   ========================================================================== */
.pt-stepper-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
}
.pt-step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--rs-muted);
}
.pt-step-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--ar-rail);
  color: #f4dfb4;
  font-weight: 700;
  font-size: 0.76rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pt-step-item strong {
  display: block;
  color: var(--rs-ink);
  font-size: 0.85rem;
}

.pt-sub {
  margin: 4px 0 0;
  font-size: 0.91rem;
  color: var(--rs-muted);
  max-width: 760px;
  line-height: 1.54;
}
.pt-cap-badge-card {
  background: var(--rs-brass-surface);
  border: 1px solid var(--rs-brass-border);
  border-radius: var(--rs-radius);
  padding: 11px 15px;
  max-width: 340px;
}
.pt-cap-pill {
  display: block;
  font-size: 0.83rem;
  font-weight: 800;
  color: var(--rs-brass-ink);
}
.pt-cap-sub {
  font-size: 0.76rem;
  color: var(--rs-muted);
  margin-top: 3px;
  line-height: 1.4;
}
.pt-sample-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
}
.pt-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.pt-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.pt-live-cap-readout {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--rs-primary);
  background: var(--rs-primary-soft);
  border: 1px solid rgba(21, 94, 96, 0.28);
  border-radius: 999px;
  padding: 5px 14px;
}
body.night-canopy-mode .pt-live-cap-readout {
  color: #8be4e6;
}
.pt-preflight-panel {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rs-border);
}
.pt-summary-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.pt-chip {
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-sm);
  padding: 10px 13px;
}
.pt-chip strong {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rs-muted);
}
.pt-chip span {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: 3px;
  color: var(--rs-ink);
}
.pt-audit-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.pt-card-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}
.pt-item-card {
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-sm);
  padding: 11px 14px;
  font-size: 0.85rem;
  line-height: 1.48;
  color: var(--rs-ink-secondary);
}
.pt-item-card.met {
  background: var(--rs-surface);
  border-color: rgba(27, 107, 69, 0.35);
}
.pt-item-card strong {
  display: block;
  color: var(--rs-ink);
  margin-bottom: 3px;
}

.lit-scope-badge {
  display: inline-block;
  font-size: 0.71rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
  letter-spacing: 0.02em;
}
.lit-scope-badge.indian {
  background: var(--rs-brass-surface);
  color: var(--rs-brass-ink);
  border: 1px solid var(--rs-brass-border);
}
.lit-scope-badge.global {
  background: var(--rs-primary-soft);
  color: var(--rs-primary);
  border: 1px solid rgba(21, 94, 96, 0.28);
}
body.night-canopy-mode .lit-scope-badge.global {
  color: #8be4e6;
}
.lit-scope-badge.guide {
  background: var(--rs-success-bg);
  color: var(--rs-success);
  border: 1px solid rgba(27, 107, 69, 0.32);
}

/* ==========================================================================
   WORKSPACE 03 · NEER EVIDENCE SEARCH & SIDE-BY-SIDE COMPARISON (02 · NEER)
   ========================================================================== */
.neer-sub {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--rs-muted);
}
.neer-search-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 14px 0 12px;
}
.neer-search-row input {
  flex: 1;
  min-width: 240px;
  margin: 0;
}

.neer-filter-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.neer-filter-lbl {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rs-muted);
  margin-right: 4px;
}
.neer-type-chip,
.filter-chip {
  min-height: 32px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  color: var(--rs-ink-secondary);
}
.neer-type-chip.active,
.filter-chip.active {
  background: var(--rs-primary);
  border-color: var(--rs-primary);
  color: #ffffff;
}

.neer-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1020px) {
  .neer-split { grid-template-columns: 1fr; }
}

.neer-results-meta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rs-muted);
  margin-bottom: 10px;
}
.neer-study-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.neer-study-card {
  padding: 14px 16px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.neer-study-card:hover {
  border-color: var(--rs-primary);
  box-shadow: var(--rs-shadow-xs);
}
.neer-study-card.selected {
  background: var(--rs-primary-soft);
  border-color: var(--rs-primary);
}
.neer-study-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.neer-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--rs-surface);
  border: 1px solid var(--rs-border-strong);
  color: var(--rs-primary);
}
body.night-canopy-mode .neer-badge {
  color: #8be4e6;
}
.neer-study-card h4 {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.35;
  margin-bottom: 5px;
}
.neer-study-meta,
.neer-study-finding {
  font-size: 0.83rem;
  color: var(--rs-muted);
  margin: 3px 0;
}
.neer-compare-box {
  position: sticky;
  top: 72px;
  padding: 18px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border-strong);
}
.neer-compare-sub {
  margin: 4px 0 12px;
  font-size: 0.82rem;
  color: var(--rs-muted);
}
.neer-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.neer-compare-table th,
.neer-compare-table td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--rs-border);
  text-align: left;
  vertical-align: top;
}
.neer-compare-table th {
  font-weight: 700;
  color: var(--rs-ink);
  background: var(--rs-surface-subtle);
}

/* ==========================================================================
   WORKSPACE 04 · PRISMA-2020 SYSTEMATIC REVIEW & ACTIVE-LEARNING SCREENER
   ========================================================================== */
.kappa-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--rs-success-bg);
  color: var(--rs-success);
  border: 1px solid rgba(27, 107, 69, 0.3);
}

.prisma-flow-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(105px, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
}
@media (max-width: 860px) {
  .prisma-flow-strip { grid-template-columns: repeat(3, 1fr); }
}
.pflow-chip {
  padding: 11px 12px;
  border-radius: var(--rs-radius-sm);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  text-align: center;
}
.pflow-chip .pf-num {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--rs-ink);
  line-height: 1.15;
}
.pflow-chip .pf-lbl {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--rs-muted);
  margin-top: 2px;
}

.prisma-stage-tabs,
.studio-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 5px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-subtle);
  border: 1px solid var(--rs-border);
  margin-bottom: 16px;
}
.pstage-tab,
.studio-tab {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--rs-muted);
  font-size: 0.84rem;
  font-weight: 600;
}
.pstage-tab:hover:not(:disabled),
.studio-tab:hover:not(:disabled) {
  background: var(--rs-surface);
  color: var(--rs-ink);
  border-color: transparent;
}
.pstage-tab.active,
.studio-tab.active {
  background: var(--rs-surface);
  color: var(--rs-primary);
  border-color: var(--rs-border);
  box-shadow: var(--rs-shadow-xs);
}
body.night-canopy-mode .pstage-tab.active,
body.night-canopy-mode .studio-tab.active {
  color: var(--ar-brass-bright);
}

.hotkey-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 13px;
  margin: 10px 0;
  border-radius: var(--rs-radius-sm);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border-strong);
  font-size: 0.81rem;
  color: var(--rs-ink-secondary);
}
.hotkey-kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.76rem;
  background: var(--rs-surface);
  border: 1px solid var(--rs-border-strong);
  color: var(--rs-ink);
}

/* Zero-Purple Semantic PICO Highlights */
.pico-hl {
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}
.pico-hl.pico-pop { background: #dff5f2; color: #0f5c57; }
.pico-hl.pico-int { background: #e2f5e8; color: #165e36; }
.pico-hl.pico-cmp { background: #eaeef2; color: #2d3e4e; }
.pico-hl.pico-out { background: #fef0d6; color: #854d0e; }
.pico-hl.pico-des { background: #f2ece1; color: #5c4522; }
.pico-hl.pico-warn { background: #fde2e2; color: #991b1b; }

body.night-canopy-mode .pico-hl.pico-pop { background: rgba(45, 212, 191, 0.2); color: #99f6e4; }
body.night-canopy-mode .pico-hl.pico-int { background: rgba(74, 222, 128, 0.2); color: #bbf7d0; }
body.night-canopy-mode .pico-hl.pico-cmp { background: rgba(148, 163, 184, 0.24); color: #e2e8f0; }
body.night-canopy-mode .pico-hl.pico-out { background: rgba(251, 191, 36, 0.22); color: #fde68a; }
body.night-canopy-mode .pico-hl.pico-des { background: rgba(212, 169, 98, 0.24); color: #f5deb3; }
body.night-canopy-mode .pico-hl.pico-warn { background: rgba(248, 113, 113, 0.26); color: #fecaca; }

.al-priority-badge {
  display: inline-block;
  font-size: 0.71rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}
.al-priority-badge.high { background: var(--rs-success-bg); color: var(--rs-success); }
.al-priority-badge.mod { background: var(--rs-primary-soft); color: var(--rs-primary); }
.al-priority-badge.low { background: var(--rs-surface-subtle); color: var(--rs-muted); }

.prisma-screening-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.screening-card {
  padding: 15px 18px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
}
.prisma-fig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.prisma-fig-card {
  padding: 12px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
}
.prisma-fig-card img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #ffffff;
}

/* ==========================================================================
   WORKSPACE 05 · MASTERCHART, 99% BIOSTATISTICS & PLANNING CALCULATORS
   ========================================================================== */
.wizard-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 10px 0 16px;
}
.goal-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  color: var(--rs-muted);
  text-align: left;
  font-weight: 400;
}
.goal-card strong {
  color: var(--rs-ink);
  font-size: 0.94rem;
}
.goal-card.active {
  background: var(--rs-primary-soft);
  border-color: var(--rs-primary);
  color: var(--rs-ink-secondary);
}

.drop-zone {
  padding: 24px 20px;
  margin: 12px 0;
  border-radius: var(--rs-radius);
  border: 1.5px dashed var(--rs-border-strong);
  background: var(--rs-surface-alt);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.drop-zone:hover {
  border-color: var(--rs-primary);
  background: var(--rs-primary-soft);
}

.health-card {
  padding: 14px 16px;
  margin-top: 12px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
}
.health-bar-bg {
  height: 7px;
  border-radius: 999px;
  background: var(--rs-border);
  margin: 8px 0;
  overflow: hidden;
}
.health-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--rs-success);
}
.badge-auto {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--rs-primary-soft);
  color: var(--rs-primary);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin-top: 10px;
}
.preview-table th,
.preview-table td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--rs-border);
  text-align: left;
}
.preview-table th {
  background: var(--rs-surface-subtle);
  color: var(--rs-ink);
  font-weight: 700;
}

details {
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  padding: 11px 15px;
  margin: 10px 0;
}
summary {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--rs-ink);
  cursor: pointer;
}
details[open] > summary {
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--rs-border);
}

.companion-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.companion-pre {
  background: var(--rs-surface-subtle);
  color: var(--rs-ink);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-sm);
  padding: 13px 15px;
  font-size: 0.82rem;
  line-height: 1.52;
  white-space: pre-wrap;
  overflow-x: auto;
  margin-top: 10px;
}

/* ==========================================================================
   WORKSPACE 06 · SHILA MANUSCRIPT READER, VANI SURGEON & VIVA STUDIO
   ========================================================================== */
.stage-tracker {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
@media (max-width: 820px) {
  .stage-tracker { grid-template-columns: repeat(2, 1fr); }
}
.stage-pill {
  padding: 8px 10px;
  border-radius: var(--rs-radius-sm);
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rs-muted);
  text-align: center;
}
.stage-pill.active {
  background: var(--rs-primary-soft);
  border-color: var(--rs-primary);
  color: var(--rs-primary);
}
.stage-pill.done {
  background: var(--rs-success-bg);
  border-color: rgba(27, 107, 69, 0.35);
  color: var(--rs-success);
}

nav#exports {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  margin-bottom: 14px;
}
nav#exports a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 7px;
  background: var(--rs-surface);
  border: 1px solid var(--rs-border-strong);
  color: var(--rs-ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}
nav#exports a:hover {
  border-color: var(--rs-primary);
  color: var(--rs-primary);
}

.guide-review-drawer,
.vani-surgeon-drawer {
  margin: 12px 0 16px;
  padding: 18px 20px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border-strong);
  color: var(--rs-ink);
}
.guide-review-drawer h3,
.vani-surgeon-drawer h3 {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--rs-ink);
  margin-bottom: 4px;
}

.studio-split {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 270px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1120px) {
  .studio-split { grid-template-columns: 1fr; }
}
section#result.calm-reading .studio-rail,
section#result.calm-reading .studio-drawer,
section#result.calm-reading nav#exports {
  display: none;
}
section#result.calm-reading .studio-split {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
}

.studio-rail,
.studio-drawer {
  padding: 14px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  max-height: 760px;
  overflow-y: auto;
}
.studio-rail h4,
.studio-drawer h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rs-muted);
  margin-bottom: 10px;
}
.outline-btn {
  display: block;
  width: 100%;
  text-align: left;
  min-height: 34px;
  padding: 6px 9px;
  margin-bottom: 4px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--rs-ink-secondary);
  font-size: 0.82rem;
  font-weight: 500;
}
.outline-btn:hover {
  background: var(--rs-surface-subtle);
  color: var(--rs-primary);
}
.prov-card {
  padding: 10px 11px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
  font-size: 0.8rem;
}

iframe#reader {
  width: 100%;
  min-height: 760px;
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius);
  background: #ffffff;
}

.viva-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--rs-brass-surface);
  border: 1px solid var(--rs-brass-border);
  font-weight: 800;
  font-size: 0.84rem;
  color: var(--rs-brass-ink);
}
.viva-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.viva-card {
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius);
  padding: 16px 18px;
  background: var(--rs-surface-alt);
}
.viva-station {
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--rs-primary);
}
.viva-q {
  font-family: var(--font-serif);
  font-weight: 600;
  margin: 7px 0;
  font-size: 0.98rem;
  color: var(--rs-ink);
}
.viva-a {
  font-size: 0.87rem;
  color: var(--rs-muted);
  margin: 6px 0 10px;
  line-height: 1.54;
}

.diff-line-add {
  background: var(--rs-success-bg);
  color: var(--rs-success);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin: 2px 0;
  white-space: pre-wrap;
}
.diff-line-rem {
  background: var(--rs-danger-bg);
  color: var(--rs-danger);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin: 2px 0;
  white-space: pre-wrap;
}
.diff-line-ctx {
  color: var(--rs-muted);
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 0.81rem;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}
.saved-job-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0;
  padding: 12px 14px;
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
}

/* ==========================================================================
   WORKSPACE 07 · HOD / MEU COMPLIANCE & 5-STEP PILOT GOVERNANCE
   ========================================================================== */
.meu-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.meu-kpi-card {
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius);
  padding: 14px 16px;
}
.meu-kpi-card strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--rs-ink);
  line-height: 1.15;
}
.meu-kpi-card span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rs-muted);
}

/* Executive 5-Step Clinical AI Checklist (Clean Rounded-Square Checkmarks) */
.exec-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 14px 0 16px;
}
.exec-check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
}
.exec-check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #132019;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 0.78rem;
  font-weight: 800;
}
body.night-canopy-mode .exec-check-box {
  background: var(--ar-brass);
  color: #0d1813;
}
.exec-check-row p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.48;
  color: var(--rs-ink-secondary);
}

.pilot-gate-banner {
  margin: 14px 0;
  padding: 18px 20px;
  border-radius: var(--rs-radius);
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border-strong);
}
.pilot-gate-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pilot-gate-badge.proceed {
  background: var(--rs-success-bg);
  color: var(--rs-success);
  border: 1px solid rgba(27, 107, 69, 0.35);
}
.pilot-gate-badge.revise {
  background: var(--rs-warn-bg);
  color: var(--rs-warn);
  border: 1px solid rgba(148, 83, 22, 0.35);
}
.pilot-gate-badge.reconsider {
  background: var(--rs-danger-bg);
  color: var(--rs-danger);
  border: 1px solid rgba(158, 42, 43, 0.35);
}

.ai-boundary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.ai-boundary-col {
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-sm);
  padding: 14px 16px;
}
.ai-boundary-col h4 {
  font-size: 0.88rem;
  color: var(--rs-ink);
  margin-bottom: 6px;
}
.ai-boundary-col ul {
  margin: 0;
  padding-left: 17px;
  font-size: 0.82rem;
  line-height: 1.48;
  color: var(--rs-muted);
}
.ai-boundary-col li { margin-bottom: 4px; }

/* ==========================================================================
   MODALS, TOASTS, FOOTER & MOBILE THUMB-ZONE BOTTOM NAVIGATION DOCK
   ========================================================================== */
dialog.flagship-modal {
  background: var(--rs-surface);
  color: var(--rs-ink);
  border: 1px solid var(--rs-border-strong);
  border-radius: var(--rs-radius-lg);
  padding: 22px 26px;
  max-width: 680px;
  width: 92vw;
  box-shadow: var(--rs-shadow-hover);
}
dialog.flagship-modal::backdrop {
  background: rgba(11, 20, 16, 0.56);
  backdrop-filter: blur(4px);
}

.toast-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  max-width: 420px;
  background: #182226;
  color: #f6f2ea;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid rgba(246, 242, 234, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  font-size: 0.88rem;
  font-weight: 600;
  transition: opacity 0.25s ease;
}

.skeleton-box {
  height: 54px;
  border-radius: var(--rs-radius-sm);
  background: linear-gradient(90deg, var(--rs-surface-alt) 25%, var(--rs-surface-subtle) 50%, var(--rs-surface-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  margin: 10px 0;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--rs-border);
  color: var(--rs-muted);
  font-size: 0.82rem;
}

/* ==========================================================================
   1. SAARATHI QUESTION GUIDANCE ("What deserves a closer look?")
   ========================================================================== */
.saarathi-guidance-card {
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-lg);
  padding: 22px 26px;
  margin-bottom: 20px;
  box-shadow: var(--rs-shadow);
}
.saarathi-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.saarathi-guidance-card h2 {
  font-family: var(--font-serif);
  font-size: 1.42rem;
  font-weight: 600;
  color: var(--rs-ink);
  margin: 2px 0 4px;
}
.saarathi-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--rs-muted);
}
.saarathi-human-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border-strong);
  color: var(--rs-ink-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}
.saarathi-fields-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.saarathi-fields-grid label {
  margin-bottom: 0;
  font-size: 0.8rem;
}
.saarathi-explore-btn {
  min-height: 41px;
  padding: 8px 20px;
  background: var(--rs-copper) !important;
  border-color: var(--rs-copper) !important;
  color: #ffffff !important;
  font-weight: 600;
  white-space: nowrap;
}
body.night-canopy-mode .saarathi-explore-btn {
  color: #101b27 !important;
  font-weight: 700;
}
.saarathi-explore-btn:hover {
  background: var(--rs-copper-hover) !important;
  border-color: var(--rs-copper-hover) !important;
}

/* ==========================================================================
   2. SETU EVIDENCE MAP & TRACEABLE SYNTHESIS ("Where findings meet—and differ.")
   ========================================================================== */
.setu-evidence-panel {
  background: var(--rs-surface);
  border: 1px solid var(--rs-border-strong);
  border-radius: var(--rs-radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.setu-evidence-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.setu-evidence-head h3 {
  font-family: var(--font-serif);
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--rs-ink);
}
.setu-bridge-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.setu-bridge-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  font-size: 0.82rem;
}
.setu-src-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  background: var(--rs-surface);
  border: 1px solid var(--rs-border-strong);
  color: var(--rs-ink);
}
.setu-bridge-title {
  font-weight: 600;
  color: var(--rs-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.setu-connector-line {
  color: var(--rs-muted);
  font-size: 0.78rem;
  letter-spacing: -0.05em;
}
.setu-rel-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.setu-rel-badge.supports {
  background: var(--rs-primary-soft);
  color: var(--rs-primary);
  border: 1px solid rgba(27, 94, 99, 0.28);
}
body.night-canopy-mode .setu-rel-badge.supports {
  color: #99f6e4;
}
.setu-rel-badge.contradicts {
  background: var(--rs-copper-soft);
  color: var(--rs-copper);
  border: 1px solid rgba(154, 83, 37, 0.3);
}
body.night-canopy-mode .setu-rel-badge.contradicts {
  color: #f3cfa0;
}
.setu-rel-badge.context {
  background: var(--rs-surface);
  color: var(--rs-muted);
  border: 1px solid var(--rs-border-strong);
}

.setu-synthesis-box {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--rs-bg);
  border: 1px solid var(--rs-border);
}
.setu-synthesis-lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--rs-primary);
  margin-bottom: 5px;
}
body.night-canopy-mode .setu-synthesis-lbl {
  color: #dfc089;
}
.setu-synthesis-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.56;
  color: var(--rs-ink-secondary);
}
.setu-source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 1px 7px;
  margin: 0 2px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  background: var(--rs-primary-soft);
  border: 1px solid rgba(27, 94, 99, 0.3);
  color: var(--rs-primary);
  cursor: pointer;
  vertical-align: baseline;
}
.setu-source-chip:hover {
  background: var(--rs-primary);
  color: #ffffff;
}
.neer-study-card.flash-source {
  outline: 2px solid var(--rs-copper);
  outline-offset: 2px;
}
.setu-compare-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border-strong);
}

/* ==========================================================================
   3. SHAKTI CRITICAL APPRAISAL ("Examine the question from every side.")
   ========================================================================== */
.shakti-appraisal-band {
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius);
  padding: 18px 20px;
  margin: 14px 0 18px;
}
.shakti-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rs-border);
}
.shakti-step-node {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rs-muted);
}
.shakti-step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--rs-border-strong);
  background: var(--rs-surface);
  color: var(--rs-muted);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.shakti-step-node.active {
  color: var(--rs-ink);
}
.shakti-step-node.active .shakti-step-dot {
  background: var(--rs-primary);
  border-color: var(--rs-primary);
  color: #ffffff;
}
.shakti-step-node.done .shakti-step-dot {
  background: var(--rs-primary-soft);
  border-color: var(--rs-primary);
  color: var(--rs-primary);
}
.shakti-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.shakti-head-row h3 {
  font-family: var(--font-serif);
  font-size: 1.24rem;
  font-weight: 600;
  color: var(--rs-ink);
}
.shakti-lens-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.shakti-lens-lbl {
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--rs-muted);
  margin-right: 2px;
}
.shakti-lens-pill {
  min-height: 32px;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--rs-surface);
  border: 1px solid var(--rs-border-strong);
  color: var(--rs-ink-secondary);
}
.shakti-lens-pill.active {
  background: var(--rs-copper);
  border-color: var(--rs-copper);
  color: #ffffff;
}
body.night-canopy-mode .shakti-lens-pill.active {
  color: #101b27;
  font-weight: 700;
}
.shakti-diag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.shakti-diag-card {
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-sm);
  padding: 13px 15px;
}
.shakti-diag-card h4 {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--rs-ink);
  margin-bottom: 4px;
}
.shakti-diag-card p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.48;
  color: var(--rs-muted);
}
.shakti-uncertainty-strip {
  padding: 11px 14px;
  border-radius: var(--rs-radius-sm);
  background: var(--rs-surface);
  border: 1px solid var(--rs-border-strong);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--rs-ink-secondary);
}
.shakti-uncertainty-strip strong {
  color: var(--rs-ink);
}

/* Android Native Controls */
.android-native-btn {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.8rem;
  margin: 0 8px 10px 0;
}

/* ==========================================================================
   PERSISTENT "NOW STUDYING" FLOATING CAPSULE BAR
   ========================================================================== */
.rs-now-studying-bar {
  position: sticky;
  bottom: 14px;
  z-index: 78;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 8px 0 22px;
  padding: 11px 16px 11px 18px;
  border-radius: 999px;
  background: rgba(252, 250, 246, 0.90);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--rs-border-strong);
  box-shadow:
    0 12px 32px -8px rgba(24, 34, 38, 0.14),
    0 2px 6px rgba(24, 34, 38, 0.05),
    var(--rs-bevel-top);
}
body.mist-sanctuary-mode .rs-now-studying-bar {
  background: rgba(246, 252, 251, 0.91);
}
body.night-canopy-mode .rs-now-studying-bar {
  background: rgba(16, 27, 39, 0.92);
  border-color: rgba(196, 154, 91, 0.36);
  box-shadow: 0 14px 36px -6px rgba(4, 9, 15, 0.62), var(--rs-bevel-top);
}
.now-studying-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1 1 260px;
}
.now-studying-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rs-primary);
  box-shadow: 0 0 0 4px var(--rs-primary-soft);
  flex-shrink: 0;
}
body.night-canopy-mode .now-studying-pulse {
  background: var(--ar-brass-bright);
  box-shadow: 0 0 0 4px rgba(196, 154, 91, 0.22);
}
.now-studying-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.now-studying-meta strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rs-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.now-studying-meta span {
  font-size: 0.74rem;
  color: var(--rs-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.now-studying-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
}
.stage-dot-btn {
  width: 9px !important;
  min-width: 9px !important;
  height: 9px !important;
  min-height: 9px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 999px !important;
  border: none !important;
  background: var(--rs-border-strong) !important;
  cursor: pointer;
  transition: width 0.22s var(--rs-ease), background-color 0.18s var(--rs-ease) !important;
}
.stage-dot-btn:hover {
  background: var(--rs-primary) !important;
}
.stage-dot-btn.is-passed {
  background: var(--rs-primary) !important;
  opacity: 0.58;
}
.stage-dot-btn.is-active {
  width: 26px !important;
  min-width: 26px !important;
  background: var(--rs-copper) !important;
}
body.night-canopy-mode .stage-dot-btn.is-active {
  background: var(--ar-brass-bright) !important;
}
.now-studying-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.now-capsule-btn {
  min-height: 34px !important;
  padding: 6px 15px !important;
  border-radius: 999px !important;
  font-size: 0.79rem !important;
}

/* Mobile & Android App Bottom Dock (Hidden on Desktop, Floating One UI Capsule on <= 980px) */
nav.rs-mobile-dock {
  display: none;
}

button, a, summary, .rs-dock-btn, .rs-nav-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 980px) {
  .rs-app-shell {
    grid-template-columns: 1fr;
  }
  aside.rs-sidebar {
    display: none;
  }
  .mobile-top-brand {
    display: inline-flex;
  }
  .setu-promise-pill {
    display: none;
  }
  header.app-command-bar {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  }
  main {
    padding: 16px 16px calc(104px + env(safe-area-inset-bottom, 0px));
  }
  .rs-now-studying-bar {
    position: static;
    border-radius: 20px;
    padding: 12px 14px;
  }
  .aranya-hero-card {
    padding: 24px 20px;
    border-radius: 22px;
  }
  .saarathi-fields-grid,
  .shakti-diag-grid,
  .shila-workflow-ribbon,
  .pt-stepper-strip {
    grid-template-columns: 1fr;
  }
  .shakti-stepper {
    grid-template-columns: repeat(2, 1fr);
  }
  nav.rs-mobile-dock {
    position: fixed;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    right: 14px;
    z-index: 98;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    background: rgba(252, 250, 246, 0.88);
    backdrop-filter: blur(22px) saturate(165%);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    border: 1px solid var(--rs-border-strong);
    border-radius: 26px;
    padding: 6px;
    box-shadow: 0 14px 36px -6px rgba(24, 34, 38, 0.18), var(--rs-bevel-top);
  }
  body.mist-sanctuary-mode nav.rs-mobile-dock {
    background: rgba(244, 251, 249, 0.88);
  }
  body.night-canopy-mode nav.rs-mobile-dock {
    background: rgba(13, 23, 34, 0.90);
    border-color: rgba(196, 154, 91, 0.34);
    box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.56), var(--rs-bevel-top);
  }
  .rs-dock-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 50px;
    padding: 5px 4px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: var(--rs-muted);
    font-size: 0.71rem;
    font-weight: 600;
  }
  .rs-dock-btn svg {
    width: 19px;
    height: 19px;
  }
  .rs-dock-btn.active {
    background: var(--rs-primary-soft);
    color: var(--rs-primary);
  }
  body.night-canopy-mode .rs-dock-btn.active {
    background: rgba(196, 154, 91, 0.22);
    color: #f5e6cb;
  }
  .toast-banner {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    right: 14px;
    left: 14px;
    max-width: none;
  }
}

@media (max-width: 560px) {
  #cmd-palette-btn span:first-child,
  #active-univ-badge {
    display: none;
  }
  .aranya-search-bar {
    flex-wrap: wrap;
    border-radius: 20px;
    padding: 8px 10px;
  }
  .aranya-search-bar input {
    min-width: 78%;
    font-size: 16px !important;
  }
  .aranya-search-submit,
  .aranya-search-filters {
    flex: 1;
  }
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px;
  }
}

/* ==========================================================================
   SPOTLIGHT COMMAND PALETTE, DROP-ZONE EMBLEM & ARCHIVAL READER REFINEMENTS
   ========================================================================== */
.drop-zone {
  position: relative;
  padding: 26px 22px;
  border-radius: var(--rs-radius-lg);
  box-shadow: var(--rs-shadow-xs);
  transition: border-color 0.18s var(--rs-ease), background-color 0.18s var(--rs-ease), transform 0.16s var(--rs-ease), box-shadow 0.18s var(--rs-ease);
}
.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--rs-primary);
  background: var(--rs-primary-soft);
  transform: translateY(-1px);
  box-shadow: var(--rs-shadow);
}
.drop-zone-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 11px;
  background: var(--rs-surface);
  border: 1px solid var(--rs-border-strong);
  color: var(--rs-primary);
  box-shadow: var(--rs-shadow-xs);
}
body.night-canopy-mode .drop-zone-emblem {
  color: var(--ar-brass-bright);
}

iframe#reader {
  box-shadow: var(--rs-shadow);
}

.cmd-item {
  width: 100%;
  justify-content: space-between !important;
  text-align: left;
  padding: 9px 12px !important;
  min-height: 42px;
  border-radius: 8px;
  gap: 10px;
}
.cmd-item.is-selected {
  background: var(--rs-primary-soft) !important;
  border-color: var(--rs-primary) !important;
  color: var(--rs-primary) !important;
}
body.night-canopy-mode .cmd-item.is-selected {
  background: rgba(196, 154, 91, 0.18) !important;
  border-color: var(--ar-brass) !important;
  color: var(--ar-brass-bright) !important;
}
.cmd-item-label {
  font-size: 0.86rem;
  font-weight: 600;
  min-width: 0;
}
.cmd-item-cat {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border);
  color: var(--rs-muted);
  flex-shrink: 0;
}
.cmd-empty {
  padding: 18px 14px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--rs-muted);
  background: var(--rs-surface-alt);
  border: 1px dashed var(--rs-border-strong);
  border-radius: 8px;
}
.cmd-foot-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rs-border);
  font-size: 0.75rem;
  color: var(--rs-muted);
}
.cmd-foot-hint kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  padding: 1px 6px;
  margin-right: 3px;
  border-radius: 4px;
  background: var(--rs-surface-alt);
  border: 1px solid var(--rs-border-strong);
  color: var(--rs-ink-secondary);
}

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