/*
 * problemsum.app
 *
 * Colours come from the app (ProblemSum/SwiftUI/PSPalette.swift, the app icon)
 * and the marketing artwork (marketing/README.md, "Colours"), so the site, the
 * store listing and the app read as one thing. System fonts only: the site
 * loads nothing from anyone else, which the privacy policy promises.
 */

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  --bg: #FFF8EB;
  --bg-alt: #FEF0D4;
  --surface: #FFFDF7;
  --surface-2: #FFF4DE;
  --ink: #2B1A08;
  --ink-2: #4A3416;
  --ink-3: #6E5130;
  --brand: #7A0F0F;
  --eyebrow: #8A5A12;
  --amber: #FECB65;
  --focus: #9A5B00;
  --line: rgba(122, 82, 30, .14);
  --line-2: rgba(122, 82, 30, .26);

  --btn: #2B1A08;
  --btn-ink: #FFF6E2;
  --btn-hover: #4A2E10;
  --ghost: rgba(255, 255, 255, .62);

  --ok: #10662A;
  --ok-bg: #DFF5E1;

  --glow: rgba(254, 203, 101, .55);
  --glow-2: rgba(255, 255, 255, .85);
  --deco-opacity: .6;

  --band: #2B1A08;
  --band-ink: #FBEFD9;
  --band-ink-2: #D9C4A0;
  --band-card: rgba(255, 240, 215, .06);
  --band-line: rgba(255, 240, 215, .13);

  /* Bar-model fills: SolutionView's .primary / .secondary / .tertiary. */
  --bar-green: #C7F2C7;
  --bar-blue: #CCCCFA;
  --bar-pink: #FFCCCC;
  --bar-grey: #E6E1DA;
  --bar-edge: rgba(60, 40, 10, .38);

  --shadow-sm: 0 1px 2px rgba(80, 50, 10, .06), 0 4px 12px -4px rgba(80, 50, 10, .10);
  --shadow: 0 1px 2px rgba(80, 50, 10, .05), 0 22px 44px -20px rgba(120, 80, 10, .38);
  --shadow-lg: 0 2px 6px rgba(80, 50, 10, .06), 0 44px 90px -34px rgba(120, 80, 10, .5);

  --radius: 20px;
  --radius-lg: 28px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #16100A;
    --bg-alt: #1D150D;
    --surface: #241A10;
    --surface-2: #2D2215;
    --ink: #FBF1DE;
    --ink-2: #E6D5B8;
    --ink-3: #BFA682;
    --brand: #FECB65;
    --eyebrow: #E9B75E;
    --focus: #FECB65;
    --line: rgba(255, 228, 184, .10);
    --line-2: rgba(255, 228, 184, .20);

    --btn: #FECB65;
    --btn-ink: #2B1A08;
    --btn-hover: #FFD98C;
    --ghost: rgba(255, 240, 215, .06);

    --ok: #86E29A;
    --ok-bg: rgba(52, 168, 83, .18);

    --glow: rgba(254, 203, 101, .13);
    --glow-2: rgba(255, 230, 181, .04);
    --deco-opacity: .1;

    --band: #0E0904;
    --band-card: rgba(255, 240, 215, .05);
    --band-line: rgba(255, 240, 215, .11);

    --bar-grey: #4A4036;
    --bar-edge: rgba(255, 240, 215, .28);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 22px 44px -20px rgba(0, 0, 0, .75);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 44px 90px -34px rgba(0, 0, 0, .85);
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

b, strong { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--amber); color: #2B1A08; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--btn);
  color: var(--btn-ink);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: 1px 7px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2.5px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .88em;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.narrow-only { display: none; }
@media (max-width: 480px) {
  .wide-only { display: none; }
  .narrow-only { display: inline; }
}

/* ---------- Buttons ---------- */

.btn {
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-sm { padding: 8px 16px; font-size: .9375rem; }
.btn-lg { padding: 15px 26px; font-size: 1.0625rem; }

.btn-primary { background: var(--btn); color: var(--btn-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--btn-hover); }

.btn-ghost { background: var(--ghost); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-3); }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-1px); }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 5px rgba(120, 80, 10, .28));
}

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.nav a:hover { background: var(--line); color: var(--ink); }
.header-inner > .btn { margin-left: 8px; }

