/* Interactive blocks: module picker, audit proofs.
   Colors come from tokens only, so every palette variant applies. */

@keyframes stamp { from { transform: scale(1.5) rotate(-6deg); opacity: 0; } }

/* Module picker */
.mods { margin-top: 2.5rem; display: grid; gap: 0; }
@media (min-width: 900px) { .mods { grid-template-columns: 1fr 56px 1fr 56px 1fr; align-items: stretch; } }
.mod { display: grid; gap: .625rem; align-content: start; padding: 1.5rem; border-radius: var(--radius); background: var(--white); border: 2px solid var(--teal); transition: border-color var(--t-med), opacity var(--t-med), transform var(--t-med), box-shadow var(--t-med); box-shadow: var(--shadow-card); }
.mod .num { font: 400 var(--fs-label)/1 var(--font-mono); letter-spacing: .08em; color: var(--ocean); }
.mod .norn { font: 400 var(--fs-label)/1.4 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--soft); }
.mod p { color: var(--graphite); font-size: .9375rem; }
.mod.off { border-color: var(--border); border-style: dashed; box-shadow: none; }
.mod.off > :not(.mod-toggle):not(h3):not(.num) { opacity: .45; }
.mod-toggle { margin-top: .5rem; justify-self: start; display: inline-flex; align-items: center; gap: .625rem; min-height: 44px; padding: 0 1rem 0 .5rem; border-radius: 999px; border: 1px solid var(--border); font-weight: 600; font-size: .875rem; color: var(--navy); }
.mod-toggle i { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--teal); transition: background var(--t-fast); }
.mod-toggle i::after { content: ""; position: absolute; top: 3px; left: 19px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); transition: left var(--t-fast) var(--ease); }
.mod-toggle[aria-pressed="false"] i { background: var(--soft); }
.mod-toggle[aria-pressed="false"] i::after { left: 3px; }
.mod-toggle .t-on, .mod-toggle[aria-pressed="false"] .t-off { display: inline; }
.mod-toggle .t-off, .mod-toggle[aria-pressed="false"] .t-on { display: none; }
.mod-link { position: relative; min-height: 44px; display: grid; place-items: center; }
.mod-link::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: repeating-linear-gradient(180deg, var(--teal) 0 6px, transparent 6px 12px); background-size: 2px 12px; animation: flow-y 700ms linear infinite; }
@media (min-width: 900px) {
    .mod-link::before { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 2px; transform: translateY(-50%); background: repeating-linear-gradient(90deg, var(--teal) 0 6px, transparent 6px 12px); background-size: 12px 2px; animation-name: flow-x; }
}
@keyframes flow-x { to { background-position: 12px 0; } }
@keyframes flow-y { to { background-position: 0 12px; } }
.mod-link span { position: relative; z-index: 1; width: max-content; max-width: 104px; display: none; padding: .3rem .45rem; border-radius: 6px; background: var(--navy); color: var(--on-navy); font: 400 .625rem/1.2 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; text-align: center; }
.mod-link.ext span { display: block; animation: stamp 380ms var(--ease) both; }
.mod-link.none::before { animation: none; background: var(--border); }
.mods-out { margin-top: 1.5rem; padding: 1.25rem 1.5rem; border-radius: var(--radius); background: var(--navy); color: var(--on-navy); display: grid; gap: .875rem; }
.mods-out h3 { color: var(--on-navy); font-size: var(--fs-h3); }
.mods-out ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }
@media (min-width: 900px) { .mods-out ul { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1.5rem; } }
.mods-out li { font-size: .9375rem; color: var(--on-navy); animation: settle 320ms var(--ease) both; }
.mods-out li b { display: block; color: var(--on-navy); margin-bottom: .2rem; }
.mods-out li span { display: block; }
.mods-out li span::before { font: 400 .6875rem/1 var(--font-mono); letter-spacing: .05em; color: var(--on-navy); margin-right: .4rem; }
.mods-out li .in::before { content: "IN"; }
.mods-out li .out::before { content: "OUT"; }

