/* The Alert That Cried Wolf: diagrams rebuilt as real, responsive page elements (Oct 2026).
   Same visual language as the state diagram: soft tinted boxes, dark tinted text, no outlines.
   Each diagram adapts to its own width (container queries), so it reads the same in any layout. */
.cgv { --ink: #14142b; --mute: #5f5e5a; --line: #b9b7b0;
  --blue-bg: #e6f1fb; --blue: #0c447c; --blue-2: #185fa5;
  --red-bg: #fcebeb; --red: #791f1f; --red-2: #a32d2d; --red-dot: #e24b4a;
  --sand-bg: #f1efe8; --sand: #444441;
  --green-bg: #eaf3de; --green: #27500a; --green-2: #3b6d11;
  --amber-bg: #faeeda; --amber: #633806; --amber-2: #854f0b;
  container-type: inline-size; display: block; width: 100%; margin: 0 auto; text-align: left;
  font-family: Satoshi, sans-serif; color: var(--ink); font-size: 14px; line-height: 1.5; }
.cgv * { box-sizing: border-box; }
/* Built from spans (see patch_cgm.py), so every block element says so. */
.cgv, .cgv-head, .cgv-col, .cgv-step, .cgv-spacer, .cgv-phone, .cgv-screen, .cgv-empty, .cgv-reading, .cgv-note-card,
.cgv-note-body, .cgv-find-text, .cgv-cell, .cgv-p, .cgv-find em, .cgv-cell strong, .cgv-find strong { display: block; }
.cgv-head { margin-bottom: 18px; }
.cgv-title { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.cgv-sub { display: block; margin-top: 4px; font-size: 14px; color: var(--mute); }
.cgv-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; line-height: 1.3; margin-bottom: 4px; opacity: .8; }
.cgv-box { display: block; border-radius: 12px; padding: 12px 14px; }
.cgv-note { display: block; margin-top: 14px; font-size: 13px; color: var(--mute); text-align: center; }

