/* SPDX-License-Identifier: Apache-2.0
 * (c) 2026 Lutar, Stephen P. - SZL Holdings - ORCID 0009-0001-0110-4173
 */
:root {
  color-scheme: dark;
  --ink: #080b12;
  --panel: #101721;
  --panel-2: #151e2a;
  --line: #334253;
  --muted: #a5b1c2;
  --paper: #ecf3f6;
  --acid: #a1f2d6;
  --cyan: #91e9ff;
  --amber: #ffd09a;
  --rose: #ff9bc9;
  --violet: #bea9ff;
  --magenta: #ee79d0;
  --radius: 18px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 85% 2%, rgba(121, 111, 221, .095), transparent 38rem),
    linear-gradient(rgba(255, 255, 255, .014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .014) 1px, transparent 1px),
    var(--ink);
  background-size: auto, 40px 40px, 40px 40px, auto;
  font-family: var(--sans);
  line-height: 1.5;
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 100;
  padding: .65rem .9rem;
  color: var(--ink);
  background: var(--acid);
  transform: translateY(-180%);
  transition: transform .15s ease;
}

.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
  padding: .75rem clamp(1rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 18, .92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  width: fit-content;
  color: var(--paper);
  font-weight: 750;
  letter-spacing: .01em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--cyan);
  border-radius: 10px;
  color: var(--cyan);
  font: 700 .7rem var(--mono);
}

.mode-lock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  color: var(--muted);
  font: 650 .75rem var(--mono);
  letter-spacing: .09em;
}

.mode-lock strong { color: var(--acid); }

.pulse {
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 .3rem rgba(161, 242, 214, .16);
}

.quiet-button {
  min-height: 42px;
  padding: .6rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  background: transparent;
  font: 650 .75rem var(--mono);
  cursor: pointer;
}

.quiet-button:hover { border-color: var(--cyan); color: var(--cyan); }
.quiet-button:disabled { opacity: .55; cursor: progress; }

main { max-width: 1280px; margin: 0 auto; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: stretch;
  min-height: 710px;
  padding: clamp(5rem, 9vw, 8rem) clamp(1.4rem, 5vw, 4.5rem) 5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 44% 52% at 85% 36%, rgba(115, 99, 229, .13), transparent 80%),
    linear-gradient(180deg, transparent 74%, var(--ink));
}

.hero-copy-block {
  position: relative;
  z-index: 2;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  min-width: 0;
}

.kicker,
.eyebrow {
  margin: 0 0 .8rem;
  color: var(--acid);
  font: 700 .72rem var(--mono);
  letter-spacing: .13em;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3.3rem, 7vw, 6.9rem);
  font-weight: 680;
  letter-spacing: -.072em;
  line-height: .91;
}

h1 em {
  color: var(--paper);
  -webkit-text-stroke: 0;
  font-style: normal;
}

.hero-copy {
  max-width: 57ch;
  margin: 2.2rem 0 0;
  color: #c8d2dc;
  font-size: clamp(1rem, 1.45vw, 1.16rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1.5rem;
  margin-top: 2.2rem;
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  min-height: 50px;
  font: 700 .82rem var(--mono);
  text-decoration: none;
}

.hero-primary {
  padding: .85rem 1.05rem;
  border: 1px solid var(--paper);
  border-radius: 6px;
  color: var(--ink);
  background: var(--paper);
}

.hero-primary:hover { background: #cff2f4; border-color: #cff2f4; }
.hero-secondary { color: var(--paper); text-underline-offset: 5px; }
.hero-secondary:hover { color: var(--cyan); }
.hero-qualification {
  margin: 1rem 0 0;
  color: var(--muted);
  font: 600 .65rem/1.6 var(--mono);
  letter-spacing: .035em;
}
.hero-qualification span { padding: 0 .3rem; color: var(--cyan); }

.hero-aperture {
  position: relative;
  z-index: 0;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  height: 470px;
  min-width: 0;
  pointer-events: none;
}

.hero-aperture svg {
  position: absolute;
  top: -105px;
  left: -19%;
  display: block;
  width: 132%;
  min-width: 550px;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 22px 65px rgba(114, 100, 236, .26));
}

.aperture-caption {
  position: absolute;
  left: 30%;
  top: 208px;
  width: 220px;
  color: #e4f1f8;
  font: 600 .65rem/1.55 var(--mono);
  letter-spacing: .08em;
  text-align: left;
}

.aperture-caption span { color: var(--cyan); padding-inline: .28rem; }

.hero .identity-card {
  position: relative;
  z-index: 2;
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  justify-self: end;
  width: min(100%, 390px);
  margin-top: 285px;
}

.identity-card {
  margin: 0;
  padding: 1.2rem;
  border: 1px solid rgba(145, 233, 255, .42);
  border-radius: var(--radius);
  background: rgba(16, 23, 33, .87);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .36), 0 0 60px rgba(122, 114, 248, .08);
}

.identity-card div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 1rem;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
}