/* Audit proofs */
.proofs { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
@media (min-width: 768px) { .proofs { grid-template-columns: repeat(2, 1fr); } }
.proof { display: grid; gap: .625rem; align-content: start; padding: 1.5rem; border-radius: var(--radius); background: var(--white); border: 1px solid var(--border); transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
.proof:hover { border-color: var(--teal); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.proof-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--teal) 10%, transparent); transition: transform var(--t-med) var(--ease); }
.proof-icon img { width: 32px; height: 32px; }
.proof:hover .proof-icon { transform: rotate(-6deg) scale(1.08); }
.proof > p { color: var(--graphite); font-size: .9375rem; }
.demo { margin-top: .5rem; padding: 1rem; border-radius: 12px; background: var(--cool-white); border: 1px solid var(--fog); font-size: .8125rem; display: grid; gap: .625rem; }
.demo-label { font: 400 .625rem/1 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--soft); }
.pills { display: flex; flex-wrap: wrap; gap: .375rem; }
.pill { min-height: 36px; padding: 0 .75rem; border-radius: 999px; border: 1px solid var(--border); background: var(--white); color: var(--muted); font-size: .8125rem; font-weight: 500; transition: all var(--t-fast); }
.pill:hover { border-color: var(--teal); }
.pill[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.sig { display: flex; gap: .625rem; align-items: center; min-height: 3rem; color: var(--graphite); }
.sig::before { content: "✓"; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: var(--white); font-weight: 700; font-size: .75rem; }
.sig.flash::before { animation: stamp 420ms var(--ease) both; }
.sig b { color: var(--navy); }
.trail { list-style: none; margin: 0; padding: 0; display: grid; gap: .375rem; }
.trail li { display: grid; grid-template-columns: 4.5rem 1fr; gap: .625rem; align-items: baseline; padding: .45rem .625rem; border-radius: 8px; background: var(--white); border: 1px solid var(--fog); transition: opacity var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.trail .who { font: 400 .625rem/1.4 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; margin: 0; padding: 0; border-radius: 0; background: none; } /* resets the .who block of who-its-for.html, which shares the class name */
.trail .ai .who { color: var(--ocean); }
.trail .hu .who { color: var(--success); }
.trail.f-ai .hu, .trail.f-hu .ai { opacity: .3; }
.trail.f-ai .ai, .trail.f-hu .hu { border-color: var(--teal); transform: translateX(4px); }
.host { display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; }
.host-box { padding: .75rem; border-radius: 10px; border: 1px solid var(--border); background: var(--white); display: grid; gap: .25rem; }
.host-box b { color: var(--navy); font-size: .8125rem; }
.host-box span { color: var(--muted); font-size: .75rem; }
.host-box.own { border-color: var(--teal); }
.host-wire { position: relative; height: 2px; background: var(--border); }
.host-wire::after { content: ""; position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: wire 1.8s var(--ease) infinite; }
.host-wire small { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); font: 400 .5625rem/1 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
@keyframes wire { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 50% { left: calc(100% - 8px); } 85% { opacity: 1; } 100% { left: 0; opacity: 0; } }
.host-none { color: var(--muted); }
.host-none::before { content: "✕ "; color: var(--amber); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
    .mod-link::before, .host-wire::after { animation: none; }
}

/* System map: QMS rail, checkpoint wires, module cards */
.sys { margin-top: 2.5rem; display: grid; gap: 0; }
.sys-presets { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.sys-rail { display: grid; gap: .15rem; justify-items: center; text-align: center; padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--navy); color: var(--on-navy); }
.sys-rail b { font: 700 1rem/1.3 var(--font-head, inherit); }
.sys-rail span { font-size: .8125rem; color: var(--on-navy); }
.sys-wire { position: relative; min-height: 76px; display: grid; grid-template-columns: 1fr 28px 1fr; align-items: center; gap: .5rem; font-size: .75rem; line-height: 1.3; color: var(--muted); }
.sys-wire::before, .sys-wire::after { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background-size: 2px 12px; }
.sys-wire::before { left: calc(50% + 5px); background-image: repeating-linear-gradient(180deg, var(--teal) 0 6px, transparent 6px 12px); animation: wire-up 700ms linear infinite; }
.sys-wire::after { left: calc(50% - 7px); background-image: repeating-linear-gradient(180deg, var(--amber) 0 6px, transparent 6px 12px); animation: wire-down 700ms linear infinite; display: none; }
.sys-wire.in::after { display: block; }
.sys-wire .w-in { grid-column: 1; text-align: right; color: var(--amber); font-weight: 600; }
.sys-wire .w-out { grid-column: 3; }
.sys-wire .w-out b { display: block; font: 400 .6875rem/1.4 var(--font-mono); letter-spacing: .06em; color: var(--ocean); }
.sys-wire.none::before, .sys-wire.none::after { animation: none; background-image: none; background-color: var(--border); }
.sys-wire.none::after { display: none; }
.sys-wire.none span { visibility: hidden; }
@keyframes wire-up { to { background-position: 0 -12px; } }
@keyframes wire-down { to { background-position: 0 12px; } }
.sys .mod { transition: border-color var(--t-med), opacity var(--t-med), transform var(--t-med); }
.sys .mod:not(.off):hover { transform: translateY(-3px); }
.sys .mod.bump { animation: stamp 380ms var(--ease) both; }
@media (min-width: 900px) {
    .sys { grid-template-columns: 1fr 56px 1fr 56px 1fr; }
    .sys-presets, .sys-rail { grid-column: 1 / -1; }
    .sys-rail { grid-row: 2; }
    .sys-wire { grid-row: 3; min-height: 92px; }
    .sys-wire:nth-of-type(3) { grid-column: 1; } .sys-wire:nth-of-type(5) { grid-column: 3; } .sys-wire:nth-of-type(7) { grid-column: 5; }
    .sys > .mod, .sys > .mod-link { grid-row: 4; }
    .sys > .mod:nth-of-type(1) { grid-column: 1; } .sys > .mod:nth-of-type(2) { grid-column: 3; } .sys > .mod:nth-of-type(3) { grid-column: 5; }
    .sys > .mod-link:nth-of-type(4) { grid-column: 2; } .sys > .mod-link:nth-of-type(6) { grid-column: 4; }
}
@media (max-width: 899px) {
    .sys-rail { position: sticky; top: 64px; z-index: 2; }
    .sys-wire { min-height: 64px; }
}
@media (prefers-reduced-motion: reduce) { .sys-wire::before, .sys-wire::after, .sys .mod.bump { animation: none; } .sys .mod:hover { transform: none; } }

/* Deviatta Insights preview */
.ins { margin-top: 2rem; padding: 1.25rem; border-radius: var(--radius); background: var(--white); border: 1px solid var(--border); box-shadow: 0 10px 30px color-mix(in srgb, var(--navy) 8%, transparent); }
@media (min-width: 768px) { .ins { padding: 1.75rem; } }
.ins-top { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.ins-panel { display: none; }
/* a grid child may shrink below its content, so nothing in the panel pushes the page wider than the screen */
.ins-panel > *, .ins-panel > * > *, .ins-where > *, .ins-split > *, .ins-filters > * { min-width: 0; }
.ins-panel.active { display: block; animation: settle 320ms var(--ease) both; }
.ins-tiles { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .ins-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ins-tile { display: grid; gap: .2rem; align-content: start; padding: 1rem; border-radius: 12px; background: var(--cool-white); border: 2px solid var(--fog); transition: border-color var(--t-fast), transform var(--t-fast); }
.ins-tile.hl { border-color: var(--teal); transform: translateY(-3px); }
.ins-tile .l { font: 400 .6875rem/1.3 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--soft); }
.ins-tile .v { font: 700 clamp(1.75rem, 5vw, 2.5rem)/1.1 var(--font-head, inherit); color: var(--navy); font-variant-numeric: tabular-nums; }
.ins-tile .u, .ins-tile .t, .ins-tile .d { font-size: .75rem; color: var(--muted); }
.ins-tile .d { color: var(--ocean); font-weight: 600; }
.ins-tile details { margin-top: .35rem; font-size: .75rem; color: var(--muted); }
.ins-tile summary { cursor: pointer; color: var(--ocean); min-height: 28px; }
.ins-sumbox { margin-top: 1.25rem; padding: 1rem 1.25rem; border-radius: 12px; background: var(--navy); }
.ins-sumbox .demo-label, .ins-sumbox .xfoot { color: var(--on-navy); }
.ins-sum { display: grid; gap: .25rem; margin: .5rem 0; }
.ins-sum button { text-align: left; min-height: 40px; padding: .35rem .5rem; border-radius: 8px; color: var(--on-navy); font-size: .9375rem; }
.ins.play .ins-sum button { animation: settle 360ms var(--ease) both; animation-delay: calc(var(--i) * 260ms); }
.ins-sum button:hover, .ins-sum button:focus-visible { background: color-mix(in srgb, var(--on-navy) 12%, transparent); }
.ins-sum button span { color: var(--on-navy); font-size: .8125rem; white-space: nowrap; }
.ins-chart { width: 100%; height: auto; display: block; margin-top: .5rem; }
.ins-lim { stroke: var(--border); stroke-width: 1; }
.ins-lim.u, .ins-lim.l { stroke: var(--amber); stroke-dasharray: 5 4; }
.ins-ax { font: 400 9px var(--font-mono); fill: var(--soft); }
.ins-line { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ins.play .ins-panel.active .ins-line { animation: ins-draw 1400ms var(--ease) both; }
@keyframes ins-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.ins-pt { fill: var(--white); stroke: var(--teal); stroke-width: 2.5; cursor: pointer; }
.ins-pt.out { fill: var(--amber); stroke: var(--amber); }
.ins-pt.sel { stroke: var(--navy); stroke-width: 3.5; }
.ins-pt:focus { outline: none; } .ins-pt:focus-visible { stroke: var(--navy); }
.ins-note { margin-top: 1rem; padding: .75rem 1rem; border-radius: 10px; background: var(--cool-white); border: 1px solid var(--fog); font-size: .9375rem; color: var(--muted); }
.ins-note b { color: var(--navy); margin-right: .35rem; }
.ins-where { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .ins-where { grid-template-columns: 1fr 1fr; } }
.ins-pareto { display: grid; gap: .3rem; margin-top: .5rem; }
.ins-bar-row { display: grid; grid-template-columns: 6.5rem 1fr 2rem; align-items: center; gap: .5rem; min-height: 40px; padding: 0 .5rem; border-radius: 8px; font-size: .875rem; color: var(--muted); text-align: left; border: 1px solid transparent; }
.ins-bar-row i { height: 14px; width: var(--w); border-radius: 4px; background: var(--soft); transition: width 500ms var(--ease), background var(--t-fast); }
.ins.play .ins-panel.active .ins-bar-row i { animation: ins-grow 600ms var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes ins-grow { from { width: 0; } }
.ins-bar-row b { text-align: right; color: var(--navy); font-variant-numeric: tabular-nums; }
.ins-bar-row:hover { border-color: var(--border); }
.ins-bar-row[aria-pressed="true"] { border-color: var(--teal); color: var(--navy); font-weight: 600; }
.ins-bar-row[aria-pressed="true"] i { background: var(--teal); }
.ins-heat { margin-top: .5rem; }
.ins-heat table { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: .75rem; }
.ins-heat th { font-weight: 500; color: var(--muted); text-align: left; padding: .25rem; white-space: nowrap; }
.ins-heat thead th { font: 400 .625rem/1.2 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; text-align: center; }
.ins-heat thead th.on { color: var(--navy); font-weight: 700; }
.ins-heat td { text-align: center; padding: .55rem .25rem; border-radius: 6px; color: var(--navy); font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--soft) calc(var(--a) * .45), var(--cool-white)); transition: background var(--t-med); }
.ins-heat td.on { background: color-mix(in srgb, var(--teal) calc(var(--a) * .6), var(--cool-white)); font-weight: 700; }
.ins-heat tr.dim td, .ins-heat tr.dim th { opacity: .35; }
.ins-roles { display: grid; gap: .75rem; margin-top: .75rem; }
.ins-role { display: grid; grid-template-columns: 5rem 1fr; align-items: center; gap: .75rem; font-size: .875rem; color: var(--navy); }
.ins-stack { display: flex; height: 30px; border-radius: 8px; overflow: hidden; background: var(--fog); }
.ins-stack i { width: var(--w); display: grid; place-items: center; font: 600 .75rem/1 var(--font-body); font-style: normal; color: var(--white); }
.ins.play .ins-panel.active .ins-stack i { animation: ins-grow 700ms var(--ease) both; }
.ins-stack .a, .k-a { --c: var(--navy); } .ins-stack .e, .k-e { --c: var(--teal); } .ins-stack .r, .k-r { --c: var(--amber); }
.ins-stack i { background: var(--c); }
.ins-key { margin-top: .875rem; }
@media (prefers-reduced-motion: reduce) { .ins.play .ins-panel.active .ins-line, .ins.play .ins-panel.active .ins-bar-row i, .ins.play .ins-panel.active .ins-stack i, .ins.play .ins-sum button, .ins-panel.active { animation: none; } }

/* Insights: process flow and drill-down */
.ins-head { margin: .5rem 0 1rem; color: var(--muted); }
.ins-head b { font-size: 1.25rem; color: var(--navy); }
.ins-head b.late, .ins-drill tr.late td b { color: var(--amber); }
.ins-flow { display: grid; gap: .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .ins-flow { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; } }
.ins-stage { position: relative; display: grid; gap: .15rem; align-content: start; text-align: left; padding: .75rem; border-radius: 12px; background: var(--cool-white); border: 2px solid var(--fog); transition: border-color var(--t-fast), transform var(--t-fast); }
.ins.play .ins-panel.active .ins-stage { animation: settle 360ms var(--ease) both; animation-delay: calc(var(--i) * 90ms); }
.ins-stage.cp { border-style: dashed; }
.ins-stage:hover { border-color: var(--teal); transform: translateY(-2px); }
.ins-stage[aria-pressed="true"] { border-color: var(--navy); border-style: solid; background: var(--white); }
.ins-stage .s { font: 400 .6875rem/1.3 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--ocean); }
.ins-stage b { font: 700 1.75rem/1.1 var(--font-head, inherit); color: var(--navy); font-variant-numeric: tabular-nums; }
.ins-stage .w { font-size: .6875rem; color: var(--muted); }
.ins-stage .l { justify-self: start; margin-top: .25rem; padding: .15rem .5rem; border-radius: 999px; font-size: .6875rem; font-weight: 600; background: var(--fog); color: var(--muted); }
.ins-stage .l.on, .ins-xrow em.on { background: color-mix(in srgb, var(--amber) 16%, var(--white)); color: var(--amber); }
@media (min-width: 900px) { .ins-stage:not(:last-child)::after { content: "→"; position: absolute; right: -1rem; top: 50%; width: 1rem; text-align: center; transform: translateY(-50%); color: var(--soft); } }
.ins-filters { display: grid; gap: 1rem; margin: 1.25rem 0; }
@media (min-width: 900px) { .ins-filters { grid-template-columns: 1.4fr 1fr; } }
.ins-filters .pills { margin-top: .375rem; }
.ins-split { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .ins-split { grid-template-columns: 1fr 1.25fr; } }
.ins-x { display: grid; gap: .25rem; margin-top: .5rem; }
.ins-xrow { display: grid; grid-template-columns: minmax(0, 9rem) 1fr 1.5rem auto; align-items: center; gap: .5rem; min-height: 40px; padding: 0 .5rem; border-radius: 8px; border: 1px solid transparent; font-size: .8125rem; color: var(--muted); text-align: left; }
.ins-xrow:hover { border-color: var(--border); }
.ins-xrow[aria-pressed="true"] { border-color: var(--teal); color: var(--navy); font-weight: 600; }
.ins-xrow i { height: 12px; width: var(--w); border-radius: 4px; background: linear-gradient(90deg, var(--amber) var(--l), var(--soft) var(--l)); }
.ins-xrow b { text-align: right; color: var(--navy); font-variant-numeric: tabular-nums; }
.ins-xrow em { font-style: normal; font-size: .6875rem; padding: .15rem .45rem; border-radius: 999px; background: var(--fog); white-space: nowrap; }
.ins-drill { margin-top: .5rem; }
.ins-drill table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.ins-drill th { font: 400 .625rem/1.2 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--soft); text-align: left; padding: .35rem .5rem; }
.ins-drill td { padding: .5rem; border-top: 1px solid var(--fog); color: var(--navy); vertical-align: top; }
.ins-drill td.id { font-family: var(--font-mono); font-size: .75rem; white-space: nowrap; }
.ins-drill small { display: block; color: var(--muted); font-size: .6875rem; }
.ins-drill tr.late td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
/* phones: the two tables fit the screen (the batch column is dropped, long labels wrap) */
@media (max-width: 599px) {
    .ins-drill table, .ins-heat table { table-layout: fixed; }
    .ins-drill th:nth-child(2), .ins-drill td:nth-child(2) { display: none; }
    .ins-drill th, .ins-drill td { padding: .4rem .25rem; overflow-wrap: anywhere; }
    .ins-drill th:first-child { width: 32%; }
    .ins-drill th:last-child { width: 15%; }
    .ins-drill td.id { white-space: normal; font-size: .6875rem; }
    .ins-heat table { border-spacing: 2px; }
    .ins-heat th { white-space: normal; overflow-wrap: anywhere; }
    .ins-heat thead th:first-child { width: 27%; }
    .ins-heat thead th { font-size: .5625rem; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) { .ins.play .ins-panel.active .ins-stage { animation: none; } .ins-stage:hover { transform: none; } }

/* Trust cards, second pass */
.proof { padding: 1.75rem; box-shadow: 0 10px 30px color-mix(in srgb, var(--navy) 6%, transparent); position: relative; overflow: hidden; }
.proof::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--teal), var(--ocean)); transform: scaleX(0); transform-origin: left; transition: transform 500ms var(--ease); }
.proof:hover::before, .proof:focus-within::before { transform: scaleX(1); }
.proof h3 { font-size: var(--fs-h3); }
.proof .demo { padding: 1.25rem; }
.sign-rail { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; margin: .25rem 0; }
.sign-rail::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 23px; height: 2px; background: repeating-linear-gradient(90deg, var(--teal) 0 6px, transparent 6px 12px); }
.pill.signer { position: relative; min-height: 0; padding: 0 0 .25rem; border: 0; border-radius: 12px; background: none; display: grid; justify-items: center; gap: .4rem; color: var(--muted); font-size: .75rem; }
.pill.signer i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 .8125rem/1 var(--font-head, inherit); font-style: normal; letter-spacing: .02em; background: var(--white); color: var(--navy); border: 2px solid var(--border); transition: all var(--t-med) var(--ease); }
.pill.signer:hover i { border-color: var(--teal); transform: translateY(-2px); }
.pill.signer[aria-pressed="true"] { background: none; color: var(--navy); font-weight: 700; }
.pill.signer[aria-pressed="true"] i { background: var(--navy); border-color: var(--navy); color: var(--on-navy); transform: scale(1.14); box-shadow: 0 0 0 5px color-mix(in srgb, var(--teal) 22%, transparent); }
.sig { padding: .875rem 1rem; border-radius: 10px; background: var(--white); border: 1px solid var(--fog); border-left: 4px solid var(--success); font-size: .9375rem; }
.ledger { position: relative; counter-reset: e; padding-left: 1.75rem; gap: .5rem; }
.ledger::before { content: ""; position: absolute; left: .5rem; top: .5rem; bottom: .5rem; width: 2px; background: var(--fog); }
.ledger li { position: relative; counter-increment: e; grid-template-columns: 5.25rem 1fr; padding: .6rem .75rem; }
.ledger li::before { content: ""; position: absolute; left: -1.6rem; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--white); border: 2.5px solid var(--ocean); }
.ledger li.hu::before { background: var(--navy); border-color: var(--navy); }   /* Brand Guide 1.2: a signal colour is never decoration; the dot marks the human entries, not a status */
.js .ledger li { opacity: 0; transform: translateX(-8px); }
.js .ledger.play li { opacity: 1; transform: none; transition: opacity 400ms var(--ease), transform 400ms var(--ease), border-color var(--t-fast); transition-delay: calc(var(--i) * 140ms), calc(var(--i) * 140ms), 0s; }
.js .ledger.play.f-ai .hu, .js .ledger.play.f-hu .ai { opacity: .3; transition-delay: 0s; }
.js .ledger.play.f-ai .ai, .js .ledger.play.f-hu .hu { transform: translateX(4px); transition-delay: 0s; }
.diff-btn { display: block; margin-top: .35rem; min-height: 32px; color: var(--ocean); font-weight: 600; font-size: .75rem; text-decoration: underline; text-underline-offset: 3px; }
.diff { display: none; margin-top: .35rem; padding: .6rem .75rem; border-radius: 8px; background: var(--cool-white); border: 1px solid var(--fog); color: var(--graphite); }
.open > .diff { display: block; animation: settle 320ms var(--ease) both; }
.diff ins { text-decoration: none; background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--navy); font-weight: 600; border-radius: 3px; padding: 0 .15em; }

