/* CAQA CalibrationChain: a literal chain of custody links across the bench, read backwards from a finding.
   Original CSS for CAQA. System fonts only. */
:root {
  --bench: #f2f5f4; --enamel: #ffffff; --ink: #172126; --ink-2: #47555c; --line: #c5d0d1; --petrol: #0f4c5c; --petrol-soft: #dfecee;
  --crimson: #a8123e; --crimson-soft: #fbe6ec; --seal: #1d6b43; --seal-soft: #e2f1e8; --window: #ffe58a; --window-soft: #fff6cc;
  --head: "Franklin Gothic Medium", "Franklin Gothic", "Arial Narrow", sans-serif;
  --text: Candara, Calibri, "Segoe UI", sans-serif;
  --mono: Consolas, "Cascadia Mono", monospace;
  --pad: clamp(1rem, 3vw, 2.5rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bench); color: var(--ink); font: 400 1.08rem/1.55 var(--text); }
a { color: var(--petrol); text-underline-offset: .2em; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; line-height: 1.15; margin: 0 0 .55rem; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 .8rem; }
.small { font-size: .95rem; color: var(--ink-2); }
button, select { font: inherit; color: var(--ink); }

/* header: lock-up and seal button together, nav as stations on a line */
.bar { display: flex; align-items: center; gap: 1rem; padding: .55rem var(--pad); background: var(--enamel); border-bottom: 4px solid var(--petrol); }
.caqa-lockup { color: var(--ink); }
.word { font: 400 1.35rem/1 var(--head); }
.seal-cta { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1.1rem 0 .5rem; border: 2px solid var(--seal); border-radius: 999px; color: var(--seal); text-decoration: none; font: 400 1.05rem var(--head); background: var(--seal-soft); }
.seal { width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle, var(--seal) 0 6px, var(--enamel) 7px 9px, var(--seal) 10px); }
.stations { margin-left: auto; display: flex; position: relative; }
.stations::before { content: ""; position: absolute; left: 2.4rem; right: 2.4rem; top: 12px; height: 3px; background: var(--line); }
.stations a { position: relative; min-width: 6.4rem; min-height: 48px; padding: 24px .5rem 0; text-align: center; color: var(--ink); text-decoration: none; font-size: 1.02rem; }
.stations a::before { content: ""; position: absolute; top: 5px; left: calc(50% - 8px); width: 11px; height: 11px; border: 3px solid var(--petrol); border-radius: 50%; background: var(--enamel); }
.stations a[aria-current="page"] { font-weight: 700; }
.stations a[aria-current="page"]::before { background: var(--petrol); box-shadow: 0 0 0 4px var(--window); }

