/* ============================================================
   Orelis — client interface, Path 1
   ------------------------------------------------------------
   Reference: a private bank's client statement. Not a dashboard.
   No webfonts (nothing here contacts a third party), no images,
   no charts. Type, rule, and space do the work.

   Colour discipline — there is exactly ONE accent, and it carries
   exactly one meaning: THIS IS BLOCKED, or THIS IS YOURS TO DECIDE.
   If the accent appears anywhere else, that is a bug.

   Every colour pair below is verified by ui/scripts/check-contrast.mjs.
   ============================================================ */

:root {
  /* Ground and paper */
  --ground:        #12161B;
  --ground-soft:   #1B2128;
  --paper:         #F7F5F0;
  --paper-raised:  #FFFFFF;

  /* Ink */
  --ink:           #15181C;
  --ink-soft:      #5A5F66;
  --on-ground:     #F2EFE9;
  --on-ground-sft: #A7AEB6;

  /* Rules */
  --rule:          #D8D3C8;
  --rule-strong:   #B6AF9F;
  --rule-dark:     #2A313A;

  /* The accent */
  --accent:        #8E2C1B;
  --accent-ink:    #7A2617;
  --accent-on-dk:  #E8836F;
  --accent-wash:   #FBEFEA;

  /* Type */
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino,
           "Book Antiqua", "Times New Roman", serif;
  --sans:  ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
           Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
           "Liberation Mono", monospace;

  /* Rhythm */
  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

/* ------------------------------------------------------------ reset */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: .6rem 1rem;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------ layout */

.folio {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.measure { max-width: var(--measure); }

main { padding-bottom: 6rem; }

/* ------------------------------------------------------------ masthead */

.masthead {
  background: var(--ground);
  color: var(--on-ground);
  border-bottom: 3px solid var(--ground);
}

.masthead__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.15rem 0 1rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: .42em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--on-ground);
  white-space: nowrap;
}

.masthead__who {
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--on-ground-sft);
}

/* Dataset switcher — deliberately quiet chrome, not a product feature */
.switcher {
  display: flex; align-items: center; gap: .5rem;
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--on-ground-sft);
}
.switcher select {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--on-ground);
  background: var(--ground-soft);
  border: 1px solid var(--rule-dark);
  border-radius: 2px;
  padding: .35rem .55rem;
}

.nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule-dark);
  padding: .8rem 0 .9rem;
}
.nav a {
  text-decoration: none;
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--on-ground-sft);
  padding-bottom: .2rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--on-ground); }
.nav a[aria-current="page"] {
  color: var(--on-ground);
  border-bottom-color: var(--accent-on-dk);
}

/* ------------------------------------------------------------ example-data band */

.example-band {
  background: var(--accent);
  color: #fff;
  font-size: .78rem;
  letter-spacing: .08em;
  padding: .55rem 0;
}
.example-band strong { letter-spacing: .14em; text-transform: uppercase; }

/* ------------------------------------------------------------ page head */

.pagehead { padding: 4.5rem 0 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 .9rem;
}
.eyebrow--accent { color: var(--accent-ink); }

.display {
  font-size: clamp(2.4rem, 6.2vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -.018em;
  margin: 0 0 1.4rem;
}

.display--sub {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -.012em;
  margin: 0 0 1rem;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2.1vw, 1.3rem);
  line-height: 1.62;
  color: var(--ink);
  max-width: var(--measure);
}