/* ---------- 1. Before / after flow ---------- */
.cgv-flow-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cgv-col { display: flex; flex-direction: column; }
.cgv-tag { align-self: flex-start; display: inline-block; margin-bottom: 12px; padding: 5px 12px; border-radius: 80px; font-size: 13px; font-weight: 700; }
.cgv-tag.is-now { background: var(--red-bg); color: var(--red-2); }
.cgv-tag.is-new { background: var(--green-bg); color: var(--green-2); }
.cgv-step { position: relative; }
.cgv-step + .cgv-step { margin-top: 22px; }
.cgv-step + .cgv-step::before { content: ""; position: absolute; left: 50%; top: -18px; width: 1px; height: 13px; background: var(--line); }
.cgv-step + .cgv-step::after { content: ""; position: absolute; left: calc(50% - 3px); top: -9px; width: 5px; height: 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.cgv-step.s-neutral { background: var(--sand-bg); color: var(--sand); }
.cgv-step.s-bad { background: var(--red-bg); color: var(--red); }
.cgv-step.s-pre { background: var(--blue-bg); color: var(--blue); }
.cgv-step.s-good { background: var(--green-bg); color: var(--green); }
.cgv-step.s-outcome { margin-top: auto !important; font-weight: 700; text-align: center; padding: 14px; }
.cgv-col .cgv-step.s-outcome { margin-top: 22px; }
.cgv-spacer { flex: 1 0 22px; position: relative; }
.cgv-spacer::before { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.cgv-spacer + .cgv-step::before, .cgv-spacer + .cgv-step::after { display: none; }
.cgv-step.s-outcome.s-bad { background: var(--red-bg); color: var(--red-2); }
.cgv-step.s-outcome.s-good { background: var(--green-bg); color: var(--green-2); }

/* ---------- 2. Annotated critique ---------- */
.cgv-crit { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; }
.cgv-phone { width: 230px; padding: 12px; border-radius: 34px; background: #1d1d1f; box-shadow: 0 10px 30px rgba(20,20,43,.14); }
.cgv-screen { border-radius: 24px; background: #000; color: #fff; padding: 12px 10px 14px; font-family: -apple-system, "SF Pro Text", Satoshi, sans-serif; }
.cgv-status { display: flex; justify-content: space-between; align-items: center; padding: 2px 6px 10px; font-size: 12px; font-weight: 600; }
.cgv-status i { display: inline-block; width: 22px; height: 10px; border-radius: 3px; background: #fff; opacity: .9; }
.cgv-empty { position: relative; padding: 8px 10px; border-radius: 10px; background: #1c1c1e; color: #8e8e93; font-size: 11.5px; }
.cgv-reading { text-align: center; padding: 14px 0 12px; color: #30d158; font-size: 46px; font-weight: 300; line-height: 1; letter-spacing: -1px; }
.cgv-reading small { display: block; margin-top: 6px; color: #8e8e93; font-size: 11px; font-weight: 400; letter-spacing: 0; }
.cgv-note-card { margin-top: 8px; border-radius: 12px; background: #1c1c1e; overflow: hidden; }
.cgv-note-top { display: flex; align-items: center; gap: 6px; padding: 8px 10px 0; font-size: 10.5px; color: #8e8e93; }
.cgv-note-top b { flex: 1; font-weight: 500; letter-spacing: .3px; }
.cgv-app { width: 15px; height: 15px; border-radius: 4px; flex: none; }
.cgv-app.is-warn { background: #ff9f0a; }
.cgv-app.is-crit { background: #ff3b30; }
.cgv-note-body { padding: 3px 10px 8px; }
.cgv .cgv-note-body strong { display: flex; align-items: center; color: #fff; font-size: 13px; font-weight: 600; }
.cgv-note-body > span { display: block; color: #aeaeb2; font-size: 11px; line-height: 1.35; margin-top: 2px; }
.cgv-btns { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #2c2c2e; }
.cgv-btns > span { padding: 8px 0; text-align: center; color: #0a84ff; font-size: 12.5px; }
.cgv-btns > span + span { border-left: 1px solid #2c2c2e; }
.cgv-pin { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin-left: 5px; border-radius: 50%; color: #fff; font-family: Satoshi, sans-serif; font-size: 10px; font-weight: 700; line-height: 1; vertical-align: 1px; flex: none; }
.cgv-pin.p1 { background: var(--red-dot); } .cgv-pin.p2 { background: #ef9f27; } .cgv-pin.p3 { background: #378add; }
.cgv-findings { display: grid; gap: 20px; padding-top: 6px; }
.cgv-find { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.cgv-find .cgv-pin { width: 30px; height: 30px; margin: 0; font-size: 14px; }
.cgv-find strong { display: block; font-size: 15px; line-height: 1.35; margin-bottom: 3px; }
.cgv-find .cgv-p { margin: 0 !important; font-size: 14px; line-height: 1.5; color: var(--sand); }
.cgv-find em { display: block; margin-top: 5px; font-style: normal; font-size: 12.5px; color: var(--mute); }

/* ---------- 3. Framework 2x2 ---------- */
.cgv-grid { display: grid; grid-template-columns: 112px 1fr 1fr; gap: 8px; }
.cgv-axis { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px; border-radius: 12px; background: var(--sand-bg); color: var(--sand); font-size: 13px; font-weight: 700; line-height: 1.35; }
.cgv-axis small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; opacity: .85; }
.cgv-corner { visibility: hidden; }
.cgv-cell { border-radius: 12px; padding: 14px; }
.cgv-cell strong { display: block; font-size: 15px; line-height: 1.3; margin-bottom: 6px; }
.cgv-cell .cgv-p { margin: 0 !important; font-size: 13.5px; line-height: 1.5; color: var(--sand); }
.cgv-cell .cgv-p.cgv-fine { margin-top: 6px !important; font-size: 12.5px; color: var(--mute); }
.cgv-eg { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 80px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.6); }
.cgv-cell.q-red { background: var(--red-bg); } .cgv-cell.q-red strong, .cgv-cell.q-red .cgv-eg { color: var(--red-2); }
.cgv-cell.q-amber { background: var(--amber-bg); } .cgv-cell.q-amber strong, .cgv-cell.q-amber .cgv-eg { color: var(--amber-2); }
.cgv-cell.q-sand { background: var(--sand-bg); } .cgv-cell.q-sand strong, .cgv-cell.q-sand .cgv-eg { color: var(--sand); }
.cgv-cell.q-green { background: var(--green-bg); } .cgv-cell.q-green strong, .cgv-cell.q-green .cgv-eg { color: var(--green-2); }
.cgv-ctx { display: none; }
.cgv-ctx { display: none !important; }
.cgv-hint, .cgv-plus { display: none; }

/* ---------- Narrow (phones): same structure, headlines only; tap a box for its detail ---------- */
@container (max-width: 560px) {
  .cgv-hint { display: block; margin: -8px 0 12px; font-size: 12px; color: var(--mute); }
  [data-cgv-toggle] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  [data-cgv-toggle]:focus-visible { outline: 2px solid #454aa0; outline-offset: 2px; }
  .cgv-plus { display: inline-block; position: relative; width: 10px; height: 10px; margin-left: 6px; vertical-align: 0; flex: none; }
  .cgv-plus::before, .cgv-plus::after { content: ""; position: absolute; left: 0; top: 4px; width: 10px; height: 1.5px; border-radius: 1px; background: currentColor; opacity: .6; transition: transform .2s ease; }
  .cgv-plus::after { transform: rotate(90deg); }
  .is-open .cgv-plus::after { transform: rotate(0deg); }

  /* Flow: both columns stay side by side, step names only */
  .cgv-flow-cols { gap: 10px; }
  .cgv-tag { font-size: 12px; padding: 4px 10px; margin-bottom: 10px; }
  .cgv-flow .cgv-box { padding: 9px 10px; border-radius: 10px; }
  .cgv-flow .cgv-label { margin: 0; font-size: 10.5px; letter-spacing: .8px; }
  .cgv-flow .cgv-txt { display: none; margin-top: 4px; font-size: 13px; line-height: 1.45; }
  .cgv-flow .is-open .cgv-txt { display: block; }
  .cgv-step + .cgv-step { margin-top: 16px; }
  .cgv-step + .cgv-step::before { top: -14px; height: 10px; }
  .cgv-step + .cgv-step::after { top: -8px; }
  .cgv-flow .cgv-step.s-outcome { font-size: 13px; line-height: 1.4; padding: 10px; }
  .cgv-spacer { flex-basis: 16px; }

  /* Critique: smaller phone beside the three findings, titles only */
  .cgv-crit { grid-template-columns: auto 1fr; gap: 14px; }
  .cgv-phone { zoom: .58; }
  .cgv-findings { gap: 14px; padding-top: 0; }
  .cgv-find { grid-template-columns: 24px 1fr; gap: 8px; }
  .cgv-find .cgv-pin { width: 24px; height: 24px; font-size: 12px; }
  .cgv-find strong { font-size: 14px; }
  .cgv-find .cgv-p, .cgv-find em { display: none; }
  .cgv-find.is-open .cgv-p, .cgv-find.is-open em { display: block; }
  .cgv-find .cgv-p { font-size: 13px; margin-top: 4px !important; }

  /* Framework: still a 2x2; headers on top, row names as headings, titles and examples in the boxes */
  .cgv-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .cgv-corner { display: none; }
  .cgv-axis { padding: 8px 6px; font-size: 12px; border-radius: 10px; }
  .cgv-axis small { font-size: 11px; }
  .cgv-grid > .cgv-axis.is-row { grid-column: 1 / -1; flex-direction: row; align-items: baseline; justify-content: flex-start; text-align: left; margin-top: 8px; padding: 0; background: none; font-size: 14px; color: var(--ink); }
  .cgv-grid > .cgv-axis.is-row small { display: inline; margin: 0 0 0 6px; color: var(--mute); }
  .cgv-cell { padding: 10px; border-radius: 10px; align-self: start; }
  .cgv-cell strong { font-size: 13.5px; margin-bottom: 0; }
  .cgv-cell .cgv-p { display: none; font-size: 12.5px; margin-top: 6px !important; }
  .cgv-cell.is-open .cgv-p { display: block; }
  .cgv-eg { margin-top: 8px; font-size: 11px; padding: 2px 8px; }
  .cgv-note { font-size: 12px; }
}

/* App concept screen: a phone, so phone-sized */
figure.cgv-phone-fig > div { max-width: 300px !important; margin: 0 auto; }
figure.cgv-phone-fig img { width: 100%; height: auto; }

/* References: folded under a toggle, styled like the page's section titles */
.cgv-refs { margin-top: 40px; }
.cgv-refs > summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; color: #14142b; font-size: 24px; font-weight: 700; line-height: 1.3; }
.cgv-refs > summary::-webkit-details-marker { display: none; }
.cgv-refs > summary::after { content: ""; width: 9px; height: 9px; margin-left: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s ease; }
.cgv-refs[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.cgv-refs > summary:focus-visible { outline: 2px solid #454aa0; outline-offset: 4px; border-radius: 4px; }
.cgv-refs > ol { margin-top: 20px; }
@media (max-width: 767px) { .cgv-refs > summary { font-size: 20px; } }
