:root {
  --bg-dark: #0a0f1d;
  --bg-darker: #05080f;
  --card-bg: rgba(20, 26, 40, 0.4); /* Softer */
  --card-border: rgba(255, 255, 255, 0.04); /* Softer borders */
  --card-hover-border: rgba(6, 182, 212, 0.2);
  --text-main: #f8fafc;
  --text-muted: #7f8ea3; /* Softer secondary text */
  --accent-cyan: #00E6FF;
  --accent-cyan-glow: rgba(0, 230, 255, 0.1);
  --accent-green: #10b981;
  --accent-red: #f43f5e;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}



body.hsi-theme {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hsi-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  overflow-x: hidden;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 0; /* More breathing room */
  border-bottom: 1px solid var(--card-border);
}

.section-container:last-child {
  border-bottom: none;
}

/* Visual Pause Section */
.visual-pause {
  padding: 10rem 0;
  text-align: center;
  border-bottom: none;
}
.visual-pause h2 {
  font-size: 3rem;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-main);
  max-width: 800px;
  margin: 0 auto;
}
.visual-pause-sub {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2rem;
}

.hsi-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  background: var(--accent-cyan-glow);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.hsi-heading {
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 2rem;
  letter-spacing: -0.03em;
}

.hsi-subtext {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2rem;
}

/* Base Card */
.hsi-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hsi-card:hover {
  transform: translateY(-2px);
  border-color: var(--card-hover-border);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-cyan-glow);
}

.hsi-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.hsi-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hsi-icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent-cyan);
  opacity: 0.8;
}

/* Minimal Elements (To reduce rectangles) */
.minimal-node {
  padding: 1rem;
  text-align: center;
}
.minimal-node-title {
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-main);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.minimal-node-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.borderless-card {
  padding: 1.5rem 0;
}
.borderless-card .hsi-icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}
.borderless-card .hsi-card-title {
  font-size: 1.125rem;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 992px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* CTA Button */
.hsi-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-cyan);
  color: #000;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.hsi-cta:hover {
  background: transparent;
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

/* Diagrams & Connections */
.diagram-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.diagram-connector {
  width: 2px;
  height: 20px;
  background: var(--card-border);
  margin: 0 auto;
  position: relative;
}

.diagram-connector::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: -4px;
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: var(--card-border) transparent transparent transparent;
}

/* Flows Section */
.flow-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.flow-step {
  flex: 1;
  min-width: 140px;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--text-main);
  position: relative;
  border-bottom: 1px dashed var(--card-border);
}

.flow-arrow {
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
  font-size: 1.2rem;
}

.flow-red .flow-step { border-bottom-color: rgba(244, 63, 94, 0.3); }
.flow-red .flow-step:last-child { color: var(--accent-red); border-bottom-style: solid; }

.flow-green .flow-step { border-bottom-color: rgba(16, 185, 129, 0.3); }
.flow-green .flow-step:last-child { color: var(--accent-green); border-bottom-style: solid; }

/* Raya Layer */
.raya-layer-container {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  justify-content: center;
}

.raya-layer-box {
  flex: 1;
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
}

.raya-center {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.05);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
  position: relative;
  z-index: 2;
}

.raya-line {
  display: flex;
  align-items: center;
  color: var(--accent-cyan);
  opacity: 0.5;
}

@media (max-width: 992px) {
  .raya-layer-container {
    flex-direction: column;
  }
  .raya-line {
    justify-content: center;
    transform: rotate(90deg);
    margin: 1rem 0;
  }
}

.raya-list {
  list-style: none;
  margin-top: 1rem;
}

.raya-list li {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
}

.raya-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* Dashboard Mockup */
.dash-wrapper {
  background: #05080f;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1rem;
}

.dash-title {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

.score-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid var(--card-border);
  border-top-color: var(--accent-cyan);
  border-right-color: var(--accent-cyan);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
}

.score-circle::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px dashed rgba(6, 182, 212, 0.3);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

.score-val {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-main);
}

.score-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
}

.metric-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.metric-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  padding: 1rem;
  border-radius: 8px;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.metric-val {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.rec-list {
  margin-top: 2rem;
  background: rgba(6, 182, 212, 0.05);
  border-left: 2px solid var(--accent-cyan);
  padding: 1rem;
  border-radius: 0 8px 8px 0;
}

.rec-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--accent-cyan);
}

.rec-item {
  font-size: 0.875rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-family: var(--font-mono); /* Institutional feel */
}

.rec-item::before {
  content: '>';
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

/* Live Dashboard Utilities */
.blink-active {
  animation: pulse-op 2s infinite;
}
@keyframes pulse-op {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.timestamp {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.node-active::after {
  content: ' [NODE ACTIVE]';
  font-size: 0.65rem;
  color: var(--accent-cyan);
  animation: pulse-op 2s infinite;
}

/* Mobile & Tablet Adjustments */
@media (max-width: 768px) {
  .section-container {
    padding: 4rem 0;
  }
  .hsi-heading {
    font-size: 2rem;
  }
  .visual-pause {
    padding: 5rem 0;
  }
  .visual-pause h2 {
    font-size: 2rem;
  }
  .metric-cards {
    grid-template-columns: 1fr;
  }
}

/* --- Navbar Alignment Override --- */
#navbar-placeholder .max-w-6xl {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

