/* MathMatrix website — one shared stylesheet.
   No external requests: system fonts only, no scripts, no trackers.
   Palette: night sky (the app icon), aurora teal/violet, gold highlights,
   app teal for buttons, warm white paper, ink for body text. */

:root {
  --night-0: #0b0d24;
  --night-1: #171a45;
  --night-2: #2a2766;
  --aurora-teal: #6fe0cf;
  --aurora-violet: #9c7be6;
  --gold: #ffcb5c;
  --teal: #397d78;        /* buttons (white text = 4.8:1) */
  --teal-ink: #2a6a65;    /* links and icons on light (5.8:1 on paper) */
  --violet: #8058ce;      /* focus ring on light (4.6:1) */
  --paper: #faf6ef;
  --paper-2: #f2ece0;
  --ink: #24323a;
  --ink-soft: #4f5d66;    /* secondary text (6.3:1 on paper) */
  --card: #ffffff;
  --line: rgba(36, 50, 58, 0.12);
  --on-night: #faf6ef;
  --on-night-soft: rgba(250, 246, 239, 0.84);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--teal-ink);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--night-2);
}

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

.sky :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--gold);
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  background: var(--gold);
  color: var(--night-0);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ---------- Header (night-sky band) ---------- */

.site-header {
  background:
    radial-gradient(40% 160% at 12% 0%, rgba(111, 224, 207, 0.22), transparent 70%),
    radial-gradient(40% 160% at 92% 0%, rgba(156, 123, 230, 0.28), transparent 70%),
    linear-gradient(90deg, var(--night-0), var(--night-1) 55%, var(--night-2));
  color: var(--on-night);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--on-night);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--on-night);
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 22%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid rgba(250, 246, 239, 0.4);
  border-radius: 999px;
  color: var(--on-night);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(250, 246, 239, 0.07);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lang-switch:hover {
  color: var(--on-night);
  background: rgba(250, 246, 239, 0.16);
  border-color: rgba(250, 246, 239, 0.7);
}

/* ---------- Landing: sky, hero, screenshots ---------- */

.landing .site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  background: transparent;
}

.sky {
  position: relative;
  overflow: hidden;
  padding-top: 68px;
  color: var(--on-night);
  background:
    radial-gradient(60% 38% at 14% 6%, rgba(111, 224, 207, 0.30), transparent 70%),
    radial-gradient(55% 40% at 88% 14%, rgba(156, 123, 230, 0.36), transparent 70%),
    radial-gradient(70% 30% at 50% 100%, rgba(156, 123, 230, 0.22), transparent 70%),
    linear-gradient(180deg, var(--night-0) 0%, var(--night-1) 52%, var(--night-2) 100%);
  border-bottom-left-radius: 44px;
  border-bottom-right-radius: 44px;
}

/* A sprinkle of stars, drawn with gradients (no images). */
.sky::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 8% 22%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 17% 48%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.8px 1.8px at 29% 12%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 41% 36%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.6px 1.6px at 56% 9%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 66% 40%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.8px 1.8px at 78% 16%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 90% 33%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.4px 1.4px at 95% 8%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 4% 62%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.4px 1.4px at 48% 58%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.2px 1.2px at 84% 66%, rgba(255, 255, 255, 0.6), transparent);
}

.sky > * {
  position: relative;
}

.hero {
  text-align: center;
  padding-top: 28px;
  padding-bottom: 32px;
}

.hero-icon {
  display: block;
  width: 116px;
  height: 116px;
  margin: 0 auto 22px;
  border-radius: 22%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 18px 44px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(156, 123, 230, 0.35);
}

.hero h1 {
  margin: 0 auto 16px;
  max-width: 17ch;
  font-size: clamp(2.2rem, 7.4vw, 3.8rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hl {
  color: var(--gold);
}

.hero .lead {
  margin: 0 auto 26px;
  max-width: 38rem;
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--on-night-soft);
}

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 11px 22px;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  background: rgba(255, 203, 92, 0.14);
  color: var(--gold);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.3;
}

.store-pill::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(255, 203, 92, 0.9);
}

.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  padding: 14px 16px 44px;
  max-width: 1120px;
  margin: 0 auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(250, 246, 239, 0.4) transparent;
}

