/* Content pages (how it works, safety, platforms, docs, security): design v2 building blocks.
   Grid header, two-tone headline, hairline card grids, numbered steps, callouts,
   file-headed code blocks, plain tables. Monochrome; tier colors only where they carry meaning. */

/* ---------- page hero ---------- */
.pg-hero { padding-block: clamp(56px, 8vw, 104px) clamp(36px, 5vw, 56px); display: grid; gap: 18px; }
.pg-hero h1 { font-family: var(--font-display); font-weight: 560; letter-spacing: -0.034em; line-height: 1.16; font-size: clamp(2.1rem, 2.4vw + 1.2rem, 3.2rem); text-wrap: balance; max-width: 22ch; }
.pg-hero h1 .tl { display: block; }
.pg-hero .lede { max-width: 60ch; }
.pg-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 6px; }
.pg-crumb { font-size: 0.86rem; color: var(--text-3); }
.pg-crumb a { color: var(--text-2); }

/* ---------- sections ---------- */
.pg-section { padding-block: clamp(48px, 7vw, 88px) 0; }
.pg-section > h2, .pg-head { max-width: 760px; margin-bottom: clamp(20px, 3vw, 32px); }
.pg-section > h2 .tl, .pg-head .tl { display: block; }
.pg-section h2 { font-family: var(--font-display); font-weight: 560; letter-spacing: -0.024em; line-height: 1.15; font-size: clamp(1.45rem, 1.4vw + 1rem, 2rem); scroll-margin-top: 90px; }
.pg-section h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.pg-section p { color: var(--text-2); }
.pg-section .lede { margin-top: -10px; margin-bottom: 26px; max-width: 64ch; }
.pg-textlink { color: var(--text); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.pg-textlink:hover { text-decoration-color: currentColor; }

/* ---------- card grids: one bordered box, hairline dividers ---------- */
.pg-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (min-width: 720px) { .pg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1060px) { .pg-cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pg-card { display: grid; gap: 8px; align-content: start; padding: 24px 24px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; transition: background-color 0.2s var(--ease); }
.pg-card:hover { background: var(--bg-2); }
.pg-card h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pg-card p { font-size: 0.94rem; line-height: 1.6; }
.pg-card .pg-meta { font-size: 0.84rem; color: var(--text-3); }
.pg-card code { font-size: 0.82rem; }

/* ---------- numbered steps ---------- */
.pg-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: st; border: 1px solid var(--line); border-radius: var(--r-l); }
.pg-step { counter-increment: st; position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; padding: 20px 20px 22px; border-bottom: 1px solid var(--line); }
.pg-step:last-child { border-bottom: 0; }
.pg-step::before { content: counter(st, decimal-leading-zero); grid-row: 1 / span 3; font-family: var(--mono); font-size: 0.82rem; color: var(--text-3); padding-top: 3px; }
.pg-step h3 { font-size: 1rem; font-weight: 600; }
.pg-step p { color: var(--text-2); font-size: 0.95rem; line-height: 1.6; }
.pg-step > * { grid-column: 2; min-width: 0; }
.pg-step .codefile, .pg-step .shot, .pg-step .callout { margin-top: 10px; }

/* ---------- screenshot slots (a real screenshot can replace the skeleton later: data-shot) ---------- */
.shot { margin: 0; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-2); padding: 14px; display: grid; gap: 8px; }
.shot-frame { border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-solid); padding: 12px 14px; display: grid; gap: 6px; font-size: 0.84rem; color: var(--text-2); }
.shot-frame .shot-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.shot-frame code { font-size: 0.8rem; }
.shot figcaption { font-size: 0.8rem; color: var(--text-3); }

/* ---------- callouts ---------- */
.callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); }
.callout .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--text-2); }
.callout-title { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.callout p { grid-column: 2; font-size: 0.93rem; color: var(--text-2); line-height: 1.6; margin: 0; }
.callout-warn { border-color: var(--write-line); background: var(--write-bg); }
.callout-warn .icon { color: var(--write); }
.callout-danger { border-color: var(--danger-line); background: var(--danger-bg); }
.callout-danger .icon { color: var(--danger); }

/* ---------- code blocks with a filename header ---------- */
.codefile { border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; background: var(--bg-2); }
.codefile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 6px 0 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.78rem; color: var(--text-3); }
.codefile pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 0.82rem; line-height: 1.6; tab-size: 2; }
.codefile pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.codefile .cf-copy { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: var(--r-s); background: none; color: var(--text-3); cursor: pointer; }
.codefile .cf-copy:hover { color: var(--text); border-color: var(--line); }
.codefile .cf-copy .icon { width: 16px; height: 16px; }