/* Demo agenda */
.agenda { margin-top: 2.25rem; }
.agenda-grid { display: grid; gap: .625rem; margin-top: .75rem; }
@media (min-width: 768px) { .agenda-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .agenda-grid { grid-template-columns: repeat(3, 1fr); } }
.agenda-item { display: grid; grid-template-columns: 26px 1fr; gap: .75rem; align-items: start; text-align: left; min-height: 76px; padding: 1rem 1.125rem; border-radius: 12px; background: var(--cool-white); border: 2px solid var(--fog); color: var(--graphite); font-size: .9375rem; transition: all var(--t-fast); }
.agenda-item i { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--soft); display: grid; place-items: center; transition: all var(--t-fast); }
.agenda-item i::after { content: "✓"; font: 700 .8125rem/1 var(--font-body); font-style: normal; color: var(--white); transform: scale(0); transition: transform var(--t-med) var(--ease); }
.agenda-item:hover { border-color: var(--teal); transform: translateY(-2px); }
.agenda-item[aria-pressed="true"] { border-color: var(--navy); background: var(--white); color: var(--navy); font-weight: 600; box-shadow: var(--shadow-card); }
.agenda-item[aria-pressed="true"] i { background: var(--navy); border-color: var(--navy); }
.agenda-item[aria-pressed="true"] i::after { transform: scale(1); }
/* The demo agenda inside the contact section (home page) */
.agenda-note { margin-top: .75rem; font-size: var(--fs-small); }
.theme-navy .agenda-lead, .theme-navy .agenda-note { color: var(--on-navy); }
.contact-copy .agenda { margin-top: 1.75rem; }
.contact-copy .agenda-grid { grid-template-columns: 1fr; }
.contact-copy .agenda-item { min-height: 0; }
.contact-grid > .form { align-self: start; }
@media (prefers-reduced-motion: reduce) { .open > .diff { animation: none; } .js .ledger li { opacity: 1; transform: none; } .proof::before { transition: none; } }

