/* ============================================================================
   SinoSource — page polish
   Loaded ONLY by non-index pages, after styles.css, scoped under <body class="pp">.
   The homepage (index.html + homepage.css) never loads this file, so its design
   is left exactly as-is.

   Purpose: the secondary pages were flat and low-contrast — cards barely
   separated from the background and body copy sat too close to it. This layer
   gives every surface real definition, lifts the muted text on dark sections to
   a readable level, and adds a consistent, professional typographic rhythm.
   Light-background sections (e.g. .niche-covers / .covers-item) keep their dark
   text and are deliberately excluded.
   ============================================================================ */

/* ---- 1. Surfaces: give cards and panels real definition ------------------ */
.pp .risk-card,
.pp .reg-card,
.pp .impact-card,
.pp .tip-card,
.pp .faq-card,
.pp .result-card,
.pp .incident-card,
.pp .plan-block,
.pp .sc-check-card,
.pp .honest-card__option,
.pp .spt__item,
.pp .feature-card,
.pp .step-card,
.pp .info-card,
.pp .panel {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 12px 34px -14px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Interactive lift on the cards that read as “tiles”. */
.pp .risk-card:hover,
.pp .reg-card:hover,
.pp .impact-card:hover,
.pp .tip-card:hover,
.pp .result-card:hover,
.pp .feature-card:hover,
.pp .step-card:hover,
.pp .info-card:hover,
.pp .panel:hover {
  transform: translateY(-3px);
  border-color: rgba(240, 165, 30, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 20px 48px -16px rgba(0, 0, 0, 0.8);
}

/* ---- 2. Readability: lift muted copy on dark cards & sections ------------- */
.pp .risk-card__body,
.pp .reg-card__desc,
.pp .impact-card p,
.pp .tip-card p,
.pp .panel-sub,
.pp .result-card p,
.pp .info-card p,
.pp .feature-card p,
.pp .step-card p {
  color: #bcbccb;
}

/* Section intros / lead paragraphs that sat too dim on the dark background.
   Scoped to content wrappers so nav, footer and light sections are untouched. */
.pp main :is(section, .container) > p,
.pp .site-page-v2 :is(section, .container) > p {
  color: #c4c4d2;
}

/* ---- 3. Typography: a calmer, more professional reading rhythm ----------- */
.pp main p,
.pp .site-page-v2 p,
.pp article p {
  line-height: 1.75;
}

.pp main :is(h1, h2, h3),
.pp .site-page-v2 :is(h1, h2, h3) {
  letter-spacing: -0.015em;
  line-height: 1.15;
}

/* Body links that aren't buttons get a clear, on-brand treatment. */
.pp main a:not(.btn):not([class*="card"]):not([class*="nav"]),
.pp .site-page-v2 a:not(.btn):not([class*="card"]):not([class*="nav"]),
.pp article a:not(.btn) {
  color: #f5bc45;
  text-decoration-color: rgba(245, 188, 69, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
.pp main a:not(.btn):not([class*="card"]):not([class*="nav"]):hover,
.pp .site-page-v2 a:not(.btn):not([class*="card"]):not([class*="nav"]):hover,
.pp article a:not(.btn):hover {
  text-decoration-color: #f5bc45;
}

/* ---- 4. Eyebrows / section labels: a small accent for structure ---------- */
.pp .eyebrow,
.pp .section-eyebrow,
.pp [class$="__eyebrow"],
.pp [class$="__kicker"] {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ---- 5. Accessible focus for keyboard users ------------------------------ */
.pp a:focus-visible,
.pp button:focus-visible,
.pp [role="button"]:focus-visible,
.pp summary:focus-visible {
  outline: 2px solid #f0a51e;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- 6. Ambient page background (opt-in via .pp-ambient) ------------------
   The tariff and Safety Gate pages read flat: near-black content over near-black
   body. This adds soft brand-tinted light and a faint fading grid behind the
   content (both fixed, low-opacity) so the page has depth without touching text
   contrast. Applied only to bodies that also carry .pp-ambient. */
body.pp-ambient {
  background-color: #0a0a10;
  background-image:
    radial-gradient(1300px 720px at 15% -6%, rgba(212, 43, 30, 0.20), transparent 60%),
    radial-gradient(1200px 700px at 92% 8%, rgba(240, 165, 30, 0.14), transparent 58%),
    radial-gradient(1100px 800px at 80% 48%, rgba(212, 43, 30, 0.10), transparent 55%),
    radial-gradient(1200px 820px at 8% 62%, rgba(91, 126, 153, 0.11), transparent 55%),
    radial-gradient(1300px 900px at 55% 100%, rgba(240, 165, 30, 0.09), transparent 60%),
    linear-gradient(180deg, #12101a 0%, #0a0a10 40%, #0a0a10 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}
body.pp-ambient::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 100% 78% at 50% 0%, #000 42%, transparent 88%);
  mask-image: radial-gradient(ellipse 100% 78% at 50% 0%, #000 42%, transparent 88%);
}

/* Tool-page heroes set their own solid dark background, which sits as a flat box
   in front of the ambient. Clear it on ambient pages so the page glow flows
   through the hero as one continuous surface. */
body.pp-ambient .tp-hero,
body.pp-ambient .tt-hero,
body.pp-ambient .tool-hero,
body.pp-ambient .calc-hero,
body.pp-ambient .sc-hero,
body.pp-ambient .cal-hero,
body.pp-ambient section.hero {
  background: transparent !important;
}

/* ---- 7. De-template the hero eyebrows -----------------------------------
   The eyebrows led with a small coloured "live" dot (often pulsing) — a strong
   AI-SaaS-template tell. Drop that decorative dot. This targets only the dot,
   which is the first <span> child of the eyebrow; category icons (an <svg>) and
   the functional colour-coded regulation status dots (.reg-dot, which live
   outside eyebrows) are left alone. Also stop any leftover pulse animation. */
body.pp [class*="eyebrow"] > span:first-child {
  display: none;
}
body.pp .tp-dot,
body.pp .tt-live-dot,
body.pp .premium-dot,
body.pp [class*="--pulse"] {
  animation: none !important;
}

/* ============================================================================
   Display headings — one type system across the whole product.
   index.html and the client dashboard both set headings in Space Grotesk, while
   the 33 inner pages used the body font. That mismatch is why About "felt like
   another website" next to the homepage and the workspace.
   Space Grotesk is served from our own /fonts/ (already used by the portal), so
   this needs no third-party request and no per-page <link>.
   Scoped to .pp, so index.html is untouched.
   ============================================================================ */
@font-face {
   font-family: 'Space Grotesk';
   font-style: normal;
   font-weight: 600;
   font-display: swap;
   src: url('../fonts/spacegrotesk-latin-600.woff2') format('woff2');
   unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                  U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
   font-family: 'Space Grotesk';
   font-style: normal;
   font-weight: 600;
   font-display: swap;
   src: url('../fonts/spacegrotesk-latin-ext-600.woff2') format('woff2');
   unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF,
                  U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
   font-family: 'Space Grotesk';
   font-style: normal;
   font-weight: 700;
   font-display: swap;
   src: url('../fonts/spacegrotesk-latin-700.woff2') format('woff2');
   unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                  U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
   font-family: 'Space Grotesk';
   font-style: normal;
   font-weight: 700;
   font-display: swap;
   src: url('../fonts/spacegrotesk-latin-ext-700.woff2') format('woff2');
   unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF,
                  U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.pp h1,
.pp h2,
.pp h3 {
   font-family: 'Space Grotesk', var(--font, system-ui, sans-serif);
   letter-spacing: -.02em;
}

/* ─── Supporting content sections ───────────────────────────────────────────
   A tool page is nearly all interactive UI, so there is little for search to
   index and little orientation for anyone arriving cold. The blocks below hold
   the explanatory copy that runs beneath the tool. */

.seo-block {
   padding: clamp(56px, 7vw, 92px) 0;
   border-top: 1px solid var(--border-dark);
}
.seo-block--alt { background: rgba(255, 255, 255, .015); }
.seo-block__inner {
   max-width: 940px;
   margin: 0 auto;
   padding: 0 24px;
}
.seo-block__eyebrow {
   margin-bottom: 12px;
   font-size: 12px;
   font-weight: 700;
   letter-spacing: .12em;
   text-transform: uppercase;
   color: var(--gold);
}
.seo-block h2 {
   margin-bottom: 14px;
   font-size: clamp(24px, 3.2vw, 33px);
   font-weight: 700;
   line-height: 1.2;
   color: var(--text-bright);
}
.seo-block h3 {
   margin-bottom: 8px;
   font-size: 16.5px;
   font-weight: 600;
   color: var(--text-bright);
}
.seo-block p {
   max-width: 74ch;
   color: var(--text-mid);
   font-size: 15.5px;
   line-height: 1.72;
}
.seo-block p + p { margin-top: 14px; }
.seo-block__lead { margin-bottom: 30px; font-size: 16.5px; }
.seo-block a:not(.tp-btn) {
   color: var(--gold-text);
   text-decoration: underline;
   text-underline-offset: 3px;
   text-decoration-thickness: 1px;
   text-decoration-color: rgba(240, 165, 30, .38);
}
.seo-block a:not(.tp-btn):hover { text-decoration-color: var(--gold); }

.seo-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
   gap: 16px;
   margin-top: 28px;
}
.seo-card {
   padding: 22px;
   border: 1px solid var(--border-dark);
   border-radius: var(--radius-lg);
   background: var(--bg-card);
}
.seo-card p { font-size: 14.5px; line-height: 1.65; }

/* Numbered steps */
.seo-steps { margin-top: 26px; counter-reset: seostep; list-style: none; }
.seo-steps li {
   position: relative;
   margin-bottom: 18px;
   padding-left: 46px;
   counter-increment: seostep;
   color: var(--text-mid);
   font-size: 15.5px;
   line-height: 1.68;
}
.seo-steps li::before {
   content: counter(seostep);
   position: absolute;
   left: 0;
   top: -1px;
   display: grid;
   place-items: center;
   width: 30px;
   height: 30px;
   border: 1px solid rgba(240, 165, 30, .32);
   border-radius: 50%;
   background: var(--gold-pale);
   color: var(--gold-text);
   font-size: 13px;
   font-weight: 700;
   font-variant-numeric: tabular-nums;
}
.seo-steps strong { display: block; margin-bottom: 3px; color: var(--text-bright); font-weight: 600; }

/* FAQ built on native <details>: no script needed, which keeps the page CSP happy. */
.seo-faq { margin-top: 26px; }
.seo-faq details {
   border: 1px solid var(--border-dark);
   border-radius: var(--radius);
   background: var(--bg-card);
   margin-bottom: 10px;
   overflow: hidden;
}
.seo-faq summary {
   position: relative;
   padding: 17px 52px 17px 20px;
   cursor: pointer;
   list-style: none;
   color: var(--text-bright);
   font-size: 15.5px;
   font-weight: 600;
   line-height: 1.45;
}
.seo-faq summary::-webkit-details-marker { display: none; }
.seo-faq summary::after {
   content: '';
   position: absolute;
   right: 22px;
   top: 50%;
   width: 9px;
   height: 9px;
   margin-top: -6px;
   border-right: 2px solid var(--gold);
   border-bottom: 2px solid var(--gold);
   transform: rotate(45deg);
   transition: transform .2s ease;
}
.seo-faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.seo-faq summary:hover { background: rgba(255, 255, 255, .022); }
.seo-faq summary:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.seo-faq .seo-faq__a { padding: 0 20px 18px; }
.seo-faq .seo-faq__a p { font-size: 15px; }

/* Light mode */
html.light-mode .seo-block { border-top-color: var(--border-light); }
html.light-mode .seo-block--alt { background: #FAFAFC; }
html.light-mode .seo-block h2,
html.light-mode .seo-block h3,
html.light-mode .seo-faq summary,
html.light-mode .seo-steps strong { color: var(--text-dark); }
html.light-mode .seo-block p,
html.light-mode .seo-steps li { color: var(--text-body); }
html.light-mode .seo-card,
html.light-mode .seo-faq details { border-color: var(--border-light); background: #fff; }
html.light-mode .seo-block a:not(.tp-btn) { color: #a06a00; }

@media (max-width: 640px) {
   .seo-block { padding: 48px 0; }
   .seo-steps li { padding-left: 40px; }
}

/* Once a card becomes a link, it has to look like one. */
a.seo-card {
   display: block;
   text-decoration: none;
   transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
a.seo-card:hover {
   border-color: rgba(240, 165, 30, .42);
   background: rgba(240, 165, 30, .05);
   transform: translateY(-2px);
}
a.seo-card:focus-visible {
   outline: 2px solid var(--gold);
   outline-offset: 2px;
}
a.seo-card h3 { transition: color .18s ease; }
a.seo-card:hover h3 { color: var(--gold-text); }
html.light-mode a.seo-card:hover { background: #FFFBF2; }
html.light-mode a.seo-card:hover h3 { color: #a06a00; }
@media (prefers-reduced-motion: reduce) {
   a.seo-card, a.seo-card h3 { transition: none; }
   a.seo-card:hover { transform: none; }
}

/* The footer copyright is `white-space: nowrap` in styles.css, which overflows
   a 375px viewport and gives every page on the site a horizontal scrollbar on
   a phone. Allowed to wrap below the small breakpoint. */
@media (max-width: 480px) {
   .footer__copy { white-space: normal; }
}