.shots img {
  flex: 0 0 auto;
  width: min(250px, 66vw);
  height: auto;
  aspect-ratio: 598 / 1300;
  border-radius: 30px;
  scroll-snap-align: center;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 20px 40px rgba(0, 0, 0, 0.4);
}

@media (min-width: 1100px) {
  .shots {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    overflow: visible;
    scroll-snap-type: none;
    padding-left: 24px;
    padding-right: 24px;
  }

  .shots img {
    width: 100%;
  }
}

/* ---------- Landing: feature cards ---------- */

.features {
  padding-top: 56px;
  padding-bottom: 64px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 22px 26px;
  box-shadow: 0 1px 2px rgba(36, 50, 58, 0.04), 0 10px 28px rgba(36, 50, 58, 0.06);
}

.card .icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: rgba(57, 125, 120, 0.12);
  color: var(--teal-ink);
}

.card .icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--night-1);
}

.card p {
  margin: 0;
  color: var(--ink-soft);
}

.platform {
  margin: 32px 0 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* ---------- Inner pages: readable column ---------- */

.doc {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 16px 72px;
}

.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 1.2rem + 3vw, 2.75rem);
  line-height: 1.15;
  font-weight: 800;
  color: var(--night-1);
  hyphens: auto;
}

.doc h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 5px;
  margin-top: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--aurora-teal), var(--aurora-violet));
}

.doc .updated {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.doc .intro {
  margin: 22px 0 0;
  font-size: 1.15rem;
  line-height: 1.7;
}

.doc h2 {
  margin: 2.1em 0 0.4em;
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--night-1);
}

.doc p {
  margin: 0.8em 0 0;
}

.doc ul {
  margin: 0.8em 0 0;
  padding-left: 1.2em;
}

.doc li {
  margin: 0.4em 0;
  padding-left: 0.2em;
}

.doc li::marker {
  color: var(--teal);
}

/* Support page */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(57, 125, 120, 0.3);
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--teal-ink);
  color: #fff;
}

.cta {
  margin: 26px 0 0;
}

.faq {
  margin-top: 14px;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin: 10px 0 0;
  box-shadow: 0 1px 2px rgba(36, 50, 58, 0.04);
}

.faq summary {
  position: relative;
  display: block;
  min-height: 52px;
  padding: 14px 52px 14px 20px;
  font-weight: 700;
  color: var(--night-1);
  cursor: pointer;
  list-style: none;
  border-radius: 18px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2.5px solid var(--teal-ink);
  border-bottom: 2.5px solid var(--teal-ink);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.faq details[open] summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}

.faq details[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.faq .answer {
  padding: 0 20px 18px;
  color: var(--ink);
}

.faq .answer p {
  margin: 0;
}

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

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 28px 0 32px;
  text-align: center;
  color: var(--on-night-soft);
  background:
    radial-gradient(50% 120% at 50% 0%, rgba(156, 123, 230, 0.2), transparent 70%),
    linear-gradient(180deg, var(--night-1), var(--night-0));
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.site-footer li {
  display: flex;
  align-items: center;
}

.site-footer li + li::before {
  content: "\00b7";
  content: "\00b7" / "";
  color: var(--on-night-soft);
  font-weight: 800;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--on-night);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-footer p {
  margin: 0;
  font-size: 0.92rem;
}

/* Keep Support · Privacy · Terms on one line on phones. */
@media (max-width: 420px) {
  .site-footer a {
    padding: 0 9px;
    font-size: 0.95rem;
  }
}

@media (max-width: 330px) {
  .site-footer li + li::before {
    display: none;
  }
}

/* ---------- Header navigation (guides; the footer repeats it on phones) ---------- */

.main-nav {
  display: none;
}

@media (min-width: 760px) {
  .main-nav {
    display: flex;
    gap: 4px;
    margin: 0 12px 0 auto;
  }

  .main-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--on-night);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
  }

  .main-nav a:hover,
  .main-nav a[aria-current="page"] {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }
}

/* ---------- Landing: trust chips, steps, guide cards ---------- */

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  max-width: 40rem;
  margin: 0 auto 22px;
  padding: 0;
  list-style: none;
}

.trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(250, 246, 239, 0.28);
  border-radius: 999px;
  background: rgba(250, 246, 239, 0.09);
  color: var(--on-night);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.trust li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.section-title {
  margin: 0 0 10px;
  text-align: center;
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.1rem);
  line-height: 1.2;
  color: var(--night-1);
  text-wrap: balance;
}

.section-lead {
  max-width: 40rem;
  margin: 0 auto 28px;
  text-align: center;
  color: var(--ink-soft);
}

.how,
.guides {
  padding-top: 0;
  padding-bottom: 56px;
}

.guides {
  padding-bottom: 72px;
}

.steps {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 4px 8px 0;
  text-align: center;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
}

.steps h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--night-1);
}

.steps p {
  margin: 0;
  color: var(--ink-soft);
}

.link-card {
  position: relative;
}

.link-card h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--night-1);
}

.link-card h3 a {
  color: inherit;
  text-decoration: none;
}

/* The whole card is the click target. */
.link-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
}

.link-card h3 a:focus-visible {
  outline: none;
}

.link-card:focus-within {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.link-card:hover {
  border-color: rgba(57, 125, 120, 0.55);
}

.link-card:hover h3 a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.link-card .more {
  margin-top: 12px;
  color: var(--teal-ink);
  font-weight: 800;
}

/* ---------- Inner pages: guides, callouts, call-to-action ---------- */

.doc.wide {
  max-width: 960px;
}

.doc h3 {
  margin: 1.6em 0 0.2em;
  font-size: 1.12rem;
  line-height: 1.3;
  color: var(--night-1);
}

.doc ol {
  margin: 0.8em 0 0;
  padding-left: 1.4em;
}

.doc ol li {
  margin: 0.5em 0;
  padding-left: 0.2em;
}

.doc ol li::marker {
  color: var(--teal-ink);
  font-weight: 800;
}

.toc {
  margin: 26px 0 0;
  padding: 16px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.toc .toc-title {
  margin: 0;
  font-weight: 800;
  color: var(--night-1);
}

.toc ol {
  margin: 0.3em 0 0;
}

.doc .toc li {
  margin: 0;
}

.toc a {
  display: inline-block;
  padding: 5px 0;
}

.doc section[id] {
  scroll-margin-top: 16px;
}

.callout {
  margin: 1em 0 0;
  padding: 6px 22px 10px;
  border-left: 5px solid var(--teal);
  border-radius: 0 16px 16px 0;
  background: var(--paper-2);
}

.callout ul {
  margin: 0.4em 0 0;
}

.figs {
  display: flex;
  gap: 16px;
  margin: 1.8em -16px 0;
  padding: 6px 16px 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  scrollbar-width: thin;
}

.figs figure {
  flex: 0 0 min(200px, 58vw);
  margin: 0;
  scroll-snap-align: center;
}

@media (min-width: 640px) {
  .figs {
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
    overflow: visible;
    scroll-snap-type: none;
  }
}

.figs img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 0 0 1px var(--line), 0 12px 28px rgba(36, 50, 58, 0.16);
}

.figs figcaption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.4;
  text-align: center;
}

.doc section[id] .faq {
  margin-top: 10px;
}

.doc .cta-card {
  margin: 2.8em 0 0;
  padding: 28px 22px 26px;
  border-radius: 26px;
  color: var(--on-night);
  text-align: center;
  background:
    radial-gradient(60% 90% at 15% 0%, rgba(111, 224, 207, 0.2), transparent 70%),
    radial-gradient(60% 90% at 90% 0%, rgba(156, 123, 230, 0.3), transparent 70%),
    linear-gradient(180deg, var(--night-1), var(--night-0));
}

.doc .cta-card h2 {
  margin: 0 0 8px;
  color: var(--on-night);
  font-size: 1.4rem;
  text-wrap: balance;
}

.doc .cta-card p {
  margin: 0 auto 16px;
  max-width: 34rem;
  color: var(--on-night-soft);
}

.doc .cta-card .store-pill {
  margin: 4px 0 0;
  color: var(--gold);
}

.doc .cta-card .cta-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 8px;
  max-width: none;
  margin: 12px 0 0;
}

