/* Guide pages (/page/<slug>). Presentation only: stored CMS HTML stays plain. Scoped under .pg */
.pg {
  --pg-orange: #FF4001;
  --pg-orange-hover: #e63800;
  --pg-teal: #0b3f44;
  --pg-heading: #0b3f44;
  --pg-teal-tint: #e4f0f3;
  --pg-orange-tint: #fff2ee;
  --pg-bg: #ffffff;
  --pg-alt: #f7f8fa;
  --pg-border: #e4e8eb;
  --pg-text: #0f1c20;
  --pg-muted: #536570;
  --pg-green: #0d8a47;
  --pg-green-tint: #e6f5ec;
  --pg-red: #cc2200;
  --pg-red-tint: #fdeceb;
  --pg-link: #c93000;
  --pg-code-bg: #0a2a2e;
  --pg-code-bar: #0f3a40;
  --pg-code-text: #e8f3f4;
  --pg-shadow: 0 1px 2px rgba(11, 63, 68, .06), 0 8px 24px rgba(11, 63, 68, .06);
  background: var(--pg-bg);
  color: var(--pg-text);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: clip;
}
html[theme-mode="dark"] .pg {
  --pg-heading: #f1f5f9;
  --pg-teal-tint: rgba(228, 240, 243, .07);
  --pg-orange-tint: rgba(255, 64, 1, .12);
  --pg-bg: #1A1927;
  --pg-alt: #232230;
  --pg-border: #383750;
  --pg-text: #e3e7ee;
  --pg-muted: #a9b2c3;
  --pg-green: #4fd08b;
  --pg-green-tint: rgba(79, 208, 139, .12);
  --pg-red: #ff7a66;
  --pg-red-tint: rgba(255, 122, 102, .12);
  --pg-link: #ff7a52;
  --pg-code-bg: #10161c;
  --pg-code-bar: #18222b;
  --pg-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}
.pg *, .pg *::before, .pg *::after { box-sizing: border-box; }
.pg a { text-decoration: none; }
.pg-wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding-inline: 20px; }

/* ---------- Hero ---------- */
.pg-hero { position: relative; overflow: hidden; background: var(--pg-teal); color: #fff; padding-block: 44px 52px; }
.pg-hero::before { content: ""; position: absolute; top: -180px; right: -140px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 64, 1, .16) 0%, transparent 68%); pointer-events: none; }
.pg-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px); background-size: 48px 48px; pointer-events: none; }
.pg-hero-inner { position: relative; z-index: 1; }
.pg-crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; line-height: 1.4; color: rgba(255, 255, 255, .62); margin-bottom: 22px; }
.pg-crumbs a { color: rgba(255, 255, 255, .78); }
.pg-crumbs a:hover { color: #fff; text-decoration: underline; }
.pg-crumbs span[aria-hidden] { opacity: .5; }
.pg-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 64, 1, .15); border: 1px solid rgba(255, 64, 1, .38); border-radius: 100px; padding: 5px 14px; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #ff9a80; margin-bottom: 18px; }
.pg-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pg-orange); }
.pg .pg-hero h1 { margin: 0 0 16px; max-width: 880px; color: #fff; font-size: clamp(30px, 4.6vw, 48px); font-weight: 900; line-height: 1.1; letter-spacing: -1.2px; text-wrap: balance; }
.pg-lead { margin: 0 0 26px; max-width: 700px; font-size: 18px; line-height: 1.65; color: rgba(255, 255, 255, .78); }
.pg-hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.pg-hero-note { margin: 0; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .55); }
.pg-hero-note span + span::before { content: "\00b7"; margin-inline: 8px; }

