:root {
  --pg-ink: #0f172a;
  --pg-text: #1e293b;
  --pg-muted: #475569;
  --pg-paper: #ffffff;
  --pg-line: #d5dbe6;
  --pg-btn: #62d0ff;
  --pg-btn-hover: #8adcff;
  --pg-btn-text: #0f172a;
  --pg-focus: #2563eb;
  --pg-grad-from: #3b7dd8;
  --pg-grad-to: #0fa47a;
  --pg-on-accent: #fff;
  --pg-subtle: #f6f8fb;
  --pg-path: #c9d4e4;
  --pg-dot: #9fb3cf;
  --pg-root-bg: linear-gradient(135deg, rgba(59, 125, 216, .10), rgba(15, 164, 122, .12));
  --pg-root-line: rgba(15, 164, 122, .28);
  --pg-top: 0px;
}

/* Problem graph node pages. Shared by every site; the look comes from each graph config's theme. Loaded after the site's own stylesheets. Light theme only. */

/* Every --pg-* value comes from the graph config's "theme" (the compiler writes it as :root above this file).
   Required: --pg-ink --pg-text --pg-muted --pg-paper --pg-line --pg-btn --pg-btn-hover --pg-btn-text --pg-focus
   --pg-grad-from --pg-grad-to --pg-on-accent --pg-subtle --pg-path --pg-dot --pg-root-bg --pg-root-line --pg-top */
.pg { --pg-grad: linear-gradient(135deg, var(--pg-grad-from), var(--pg-grad-to)); padding-top: var(--pg-top); }

.pg { color: var(--pg-text); }
.pg a:focus-visible, .pg button:focus-visible, .pg input:focus-visible, .pg textarea:focus-visible {
  outline: 3px solid var(--pg-focus); outline-offset: 3px;
}

/* ---------- hero ---------- */
.pg-hero { padding: 15px 0 40px; }
.pg-title {
  font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.12;
  margin: 0 0 9px; padding-bottom: .08em;
  background: var(--pg-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pg-problem { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; color: var(--pg-ink); line-height: 1.25; margin: 0 0 12px; }
.pg-sub { font-size: 1.25rem; line-height: 1.6; color: var(--pg-muted); margin: 0; }
.pg-sub-lead { font-size: 1.45rem; line-height: 1.5; color: var(--pg-text); }
.pg-short { font-size: 1.125rem; line-height: 1.6; color: var(--pg-muted); margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--pg-line); }
.pg-short strong { color: var(--pg-ink); }

/* ---------- editorial sections ---------- */
.pg-section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding: 40px 0; border-top: 1px solid var(--pg-line); }
.pg-section > h2 { font-size: 1.25rem; font-weight: 700; color: var(--pg-ink); margin: 6px 0 0; }
.pg-body p, .pg-body li { font-size: 1.125rem; line-height: 1.7; color: var(--pg-text); }
.pg-body p { margin: 0 0 14px; }
.pg-body p:last-child { margin-bottom: 0; }
.pg-body .pg-pull { font-size: 1.45rem; font-weight: 700; line-height: 1.35; color: var(--pg-ink); }

/* ---------- buttons ---------- */
.pg-btn {
  display: inline-block; box-sizing: border-box; min-height: 48px; line-height: 24px; border: 0; border-radius: 999px; padding: 12px 24px; font-weight: 700; font-size: 1rem;
  background: var(--pg-btn); color: var(--pg-btn-text); text-decoration: none; cursor: pointer; text-align: center;
}
.pg-btn:hover { background: var(--pg-btn-hover); color: var(--pg-btn-text); }
.pg-btn-quiet { background: transparent; color: var(--pg-ink); box-shadow: inset 0 0 0 1.5px var(--pg-ink); }
.pg-btn-quiet:hover { background: var(--pg-ink); color: var(--pg-on-accent); }