/* About: the story as a timeline. The line of each step draws when the step comes into view */
.story { margin-top: 2.5rem; max-width: 46rem; display: grid; }
.story li { position: relative; padding: 0 0 2.25rem 2.25rem; }
.story li::before { content: ""; position: absolute; left: 6px; top: .5rem; bottom: -.5rem; width: 2px; background: var(--teal); transform-origin: top; }
.story li:last-child::before { display: none; }
.story li::after { content: ""; position: absolute; left: 0; top: .3rem; width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 3px solid var(--teal); }
.js .story li.reveal::before { transform: scaleY(0); transition: transform 900ms var(--ease) 300ms; }
.js .story li.reveal.visible::before { transform: scaleY(1); }
.story .when { font: 400 var(--fs-label)/1.4 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--ocean); }
.story h3 { font-size: var(--fs-h3); margin: .25rem 0 .5rem; }
.story li > p:last-child { color: var(--graphite); }
.story a { color: var(--ocean); font-weight: 600; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .js .story li.reveal::before { transform: none; transition: none; } }
.jr-play { margin-left: auto; min-height: 36px; padding: 0 .875rem; border-radius: 999px; border: 1px solid var(--navy-line); color: var(--on-navy); font: 400 var(--fs-label)/1 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; cursor: pointer; }
.jr-play:hover { border-color: var(--on-navy-muted); }

