/* ==========================================================================
   factables.potashev.com: the app's own look on top of the shared stylesheet.
   Cream page, near-black ink, pastel blocks with a black outline and a hard
   shadow, Plus Jakarta Sans: the same tokens as Multiply/Design/Theme.swift.
   Light only, like the app, so the dark tokens of styles.css are overridden too.
   ========================================================================== */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 500;
  font-display: swap;
  src: url('assets/app/fonts/PlusJakartaSans-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 700;
  font-display: swap;
  src: url('assets/app/fonts/PlusJakartaSans-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 800;
  font-display: swap;
  src: url('assets/app/fonts/PlusJakartaSans-ExtraBold.ttf') format('truetype');
}

:root,
:root[data-theme='dark'] {
  color-scheme: light;
  --paper: #F4F1EA;
  --paper-soft: #F4F1EA;
  --card: #FFFFFF;
  --card-soft: #FFFFFF;
  --ink: #1C1B19;
  --ink-2: #1C1B19;
  --body: #57534C;
  --muted: #57534C;
  --subtle: #6E6A63;
  --faint: #A8A297;
  --line: #E2DDD2;
  --line-2: #1C1B19;
  --accent: #5B4A9E;
  --accent-ink: #FFFFFF;
  --ring: 0 0 0 3px rgba(91, 74, 158, 0.35);

  --lavender: #D9CFF2;
  --sage: #D6DFC2;
  --butter: #F1E3A8;
  --rose: #EBCFD2;
  --sky: #CFE0EC;
  --peach: #F2D7BF;

  --sans: 'Plus Jakarta Sans', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: var(--sans);
  --wrap: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #F4F1EA;
    --paper-soft: #F4F1EA;
    --card: #FFFFFF;
    --card-soft: #FFFFFF;
    --ink: #1C1B19;
    --ink-2: #1C1B19;
    --body: #57534C;
    --muted: #57534C;
    --subtle: #6E6A63;
    --faint: #A8A297;
    --line: #E2DDD2;
    --line-2: #1C1B19;
    --accent: #5B4A9E;
    --accent-ink: #FFFFFF;
  }
}

body { background: var(--paper); color: var(--ink); font-weight: 500; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; }

