/* Processor Freedom: the one theme.
   Loaded after the site's own stylesheets on every page. It does three things:
     1. the look both modes share: quiet buttons, the closing section without its navy slab, the login line;
     2. dark mode, which follows the device setting by itself (there is no switch);
     3. the PF logo, navy on light and white on dark.
   The same colours, type and buttons are used by the console and by PF Sites. */

:root {
  color-scheme: light dark;
  /* A button's fill and lettering. */
  --pf-btn: #e4ecfa;
  --pf-btn-hover: #d7e3f8;
  --pf-btn-ink: #0a1f44;
  --pf-btn-line: rgba(10, 31, 68, .12);
  /* Surfaces the dark rules use; in light they are the plain page colours. */
  --pf-card: #ffffff;
  --pf-card-2: #f7f8fb;
  --pf-tonal: #0a1f3d;
  --pf-blue: #1d4f9e;
}

/* Colours change smoothly when the device switches between light and dark. */
html, body, header.nav, .footer, .login-line { transition: background-color .3s ease, color .3s ease, border-color .3s ease; }
@media (prefers-reduced-motion: reduce) { html, body, header.nav, .footer, .login-line { transition: none; } }

/* ---------- The logo ---------- */
.brand-mark { background-image: url('/assets/pf-mark-navy.svg'); background-size: cover; border-radius: 8px; }

/* ---------- Buttons: a pale tint with navy lettering, no slab and no heavy shadow ---------- */
.btn-primary, .btn-accent, .cta .btn-primary,
.checkout-block .pay-btn, .cro-popup-form button[type=submit], .scp-receipt-btn.primary {
  background: var(--pf-btn);
  color: var(--pf-btn-ink);
  border: 1px solid var(--pf-btn-line);
  box-shadow: none;
  filter: none;
}
.btn-primary:hover, .btn-accent:hover, .cta .btn-primary:hover,
.checkout-block .pay-btn:hover, .cro-popup-form button[type=submit]:hover {
  background: var(--pf-btn-hover);
  filter: none;
}
.btn-primary .arrow, .btn-accent .arrow { color: inherit; }

/* The page you are on, in the bar across the top. */

/* ---------- The closing section: the words sit on the page itself ---------- */
.cta { background: transparent; background-image: none; box-shadow: none; border: 0; }
.cta::before, .cta::after { display: none; }
.cta h2 { color: var(--ink); }
.cta p { color: var(--ink-3); }
.cta .btn-ghost { color: var(--ink); border-color: var(--line-2); background: transparent; }
.cta .btn-ghost:hover { background: var(--bg-soft); border-color: var(--ink-3); }

/* ---------- One quiet line to the console, above the footer of Processor Freedom's own pages ---------- */
.login-line {
  border-top: 1px solid var(--line);
  padding: 20px 24px;
  text-align: center;
  font-size: 14.5px;
  color: var(--ink-3);
  background: var(--bg);
}
.login-line a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; margin-left: 6px; white-space: nowrap; }
.login-line a:hover { color: var(--pf-blue); }