@media (max-width: 800px) {
  .nav { display: none; }
  .header-inner > .btn { margin-left: auto; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(36px, 6vw, 88px) clamp(64px, 8vw, 112px);
  background:
    radial-gradient(64rem 38rem at 92% -12%, var(--glow), transparent 62%),
    radial-gradient(44rem 30rem at -8% 4%, var(--glow-2), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

/* The icon's two bars, bled off the top-right corner, as on the marketing art. */
.hero-deco {
  position: absolute;
  top: 36px;
  right: -220px;
  width: 760px;
  transform: rotate(-12deg);
  opacity: var(--deco-opacity);
  pointer-events: none;
}
.hero-deco span {
  display: block;
  height: 64px;
  border-radius: 32px;
  margin-bottom: 34px;
}
.hero-deco span:first-child {
  width: 620px;
  background: linear-gradient(90deg, var(--bar-green) 0 64%, var(--bar-pink) 64% 100%);
}
.hero-deco span:last-child { width: 760px; background: var(--bar-blue); }

/* On narrow screens the bars would run behind the headline; keep them to the
   top-right corner, above it. */
@media (max-width: 959px) {
  .hero-deco { top: -118px; right: -330px; }
}

.hero-grid {
  position: relative;
  display: grid;
  gap: clamp(48px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 11px;
  border-radius: 999px;
  background: var(--ghost);
  border: 1px solid var(--line-2);
  color: var(--eyebrow);
  font-size: .875rem;
  font-weight: 700;
}
.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .16);
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(2.6rem, 1.4rem + 4.6vw, 4.85rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -.042em;
}
.hero h1 span { display: block; }
.hero h1 .h1-a { color: var(--brand); }

.lead {
  margin-top: 24px;
  max-width: 34em;
  color: var(--ink-2);
  font-size: clamp(1.125rem, 1rem + .45vw, 1.3125rem);
  line-height: 1.55;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
@media (max-width: 480px) {
  .cta-row .btn { flex: 1 1 100%; }
}

.ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-3);
  font-size: .9375rem;
  font-weight: 600;
}
.ticks li { display: inline-flex; align-items: center; gap: 9px; }
.ticks li::before,
.tick::before {
  content: "";
  flex: none;
  width: 6px;
  height: 11px;
  margin: -3px 2px 0 3px;
  border: solid var(--ok);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.hero-visual {
  position: relative;
  justify-self: center;
}

/* ---------- Device frames ---------- */

/* An iPhone 16 Pro Max screen is 440pt wide with ~62pt corners, so the screen
   radius is 14% of its width and everything else scales from --w. */
.phone {
  --w: clamp(250px, 27vw, 330px);
  --pad: calc(var(--w) * .034);
  --screen-r: calc((var(--w) - 2 * var(--pad)) * .14);
  position: relative;
  width: var(--w);
  margin: 0;
  padding: var(--pad);
  border-radius: calc(var(--screen-r) + var(--pad));
  background: linear-gradient(150deg, #4A3F35 0%, #1A1511 45%, #0E0B08 100%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, .14);
}
.phone img {
  width: 100%;
  aspect-ratio: 660 / 1434;
  border-radius: var(--screen-r);
  background: #FEEBC4;
}

.float-chip {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 700;
  white-space: nowrap;
}
.float-chip.chip-a { top: 25.5%; left: -46%; }
.float-chip.chip-b { bottom: 16%; right: -42%; }
.chip-ok {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1A8C33;
}
.chip-ok::before {
  content: "";
  width: 5px;
  height: 10px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg);
}
.chip-bar { display: flex; height: 16px; border: 1.2px solid var(--bar-edge); border-radius: 4px; overflow: hidden; }
.chip-bar i { width: 13px; border-right: 1px solid var(--bar-edge); }
.chip-bar i:last-child { border-right: 0; }
.chip-bar .g { background: var(--bar-green); }
.chip-bar .b { background: var(--bar-blue); }

@media (max-width: 1180px) {
  .float-chip { display: none; }
}

/* ---------- At-a-glance strip ---------- */

.glance {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.glance ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 176px), 1fr));
  gap: 14px 24px;
  margin: 0 auto;
  padding-block: 22px;
  list-style: none;
}
.glance li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink-2);
  font-size: .9375rem;
  font-weight: 700;
}
.glance svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--eyebrow);
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(72px, 10vw, 128px); }
.section-alt { background: var(--bg-alt); }

