/* Safe (part four: Build · Run · Prove · Safe): the /safety page, the home section and the console's Safe
   view. Paper and ink, one accent, hairlines, square corners, the design-tool selection box; no glow, no
   glass, no gradient text, no entrance animations, no count-ups. Never colour alone: every state is also
   a word. Text colours >= 4.5:1 on #f4f1ea and #fbfaf6 (ink #161513, ink-2 #45413a, ink-3 #635e55,
   accent text #b8360e). */

/* ---------------------------------------------------------------- hero: copy above the run's board */
.sf-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.sf-hero-copy { max-width: 860px; }
.sf-sheet { overflow: hidden; }
.sf-frames { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding: 18px 16px 14px; }
.sf-frame { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 96px; padding: 10px 12px 11px 14px; text-align: left;
  background: var(--card-bg); border: 1px solid var(--rule-2); border-radius: 2px; color: var(--ink); font: inherit; cursor: pointer; }
.sf-frame::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 4px; background: var(--ink); }
.sf-frame.t-no::before { background: repeating-linear-gradient(180deg, var(--acc-ink) 0 3px, transparent 3px 6px); }
.sf-frame:hover { border-color: var(--ink); }
.sf-frame:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; }
.sf-frame.is-sel { border-color: var(--ink); }
.sf-frame .bd-sel { inset: -7px; }
.sf-frame.is-sel .bd-sel { display: block; }
.sf-k { font: 500 11px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.sf-k b { color: var(--acc-ink); font-weight: 500; }
.sf-v { font: 650 17px/1.2 var(--display); letter-spacing: -.01em; }
.t-no .sf-v { color: var(--acc-ink); }
.sf-s { font-size: 12.5px; line-height: 1.35; color: var(--ink-3); overflow-wrap: anywhere; }

.sf-detail { border-top: 1px solid var(--rule-2); background: var(--paper); padding: 16px; min-height: 220px; }
.sf-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sf-pane { min-width: 0; border: 1px solid var(--rule-2); background: var(--card-bg); }
.sf-pane-h { margin: 0; padding: 7px 10px; border-bottom: 1px solid var(--rule); font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.sf-one .sf-pane-h { padding: 0 0 8px; border: 0; }
.sf-text { margin: 0; padding: 10px; font: 400 12.5px/1.55 var(--mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.sf-pii { background: var(--acc-soft); color: #7a2207; border-bottom: 1px solid var(--acc-ink); padding: 0 1px; }
.sf-ph { background: var(--ink); color: var(--paper); padding: 0 3px; }
.sf-note { margin: 12px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); max-width: 900px; }
.sf-one { max-width: 860px; }
.sf-meter { height: 14px; border: 1px solid var(--ink); background: var(--card-bg); }
.sf-meter span { display: block; height: 100%; background: repeating-linear-gradient(135deg, var(--acc-ink) 0 3px, var(--acc) 3px 6px); }
.sf-meter-l { margin: 6px 0 0; font-size: 12px; color: var(--ink-2); }
.sf-quote { margin: 14px 0 0; padding-left: 12px; border-left: 2px solid var(--acc); font: 500 16px/1.45 var(--display); color: var(--ink); }
.sf-dl { margin: 0; display: grid; gap: 8px; }
.sf-dl div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; }
.sf-dl dt { font: 500 11.5px/1.6 var(--mono); color: var(--ink-3); }
.sf-dl dd { margin: 0; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.sf-dl dd.mono { font: 500 12px/1.6 var(--mono); }
.sf-log { flex-wrap: wrap; }
.sf-good { color: var(--ink); }
.sf-good::before { content: "✓ "; font-weight: 700; }
.sf-bad { color: var(--acc-ink); }

/* ---------------------------------------------------------------- the policy catalogue */
.sf-rules { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; }
.sf-cat h3 { margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); font: 500 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.sf-cat ul { list-style: none; margin: 0; padding: 0; }
.sf-rule { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.sf-rule p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.sf-rule-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sf-rule-h b { font-size: 15px; font-weight: 600; color: var(--ink); }
.sf-th { font: 500 12px/1.5 var(--mono) !important; color: var(--ink-3) !important; }
.sf-code { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-code code { font: 500 11.5px/1.5 var(--mono); padding: 1px 6px; border: 1px solid var(--rule-2); background: var(--card-bg); color: var(--ink); overflow-wrap: anywhere; }
.sf-tag { flex: none; padding: 1px 7px; font: 500 11px/1.6 var(--mono); border: 1px solid var(--ink); color: var(--ink); white-space: nowrap; }
.sf-tag.t-lock, .sf-tag.s-covered { background: var(--ink); color: var(--paper); }
.sf-tag.t-on { background: var(--card-bg); }
.sf-tag.t-off { border-style: dashed; color: var(--ink-2); }
.sf-tag.s-partial { border-color: var(--acc-ink); color: var(--acc-ink); background: var(--acc-soft); }
.sf-tag.s-gap { background: repeating-linear-gradient(135deg, rgb(22 21 19 / .14) 0 1.5px, transparent 1.5px 5px); }

/* ---------------------------------------------------------------- the coverage map */
.sf-cov { margin-top: 28px; }
.sf-cov-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.sf-cov-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.sf-cov-id { margin: 2px 0 0; font-size: 13px; color: var(--acc-ink); }
.sf-cov-main p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); max-width: 900px; }
.sf-gap b { color: var(--acc-ink); font-weight: 600; }

/* ---------------------------------------------------------------- the home section */
.sf-strip { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule-2); background: var(--card-bg); }
.sf-strip-i { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px 18px; border-left: 1px solid var(--rule); }
.sf-strip-i:first-child { border-left: 0; }
.sf-strip-i::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ink); }
.sf-strip-i.t-no::before { background: repeating-linear-gradient(180deg, var(--acc-ink) 0 3px, transparent 3px 6px); }
.sf-limits li b { display: block; }

@media (max-width: 1100px) {
  .sf-frames, .sf-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-strip-i:nth-child(3) { border-left: 0; }
  .sf-strip-i:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .sf-cols { grid-template-columns: 1fr; }
  .sf-rules { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .sf-frame .bd-sel b { display: none; }   /* the frame says its state in words; no room for the tag */
  .sf-frames { gap: 14px; padding: 14px 12px 12px; }
  .sf-frame { min-height: 88px; padding: 9px 10px 10px 12px; }
  .sf-v { font-size: 15px; }
  .sf-strip { grid-template-columns: 1fr; }
  .sf-strip-i { border-left: 0; border-top: 1px solid var(--rule); }
  .sf-strip-i:first-child { border-top: 0; }
  .sf-detail { padding: 12px; }
  .sf-dl div { grid-template-columns: 1fr; gap: 2px; }
  .sf-cov-row { grid-template-columns: 1fr; gap: 2px; }
  .sf-log .fp-btn { width: 100%; }
}

/* ---------------------------------------------------------------- the console's Safe view */
.sfc { display: grid; gap: 18px; }
.sfc-stop { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border: 1px solid var(--ink); background: var(--card-bg); }
.sfc-stop.is-on { border: 2px solid var(--acc-ink); background: var(--acc-soft); }
.sfc-stop h3 { margin: 0; font: 650 19px/1.2 var(--display); color: var(--ink); }
.sfc-stop p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.sfc-stop form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.sfc-stop input[type=text] { min-height: 44px; min-width: 220px; padding: 8px 10px; border: 1px solid var(--rule-2); background: var(--card-bg); color: var(--ink); font: inherit; }
.sfc-btn { min-height: 44px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 4px; background: var(--card-bg); color: var(--ink); font: 550 14px/1.2 var(--sans); cursor: pointer; }
.sfc-btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.sfc-btn.ink { background: var(--ink); color: var(--paper); }
.sfc-btn.stop { background: var(--acc-ink); border-color: var(--acc-ink); color: #fff; }
.sfc-btn.stop:hover:not(:disabled) { background: #8f2a0b; }
.sfc-btn:disabled { opacity: .5; cursor: not-allowed; }
.sfc-btn:focus-visible, .sfc input:focus-visible, .sfc select:focus-visible, .sfc-tabs button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.sfc-caught { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--rule-2); background: var(--card-bg); }
.sfc-caught div { padding: 12px 14px; border-left: 1px solid var(--rule); min-width: 0; }
.sfc-caught div:first-child { border-left: 0; }
.sfc-caught b { display: block; font: 650 24px/1.1 var(--display); color: var(--ink); }
.sfc-caught span { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.sfc-tabs { display: flex; flex-wrap: wrap; border: 1px solid var(--rule-2); border-bottom: 0; width: fit-content; max-width: 100%; background: var(--paper); }
.sfc-tabs button { min-height: 44px; padding: 10px 14px; border: 0; border-right: 1px solid var(--rule); background: transparent; color: var(--ink-2); font: 550 14px var(--sans); cursor: pointer; }
.sfc-tabs button[aria-selected=true] { background: var(--card-bg); color: var(--ink); box-shadow: inset 0 -2px 0 var(--acc); }
.sfc-panel { border: 1px solid var(--rule-2); background: var(--card-bg); padding: 16px 18px; min-width: 0; }
.sfc-panel h4 { margin: 18px 0 8px; font: 500 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.sfc-panel h4:first-child { margin-top: 0; }
.sfc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sfc-table th { text-align: left; padding: 6px 8px; font: 500 11px/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--ink); }
.sfc-table td { padding: 8px; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink); overflow-wrap: anywhere; }
.sfc-table .mono, .sfc-panel .mono { font: 500 12px/1.5 var(--mono); }
.sfc-wrap { overflow-x: auto; }
.sfc-rule { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.sfc-rule p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.sfc-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.sfc-ctl input[type=number], .sfc-ctl input[type=text], .sfc-form input, .sfc-form select { min-height: 44px; padding: 8px 10px; border: 1px solid var(--rule-2); background: var(--paper); color: var(--ink); font: inherit; width: 150px; }
.sfc-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.sfc-switch input { width: 20px; height: 20px; accent-color: #161513; }
.sfc-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.sfc-note { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.sfc-tree { list-style: none; margin: 0; padding: 0; }
.sfc-tree li { position: relative; margin: 0 0 6px; padding: 7px 10px 8px 14px; border: 1px solid var(--rule-2); background: var(--paper); }
.sfc-tree li::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 3px; background: var(--ink); }
.sfc-tree li.k-model-call::before, .sfc-tree li.k-safety::before { background: var(--acc-ink); }
.sfc-tree ul { list-style: none; margin: 6px 0 0 18px; padding: 0 0 0 10px; border-left: 1px dashed var(--rule-2); }
.sfc-tree .sfc-kind { font: 500 10.5px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-right: 6px; }
.sfc-ev { list-style: none; margin: 0; padding: 0; }
.sfc-ev li { display: grid; grid-template-columns: 150px 140px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.sfc-ev .mono { color: var(--ink-3); }
.sfc-out-refused { color: var(--acc-ink); font-weight: 600; }
@media (max-width: 900px) {
  .sfc-stop { grid-template-columns: 1fr; }
  .sfc-stop form { justify-content: flex-start; }
  .sfc-caught { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sfc-caught div:nth-child(odd) { border-left: 0; }
  .sfc-caught div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .sfc-rule { grid-template-columns: 1fr; }
  .sfc-ctl { justify-content: flex-start; }
  .sfc-ev li { grid-template-columns: 1fr; gap: 2px; }
  .sfc-stop input[type=text] { min-width: 0; width: 100%; }
  .sfc-tabs { width: 100%; }
  .sfc-tabs button { flex: 1 1 33%; border-bottom: 1px solid var(--rule); }
}
.sfc-table .sfc-btn { white-space: nowrap; }

/* ================================================================== Safe, redesigned (safety.js · sg-)
   The gate replays a recorded run: one orchestrated motion (the packet crossing the wall); everything else
   changes state without entrance effects. Reduced motion: no transitions, steps by click. */
.sg-hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: 36px; align-items: start; padding-top: 48px; }
.sg-copy .fp-lede { max-width: 560px; }
.sg-stage { min-width: 0; }
.sg-gate { display: grid; }
.sg-bar { border-bottom: 1px solid var(--rule); }
.sg-lanes { display: grid; grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr); background-image: linear-gradient(var(--grid-line, rgb(22 21 19 / .055)) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line, rgb(22 21 19 / .055)) 1px, transparent 1px); background-size: 22px 22px; }
.sg-lane { min-width: 0; padding: 14px 16px 16px; }
.sg-lane-h { margin: 0 0 8px; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sg-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 var(--mono); color: var(--ink); background: var(--card-bg, #fbfaf6); border: 1px solid var(--rule); padding: 12px; min-height: 13.5em; }
.sg-pii { background: #f9dccf; color: var(--ink); padding: 0 2px; }
.sg-pii.is-now { background: var(--ink); color: var(--paper, #f4f1ea); }
.sg-pii.is-out { background: transparent; color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--acc-ink, #b8360e); }
.sg-ph { color: var(--acc-ink, #b8360e); font-weight: 600; }
.sg-wait { color: var(--ink-3); letter-spacing: .08em; }
.sg-back { background: rgb(29 122 74 / .12); color: #145a36; padding: 0 2px; }
.sg-wall { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 14px 0; border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); background: var(--paper, #f4f1ea); overflow: visible; z-index: 2; }
.sg-wall-k { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.sg-wall-n { font-size: 12px; color: var(--ink-2); }
.sg-packet { position: absolute; z-index: 3; box-shadow: 0 0 0 2px var(--paper, #f4f1ea); top: 50%; left: 50%; min-width: 64px; padding: 4px 6px; transform: translate(-150%, -50%); background: var(--ink); color: var(--paper, #f4f1ea); font: 600 11px var(--mono); text-align: center; opacity: 0; white-space: nowrap; }
.sg-packet.is-on { opacity: 1; animation: sg-cross 900ms cubic-bezier(.45, 0, .25, 1) both; }
@keyframes sg-cross { 0% { transform: translate(-150%, -50%); background: #f9dccf; color: var(--ink); } 50% { background: var(--ink); color: var(--paper, #f4f1ea); } 100% { transform: translate(50%, -50%); background: var(--acc-ink, #b8360e); color: #fff; } }
.sg-swaps { list-style: none; margin: 0; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; border-top: 1px solid var(--rule); min-height: 44px; font: 12.5px var(--mono); }
.sg-swaps li { display: inline-flex; gap: 6px; align-items: baseline; color: var(--ink-2); }
.sg-arrow { color: var(--ink-3); }
.sg-ctl { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--rule); }
.sg-cap { margin: 0; font-size: 14.5px; color: var(--ink); flex: 1 1 280px; }
.sg-btns { display: flex; gap: 8px; align-items: center; }
.sg-prog { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.sg-gate.is-compact .sg-text { min-height: 11.5em; font-size: 12.5px; }

/* the four scenarios */
.sg-scenes { margin-top: 28px; }
.sg-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.sg-tabs [role=tab] { display: grid; gap: 2px; text-align: left; min-height: 64px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.sg-tabs [role=tab] + [role=tab] { border-left: 1px solid var(--rule); }
.sg-tabs [role=tab][aria-selected=true] { background: var(--card-bg, #fbfaf6); box-shadow: inset 0 -3px 0 var(--acc, #e5481c); }
.sg-tabs [role=tab]:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.sg-tabs b { font-size: 12px; color: var(--ink-2); }
.sg-tabs span { font-size: 15px; font-weight: 600; }
.sg-tabs .sg-tab-s { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 500; }
.sg-panel { margin-top: 16px; padding: 18px 20px; }
.sg-sc-lede { margin: 0 0 14px; font-size: 16px; max-width: 760px; }
.sg-meter { position: relative; height: 22px; border: 1px solid var(--ink); background: var(--card-bg, #fbfaf6); max-width: 720px; }
.sg-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); transition: width 900ms cubic-bezier(.3, 0, .2, 1); }
.sg-fill.is-full { width: var(--w); background: linear-gradient(90deg, var(--ink) 0, var(--ink) 92%, var(--acc-ink, #b8360e) 92%); }
.sg-cap-line { position: absolute; top: -8px; bottom: -8px; width: 2px; background: var(--acc-ink, #b8360e); }
.sg-cap-line b { position: absolute; top: -20px; left: 6px; background: var(--paper, #f4f1ea); padding: 0 3px; font-size: 11px; color: var(--acc-ink, #b8360e); white-space: nowrap; }
.sg-meter-l { margin: 8px 0 14px; font-size: 12.5px; color: var(--ink-2); }
.sg-call { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; gap: 12px; align-items: center; max-width: 720px; padding: 10px 12px; border: 1px solid var(--rule-2, rgb(22 21 19 / .26)); background: var(--card-bg, #fbfaf6); font-size: 14px; }
.sg-call .mono { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.sg-verdict { font: 600 12px var(--mono); color: var(--ink-2); }
.sg-call.is-bounced { border-color: #a3242c; animation: sg-bounce 520ms cubic-bezier(.3, 0, .2, 1) 300ms both; }
.sg-call.is-bounced .sg-verdict { color: #7d1b21; }
@keyframes sg-bounce { 0% { transform: translateX(0); } 45% { transform: translateX(18px); } 70% { transform: translateX(-6px); } 100% { transform: translateX(0); } }
.sg-quote { margin: 14px 0 0; font-size: 15px; color: var(--ink); border-left: 3px solid #a3242c; padding-left: 12px; max-width: 760px; overflow-wrap: anywhere; }
.sg-note { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); max-width: 760px; }
.sg-diff { margin: 0 0 12px; padding: 12px; max-width: 720px; overflow-x: auto; background: var(--card-bg, #fbfaf6); border: 1px solid var(--rule); font: 13px/1.7 var(--mono); color: var(--ink); }
.sg-diff:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sg-add { display: inline-block; background: rgb(163 36 44 / .1); color: #7d1b21; font-weight: 600; }
.sg-dl { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0 0 12px; font-size: 13px; }
.sg-dl div { display: flex; gap: 8px; } .sg-dl dt { color: var(--ink-3); } .sg-dl dd { margin: 0; }
.sg-switch-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 14px; }
.sg-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px 6px 6px; border: 1px solid var(--ink); background: var(--card-bg, #fbfaf6); color: var(--ink); font: 600 14px var(--sans, inherit); cursor: pointer; }
.sg-switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sg-knob { position: relative; width: 44px; height: 24px; border: 1px solid var(--ink); background: var(--paper, #f4f1ea); }
.sg-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: var(--ink); transition: left 200ms ease; }
.sg-switch[aria-checked=true] .sg-knob { background: #a3242c; border-color: #a3242c; }
.sg-switch[aria-checked=true] .sg-knob::after { left: 22px; background: #fff; }
.sg-quoted { margin: 0 0 12px; padding: 12px 14px; max-width: 720px; background: var(--card-bg, #fbfaf6); border: 1px solid var(--rule); font-size: 14.5px; }
.sg-bad { background: rgb(163 36 44 / .12); color: #7d1b21; }
.sg-sc-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.sg-seal-out { margin: 0; flex: 1 1 100%; font-size: 14px; color: var(--ink-2); min-height: 1.4em; }
.sg-seal-out.is-good { color: #145a36; } .sg-seal-out.is-bad { color: #7d1b21; }

/* why */
.sg-why { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.sg-why li { display: grid; gap: 6px; align-content: start; padding: 16px 18px 18px 0; border-bottom: 1px solid var(--rule); }
.sg-why li + li { padding-left: 18px; border-left: 1px solid var(--rule); }
.sg-why b { font-size: 17px; line-height: 1.3; }
.sg-why span { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }

/* your controls */
.sg-tiles { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sg-tile { display: grid; gap: 6px; align-content: start; padding: 14px 16px; border: 1px solid var(--rule); background: var(--card-bg, #fbfaf6); }
.sg-tile-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sg-sw { position: relative; flex: none; width: 34px; height: 18px; border: 1px solid var(--ink-3); background: var(--paper, #f4f1ea); }
.sg-sw i { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; background: var(--ink-3); }
.sg-tile.is-on .sg-sw { background: var(--ink); border-color: var(--ink); }
.sg-tile.is-on .sg-sw i { left: 18px; background: #fff; }
.sg-tile-s { font: 600 12px var(--mono); color: var(--ink); }
.sg-tile-k { margin-left: auto; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.sg-tile-t { font-size: 15.5px; }
.sg-tile p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.sg-tile .sg-hit { color: var(--acc-ink, #b8360e); font-size: 12px; }
.sg-where summary { min-height: 44px; display: flex; align-items: center; font-size: 13.5px; cursor: pointer; color: var(--ink); }
.sg-where code { font-size: 12px; overflow-wrap: anywhere; }

/* coverage */
.sg-cov { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.sg-cov-t { display: grid; gap: 4px; align-content: start; width: 100%; min-height: 96px; padding: 10px; text-align: left; border: 1px solid var(--rule-2, rgb(22 21 19 / .26)); background: var(--card-bg, #fbfaf6); color: var(--ink); font: inherit; cursor: pointer; }
.sg-cov-t.s-covered { border-top: 4px solid #1d7a4a; }
.sg-cov-t.s-partial { border-top: 4px solid var(--acc, #e5481c); }
.sg-cov-t[aria-expanded=true] { outline: 2px solid var(--ink); outline-offset: -2px; }
.sg-cov-t:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sg-cov-t .mono { font-size: 12px; font-weight: 600; }
.sg-cov-n { font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.sg-cov-s { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.s-covered .sg-cov-s, .sg-cov-s.s-covered { color: #145a36; }
.s-partial .sg-cov-s, .sg-cov-s.s-partial { color: var(--acc-ink, #b8360e); }
.sg-cov-d { margin-top: 12px; max-width: 900px; font-size: 14.5px; }
.sg-cov-d:empty { display: none; }
.sg-cov-d p { margin: 0 0 8px; }
.sg-gap { color: var(--ink); } .sg-code code { font-size: 12px; overflow-wrap: anywhere; }

/* home: the gate, compact, and the four scenarios */
.sg-home { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .7fr); gap: 24px; margin-top: 26px; align-items: start; }
.sg-home-gate { border: 1px solid var(--ink); background: var(--card-bg, #fbfaf6); min-width: 0; }
.sg-home-sc { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--ink); }
.sg-home-sc a { display: flex; gap: 10px; align-items: center; min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-weight: 600; }
.sg-home-sc a:hover span, .sg-home-sc a:focus-visible span { text-decoration: underline; }
.sg-home-sc b { font-size: 12px; color: var(--ink-2); }

@media (max-width: 1100px) {
  .sg-hero { grid-template-columns: minmax(0, 1fr); }
  .sg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sg-why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sg-why li:nth-child(3) { padding-left: 0; border-left: 0; }
  .sg-cov { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sg-home { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .sg-hero { padding-top: 8px; gap: 16px; }
  .sg-hero .fp-eyebrow { margin-bottom: 8px; }
  .sg-more { display: none; }
  .sg-lanes { grid-template-columns: minmax(0, 1fr); }
  .sg-wall { flex-direction: row; min-height: 44px; padding: 0 12px; border: 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
  .sg-wall-k { writing-mode: horizontal-tb; transform: none; }
  .sg-packet { top: 50%; left: 50%; }
  .sg-text { min-height: 0; font-size: 12.5px; }
  .sg-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sg-tabs [role=tab]:nth-child(3) { border-left: 0; }
  .sg-panel { padding: 14px; }
  .sg-call { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .sg-tiles, .sg-why { grid-template-columns: minmax(0, 1fr); }
  .sg-why li, .sg-why li + li { padding-left: 0; border-left: 0; }
  .sg-cov { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .sg-packet.is-on { animation: none; transform: translate(-50%, -50%); background: var(--acc-ink, #b8360e); color: #fff; }
  .sg-call.is-bounced { animation: none; }
  .sg-fill, .sg-knob::after { transition: none; }
}
.sg-stage-wrap { min-width: 0; } .sg-run-note { margin: 10px 0 0; }
