/* The Documentation Center — informational site. */

:root {
  --ink: #1a1d1b;
  --muted: #5a625d;
  --line: #d8d5cf;
  --paper: #faf9f7;
  --accent: #2f4739;
  --accent-soft: #eef1ee;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.65 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.bar {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  gap: 28px;
  align-items: baseline;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  color: var(--accent);
  text-decoration: none;
}

.placeholder-note {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px dashed var(--line);
  padding: 2px 7px;
  border-radius: 3px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin-right: 20px;
}

nav a:hover, nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 52px 24px 72px;
}

h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.subhead {
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 32px;
  line-height: 1.5;
}

h2 {
  font-size: 22px;
  margin: 40px 0 10px;
}

h3 {
  font-size: 17px;
  margin: 28px 0 6px;
}

p { margin: 0 0 16px; }

.intro-line {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 28px;
}

.kit {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: #fff;
}

.kit h2 { margin-top: 0; font-size: 17px; }

.kit .status {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

.doors { margin-bottom: 8px; }

.doors-lead {
  margin: 0 0 18px;
  font-size: 19px;
  line-height: 1.45;
}

.door-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.door {
  flex: 1 1 190px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 18px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  display: block;
}

/* Primary door — the only clickable one. Reads as the active path. */
a.door-primary {
  border: 1.5px solid var(--accent);
  box-shadow: 0 1px 3px rgba(47, 71, 57, 0.10);
}

a.door-primary:hover,
a.door-primary:focus-visible {
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(47, 71, 57, 0.18);
}

a.door-primary:hover .door-name,
a.door-primary:hover .door-sub,
a.door-primary:hover .door-go,
a.door-primary:focus-visible .door-name,
a.door-primary:focus-visible .door-sub,
a.door-primary:focus-visible .door-go { color: #fff; }

.door-go {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* Inert doors — research-stage, deliberately not clickable. */
.door-inert {
  background: var(--paper);
  border-style: dashed;
  cursor: default;
}

.door-inert .door-name { color: var(--muted); }

/* Honest scope marker on the research-stage doors. Carries the hedge that the
   card copy above it deliberately does not. */
.door-status {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--muted);
}

.door-name {
  display: block;
  font-weight: 700;
  font-size: 17px;
  color: var(--accent);
  margin-bottom: 3px;
}

.door-sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

/* Filled primary action, clearly weighted against body text. */
.cta-button {
  display: inline-block;
  margin: 10px 0 8px;
  padding: 12px 22px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border-radius: 6px;
  text-decoration: none;
}

.cta-button:hover,
.cta-button:focus-visible {
  background: #24352b;
  box-shadow: 0 3px 10px rgba(47, 71, 57, 0.22);
}

/* Keyboard focus. Drawn outside the element via outline-offset, so it lands on
   the page background and stays legible even when the card itself fills. */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Motion only for users who haven't asked for less. Colour changes stay
   instant for everyone; nothing moves unless motion is permitted. */
@media (prefers-reduced-motion: no-preference) {
  a.door-primary { transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
  a.door-primary:hover,
  a.door-primary:focus-visible { transform: translateY(-1px); }
  .cta-button { transition: background 0.15s ease, box-shadow 0.15s ease; }
}

/* Tinted section so the breakdown list separates from the hero. */
.section-tint {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 4px 24px 8px;
  margin: 36px 0 40px;
}

.section-tint h2 { margin-top: 22px; }
.section-tint ul { margin-bottom: 18px; }

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 600;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 44px 0 8px;
}

ul { padding-left: 22px; margin: 0 0 18px; }
li { margin-bottom: 8px; }

.role {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-left: 3px solid var(--line);
  padding: 2px 0 2px 16px;
  margin-bottom: 18px;
}

.role-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: var(--accent);
  margin-top: 1px;
}

.role-icon svg { width: 22px; height: 22px; display: block; }

.role-body { flex: 1 1 auto; }

.role h3 { margin: 0 0 4px; font-size: 16px; }
.role p { margin: 0; color: var(--muted); }

.emphasis {
  font-style: italic;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 16px;
  border-radius: 0 4px 4px 0;
}

.steps li { margin-bottom: 11px; }

.status-list li { margin-bottom: 6px; color: var(--muted); }
.status-list strong { color: var(--ink); }

.note {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 14px 18px;
  margin: 28px 0;
  border-radius: 0 4px 4px 0;
}

.cta {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.cta:hover { text-decoration: underline; }

footer {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  background: #fff;
}

.foot-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 24px 40px;
}

.disclaimer {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

/* ---------- Phase 2: documentation artifact + health panel ---------- */

.artifact-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 22px 0 42px;
  align-items: flex-start;
}

.record-card,
.health-card {
  flex: 1 1 320px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 20px 22px 18px;
}

/* --- The record --- */

.record-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.record-kicker {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 6px;
  font-weight: 600;
}

.record-title { margin: 0 0 2px; font-size: 18px; }
.record-facility { margin: 0; font-size: 13px; color: var(--muted); }

.record-badge {
  flex: 0 0 auto;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 4px 9px;
  white-space: nowrap;
}

.record-fields { margin: 0; }

.rf {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid #eeece8;
}

.rf:last-child { border-bottom: 0; padding-bottom: 2px; }

.rf dt {
  font-size: 12.5px;
  color: var(--muted);
  flex: 0 0 auto;
}

.rf dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  text-align: right;
  flex: 1 1 auto;
  min-width: 0;
}