.cta-card a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--gold);
  font-weight: 700;
}

.cta-card a:hover {
  color: #fff;
}

.cta-card :focus-visible {
  outline-color: var(--gold);
}

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

/* ---------- Printables (screen view; the print rules are at the end) ---------- */

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.nb {
  white-space: nowrap;
}

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.jump a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1.5px solid var(--teal-ink);
  border-radius: 12px;
  background: var(--card);
  font-weight: 800;
  text-decoration: none;
}

.jump a:hover {
  background: var(--paper-2);
}

.sheets {
  margin-top: 1.4em;
}

.sheet {
  margin: 28px 0 0;
  padding: 22px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(36, 50, 58, 0.04), 0 10px 28px rgba(36, 50, 58, 0.06);
  scroll-margin-top: 16px;
}

.doc .sheet h2 {
  margin: 0 0 6px;
}

.sheet .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.blank-line {
  display: inline-block;
  min-width: 9em;
  border-bottom: 1.5px solid currentColor;
}

.blank-line.short {
  min-width: 6em;
}

.chart-wrap {
  margin: 14px 0 0;
}

.chart {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--card);
  color: var(--ink);
  font-size: clamp(0.62rem, 2.9vw, 1.08rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
}

.chart caption {
  padding: 0 0 8px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-align: left;
}

.chart th,
.chart td {
  padding: 0.5em 0;
  border: 1px solid #74838b;
}

.chart thead th,
.chart tbody th,
.chart .corner {
  background: #dfeeeb;
  color: var(--night-1);
  font-weight: 800;
}

.chart td.sq {
  background: #fff1cc;
  font-weight: 700;
}

.chart.blank td {
  height: 2.3em;
}

.sheet .sheet-note {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.sheet .credit {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.doc .facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 36px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 560px) {
  .doc .facts {
    grid-template-columns: 1fr 1fr;
  }
}

.doc .facts li {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  margin: 0;
  padding: 10px 0;
  color: var(--night-1);
  font-size: 1.45rem;
  font-weight: 700;
}

.facts .q {
  min-width: 4.6em;
  white-space: nowrap;
}

.facts .ans {
  flex: 1;
  min-width: 2.5em;
  height: 1.3em;
  border-bottom: 2px solid var(--ink-soft);
}

.sheet .hearts-label {
  margin: 14px 0 0;
  color: var(--ink-soft);
}

.sheet .hearts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
}

