/* styles.css — RIG-OWNED. The vendored files in public/vendor/ are read-only donors
   at fluidUI pin 4549c7f; every rig change lives here so the vendored bytes stay
   diffable (T10 §1). No external assets: no CDN, no webfont fetch, no image host. */

/* ── two re-statements the donor scopes to its own panel markup ──────────────
   The donor writes `.p-body .verbatim` and `.p-body .fact-line` because in fluidUI
   they live inside a panel body. rig's pages have no panels, so the same
   declarations are re-stated unscoped HERE rather than editing the vendored file. */
.verbatim {
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.fact-line {
  font-size: var(--t-label);
  letter-spacing: 0.06em;
  color: var(--dim);
  margin: 0.4em 0 0;
}

/* ── the colour law, as three classes ────────────────────────────────────────
   teal = yours at rest · amber = a limit of ours, working as intended · red =
   honesty only. Nothing in this file may paint a limit red: telling a newcomer they
   did something wrong when the constraint is ours is the visual version of a lie. */
.tone-ok      { --tone: var(--estate); }
.tone-limit   { --tone: var(--mind); }
.tone-refusal { --tone: var(--flag); }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: var(--lh);
  -webkit-text-size-adjust: 100%;
}

/* ── top bar: a slim status line and the page name, nothing technical ──────── */
.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--sp);
  border-bottom: 1px solid var(--edge);
}
.wordmark {
  font-size: var(--t-title);
  text-decoration: none;
  color: var(--ink);
}
.wordmark span { color: var(--dim); }
nav { display: flex; gap: 18px; }
nav a {
  color: var(--dim);
  text-decoration: none;
  font-size: var(--t-panel);
}
nav a:hover, nav a:focus { color: var(--ink); text-decoration: underline; }

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--sp) var(--sp) 64px;
}
section { margin-bottom: 44px; }
section.narrow { max-width: 52ch; }

h1 {
  font-size: var(--t-stage);
  line-height: 1.35;
  margin: 0 0 14px;
  font-weight: 600;
}
h2 { font-size: var(--t-title); margin: 30px 0 10px; font-weight: 600; }
h3 { font-size: var(--t-body); margin: 0 0 6px; font-weight: 600; }
p { margin: 0 0 14px; }
.lede { color: var(--dim); }
.fine { font-size: var(--t-panel); color: var(--dim); }
a { color: var(--estate); }

code {
  font-size: var(--t-panel);
  color: var(--dim);
  border: 1px solid var(--edge-2);
  border-radius: 4px;
  padding: 1px 5px;
}

details {
  border-top: 1px solid var(--edge);
  padding-top: 8px;
  margin-top: 8px;
}
summary {
  cursor: pointer;
  font-size: var(--t-panel);
  color: var(--dim);
}
summary:hover { color: var(--ink); }
details p { margin: 8px 0 0; font-size: var(--t-panel); color: var(--dim); }

.diagram {
  font-size: var(--t-panel);
  line-height: 1.8;
  color: var(--dim);
  background: var(--void-2);
  border: 1px solid var(--edge);
  border-radius: var(--glass-radius);
  padding: 14px;
  overflow-x: auto;
  white-space: pre;
  margin: 0 0 14px;
}
.diagram b { color: var(--estate); font-weight: 400; }

/* ── the permanent vendor-boundary chip: on every page, never small print ──── */
.boundary {
  border: 1px solid var(--edge-2);
  border-radius: var(--glass-radius);
  padding: 14px;
  margin: 0 0 16px;
  background: var(--void-2);
}
.boundary p { margin: 10px 0 0; font-size: var(--t-panel); color: var(--dim); }

.cta {
  display: inline-block;
  background: var(--estate);
  color: var(--void);
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: var(--t-body);
}
.cta-note { display: block; margin-top: 10px; font-size: var(--t-panel); color: var(--dim); }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li {
  counter-increment: step;
  border-left: 1px solid var(--edge-2);
  padding: 0 0 16px 18px;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: -9px;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--void);
  border: 1px solid var(--edge-2);
  color: var(--dim);
  font-size: var(--t-label);
  line-height: 16px;
  text-align: center;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps b { display: block; color: var(--ink); font-weight: 600; }