/* Chapter bar under the menu */
.chapbar { position: sticky; top: var(--nav-h); z-index: 40; background: var(--white); border-bottom: 1px solid var(--border); }
/* nothing on the site scrolls sideways: a row that does not fit wraps */
.chapbar .container { display: flex; flex-wrap: wrap; column-gap: .25rem; }
@media (max-width: 767px) {
    .chapbar a { padding: .5rem .5rem; font-size: .8125rem; border-bottom-width: 2px; }
}
/* A jump lands below the sticky chapter bar, so neither the back link (site.js) nor the heading is under it.
   The bar's real height: 55px from 768px (one row), 162px at 390px (it wraps); site.js sets the measured value. */
html:has(.chapbar) { --chapbar-h: 55px; }
@media (max-width: 767px) { html:has(.chapbar) { --chapbar-h: 162px; } }
.chapbar .container::-webkit-scrollbar { display: none; }
.chapbar a { flex: none; padding: .875rem .75rem; font-size: .875rem; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.chapbar a:hover { color: var(--navy); }
.chapbar a[aria-current] { color: var(--navy); border-bottom-color: var(--teal); }
[id] { scroll-margin-top: calc(var(--nav-h) + 3.5rem); }
/* a section brings its own top padding, so a menu link lands with the heading in view */
.section[id] { scroll-margin-top: 0; }
html:has(.chapbar) .section[id] { scroll-margin-top: var(--chapbar-h); }
/* a target inside a section has its back link just above it: the bar's height plus room for the link */
html:has(.chapbar) [id]:not(.section) { scroll-margin-top: calc(var(--chapbar-h) + 3rem); }

/* Where it fits */
.fit-steps { display: grid; gap: .75rem; margin-top: 1rem; }
.fit-steps dt { font: 400 var(--fs-label)/1.4 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--ocean); }
.fit-steps dd { color: var(--graphite); font-size: .9375rem; }

