/* Self-hosted fonts (SIL Open Font License 1.1, see /assets/fonts/*-OFL.txt).
   Served locally so pages make zero third-party requests. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  src: url(/assets/fonts/ibm-plex-sans-latin-wght-normal.woff2) format("woff2-variations"),
       url(/assets/fonts/ibm-plex-sans-latin-wght-normal.woff2) format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/assets/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations"),
       url(/assets/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2");
}

:root {
  /* Surfaces: Dead-flat warm carbon & graphite (zero blue/indigo tint) */
  --bg-canvas: #0d0d0c;
  --bg-panel: #131311;
  --bg-elevated: #191917;
  --bg-code: #090908;

  /* Exposed Hairline Grid Rules */
  --border-hairline: #282825;
  --border-strong: #3d3c38;

  /* Typography: Warm technical paper-white & muted phosphor gray */
  --text-primary: #eae6df;
  --text-secondary: #a6a29a;
  --text-muted: #6e6b64;

  /* Accents: 650nm DVD Laser Red-Orange & Amber Instrumentation */
  --accent-laser: #f04e23;
  --accent-laser-dim: rgba(240, 78, 35, 0.14);
  --accent-amber: #ff9e22;
  --accent-amber-dim: rgba(255, 158, 34, 0.12);
  --status-pass: #38c172;
  --status-pass-dim: rgba(56, 193, 114, 0.12);

  /* Fonts (Self-hosted woff2) */
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'Cascadia Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-laser);
  text-decoration-color: var(--accent-laser);
}

code, pre {
  font-family: var(--font-mono);
}

p code, td code, li code {
  font-size: 12.5px;
  background-color: var(--bg-code);
  border: 1px solid var(--border-hairline);
  padding: 1px 5px;
  color: var(--text-primary);
}

/* 1. Top Telemetry Bar (height: 36px, full-width, 1px solid bottom border) */
.telemetry-bar {
  width: 100%;
  min-height: 36px;
  background-color: var(--bg-code);
  border-bottom: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.telemetry-inner {
  max-width: 1240px;
  min-height: 36px;
  margin: 0 auto;
  border-left: 1px solid var(--border-hairline);
  border-right: 1px solid var(--border-hairline);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;
}

.telemetry-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.telemetry-brand a {
  text-decoration: none;
  color: var(--text-secondary);
}

.telemetry-brand a:hover {
  color: var(--accent-laser);
}

.telemetry-slash {
  color: var(--accent-laser);
}

.telemetry-meta {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}

.telemetry-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-left: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  white-space: nowrap;
}

.telemetry-cell strong,
#navVersion {
  color: var(--text-primary);
  font-weight: 600;
}

.telemetry-cell a {
  color: var(--accent-laser);
  text-decoration: none;
  font-weight: 600;
}

.telemetry-cell a:hover {
  color: var(--accent-amber);
}

/* Contiguous Exposed 1px Technical Grid */
.datasheet-shell {
  max-width: 1240px;
  margin: 0 auto;
  border-left: 1px solid var(--border-hairline);
  border-right: 1px solid var(--border-hairline);
}

.grid-1px {
  display: grid;
  gap: 1px;
  background-color: var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
}

.grid-1px > .cell {
  background-color: var(--bg-panel);
  padding: 24px 28px;
  min-width: 0;
}

.grid-header-split {
  grid-template-columns: 55fr 45fr;
}

.grid-2col {
  grid-template-columns: 1fr 1fr;
}

.grid-4col {
  grid-template-columns: repeat(4, 1fr);
}

/* Section Index Headers (e.g., 01 // HARDWARE MATRIX) */
.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-laser);
  display: block;
  margin-bottom: 10px;
}

