/* ---- /security: the homepage's parts (rule-card tiles, stage bezel, Rubber Segment, command band, Copy, card tables,
   setup disclosures) plus a React Bits Call Chip port for the checks. Tokens and spacing come from styles.css;
   code wells from docs.css. */

/* hero: the line on the left, the safety rules as the homepage's tiled cards on the right */
.shero { padding-top: var(--s-7); }
.shero-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--col-gap); row-gap: var(--s-6); align-items: start; }
.shero-copy { padding-top: var(--s-2); }
.sh1 { font-size: 3.5rem; max-width: 13ch; }
.shero-copy .note { margin-top: 0; }
.srules { margin-top: 0; }
@media (max-width: 1079px) { .shero-grid { grid-template-columns: minmax(0, 1fr); } .shero-copy { padding-top: 0; } }
@media (max-width: 767px) {
  .shero { padding-top: var(--s-6); }
  .sh1 { font-size: 2.375rem; line-height: 1.08; }
  .shero-grid { row-gap: var(--s-5); }
}

/* a section heading above its object */
.shead { display: flex; flex-direction: column; }

/* ---- verify: a flat bezel (DESIGN.md: only the stage and the analyst panel lean) */
.vstage { padding-top: var(--s-6); }
.vstage .stage-scene { width: 100%; margin-inline: 0; perspective: none; }
.vstage .stage-lean { --tilt: 0deg; transform: none; }
.vrail { flex-wrap: nowrap; }
.vseg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vseg .seg-item { height: 2.25rem; padding: 0 var(--s-4); }
.vcap code { font: 500 0.75rem var(--font-mono); color: var(--ink); }
html:not(.js) .vseg { display: none; }

.vpanes { display: grid; }
.vpane { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; padding: var(--s-5) var(--s-6) var(--s-6); }
.vpane:focus-visible { outline-offset: -3px; border-radius: 0.75rem; }
/* without scripts every check reads one under the other */
html:not(.js) .vpane + .vpane { border-top: 1px solid var(--line); }
/* with scripts the three panes share one cell, so switching never moves the page */
html.js .vpane { grid-area: 1 / 1; transition: opacity 200ms var(--ease-smooth); }
html.js .vpane[data-off] { visibility: hidden; opacity: 0; }
.vhead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
.vname { margin: 0; font: 600 1.625rem/1.15 var(--font-mono); letter-spacing: -0.03em; color: var(--ink); }
.vbadge { display: inline-flex; align-items: center; height: 1.375rem; padding: 0 var(--s-2); border-radius: 4px; font: 500 0.75rem var(--font-mono); white-space: nowrap; color: var(--ink-2); background: #151b17; box-shadow: inset 0 0 0 1px var(--line-strong); }
.vdesc { margin: 0; max-width: 64ch; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); }
.vdesc code, .vexpect code { padding: 0 0.3125rem; border-radius: 4px; background: rgb(237 242 238 / 0.05); box-shadow: inset 0 0 0 1px var(--line); font: 400 0.8125rem var(--font-mono); color: var(--ink); overflow-wrap: anywhere; }
.vlabel { margin: var(--s-2) 0 0; font: 500 0.75rem var(--font-mono); color: var(--ink-3); }
/* the command band runs the pane's full width, hairlines above and below, as on the installer */
.vcmd { flex: none; margin-inline: calc(-1 * var(--s-6)); padding-left: var(--s-6); }
.vcode { margin: 0; }
.vexpect { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3); margin: var(--s-1) 0 0; font-size: 0.875rem; line-height: 1.55; color: var(--ink-2); }
.vexpect .vlabel { margin: 0; }
.vproof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin: var(--s-3) 0 0; padding-top: var(--s-4); border-top: 1px solid var(--line); }
.vproof div { display: flex; flex-direction: column; gap: var(--s-1); }
.vproof dt { font: 500 0.75rem var(--font-mono); color: var(--ink-3); }
.vproof dd { margin: 0; font-size: 0.875rem; line-height: 1.55; color: var(--ink); max-width: 46ch; }
.vproof div + div dd { color: var(--ink-2); }
.vcaption { justify-content: flex-start; flex-wrap: wrap; gap: var(--s-2) var(--s-5); text-align: left; }
.vcaption code { color: var(--ink-2); }
.vcaption a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 0.35em; transition: color 200ms var(--ease-smooth), text-decoration-color 200ms var(--ease-smooth); }
@media (hover: hover) { .vcaption a:hover { color: var(--ink); text-decoration-color: var(--pop-up); } }

@media (max-width: 1023px) { .vrail { flex-wrap: wrap; } .vseg { width: 100%; } }
@media (max-width: 767px) {
  .vseg .seg-item { height: 2.75rem; padding: 0 var(--s-2); }
  .vcap { min-height: 0; }
  .vpane { padding: var(--s-4); }
  .vcmd { margin-inline: calc(-1 * var(--s-4)); padding-left: var(--s-4); }
  .vname { font-size: 1.375rem; }
  .vproof { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
}

/* ---- scans: heading left, the chips and what a release carries on the right (the homepage safety split) */
.sscans { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--col-gap); row-gap: var(--s-6); align-items: start; }
.sscans-body { display: flex; flex-direction: column; gap: var(--s-6); min-width: 0; }
.sscans-body .note { margin: 0; }
@media (max-width: 991px) { .sscans { grid-template-columns: minmax(0, 1fr); } }