.standfirst {
  font-size: .95rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ------------------------------------------------------------ rules & sections */

.rule-hair  { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.rule-heavy { border: 0; border-top: 2px solid var(--ink); margin: 0; }

.section { padding: 4rem 0 0; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--ink);
  padding-bottom: .7rem;
  margin-bottom: 2rem;
}
.section__title {
  font-size: 1.55rem;
  letter-spacing: -.01em;
}
.section__count {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------ the compounding strip */

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  margin: 3rem 0 0;
}
.stat { padding: 1.5rem 1.5rem 1.6rem 0; }
.stat + .stat {
  border-left: 1px solid var(--rule);
  padding-left: 1.5rem;
}
.stat__num {
  font-family: var(--serif);
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: -.02em;
  display: block;
  margin-bottom: .5rem;
}
.stat__num--sm { font-size: 1.25rem; line-height: 1.25; }
.stat__label {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.stat__note { font-size: .78rem; color: var(--ink-soft); margin-top: .4rem; }

@media (max-width: 620px) {
  .stat + .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .stat { padding-right: 0; }
}

/* ------------------------------------------------------------ entries (the living document) */

.entry {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  align-items: start;
}
.entry:first-of-type { border-top: 1px solid var(--rule); }
.entry__body { max-width: var(--measure); grid-column: 1; }

.entry__clause {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 .55rem;
}
.entry--nonneg .entry__clause { color: var(--accent-ink); }

.entry__position {
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.58;
  margin: 0 0 .9rem;
}

.entry__meta {
  font-size: .8rem;
  color: var(--ink-soft);
  margin: 0;
}
.entry__meta span + span::before { content: " · "; }

.entry__actions {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: flex-end;
}

@media (max-width: 700px) {
  .entry { grid-template-columns: 1fr; }
  .entry__actions { grid-column: 1; flex-direction: row; align-items: flex-start; }
}

/* the non-negotiable gets a visible spine — it is the thing the gate defends */
.entry--nonneg {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  background: linear-gradient(90deg, var(--accent-wash), transparent 40%);
}

/* disclosure for the long-form detail */
.reveal { margin-top: .9rem; }
.reveal > summary {
  cursor: pointer;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  list-style: none;
}
.reveal > summary::-webkit-details-marker { display: none; }
.reveal > summary::before { content: "+  "; font-family: var(--mono); }
.reveal[open] > summary::before { content: "\2212  "; }
.reveal > summary:hover { color: var(--ink); }
.reveal__body {
  margin-top: .9rem;
  padding-left: 1.1rem;
  border-left: 1px solid var(--rule);
  font-size: .92rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}
.reveal__body dt {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); margin-top: 1rem;
}
.reveal__body dt:first-child { margin-top: 0; }
.reveal__body dd { margin: .3rem 0 0; }

/* ------------------------------------------------------------ buttons */

.btn {
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .55rem .95rem;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  white-space: nowrap;
  transition: border-color .12s, background .12s, color .12s;
}
.btn:hover { border-color: var(--ink); }

/* "yours to decide" — the accent affordance */
.btn--own {
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn--own:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.btn--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn--quiet { border-color: transparent; color: var(--ink-soft); padding-left: 0; padding-right: 0; }
.btn--quiet:hover { color: var(--ink); border-color: transparent; text-decoration: underline; }

.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ------------------------------------------------------------ THE BLOCKED PANEL
   The most important object in the application. It must stop a reader
   mid-scroll and then explain itself without anyone standing next to them. */

.refusal {
  margin: 3rem 0 0;
  border: 1px solid var(--accent);
  border-left: 8px solid var(--accent);
  background: var(--accent-wash);
}

.refusal__head {
  background: var(--accent);
  color: #fff;
  padding: 1.4rem clamp(1.25rem, 3vw, 2.25rem);
}
.refusal__stamp {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  margin: 0 0 .55rem;
  opacity: .92;
}
.refusal__title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0;
}

.refusal__body { padding: clamp(1.5rem, 3vw, 2.25rem); }

.refusal__lede {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  line-height: 1.55;
  max-width: var(--measure);
  margin: 0 0 2rem;
}

.confront {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule-strong);
  margin: 0 0 2rem;
}
.confront__cell {
  padding: 1.35rem 1.5rem 1.35rem 0;
  border-bottom: 1px solid var(--rule-strong);
}
.confront__cell + .confront__cell {
  border-left: 1px solid var(--rule-strong);
  padding-left: 1.5rem;
}
.confront__label {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 .6rem;
}
.confront__text { font-family: var(--serif); font-size: 1rem; line-height: 1.55; margin: 0; }

