/* Pop Focus: shared design for the privacy, terms, changelog and other pages.
   Loaded after style.css on every page except the home page (which uses home.css).
   Colors match home.css; if you change a theme color, change it in both files. */

/* Theme tokens. The page starts in the visitor's system theme; the header toggle
   overrides it and remembers the choice on this device (localStorage, never sent anywhere). */
body.page {
  --ink: #16233A;
  --muted: #4D5566;
  --paper: #F7F2E8;
  --mist: #F0E8D9;
  --sky: #E8DEC9;
  --raised: #FCF9F3;
  --blue: #2563EB;
  --deep: #1E40AF;
  --bubble: #D6E4F7;
  --link: #1E40AF;
  --line: rgba(84, 62, 28, .15);
  --glass: rgba(247, 242, 232, .88);
  --hero-top: #F0E7D6;
  --blob-1: rgba(96, 165, 250, .20);
  --blob-2: rgba(183, 214, 253, .55);
  --blob-3: rgba(30, 64, 175, .07);
  --win: #172135;
  --win-shadow: 0 40px 70px -36px rgba(40, 32, 18, .55), 0 0 0 1px rgba(40, 32, 18, .10);
  --final: #1E40AF;
  --soft: #FCF9F3;
  /* style.css names, so the carried-over Buy form, email form and footer follow the theme too */
  --bg: var(--paper);
  --text: var(--ink);
  --card: var(--raised);
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html:has(body.page) { background: #F7F2E8; color-scheme: light; }
html[data-theme="dark"]:has(body.page) { background: #1F2A3C; color-scheme: dark; }
html[data-theme="dark"] body.page {
  --ink: #E7EEF8;
  --muted: #B8C4D6;
  --paper: #1F2A3C;
  --mist: #26334A;
  --sky: #2D3B52;
  --raised: #2B3850;
  --bubble: rgba(96, 165, 250, .28);
  --link: #93C5FD;
  --line: rgba(231, 238, 248, .16);
  --glass: rgba(31, 42, 60, .9);
  --hero-top: #283750;
  --blob-1: rgba(37, 99, 235, .35);
  --blob-2: rgba(96, 165, 250, .16);
  --blob-3: rgba(30, 64, 175, .30);
  --win: #18243A;
  --win-shadow: 0 40px 70px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(231, 238, 248, .10);
  --final: #162F7A;
}
/* Without JavaScript there is no toggle; follow the system theme. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) body.page {
    --ink: #E7EEF8;
    --muted: #B8C4D6;
    --paper: #1F2A3C;
    --mist: #26334A;
    --sky: #2D3B52;
    --raised: #2B3850;
    --bubble: rgba(96, 165, 250, .28);
    --link: #93C5FD;
    --line: rgba(231, 238, 248, .16);
    --glass: rgba(31, 42, 60, .9);
    --hero-top: #283750;
    --blob-1: rgba(37, 99, 235, .35);
    --blob-2: rgba(96, 165, 250, .16);
    --blob-3: rgba(30, 64, 175, .30);
    --win: #18243A;
    --win-shadow: 0 40px 70px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(231, 238, 248, .10);
    --final: #162F7A;
  }
}

.page a { color: var(--link); text-underline-offset: 3px; }
.page :focus-visible { outline: 3px solid #60A5FA; outline-offset: 3px; }
.page .skip { position: absolute; left: -9999px; }
.page .skip:focus { left: 16px; top: 12px; z-index: 50; background: #fff; color: #16233A; padding: 8px 12px; border-radius: 8px; }

/* Buttons: pill-shaped, like the bubbles */
.page .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; border: 0; border-radius: 999px; padding: 14px 26px; font: inherit; font-weight: 650; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s, transform .15s; }
.page .btn:active { transform: translateY(1px); }
.page .btn-primary, .page .btn-small { background: var(--blue); color: #fff; }
.page .btn-primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 24px -12px rgba(37, 99, 235, .9); }
.page .btn-primary:hover, .page .btn-small:hover { background: var(--deep); }
.page .btn-small { padding: 8px 16px; font-size: .92rem; }
.page .btn-light { background: #FCF9F3; color: #1E40AF; }
.page .btn-light:hover { background: #EEF3FA; }

/* Header */
body.page header.top { position: sticky; top: 0; z-index: 20; margin: 0; padding: 0; max-width: none; display: block; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.page .top-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.page .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; font-size: 1.05rem; text-decoration: none; }
.page .brand img { width: 32px; height: 32px; margin: 0; }
.page header.top nav { display: flex; gap: 22px; margin-left: auto; }
.page header.top nav a { color: var(--muted); text-decoration: none; font-size: .95rem; margin: 0; }
.page header.top nav a:hover { color: var(--ink); }
@media (max-width: 820px) { .page header.top nav { display: none; } .page .theme-toggle { margin-left: auto; } }

/* Light / dark toggle */
.page .theme-toggle { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.page .theme-toggle:hover { background: var(--mist); }
.page .theme-toggle svg { width: 18px; height: 18px; }
.page .theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .page .theme-toggle .i-sun { display: block; }
html[data-theme="dark"] .page .theme-toggle .i-moon { display: none; }

/* Reading pages */
body.page { background: linear-gradient(180deg, var(--hero-top) 0, var(--paper) 420px) no-repeat, var(--paper); }
body.page main { max-width: calc(44rem + 48px); width: auto; margin: 0 auto; padding: 56px 24px 96px; box-sizing: border-box; }
body.page main > * { max-width: 44rem; }
body.page main > figure, body.page main > pre, body.page main > div { max-width: 100%; }
body.page h1, body.page h2, body.page h3, body.page h4 { color: var(--ink); text-wrap: balance; }
body.page h1 { font-size: clamp(2rem, 1.3rem + 2vw, 2.8rem); line-height: 1.1; letter-spacing: -0.025em; font-weight: 780; margin: 0 0 14px; }
body.page h1 + p { color: var(--muted); }
body.page h2 { font-size: clamp(1.3rem, 1.1rem + .7vw, 1.6rem); line-height: 1.25; letter-spacing: -0.015em; font-weight: 720; margin: 2.2em 0 .6em; padding-top: 1.1em; border-top: 1px solid var(--line); }
body.page h3 { font-size: 1.12rem; line-height: 1.3; font-weight: 700; margin: 1.7em 0 .4em; }
body.page h4 { font-size: 1rem; margin: 1.4em 0 .3em; }
body.page p, body.page li { color: var(--ink); }
body.page p { margin: 0 0 1em; }
body.page ul, body.page ol { padding-left: 1.35em; margin: 0 0 1.1em; }
body.page li { margin: .35em 0; }
body.page li::marker { color: var(--muted); }
body.page strong { color: var(--ink); }
body.page hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
body.page blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 3px solid var(--blue); background: var(--mist); border-radius: 0 12px 12px 0; }
body.page code { padding: .1em .35em; border-radius: 5px; background: var(--mist); font-size: .92em; }
body.page pre { padding: 14px 16px; border-radius: 12px; background: var(--mist); overflow-x: auto; }
body.page pre code { padding: 0; background: none; }
body.page table { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.6em; font-size: .95rem; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
body.page th, body.page td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--ink); }
body.page thead th { background: var(--mist); font-weight: 650; }
body.page tbody tr:last-child > * { border-bottom: 0; }
body.page dl dt { font-weight: 700; margin-top: 1em; }
body.page dl dd { margin: .2em 0 0 0; color: var(--ink); }
body.page ::selection { background: rgba(37, 99, 235, .22); }
body.page > footer { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; box-sizing: border-box; border-top: 1px solid var(--line); color: var(--muted); }
body.page > footer a { color: var(--link); }
@media (max-width: 600px) {
  body.page main { padding: 36px 20px 72px; }
  body.page table { display: block; overflow-x: auto; }
}
.page .wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.page header.top nav a[aria-current="page"] { color: var(--ink); font-weight: 650; }