/* ---------- Chrome ---------- */
.header { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 2px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; }
.brand::before {
  content: '';
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: var(--paper) url('assets/app/img/icon.png') center / cover;
}
.docnav { gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.docnav a { padding: 6px 13px; border: 1.5px solid var(--ink); border-radius: 999px; }
.docnav a:hover { color: var(--ink); background: var(--card); }
.docnav a[aria-current='page'] { background: var(--lavender); border-width: 2px; box-shadow: 0 3px 0 var(--ink); }
.footer { background: var(--paper); border-top: 2px solid var(--ink); }
.footer__inner { font-size: 13px; font-weight: 500; letter-spacing: 0; }
.eyebrow { font-weight: 800; font-size: 12px; letter-spacing: 0.1em; color: var(--subtle); }

/* ---------- Shared pieces ---------- */
.sticker {
  display: inline-block;
  padding: 0 0.32em;
  border: 2px solid var(--ink);
  border-radius: 0.3em;
  background: var(--tone, var(--lavender));
  box-shadow: 3px 4px 0 var(--ink);
  transform: rotate(-1.5deg);
  white-space: nowrap;
}
.pill {
  display: inline-block;
  padding: 4px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--tone, var(--card));
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.block {
  background: var(--tone, var(--card));
  border: 2px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 4px 0 var(--ink);
}

/* ---------- Text pages: support, privacy ---------- */
.doc h1 { font-weight: 800; }
.doc h2 { border-top: 2px solid var(--ink); }
.doc__summary { border: 2px solid var(--ink); border-radius: 22px; box-shadow: 0 4px 0 var(--ink); background: var(--butter); }
.doc__summary p { color: var(--ink); }
.doc a { text-decoration-color: var(--ink); }

/* ---------- Home ---------- */
.home { padding-block: 56px 96px; }
.home p { color: var(--body); margin: 0 0 14px; }
.home strong { color: var(--ink); font-weight: 700; }
.home a.link { text-decoration: underline; text-decoration-color: var(--ink); text-underline-offset: 3px; }

.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.hero__icon { width: 92px; height: 92px; border-radius: 22px; border: 2px solid var(--ink); box-shadow: 4px 6px 0 var(--ink); transform: rotate(-4deg); margin-bottom: 28px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 62px); line-height: 1.12; margin: 0 0 20px; }
.hero__lede { font-size: 19px; line-height: 1.55; max-width: 46ch; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero__shot { justify-self: center; }

.shot {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  border: 2px solid var(--ink);
  border-radius: 34px;
  box-shadow: 6px 9px 0 var(--ink);
  background: var(--paper);
}
.shot--wide { max-width: 100%; border-radius: 22px; }
.stage {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 36px 28px;
  background: var(--tone, var(--lavender));
  border: 2px solid var(--ink);
  border-radius: 34px;
  box-shadow: 0 5px 0 var(--ink);
  transform: rotate(-1.2deg);
}
.stage > * { transform: rotate(1.2deg); }
.stage--pair .shot { max-width: 210px; border-radius: 26px; }
.stage--pair .shot:first-child { margin-top: 0; margin-bottom: 34px; }
.stage--pair .shot:last-child { margin-top: 34px; }

.section-title { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.2; margin: 96px 0 12px; }
.section-lede { font-size: 18px; max-width: 60ch; margin-bottom: 8px !important; }

.feature { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; margin-top: 72px; }
.feature--flip .feature__media { order: 2; }
.feature__media { justify-self: center; width: 100%; max-width: 400px; }
.feature h3 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; margin: 14px 0 14px; }
.feature p { font-size: 17px; line-height: 1.6; max-width: 52ch; }
.feature ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.feature li { position: relative; padding-left: 34px; color: var(--body); font-size: 16px; line-height: 1.5; max-width: 52ch; }
.feature li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: var(--tone, var(--lavender));
  transform: rotate(-4deg);
}
.feature li::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  width: 9px;
  height: 5px;
  border-left: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: rotate(-49deg);
}

.wide { margin-top: 72px; padding: 32px; text-align: center; }
.wide h3 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 10px; }
.wide p { margin-inline: auto; max-width: 60ch; }
.wide .shot { margin: 22px auto 0; }

.calm { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.calm .block { padding: 22px; }
.calm h3 { font-size: 19px; margin: 0 0 8px; }
.calm p { font-size: 15.5px; margin: 0; }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 28px; align-items: start; }
.plan { padding: 26px; }
.plan h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 24px; margin: 0 0 6px; }
.plan ul { margin: 16px 0 0; padding-left: 1.2em; }
.plan li { color: var(--ink); margin: 7px 0; }
.plan li::marker { color: var(--ink); }
.plan__note { font-size: 14.5px; margin-top: 16px !important; }

.help { margin-top: 96px; padding: 30px; }
.help h2 { font-size: 26px; margin: 0 0 10px; }
.help p { color: var(--ink); max-width: 62ch; }
.help__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 4px 0 var(--ink);
  font-weight: 800;
  color: var(--ink);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
}
.button:hover { color: var(--ink); background: var(--lavender); }
.button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

@media (max-width: 860px) {
  .hero, .feature { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .feature { margin-top: 64px; }
  .feature--flip .feature__media { order: 0; }
  .calm, .plans { grid-template-columns: minmax(0, 1fr); }
  .home { padding-block: 36px 72px; }
  .section-title { margin-top: 72px; }
  .stage { padding: 28px 18px; }
  .stage--pair .shot { max-width: 160px; }
  .wide { padding: 22px 16px; }
}
@media (max-width: 520px) {
  .brand { font-size: 13px; letter-spacing: 0.08em; }
  .brand::before { display: none; }
  .docnav a { padding: 5px 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