/* ---------- plain tables ---------- */
.pg-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); }
.pg-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 560px; }
.pg-table th, .pg-table td { text-align: left; vertical-align: top; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.pg-table thead th { font-size: 0.82rem; font-weight: 500; color: var(--text-3); }
.pg-table tbody th { font-weight: 600; color: var(--text); white-space: nowrap; }
.pg-table td { color: var(--text-2); }
.pg-table tbody tr:last-child > * { border-bottom: 0; }

/* ---------- tier cards (safety, security) ---------- */
.tier-cards { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r-l); }
@media (min-width: 860px) { .tier-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tier-card { display: grid; gap: 10px; align-content: start; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.tier-card .tier { justify-self: start; }
.tier-card h3 { font-size: 1.05rem; font-weight: 600; }
.tier-card p { font-size: 0.94rem; color: var(--text-2); line-height: 1.6; }
.tier-card .eg { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- small helpers ---------- */
.pg-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pg-list li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.pg-list li strong { color: var(--text); font-weight: 600; }
.pg-two-col { display: grid; gap: 28px; }
@media (min-width: 900px) { .pg-two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.pg-end { padding-block: clamp(56px, 8vw, 96px) 8px; }
.pg-end .pg-hero-actions { margin-top: 18px; }


/* =====================================================================================================
   design v3 (Ryan 10/12): grid headers, bordered cells, dedicated pages for how it works, safety,
   platforms, docs and security. Monochrome; tier colors only where they mean something.
   ===================================================================================================== */
.pg-hero { position: relative; }
.pg-hero h1 { max-width: 24ch; }
.pg-crumb a { text-decoration: none; }
.pg-crumb a:hover { color: var(--text); text-decoration: underline; }
.pg-head { padding-block: 6px; }
.pg-head h2 { margin: 0; }
.pg-section-tight { padding-top: 8px; }
.pg-fine { margin-top: 16px; max-width: 80ch; font-size: 0.86rem; color: var(--text-3) !important; }
.pg-more { margin-top: 22px; }
.pg-prose { font-size: 1.02rem; line-height: 1.7; max-width: 62ch; }
.pg-callout { margin-top: 22px; max-width: 760px; }
.pg-default { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: var(--r-s); font-size: 0.72rem; font-weight: 500; color: var(--text-3); vertical-align: 2px; }

/* in-page jump links under a hero */
.pg-jump { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; font-size: 0.9rem; }
.pg-jump a { color: var(--text-2); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; transition: color 0.15s var(--ease), border-color 0.15s var(--ease); }
.pg-jump a:hover { color: var(--text); border-bottom-color: var(--text); }

/* numbered cards (how it works) */
.pg-num { font-family: var(--mono); font-size: 0.8rem; color: var(--text-3); margin-bottom: 18px; }
.pg-card p a:not(.btn) { color: var(--text); }

/* tick lists */
.pg-ticks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.pg-ticks li { position: relative; padding-left: 26px; color: var(--text-2); font-size: 0.95rem; line-height: 1.55; }
.pg-ticks li::before { content: ""; position: absolute; left: 2px; top: 0.42em; width: 12px; height: 7px; border-left: 1.5px solid var(--signal); border-bottom: 1.5px solid var(--signal); transform: rotate(-45deg); }
.pg-ticks-no li::before { width: 11px; height: 11px; top: 0.36em; border: 0; transform: none;
  background: linear-gradient(45deg, transparent 45%, var(--text-3) 45%, var(--text-3) 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, var(--text-3) 45%, var(--text-3) 55%, transparent 55%); }

/* client chips (how it works) */
.pg-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pg-chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-m); color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.94rem; transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease); }
.pg-chips a:hover { background: var(--sunken); border-color: var(--text-3); }

/* steps list: square, hairline */
.pg-steps { border-radius: 0; }

/* end band */
.pg-end { padding-block: clamp(64px, 9vw, 112px) 8px; }
.pg-end-title { font-family: var(--font-display); font-weight: 560; letter-spacing: -0.03em; line-height: 1.16; font-size: clamp(1.6rem, 1.8vw + 1rem, 2.4rem); }
.pg-end-title .tl { display: block; }

/* ---------- tier cells (safety, security) ---------- */
.pg-tiers { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (min-width: 860px) { .pg-tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pg-tier { display: grid; gap: 10px; align-content: start; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.pg-tier .tier { justify-self: start; }
.pg-tier h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.pg-tier p { font-size: 0.94rem; line-height: 1.6; color: var(--text-2); }
.pg-tier-eg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pg-tier-eg code { font-size: 0.8rem; }

/* ---------- box: what we do not protect against ---------- */
.pg-box { border: 1px solid var(--line-strong); padding: clamp(22px, 4vw, 40px); background: var(--bg-2); position: relative; }
.pg-box h2 { font-family: var(--font-display); font-weight: 560; letter-spacing: -0.024em; line-height: 1.15; font-size: clamp(1.4rem, 1.2vw + 1rem, 1.9rem); margin-bottom: 20px; }
.pg-box h2 .tl { display: block; }
.pg-box-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .pg-box-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; } }
.pg-box-list li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 0.94rem; line-height: 1.6; }
.pg-box-list strong { color: var(--text); font-weight: 600; }

/* ---------- vulnerability report card ---------- */
.pg-report { display: grid; gap: 24px; padding: clamp(22px, 4vw, 40px); border: 1px solid var(--line); align-items: end; }
@media (min-width: 900px) { .pg-report { grid-template-columns: minmax(0, 1.4fr) auto; gap: 48px; } }
.pg-report h2 { font-family: var(--font-display); font-weight: 560; letter-spacing: -0.024em; line-height: 1.15; font-size: clamp(1.4rem, 1.2vw + 1rem, 1.9rem); }
.pg-report h2 .tl { display: block; }
.pg-report-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.pg-report-list li { position: relative; padding-left: 18px; color: var(--text-2); font-size: 0.95rem; }
.pg-report-list li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 8px; height: 1px; background: var(--text-3); }
.pg-report-cta { display: grid; gap: 10px; justify-items: start; }
.pg-report-cta p { font-size: 0.86rem; }