.pg .btn-main { display: inline-flex; align-items: center; gap: 8px; background: var(--pg-orange); color: #fff; font-size: 15px; font-weight: 700; line-height: 1.2; padding: 13px 24px; border-radius: 8px; box-shadow: 0 4px 18px rgba(255, 64, 1, .32); transition: transform .18s, box-shadow .18s, background .18s; }
.pg .btn-main:hover { background: var(--pg-orange-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 26px rgba(255, 64, 1, .42); }
.pg .btn-main strong { font-weight: 700; color: inherit; }
.pg .btn-main::after { content: "\2192"; font-weight: 400; }
.pg .btn-ghost { display: inline-flex; align-items: center; background: rgba(255, 255, 255, .08); color: #fff; font-size: 15px; font-weight: 600; line-height: 1.2; padding: 13px 24px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .24); transition: background .18s; }
.pg .btn-ghost:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.pg a:focus-visible, .pg summary:focus-visible, .pg button:focus-visible, .pg figure.table:focus-visible, .pg pre:focus-visible { outline: 3px solid #ff9a80; outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout ---------- */
.pg-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 36px 56px; }
.pg-aside { order: -1; }
.pg-article { min-width: 0; max-width: 780px; }
@media (min-width: 1024px) {
  .pg-layout { grid-template-columns: minmax(0, 780px) 290px; gap: 56px; justify-content: space-between; padding-block: 48px 72px; }
  .pg-aside { order: 0; }
  .pg-aside-stick { position: sticky; top: 90px; }
}

/* ---------- Aside: contents + CTA ---------- */
.pg-toc { border: 1px solid var(--pg-border); border-radius: 14px; background: var(--pg-alt); }
.pg-toc summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--pg-muted); }
.pg-toc summary::-webkit-details-marker { display: none; }
.pg-toc summary::after { content: "+"; font-size: 20px; font-weight: 400; letter-spacing: 0; color: var(--pg-orange); }
.pg-toc[open] summary::after { content: "\2212"; }
.pg-toc ol { list-style: none; margin: 0; padding: 0 12px 12px; counter-reset: toc; }
.pg-toc li { counter-increment: toc; margin: 0; }
.pg-toc a { display: flex; gap: 10px; padding: 8px 8px; border-radius: 8px; font-size: 14.5px; line-height: 1.4; color: var(--pg-text); }
.pg-toc a::before { content: counter(toc); flex: none; width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--pg-teal-tint); color: var(--pg-heading); font-size: 12px; font-weight: 700; margin-top: 1px; }
.pg-toc a:hover, .pg-toc a.is-active { background: var(--pg-orange-tint); color: var(--pg-link); }
.pg-aside-cta { margin-top: 16px; background: var(--pg-teal); color: #fff; border-radius: 14px; padding: 20px; }
.pg-aside-cta h2, .pg-aside-cta p.pg-aside-title { margin: 0 0 6px; font-size: 18px; font-weight: 800; line-height: 1.25; color: #fff; }
.pg-aside-cta p { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .74); }
.pg-aside-cta .btn-main { width: 100%; justify-content: center; }
@media (max-width: 1023px) { .pg-aside-cta { display: none; } }

/* ---------- Prose ---------- */
.pg-prose > section { margin: 0 0 44px; scroll-margin-top: 90px; }
.pg-prose h2, .pg-prose .pg-h2, .pg-fix > h2, .pg-faq > h2 { position: relative; margin: 0 0 16px; padding-top: 16px; font-size: clamp(24px, 3vw, 31px); font-weight: 900; line-height: 1.2; letter-spacing: -.6px; color: var(--pg-heading); text-wrap: balance; }
.pg-prose h2::before, .pg-fix > h2::before, .pg-faq > h2::before { content: ""; position: absolute; top: 0; left: 0; width: 44px; height: 4px; border-radius: 4px; background: var(--pg-orange); }
.pg-prose h3 { margin: 28px 0 10px; font-size: 20px; font-weight: 800; line-height: 1.3; color: var(--pg-heading); }
.pg-prose h4 { margin: 22px 0 8px; font-size: 17px; font-weight: 700; color: var(--pg-heading); }
.pg-prose p, .pg-fix-body p { margin: 0 0 16px; }
.pg-prose a:not(.btn-main), .pg-fix-body a:not(.btn-main) { color: var(--pg-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pg-prose a:not(.btn-main):hover, .pg-fix-body a:not(.btn-main):hover { text-decoration-thickness: 2px; }
.pg-prose strong, .pg-fix-body strong { font-weight: 700; color: var(--pg-heading); }
.pg-prose ul, .pg-fix-body ul { margin: 0 0 18px; padding: 0 0 0 1.25em; list-style: disc; }
.pg-prose ol:not(.pg-steps), .pg-fix-body ol { margin: 0 0 18px; padding: 0 0 0 1.35em; list-style: decimal; }
.pg-prose li, .pg-fix-body li { margin: 0 0 8px; padding-left: 4px; }
.pg-prose li::marker, .pg-fix-body li::marker { color: var(--pg-orange); font-weight: 700; }
.pg-prose li > ul, .pg-prose li > ol { margin: 8px 0 0; }
.pg-prose hr { border: 0; border-top: 1px solid var(--pg-border); margin: 32px 0; }
.pg-prose code, .pg-fix-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--pg-teal-tint); color: var(--pg-heading); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere; }

/* Quick answer card */
.pg-prose blockquote.pg-answer { margin: 0 0 18px; padding: 18px 22px; background: var(--pg-teal-tint); border: 1px solid var(--pg-border); border-radius: 14px; font-size: 18px; line-height: 1.65; color: var(--pg-text); }
.pg-prose blockquote.pg-answer p:last-child { margin-bottom: 0; }
.pg-prose blockquote.pg-answer strong { color: var(--pg-heading); }
.pg-prose ul.pg-strip { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.pg-prose .pg-chip { margin: 0; padding: 14px 16px; border: 1px solid var(--pg-border); border-radius: 12px; background: var(--pg-bg); font-size: 15px; line-height: 1.55; }
.pg-prose .pg-chip > strong { display: inline-block; margin-bottom: 4px; padding: 2px 10px; border-radius: 100px; font-size: 11.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.pg-prose .pg-chip--pass { border-color: rgba(13, 138, 71, .35); background: var(--pg-green-tint); }
.pg-prose .pg-chip--pass > strong { color: #fff; background: var(--pg-green); }
.pg-prose .pg-chip--fail { border-color: rgba(204, 34, 0, .3); background: var(--pg-red-tint); }
.pg-prose .pg-chip--fail > strong { color: #fff; background: #cc2200; }
.pg-prose .pg-chip--fix { border-color: rgba(255, 64, 1, .35); background: var(--pg-orange-tint); }
.pg-prose .pg-chip--fix > strong { color: #fff; background: var(--pg-orange); }
.pg-prose .pg-chip--warn > strong { color: #1a1300; background: #f5b82e; }
.pg-prose .pg-chip--muted { background: var(--pg-alt); }
.pg-prose .pg-chip--muted > strong { color: #fff; background: #536570; }
.pg-prose .pg-chip::marker { content: ""; }
html[theme-mode="dark"] .pg-prose .pg-chip--pass > strong { color: #06210f; }
html[theme-mode="dark"] .pg-prose .pg-chip--fail > strong { color: #2b0700; background: #ff7a66; }
html[theme-mode="dark"] .pg-prose .pg-chip--muted > strong { background: #6b7a8a; }
.pg-prose p.pg-cta { margin: 6px 0 0; }

/* Callouts */
.pg-prose blockquote.pg-callout { margin: 20px 0; padding: 18px 22px; background: var(--pg-orange-tint); border: 1px solid rgba(255, 64, 1, .28); border-radius: 14px; }
.pg-prose blockquote.pg-callout > :last-child { margin-bottom: 0; }
.pg-prose blockquote.pg-callout ul { margin-bottom: 0; padding-left: 0; list-style: none; }
.pg-prose blockquote.pg-callout ul li { position: relative; padding-left: 28px; }
.pg-prose blockquote.pg-callout ul li::before { content: "\2713"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--pg-green); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; margin-top: 4px; }

/* Numbered steps */
.pg-prose ol.pg-steps { list-style: none; margin: 8px 0 22px; padding: 0; counter-reset: step; }
.pg-prose ol.pg-steps > li { counter-increment: step; position: relative; margin: 0; padding: 0 0 22px 56px; }
.pg-prose ol.pg-steps > li:last-child { padding-bottom: 0; }
.pg-prose ol.pg-steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--pg-orange); color: #fff; font-size: 16px; font-weight: 800; line-height: 1; box-shadow: 0 0 0 5px var(--pg-orange-tint); }
.pg-prose ol.pg-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 44px; bottom: 6px; width: 2px; background: var(--pg-border); }
.pg-prose ol.pg-steps > li::marker { content: ""; }
.pg-prose ol.pg-steps > li > :last-child { margin-bottom: 0; }

/* Code */
.pg-code { margin: 18px 0 22px; border-radius: 12px; overflow: hidden; background: var(--pg-code-bg); border: 1px solid rgba(255, 255, 255, .06); }
.pg-code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 8px 7px 14px; background: var(--pg-code-bar); }
.pg-code-lang { font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.pg-copy { appearance: none; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #fff; font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.pg-copy:hover { background: rgba(255, 255, 255, .14); }
.pg .pg-code pre { margin: 0; padding: 16px 18px; background: transparent; border: 0; border-radius: 0; overflow-x: auto; color: var(--pg-code-text); font-size: 14px; line-height: 1.65; tab-size: 2; -webkit-overflow-scrolling: touch; }
.pg .pg-code pre code { display: block; padding: 0; background: transparent; color: inherit; font-size: inherit; white-space: pre; overflow-wrap: normal; }
.pg-prose > section > pre:not(.pg-x) { margin: 18px 0 22px; padding: 16px 18px; border-radius: 12px; background: var(--pg-code-bg); color: var(--pg-code-text); overflow-x: auto; }

/* Tables */
.pg-prose figure.table, .pg-prose .table-scroll { margin: 18px 0 24px; overflow-x: auto; border: 1px solid var(--pg-border); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.pg-prose figure.table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.pg-prose figure.table th { background: var(--pg-teal); color: #fff; text-align: left; font-weight: 700; padding: 11px 14px; white-space: nowrap; }
.pg-prose figure.table td { padding: 11px 14px; border-top: 1px solid var(--pg-border); vertical-align: top; }
.pg-prose figure.table tbody tr:nth-child(even) td { background: var(--pg-alt); }
.pg-prose figure.table td:first-child { font-weight: 700; color: var(--pg-heading); }

/* Related links */
.pg-prose ul.pg-links { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.pg-prose ul.pg-links > li { position: relative; margin: 0; padding: 16px 18px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--pg-bg); border: 1px solid var(--pg-border); border-radius: 14px; box-shadow: var(--pg-shadow); font-size: 14.5px; line-height: 1.55; color: var(--pg-muted); transition: border-color .18s, transform .18s; }
.pg-prose ul.pg-links > li:hover { border-color: rgba(255, 64, 1, .5); transform: translateY(-2px); }
.pg-prose ul.pg-links > li::marker { content: ""; }
.pg-prose ul.pg-links > li > a { order: 2; font-size: 16.5px; font-weight: 800; line-height: 1.3; color: var(--pg-heading); text-decoration: none; }
.pg-prose ul.pg-links > li > a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.pg-prose ul.pg-links > li > a:hover { color: var(--pg-link); text-decoration: none; }
.pg-tag { order: 1; align-self: flex-start; padding: 2px 10px; border-radius: 100px; font-size: 11px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; background: var(--pg-teal-tint); color: var(--pg-heading); }
.pg-tag--tool { background: var(--pg-orange-tint); color: var(--pg-link); }
.pg-tag--guide { background: var(--pg-green-tint); color: var(--pg-green); }
.pg-prose ul.pg-links > li > .pg-desc { order: 3; font-size: 14px; line-height: 1.55; color: var(--pg-muted); }

/* ---------- How to fix card ---------- */
.pg-fix { margin: 8px 0 44px; padding: 26px 28px 24px; background: var(--pg-alt); border: 1px solid var(--pg-border); border-radius: 18px; scroll-margin-top: 90px; }
.pg-fix > h2 { margin-bottom: 8px; }
.pg-fix-note { margin: 0 0 18px; font-size: 14.5px; color: var(--pg-muted); }
.pg-fix-body { background: var(--pg-bg); border: 1px solid var(--pg-border); border-radius: 12px; padding: 20px 22px 6px; font-size: 16.5px; line-height: 1.7; }
.pg-fix-body > :last-child { margin-bottom: 14px; }
.pg-fix-body pre:not(.pg-x) { margin: 14px 0 18px; padding: 14px 16px; border-radius: 10px; background: var(--pg-code-bg); color: var(--pg-code-text); overflow-x: auto; font-size: 14px; }
.pg-fix-body pre code { background: transparent; color: inherit; padding: 0; font-size: inherit; white-space: pre; }
.pg-fix-body .pg-code { margin: 14px 0 18px; }
.pg-fix-cta { margin: 18px 0 0; }

/* ---------- FAQ ---------- */
.pg-faq { margin: 0 0 44px; scroll-margin-top: 90px; }
.pg-faq-list { display: grid; gap: 10px; margin-top: 4px; }
.pg-faq details { border: 1px solid var(--pg-border); border-radius: 12px; background: var(--pg-bg); overflow: hidden; transition: border-color .18s; }
.pg-faq details[open] { border-color: rgba(255, 64, 1, .5); box-shadow: var(--pg-shadow); }
.pg-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; font-size: 16.5px; font-weight: 700; line-height: 1.4; color: var(--pg-heading); }
.pg-faq summary::-webkit-details-marker { display: none; }
.pg-faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--pg-orange-tint); color: var(--pg-orange); font-size: 20px; font-weight: 500; line-height: 1; transition: transform .2s; }
.pg-faq details[open] summary::after { content: "\2212"; }
.pg-faq-a { padding: 0 18px 16px; font-size: 16px; line-height: 1.7; color: var(--pg-text); }
.pg-faq-a p { margin: 0 0 10px; }

/* ---------- Final CTA ---------- */
.pg-final { position: relative; overflow: hidden; background: var(--pg-teal); color: #fff; padding-block: 52px; text-align: center; }
.pg-final::before { content: ""; position: absolute; left: 50%; top: -220px; width: 560px; height: 560px; margin-left: -280px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 64, 1, .16) 0%, transparent 68%); pointer-events: none; }
.pg-final .pg-wrap { position: relative; z-index: 1; }
.pg .pg-final h2 { margin: 0 0 10px; color: #fff; font-size: clamp(25px, 3.4vw, 34px); font-weight: 900; line-height: 1.15; letter-spacing: -.6px; text-wrap: balance; }
.pg-final h2 em { font-style: normal; color: var(--pg-orange); }
.pg-final p { margin: 0 auto 22px; max-width: 560px; color: rgba(255, 255, 255, .74); font-size: 16.5px; line-height: 1.6; }
.pg-final .pg-hero-btns { justify-content: center; margin-bottom: 14px; }
.pg-final small { display: block; font-size: 13px; color: rgba(255, 255, 255, .5); }

/* ---------- Ads ---------- */
.pg-ad { padding-block: 12px 0; }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  .pg { font-size: 16.5px; }
  .pg-wrap { padding-inline: 16px; }
  .pg-hero { padding-block: 30px 36px; }
  .pg-lead { font-size: 16.5px; }
  .pg-hero-btns .btn-main, .pg-hero-btns .btn-ghost { flex: 1 1 100%; justify-content: center; }
  .pg-fix { padding: 18px 14px 16px; border-radius: 14px; }
  .pg-fix-body { padding: 16px 14px 4px; }
  .pg-prose blockquote.pg-answer { padding: 14px 16px; font-size: 17px; }
  .pg-prose ol.pg-steps > li { padding-left: 50px; }
  .pg-prose ol.pg-steps > li::before { width: 34px; height: 34px; font-size: 15px; }
  .pg-prose ol.pg-steps > li:not(:last-child)::after { left: 16px; top: 40px; }
  .pg-prose ul.pg-strip { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pg *, .pg *::before, .pg *::after { transition: none !important; animation: none !important; }
  .pg .btn-main:hover, .pg-prose ul.pg-links > li:hover { transform: none; }
}
@media print {
  .pg-aside, .pg-hero-btns, .pg-final, .pg-ad, .pg-copy { display: none !important; }
  .pg-hero { background: none; color: #000; padding: 0; }
  .pg .pg-hero h1, .pg-lead { color: #000; }
}