/* ---------- forms ---------- */
.pg-input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; line-height: 22px; color: var(--pg-text); min-height: 48px;
  background: var(--pg-paper); border: 1px solid var(--pg-line); border-radius: 12px; padding: 12px 14px;
}
.pg-else { background: var(--pg-paper); border: 1px solid var(--pg-line); border-radius: 20px; padding: 32px; margin: 0 0 24px; }
.pg-else h2 { font-size: 1.25rem; font-weight: 700; color: var(--pg-ink); margin: 0 0 6px; }
.pg-else p { color: var(--pg-muted); margin: 0 0 16px; }
.pg-else form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.pg-else textarea { grid-column: 1 / -1; min-height: 96px; resize: vertical; }

/* ---------- diagnosis: intake sheet ---------- */
.pg-sheet { list-style: none; padding: 8px 24px; margin: 8px 0 18px; background: var(--pg-paper); border: 1px solid var(--pg-line); border-radius: 16px; }
.pg-sheet li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--pg-line); max-width: none; }
.pg-sheet li:last-child { border-bottom: 0; }
.pg-sheet li::before {
  content: "\2713"; flex: none; width: 26px; height: 26px; margin-top: 2px; border-radius: 50%;
  display: grid; place-items: center; font-size: .85rem; font-weight: 700; color: var(--pg-on-accent); background: var(--pg-grad);
}

/* ---------- diagnosis: how to fix it (tier cards) ---------- */
.pg-tiers-head { padding: 40px 0 20px; border-top: 1px solid var(--pg-line); }
.pg-tiers-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; color: var(--pg-ink); margin: 0; }
.pg-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: 48px; }
.pg-tier { display: flex; flex-direction: column; background: var(--pg-paper); border: 1px solid var(--pg-line); border-radius: 20px; padding: 28px; }
.pg-tier-ours { box-shadow: inset 0 5px 0 var(--pg-grad-from); }
.pg-tiers-none { padding-bottom: 48px; }
.pg-tiers-none p { font-size: 1.1rem; line-height: 1.7; margin: 0; }
.pg-tier-placeholder { border-style: dashed; background: transparent; box-shadow: none; }
.pg-tier-kind { font-size: .95rem; font-weight: 600; color: var(--pg-muted); margin: 0 0 6px; }
.pg-tier h3 { font-size: 1.4rem; font-weight: 800; color: var(--pg-ink); margin: 0 0 12px; letter-spacing: -.01em; }
.pg-tier p { font-size: 1rem; line-height: 1.6; margin: 0 0 16px; }
.pg-tier .pg-grow { flex-grow: 1; }
.pg-price { font-size: 1.15rem; font-weight: 800; color: var(--pg-ink); padding-top: 14px; border-top: 1px solid var(--pg-line); }
.pg-tier form, .pg-tier .pg-actions { display: grid; gap: 10px; }
/* line the cards up row by row (label, title, text, price, action), whatever each card's action is */
@supports (grid-template-rows: subgrid) {
  .pg-tier { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; }
  .pg-tier form, .pg-tier .pg-actions { align-self: start; }
}

@media (max-width: 900px) {
  .pg-tiers { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .pg-hero { padding: 15px 0 28px; }
  .pg-section { grid-template-columns: 1fr; gap: 12px; padding: 32px 0; }
  .pg-else form { grid-template-columns: 1fr; }
}

/* ---------- symptom: signs this is what's happening ---------- */
.pg-signs { list-style: none; padding: 0; margin: 0; }
.pg-signs li { position: relative; padding: 0 0 12px 26px; }
.pg-signs li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 9px; height: 9px; border-radius: 50%; background: var(--pg-grad); }

/* ---------- other possible causes; closing line ---------- */
.pg-causes { list-style: none; padding: 0; margin: 0; }
.pg-causes li { position: relative; padding: 14px 0 14px 26px; border-bottom: 1px dashed var(--pg-line); }
.pg-causes li:first-child { padding-top: 0; }
.pg-causes li:last-child { border-bottom: 0; padding-bottom: 0; }
.pg-causes li::before { content: ""; position: absolute; left: 4px; top: calc(14px + .7em); width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--pg-grad-from); box-sizing: border-box; }
.pg-causes li:first-child::before { top: .7em; }
.pg-causes strong { color: var(--pg-ink); }
.pg-body .pg-close { font-weight: 700; color: var(--pg-ink); }