/* The round-trip to the QMS */
.trip { margin: 2rem 0; padding: 1.25rem; border-radius: var(--radius); background: linear-gradient(var(--navy-raise), var(--navy-raise)), var(--navy); color: var(--on-navy); border: 1px solid var(--navy-line); }
.trip-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.trip .pills { display: flex; flex-wrap: wrap; gap: .375rem; }
.trip .pill[aria-selected="true"] { background: var(--teal); border-color: var(--teal); color: var(--white); }
.trip-map { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; margin-top: 1.25rem; }
.trip-node { padding: .625rem .875rem; border-radius: var(--radius-sm); border: 1px solid var(--navy-line); background: var(--navy); color: var(--on-navy); font: 700 .9375rem/1 var(--font-display); }
.trip-node.q { border-color: var(--teal-bright); }
.trip-line { position: relative; height: 2px; background: var(--navy-line); }
.trip-line i { position: absolute; top: -5px; left: 0; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--teal-bright); animation: trip 2.6s var(--ease) infinite alternate; }
@keyframes trip { from { left: 0; } to { left: 100%; } }
.trip-panel { margin-top: 1.25rem; gap: 1rem; }
.js .trip-panel { display: none; }
.js .trip-panel.active { display: grid; animation: settle 420ms var(--ease) both; }
.trip-panel dt { font: 400 var(--fs-label)/1.4 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--on-navy); }
.trip-panel dd { margin-top: .25rem; color: var(--on-navy); }
@media (min-width: 768px) { .js .trip-panel.active, .trip-panel { grid-template-columns: repeat(3, 1fr); } .trip { padding: 1.75rem; } }
@media (prefers-reduced-motion: reduce) {
    .trip-line i { animation: none; left: 50%; }
    [data-play] { display: none; }
}

