:root {
  --bg-primary: #0a0e17;
  --bg-surface: #111827;
  --bg-card: #162032;
  --bg-card-hover: #1c2a42;
  --border-subtle: #24344d;
  --border-focus: #3b82f6;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  --accent-blue: #38bdf8;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.standards-header {
  background-color: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  font-size: 1.5rem;
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text strong {
  color: var(--accent-blue);
}

.brand-badge {
  background-color: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  text-transform: uppercase;
}

.standards-nav {
  display: flex;
  gap: 0.75rem;
}

.nav-btn {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-btn:hover, .active-btn {
  color: #fff;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

/* Container */
.standards-container {
  max-width: 1000px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

/* Breadcrumbs */
.breadcrumb-trail {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-bottom: 1.5rem;
}

.breadcrumb-trail a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb-trail a:hover {
  color: var(--accent-blue);
}

.crumb-current {
  color: var(--text-main);
  font-weight: 600;
}

/* Spec Card */
.spec-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-header-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.icon-avatar {
  font-size: 3rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.spec-kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-blue);
  font-weight: 700;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.25rem;
}

.spec-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Quick Answer Box */
.quick-answer-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(30, 58, 138, 0.12) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-left: 4px solid var(--accent-blue);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.quick-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
}

.quick-text {
  font-size: 1.05rem;
  color: #fff;
  font-weight: 500;
  line-height: 1.6;
}

/* Bento Grid */
.specs-grid-section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #fff;
}

.specs-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.bento-tile {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tile-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.tile-value {
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 700;
}

/* Field Notes */
.field-notes-box {
  background-color: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 2.5rem;
}

.notes-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-gold);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.notes-body {
  font-size: 0.95rem;
  color: #e5e7eb;
}

/* CTA Banner */
.resource-cta-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.cta-content h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.cta-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cta-action-btn {
  background-color: var(--accent-blue);
  color: #030712;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.cta-action-btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

/* Related Row */
.related-section h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.related-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.related-mini-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.related-mini-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.mini-icon {
  font-size: 1.5rem;
}

.mini-category {
  font-size: 0.75rem;
  color: var(--text-subtle);
  display: block;
}

/* Matrix Index Styles */
.matrix-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background-color: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  display: inline-block;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

.sponsor-banner {
  background-color: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sponsor-tag {
  background-color: var(--accent-gold);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.sponsor-banner a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.matrix-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.matrix-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-icon {
  font-size: 1.75rem;
}

.card-cat {
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-weight: 600;
  text-transform: uppercase;
}

.card-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.card-stats {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.stat-row strong {
  color: var(--text-main);
}

.card-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.view-spec {
  color: var(--accent-blue);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Footer */
.standards-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 1.5rem;
  margin-top: 5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-subtle);
}

/* Niche Pod Hero Image Banner */
.hero-image-banner {
  margin: 1.75rem 0 2.5rem 0;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  position: relative;
  background: var(--bg-card);
}

.niche-hero-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.hero-image-banner:hover .niche-hero-img {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .card-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .resource-cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .niche-hero-img {
    height: 220px;
  }
}

/* Smooth Scrolling & Anchor Offset */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

.highlight-tool-btn {
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
}

.highlight-tool-btn:hover {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: #38bdf8 !important;
}

/* INTERACTIVE TOOL DOCK */
.interactive-tool-dock {
  background: var(--bg-surface);
  border: 1px solid var(--border-focus);
  border-radius: 16px;
  padding: 2.25rem;
  margin: 3.5rem 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(59, 130, 246, 0.1);
  position: relative;
  overflow: hidden;
}

.interactive-tool-dock::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.tool-header-row {
  margin-bottom: 2rem;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.tool-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.tool-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 800px;
}

.tool-body-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.25rem;
  align-items: stretch;
}

.tool-inputs-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.input-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-field-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
}

.field-val-display {
  font-family: var(--font-mono);
  color: var(--accent-blue);
  font-weight: 700;
}

.tool-input-control {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-main);
  padding: 0.65rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  width: 100%;
}

.tool-input-control:focus {
  outline: none;
  border-color: var(--border-focus);
}

.tool-slider-control {
  width: 100%;
  accent-color: #38bdf8;
  cursor: pointer;
}

.tool-output-col {
  background: #0d1527;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.output-top-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.output-big-metric {
  font-family: var(--font-mono);
  font-size: 2.75rem;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1.1;
  margin: 0.75rem 0;
}

.output-status-pill {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.status-safe {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.output-advisory-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}

/* PROTOCOLS SECTION */
.protocols-section {
  margin: 4.5rem 0 2.5rem 0;
}

.section-head-row {
  margin-bottom: 1.75rem;
}

.protocols-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.protocol-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.protocol-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.proto-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
}

.proto-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.proto-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.proto-steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
}

.proto-step-item {
  font-size: 0.82rem;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.proto-step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-blue);
  font-weight: 700;
}

@media (max-width: 860px) {
  .tool-body-grid {
    grid-template-columns: 1fr;
  }
}