.section-header-cell {
  background-color: var(--bg-elevated);
  padding: 16px 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header-cell .section-tag {
  margin-bottom: 0;
}

.section-subnote {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* Split Specification Header */
.spec-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 12px 0;
  color: var(--text-primary);
}

.spec-lead {
  margin: 0 0 20px 0;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Rectangular Hardware Controls & Buttons */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-hardware {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  background-color: var(--accent-laser);
  color: #0d0d0c;
  border: 1px solid var(--accent-laser);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.btn-hardware:hover {
  background-color: var(--accent-amber);
  border-color: var(--accent-amber);
  color: #0d0d0c;
}

.btn-hardware-secondary {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-hardware-secondary:hover {
  background-color: var(--bg-elevated);
  border-color: var(--accent-laser);
  color: var(--accent-laser);
}

/* SHA-256 Digest & Code Signing Verification Block */
.digest-block {
  background-color: var(--bg-code);
  border: 1px solid var(--border-hairline);
}

.digest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.digest-row {
  display: grid;
  grid-template-columns: 210px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.digest-label {
  color: var(--text-secondary);
  white-space: nowrap;
}

.digest-hash,
.digest-row code {
  color: var(--text-primary);
  background: transparent;
  border: none;
  padding: 0;
  font-size: 11px;
  overflow-x: auto;
  white-space: nowrap;
}

.btn-copy {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  background-color: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  cursor: pointer;
}

.btn-copy:hover {
  border-color: var(--accent-laser);
  color: var(--accent-laser);
}

/* Hero: first-run note directly under the download buttons */
.first-run-note {
  margin: 0 0 18px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.first-run-note strong {
  color: var(--accent-amber);
  font-weight: 600;
}

/* Hero: what the app does, as a 2-column hairline grid instead of a paragraph */
.feature-grid {
  list-style: none;
  margin: 0 0 18px 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background-color: var(--border-hairline);
  border: 1px solid var(--border-hairline);
}

.feature-grid > li {
  background-color: var(--bg-elevated);
  padding: 10px 12px;
}

.feature-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-laser);
  margin-bottom: 3px;
}

.feature-text {
  display: block;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.feature-text code {
  font-size: 12px;
  background-color: var(--bg-code);
  border: 1px solid var(--border-hairline);
  padding: 0 4px;
  color: var(--text-primary);
}

/* Plain section headings (no numbered kickers) */
.section-heading {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text-primary);
}

.section-heading-cell {
  margin-bottom: 12px;
}

.section-subnote .badge-warn {
  font-size: 10.5px;
  padding: 0 4px;
}

/* Key/value spec table (technical overview) */
.spec-table-kv td:first-child {
  width: 160px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background-color: var(--bg-elevated);
}

.spec-table-kv td {
  font-size: 13.5px;
}

.signpath-note {
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
  background-color: var(--bg-panel);
}

.signpath-note strong {
  color: var(--accent-amber);
  font-weight: 600;
}

/* Right Cell: Tabbed Interface Preview ([ GUI: ARCHIVE STUDIO ] / [ CLI: IGNISDISC-CLI ]) */
.instrument-frame {
  border: 1px solid var(--border-hairline);
  background-color: var(--bg-code);
  display: flex;
  flex-direction: column;
}

.instrument-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-hairline);
  flex-wrap: wrap;
}

.instrument-tabs {
  display: flex;
}

.instrument-tab {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  background-color: var(--bg-elevated);
  color: var(--text-secondary);
  border: none;
  border-right: 1px solid var(--border-hairline);
  cursor: pointer;
  text-transform: uppercase;
}

.instrument-tab:hover {
  color: var(--text-primary);
}

.instrument-tab.active {
  background-color: var(--bg-code);
  color: var(--accent-laser);
  border-bottom: 2px solid var(--accent-laser);
}

.instrument-status {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.instrument-pane {
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-primary);
  flex: 1;
}

.instrument-pane-flush {
  padding: 0;
  background-color: var(--bg-code);
  display: flex;
  align-items: stretch;
}

.instrument-screenshot {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.instrument-pane[hidden] {
  display: none !important;
}

.gui-readout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background-color: var(--border-hairline);
  border: 1px solid var(--border-hairline);
  margin-bottom: 12px;
}

.gui-readout-cell {
  background-color: var(--bg-panel);
  padding: 8px 10px;
}

.gui-readout-key {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gui-readout-val {
  font-size: 11.5px;
  color: var(--text-primary);
  font-weight: 600;
}

.gui-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-bottom: 10px;
}

.gui-mini-table th {
  text-align: left;
  padding: 5px 8px;
  background-color: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-hairline);
  font-weight: 600;
}

.gui-mini-table td {
  padding: 5px 8px;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
}

.gui-footer-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-hairline);
  font-size: 11px;
  color: var(--text-secondary);
}