.identity-card div:last-child { border-bottom: 0; }
.identity-card dt { color: var(--muted); font-size: .82rem; }
.identity-card dd { margin: 0; overflow-wrap: anywhere; font: 650 .76rem var(--mono); text-align: right; }

.status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  width: fit-content;
  padding: .28rem .55rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font: 750 .75rem var(--mono);
  letter-spacing: .04em;
}

.status::before {
  content: "";
  width: .4rem;
  height: .4rem;
  border-radius: 50%;
  background: currentColor;
}

.status[data-state="OBSERVED"] { color: var(--acid); }
.status[data-state="MODELED"] { color: var(--violet); }
.status[data-state="PENDING"],
.status[data-state="STALE"] { color: var(--amber); }
.status[data-state="FAILED_CLOSED"],
.status[data-state="BLOCKED"] { color: var(--rose); }
.status[data-state="UNAVAILABLE"],
.status[data-state="DISABLED"],
.status[data-state="UNKNOWN"] { color: var(--muted); }

.metric-band {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.metric-band article {
  min-height: 150px;
  padding: 1.25rem;
  border-right: 1px solid var(--line);
}

.metric-band article:last-child { border-right: 0; }
.metric-band span, .metric-band small { display: block; color: var(--muted); font-size: .72rem; }
.metric-band strong { display: block; margin: .5rem 0 .2rem; color: var(--paper); font: 650 clamp(2rem, 4vw, 3.7rem) var(--mono); letter-spacing: -.08em; }

.workspace {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 3rem);
  padding: clamp(1.2rem, 3vw, 3rem) clamp(1rem, 4vw, 4.5rem) 5rem;
}

.rail {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: .2rem;
}

.rail a {
  padding: .65rem .8rem;
  border-left: 2px solid transparent;
  color: var(--muted);
  font: 650 .78rem var(--mono);
  text-decoration: none;
}

.rail a:hover, .rail a.active { border-left-color: var(--acid); color: var(--paper); background: rgba(201, 183, 135, .055); }

.canvas { min-width: 0; }

.panel {
  margin: 0 0 1.25rem;
  padding: clamp(1.2rem, 2.5vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(17, 24, 32, .93), rgba(9, 13, 18, .93));
  scroll-margin-top: 96px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}

h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.55rem); letter-spacing: -.045em; }
h3 { margin: .4rem 0 .6rem; font-size: 1.1rem; }
.as-of, .legend { color: var(--muted); font: .75rem var(--mono); text-align: right; }
.legend i { display: inline-block; width: .48rem; height: .48rem; margin: 0 .3rem 0 .8rem; border-radius: 50%; background: var(--muted); }
.legend i[data-state="OBSERVED"] { background: var(--acid); }

.command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.state-card {
  min-height: 230px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(5, 7, 10, .42);
}

.state-card p { min-height: 6.5em; color: var(--muted); font-size: .83rem; }
.card-index { color: var(--cyan); font: .7rem var(--mono); }

.table-wrap { overflow-x: auto; }
.table-wrap:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th, td { padding: .9rem .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font: 650 .68rem var(--mono); letter-spacing: .07em; text-transform: uppercase; }
td:nth-child(1), td:nth-child(2), td:nth-child(4), td:nth-child(5) { font-family: var(--mono); }
td:last-child { color: var(--muted); font-size: .72rem; }

.proof-graph {
  display: grid;
  grid-template-columns: repeat(7, minmax(80px, 1fr));
  align-items: center;
  gap: .6rem;
}

.graph-node {
  min-height: 132px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ink);
}