.heart {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--teal-ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
  .wrap {
    padding-left: 24px;
    padding-right: 24px;
  }

  .doc {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero-icon {
    width: 132px;
    height: 132px;
  }

  .sky {
    padding-top: 76px;
  }

  .hero {
    padding-top: 36px;
    padding-bottom: 40px;
  }

  .shots {
    padding-left: 24px;
    padding-right: 24px;
    scroll-padding-inline: 24px;
  }

  .features {
    padding-top: 72px;
  }
}

/* ---------- Print and motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Printables: every .sheet is one A4 page (page 1 chart, 2 blank grid, 3-12 the tables 1-10).
   The header, footer, instructions and call-to-action stay out of the printout.
   The sizes are in mm so the content fits A4 and, as a fallback, US Letter. */
@page sheet {
  size: A4 portrait;
  margin: 12mm;
}

@media print {
  .site-header,
  .site-footer .lang-switch,
  .skip {
    display: none;
  }

  body {
    font-size: 11pt;
  }

  .printable .site-header,
  .printable .site-footer,
  .printable .skip,
  .printable .no-print {
    display: none !important;
  }

  body.printable {
    display: block;
    min-height: 0;
    background: #fff;
    color: #000;
    font-size: 12pt;
    line-height: 1.4;
  }

  .printable main.doc {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .printable .sheets {
    margin: 0;
  }

  .printable .sheet {
    page: sheet;
    break-after: page;
    break-inside: avoid;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .printable .sheets .sheet:last-child {
    break-after: auto;
  }

  .printable .doc .sheet h2,
  .printable .sheet h2 {
    margin: 0 0 4mm;
    color: #000;
    font-size: 24pt;
    line-height: 1.15;
  }

  .printable .sheet .meta {
    margin: 0 0 6mm;
    color: #000;
    font-size: 13pt;
  }

  .printable .blank-line {
    min-width: 62mm;
    border-bottom: 1pt solid #000;
  }

  .printable .blank-line.short {
    min-width: 36mm;
  }

  .printable .chart-wrap {
    margin: 2mm 0 0;
  }

  .printable .chart {
    color: #000;
    font-size: 16pt;
  }

  .printable .chart caption {
    color: #000;
    font-size: 11pt;
  }

  .printable .chart th,
  .printable .chart td {
    height: 16mm;
    padding: 0;
    border: 0.8pt solid #000;
  }

  .printable .chart thead th,
  .printable .chart tbody th,
  .printable .chart .corner {
    background: #e2e2e2;
    color: #000;
  }

  .printable .chart td.sq {
    background: #f0f0f0;
  }

  .printable .sheet .sheet-note,
  .printable .sheet .hearts-label {
    margin: 6mm 0 0;
    color: #000;
    font-size: 11pt;
  }

  .printable .sheet .credit {
    margin: 8mm 0 0;
    color: #333;
    font-size: 9pt;
  }

  .printable .doc .facts {
    grid-template-columns: 1fr 1fr;
    gap: 0 14mm;
    margin: 4mm 0 0;
  }

  .printable .doc .facts li {
    padding: 8mm 0 2mm;
    color: #000;
    font-size: 26pt;
  }

  .printable .facts .ans {
    min-width: 30mm;
    height: 1.25em;
    border-bottom: 1.2pt solid #000;
  }

  .printable .sheet .hearts {
    gap: 3mm;
    margin: 3mm 0 0;
  }

  .printable .heart {
    width: 10mm;
    height: 10mm;
    stroke: #000;
    stroke-width: 1.4;
  }
}

/* Printables: PDF downloads, the number bosses and the logo footer on every sheet (session 0054). */
.pdf-downloads {
  margin: 22px 0 6px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 1px 0 var(--line), 0 10px 24px rgba(36, 50, 58, 0.06);
}

.pdf-downloads h2 {
  margin-top: 0;
}

.pdf-list {
  margin: 12px 0 0;
}

.pdf-note,
.sheet-pdf {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.sheet-pdf a {
  font-weight: 700;
}

.chart .boss-row td {
  padding: 0 1px 2px;
  border: 0;
  background: none;
  vertical-align: bottom;
}

.chart .boss-row img {
  display: block;
  width: 100%;
  max-width: 48px;
  height: auto;
  margin: 0 auto;
}

.sheet-boss {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 6px;
}

.sheet-boss img {
  flex: none;
  width: clamp(96px, 26vw, 150px);
  height: auto;
}

.boss-bubble {
  position: relative;
  margin: 0;
  padding: 14px 18px;
  border: 2px solid #e8b04b;
  border-radius: 18px;
  background: #fff7e3;
  color: var(--ink);
  font-size: clamp(1rem, 3.6vw, 1.2rem);
  font-weight: 800;
  line-height: 1.3;
}

.boss-bubble span {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
}

.sheet .credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sheet .credit img {
  width: 26px;
  height: auto;
}

.credit-name {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
}

.credit-tag {
  flex-basis: 100%;
  text-align: center;
  font-weight: 600;
}

@media print {
  .printable .sheet-pdf {
    display: none !important;
  }

  .printable .sheet-boss {
    gap: 5mm;
    margin: 4mm 0 0;
  }

  .printable .sheet-boss img {
    width: 30mm;
  }

  .printable .boss-bubble {
    padding: 3mm 5mm;
    border-width: 1pt;
    font-size: 14pt;
  }

  .printable .boss-bubble span {
    font-size: 9pt;
  }

  .printable .chart .boss-row td {
    height: auto;
    border: 0;
    background: none;
  }

  .printable .chart .boss-row img {
    max-width: 13mm;
  }

  .printable .sheet .credit {
    padding-top: 3mm;
    border-top: 0.5pt solid #999;
  }

  .printable .sheet .credit img {
    width: 7mm;
  }
}

/* Research page: the numbered source list. */
.doc .refs {
  padding-left: 1.6em;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.doc .refs li {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