@media (max-width: 700px) {
  .confront { grid-template-columns: 1fr; }
  .confront__cell + .confront__cell { border-left: 0; padding-left: 0; }
}

.refusal__qa { max-width: var(--measure); }
.refusal__q {
  font-family: var(--sans);
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-ink);
  margin: 1.8rem 0 .5rem;
}
.refusal__a { font-size: .98rem; line-height: 1.65; margin: 0; }

.machine {
  margin: 2rem 0 0;
  padding: 1.1rem 1.25rem;
  background: var(--ground);
  color: var(--on-ground);
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 2px;
}
.machine__label {
  font-family: var(--sans);
  font-size: .66rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--on-ground-sft);
  margin: 0 0 .7rem;
}

/* the clean twin */
.clear {
  margin: 3rem 0 0;
  border: 1px solid var(--rule);
  border-left: 8px solid var(--ink);
  background: var(--paper-raised);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.clear__stamp {
  font-size: .72rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 .6rem;
}
.clear__title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  line-height: 1.12; margin: 0 0 1rem;
}

/* ------------------------------------------------------------ stage rail */

.rail {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}
.rail__step { position: relative; padding: 2.2rem .5rem 0 0; }
.rail__step::before {                       /* the connector */
  content: "";
  position: absolute; top: 6px; left: 0; right: 0;
  height: 1px; background: var(--rule);
}
.rail__step:last-child::before { right: 50%; }
.rail__step::after {                        /* the node */
  content: "";
  position: absolute; top: 1px; left: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
}
.rail__step--done::after { background: var(--ink); border-color: var(--ink); }
.rail__step--done::before { background: var(--ink); }
.rail__step--now::after {
  background: var(--ink); border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--ink);
}
.rail__step--refused::after { background: var(--accent); border-color: var(--accent); }
.rail__step--refused .rail__name { color: var(--accent-ink); font-weight: 600; }

.rail__name {
  display: block;
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft);
}
.rail__step--done .rail__name, .rail__step--now .rail__name { color: var(--ink); }
.rail__now {
  display: block; font-size: .66rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-ink); margin-top: .3rem;
}

@media (max-width: 780px) {
  .rail { grid-template-columns: 1fr; }
  .rail__step { padding: .55rem 0 .55rem 1.75rem; }
  .rail__step::before { top: 0; bottom: 0; left: 5px; right: auto; width: 1px; height: auto; }
  .rail__step:last-child::before { bottom: 50%; right: auto; }
  .rail__step::after { top: .95rem; left: 0; }
  .rail__step--now::after { box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--ink); }
}

/* ------------------------------------------------------------ matter list */

.matter-list { list-style: none; margin: 0; padding: 0; }

.matter {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 2.1rem 0;
  border-bottom: 1px solid var(--rule);
}
.matter:first-child { border-top: 2px solid var(--ink); }
.matter:hover .matter__name { text-decoration: underline; text-underline-offset: 3px; }

.matter__top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap; margin-bottom: .55rem;
}
.matter__ref {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .04em;
  color: var(--ink-soft);
}
.matter__name {
  font-family: var(--serif); font-size: 1.4rem; line-height: 1.25;
  margin: 0 0 .6rem; max-width: var(--measure);
}
.matter__meta { font-size: .82rem; color: var(--ink-soft); }
.matter__meta span + span::before { content: " · "; }