/* ---------- the real problem: symptoms converging on one diagnosis ---------- */
.pg-map-wrap { background: var(--pg-paper); border: 1px solid var(--pg-line); border-radius: 24px; padding: 32px 40px 36px; margin: 24px 0 40px; }
.pg-map-head { font-size: 1.05rem; font-weight: 700; color: var(--pg-muted); margin: 0 0 14px; align-self: end; }
.pg-map { display: grid; grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1.05fr); align-items: center; }
.pg-map-symptoms { list-style: none; margin: 0; padding: 0; grid-column: 1; grid-row: 2; }
.pg-map-lines { grid-column: 2; grid-row: 2; }
.pg-map-root { grid-column: 3; grid-row: 2; }
.pg-map-symptoms li { height: 64px; display: flex; flex-direction: column; justify-content: center; position: relative; padding-left: 26px; }
.pg-map-symptoms li::before {
  content: ""; position: absolute; left: 4px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%;
  border: 2px solid var(--pg-dot); box-sizing: border-box; background: var(--pg-paper);
}
.pg-map-symptoms a { font-weight: 600; color: var(--pg-focus); text-decoration: none; }
.pg-map-symptoms a:hover { text-decoration: underline; }
.pg-map-symptoms .is-current span { font-weight: 800; color: var(--pg-ink); font-size: 1.05rem; }
.pg-map-symptoms .is-current::before { border: 0; background: var(--pg-grad); width: 13px; height: 13px; margin-top: -6.5px; left: 3px; }
.pg-map-lines { width: 100%; display: block; }
.pg-map-lines path { fill: none; stroke: var(--pg-path); stroke-width: 2; vector-effect: non-scaling-stroke; }
.pg-map-lines path.is-current { stroke: url(#pg-map-grad); stroke-width: 3.5; }
.pg-map-lines circle { fill: var(--pg-grad-to); }
.pg-map-lines stop:first-child { stop-color: var(--pg-grad-from); }
.pg-map-lines stop:last-child { stop-color: var(--pg-grad-to); }
.pg-map-root {
  border-radius: 18px; padding: 28px 30px;
  background: var(--pg-root-bg);
  border: 1px solid var(--pg-root-line);
}
.pg-map-root h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; line-height: 1.2; letter-spacing: -.015em; color: var(--pg-ink); margin: 0 0 10px; }
.pg-map-root p { font-size: 1.05rem; color: var(--pg-text); margin: 0 0 20px; }
@media (max-width: 900px) {
  .pg-map-wrap { padding: 28px 22px 24px; }
  .pg-map { grid-template-columns: 1fr; }
  .pg-map > * { grid-column: auto; grid-row: auto; }
  .pg-map-lines { display: none; }
  .pg-map > span { display: none; }
  .pg-map-head:nth-of-type(2) { order: 4; margin-top: 4px; }
  .pg-map-symptoms { order: 2; }
  .pg-map-root { order: 5; }
  .pg-map-symptoms li { height: auto; padding-top: 10px; padding-bottom: 10px; }
  .pg-map-symptoms::after { content: "\2193"; display: block; text-align: center; font-size: 1.6rem; line-height: 1; color: var(--pg-grad-to); margin: 8px 0 12px; }
}

/* ---------- comparison page ---------- */
.pg-checked { font-size: 1rem; color: var(--pg-muted); margin: 14px 0 0; }
.pg-cmp-group { padding: 40px 0 8px; border-top: 1px solid var(--pg-line); }
.pg-cmp-group:last-child { padding-bottom: 48px; }
.pg-cmp-group > h2 { font-size: 1.25rem; font-weight: 700; color: var(--pg-ink); margin: 0 0 18px; }
.pg-cmp { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; background: var(--pg-paper); border: 1px solid var(--pg-line); border-radius: 18px; overflow: hidden; }
.pg-cmp th, .pg-cmp td { text-align: left; vertical-align: top; padding: 14px 16px; font-size: .95rem; line-height: 1.5; color: var(--pg-text); border-bottom: 1px solid var(--pg-line); }
.pg-cmp thead th { font-size: .85rem; font-weight: 700; color: var(--pg-muted); background: var(--pg-subtle); }
.pg-cmp thead th:first-child { width: 16%; }
.pg-cmp tbody tr:last-child > * { border-bottom: 0; }
.pg-cmp tbody th { font-weight: 700; }
.pg-cmp tbody th a { color: var(--pg-focus); text-decoration: none; }
.pg-cmp tbody th a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .pg-cmp, .pg-cmp tbody, .pg-cmp tr, .pg-cmp th, .pg-cmp td { display: block; width: auto; }
  .pg-cmp thead { display: none; }
  .pg-cmp { border: 0; border-radius: 0; background: transparent; overflow: visible; }
  .pg-cmp tr { background: var(--pg-paper); border: 1px solid var(--pg-line); border-radius: 16px; margin: 0 0 12px; padding: 8px 0 10px; }
  .pg-cmp tbody th { border-bottom: 0; font-size: 1.05rem; padding: 8px 16px 4px; }
  .pg-cmp td { border-bottom: 0; padding: 5px 16px; display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; }
  .pg-cmp td::before { content: attr(data-label); font-size: .85rem; font-weight: 600; color: var(--pg-muted); }
}