.rf-complete {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

/* --- Documentation Health --- */

.health-title { margin: 0 0 4px; font-size: 18px; }

.health-note {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.health-list { list-style: none; padding: 0; margin: 0 0 16px; }

.hs {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eeece8;
  margin: 0;
}

.hs:last-child { border-bottom: 0; }

.hs-mark {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

.hs-name { flex: 1 1 auto; font-size: 13.5px; }

.hs-state {
  flex: 0 0 auto;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.hs-ok   .hs-mark { background: var(--accent); color: #fff; }
.hs-ok   .hs-state { color: var(--accent); }

.hs-warn .hs-mark { background: #8a6508; color: #fff; }
.hs-warn .hs-state { color: #8a6508; }

.hs-miss .hs-mark { background: #9d3b34; color: #fff; }
.hs-miss .hs-state { color: #9d3b34; }

.health-total { border-top: 1px solid var(--line); padding-top: 14px; }

.health-bar {
  height: 7px;
  background: #e8e6e1;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.health-fill {
  display: block;
  width: 71%;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}

.health-pct { margin: 0 0 4px; font-size: 14px; }
.health-pct strong { color: var(--accent); }

.health-basis { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* --- Reveal on scroll, CSS only. --------------------------------------
   The initial hidden state is scoped inside @supports so browsers without
   scroll-linked animation simply render the panels visible. No JS: a
   script would breach the no-script fence on this site, and a JS reveal
   that failed would leave the content invisible. */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      opacity: 0;
      transform: translateY(10px);
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 24%;
    }
  }
}

@keyframes reveal-in {
  to { opacity: 1; transform: none; }
}

@media (max-width: 620px) {
  .rf { flex-direction: column; gap: 2px; }
  .rf dd { text-align: left; }
}

/* ---------- Phase 3: before/after, roles, not-a-CMMS, evidence ---------- */

.ba-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 20px 0 40px; align-items: stretch; }

.ba-col {
  flex: 1 1 280px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px 14px;
}

.ba-before { background: var(--paper); border-style: dashed; }
.ba-after { background: #fff; border-left: 3px solid var(--accent); }

.ba-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 10px;
}

.ba-after .ba-label { color: var(--accent); }

.ba-headline { font-weight: 700; font-size: 16px; margin: 0 0 10px; color: var(--accent); }

.ba-col ul { margin: 0; padding-left: 20px; }
.ba-col li { margin-bottom: 6px; font-size: 14.5px; }
.ba-before li { color: var(--muted); }

.role-q {
  font-style: italic;
  color: var(--ink);
  margin: 0 0 6px !important;
  font-size: 15px;
  line-height: 1.5;
}

.not-cmms {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  background: #fff;
  padding: 18px 22px 14px;
  margin: 18px 0 40px;
}

.not-list { list-style: none; padding: 0; margin: 0 0 12px; }
.not-list li { margin-bottom: 7px; font-size: 15px; color: var(--muted); }
.not-list strong { color: var(--ink); }

.is-line {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-weight: 600;
  color: var(--accent);
  font-size: 15.5px;
}

.sample-note {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 28px;
}

.ev-step {
  border-left: 2px solid var(--line);
  padding: 2px 0 2px 18px;
  margin: 0 0 26px;
}

.ev-finding, .ev-line { margin: 0 0 9px; font-size: 14.5px; line-height: 1.6; }
.ev-finding { color: var(--ink); }
.ev-line { color: var(--muted); }
.ev-line:last-child { margin-bottom: 0; }

.ev-tag {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.ev-line .ev-tag { color: var(--muted); }