.steps span { color: var(--dim); font-size: var(--t-panel); }

.claims { display: grid; gap: 10px; }
.claim {
  border: 1px solid var(--edge);
  border-left: 2px solid var(--estate-dim);
  border-radius: var(--glass-radius);
  padding: 14px 16px;
  background: var(--void-2);
}
.claim p { margin: 0; color: var(--dim); font-size: var(--t-panel); }
.claim .taint { margin: 8px 0 0; }
.claim .verbatim {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--edge-2);
  border-radius: 8px;
  font-size: var(--t-panel);
}

.fields { border-collapse: collapse; width: 100%; font-size: var(--t-panel); }
.fields th, .fields td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--edge);
  vertical-align: top;
}
.fields th { color: var(--dim); font-weight: 400; font-size: var(--t-label); letter-spacing: 0.06em; }

.card {
  border: 1px solid var(--edge);
  border-radius: var(--glass-radius);
  padding: 18px;
  margin-bottom: 16px;
  background: var(--void-2);
}
label {
  display: block;
  font-size: var(--t-label);
  letter-spacing: 0.06em;
  color: var(--dim);
  margin: 14px 0 6px;
}
label:first-child { margin-top: 0; }
input {
  width: 100%;
  font-family: var(--font);
  font-size: var(--t-body);
  color: var(--ink);
  background: var(--void);
  border: 1px solid var(--edge-2);
  border-radius: 8px;
  padding: 10px 11px;
}
input::placeholder { color: var(--faint); }
input:focus { outline: 1px solid var(--estate); outline-offset: 1px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 34rem) { .split { grid-template-columns: 1fr; } }

button {
  margin-top: 16px;
  font-family: var(--font);
  font-size: var(--t-body);
  background: var(--estate);
  color: var(--void);
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: progress; }

.note {
  border: 1px solid var(--edge);
  border-radius: var(--glass-radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.note h2 { margin-top: 0; font-size: var(--t-body); }
.note p:last-child, .note ol:last-child { margin-bottom: 0; }
.note ol { padding-left: 18px; font-size: var(--t-panel); color: var(--dim); }
.note li { margin-bottom: 8px; }

/* ── states: the tone comes from DATA, never from the markup's mood ────────── */
.state {
  border: 1px solid var(--edge-2);
  border-left: 2px solid var(--tone, var(--edge-2));
  border-radius: var(--glass-radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--void-2);
}
.state.tone-refusal { border-style: dashed; border-color: var(--flag); }
.state.tone-limit   { border-color: var(--mind-dim); }
.state.tone-ok      { border-color: var(--estate-dim); }
.state-name {
  font-size: var(--t-label);
  letter-spacing: 0.06em;
  color: var(--tone, var(--dim));
  margin: 0 0 6px;
}
.state p:last-child { margin-bottom: 0; font-size: var(--t-panel); }

/* the donor's own panel classes, used as intended: a refusal keeps its edge, an
   error is dashed red. rig only supplies the head colour, having no .p-head. */
.panel-refusal .state-name { color: var(--mind); }
.panel-error .state-name { color: var(--flag); }

.receipt {
  font-size: var(--t-panel);
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--edge-2);
  border-left: 2px solid var(--estate-dim);
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
  background: var(--void-2);
}

dl { margin: 0; font-size: var(--t-panel); }
dt { color: var(--dim); font-size: var(--t-label); letter-spacing: 0.06em; margin-top: 10px; }
dd { margin: 2px 0 0; color: var(--ink); word-break: break-word; }

footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 20px var(--sp) 48px;
  border-top: 1px solid var(--edge);
}
footer .fine a { color: var(--dim); }