.flag {
  font-family: var(--sans); font-size: .68rem; letter-spacing: .18em;
  text-transform: uppercase; padding: .3rem .6rem; border-radius: 2px;
  border: 1px solid var(--rule-strong); color: var(--ink-soft);
  white-space: nowrap;
}
.flag--blocked { background: var(--accent); border-color: var(--accent); color: #fff; }
.flag--clear   { border-color: var(--ink); color: var(--ink); }

.matter--blocked { border-left: 4px solid var(--accent); padding-left: 1.25rem; }

/* ------------------------------------------------------------ Charter document */

.charter-nav {
  display: flex; gap: .5rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
  margin: 2.5rem 0 0;
}
.charter-nav button {
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .8rem 1rem; color: var(--ink-soft);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.charter-nav button:hover { color: var(--ink); }
.charter-nav button[aria-selected="true"] {
  color: var(--ink); border-bottom-color: var(--accent);
}

.attorney-frame {
  margin: 2.5rem 0 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0;
  max-width: var(--measure);
}
.attorney-frame__line {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0 0 .7rem;
}
.attorney-frame__note { font-size: .85rem; color: var(--ink-soft); margin: 0; }

.doc {
  max-width: var(--measure);
  margin: 2.5rem 0 0;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.72;
}
.doc h3 {
  font-family: var(--sans);
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink); margin: 2.6rem 0 .9rem;
  padding-bottom: .45rem; border-bottom: 1px solid var(--rule);
}
.doc h3:first-child { margin-top: 0; }
.doc p { margin: 0 0 1.15em; }
.doc__clause { display: block; }
.doc__num {
  font-family: var(--mono); font-size: .82rem; color: var(--ink-soft);
  margin-right: .5rem;
}
.doc hr { border: 0; border-top: 1px solid var(--rule); margin: 2.2rem 0; }

.doc__banner {
  border-left: 8px solid var(--accent);
  background: var(--accent-wash);
  padding: 1.2rem 1.4rem;
  margin: 0 0 2rem;
  font-family: var(--sans);
  font-size: .93rem;
  line-height: 1.6;
}
.doc__banner strong { color: var(--accent-ink); }

.tc {
  background: transparent;
  border-bottom: 1px dotted var(--ink-soft);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: .86em;
}

/* the ISSUE / RECOMMENDED / WHY triple */
.issue {
  border-top: 1px solid var(--rule);
  padding: 1.6rem 0;
  max-width: var(--measure);
}
.issue:first-of-type { border-top: 2px solid var(--ink); }
.issue__title { font-family: var(--serif); font-size: 1.14rem; line-height: 1.5; margin: 0 0 1rem; }
.issue__k {
  font-family: var(--sans); font-size: .66rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-soft); margin: 1.1rem 0 .35rem;
}
.issue__v { font-family: var(--sans); font-size: .93rem; line-height: 1.66; margin: 0; color: var(--ink); }

/* deviation-log entries */
.dev {
  border-top: 1px solid var(--rule);
  padding: 1.6rem 0;
  max-width: var(--measure);
}
.dev:first-of-type { border-top: 2px solid var(--ink); }
.dev--nonneg { border-left: 4px solid var(--accent); padding-left: 1.25rem; }

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