/* ---------- The calculator's result panel: a pale panel with navy figures instead of a navy slab ---------- */
.calc-output { background: linear-gradient(165deg, #f7faff 0%, #e9f0fb 50%, #d9e5f7 100%); color: var(--ink); }
.calc-output::before { display: none; }
.calc-output h3 { color: var(--ink); }
.calc-current-box, .calc-lead-form { background: rgba(255, 255, 255, .72); border-color: rgba(10, 31, 68, .12); }
.savings-tile--std { background: rgba(29, 79, 158, .07); border-color: rgba(29, 79, 158, .18); }
.savings-tile--dual { background: rgba(29, 79, 158, .13); border-color: rgba(29, 79, 158, .28); }
.calc-output .btn { background: var(--pf-btn) !important; color: var(--pf-btn-ink) !important; border: 1px solid var(--pf-btn-line) !important; }
.calc-output .btn:hover { background: var(--pf-btn-hover) !important; }
.calc-lead-form input[type="email"] { background: var(--pf-card) !important; color: var(--ink) !important; border-color: var(--line-2) !important; }
.calc-output [style*="rgba(255,255,255,0.65)"] { color: var(--ink-3) !important; }
.calc-lead-success { color: #15803d !important; }
.calc-lead-error { color: #b91c1c !important; }

/* ---------- Headings kept to one row (About, How it works) or two centred rows (Our Story) ----------
   From laptop width up the type narrows with the window so the words always fit; on a phone one row cannot fit
   at a readable size, so there they wrap as any heading does. A heading may be wider than the column it sits in,
   so it is centred on the page itself (left 50% and back by half its own width), not on that column. */
@media (min-width: 900px) {
  .page-hero h1.one-row, .manifesto-page.story-centred .manifesto-title { white-space: nowrap; width: max-content; max-width: none; position: relative; left: 50%; transform: translateX(-50%); margin-inline: 0; }
  .page-hero h1.about-title { font-size: clamp(22px, 2.62vw, 50px); }
  .page-hero h1.product-title { font-size: clamp(26px, 3.4vw, 60px); }
  .manifesto-page.story-centred .manifesto-title { font-size: clamp(34px, 4.4vw, 64px); }
  /* This one starts at the column's left edge with the rest of its section, so it is sized to end inside the column. */
  .section-head.one-row { max-width: none; }
  .section-head.one-row h2 { white-space: nowrap; font-size: clamp(24px, 3.05vw, 40px); }
}
@media (max-width: 899px) { .story-centred .manifesto-title br { display: none; } .manifesto-page.story-centred .manifesto-title { text-wrap: balance; } }
/* Our Story: the label, the title and the words under them sit centred on the page. */
.manifesto-page.story-centred .container { max-width: 760px; text-align: center; }
.manifesto-page.story-centred .manifesto-rule { margin-inline: auto; }
.manifesto-page.story-centred .practice-callout { text-align: left; }

/* ---------- Homepage: the opening block sits centred ----------
   The headline is two short sentences, the second in the brand blue. From laptop width up they share one row,
   reaching past the column toward the page's edges and narrowing with the window so they always fit. Under it are
   two rows, each a sentence, each narrower than the row above. On a phone each sentence of the headline takes its
   own row and the two sentences under it run on as a paragraph. All of it is centred.
   The animation under it keeps its own left-aligned lettering. */
.hero-centred .hero-inner { text-align: center; }
.hero-centred h1 { max-width: none; font-size: clamp(28px, 8.6vw, 44px); }
.hero-centred h1 .hit { color: var(--pf-blue); }
.hero-centred .lead { max-width: none; margin-inline: auto; font-size: clamp(19px, 2.15vw, 38px); line-height: 1.3; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.hero-centred .hero-cta, .hero-centred .hero-meta { justify-content: center; }
.hero-centred .hero-visual { text-align: left; }
@media (min-width: 900px) {
  .hero-centred h1 { white-space: nowrap; margin-inline: calc(50% - 50vw + 24px); font-size: clamp(34px, 4.5vw, 92px); }
  .hero-centred h1 br { display: none; }
  .hero-centred .lead .row { display: block; white-space: nowrap; }
}

/* ---------- Dark: every white or navy surface of the site's own stylesheets, re-stated ---------- */
@media (prefers-color-scheme: dark) {
 :root .eyebrow { color: var(--accent); }
 :root .eyebrow::before { background: var(--pf-tonal); }
 :root .nav { background: rgba(28, 28, 30,0.78); }
 :root .nav::before { background: var(--pf-tonal); }
 :root .brand-mark::before { background: radial-gradient(circle at 30% 30%, rgba(28, 28, 30,0.9), transparent 60%),
    linear-gradient(135deg, transparent, rgba(28, 28, 30,0.25)); }
 :root .brand-mark::after { background: var(--pf-card); }
 :root .label-xs--accent { color: var(--accent); }
 :root .tier-card--t2 { background: var(--pf-card); }
 :root .chrome-badge-footer { background: var(--pf-tonal); }
 :root .stat-number { color: var(--accent); }
 :root .card { background: var(--pf-card); }
 :root .text-accent { color: var(--accent); }
 :root .hero { background: linear-gradient(180deg, var(--pf-card) 0%, var(--bg-soft) 100%); }
 :root .hero-meta .dot { background: var(--pf-tonal); }
 :root .browser-mock { background: var(--pf-card); }
 :root .bm-url { background: var(--pf-card); }
 :root .bm-ext-btn::after { border: 1.5px solid var(--pf-card); }
 :root .bm-software { background: var(--pf-card-2); }
 :root .bm-pay-btn { background: var(--pf-card); }
 :root .bm-arrow .pulse { background: var(--pf-tonal); }
 :root .bm-popup { background: var(--pf-card); }
 :root .bm-popup::before { background: var(--pf-card); }
 :root .bm-popup-status { color: var(--accent); }
 :root .bm-popup-status .dot { background: var(--pf-tonal); }
 :root .bm-rate-row.old { background: var(--pf-card-2); }
 :root .bm-rate-row.new { background: var(--pf-card-2); }
 :root .bm-rate-row.new .bm-rate-label { color: var(--accent); }
 :root .bm-rate-row.new .bm-rate-fee { color: var(--accent); }
 :root .bm-saved { background: var(--pf-tonal); }
 :root .bm-foot { background: var(--pf-card-2); }
 :root .hero-savings { background: var(--pf-card); }
 :root .hs-status { color: var(--accent); }
 :root .hs-dot { background: var(--pf-tonal); }
 :root .hs-old { background: var(--pf-card); }
 :root .hs-new { background: var(--pf-card-2); }
 :root .hs-new .hs-label { color: var(--accent); }
 :root .hs-new .hs-amount { color: var(--accent); }
 :root .hs-new .hs-bar span { background: var(--pf-tonal); }
 :root .hs-saved { background: var(--pf-tonal); }
 :root .scp-demo { background: var(--pf-card); }
 :root .scp-app { background: var(--pf-card); }
 :root .scp-app-chrome { background: var(--pf-card-2); }
 :root .scp-extbtn { background: var(--pf-card); }
 :root .scp-extbtn-mark { background-color: var(--pf-tonal); }
 :root .scp-extbtn.active { color: var(--accent); }
 :root .scp-pill.paid { color: var(--accent); }
 :root .scp-panel { background: linear-gradient(180deg, var(--pf-card) 0%, var(--pf-card-2) 100%); }
 :root .scp-panel-head { background: var(--pf-card); }
 :root .scp-panel-logo { background: var(--pf-card); }
 :root .scp-channel:hover { color: var(--accent); }
 :root .scp-success-check { background: var(--pf-tonal); }
 :root .scp-receipt-card { background: var(--pf-card); }
 :root .scp-receipt-check { background: var(--pf-tonal); }
 :root .scp-receipt-btn.ghost { background: var(--pf-card); }
 :root .scp-read-row { background: var(--pf-card); }
 :root .scp-read-row.shown { background: var(--pf-card); }
 :root .scp-send { background: var(--pf-tonal); }
 :root .scp-send.clicked { background: var(--pf-tonal); }
 :root .scp-success { color: var(--accent); }
 :root .scp-success-t { color: var(--accent); }
 :root .scp-rate-strip { background: var(--pf-card); }
 :root .scp-rate { color: var(--accent); }
 :root .orbit-tile { background: var(--pf-card); }
 :root .orbit-core { background: radial-gradient(circle at 30% 30%, oklch(72% var(--accent-c) var(--accent-h)) 0%, transparent 60%),
    linear-gradient(160deg, var(--pf-tonal), var(--pf-tonal)); }
 :root .bridge-tile { background: var(--pf-card); }
 :root .bridge-core { background: radial-gradient(circle at 30% 30%, oklch(70% var(--accent-c) var(--accent-h)) 0%, transparent 60%),
    linear-gradient(160deg, var(--pf-tonal), var(--pf-tonal)); }
 :root .bridge-core-OLD-OFF { background: linear-gradient(160deg, var(--pf-tonal), var(--pf-tonal)); }
 :root .bridge-end { background: var(--pf-tonal); }
 :root .bridge-output { background: var(--pf-tonal); }
 :root .sec-visual { background: var(--pf-tonal); }
 :root .visual-switch { background: var(--pf-card); }
 :root .proc-card.new { background: linear-gradient(180deg, var(--accent-soft), var(--pf-card)); }
 :root .proc-rate.savings { color: var(--accent); }
 :root .proc-card.new .proc-meta { color: var(--accent); }
 :root .switch-arrow { background: var(--pf-tonal); }
 :root .savings-num { color: var(--accent); }
 :root .visual-dashboard { background: linear-gradient(180deg, var(--pf-card) 0%, var(--bg-tint) 100%); }
 :root .dash-side { background: var(--pf-card); }
 :root .dash-side-row.active { color: var(--accent); }
 :root .dash-main { background: var(--pf-card); }
 :root .dash-stat .delta { color: var(--accent); }
 :root .code-block, :root .checkout-block { background: var(--pf-tonal); }
 :root .checkout-block { background: var(--pf-card); }
 :root .checkout-block .field .input { background: var(--pf-card); }
 :root .checkout-fee .save { color: var(--accent); }
 :root .calc { background: var(--pf-card); }
 :root .calc-slider::-webkit-slider-thumb { background: var(--pf-card); }
 :root .calc-slider::-moz-range-thumb { background: var(--pf-card); }
 :root .calc-search-input { background: var(--pf-card); }
 :root .calc-search-list { background: var(--pf-card); }
 :root .calc-tier-badge.t1 { color: var(--accent); }
 :root .calc-bd-badge { color: var(--accent); }
 :root .integ-cell { background: var(--pf-card); }
 :root .pt-btn.active { background: var(--pf-card); }
 :root .calc-info-btn:hover { color: var(--accent); }
 :root .calc-info-dialog { background: var(--pf-card); }
 :root .calc-info-body a { color: var(--accent); }
 :root .m-card { background: var(--pf-card); }
 :root .m-card.featured { background: linear-gradient(160deg, var(--pf-card-2), var(--pf-card)); }
 :root .m-list .m-tag { color: var(--accent); }
 :root .m-savings strong { color: var(--accent); }
 :root .iso-card { background: var(--pf-card); }
 :root .iso-card.featured { background: var(--pf-tonal); }
 :root .iso-badge { background: var(--pf-tonal); }
 :root .iso-glyph { color: var(--accent); }
 :root .sec-item { background: var(--pf-card); }
 :root .sec-item .icon { color: var(--accent); }
 :root .sec-shield-core { background: linear-gradient(160deg, var(--pf-tonal), var(--pf-tonal)); }
 :root .faq-item[open] .plus { color: var(--accent); }
 :root .price-card { background: var(--pf-card); }
 :root .price-card.featured .badge { background: var(--pf-tonal); }
 :root .price-feat svg { color: var(--accent); }
 :root .page-hero { background: linear-gradient(180deg, var(--pf-card), var(--bg-soft)); }
 :root .step { background: var(--pf-card); }
 :root .step .num { color: var(--accent); }
 :root .feat { background: var(--pf-card); }
 :root .feat .icon-wrap { color: var(--accent); }
 :root .team-card { background: var(--pf-card); }
 :root .team-avatar { background: linear-gradient(135deg, var(--pf-tonal), var(--pf-tonal)); }
 :root .field-group input, :root .field-group textarea, :root .field-group select { background: var(--pf-card); }
 :root .tier-head .pill { color: var(--accent); }
 :root .int-finder { background: var(--pf-card); }
 :root .int-search input { background: var(--pf-card); }
 :root .int-chip { background: var(--pf-card); }
 :root .int-chip[aria-pressed="true"] { color: var(--accent); }
 :root .int-tier--t1 { background: var(--pf-tonal); }
 :root .int-guide-hint { color: var(--accent); }
 :root .int-catchall .mono-ico { background: var(--pf-tonal); }
 :root details.int-cat-d { background: var(--pf-card); }
 :root summary.int-cat-head { background: var(--cat-tint, var(--pf-card)); }
 :root .int-cat-dot { background: var(--cat-color, var(--pf-tonal)); }
 :root .int-row { background: var(--pf-card); }
 :root .int-row .new-tag { background: var(--pf-tonal); }
 :root .tier-block.featured .int-row { background: var(--pf-card); }
 :root .tier-block.featured .int-row .mono-ico { color: var(--accent); }
 :root #tier2 .int-row { background: var(--pf-card-2); }
 :root .tier-block.featured .int-row.clickable:hover::after { color: var(--accent); }
 :root .int-modal { background: var(--pf-card); }
 :root .int-modal-head { background: var(--pf-card); }
 :root .int-modal-head .mono-ico { color: var(--accent); }
 :root .int-modal-close { background: var(--pf-card); }
 :root .int-modal-body h4 { color: var(--accent); }
 :root .int-modal-body .pill-row .pill { color: var(--accent); }
 :root .int-modal-foot .save-line strong { color: var(--accent); }
 :root .free-banner { background: linear-gradient(135deg, oklch(96% calc(var(--accent-c) * 0.6) var(--accent-h)), var(--pf-card)); }
 :root .free-mark { background: linear-gradient(160deg, var(--pf-tonal), var(--pf-tonal)); }
 :root .calc-quick-chip.active { color: var(--accent); }
 :root .calc-savings-tile .tile-amount { color: var(--accent); }
 :root .cro-popup-card { background: var(--pf-card); }
 :root .cro-popup-eyebrow { color: var(--accent); }
 :root .cro-popup-form input[type=email] { background: var(--pf-card); }
 :root .cro-popup-success { color: var(--accent); }
 :root .manifesto-eyebrow { color: var(--accent); }
 :root .standing-commitments li::before { color: var(--accent); }
 :root .practice-callout-label { color: var(--accent); }
 :root .legal a { color: var(--accent); }
 :root .rate-col--pf { background: var(--pf-tonal); }
 :root .checkout-wrap .card { background: var(--pf-card); }
 :root .checkout-wrap input, :root .checkout-wrap .collect { background: var(--pf-card); }
 :root .checkout-wrap button { background: var(--pf-tonal); }
 :root .checkout-wrap .proc button.on { background: var(--pf-card); }
 :root .checkout-wrap .discount { color: var(--accent); }
}

/* ---------- Dark: the colours themselves, and what the derived rules cannot know ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-soft: #1c1c1e;
    --bg-tint: #2c2c2e;
    --ink: #f5f5f7;
    --ink-2: #d1d1d6;
    --ink-3: #a1a1a6;
    --ink-4: #6e6e73;
    --line: rgba(255, 255, 255, .12);
    --line-2: rgba(255, 255, 255, .2);
    --accent: #7fb0ff;
    --accent-deep: #1b2439;
    --accent-soft: #1c1c1e;
    --accent-glow: #7fb0ff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .7);
    --shadow-xl: 0 40px 80px -20px rgba(0, 0, 0, .8);
    --pf-btn: #1b2439;
    --pf-btn-hover: #232e48;
    --pf-btn-ink: #f5f5f7;
    --pf-btn-line: rgba(255, 255, 255, .14);
    --pf-card: #1c1c1e;
    --pf-card-2: #161618;
    --pf-tonal: #1b2439;
    --pf-blue: #7fb0ff;
  }
  html, body { background: #000; color: var(--ink); }
  .brand-mark { background-image: url('/assets/pf-mark-white.svg'); }
  header.nav { background: rgba(28, 28, 30, .86); border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .footer { background: #0b0b0d; border-top: 1px solid rgba(255, 255, 255, .1); }

  /* Hand-themed pieces, restated after the derived rules. */
  :root .calc-output { background: var(--pf-card); border: 1px solid var(--line); }
  :root .calc-current-box, :root .calc-lead-form { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
  :root .savings-tile--std { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
  :root .savings-tile--dual { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .22); }
  :root .calc-lead-success { color: #86efac !important; }
  :root .calc-lead-error { color: #fca5a5 !important; }
  :root .free-banner { background: var(--pf-card); border-color: var(--line); }
  :root .free-banner::before, :root .free-banner::after { display: none; }
  :root .m-card.featured { background: var(--pf-card); border-color: var(--line-2); }
  [style*="linear-gradient(180deg, var(--accent-soft), #fff"] { background: var(--pf-card) !important; }

  /* Colours written straight into a page's markup. */
  [style*="background:#fff"], [style*="background: #fff"], [style*="background:#ffffff"], [style*="background: #ffffff"] { background: var(--pf-card) !important; }
  [style*="#fef2f2"] { background: rgba(255, 69, 58, .14) !important; }
  [style*="#e7f6ec"] { background: rgba(48, 209, 88, .14) !important; border-color: rgba(48, 209, 88, .38) !important; }
  [style*="color:var(--accent-deep)"], [style*="color: var(--accent-deep)"] { color: var(--accent) !important; }
  [style*="color:oklch(3"], [style*="color: oklch(3"], [style*="color:oklch(4"], [style*="color: oklch(4"] { color: var(--accent) !important; }
  [style*="#17663a"] { color: #63e08c !important; }
  :root .tier-head .pill.t2 { background: rgba(127, 176, 255, .14); color: var(--accent); border-color: rgba(127, 176, 255, .4); }
  :root .checkout-wrap .banner.warn { background: rgba(255, 159, 10, .14); color: #ffb340; border-color: rgba(255, 159, 10, .35); }
}
