/* Aideology Technologies - signal.css
   BEM: block__element--modifier. Mono carries the page texture.
   Dark teal console surface. */

:root {
  --void: #071414;
  --void-raised: #0D1E1E;
  --void-deep: #040D0D;
  --signal: #3FD8A4;
  --alert: #FF7A66;
  --trace: rgba(63, 216, 164, 0.42);
  --rule: rgba(214, 232, 228, 0.12);
  --rule-lit: rgba(214, 232, 228, 0.24);
  --text: #D6E8E4;
  --text-dim: #8FA8A3;
  --text-faint: #5C716D;
  --radius: 6px;
  --radius-lg: 14px;
  --measure: 70ch;
  --pad: clamp(1.25rem, 4vw, 3.25rem);
  --frame: 1280px;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Kode Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.026em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7CEBC4; }

img, svg { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.jump {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--signal);
  color: var(--void-deep);
  padding: 0.7rem 1.1rem;
  font-family: var(--mono);
  font-weight: 700;
  z-index: 200;
}
.jump:focus { left: 0; }

.frame { width: 100%; max-width: var(--frame); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- deck (header) ---------- */

.deck {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 20, 20, 0.88);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.deck__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 72px;
}
.deck__mark { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); flex-shrink: 0; }
.deck__glyph { width: 30px; height: 30px; flex-shrink: 0; }
.deck__word {
  font-family: var(--mono);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.deck__nav ul { display: flex; align-items: center; gap: 1.7rem; list-style: none; margin: 0; padding: 0; }
.deck__link {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.deck__link:hover, .deck__link--on { color: var(--signal); border-bottom-color: var(--signal); }

.deck__toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule-lit);
  border-radius: var(--radius);
  width: 40px; height: 40px; padding: 0;
  cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.deck__rung { display: block; width: 16px; height: 1.5px; background: var(--text); transition: transform 0.2s ease, opacity 0.2s ease; }
.deck__toggle[aria-expanded="true"] .deck__rung:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.deck__toggle[aria-expanded="true"] .deck__rung:nth-child(2) { opacity: 0; }
.deck__toggle[aria-expanded="true"] .deck__rung:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .deck__toggle { display: flex; }
  .deck__nav {
    position: absolute; inset: 72px 0 auto 0;
    background: var(--void-raised);
    border-bottom: 1px solid var(--rule);
    display: none;
    padding: 0.5rem var(--pad) 1.25rem;
  }
  .deck__nav--open { display: block; }
  .deck__nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .deck__link { display: block; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
}

/* ---------- viewport (hero) ---------- */

.viewport { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--rule); }
.viewport__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.viewport__veil {
  position: absolute; inset: 0; z-index: -1;
  /* Measured against the decoded hero, accounting for the crop object-fit:
     cover applies at this hero height. Worst case 4.62:1 for the dimmest text
     colour, which clears AA. The last stop is fully transparent so the lattice
     stays visible on the right. Changing the hero height re-crops the image
     and invalidates the measurement. */
  background:
    linear-gradient(95deg, rgba(4, 13, 13, 0.95) 0%, rgba(4, 13, 13, 0.90) 45%, rgba(4, 13, 13, 0.72) 65%, rgba(4, 13, 13, 0) 100%),
    linear-gradient(to bottom, rgba(4, 13, 13, 0.04), rgba(4, 13, 13, 0.20));
}
/* .viewport__inner sits on the same element as .frame, so a max-width here
   beats .frame's 1280px and centres the hero copy instead of aligning it
   with the header. The measure belongs on a child. */