/* Module pages: the module between what it takes in and where it hands over; Insights as a layer on the picker */
.trip-map.solo { grid-template-columns: 1fr; justify-items: start; }
.trip-map.solo .trip-line { width: 2px; height: 1.25rem; margin-left: 1.25rem; }
.trip-map.solo .trip-line i { display: none; }
.trip-map.solo .trip-node.q { background: var(--teal); border-color: var(--teal); color: var(--white); }
@media (min-width: 768px) {
    .trip-map.solo { grid-template-columns: auto 1fr auto 1fr auto; justify-items: stretch; }
    .trip-map.solo .trip-line { width: auto; height: 2px; margin-left: 0; }
    .trip-map.solo .trip-line i { display: block; animation: trip 2.6s var(--ease) infinite; }
}
.ins-layer { display: grid; gap: .5rem; margin-top: 1.25rem; padding: 1.25rem 1.5rem; border-radius: var(--radius); border: 2px dashed var(--teal); background: var(--white); color: var(--graphite); text-decoration: none; justify-items: start; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.ins-layer:hover { border-style: solid; box-shadow: var(--shadow-card); }
.ins-layer b { font: 700 1.125rem/1.3 var(--font-display); color: var(--navy); }
.ins-layer .go { font-weight: 600; color: var(--ocean); }
.modlinks, .modnext { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin-top: 1.25rem; }
.modnext { margin-top: 0; justify-content: space-between; }
@media (prefers-reduced-motion: reduce) { .trip-map.solo .trip-line i { animation: none; } }

/* Role and partner switcher: pick one, the panel and the lit part of the path follow */
.who { margin-top: 2rem; padding: 1.25rem; border-radius: var(--radius); background: linear-gradient(var(--navy-raise), var(--navy-raise)), var(--navy); color: var(--on-navy); }
@media (min-width: 768px) { .who { padding: 2rem; } }
.who-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.who-hint { font: 400 var(--fs-label)/1.4 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--on-navy); }
.who-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.who-tab { display: grid; gap: .15rem; text-align: left; padding: .7rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--navy-line); background: var(--navy); color: var(--on-navy); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.who-tab span { font: 700 1rem/1.3 var(--font-display); color: var(--on-navy); }
.who-tab small { font-size: .8125rem; }
.who-tab:hover { border-color: var(--teal-bright); transform: translateY(-2px); }
.who-tab[aria-selected="true"] { background: var(--teal); border-color: var(--teal); color: var(--white); }
.who-tab[aria-selected="true"] span { color: var(--white); }
/* A row of tabs is always one row. Phone: names only, scrolled sideways. Tablet: equal widths, names only.
   Desktop: equal widths with the line under the name. */