/* ---------- facts table ---------- */
.pg-facts { min-width: 0; }
.pg-facts tbody th { width: 30%; min-width: 150px; white-space: normal; }
@media (max-width: 639px) {
  .pg-facts, .pg-facts tbody, .pg-facts tr, .pg-facts th, .pg-facts td { display: block; width: auto; }
  .pg-facts tr { border-bottom: 1px solid var(--line); padding: 12px 14px; }
  .pg-facts tbody tr:last-child { border-bottom: 0; }
  .pg-facts tbody th, .pg-facts td { padding: 0; border: 0; }
  .pg-facts tbody th { margin-bottom: 4px; }
}
.pg-table-wrap { border-radius: 0; }
.pg-table td strong { color: var(--text); font-weight: 600; }

/* ---------- data path diagram ---------- */
.dg { margin: 0; display: grid; gap: 12px; }
.dg-svg { width: 100%; height: auto; overflow: visible; }
.dg-tall { display: none; max-width: 420px; margin-inline: auto; }
@media (max-width: 759px) { .dg-wide { display: none; } .dg-tall { display: block; } }
.dg-svg text { font-family: var(--font); }
.dg-node { fill: var(--surface-solid); stroke: var(--line-strong); stroke-width: 1; }
.dg-node-you { stroke: var(--text-3); stroke-dasharray: 4 3; }
.dg-gw { fill: var(--bg-2); stroke: var(--text); stroke-width: 1.2; }
.dg-stage { fill: var(--surface-solid); stroke: var(--line-strong); stroke-width: 1; }
.dg-stage-key { stroke: var(--text-3); }
.dg-title { font-size: 15px; font-weight: 600; fill: var(--text); }
.dg-gw-title { font-size: 15px; font-weight: 600; fill: var(--text); }
.dg-gw-sub { font-size: 12px; fill: var(--text-3); }
.dg-st { font-size: 13px; font-weight: 600; fill: var(--text); }
.dg-svg .dg-step { font-family: var(--mono); font-size: 11px; fill: var(--text-3); }
.dg-sub { font-size: 12px; fill: var(--text-2); }
.dg-svg .dg-edge { font-family: var(--mono); font-size: 11px; fill: var(--text-3); }
.dg-line { fill: none; stroke: var(--text-2); stroke-width: 1.3; }
.dg-thin { stroke: var(--text-3); stroke-width: 1; }
.dg-dash { stroke-dasharray: 5 4; }
.dg-head { fill: var(--text-2); }
.dg-tag rect { fill: var(--text); }
.dg-tag text { font-size: 11.5px; font-weight: 600; fill: var(--bg); }
.dg-chip { stroke-width: 1; }
.dg-chip-read { fill: var(--read-bg); stroke: var(--read-line); }
.dg-chip-write { fill: var(--write-bg); stroke: var(--write-line); }
.dg-chip-danger { fill: var(--danger-bg); stroke: var(--danger-line); }
.dg-chip-t { font-size: 11px; font-weight: 600; fill: var(--read); }
.dg-chip-t-write { fill: var(--write); }
.dg-chip-t-danger { fill: var(--danger); }
.dg-cap { font-size: 0.86rem; color: var(--text-3); }
@media (forced-colors: active) { .dg-tag rect { fill: CanvasText; } .dg-tag text { fill: Canvas; } }