.viewport__inner { padding-block: clamp(3rem, 6.5vw, 4.5rem); }
.viewport__copy { max-width: 47rem; }
.viewport__title { font-size: clamp(2.15rem, 4.6vw, 3.4rem); margin-bottom: 1.2rem; }
.viewport__line { font-size: clamp(1.03rem, 1.9vw, 1.22rem); color: var(--text-dim); max-width: 41rem; margin-bottom: 2.2rem; }
.viewport__acts { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---------- key (eyebrow) ---------- */

.key {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 1rem;
  font-weight: 700;
}
.key::before { content: ""; width: 18px; height: 1px; background: var(--signal); }

/* ---------- switch (buttons) ---------- */

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.switch--live { background: var(--signal); color: var(--void-deep); }
.switch--live:hover { background: #7CEBC4; color: var(--void-deep); }
.switch--outline { border-color: var(--rule-lit); color: var(--text); }
.switch--outline:hover { border-color: var(--signal); color: var(--signal); }

/* ---------- bay (section) ---------- */

.bay { padding-block: clamp(3.25rem, 7.5vw, 6rem); }
.bay--raised { background: var(--void-raised); border-block: 1px solid var(--rule); }
.bay--deep { background: var(--void-deep); border-block: 1px solid var(--rule); }

.bay__head { max-width: 47rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.bay__title { font-size: clamp(1.75rem, 3.6vw, 2.6rem); margin-bottom: 0.85rem; }
.bay__line { color: var(--text-dim); max-width: var(--measure); }

/* ---------- readout (figure strip) ---------- */

.readout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--void-raised);
}
.readout__cell { padding: 1.5rem 1.4rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.readout__cell:last-child { border-right: 0; }
.readout__figure {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  font-weight: 700;
  color: var(--signal);
  line-height: 1.1;
  margin-bottom: 0.45rem;
  overflow-wrap: anywhere;
}
.readout__label { font-size: 0.85rem; color: var(--text-dim); margin: 0; }

/* ---------- probe (numbered capability) ---------- */

.probe__set { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.probe {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  padding-block: 1.65rem;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
@media (max-width: 820px) {
  .probe { grid-template-columns: 1fr; gap: 0.5rem; }
}
.probe__no { font-family: var(--mono); font-size: 0.82rem; color: var(--text-faint); padding-top: 0.28rem; }
.probe__title { font-size: 1.16rem; font-weight: 800; }
.probe__body { color: var(--text-dim); min-width: 0; }
.probe__body p:last-child { margin-bottom: 0; }

/* ---------- lamp (status dot) ---------- */

.lamp {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.lamp::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.lamp--on { color: var(--signal); }
.lamp--warm { color: var(--alert); }

/* ---------- panel ---------- */

.panel__set { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.panel {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--void-raised);
  padding: 1.55rem 1.5rem;
  min-width: 0;
  box-shadow: 0 1px 0 rgba(63, 216, 164, 0.05) inset;
}
.panel--tight { padding: 1.15rem 1.2rem; }
.panel__title { font-size: 1.1rem; margin-bottom: 0.55rem; }
.panel__body { color: var(--text-dim); font-size: 0.95rem; }
.panel__body p:last-child { margin-bottom: 0; }

/* ---------- split ---------- */

.split { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(2rem, 5vw, 4.25rem); align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }

/* ---------- prose ---------- */

.prose { max-width: var(--measure); }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 2.4rem 0 0.85rem; }
.prose h3 { font-size: 1.12rem; margin: 1.8rem 0 0.55rem; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { color: var(--text-dim); padding-left: 1.15rem; margin: 0 0 1.05em; }
.prose li { margin-bottom: 0.42rem; }
.prose strong { color: var(--text); font-weight: 700; }
.standfirst { font-size: 1.1rem; color: var(--text-dim); }

/* ---------- figure ---------- */

.figure { margin: 2rem 0 0; }
.figure img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--rule); }
.figure__cap { margin-top: 0.8rem; font-family: var(--mono); font-size: 0.76rem; color: var(--text-faint); line-height: 1.6; letter-spacing: 0.02em; max-width: 36rem; }

/* ---------- legal document ---------- */

.folio {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.75rem);
  align-items: start;
  padding-block: clamp(2.5rem, 6vw, 4.25rem);
}
@media (max-width: 980px) { .folio { grid-template-columns: 1fr; } }

.folio__index {
  position: sticky;
  top: 96px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.15rem;
  background: var(--void-raised);
  max-height: calc(100vh - 126px);
  overflow-y: auto;
}
@media (max-width: 980px) { .folio__index { position: static; max-height: none; } }
.folio__index-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.85rem;
  font-weight: 700;
}
.folio__list { list-style: none; margin: 0; padding: 0; counter-reset: fq; }
.folio__list li { counter-increment: fq; }
.folio__link {
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  gap: 0.35rem;
  padding: 0.38rem 0;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.86rem;
  line-height: 1.42;
}
.folio__link::before { content: counter(fq, decimal-leading-zero); font-family: var(--mono); font-size: 0.72rem; color: var(--text-faint); padding-top: 0.15rem; }
.folio__link:hover { color: var(--signal); }

.folio__doc { min-width: 0; }
.folio__head { margin-bottom: 2.4rem; }
.folio__head h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); margin-bottom: 0.95rem; }
.folio__dates {
  display: flex; flex-wrap: wrap; gap: 0.45rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-top: 1.4rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule);
}

