/* ISO 25000-23 Revision Checker: a measurement ledger.
   Palette: ink navy, warm paper, vermilion signal, measure green.
   Type: serif for headings and record numerals, system sans for body, mono for data. */

:root {
  --paper: #f2eee4;
  --sheet: #fbf9f3;
  --ink: #15171c;
  --ink-soft: #353a44;
  --muted: #5f5c53;
  --navy: #16233a;
  --navy-deep: #0d1727;
  --red: #a83b2b;
  --red-soft: #f3ded8;
  --green: #2c5546;
  --green-soft: #dfe8e1;
  --line: #d5cfc0;
  --line-strong: #8a8375;
  --mono: "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --wrap: 1140px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.62; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--red); }
p { margin: 0 0 1.05em; }
h1, h2, h3, h4, .serif { font-family: var(--serif); font-weight: 600; color: var(--navy); }
h1 { font-size: clamp(2.05rem, 4.4vw, 3.3rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.45rem, 2.5vw, 2.05rem); line-height: 1.18; margin: 2.1em 0 .55em; }
h3 { font-size: 1.18rem; line-height: 1.3; margin: 1.5em 0 .4em; }
h4 { font-size: 1.02rem; margin: 1.2em 0 .3em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin: 0 0 .45em; }
code, .mono { font-family: var(--mono); font-size: max(.85em, 12.5px); letter-spacing: .01em; }
strong { font-weight: 700; color: var(--ink); }
.small { font-size: .9rem; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: .75rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; }
.wrap { width: min(var(--wrap), calc(100% - 2.4rem)); margin: 0 auto; }
.narrow { max-width: 760px; }
.measure { max-width: 70ch; }

/* masthead */
.rule-top { height: 5px; background: var(--navy); }
.masthead { background: var(--sheet); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.mast-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--navy); line-height: 1.05; }
.brand .mark { display: grid; place-items: center; width: 42px; height: 42px; background: var(--navy); color: var(--paper); font-family: var(--serif); font-size: 1.25rem; }
.brandtext { font-family: var(--serif); font-size: 1.06rem; font-weight: 600; }
.brand small { display: block; font-family: var(--mono); font-weight: 400; font-size: .78rem; letter-spacing: .04em; color: var(--muted); margin-top: .25rem; }
nav.main { display: flex; flex-wrap: wrap; gap: .1rem; font-size: .86rem; }
nav.main a { text-decoration: none; color: var(--ink-soft); padding: .45rem .6rem; border-bottom: 2px solid transparent; }
nav.main a:hover { color: var(--navy); border-bottom-color: var(--red); }
nav.main a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }

/* hero */
.hero { padding: 3rem 0 2.4rem; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: start; }
.eyebrow { font-family: var(--mono); font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; color: var(--green); margin: 0 0 .9rem; }
.eyebrow .dot { display: inline-block; width: 7px; height: 7px; background: var(--red); margin-right: .5rem; vertical-align: 1px; }
.lede { font-size: 1.12rem; line-height: 1.55; color: var(--ink-soft); max-width: 60ch; }
.trust { font-size: .95rem; color: var(--green); border-left: 3px solid var(--green); padding-left: .8rem; margin: 1.2rem 0; }
.hero-badges { list-style: none; padding: 0; margin: 1.2rem 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.hero-badges li { font-family: var(--mono); font-size: .76rem; letter-spacing: .03em; border: 1px solid var(--line-strong); padding: .28rem .5rem; color: var(--ink-soft); background: var(--sheet); }
.price-line { font-family: var(--mono); font-size: .86rem; color: var(--navy); margin: 1.2rem 0 .9rem; }

.price-line .sep { color: var(--muted); padding: 0 .35rem; }
.hero-side { display: grid; gap: 1rem; }
.stagecard { background: var(--navy); color: var(--paper); padding: 1.3rem 1.4rem; }
.stagecard .mono { color: #b9c2d2; margin-bottom: .5rem; }
.stagecard dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; font-size: .86rem; }
.stagecard dt { color: #aeb8c9; }
.stagecard dd { margin: 0; text-align: right; }
.stagecard .muted { color: #d8c9a8; }
.hero-photo { margin: 0; border: 1px solid var(--line); background: var(--sheet); }
.hero-photo img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.hero-photo figcaption { font-size: .8rem; line-height: 1.45; color: var(--muted); padding: .55rem .7rem; }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.btn { display: inline-block; background: var(--navy); color: #fff; text-decoration: none; font-family: var(--sans); font-weight: 600; font-size: .92rem; padding: .72rem 1.05rem; border: 1px solid var(--navy); cursor: pointer; }
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--red); color: var(--red); background: transparent; }
.btn.small { font-size: .82rem; padding: .45rem .7rem; }

/* bands */
.band { padding: 3rem 0; border-bottom: 1px solid var(--line); }
.band.tint { background: var(--sheet); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 1.6rem; border-top: 2px solid var(--navy); padding-top: .8rem; }
.section-head h2 { margin: 0; }
.kicker { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin: 0 0 .4rem; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid.start { align-items: start; }
.sheet, .card { background: var(--sheet); border: 1px solid var(--line); padding: 1.2rem 1.25rem; }
.sheet h3:first-child, .sheet h2:first-child { margin-top: 0; }
.num { font-family: var(--mono); font-size: .78rem; color: var(--red); letter-spacing: .06em; display: block; margin-bottom: .4rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 1.6rem; border: 1px solid var(--line); background: var(--sheet); }
.stat { padding: 1.1rem 1.2rem; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-k { font-family: var(--mono); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0; }
.big { font-family: var(--serif); font-size: 2.35rem; color: var(--navy); margin: .1rem 0 .25rem; line-height: 1.05; }
.stat p:last-child { font-size: .85rem; margin: 0; color: var(--ink-soft); }

/* tracker */
.tracker { border: 1px solid var(--navy); background: var(--sheet); margin-bottom: 1.4rem; }
.tracker-top { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); font-size: .82rem; }
.tracker-top span { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.track { display: grid; grid-template-columns: repeat(4, 1fr); }
.step { padding: .9rem 1rem; border-right: 1px solid var(--line); position: relative; }
.step:last-child { border-right: 0; }
.step .tag { display: block; font-family: var(--mono); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.step.done .tag { color: var(--green); }
.step.now { background: var(--navy); color: var(--paper); }
.step.now .tag, .step.now b, .step.now em { color: var(--paper); }
.step b { display: block; font-size: .9rem; }
.step em { display: block; font-style: normal; font-size: .8rem; color: var(--muted); margin-top: .2rem; }

/* model */
.modelgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.modelcard { background: var(--sheet); border: 1px solid var(--line); padding: 1.1rem 1.15rem; }
.modelcard h3 { margin: .1rem 0 .4rem; }
.modelcard h3 a { text-decoration: none; color: var(--navy); }
.modelcard h3 a:hover { color: var(--red); }
.famlist { list-style: none; padding: 0; margin: .6rem 0 0; font-size: .84rem; border-top: 1px solid var(--line); }
.famlist li { margin: 0; padding: .28rem 0; border-bottom: 1px dotted var(--line); }
.famlist li:last-child { border-bottom: 0; }
.famlist code { color: var(--red); margin-right: .3rem; }

/* unit pages */
.unit-head { padding: 2.4rem 0 1.6rem; border-bottom: 1px solid var(--line); }
.crumbs { font-size: .86rem; color: var(--muted); margin: 0 0 1rem; }
.crumbs a { text-decoration: none; }
.unit-head h1 { max-width: 22ch; }
.h1code { font-family: var(--mono); font-size: .45em; color: var(--red); letter-spacing: 0; display: inline-block; vertical-align: .35em; margin-right: .3em; }
.unit-head .lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 62ch; }
.limit { font-size: .88rem; color: var(--muted); border-left: 3px solid var(--line-strong); padding-left: .8rem; max-width: 62ch; }
.unit-body { padding: 2.2rem 0 0; }
.unit-grid { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(250px, .95fr); gap: 2.6rem; align-items: start; }
.prose { max-width: 74ch; }
.prose h2 { border-top: 1px solid var(--line); padding-top: 1rem; }
.prose h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.rail { position: sticky; top: 92px; }
.railcode { font-family: var(--serif); font-size: 3.2rem; line-height: 1; color: var(--navy); border-bottom: 2px solid var(--navy); padding-bottom: .35rem; }
.railfacts { margin: .8rem 0 1rem; font-size: .82rem; }
.railfacts dt { font-family: var(--mono); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: .7rem; }
.railfacts dd { margin: .1rem 0 0; color: var(--ink-soft); }
.railnote { border-top: 1px solid var(--line); padding-top: .8rem; }
.state { font-family: var(--mono); font-size: .76rem; letter-spacing: .03em; border: 1px solid var(--line-strong); padding: .15rem .4rem; color: var(--ink-soft); white-space: nowrap; }
.state.open { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.state.locked { border-color: var(--line-strong); color: var(--muted); }
.detail { border-left: 2px solid var(--line); padding-left: 1rem; margin: 1rem 0; }
.detail h3 { margin: .9rem 0 .25rem; font-size: 1.05rem; }
.worked { background: var(--sheet); border: 1px solid var(--line); border-left: 4px solid var(--green); padding: .9rem 1rem; margin: 1rem 0; }
.worked p:last-child { margin-bottom: 0; }
.ask { background: var(--navy); color: var(--paper); padding: 1.1rem 1.3rem; margin: 1.5rem 0; }
.ask h3 { color: var(--paper); margin-top: 0; }
.ask ul { margin-bottom: 0; }
.ask a { color: #e7dcc4; }
.step-list { counter-reset: step; list-style: none; padding: 0; }
.step-list li { counter-increment: step; position: relative; padding-left: 2.1rem; margin-bottom: .7rem; }
.step-list li:before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: .05rem; font-family: var(--mono); font-size: .72rem; color: var(--red); border-top: 1px solid var(--red); width: 1.4rem; }
.chips { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem .9rem; }
.chips li { margin: 0; padding: .35rem 0; border-bottom: 1px dotted var(--line); font-size: .9rem; }
.chips code { color: var(--red); }
.pager { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1rem; font-size: .86rem; }
.pager a { text-decoration: none; }
.pager .next { text-align: right; }
.source-box { background: var(--sheet); border: 1px solid var(--line); padding: .9rem 1rem; margin-top: 1.4rem; font-size: .82rem; }
.source-box p { margin-bottom: .6rem; }
.src { font-family: var(--mono); font-size: .78rem; color: var(--muted); word-break: break-all; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--sheet); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .62rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #efeade; border-bottom: 1px solid var(--line-strong); }
tr:last-child td { border-bottom: 0; }
td.mono { white-space: nowrap; }
table.toc tr.sub td:nth-child(2) { padding-left: 1.8rem; }
table.toc tr.sub td:first-child { padding-left: 1.8rem; }

/* check */
.check fieldset { border: 0; border-top: 1px solid var(--line); margin: 0 0 1rem; padding: .9rem 0 0; }
.check legend { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--navy); padding: 0; margin-bottom: .5rem; }
.qnum { font-family: var(--mono); font-size: .78rem; color: var(--red); margin-right: .35rem; }
.radio { display: flex; gap: .5rem; align-items: flex-start; font-size: .92rem; padding: .35rem .45rem; border: 1px solid transparent; cursor: pointer; }
.radio:hover { background: #efeade; border-color: var(--line); }
.radio input { margin-top: .25rem; accent-color: var(--green); }
.check .actions { margin-top: 1rem; }
.form-intro { font-size: .88rem; color: var(--muted); }
.disclaimer { font-size: .84rem; color: var(--muted); margin-top: .8rem; }
.verdict { margin-top: 1.2rem; border: 1px solid var(--green); background: var(--green-soft); padding: 1rem 1.1rem; }
.verdict.incomplete { border-color: var(--red); background: var(--red-soft); }
.vtag { font-family: var(--mono); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--green); margin: 0 0 .4rem; }
.verdict.incomplete .vtag { color: var(--red); }
.verdict ul { margin-bottom: .6rem; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.plan { background: var(--sheet); border: 1px solid var(--line); padding: 1.5rem; }
.plan.feature { border: 1px solid var(--navy); }
.tagline { font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.amount { font-family: var(--serif); font-size: 2.5rem; color: var(--navy); margin: .3rem 0 .4rem; }
.amount span { font-size: .95rem; color: var(--muted); font-family: var(--sans); }
.plan ul { font-size: .9rem; padding-left: 1.1rem; }
.notice { border: 1px solid var(--line-strong); background: #efeade; padding: 1rem 1.1rem; font-size: .9rem; }

/* qme list */
.qmelist { list-style: none; padding: 0; columns: 2; column-gap: 2rem; }
.qmelist li { margin: 0 0 .35rem; font-size: .9rem; break-inside: avoid; }
.qmelist .mono { color: var(--red); margin-right: .4rem; }

/* details */
details { border-bottom: 1px solid var(--line); padding: .8rem 0; }
summary { cursor: pointer; font-family: var(--serif); font-size: 1.08rem; font-weight: 600; color: var(--navy); }
details p { margin-top: .6rem; }

/* grounding + prov */
.ground { background: var(--navy); color: var(--paper); border-bottom: 0; }
.ground h2 { color: var(--paper); }
.ground .kicker { color: #d8b98a; }
.ground .measure { color: #d7dce5; }
.ground .small { color: #aeb8c9; }
.badges { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.badges li { font-family: var(--mono); font-size: .78rem; border: 1px solid #4c5a70; padding: .3rem .55rem; color: #e7dcc4; }
.prov { background: var(--navy-deep); color: #c9d1de; font-size: .8rem; }
.prov .wrap { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; }

/* footer */
.foot { background: #0f131a; color: #b9bfc9; font-size: .86rem; padding: 2.4rem 0 1rem; }
.foot a { color: #e2d8c3; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.foot-brand { font-family: var(--serif); font-size: 1.15rem; color: #fff; margin-bottom: .4rem; }
.foot-head { font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #8d95a2; margin: 0 0 .5rem; }
.links { list-style: none; padding: 0; font-size: .88rem; }
.links li { margin: 0 0 .35rem; }
.foot .muted { color: #a2aab8; }
.foot-base { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid #2a303a; margin-top: 1.8rem; padding-top: .8rem; font-size: .8rem; color: #8d95a2; }

@media (max-width: 1000px) {
  .hero-grid, .unit-grid { grid-template-columns: 1fr; }
  .rail { position: static; }
  .stats, .track, .grid.four { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--line); }
  .modelgrid, .grid.three { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2) { border-right: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 1.6rem); }
  .mast-inner { flex-direction: column; align-items: flex-start; padding: .6rem 0; gap: .4rem; }
  nav.main { overflow-x: auto; width: 100%; flex-wrap: nowrap; padding-bottom: .3rem; }
  nav.main a { white-space: nowrap; font-size: .8rem; padding: .4rem .45rem; }
  .hero { padding: 1.8rem 0; }
  .stats, .track, .grid.two, .grid.three, .grid.four, .modelgrid, .plans { grid-template-columns: 1fr; }
  .stat { border-right: 0; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .section-head { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .qmelist { columns: 1; }
  .chips { grid-template-columns: 1fr; }
  .prose h2 { margin-top: 1.7em; }
  .pager { flex-direction: column; }
  .foot-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .foot-base { flex-direction: column; }
  .unit-head h1 { font-size: 1.85rem; }
  .railcode { font-size: 2.4rem; }
}