/* ---------- diagnosis: two tier cards (no Custom build) ---------- */
.pg-tiers-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .pg-tiers-2 { grid-template-columns: 1fr; }
}

/* ---------- diagnosis: compact lists (Sound familiar?, Connected problems); built to scale ---------- */
.pg-related { padding-bottom: 48px; }
.pg-conn { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.pg-conn li { padding: 14px 0; border-bottom: 1px dashed var(--pg-line); }
.pg-conn li:nth-child(-n+2) { padding-top: 0; }
.pg-conn a { display: block; font-size: 1.05rem; font-weight: 700; color: var(--pg-focus); text-decoration: none; }
.pg-conn a:hover { text-decoration: underline; }
.pg-body .pg-conn p { margin: 2px 0 0; font-size: 1rem; line-height: 1.5; color: var(--pg-muted); }
@media (max-width: 767px) {
  .pg-conn { grid-template-columns: 1fr; }
  .pg-conn li:nth-child(2) { padding-top: 14px; }
}

/* ---------- comparison page: the problem these tools solve ---------- */
.pg-cmp-problem .pg-map-wrap { margin: 0; }

/* ---------- symptom: other possible causes that link to another node ---------- */
.pg-causes strong a { color: var(--pg-focus); text-decoration: none; }
.pg-causes strong a:hover { text-decoration: underline; }

/* ---------- diagnosis: the evidence (optional) ---------- */
.pg-stats { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.pg-stats li { background: var(--pg-paper); border: 1px solid var(--pg-line); border-radius: 16px; padding: 18px 20px; }
.pg-stats strong { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.2; color: var(--pg-ink); }
.pg-body .pg-stats span { display: block; margin-top: 6px; font-size: .95rem; line-height: 1.5; color: var(--pg-muted); }
.pg-body .pg-finding { padding: 0 0 0 16px; border-left: 3px solid var(--pg-grad-to); }
.pg-finding a { font-weight: 700; color: var(--pg-focus); text-decoration: none; }
.pg-finding a:hover { text-decoration: underline; }
.pg-source { font-size: .9rem; color: var(--pg-muted); }
.pg-quote { margin: 0 0 14px; padding: 20px 24px; background: var(--pg-paper); border: 1px solid var(--pg-line); border-radius: 16px; }
.pg-body .pg-quote p { font-size: 1.15rem; margin: 0 0 8px; color: var(--pg-ink); }
.pg-quote footer { font-size: .95rem; color: var(--pg-muted); }

/* ---------- draft builds only: PD review state (never in a live build) ---------- */
.pg-draft { margin: 12px 0 0; padding: 8px 14px; border-radius: 10px; background: #fde68a; color: #78350f; font-size: .95rem; }
.pg-draft strong { letter-spacing: .08em; margin-right: 6px; }
.pg-chip { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 999px; background: #fde68a; color: #78350f; font-size: .72rem; font-weight: 700; letter-spacing: .08em; vertical-align: middle; }