.graph-node span { display: block; margin-bottom: .7rem; color: var(--muted); font-size: .7rem; }
.graph-node strong { overflow-wrap: anywhere; font: .73rem var(--mono); }
.graph-node.observed { border-color: rgba(95, 179, 163, .65); }
.graph-node.reported { border-color: rgba(201, 183, 135, .7); }
.graph-node.unavailable { border-color: #596473; }
.graph-node.blocked { border-color: rgba(255, 114, 114, .7); }
.edge { position: relative; min-height: 44px; border-top: 1px dashed var(--muted); }
.edge span { position: absolute; top: .35rem; left: 50%; width: 100%; color: var(--muted); font: .68rem var(--mono); text-align: center; transform: translateX(-50%); }
.edge.blocked { border-color: var(--rose); }

.boundary-note {
  margin: 1.4rem 0 0;
  padding: .85rem 1rem;
  border-left: 3px solid var(--amber);
  color: #c9d0d8;
  background: rgba(255, 196, 94, .05);
  font: .74rem var(--mono);
  overflow-wrap: anywhere;
}

.split-panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 2.5rem; }
.split-panel p:not(.eyebrow) { max-width: 68ch; color: var(--muted); }
.budget-list { margin: 0; }
.budget-list div { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.budget-list dt { color: var(--muted); }
.budget-list dd { margin: 0; font: 700 .72rem var(--mono); }

.atelier-panel { background: linear-gradient(135deg, rgba(21, 13, 31, .9), rgba(9, 13, 18, .93)); }
.atelier-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.atelier-flow li { display: flex; gap: .8rem; min-height: 170px; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
.atelier-flow > li > span { color: var(--violet); font: .72rem var(--mono); }
.atelier-flow strong { display: block; font-size: .9rem; }
.atelier-flow p { color: var(--muted); font-size: .78rem; }

.text-link { color: var(--cyan); font: .75rem var(--mono); }
.proof-list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.proof-list li { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(190px, 1.6fr) minmax(130px, .8fr) auto; gap: 1rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 10px; font: .75rem var(--mono); }
.proof-list code { color: var(--cyan); overflow-wrap: anywhere; }

.truth-footer {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, .7fr);
  gap: 2rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #070a0e;
  font: .72rem var(--mono);
}

.truth-footer p { margin: 0; }
.truth-footer strong { color: var(--paper); }
#view-status { color: var(--acid); text-align: right; }

.noscript {
  margin: 1rem;
  padding: 1rem;
  border: 1px solid var(--amber);
  color: var(--paper);
  background: var(--panel);
}

@media (max-width: 1180px) {
  .metric-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-band article:nth-child(3) { border-right: 0; }
  .metric-band article:nth-child(-n + 3) { border-bottom: 1px solid var(--line); }
  .command-grid, .atelier-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-graph { grid-template-columns: 1fr; }
  .edge { min-height: 44px; width: 1px; margin: 0 auto; border-top: 0; border-left: 1px dashed var(--muted); }
  .edge span { top: 50%; left: 1rem; width: max-content; transform: translateY(-50%); }
}

@media (max-width: 980px) {
  .proof-list li { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .topbar { grid-template-columns: 1fr auto; }
  .mode-lock { grid-column: 1 / -1; grid-row: 2; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 0; padding-top: 4rem; }
  .hero-copy-block { grid-column: 1; grid-row: 1; }
  .hero-aperture { grid-column: 1; grid-row: 2; height: 360px; margin-top: 2.2rem; }
  .hero-aperture svg { top: -90px; left: 50%; width: min(115%, 650px); min-width: 0; transform: translateX(-50%); }
  .aperture-caption { top: 302px; left: auto; right: 0; width: auto; text-align: right; }
  .hero .identity-card { grid-column: 1; grid-row: 3; justify-self: stretch; width: 100%; max-width: 580px; margin-top: 1.5rem; }
  h1 { font-size: clamp(3.4rem, 11vw, 5.6rem); }
  .workspace { grid-template-columns: 1fr; }
  .rail { position: static; display: flex; overflow-x: auto; padding-bottom: .5rem; }
  .rail a { flex: 0 0 auto; border-left: 0; border-bottom: 2px solid transparent; }
  .rail a:hover, .rail a.active { border-left-color: transparent; border-bottom-color: var(--acid); }
  .split-panel, .truth-footer { grid-template-columns: 1fr; }
  #view-status { text-align: left; }
  .proof-list li { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { padding-inline: .8rem; }
  .brand span:last-child { display: none; }
  .quiet-button { padding-inline: .7rem; }
  .hero { padding: 3.7rem 1.25rem 3.6rem; }
  h1 { font-size: clamp(3.2rem, 12vw, 4.5rem); }
  .hero-copy { margin-top: 1.65rem; }
  .hero-actions { align-items: stretch; gap: .55rem; margin-top: 1.7rem; }
  .hero-actions a { width: 100%; min-height: 48px; }
  .hero-secondary { justify-content: flex-start !important; }
  .hero-aperture { height: 278px; margin-top: 1.5rem; }
  .hero-aperture svg { top: -42px; width: 114%; }
  .aperture-caption { top: 238px; right: 0; font-size: .57rem; }
  .hero .identity-card { margin-top: 1rem; }
  .metric-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-band article:nth-child(2n) { border-right: 0; }
  .metric-band article:nth-child(3) { border-right: 1px solid var(--line); }
  .metric-band article:nth-child(-n + 4) { border-bottom: 1px solid var(--line); }
  .command-grid, .atelier-flow { grid-template-columns: 1fr; }
  .state-card, .atelier-flow li { min-height: auto; }
  .panel-head { display: grid; }
  .as-of, .legend { text-align: left; }
  .identity-card div { grid-template-columns: 1fr; gap: .25rem; padding: .65rem 0; }
  .identity-card dd { text-align: left; }
}

@media (max-width: 360px) {
  .hero { padding-top: 2.8rem; }
  h1 { font-size: 2.9rem; }
  .hero-copy { margin-top: 1.3rem; }
}

@media (forced-colors: active) {
  .hero-aperture { display: none; }
  .hero-primary { color: ButtonText; background: ButtonFace; border-color: ButtonText; }
  h1 em {
    color: CanvasText;
    -webkit-text-stroke: 0;
  }

  .status,
  .graph-node,
  .panel,
  .state-card {
    forced-color-adjust: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
