:root {
  --paper: #f1f0e9;
  --paper-bright: #faf9f4;
  --ink: #111418;
  --muted: #62676d;
  --line: #b8bcc0;
  --line-soft: #d8dad9;
  --cobalt: #165dff;
  --cobalt-dark: #0c43c5;
  --signal: #e4513e;
  --success: #19734e;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace;
  --serif: Georgia, "Times New Roman", serif;
}

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

html {
  background: #bfc1c0;
}

body {
  margin: 0;
  padding: 28px;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(0, 0, 0, 0.025) 80px),
    #bfc1c0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
}

.site-shell {
  max-width: 1120px;
  min-height: calc(100vh - 56px);
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid #777b7e;
  box-shadow: 10px 10px 0 rgba(22, 93, 255, 0.9);
}

a {
  color: var(--cobalt-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:visited {
  color: #443b89;
}

a:hover {
  color: var(--signal);
}

img {
  max-width: 100%;
}

code {
  font-family: var(--mono);
}

/* Site control strip */
.site-header {
  border-bottom: 3px double var(--ink);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 18px 24px;
  background: var(--paper-bright);
}

.site-title {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-title:visited {
  color: var(--ink);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.site-header nav a {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header nav a:hover {
  color: var(--cobalt);
  text-decoration: underline;
}

.header-meta,
.footer-control,
.section-control {
  display: grid;
  grid-template-columns: 1.3fr 1.4fr 0.7fr 0.8fr;
  gap: 1px;
  color: #fff;
  background: var(--cobalt);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-meta span,
.footer-control span,
.section-control > * {
  padding: 8px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.32);
}

.header-meta span:last-child,
.footer-control span:last-child,
.section-control > *:last-child {
  border-right: 0;
}

.status-indicator::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  content: "";
  background: #a9ffcb;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(169, 255, 203, 0.22);
}

/* Shared page structure */
#content {
  padding: 42px 44px 56px;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--cobalt-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.page-header,
.dossier-header {
  position: relative;
  margin-bottom: 34px;
  padding: 28px;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), var(--line-soft) calc(100% - 1px)),
    linear-gradient(transparent 0, transparent calc(100% - 1px), var(--line-soft) calc(100% - 1px)),
    var(--paper-bright);
  background-size: 80px 80px;
  border: 1px solid var(--line);
}

.page-header::before,
.dossier-header::before {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 8px;
  height: calc(100% + 2px);
  content: "";
  background: var(--cobalt);
}

.page-header h1,
.dossier-header h1 {
  max-width: 780px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 7vw, 78px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.page-deck,
.dossier-deck {
  max-width: 670px;
  margin: 18px 0 0;
  color: #353a40;
  font-size: 14px;
}

.page-deck p {
  margin: 0;
}

.page-specs,
.dossier-specs,
.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 30px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.page-specs span,
.dossier-specs span,
.spec-grid span {
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.page-specs b,
.dossier-specs b,
.spec-grid b {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.1em;
}

/* Homepage */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(400px, 1.1fr);
  gap: 42px;
  align-items: start;
  margin-bottom: 52px;
}

.hero-copy {
  padding-top: 22px;
}

.hero-copy h1 {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(62px, 10vw, 112px);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -0.07em;
}

.hero-copy p {
  margin: 0 0 18px;
  font-size: 13px;
}

.page-home .hero-copy > p:first-of-type {
  color: var(--cobalt-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.hero-copy ul {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.hero-copy ul li {
  margin-top: 7px;
}

.hero-copy ul ul {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.hero-copy ul ul a {
  display: inline-block;
  padding: 7px 9px;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
}

.hero-copy ul ul a:hover {
  background: var(--cobalt);
}

.operator-dossier {
  position: relative;
  margin: -10px 0 36px;
  padding: 0 0 24px;
  background:
    linear-gradient(90deg, rgba(22, 93, 255, 0.055), transparent 64px),
    repeating-linear-gradient(0deg, transparent 0, transparent 37px, rgba(29, 35, 42, 0.045) 38px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.operator-dossier::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 8px;
  content: "";
  background: var(--cobalt);
}

.operator-dossier::after {
  position: absolute;
  top: 12px;
  right: 0;
  width: 44px;
  height: 44px;
  content: "";
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.operator-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 14px 24px 12px 34px;
  color: var(--cobalt-dark);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.operator-rail span::before {
  margin-right: 8px;
  color: rgba(17, 24, 32, 0.45);
  content: "//";
}

.operator-profile {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1fr);
  gap: 28px;
  padding: 24px 24px 0 34px;
}

.operator-identity h2 {
  margin: 10px 0 16px;
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.operator-identity p {
  max-width: 420px;
  margin: 0;
  color: #30343a;
  font-size: 13px;
  line-height: 1.65;
}

.operator-meta {
  display: grid;
  gap: 0;
  align-self: start;
  margin: 6px 0 0;
  border-top: 1px solid var(--line);
}

.operator-meta div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.operator-meta div:hover {
  background: rgba(22, 93, 255, 0.035);
}

.operator-meta dt {
  color: #6a7078;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.operator-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}

.operator-contact {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.operator-contact a {
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.operator-contact a:hover {
  color: var(--cobalt);
}

.hero-media {
  margin: 0;
  padding: 14px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 34%),
    var(--cobalt);
}

.media-frame {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  background: #071426;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.media-frame::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 100% 28px, 28px 100%;
  mix-blend-mode: screen;
}

.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.15);
}

.frame-corner {
  position: absolute;
  z-index: 2;
  width: 38px;
  height: 38px;
  pointer-events: none;
}

.frame-corner-tl {
  top: 10px;
  left: 10px;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
}

.frame-corner-br {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

.hero-media .spec-grid {
  margin-top: 12px;
  border-color: rgba(255, 255, 255, 0.45);
}

.hero-media .spec-grid span {
  border-color: rgba(255, 255, 255, 0.45);
}

.hero-media .spec-grid b {
  color: rgba(255, 255, 255, 0.72);
}

/* Universal archive */
.archive-section {
  margin-top: 26px;
}

.page-home .section-control > span:first-child::before {
  margin-right: 9px;
  color: rgba(255, 255, 255, 0.52);
  content: "//";
}

.section-control {
  grid-template-columns: 1fr auto;
  background: var(--ink);
}

.section-control a {
  color: #fff;
}

.record-table {
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.record-row {
  display: grid;
  grid-template-columns: 110px 120px minmax(0, 1fr) 110px 110px;
  min-height: 64px;
  background: var(--paper-bright);
  border-bottom: 1px solid var(--line);
}

.record-row > span,
.record-row > time {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line-soft);
  overflow-wrap: anywhere;
}

.record-row > :last-child {
  border-right: 0;
}

.record-head {
  min-height: 30px;
  color: var(--muted);
  background: #e4e4de;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.record-head > span {
  padding-top: 5px;
  padding-bottom: 5px;
}

.record-id {
  color: var(--cobalt-dark);
  font-weight: 700;
}

.record-class,
.record-status,
.record-row time {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.record-status {
  color: var(--success);
}

.record-subject {
  display: block !important;
}

.record-subject a {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.record-subject a:hover {
  color: var(--cobalt);
}

.record-subject small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

/* Dossiers and prose */
.dossier {
  margin: 0 auto;
}

.dossier-header {
  margin-bottom: 0;
}

.dossier-specs-lab {
  grid-template-columns: repeat(6, 1fr);
}

.hash-line {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  margin-top: 12px;
  border: 1px solid var(--line);
  background: var(--paper-bright);
  font-size: 10px;
}

.hash-line b,
.hash-line code {
  padding: 8px 10px;
}

.hash-line b {
  color: #fff;
  background: var(--ink);
}

.hash-line code {
  overflow-wrap: anywhere;
}

.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  background: #e5e5df;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.tag-label,
.tag {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-label {
  margin-right: 6px;
  color: var(--muted);
  font-weight: 700;
}

.tag {
  padding: 3px 6px;
  color: var(--cobalt-dark);
  background: var(--paper-bright);
  border: 1px solid #9ba9cc;
}

.article-content {
  max-width: 760px;
  margin: 36px auto 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
}

.article-content h2,
.article-content h3 {
  margin-top: 2.2em;
  font-family: var(--mono);
  line-height: 1.25;
}

.article-content h2 {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
}

.article-content li {
  margin-bottom: 0.6em;
}

.article-content a {
  color: var(--cobalt-dark);
}

.article-content code {
  padding: 2px 4px;
  background: #e0e1dc;
  font-size: 0.78em;
}

.article-content pre {
  overflow-x: auto;
  padding: 18px;
  color: #fff;
  background: #111820;
  border-left: 4px solid var(--cobalt);
  font-family: var(--mono);
  font-size: 12px;
}

/* Current operations */
.operations-board {
  margin-top: 30px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.operation-row {
  display: grid;
  grid-template-columns: 130px 100px 230px minmax(0, 1fr);
  min-height: 68px;
  background: var(--paper-bright);
  border-bottom: 1px solid var(--line);
}

.operation-row > span {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 11px 13px;
  border-right: 1px solid var(--line-soft);
  overflow-wrap: anywhere;
}

.operation-row > span:last-child {
  border-right: 0;
}

.operation-head {
  min-height: 30px;
  color: var(--muted);
  background: #e4e4de;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.operation-head > span {
  padding-top: 5px;
  padding-bottom: 5px;
}

.operation-category,
.operation-status {
  font-size: 10px;
  letter-spacing: 0.05em;
}

.operation-category {
  color: var(--cobalt-dark);
  font-weight: 700;
}

.operation-status {
  gap: 7px;
  color: var(--success);
  font-weight: 700;
}

.operation-status::before {
  width: 7px;
  height: 7px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.status-idle {
  color: var(--muted);
}

.operation-subject {
  color: var(--ink);
  font-weight: 700;
}

.operation-detail {
  color: var(--muted);
  font-size: 11px;
}

.operations-board.home-operations {
  position: relative;
  margin-top: 0;
}

.operations-board.home-operations::before {
  position: absolute;
  top: -9px;
  right: 18px;
  width: 46px;
  height: 18px;
  pointer-events: none;
  content: "";
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.home-operations .operation-row:not(.operation-head) {
  background:
    linear-gradient(90deg, rgba(22, 93, 255, 0.04), transparent 28px),
    var(--paper-bright);
}

.home-operations .operation-subject::before {
  margin-right: 9px;
  color: var(--cobalt-dark);
  content: "//";
  font-size: 10px;
  font-weight: 700;
}

/* Project engineering briefs */
.project-brief,
.system-architecture,
.capability-section,
.project-phase,
.reference-board {
  margin-top: 30px;
}

.project-brief {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.project-brief-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.5fr);
  background: var(--paper-bright);
}

.project-spec-panel,
.project-mission {
  min-width: 0;
  padding: 24px;
}

.project-spec-panel {
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(22, 93, 255, 0.18) calc(100% - 1px)),
    #e6e6e0;
  border-right: 1px solid var(--line);
}

.module-label {
  display: block;
  color: var(--cobalt-dark);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-spec-panel dl {
  margin: 18px 0 0;
}

.project-spec-panel dl div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.project-spec-panel dt {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.project-spec-panel dd {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.project-prose {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
}

.project-prose p {
  margin: 0 0 1em;
}

.project-prose p:last-child {
  margin-bottom: 0;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.project-links a {
  display: inline-flex;
  justify-content: space-between;
  gap: 18px;
  min-width: 190px;
  padding: 9px 11px;
  color: #fff;
  background: var(--ink);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.project-links a:hover {
  color: #fff;
  background: var(--cobalt);
}

.system-architecture,
.capability-section,
.project-phase {
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.system-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--paper-bright);
  border-bottom: 1px solid var(--line);
}

.flow-step {
  position: relative;
  min-height: 118px;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
}

.flow-step:last-child {
  border-right: 0;
}

.flow-step:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -8px;
  z-index: 1;
  width: 15px;
  height: 15px;
  color: #fff;
  background: var(--cobalt);
  border-radius: 50%;
  content: ">";
  font-size: 9px;
  line-height: 15px;
  text-align: center;
}

.flow-index {
  display: block;
  color: var(--cobalt-dark);
  font-size: 9px;
  font-weight: 700;
}

.flow-name {
  display: block;
  margin-top: 30px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--paper-bright);
  border-bottom: 1px solid var(--line);
}

.capability-module {
  min-width: 0;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.capability-module:last-child {
  border-right: 0;
}

.capability-index {
  color: var(--cobalt-dark);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.capability-module h2 {
  margin: 32px 0 9px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.capability-module p,
.phase-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.phase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper-bright);
  border-bottom: 1px solid var(--line);
}

.phase-grid > div {
  min-width: 0;
  min-height: 125px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.phase-grid > div:last-child {
  border-right: 0;
}

.phase-grid p {
  margin-top: 20px;
  color: var(--ink);
}

/* Canon reference board */
.reference-board {
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.reference-board-note {
  margin: 0;
  padding: 14px 18px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: var(--paper-bright);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  background: var(--line);
  gap: 1px;
}

.reference-card {
  position: relative;
  display: flex;
  grid-column: span 4;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 220px;
  padding: 16px;
  overflow: hidden;
  background: var(--paper-bright);
}

.reference-card:nth-child(1) {
  grid-column: span 5;
}

.reference-card:nth-child(2) {
  grid-column: span 7;
}

.reference-card:nth-child(3) {
  grid-column: span 4;
}

.reference-card:nth-child(4) {
  grid-column: span 5;
}

.reference-card:nth-child(5) {
  grid-column: span 3;
}

.reference-card:nth-child(6) {
  grid-column: span 7;
}

.reference-card:nth-child(7) {
  grid-column: span 5;
}

.reference-featured {
  color: #fff;
  background: var(--ink);
}

.reference-signal {
  color: #fff;
  background: var(--cobalt);
}

.reference-meta {
  display: flex;
  position: relative;
  z-index: 1;
  justify-content: space-between;
  gap: 12px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.reference-standard .reference-meta,
.reference-standard .reference-format,
.reference-standard .reference-body p {
  color: var(--muted);
}

.reference-featured .reference-meta,
.reference-featured .reference-format,
.reference-featured .reference-body p,
.reference-signal .reference-meta,
.reference-signal .reference-format,
.reference-signal .reference-body p {
  color: rgba(255, 255, 255, 0.7);
}

.reference-body {
  position: relative;
  z-index: 1;
  margin-top: 50px;
}

.reference-format {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.reference-body h2 {
  margin: 10px 0 13px;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.reference-body h2 a,
.reference-body h2 a:visited {
  color: inherit;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
}

.reference-body h2 a:hover {
  color: inherit;
  text-decoration-thickness: 3px;
}

.reference-body p {
  margin: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.reference-mark {
  position: absolute;
  right: -40px;
  bottom: -55px;
  width: 150px;
  height: 150px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.14;
}

.reference-mark::before,
.reference-mark::after {
  position: absolute;
  content: "";
  background: currentColor;
}

.reference-mark::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.reference-mark::after {
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
}

/* Analysis log */
.analysis-log {
  margin-top: 30px;
  border: 1px solid var(--line);
}

.analysis-entry {
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr);
  background: var(--paper-bright);
  border-bottom: 1px solid var(--line);
}

.analysis-entry:last-child {
  border-bottom: 0;
}

.analysis-primary {
  background: #edf2ff;
}

.entry-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 14px;
  color: var(--muted);
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(22, 93, 255, 0.22) calc(100% - 1px)),
    #e6e6e0;
  border-right: 1px solid var(--line);
  font-size: 10px;
}

.entry-rail span:first-child {
  color: var(--cobalt-dark);
  font-weight: 700;
}

.entry-content {
  min-width: 0;
  padding: 20px 24px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.entry-content p {
  margin: 0 0 1em;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

.entry-content strong {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
}

.entry-content code {
  font-size: 11px;
}

.evidence {
  margin: 0 0 22px;
  padding: 8px;
  background: var(--ink);
}

.evidence img {
  display: block;
  width: 100%;
}

.evidence figcaption {
  padding: 8px 4px 1px;
  color: #fff;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

/* Footer */
#footer {
  margin-top: 48px;
  border-top: 3px double var(--ink);
}

.footer-control {
  grid-template-columns: 1.5fr 1fr 1fr;
  background: var(--ink);
}

.footer-signature {
  padding: 24px;
  background: var(--paper-bright);
  text-align: center;
}

.nika {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.footer-quote {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  body {
    padding: 12px;
  }

  .site-shell {
    min-height: calc(100vh - 24px);
    box-shadow: 5px 5px 0 var(--cobalt);
  }

  #content {
    padding: 30px 24px 42px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-media {
    max-width: 680px;
  }

  .operator-profile {
    grid-template-columns: 1fr;
  }

  .operator-meta {
    grid-template-columns: 1fr;
  }

  .operator-meta div {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .operator-meta dd {
    margin-top: 0;
  }

  .record-row {
    grid-template-columns: 95px 100px minmax(0, 1fr) 90px;
  }

  .record-row > time,
  .record-head > span:last-child {
    display: none;
  }

  .dossier-specs-lab {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-brief-grid {
    grid-template-columns: 1fr;
  }

  .project-spec-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .reference-card,
  .reference-card:nth-child(n) {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .site-shell {
    min-height: 100vh;
    border: 0;
    box-shadow: none;
  }

  .header-main {
    display: block;
    min-height: 0;
    padding: 16px;
  }

  .site-title {
    font-size: 15px;
  }

  .site-header nav {
    gap: 14px;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .site-header nav a {
    font-size: 11px;
  }

  .header-meta {
    grid-template-columns: 1fr 1fr;
  }

  .header-meta span:nth-child(2),
  .header-meta span:nth-child(3) {
    display: none;
  }

  #content {
    padding: 26px 14px 36px;
  }

  .hero {
    gap: 28px;
    margin-bottom: 36px;
  }

  .hero-copy h1 {
    font-size: 64px;
  }

  .hero-media {
    padding: 10px;
  }

  .media-frame {
    height: clamp(160px, 42vw, 190px);
    min-height: 0;
  }

  .media-frame img {
    min-height: 0;
  }

  .frame-corner {
    width: 30px;
    height: 30px;
  }

  .hero-media .spec-grid {
    margin-top: 10px;
  }

  .hero-media .spec-grid span {
    padding: 7px 8px;
    font-size: 9px;
    line-height: 1.35;
  }

  .hero-media .spec-grid b {
    margin-bottom: 2px;
    font-size: 7px;
  }

  .operator-rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
    padding: 12px 16px 10px 28px;
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .operator-rail span {
    padding: 5px 0;
    border-bottom: 1px solid rgba(29, 35, 42, 0.12);
  }

  .operator-rail span:nth-child(3) {
    grid-column: 1 / -1;
  }

  .operator-rail span:last-child {
    border-bottom: 0;
  }

  .page-header,
  .dossier-header {
    padding: 22px 18px;
  }

  .page-header h1,
  .dossier-header h1 {
    font-size: 46px;
  }

  .page-specs,
  .dossier-specs,
  .dossier-specs-lab,
  .spec-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-control {
    grid-template-columns: 1fr;
  }

  .section-control > *:last-child {
    display: none;
  }

  .record-table {
    border-top: 1px solid var(--line);
  }

  .record-head {
    display: none;
  }

  .record-row {
    grid-template-columns: 88px minmax(0, 1fr);
    padding: 10px 0;
  }

  .record-row > span,
  .record-row > time {
    padding: 4px 10px;
    border-right: 0;
  }

  .record-id {
    grid-row: span 2;
    align-items: flex-start !important;
    border-right: 1px solid var(--line-soft) !important;
  }

  .record-class {
    display: none !important;
  }

  .record-status {
    grid-column: 2;
  }

  .record-subject a {
    font-size: 13px;
  }

  .article-content {
    margin-top: 28px;
    font-size: 16px;
  }

  .hash-line {
    grid-template-columns: 1fr;
  }

  .analysis-entry {
    grid-template-columns: 1fr;
  }

  .operation-head {
    display: none;
  }

  .operation-row {
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 8px 0;
  }

  .operation-row > span {
    padding: 4px 10px;
    border-right: 0;
  }

  .operation-category {
    grid-column: 1;
    grid-row: 1;
    border-right: 1px solid var(--line-soft) !important;
  }

  .operation-status {
    grid-column: 1;
    grid-row: 2;
    border-right: 1px solid var(--line-soft) !important;
  }

  .operation-subject {
    grid-column: 2;
    grid-row: 1;
  }

  .operation-detail {
    grid-column: 2;
    grid-row: 2;
  }

  .system-flow,
  .capability-grid,
  .phase-grid {
    grid-template-columns: 1fr;
  }

  .flow-step {
    min-height: 82px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .flow-step:last-child {
    border-bottom: 0;
  }

  .flow-step:not(:last-child)::after {
    top: auto;
    right: 14px;
    bottom: -8px;
    content: "v";
  }

  .flow-name {
    margin-top: 18px;
  }

  .capability-module,
  .phase-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .capability-module:last-child,
  .phase-grid > div:last-child {
    border-bottom: 0;
  }

  .reference-card,
  .reference-card:nth-child(n) {
    grid-column: span 12;
    min-height: 190px;
  }

  .reference-board-note {
    padding: 12px 14px;
    font-size: 11px;
  }

  .entry-rail {
    flex-direction: row;
    justify-content: space-between;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .entry-content {
    padding: 17px 14px;
    font-size: 16px;
  }

  .footer-control {
    grid-template-columns: 1fr;
  }

  .footer-control span:not(:first-child) {
    display: none;
  }
}
