: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;
}

* {
  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);
}

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