.terminal-pre {
  margin: 0;
  white-space: pre;
  overflow-x: auto;
  font-size: 11.5px;
  line-height: 1.52;
  color: var(--text-primary);
}

/* Hardware Support Table */
.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.spec-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background-color: var(--bg-elevated);
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--border-hairline);
}

.spec-table td {
  padding: 9px 14px;
  border: 1px solid var(--border-hairline);
  background-color: var(--bg-panel);
  vertical-align: top;
}

.spec-table-flush {
  border-left: none;
  border-right: none;
}

.spec-table-flush th:first-child,
.spec-table-flush td:first-child {
  border-left: none;
}

.spec-table-flush th:last-child,
.spec-table-flush td:last-child {
  border-right: none;
}

.spec-table-matrix td:nth-child(2),
.spec-table-matrix td:nth-child(3),
.spec-table-matrix th:nth-child(2),
.spec-table-matrix th:nth-child(3) {
  white-space: nowrap;
  width: 112px;
}

.spec-table-matrix td:first-child,
.spec-table-matrix th:first-child {
  width: 240px;
  min-width: 180px;
  color: var(--text-primary);
}

/* Monospace Status Badges (Replaces Emojis) */
.badge-pass, .badge-warn, .badge-na {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  display: inline-block;
  border: 1px solid;
  white-space: nowrap;
}

.badge-pass {
  color: var(--status-pass);
  background: var(--status-pass-dim);
  border-color: rgba(56, 193, 114, 0.35);
}

.badge-warn {
  color: var(--accent-amber);
  background: var(--accent-amber-dim);
  border-color: rgba(255, 158, 34, 0.35);
}

.badge-na {
  color: var(--text-muted);
  background: rgba(110, 107, 100, 0.08);
  border-color: var(--border-hairline);
}

/* Section 02: CLI Automation & JSON Telemetry */
.cli-example-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cli-block {
  border: 1px solid var(--border-hairline);
  background-color: var(--bg-code);
}

.cli-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.cli-block-code {
  margin: 0;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre;
}

/* Section 03: Architecture & Roadmap 4-Cell Spec Strip */
.spec-module-id {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-laser);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  display: block;
}

.spec-module-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: var(--text-primary);
}

.spec-module-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spec-module-list li {
  position: relative;
  padding-left: 14px;
}

.spec-module-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--accent-laser);
  font-family: var(--font-mono);
}

/* Support table "Full notes" link and the per-feature notes on details.html */
.details-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.feature-detail-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
}

.feature-detail-notes {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.grid-1px > .cell:target {
  outline: 1px solid var(--accent-amber);
  outline-offset: -1px;
}

/* Datasheet Footer */
.datasheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 28px;
  background-color: var(--bg-code);
  border-bottom: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-laser);
}

@media (max-width: 1024px) {
  .grid-header-split,
  .grid-2col {
    grid-template-columns: 1fr;
  }
  .grid-4col {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .grid-4col {
    grid-template-columns: 1fr;
  }
  .digest-row {
    grid-template-columns: 1fr auto;
  }
  .digest-hash,
  .digest-row code {
    grid-column: 1 / -1;
    order: 3;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .spec-table-kv td:first-child {
    width: auto;
    white-space: normal;
  }
  .grid-1px > .cell,
  .section-header-cell {
    padding-left: 16px;
    padding-right: 16px;
  }
  .telemetry-cell {
    border-top: 1px solid var(--border-hairline);
  }
}