.who-tabs[role="tablist"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 2px; }
.who-tabs[role="tablist"] .who-tab:last-child:nth-child(odd) { grid-column: 1 / -1; }
.who-tabs[role="tablist"]::-webkit-scrollbar { display: none; }
.who-tabs[role="tablist"] .who-tab { align-content: center; min-width: 0; }
.who-tabs[role="tablist"] .who-tab small { display: none; }
@media (min-width: 768px) {
    .who-tabs[role="tablist"] { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
    .who-tabs[role="tablist"] .who-tab:last-child:nth-child(odd) { grid-column: auto; }
    .who-tabs[role="tablist"] .who-tab { padding-inline: .75rem; }
    .who-tabs[role="tablist"] .who-tab span { font-size: .9375rem; }
}
@media (min-width: 1000px) {
    .who-tabs[role="tablist"] .who-tab { padding-inline: 1rem; }
    .who-tabs[role="tablist"] .who-tab span { font-size: 1rem; }
    .who-tabs[role="tablist"] .who-tab small { display: block; }
}
.who-panel { display: none; margin-top: 1.75rem; }
.who-panel.active { display: block; animation: settle 320ms var(--ease) both; }
.who-panel h3 { font-size: var(--fs-h3); color: var(--on-navy); max-width: 40rem; }
.who-track { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .625rem; }
.who-track span { padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--navy-line); font: 400 var(--fs-label)/1 var(--font-mono); letter-spacing: .05em; color: var(--on-navy); opacity: .55; }
.who-track span.on { opacity: 1; border-color: var(--teal-bright); background: var(--navy); color: var(--on-navy); }
.who-panel.active .who-track span.on { animation: wholit 420ms var(--ease) both; animation-delay: calc(var(--i) * 110ms + 150ms); }
@keyframes wholit { from { opacity: .3; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
.who-cols { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 768px) { .who-cols { grid-template-columns: repeat(var(--cols, 2), 1fr); } }
.who-col { padding: 1.25rem; border-radius: var(--radius-sm); background: var(--navy); border: 1px solid var(--navy-line); }
.who-col.now { border-color: var(--teal-bright); }
.who-col b { display: block; margin-bottom: .5rem; font: 400 var(--fs-label)/1.4 var(--font-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--on-navy); }
.who-col:not(.now) b { color: var(--on-navy); }
.who-col p { color: var(--on-navy); font-size: .9375rem; }
.who-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.25rem; }
.who-links a { color: var(--on-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .who-panel.active, .who-panel.active .who-track span.on { animation: none; } }

.who-col a { color: var(--on-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