.article { margin-bottom: 2.6rem; scroll-margin-top: 96px; }
.article__title {
  display: grid;
  grid-template-columns: 2.9rem 1fr;
  gap: 0.4rem;
  font-size: clamp(1.24rem, 2.4vw, 1.55rem);
  margin-bottom: 0.95rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
}
.article__no { font-family: var(--mono); font-size: 0.85rem; color: var(--signal); padding-top: 0.32rem; }
.article__body { color: var(--text-dim); max-width: var(--measure); }
.article__body h3 { font-size: 1rem; font-weight: 800; color: var(--text); margin: 1.55rem 0 0.5rem; }
.article__body ul, .article__body ol { padding-left: 1.15rem; margin: 0 0 1.05em; }
.article__body li { margin-bottom: 0.46rem; }
.article__body strong { color: var(--text); font-weight: 700; }
.article__body a { overflow-wrap: anywhere; }

.flag {
  border: 1px solid rgba(63, 216, 164, 0.35);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: rgba(63, 216, 164, 0.06);
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
  color: var(--text);
}
.flag p:last-child { margin-bottom: 0; }

.grid-log__scroll {
  overflow-x: auto;
  margin: 1.35rem 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}
.grid-log { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 34rem; }
.grid-log caption {
  text-align: left;
  padding: 0.8rem 0.95rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--rule);
}
.grid-log th, .grid-log td { padding: 0.68rem 0.95rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.grid-log thead th {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 700;
  background: var(--void-deep);
}
.grid-log tbody tr:last-child td { border-bottom: 0; }
.grid-log td { color: var(--text-dim); }

/* ---------- baseboard (footer) ---------- */

.baseboard {
  background: var(--void-deep);
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 6vw, 3.75rem) 1.85rem;
  font-size: 0.9rem;
}
.baseboard__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(140px, 1fr));
  gap: 2.1rem;
  margin-bottom: 2.25rem;
}
@media (max-width: 700px) { .baseboard__grid { grid-template-columns: 1fr 1fr; } }
.baseboard__brand { grid-column: 1 / -1; }
@media (min-width: 701px) { .baseboard__brand { grid-column: auto; } }
.baseboard__mark { display: inline-flex; align-items: center; gap: 0.55rem; margin-bottom: 0.85rem; }
.baseboard__blurb { color: var(--text-faint); max-width: 26rem; }
.baseboard__col-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.8rem;
  font-weight: 700;
}
.baseboard__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.baseboard__col a { color: var(--text-dim); text-decoration: none; }
.baseboard__col a:hover { color: var(--signal); }
.baseboard__legal {
  border-top: 1px solid var(--rule);
  padding-top: 1.6rem;
  color: var(--text-faint);
  font-size: 0.82rem;
  line-height: 1.7;
  display: grid;
  gap: 0.45rem;
}
.baseboard__legal p { margin: 0; }

/* ---------- reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(12px); transition: opacity 0.45s ease, transform 0.45s ease; }
  .rise--shown { opacity: 1; transform: none; }
}

.panel__set--gapped { margin-top: 1.5rem; }
