/* /compliance: one edit check under three laws, a chained audit trail you
   can tamper with, four regimes mapped to controls, and the line between
   validated and aligned. Page-only figures. */

/* ── three laws ── */
.laws { margin-top: 44px; }
.lawp { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 24px 36px; align-items: center; margin-top: 14px; padding: 28px 30px; border: 1px solid var(--edge); border-radius: 16px; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(30, 120, 220, 0.12), transparent 70%), #070b12; }
.lawp > *, .reg > * { min-width: 0; }
.lawp h3 { margin: 0; font: 500 28px/1.15 var(--font-display); letter-spacing: -0.015em; color: var(--fg); text-wrap: balance; }
.lawp > div > p { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.lawp .frag { margin: 0; }
.lawp__gap { border-color: rgba(255, 69, 58, 0.35); background: linear-gradient(90deg, rgba(255, 69, 58, 0.09), transparent 75%); }
.runs { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: center; }
.runs > div { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--card); }
.runs small { font: 500 9.5px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.runs span { font-size: 13px; color: var(--muted); }
.runs code { margin-top: 4px; font: 500 15px var(--font-mono); color: var(--live); }
.runs > i { font: 400 30px/1 var(--font-display); font-style: normal; text-align: center; color: var(--live); text-shadow: 0 0 12px rgba(110, 231, 183, 0.7); }
.runs > p { grid-column: 1 / -1; margin: 14px 0 0; font: 600 10px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; text-align: center; color: var(--live); }
.trace { display: grid; margin: 0; padding: 0; list-style: none; }
.trace li { position: relative; display: flex; align-items: baseline; gap: 12px; padding: 12px 14px 12px 36px; border: 1px solid transparent; font-size: 14px; color: var(--muted); }
.trace li::before { content: ""; position: absolute; left: 13px; top: 17px; width: 9px; height: 9px; border: 1px solid rgba(92, 200, 255, 0.8); border-radius: 50%; }
.trace li + li::after { content: ""; position: absolute; left: 17px; top: -8px; height: 24px; width: 1px; background: rgba(92, 200, 255, 0.4); }
.trace b { flex: none; width: 112px; font: 500 10px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: #9fd8ff; }
.trace li.is-act { border-color: rgba(92, 200, 255, 0.45); border-radius: 10px; background: rgba(92, 200, 255, 0.08); color: #fff; }
.trace li.is-act::before { background: #5cc8ff; box-shadow: 0 0 10px #5cc8ff; }

/* ── the chained audit trail: change one entry, watch what stops linking ── */
.chain { margin-top: 44px; }
.chain > .kit-tabs { max-width: 560px; }
.chain__fig { margin-top: 14px; }
.chain__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chain__list li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(255, 255, 255, 0.025); transition: border-color 300ms ease, background-color 300ms ease; transition-delay: calc(var(--c) * 110ms); }
.chain__list li + li::before { content: ""; position: absolute; left: 24px; top: -11px; width: 1px; height: 10px; background: #5cc8ff; box-shadow: 0 0 6px rgba(92, 200, 255, 0.7); transition: background-color 300ms ease; transition-delay: inherit; }
.chain__n { font: 500 11px var(--font-mono); color: #9fd8ff; }
.chain__what { min-width: 0; font-size: 14px; color: var(--fg); }
.chain__what b { font-weight: 600; }
.chain__what .v-alt { display: none; color: #ff8a82; }
.chain__hash, .chain__prev { font: 500 11px var(--font-mono); white-space: nowrap; transition: color 300ms ease; transition-delay: inherit; }
.chain__hash { color: #9fd8ff; }
.chain__prev { color: var(--label); }
.chain__msg { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.chain__msg b { font-weight: 600; }
.chain__msg--ok { border: 1px solid rgba(110, 231, 183, 0.35); background: rgba(110, 231, 183, 0.06); }
.chain__msg--ok b { color: var(--live); }
.chain__msg--bad { border: 1px solid rgba(255, 69, 58, 0.4); background: rgba(255, 69, 58, 0.07); }
.chain__msg--bad b { color: #ff8a82; }
.chain[data-switch-current="tampered"] .is-target { border-color: rgba(255, 69, 58, 0.55); background: rgba(255, 69, 58, 0.08); }
.chain[data-switch-current="tampered"] .is-target .v-orig { display: none; }
.chain[data-switch-current="tampered"] .is-target .v-alt { display: inline; }
.chain[data-switch-current="tampered"] .is-target .chain__hash { color: #ff8a82; text-decoration: line-through; }
.chain[data-switch-current="tampered"] .is-after { border-color: rgba(255, 69, 58, 0.25); }
.chain[data-switch-current="tampered"] .is-after .chain__prev { color: #ff8a82; }
.chain[data-switch-current="tampered"] .is-after::before { background: repeating-linear-gradient(180deg, #ff8a82 0 2px, transparent 2px 4px); box-shadow: none; }
.chain + .edcview { margin-top: 36px; }

/* ── four regimes ── */
.regimes { margin-top: 44px; }
.reg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 36px; align-items: center; padding: 28px 30px; border: 1px solid var(--edge); border-radius: 16px; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(30, 120, 220, 0.12), transparent 70%), #070b12; }
.reg__what { margin: 0; font: 500 10px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: #9fd8ff; }
.reg h3 { margin: 10px 0 0; font: 500 30px/1.12 var(--font-display); letter-spacing: -0.015em; color: var(--fg); }
.reg > div > p:not(.reg__what) { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.reg__more { display: inline-block; margin-top: 16px; border-bottom: 1px solid rgba(159, 216, 255, 0.4); font-size: 14px; color: #9fd8ff; text-decoration: none; transition: color 160ms ease, border-color 160ms ease; }
.reg__more:hover { border-color: #fff; color: #fff; }
.reg__ctl { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.reg__ctl li { display: flex; align-items: baseline; gap: 14px; padding: 13px 14px; border: 1px solid rgba(110, 231, 183, 0.3); border-radius: 10px; background: rgba(110, 231, 183, 0.05); font-size: 13.5px; color: var(--fg); }
.reg__ctl code { flex: none; min-width: 84px; font: 500 10.5px var(--font-mono); color: var(--live); }
html.kit .reg.is-active .reg__ctl li { animation: kitIn 520ms var(--ease-out) both; animation-delay: 260ms; }
html.kit .reg.is-active .reg__ctl li:nth-child(2) { animation-delay: 360ms; }
html.kit .reg.is-active .reg__ctl li:nth-child(3) { animation-delay: 460ms; }

/* ── validated, aligned, yours ── */
.vline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 44px; }
.vline__col { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 24px; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--card); overflow: hidden; }
.vline__col--ok { border-color: rgba(110, 231, 183, 0.35); }
.vline__col h3 { margin: 16px 0 0; font: 500 22px/1.2 var(--font-display); color: var(--fg); }
.vline__col > p { margin: auto 0 0; padding-top: 16px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.vline__tests, .vline__docs { display: grid; gap: 8px; width: 100%; margin: 16px 0 0; padding: 0; list-style: none; }
.vline__tests li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--fg); }
.vline__tests li::before { content: ""; width: 16px; height: 16px; flex: none; border: 1px solid rgba(110, 231, 183, 0.6); border-radius: 50%; background: rgba(110, 231, 183, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.8 6.3 5 8.4 9.3 3.7' fill='none' stroke='%236ee7b7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat; }
.vline__docs li { padding: 10px 12px; border: 1px dashed rgba(236, 239, 244, 0.25); border-radius: 8px; font: 500 11px var(--font-mono); letter-spacing: 0.06em; color: var(--fg); }
.vline dl { display: grid; gap: 12px; width: 100%; margin: 16px 0 0; }
.vline dl div { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.vline dt { font: 500 11px var(--font-mono); letter-spacing: 0.12em; color: #9fd8ff; }
.vline dd { margin: 4px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

@media (max-width: 980px) {
  .lawp, .reg { grid-template-columns: 1fr; }
  .vline { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .lawp, .reg { padding: 22px 20px; }
  .lawp .frag__row { flex-wrap: wrap; white-space: normal; }
  .runs { grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr); }
  .runs > div { padding: 12px; }
  .runs code { font-size: 13px; }
  .trace b { width: 96px; }
  .chain__list li { grid-template-columns: 24px minmax(0, 1fr); gap: 4px 10px; }
  .chain__hash, .chain__prev { grid-column: 2; }
  .chain__list li + li::before { left: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .chain__list li, .chain__list li::before, .chain__hash, .chain__prev { transition: none; }
}

/* ══ The page's own world: the audit ledger. Tabular rows on hairlines, a
   chain that really links, the verification green carrying the page, faint
   ledger columns under everything. ══ */
.page-ledger { --led: #6ee7b7; --led-line: rgba(110, 231, 183, 0.2); --led-line-soft: rgba(255, 255, 255, 0.06); }
.page-ledger main { counter-reset: blk; background-image: repeating-linear-gradient(90deg, transparent 0 139px, rgba(110, 231, 183, 0.03) 139px 140px); }

/* the hero: a title line, then the ledger itself */
.ledger-hero { padding: 140px 0 72px; }
.ledger-hero__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 24px 64px; align-items: end; }
.ledger-hero .page-title { max-width: none; font-size: clamp(48px, 6.6vw, 98px); }
.ledger-hero .page-lede { margin-top: 0; }
.ledger { margin: 52px 0 0; border-top: 1px solid var(--led-line); border-bottom: 1px solid var(--led-line); animation: heroUp 0.9s var(--ease-out) 0.2s both; }
.ledger__head, .ledger__rows li { display: grid; grid-template-columns: 52px 112px 128px minmax(0, 1fr) 76px 88px 88px; gap: 0 18px; align-items: center; }
.ledger__head { padding: 11px 0; border-bottom: 1px solid var(--led-line); font: 600 9.5px var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(110, 231, 183, 0.78); }
.ledger__window { position: relative; height: 316px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent); }
.ledger__rows { margin: 0; padding: 0; list-style: none; animation: ledgerRoll 48s linear infinite; }
.ledger:hover .ledger__rows { animation-play-state: paused; }
@keyframes ledgerRoll { to { transform: translateY(-100%); } }
.ledger__rows li { min-height: 46px; border-bottom: 1px solid var(--led-line-soft); font: 400 12.5px var(--font-mono); color: rgba(255, 255, 255, 0.6); }
.ledger__rows li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger__rows li > span:first-child { color: rgba(110, 231, 183, 0.85); }
.ledger__rows li > span:nth-child(4) { font: 400 14px var(--font-ui); color: #fff; }
.ledger__rows code { font: 400 12px var(--font-mono); color: rgba(159, 216, 255, 0.85); }
.ledger__rows code + code { color: rgba(255, 255, 255, 0.4); }
.ledger__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 12px 0; font: 500 10px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); }
.ledger__ok { color: var(--led); }
.ledger__ok::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--led); box-shadow: 0 0 8px var(--led); vertical-align: 1px; }

/* every section opens as a block on the chain */
.page-ledger .section { counter-increment: blk; }
.page-ledger .section-head { max-width: none; }
.page-ledger .section-head > * { max-width: 760px; }
.page-ledger .section-head .kicker { display: flex; align-items: center; gap: 12px; color: var(--led); }
.page-ledger .section-head .kicker::before { content: "#" counter(blk, decimal-leading-zero); padding: 3px 8px; border: 1px solid var(--led-line); border-radius: 4px; font: 500 11px var(--font-mono); letter-spacing: 0.04em; color: var(--led); }
.page-ledger .section-head .kicker::after { content: ""; flex: 0 1 220px; height: 1px; background: repeating-linear-gradient(90deg, rgba(110, 231, 183, 0.55) 0 10px, transparent 10px 16px); }

/* the green of verification carries the page's own controls */
.page-ledger .kit-tabs > [data-switch-tab] > i { background: linear-gradient(90deg, rgba(110, 231, 183, 0.4), var(--led)); }
.page-ledger .kit-tabs > [data-switch-tab].is-active { background: linear-gradient(180deg, rgba(110, 231, 183, 0.08), transparent); }
.page-ledger .story__bar b { color: var(--led); }
.page-ledger .story, .page-ledger .lawp, .page-ledger .reg, .page-ledger .vline__col, .page-ledger .kit-tabs, .page-ledger .related a, .page-ledger .edcview__window { border-radius: 8px; }
.page-ledger .edcview .kit-tabs { border-radius: 8px 8px 0 0; }
.page-ledger .edcview__window { border-radius: 0 0 8px 8px; }

@media (max-width: 980px) {
  .ledger-hero__top { grid-template-columns: 1fr; }
  .ledger__head, .ledger__rows li { grid-template-columns: 48px minmax(0, 1fr) 80px; }
  .ledger__head span:nth-child(2), .ledger__head span:nth-child(3), .ledger__head span:nth-child(5), .ledger__head span:nth-child(7),
  .ledger__rows li > :nth-child(2), .ledger__rows li > :nth-child(3), .ledger__rows li > :nth-child(5), .ledger__rows li > :nth-child(7) { display: none; }
}
@media (max-width: 640px) {
  .ledger-hero { padding-top: 112px; }
  .ledger__window { height: 276px; }
  .ledger__rows li > span:nth-child(4) { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .ledger__rows { animation: none; } }