/* the chain */
.rail-wrap { padding: .8rem var(--pad) 1rem; background: var(--enamel); }
.rail-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1.5rem; }
.rail-id { margin: 0; font-size: 1rem; }
.rail-id b { font-family: var(--mono); }
.legend { display: inline-flex; gap: .5rem; margin-left: .6rem; font-size: .88rem; }
.lg-win { background: var(--window-soft); border-bottom: 4px solid var(--window); padding: 0 .4rem; }
.lg-pull { border: 2px dashed var(--crimson); padding: 0 .4rem; }
.step-btns { display: flex; gap: .4rem; }
.step-btns button { min-height: 44px; padding: 0 1rem; border: 2px solid var(--petrol); background: var(--enamel); border-radius: 999px; cursor: pointer; }
.step-btns button[aria-disabled="true"] { border-style: dashed; color: var(--ink-2); cursor: default; }
.scrollhint { margin: .2rem 0 0; font-size: .85rem; color: var(--ink-2); }
.chain { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); }
.lk { position: relative; display: flex; }
.lk.inwin { background: var(--window-soft); box-shadow: inset 0 -5px 0 var(--window); }
.lk button { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: .05rem; background: transparent; border: 0; padding: .35rem .15rem .7rem; cursor: pointer; text-align: center; line-height: 1.25; }
.ring { position: relative; width: calc(100% - 14px); height: 46px; margin: .2rem 0 .45rem; border: 8px solid var(--petrol); border-radius: 999px; background: var(--enamel); }
.lk + .lk .ring::before { content: ""; position: absolute; right: calc(100% - 4px); top: 11px; width: 30px; height: 8px; border-radius: 4px; background: #6d8f98; }
.k-hand .ring { border-color: #55747e; }
.k-job .ring { border-width: 4px; }
.k-cal .ring { border-color: var(--seal); }
.lk.bad .ring { border-color: var(--crimson); border-style: double; border-width: 11px; }
.lk.pulled .ring { border: 4px dashed var(--crimson); background: var(--crimson-soft); }
.lk .d { font: 700 .92rem var(--mono); }
.lk b { font: 400 1.02rem var(--head); }
.lk .s { font-size: .9rem; color: var(--ink-2); }
.lk .w { font-size: .84rem; font-weight: 700; color: var(--crimson); min-height: 1.2em; }
.lk.outwin .w { color: var(--ink-2); }
.lk button[aria-current="step"] { outline: 3px solid var(--ink); outline-offset: -3px; background: var(--enamel); }
.lk button[aria-current="step"]::after { content: ""; position: absolute; left: 50%; bottom: -13px; margin-left: -10px; border: 10px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
.chain.gap .lk:nth-child(6) .ring { border: 4px dotted var(--ink-2); background: repeating-linear-gradient(45deg, var(--enamel) 0 5px, var(--line) 5px 8px); }
.lk button:focus-visible { outline: 3px solid #1a5fd0; outline-offset: -3px; }

.head-band { text-align: center; padding: 1.1rem var(--pad) .4rem; }
.head-band h1 { font-size: clamp(2rem, 3.6vw, 3.1rem); margin-bottom: .15rem; }
.head-band p { color: var(--ink-2); margin: 0; }

.desk { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); max-width: 76rem; margin: .8rem auto 2.5rem; padding: 0 var(--pad); gap: 0; }
.record, .pull { background: var(--enamel); border: 1px solid var(--line); padding: 1.1rem 1.3rem; }
.record { border-top: 6px solid var(--ink); }
.pull { border-top: 6px solid var(--crimson); border-left: 0; }
.rec-k { font: 700 .88rem var(--mono); color: var(--ink-2); display: flex; justify-content: space-between; }
.rec-w { background: var(--window-soft); padding: .5rem .75rem; border-left: 5px solid var(--window); }
.finding { border: 1.5px dashed var(--petrol); margin: .6rem 0 0; padding: .3rem .8rem .5rem; }
.finding legend { font-family: var(--head); padding: 0 .3rem; }
.finding label { display: flex; gap: .6rem; align-items: center; min-height: 44px; cursor: pointer; }
.finding input { width: 22px; height: 22px; margin: 0; accent-color: var(--petrol); flex: none; }
.period { font-size: .98rem; color: var(--ink-2); }
.jobs { list-style: none; margin: 0; padding: 0; }
.jobs li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; border: 2px dashed var(--crimson); padding: .35rem .75rem; margin-bottom: .45rem; }
.jobs li.done { border: 2px solid var(--seal); }
.jobs b { font: 700 1.05rem var(--mono); }
.jobs p { margin: 0; font-size: .96rem; }
.jobs select { min-height: 44px; max-width: 14rem; border: 1.5px solid var(--ink-2); background: var(--enamel); padding: 0 .4rem; }
.gapline { border: 2px dotted var(--ink); background: repeating-linear-gradient(45deg, var(--enamel) 0 8px, #eef1f1 8px 16px); padding: .5rem .75rem; font-weight: 700; }
.close-btn { min-height: 46px; padding: 0 1.6rem; background: var(--petrol); color: #fff; border: 0; font: 400 1.1rem var(--head); cursor: pointer; }
.close-btn:hover { background: var(--ink); }
.verdict { margin: .6rem 0; padding: .6rem .8rem; border: 1.5px solid var(--line); min-height: 4.2rem; }
.verdict[data-tone="ok"] { border: 3px solid var(--seal); background: var(--seal-soft); }
.verdict[data-tone="no"] { border: 6px double var(--crimson); background: var(--crimson-soft); }

.strip, .inc, .block, .ruleline, .next, .slipwrap, .pt, .routes { max-width: 76rem; margin-left: auto; margin-right: auto; padding-left: var(--pad); padding-right: var(--pad); }
.strip { padding-bottom: 2.4rem; }
.strip h2 { text-align: center; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; margin-top: 1.2rem; }
.three > div { border-top: 3px solid var(--petrol); padding-top: .7rem; position: relative; }
.n { display: inline-block; font: 700 1.1rem var(--mono); color: #fff; background: var(--petrol); width: 2rem; height: 2rem; line-height: 2rem; text-align: center; border-radius: 50%; margin-bottom: .5rem; }
.inc { display: grid; grid-template-columns: 3fr 2fr; gap: 2.5rem; padding-bottom: 2.4rem; }
.pins { list-style: none; margin: 0; padding: 0; }
.pins li { padding: .45rem 0 .45rem 2rem; position: relative; border-bottom: 1px solid var(--line); }
.pins li::before { content: ""; position: absolute; left: 0; top: .85rem; width: 14px; height: 8px; border: 3px solid var(--petrol); border-radius: 999px; }
.honest { background: var(--window-soft); border: 2px solid var(--ink); padding: 1.2rem 1.3rem; align-self: start; }
.next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; padding-bottom: 3rem; }
.next a { display: block; padding: 1rem 1.3rem; border: 2px solid var(--petrol); border-radius: 3rem; background: var(--enamel); text-decoration: none; color: var(--ink); }
.next b { display: block; font: 400 1.35rem var(--head); color: var(--petrol); }
.next a:hover { background: var(--petrol-soft); }

/* inner pages */
.pt { text-align: center; padding-top: 2.2rem; padding-bottom: 1.6rem; }
.pt-k { display: inline-block; border: 2px solid var(--petrol); border-radius: 999px; padding: .15rem 1rem; font: 700 .88rem var(--mono); color: var(--petrol); }
.pt h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.pt p:last-child { color: var(--ink-2); }
.block { padding-bottom: 2.4rem; }
.measure { max-width: 52rem; }
.links5 { list-style: none; margin: 0; padding: 0; }
.links5 li { max-width: 46rem; margin: 0 auto; background: var(--enamel); border: 5px solid var(--petrol); border-radius: 3.5rem; padding: .9rem 2.6rem 1rem; }
.links5 li + li { margin-top: 2rem; position: relative; }
.links5 li + li::before { content: ""; position: absolute; left: calc(50% - 5px); bottom: calc(100% - 2px); height: 2.3rem; width: 10px; border-radius: 5px; background: #6d8f98; }
.links5 p { margin: 0 0 .3rem; }
.to { font: 700 .88rem var(--mono); color: var(--ink-2); }
.ruleline { background: var(--window-soft); border-block: 4px solid var(--window); max-width: none; padding-top: 1.8rem; padding-bottom: 1.4rem; margin-bottom: 2.4rem; text-align: center; }
.ruleline p { max-width: 50rem; margin-left: auto; margin-right: auto; }
.ruleline .big { font: 400 clamp(1.5rem, 3vw, 2.2rem)/1.3 var(--head); max-width: 40rem; }
.scroll { overflow-x: auto; background: var(--enamel); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: .7rem .8rem; border-top: 1px solid var(--line); }
thead th { background: var(--petrol-soft); font-family: var(--head); font-weight: 400; }
.fit tbody th { width: 32%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.state { list-style: none; padding: 0; margin: 0; }
.state li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.state span { display: inline-block; font: 700 .82rem var(--mono); border: 2px solid; padding: 0 .45rem; margin-right: .5rem; }
.av { color: var(--seal); } .pl { color: var(--petrol); border-style: dashed !important; } .no { color: var(--crimson); border-style: dotted !important; }
.routes { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 2rem; padding-bottom: 2.4rem; }
.routes a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.ledger { list-style: none; margin: 0; padding: 0; background: var(--enamel); border: 1px solid var(--line); }
.ledger li { display: grid; grid-template-columns: 10rem minmax(0, 1fr) 15rem; border-top: 1px solid var(--line); }
.ledger li > * { padding: .8rem 1rem; margin: 0; }
.ledger .when { font: 700 .95rem var(--mono); border-right: 6px solid var(--petrol); }
.ledger .res { background: var(--petrol-soft); font-weight: 700; }
.outs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.o { background: var(--enamel); padding: 1rem 1.2rem; border: 3px solid var(--seal); }
.o.stop { border: 6px double var(--crimson); }
.o-k { font: 700 .85rem var(--mono); color: var(--seal); margin: 0 0 .2rem; }
.o.stop .o-k { color: var(--crimson); }
.slipwrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 2.5rem; padding-bottom: 3rem; align-items: start; }
.slipcard { background: var(--enamel); border: 2px solid var(--ink); padding: 1.4rem 1.5rem; }
.checks { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.checks li { counter-increment: c; position: relative; padding: .6rem 0 .6rem 2.6rem; border-bottom: 1px solid var(--line); }
.checks li::before { content: counter(c); position: absolute; left: 0; top: .65rem; width: 1.7rem; height: 1.7rem; border: 3px solid var(--petrol); border-radius: 999px; display: grid; place-items: center; font: 700 .85rem var(--mono); }
.tear { border-top: 3px dashed var(--ink-2); margin: 1rem -1.5rem 0; padding: 1rem 1.5rem 0; }
.ask-btn { display: flex; justify-content: center; align-items: center; text-align: center; min-height: 54px; padding: .5rem 1rem; background: var(--petrol); color: #fff; text-decoration: none; font: 400 1.15rem var(--head); border-radius: 999px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; min-height: 44px; padding: .7rem 0; font: 400 1.12rem var(--head); }

.foot { background: var(--enamel); border-top: 4px solid var(--petrol); padding: 1.5rem var(--pad) 2rem; text-align: center; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.5rem; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; }
.status { font-size: .93rem; color: var(--ink-2); max-width: 48rem; margin: .5rem auto 0; }

@media (max-width: 1000px) {
  .desk { grid-template-columns: minmax(0, 1fr); }
  .pull { border-left: 1px solid var(--line); }
  /* narrow screens: the same events as a vertical ordered list */
  .chain { grid-template-columns: minmax(0, 1fr); }
  .lk button { display: grid; grid-template-columns: 52px 4.2rem minmax(0, 1fr); column-gap: .6rem; align-items: center; text-align: left; padding: .5rem .5rem .5rem .6rem; min-height: 64px; }
  .ring { grid-row: 1 / span 3; width: 30px; height: 46px; margin: 0 0 0 8px; border-width: 6px; }
  .lk.bad .ring { border-width: 9px; }
  .lk + .lk .ring::before { right: auto; left: 50%; margin-left: -4px; top: auto; bottom: calc(100% + 2px); width: 8px; height: 20px; }
  .lk .d { grid-row: 1 / span 3; }
  .lk b, .lk .s, .lk .w { grid-column: 3; }
  .lk .w:empty { display: none; }
  .lk.inwin { box-shadow: inset 6px 0 0 var(--window); }
  .lk button[aria-current="step"]::after { display: none; }
}
@media (max-width: 760px) {
  main { display: flex; flex-direction: column; }
  main > .head-band { order: -2; background: var(--enamel); }
  main > .desk { order: -1; margin-top: 0; padding-top: .8rem; }
  .bar { flex-wrap: wrap; gap: .4rem; padding: .4rem .8rem 0; }
  .word { font-size: 1.1rem; }
  .bar .caqa-lockup { gap: 8px; }
  .seal-cta { margin-left: auto; padding: 0 .7rem 0 .35rem; }
  .seal { width: 22px; height: 22px; background: radial-gradient(circle, var(--seal) 0 4px, var(--enamel) 5px 7px, var(--seal) 8px); }
  .stations { width: 100%; margin: 0; }
  .stations a { flex: 1; min-width: 0; }
  .head-band h1 { font-size: 1.85rem; }
  .jobs li { flex-direction: column; align-items: stretch; }
  .jobs select { max-width: none; width: 100%; }
  .three, .inc, .next, .two, .outs, .slipwrap { grid-template-columns: minmax(0, 1fr); }
  .links5 li { border-radius: 2rem; padding: .8rem 1.2rem; }
  .ledger li { grid-template-columns: minmax(0, 1fr); }
  .ledger .when { border-right: 0; border-left: 6px solid var(--petrol); padding-bottom: 0; }
  .fit, .fit tbody, .fit tr, .fit th, .fit td { display: block; width: auto; }
  .fit thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fit tbody th { width: auto; }
  .fit td { border-top: 0; padding-top: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .lk .ring { transition: transform .2s ease; }
  .lk button[aria-current="step"] .ring { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