/* ---------- platforms page ---------- */
.pf-total { font-size: 0.95rem; color: var(--text-2); }
.pf-total strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (min-width: 720px) { .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .pf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .pf-card { padding: 22px 20px; } .pf-logo { margin: -22px -20px 4px; } }
.pf-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; scroll-margin-top: 96px; }
.pf-logo { display: flex; align-items: center; justify-content: center; min-height: 96px; margin: -24px -24px 4px; padding: 16px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background-color 0.2s var(--ease); }
.pf-logo:hover, .pf-logo:focus-visible { background: var(--bg-2); text-decoration: none; }
.pf-logo:focus-visible { outline-offset: -4px; border-radius: 0; }
.pf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pf-name { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.pf-live { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-2); }
.pf-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.pf-counts { display: grid; gap: 8px; }
.pf-count-total { font-size: 0.9rem; color: var(--text-2); }
.pf-count-total strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 560; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; margin-right: 4px; }
.pf-bar { display: flex; height: 6px; gap: 2px; }
.pf-seg { flex: var(--share, 0) 1 0; min-width: 4px; border-radius: 1px; }
.pf-seg-read { background: var(--text-3); }
.pf-seg-write { background: var(--write); }
.pf-seg-dangerous { background: var(--danger); }
.pf-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.82rem; color: var(--text-2); }
.pf-leg { display: inline-flex; align-items: center; gap: 6px; }
.pf-leg b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-dot { width: 8px; height: 8px; border-radius: 2px; }
.pf-leg-read .pf-dot { background: var(--text-3); }
.pf-leg-write .pf-dot { background: var(--write); }
.pf-leg-dangerous .pf-dot { background: var(--danger); }
.pf-lp { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.pf-lp-title { font-size: 0.78rem; color: var(--text-3) !important; }
.pf-cred { font-size: 0.94rem; color: var(--text) !important; font-weight: 500; }
.pf-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pf-steps li { position: relative; padding-left: 16px; font-size: 0.88rem; line-height: 1.5; color: var(--text-2); }
.pf-steps li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 7px; height: 1px; background: var(--text-3); }
.pf-links { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-top: 6px; font-size: 0.92rem; }
.pf-sub { color: var(--text-3); font-size: 0.86rem; }
.pf-sub:hover { color: var(--text); }
.pf-counts-empty { font-size: 0.86rem; }
.pf-request { display: grid; gap: 24px; padding: clamp(22px, 4vw, 40px); border: 1px solid var(--line); align-items: end; }
@media (min-width: 900px) { .pf-request { grid-template-columns: minmax(0, 1.4fr) auto; gap: 48px; } }
.pf-request h2 { font-family: var(--font-display); font-weight: 560; letter-spacing: -0.024em; line-height: 1.15; font-size: clamp(1.4rem, 1.2vw + 1rem, 1.9rem); margin-bottom: 12px; }
.pf-request h2 .tl { display: block; }
.pf-request p { max-width: 62ch; }

/* ---------- callout and code block refinements ---------- */
.callout-title { align-self: center; }
.codefile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.codefile .cf-copy { transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background-color 0.15s var(--ease); }
.codefile .cf-copy:hover { background: var(--surface-solid); }
.codefile pre:focus-visible { outline-offset: -2px; }

/* the eighth platforms cell: request a dialer */
.pf-ask { justify-content: center; gap: 10px; background: var(--bg-2); }
.pf-ask h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.pf-ask p { font-size: 0.92rem; }
