/* NADIR page visuals — interactive subpage modules */

.pv-shell {
  --pv-accent: #ff6534;
  --pv-accent-soft: rgba(255, 101, 52, 0.14);
  --pv-line: rgba(255, 255, 255, 0.1);
  --pv-muted: #8a877d;
  --pv-text: #eceae4;
  --pv-mono: "JetBrains Mono", ui-monospace, monospace;
  margin-top: 28px;
}

.pv-console {
  border: 1px solid var(--pv-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 101, 52, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 55%),
    #0c0d0b;
  overflow: hidden;
}

.pv-console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--pv-line);
  font-family: var(--pv-mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pv-muted);
}

.pv-console-top b {
  color: #ffc478;
  font-weight: 600;
}

.pv-console-body {
  position: relative;
  min-height: 320px;
  padding: 18px;
}

.pv-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #080807;
}

.pv-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 14px;
  font-family: var(--pv-mono);
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pv-muted);
}

.pv-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pv-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pv-accent);
}

.pv-legend .nominal i { background: #5fd38d; }
.pv-legend .caution i { background: #ffc478; }
.pv-legend .critical i { background: #ff6534; }

.pv-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.pv-metric {
  padding: 12px 14px;
  border: 1px solid var(--pv-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.pv-metric small {
  display: block;
  color: var(--pv-muted);
  font-family: var(--pv-mono);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pv-metric strong {
  display: block;
  margin-top: 6px;
  font-family: var(--display, "Manrope", sans-serif);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.pv-metric span {
  display: block;
  margin-top: 4px;
  color: var(--pv-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.pv-caption {
  margin: 14px 0 0;
  color: var(--pv-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

/* Audience split panels */

.audience-panel {
  margin-top: 24px;
}

.audience-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--pv-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.audience-tabs button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: transparent;
  color: var(--pv-muted);
  font-family: var(--pv-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.audience-tabs button.active {
  background: var(--pv-accent-soft);
  color: var(--pv-text);
}

.audience-copy {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid var(--pv-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.audience-copy[hidden] {
  display: none !important;
}

.audience-copy h3 {
  margin: 0 0 12px;
  font-family: var(--display, "Manrope", sans-serif);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.audience-copy p {
  margin: 0 0 12px;
  color: #b8b4aa;
  line-height: 1.75;
  font-size: 0.92rem;
}

.audience-copy ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.audience-copy li {
  position: relative;
  padding: 8px 0 8px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--pv-text);
  font-size: 0.88rem;
  line-height: 1.6;
}

.audience-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pv-accent);
}

.audience-specs {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audience-specs div {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.audience-specs dt {
  color: var(--pv-muted);
  font-family: var(--pv-mono);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audience-specs dd {
  margin: 6px 0 0;
  color: var(--pv-text);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* FAQ blocks */

.page-faq {
  margin-top: 8px;
}

.page-faq-item {
  border: 1px solid var(--pv-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.page-faq-item + .page-faq-item {
  margin-top: 10px;
}

.page-faq-item button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  color: var(--pv-text);
  font-family: var(--display, "Manrope", sans-serif);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}

.page-faq-item button i {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--pv-line);
  border-radius: 50%;
  position: relative;
}

.page-faq-item button i::before,
.page-faq-item button i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--pv-muted);
  transform: translate(-50%, -50%);
}

.page-faq-item button i::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 0.2s;
}

.page-faq-item button[aria-expanded="true"] i::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.page-faq-answer {
  padding: 0 20px 18px;
  color: #b8b4aa;
  font-size: 0.9rem;
  line-height: 1.7;
}

.page-faq-answer[hidden] {
  display: none !important;
}

/* Pipeline step rail (SVG companion) */

.pv-pipeline-rail {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.pv-pipeline-step {
  padding: 12px 10px;
  border: 1px solid var(--pv-line);
  border-radius: 12px;
  text-align: center;
  transition: border-color 0.25s, background 0.25s;
}

.pv-pipeline-step.active {
  border-color: rgba(255, 101, 52, 0.45);
  background: var(--pv-accent-soft);
}

.pv-pipeline-step small {
  display: block;
  color: var(--pv-muted);
  font-family: var(--pv-mono);
  font-size: 0.48rem;
  letter-spacing: 0.08em;
}

.pv-pipeline-step strong {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  line-height: 1.35;
}

@media (max-width: 960px) {
  .pv-metrics,
  .pv-pipeline-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audience-specs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .pv-metrics,
  .pv-pipeline-rail {
    grid-template-columns: 1fr;
  }
}

/* Deep documentation chapters */

.doc-chapter-shell {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.doc-subsection {
  border: 1px solid var(--pv-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.doc-subsection-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: var(--pv-text);
  text-align: left;
  cursor: pointer;
}

.doc-subsection-index {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--pv-line);
  font-family: var(--pv-mono);
  font-size: 0.55rem;
  color: var(--pv-muted);
}

.doc-subsection-head {
  flex: 1;
  min-width: 0;
}

.doc-subsection-head strong {
  display: block;
  font-family: var(--display, "Manrope", sans-serif);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.doc-subsection-head small {
  display: block;
  margin-top: 4px;
  color: var(--pv-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.doc-subsection-toggle i {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--pv-line);
  border-radius: 50%;
  position: relative;
}

.doc-subsection-toggle i::before,
.doc-subsection-toggle i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--pv-muted);
  transform: translate(-50%, -50%);
}

.doc-subsection-toggle i::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 0.2s;
}

.doc-subsection-toggle[aria-expanded="true"] i::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.doc-subsection-body {
  padding: 0 18px 18px 66px;
  color: #b8b4aa;
  font-size: 0.9rem;
  line-height: 1.75;
}

.doc-subsection-body[hidden] {
  display: none !important;
}

.doc-subsection-body p {
  margin: 0 0 12px;
}

.doc-bullet-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.doc-bullet-list li {
  position: relative;
  padding: 6px 0 6px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.doc-bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pv-accent);
}

.doc-inline-specs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.doc-inline-specs div {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.doc-inline-specs dt {
  color: var(--pv-muted);
  font-family: var(--pv-mono);
  font-size: 0.48rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-inline-specs dd {
  margin: 5px 0 0;
  color: var(--pv-text);
  font-size: 0.82rem;
}

.doc-code-panel {
  margin-top: 14px;
}

.doc-callout {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--pv-accent);
  background: var(--pv-accent-soft);
  border-radius: 0 10px 10px 0;
  color: #d8d4cb !important;
  font-size: 0.84rem !important;
}

.doc-section-lead {
  margin-bottom: 16px;
}

.doc-section-lead h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.doc-section-lead p {
  margin: 0;
  color: var(--pv-muted);
  line-height: 1.6;
}

/* Code gallery */

.code-gallery {
  display: grid;
  gap: 18px;
  margin-top: 8px;
}

.code-gallery-item {
  border: 1px solid var(--pv-line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.code-gallery-meta {
  padding: 16px 18px;
  border-bottom: 1px solid var(--pv-line);
}

.code-gallery-meta strong {
  display: block;
  font-size: 1rem;
}

.code-gallery-meta p {
  margin: 6px 0 0;
  color: var(--pv-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.code-gallery-item .code-panel {
  border: 0;
  border-radius: 0;
}

/* Spec matrix */

.spec-matrix-wrap {
  margin-top: 8px;
  overflow-x: auto;
  border: 1px solid var(--pv-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.spec-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.spec-matrix th,
.spec-matrix td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

.spec-matrix th {
  color: var(--pv-muted);
  font-family: var(--pv-mono);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.25);
}

.spec-matrix td code {
  font-family: var(--pv-mono);
  font-size: 0.72rem;
  color: #ffc478;
}

.spec-matrix-note {
  color: var(--pv-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

/* Glossary */

.glossary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.glossary-term {
  padding: 18px;
  border: 1px solid var(--pv-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.glossary-term h4 {
  margin: 0 0 8px;
  font-family: var(--pv-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffc478;
}

.glossary-term p {
  margin: 0;
  color: #b8b4aa;
  font-size: 0.88rem;
  line-height: 1.65;
}

.glossary-term small {
  display: block;
  margin-top: 10px;
  color: var(--pv-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .doc-inline-specs,
  .glossary-grid {
    grid-template-columns: 1fr;
  }

  .doc-subsection-body {
    padding-left: 18px;
  }
}