.eyebrow {
  color: var(--eyebrow);
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section h2,
.cta-final h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 1.3rem + 2.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.032em;
}

.section-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-lead {
  margin-top: 18px;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.section-head-row .section-head { margin-bottom: 0; }

/* ---------- Not a question bank ---------- */

.split {
  display: grid;
  gap: clamp(44px, 6vw, 80px);
  align-items: center;
}
@media (min-width: 980px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.split-copy > p { margin-top: 18px; color: var(--ink-2); font-size: 1.125rem; }
.split-copy h2 + p { margin-top: 22px; }

.steps {
  display: grid;
  gap: 12px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 16px 18px 16px 64px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 15px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--amber);
  color: #2B1A08;
  font-weight: 800;
}
.steps b { display: block; color: var(--ink); }

/* ---------- Worked-solution demo ---------- */

/* The card is the app's paper, so it stays light in dark mode too. */
.demo {
  --p-ink: #2B1A08;
  --p-ink-2: #4A3416;
  --p-edge: rgba(60, 40, 10, .38);
  padding: clamp(20px, 3.4vw, 32px);
  border: 1px solid rgba(204, 153, 102, .35);
  border-radius: 24px;
  background: #FFFDF6;
  box-shadow: var(--shadow-lg);
  color: var(--p-ink);
}

.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
}
.demo-label {
  white-space: nowrap;
  color: #8A5A12;
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.demo-next {
  font: inherit;
  flex: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1.5px solid rgba(204, 153, 102, .6);
  border-radius: 999px;
  background: #FFF4DE;
  color: #2B1A08;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s ease;
}
.demo-next:hover { background: #FEEBC4; }
.demo-next:focus-visible { outline-color: #9A5B00; }
.demo-next svg { width: 15px; height: 15px; }
.demo-next.is-spinning svg { animation: spin .5s ease; }

@keyframes spin { to { transform: rotate(360deg); } }

.demo-q {
  margin-top: 14px;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  line-height: 1.5;
}
.demo-q b { color: #7A0F0F; }

.model {
  --n: 4;
  display: grid;
  grid-template-columns: auto repeat(var(--n), minmax(0, 1fr));
  row-gap: 5px;
  align-items: center;
  margin-top: 22px;
}
.model-cap {
  grid-row: 1;
  color: var(--p-ink-2);
  font-size: .875rem;
  font-weight: 700;
  text-align: center;
  overflow-wrap: anywhere;
}
.model-cap-a { grid-column: 2 / 3; }
.model-cap-b { grid-column: 3 / -1; }
.model-label {
  grid-row: 2;
  grid-column: 1;
  padding-right: 12px;
  color: var(--p-ink-2);
  font-size: .9375rem;
  font-weight: 750;
  text-align: right;
}
.model-bar {
  grid-row: 2;
  grid-column: 2 / -1;
  display: flex;
  height: 36px;
  border: 1.5px solid var(--p-edge);
  border-radius: 7px;
  overflow: hidden;
}
.model-bar i { flex: 1; border-right: 1px solid rgba(60, 40, 10, .35); }
.model-bar i:last-child { border-right: 0; }
.model-bar .g { background: #C7F2C7; }
.model-bar .b { background: #CCCCFA; }
.model-staple {
  grid-row: 3;
  grid-column: 2 / -1;
  height: 9px;
  margin-top: 1px;
  border: 1.5px solid rgba(60, 40, 10, .45);
  border-top: 0;
}
.model-total {
  grid-row: 4;
  grid-column: 2 / -1;
  color: var(--p-ink-2);
  font-size: .9375rem;
  font-weight: 750;
  text-align: center;
}

.demo-work {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1.5px dashed rgba(204, 153, 102, .6);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}
.demo-ans {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 13px;
  border-radius: 9px;
  background: #DFF5E1;
  color: #10662A;
  font-weight: 800;
}
.demo-check { margin-top: 12px; color: var(--p-ink-2); font-size: 1rem; }
.demo-check b { color: var(--p-ink); }

.demo-body.is-new { animation: pop .35s ease; }
@keyframes pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.demo-caption {
  margin-top: 18px;
  color: var(--ink-3);
  font-size: .9375rem;
  text-align: center;
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 1100px) {
  .features { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.feature {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.feature h3 {
  margin-top: 20px;
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -.012em;
  line-height: 1.3;
}
.feature p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: .96875rem;
  line-height: 1.55;
}

.art {
  display: grid;
  place-items: center;
  height: 120px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}

.mini-model { display: grid; gap: 9px; width: 100%; max-width: 200px; }
.mini-bar { display: flex; height: 20px; border: 1.3px solid var(--bar-edge); border-radius: 5px; overflow: hidden; }
.mini-bar i { flex: 1; border-right: 1px solid var(--bar-edge); }
.mini-bar i:last-child { border-right: 0; }
.mini-bar .g { background: var(--bar-green); }
.mini-bar .b { background: var(--bar-blue); }
.mini-bar .p { background: var(--bar-pink); }
.mini-bar .x { background: var(--bar-grey); }
.mini-bar.short { width: 62.5%; }
.mini-staple { width: 37.5%; height: 7px; margin-top: -4px; border: 1.3px solid var(--bar-edge); border-top: 0; }

.eq {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.125rem;
  font-weight: 600;
}
.frac { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.frac > span:first-child { padding: 0 3px 1px; border-bottom: 1.6px solid currentColor; }
.frac > span:last-child { padding-top: 1px; }

.tags { display: grid; gap: 8px; justify-items: start; width: 100%; max-width: 210px; }
.tag {
  padding: 4px 11px;
  border-radius: 8px;
  font-size: .8125rem;
  font-weight: 750;
}
.tag-way { background: var(--bar-blue); color: #2B1A08; }
.tag-watch { background: var(--amber); color: #2B1A08; }
.tag-line { height: 7px; border-radius: 4px; background: var(--line-2); width: 100%; }
.tag-line.s { width: 70%; }

.check-line { display: grid; gap: 5px; justify-items: center; font-size: .9375rem; font-weight: 600; line-height: 1.4; }
.check-line b { color: var(--ink); }
.check-line span { white-space: nowrap; }
.check-line .ok {
  margin-top: 3px;
  padding: 2px 10px;
  border-radius: 7px;
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: 800;
}

.accepts { display: grid; gap: 6px; }
.accepts div { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .8125rem; font-weight: 700; }
.accepts span {
  padding: 2px 9px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--surface);
}
.accepts em { color: var(--ink-3); font-style: normal; font-weight: 600; }

.recents { display: grid; gap: 7px; width: 100%; max-width: 210px; }
.recents div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.recents div:nth-child(2) { background: var(--bg-alt); }
.recents i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.recents i.g { background: #1A8C33; }
.recents s { height: 6px; border-radius: 3px; background: var(--line-2); flex: 1; text-decoration: none; }
.recents s.m { flex: .6; }

.profiles { display: flex; gap: 18px; }
.ring {
  --v: 80;
  --c: #1A8C33;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--line-2) 0);
}
.ring::before {
  content: attr(data-initial);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  font-weight: 800;
  font-size: .9375rem;
}
.ring.r2 { --v: 64; --c: #E8890C; }

.offline { display: grid; gap: 8px; justify-items: center; font-size: .9375rem; font-weight: 700; }
.offline svg { width: 38px; height: 38px; color: var(--eyebrow); }

/* ---------- Screenshot gallery ---------- */

.gallery-nav { display: flex; gap: 10px; flex: none; }
.round-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background-color .15s ease, opacity .15s ease;
}
.round-btn:hover:not(:disabled) { background: var(--surface-2); }
.round-btn:disabled { opacity: .35; cursor: default; }
.round-btn svg { width: 20px; height: 20px; }

@media (max-width: 640px) {
  .gallery-nav { display: none; }
}

.gallery {
  --inset: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  margin-top: clamp(32px, 4vw, 48px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--inset);
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery:focus-visible { outline-offset: -3px; }

.gallery-track {
  display: flex;
  gap: clamp(16px, 2.4vw, 28px);
  width: max-content;
  margin: 0;
  padding: 10px var(--inset) 28px;
  list-style: none;
}

.shot {
  --w: clamp(232px, 64vw, 272px);
  --pad: 8px;
  --screen-r: calc((var(--w) - 2 * var(--pad)) * .14);
  width: var(--w);
  flex: none;
  scroll-snap-align: start;
}
.shot figure { margin: 0; }
.shot-frame {
  padding: var(--pad);
  border-radius: calc(var(--screen-r) + var(--pad));
  background: linear-gradient(150deg, #4A3F35 0%, #1A1511 45%, #0E0B08 100%);
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, .12);
}
.shot-frame img {
  width: 100%;
  aspect-ratio: 660 / 1434;
  border-radius: var(--screen-r);
  background: #FEEBC4;
}
.shot figcaption { margin-top: 18px; padding-inline: 4px; }
.shot figcaption b { display: block; font-size: 1.0625rem; font-weight: 750; letter-spacing: -.01em; }
.shot figcaption span {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: .9375rem;
  line-height: 1.5;
}

/* ---------- Devices ---------- */

.devices {
  position: relative;
  max-width: 1040px;
  margin-inline: auto;
  padding: 0 4% 7% 0;
  container-type: inline-size;
}
.mac {
  margin: 0;
  overflow: hidden;
  border-radius: 1.2cqi;
  background: #FEEBC4;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
}
.mac img { width: 100%; aspect-ratio: 1600 / 1000; }

.ipad {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 27%;
  margin: 0;
  padding: 1.1cqi;
  border-radius: 3.1cqi;
  background: linear-gradient(150deg, #4A3F35 0%, #1A1511 45%, #0E0B08 100%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, .12);
}
.ipad img { width: 100%; aspect-ratio: 2064 / 2752; border-radius: 2cqi; background: #FEEBC4; }

@media (max-width: 720px) {
  .devices { padding: 0; }
  .ipad { display: none; }
}

.requires {
  margin-top: 40px;
  color: var(--ink-3);
  font-size: .9375rem;
  text-align: center;
}

/* ---------- Topics ---------- */

.topics { display: grid; gap: 20px; }
@media (min-width: 920px) {
  .topics { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}

.card {
  padding: clamp(24px, 3.6vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -.015em;
}
.card > p { margin-top: 12px; color: var(--ink-2); }

.badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
}
.badge-yes { background: var(--ok-bg); }
.badge-yes::before {
  content: "";
  width: 6px;
  height: 12px;
  margin-top: -3px;
  border: solid var(--ok);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.badge-no {
  background:
    linear-gradient(45deg, transparent calc(50% - 1.25px), var(--ink-3) calc(50% - 1.25px), var(--ink-3) calc(50% + 1.25px), transparent calc(50% + 1.25px)) center / 12px 12px no-repeat,
    linear-gradient(-45deg, transparent calc(50% - 1.25px), var(--ink-3) calc(50% - 1.25px), var(--ink-3) calc(50% + 1.25px), transparent calc(50% + 1.25px)) center / 12px 12px no-repeat,
    var(--surface-2);
  border: 1px solid var(--line-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: .9375rem;
  font-weight: 650;
}

.nots {
  display: grid;
  gap: 16px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.nots li {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: .96875rem;
}
.nots b { display: block; color: var(--ink); }

.note { margin-top: 20px; color: var(--ink-3); font-size: .9375rem; }

/* ---------- Privacy band ---------- */

.band {
  position: relative;
  overflow: clip;
  background: var(--band);
  color: var(--band-ink);
}
.band::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% auto;
  width: 60rem;
  height: 36rem;
  background: radial-gradient(closest-side, rgba(254, 203, 101, .16), transparent);
  pointer-events: none;
}
.band .eyebrow { color: var(--amber); }
.band-grid { position: relative; display: grid; gap: 44px; align-items: center; }
@media (min-width: 920px) {
  .band-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 72px; }
}
.band-copy > p { margin-top: 20px; color: var(--band-ink-2); font-size: 1.125rem; }
.band :focus-visible { outline-color: var(--amber); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 26px;
  color: var(--amber);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(254, 203, 101, .45);
  padding-bottom: 2px;
}
.text-link:hover { border-bottom-color: var(--amber); }
.text-link svg { width: 18px; height: 18px; }

.promises { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.promises li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--band-line);
  border-radius: 16px;
  background: var(--band-card);
  color: var(--band-ink-2);
}
.promises b { display: block; color: var(--band-ink); }
.promises .tick {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: rgba(134, 226, 154, .16);
  --ok: #86E29A;
}
.promises .tick::before { margin: -3px 0 0; }

/* ---------- FAQ ---------- */

.faq-grid { display: grid; gap: 28px; }
@media (min-width: 980px) {
  .faq-grid { grid-template-columns: minmax(0, .75fr) minmax(0, 1.4fr); gap: 72px; align-items: start; }
  .faq-grid .section-head { position: sticky; top: calc(var(--header-h) + 32px); }
}

.faq details { border-bottom: 1px solid var(--line-2); }
.faq details:first-child { border-top: 1px solid var(--line-2); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 12px no-repeat,
    var(--surface);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--brand); }
.faq .answer { max-width: 44em; padding-bottom: 22px; color: var(--ink-2); }
.faq .answer p + p { margin-top: 10px; }
.faq .answer a { color: var(--brand); text-underline-offset: 3px; }

/* ---------- Support ---------- */

.support {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}
.support.card { padding: clamp(32px, 5vw, 56px); box-shadow: var(--shadow); }
.support > p { margin-top: 16px; color: var(--ink-2); font-size: 1.0625rem; }
.support .btn { margin-top: 28px; }
.support .note a { color: inherit; text-underline-offset: 3px; }

/* ---------- Final call to action ---------- */

.cta-final {
  padding-block: clamp(80px, 11vw, 136px);
  background:
    radial-gradient(54rem 26rem at 50% 115%, var(--glow), transparent 70%),
    var(--bg);
  text-align: center;
}
.cta-final .wrap { display: flex; flex-direction: column; align-items: center; }
.cta-final img {
  width: 92px;
  height: 92px;
  filter: drop-shadow(0 14px 26px rgba(120, 80, 10, .32));
}
.cta-final h2 { max-width: 16em; margin-top: 28px; }
.cta-final .btn { margin-top: 32px; }
.cta-final .ticks { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 48px 36px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  font-size: .9375rem;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 48px;
}
.footer-top p { max-width: 26em; margin-top: 12px; color: var(--ink-3); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; padding-top: 6px; }
.footer-nav a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-small {
  display: grid;
  gap: 6px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: .8125rem;
}
.footer-small:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- Privacy policy and other text pages ---------- */

.doc-head {
  padding-block: clamp(48px, 8vw, 96px) clamp(28px, 4vw, 44px);
  background:
    radial-gradient(50rem 26rem at 90% -20%, var(--glow), transparent 62%),
    linear-gradient(180deg, var(--bg-alt), var(--bg));
}
.doc-head .wrap, .prose { max-width: calc(780px + 2 * var(--gutter)); }
.doc-head h1 {
  margin-top: 12px;
  font-size: clamp(2.4rem, 1.5rem + 3.4vw, 3.75rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.035em;
}
.doc-meta { margin-top: 14px; color: var(--ink-3); font-weight: 600; }

.summary {
  margin-top: 30px;
  padding: 22px 24px;
  border: 1px solid var(--line-2);
  border-left: 5px solid var(--amber);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  font-size: 1.0625rem;
}
.summary b { color: var(--ink); }

.prose { padding-bottom: clamp(72px, 10vw, 120px); }
.prose h2 {
  margin-top: 52px;
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.prose h3 { margin-top: 28px; font-size: 1.1875rem; font-weight: 750; }
.prose p, .prose ul, .prose ol { margin-top: 14px; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 7px; }
.prose li::marker { color: var(--eyebrow); }
.prose a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose strong { color: var(--ink); }

.toc {
  margin-top: 36px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}
.toc p { color: var(--ink); font-weight: 750; }
.toc ol { columns: 2 14em; column-gap: 32px; margin: 10px 0 0; }
.toc li { break-inside: avoid; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- 404 ---------- */

.lost {
  display: grid;
  place-items: center;
  min-height: calc(100svh - var(--header-h) - 106px);
  padding-block: clamp(64px, 10vw, 120px);
  text-align: center;
}
.lost h1 {
  margin-top: 36px;
  font-size: clamp(2.2rem, 1.5rem + 3vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.lost p { max-width: 30em; margin: 16px auto 0; color: var(--ink-2); font-size: 1.125rem; }
.lost .btn { margin-top: 30px; }
.lost-model { display: inline-grid; gap: 6px; font-weight: 700; color: var(--ink-2); }
.lost-model .mini-bar { width: min(280px, 70vw); height: 38px; border-radius: 8px; }
.lost-model .mini-bar .q {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(-45deg, transparent 0 6px, var(--line-2) 6px 8px);
  font-style: normal;
  font-weight: 800;
  color: var(--brand);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