.scrim {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(18, 22, 27, .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(1rem, 5vh, 4rem) 1rem;
  overflow-y: auto;
}
.panel {
  background: var(--paper-raised);
  width: min(720px, 100%);
  border-top: 6px solid var(--accent);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.panel__title {
  font-family: var(--serif); font-size: 1.8rem; line-height: 1.15;
  margin: 0 0 .5rem;
}
.panel__sub { font-size: .9rem; color: var(--ink-soft); margin: 0 0 2rem; max-width: var(--measure); }

.field { margin: 0 0 1.6rem; }
.field > label {
  display: block;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); margin-bottom: .5rem;
}
.field__hint { font-size: .82rem; color: var(--ink-soft); margin: 0 0 .5rem; }
.field textarea, .field input, .field select {
  width: 100%;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: .8rem .9rem;
}
.field input, .field select { font-family: var(--sans); font-size: .95rem; }
.field textarea { min-height: 8.5rem; resize: vertical; }

.was {
  font-family: var(--serif); font-size: .95rem; line-height: 1.6;
  color: var(--ink-soft);
  border-left: 2px solid var(--rule-strong);
  padding-left: 1rem; margin: 0 0 .8rem;
}

.panel__warn {
  border-left: 4px solid var(--accent);
  background: var(--accent-wash);
  padding: 1rem 1.2rem;
  font-size: .9rem;
  line-height: 1.6;
  margin: 0 0 1.8rem;
}
.panel__warn strong { color: var(--accent-ink); }

.panel__actions {
  display: flex; gap: .75rem; flex-wrap: wrap;
  border-top: 1px solid var(--rule); padding-top: 1.5rem;
}

/* ------------------------------------------------------------ history */

.history { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.history__item { border-top: 1px solid var(--rule); padding: 1.2rem 0; }
.history__item:first-child { border-top: 2px solid var(--ink); }
.history__when {
  font-family: var(--mono); font-size: .74rem; color: var(--ink-soft);
}
.history__what { font-family: var(--serif); font-size: 1.02rem; margin: .35rem 0 .35rem; }
.history__who { font-size: .8rem; color: var(--ink-soft); }

/* ------------------------------------------------------------ empty states */

.empty {
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  max-width: var(--measure);
}
.empty__title { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 .8rem; }
.empty p { font-size: .95rem; color: var(--ink-soft); }

/* ------------------------------------------------------------ footer */

.colophon {
  background: var(--ground);
  color: var(--on-ground-sft);
  margin-top: 6rem;
  padding: 3rem 0;
  font-size: .82rem;
  line-height: 1.7;
}
.colophon a { color: var(--on-ground); }
.colophon__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.colophon h4 {
  font-family: var(--sans); font-size: .66rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--on-ground); margin: 0 0 .7rem;
}

/* ------------------------------------------------------------ print */

@media print {
  .masthead, .colophon, .charter-nav, .entry__actions, .btn, .skip-link { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .refusal { border-color: #000; }
  .refusal__head { background: #fff; color: #000; border-bottom: 2px solid #000; }
  a { text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* provenance tag pulled out of a matter name */
.matter__tag {
  font-family: var(--sans);
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  display: inline-block;
  padding: .25rem .6rem;
  margin: 0 0 1rem;
}
.matter__tag--inline { margin: 0 0 0 .6rem; vertical-align: baseline; font-size: .62rem; padding: .15rem .45rem; }

/* a labelled fact inside a Charter section: "TURNAROUND TIER: transaction_only" */
.doc__kv { display: block; }
.doc__k {
  font-family: var(--sans);
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  margin-bottom: .15rem;
}

/* ------------------------------------------------------------ narrow screens
   Rick reads this on a phone. Nothing may run off the side of the screen. */

.masthead__bar { align-items: center; }
.masthead__who { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.switcher { flex: 0 1 auto; min-width: 0; }
.switcher select { max-width: 100%; }

@media (max-width: 720px) {
  .masthead__bar { gap: .6rem .9rem; padding-bottom: .8rem; }
  .masthead__who { order: 3; flex: 1 1 100%; }
  .switcher { order: 2; flex: 1 1 100%; }
  .switcher select { flex: 1 1 auto; }
  .nav { gap: 1.5rem; }
}

/* Nothing with a long unbroken token may widen the page. */
.machine, .matter__ref, .doc__kv, .history__when { overflow-wrap: anywhere; }
.entry__body, .issue, .dev, .refusal__qa, .measure { min-width: 0; }

/* The compounding strip on a phone: a clean two-up grid, not a ragged wrap. */
@media (max-width: 620px) {
  .strip { grid-template-columns: 1fr 1fr; }
  .stat, .stat + .stat {
    padding: 1.25rem 1rem 1.35rem 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .stat:nth-child(2n) { padding-left: 1rem; border-left: 1px solid var(--rule); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat__num { font-size: 2rem; }
}

/* ------------------------------------------------------------ utilities
   A short, closed set. These exist so the markup carries no inline style
   attributes, which lets the Content-Security-Policy in netlify.toml
   forbid inline styles outright rather than allow them. */

.mt-06  { margin-top: .6rem; }
.mt-15  { margin-top: 1.5rem; }
.mt-175 { margin-top: 1.75rem; }
.mt-2   { margin-top: 2rem; }
.mt-25  { margin-top: 2.5rem; }
.mt-3   { margin-top: 3rem; }
.mt-4   { margin-top: 3.5rem; }
.mb-2   { margin-bottom: 2rem; }

.in-serif    { font-family: var(--serif); }
.plain-link  { color: inherit; }
.accent-text { color: var(--accent-ink); }
.ta-short    { min-height: 5rem; }
.is-hidden   { display: none; }
.dl-flush    { border-left: 0; padding-left: 0; max-width: var(--measure); }

/* ------------------------------------------------------------ change requests
   A request sits UNDER the position it concerns and is visibly not part of it.
   It must never look like the position has already changed. */

.req {
  margin: 1.1rem 0 0;
  border: 1px dashed var(--accent);
  background: var(--accent-wash);
  padding: .9rem 1.1rem;
}
.req__stamp {
  font-family: var(--sans);
  font-size: .66rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 .5rem;
}
.req__what { font-size: .92rem; line-height: 1.6; margin: 0 0 .4rem; }
.req__why  { font-size: .88rem; line-height: 1.6; color: var(--ink-soft); margin: 0 0 .5rem; }
.req__state {
  font-size: .78rem; letter-spacing: .04em; color: var(--accent-ink);
  margin: 0; font-weight: 600;
}

/* the standing note at the top of the request panel */
.panel__note {
  border-left: 4px solid var(--ink);
  background: var(--paper);
  padding: 1rem 1.2rem;
  font-size: .9rem; line-height: 1.6;
  margin: 0 0 1.6rem;
}

/* an absence that is NOT ordinary — something a person should ask about */
.attention {
  border-left: 4px solid var(--accent);
  background: var(--accent-wash);
  padding: .9rem 1.1rem;
  margin-top: 1.2rem;
}
.attention strong { color: var(--accent-ink); }

.history__detail {
  font-size: .9rem; line-height: 1.6; color: var(--ink-soft);
  margin: .35rem 0 .45rem;
}


/* ============================================================
   ABSENCE OF PROOF — added 2026-08-20 after the B1 grade.

   Everything in this block exists to make one distinction visible:
   "we checked, and here is the record" versus "we cannot show you
   that we checked". Those were previously rendered identically.

   The accent (#8E2C1B) has exactly one meaning in this system —
   this is yours to decide, or something stopped. Not-verified is
   in that family, so it wears the accent. Verified stays in ink.
   ============================================================ */

/* the interface is not showing live data and must say so, loudly */
.fault-band {
  background: var(--accent);
  color: #fff;
  font-size: .82rem;
  line-height: 1.55;
  padding: .8rem 0;
  border-bottom: 3px solid var(--ink);
}
.fault-band strong { letter-spacing: .06em; text-transform: uppercase; }

/* the clean twin's opposite: evidence of the check is not present */
.clear--unverified {
  border-left-color: var(--accent);
  background: var(--accent-wash);
}
.clear__stamp--unverified { color: var(--accent-ink); font-weight: 600; }

/* a matter whose check cannot be evidenced never wears a settled flag */
.flag--unverified {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent-wash);
}

/* a stage the matter has passed that left no record of happening */
.rail__step--gap::after { background: var(--paper); border-color: var(--accent); }
.rail__step--gap .rail__name { color: var(--accent-ink); }
.rail__now--gap { color: var(--accent-ink); }

/* an internal Orelis identifier, printed exactly as recorded because no
   client-facing wording has been approved for it */
.ident {
  font-family: var(--mono);
  font-size: .85em;
  color: var(--ink-soft);
  border-bottom: 1px dotted var(--rule-strong);
  word-break: break-word;
}

/* a standing note above a document part, explaining something about it */
.doc__note {
  font-family: var(--sans);
  font-size: .84rem;
  line-height: 1.6;
  color: var(--ink-soft);
  border-left: 3px solid var(--rule);
  padding: .1rem 0 .1rem .9rem;
  margin: 1.4rem 0 0;
}