/* React Bits Call Chip, as a link: a fill wipes across while it "runs", then washes away as the tool glyph rolls
   out and the link mark rolls in. Neutral ink throughout: it says what runs and when, not that it passed. */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.chip { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: var(--s-2); height: 2.75rem; padding: 0 var(--s-4) 0 var(--s-3); border-radius: 10px; overflow: hidden; background: #101411; box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 1px 0 rgb(255 255 255 / 0.04); font: 500 0.8125rem/1 var(--font-mono); font-feature-settings: "liga" 0; color: var(--ink); white-space: nowrap; transition: box-shadow 200ms var(--ease-smooth), transform 160ms var(--ease-punch); }
@media (hover: hover) { .chip:hover { box-shadow: inset 0 0 0 1px #3a4c41, inset 0 1px 0 rgb(255 255 255 / 0.06); } .chip:hover .chip-name { text-decoration-color: var(--pop-up); } }
.chip:active { transform: scale(0.97); }
.chip:focus-visible { outline-offset: 2px; }
.chip-fill { position: absolute; inset: 0; z-index: -1; background: rgb(237 242 238 / 0.07); transform: scaleX(0); transform-origin: left center; clip-path: inset(0 0 0 0); pointer-events: none; }
.chip[data-status='running'] .chip-fill { transform: scaleX(0.9); transition: transform var(--run, 900ms) linear; }
.chip[data-status='done'] .chip-fill { transform: scaleX(1); clip-path: inset(100% 0 0 0); transition: transform 200ms var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)), clip-path 400ms var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)) 200ms; }
.chip-slot { position: relative; flex: none; width: 0.9375rem; height: 0.9375rem; overflow: hidden; color: var(--ink-3); }
.chip-g { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: opacity 240ms var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)), transform 240ms var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)), filter 240ms var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)); }
/* the resting state (and the page without scripts) shows the link mark */
.chip-g-tool { opacity: 0; transform: translateY(-70%); filter: blur(3px); }
.chip[data-status='idle'] .chip-g-tool, .chip[data-status='running'] .chip-g-tool { opacity: 1; transform: none; filter: none; }
.chip[data-status='idle'] .chip-g-link, .chip[data-status='running'] .chip-g-link { opacity: 0; transform: translateY(70%); filter: blur(3px); }
.chip-name { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.35em; transition: text-decoration-color 200ms var(--ease-smooth); }
.chip-arg { font-weight: 400; color: var(--ink-2); }
.chip-when { align-self: stretch; display: inline-flex; align-items: center; margin-left: var(--s-1); padding-left: var(--s-3); border-left: 1px solid var(--line-strong); font-weight: 400; font-size: 0.75rem; color: var(--ink-3); }
@media (max-width: 639px) {
  .chips { flex-direction: column; gap: var(--s-2); }
  .chip { display: flex; }
  .chip-arg { display: none; }
  .chip-when { margin-left: auto; }
}

/* ---- card tables (the homepage sources table), with a mono caption inside the card */
.stable { width: 100%; }
.stable-cap { caption-side: top; padding: var(--s-4) 0 var(--s-2); text-align: left; font: 500 0.75rem var(--font-mono); color: var(--ink-3); }
.stable th, .stable td { vertical-align: baseline; }
.stable tbody th { font-weight: 500; color: var(--ink); white-space: nowrap; }
.stable tbody th code { font: 500 0.8125rem var(--font-mono); color: var(--ink); }
.stable td, .stable td:last-child { font: 400 0.9375rem/1.55 var(--font-sans); color: var(--ink-2); text-align: left; white-space: normal; }
.stable tbody th { width: 34%; padding-right: var(--s-4); }
.stable thead th:last-child, .stable td:last-child { text-align: left; }
.stable td code { padding: 0 0.3125rem; border-radius: 4px; background: rgb(237 242 238 / 0.05); box-shadow: inset 0 0 0 1px var(--line); font: 400 0.75rem var(--font-mono); white-space: nowrap; }
@media (max-width: 767px) {
  .stable thead { display: none; }
  .stable tr { display: flex; flex-direction: column; gap: var(--s-1); padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
  .stable tbody tr:last-child { border-bottom: 0; }
  .stable th, .stable td { display: block; padding: 0; border: 0; white-space: normal; }
  .stable tbody th code { overflow-wrap: anywhere; }
}

/* ---- report: what to do on the left, the targets and scope on the right */
.sreport { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--col-gap); row-gap: var(--s-6); align-items: start; padding-bottom: var(--section); }
.sreport-act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-top: var(--s-6); }
.sreport-copy .note code { color: var(--ink); font: 500 0.8125rem var(--font-mono); }
.slink { display: inline-flex; align-items: center; min-height: 2.75rem; font: 500 0.8125rem var(--font-mono); color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 0.35em; transition: color 200ms var(--ease-smooth), text-decoration-color 200ms var(--ease-smooth); }
@media (hover: hover) { .slink:hover { color: var(--ink); text-decoration-color: var(--pop-up); } }
.sreport-side { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 991px) { .sreport { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  .chip-fill, .chip-g, html.js .vpane { transition: none !important; }
}
