/* Layout: one calm column on the app's light grey, a night-navy band for the hero and the closing call,
   and the app's own cards (ink outline, hard bottom edge) for anything you can pick or tap. */
:root {
  --bg: #F1F1F1;
  --surface: #FFFFFF;
  --raised: #F4F2F0;
  --ink: #1B1A2E;
  --text2: #46445F;
  --text3: #56536E;
  --accent: #4F5BD5;
  --accent-soft: #ECEEFF;
  --accent-text: #343FA8;
  --edge: #1B1A2E;
  --hairline: rgba(0, 0, 0, 0.10);
  --night: #0A0E22;
  --night-2: #121A38;
  --night-ink: #F5F4FA;
  --night-text2: #ABA9BC;
  --night-accent: #8E9BFF;
  --night-accent-ink: #14141D;
  --font: "Geist", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.4rem, 6.2vw, 3.6rem);
  --shot-dim: 1;
  --radius: 18px;
  --wrap: 68rem;
  --read: 42rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0C13; --surface: #181824; --raised: #22222E; --ink: #F5F4FA; --text2: #BCBACB; --text3: #A3A2B5;
    --shot-dim: 0.86; --accent: #8E9BFF; --accent-soft: #1F2654; --accent-text: #B3BCFF; --edge: #6E6C80; --hairline: rgba(255, 255, 255, 0.14);
    --night: #0A0E22; --night-2: #121A38; --night-ink: #F5F4FA; --night-text2: #ABA9BC; --night-accent: #8E9BFF; --night-accent-ink: #14141D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0C13; --surface: #181824; --raised: #22222E; --ink: #F5F4FA; --text2: #BCBACB; --text3: #A3A2B5;
  --shot-dim: 0.86; --accent: #8E9BFF; --accent-soft: #1F2654; --accent-text: #B3BCFF; --edge: #6E6C80; --hairline: rgba(255, 255, 255, 0.14);
  --night: #0A0E22; --night-2: #121A38; --night-ink: #F5F4FA; --night-text2: #ABA9BC; --night-accent: #8E9BFF; --night-accent-ink: #14141D;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.lower { text-transform: lowercase; }
.keep { text-transform: none; }

/* header */
.site-head { background: var(--bg); border-bottom: 1px solid var(--hairline); }
.site-head .wrap { display: flex; align-items: center; gap: 10px 22px; padding-block: 12px; flex-wrap: wrap; }
.site-head .nav { margin-left: auto; }
.site-head .btn { color: var(--bg); }
@media (max-width: 640px) {
  .site-head .btn { margin-left: auto; }
  .site-head .nav { order: 3; flex-basis: 100%; margin-left: 0; justify-content: space-between; }
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: var(--step-1); letter-spacing: -0.02em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; font-size: var(--step--1); }
.nav a { color: var(--text2); text-decoration: none; padding-block: 6px; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 14px; font-weight: 700; font-size: var(--step-0);
  text-decoration: none; border: 2px solid var(--edge);
  background: var(--ink); color: var(--bg); box-shadow: 0 4px 0 var(--edge);
}
.btn:hover { transform: translateY(1px); box-shadow: 0 3px 0 var(--edge); }
.btn.small { padding: 8px 14px; font-size: var(--step--1); border-radius: 11px; box-shadow: 0 3px 0 var(--edge); }
.btn.on-night { background: var(--night-accent); color: var(--night-accent-ink); border-color: var(--night-accent-ink); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45); }
.badge-link { display: inline-block; line-height: 0; border-radius: 9px; }
.badge-link img { height: 52px; width: auto; }
@media (prefers-reduced-motion: no-preference) { .btn { transition: transform 0.12s ease, box-shadow 0.12s ease; } }

/* night band (hero and closing call) */
.night {
  color: var(--night-ink);
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,0.8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 31% 68%, rgba(255,255,255,0.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 47% 14%, rgba(255,255,255,0.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 63% 81%, rgba(255,255,255,0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 33%, rgba(255,255,255,0.75) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 91% 62%, rgba(255,255,255,0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 88%, rgba(255,255,255,0.5) 50%, transparent 51%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}
.night a { color: var(--night-ink); }
.hero { overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: center; padding-block: 56px 0; }
.hero h1 { font-size: var(--step-4); text-transform: lowercase; }
.hero .lede { margin-top: 18px; color: var(--night-text2); font-size: var(--step-1); max-width: 34rem; }
.hero .cta-row { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.hero .fine { margin-top: 14px; color: var(--night-text2); font-size: var(--step--1); }
.hero .phone { justify-self: center; align-self: end; }
.hero.plain .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 48px; }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 36px 0; gap: 28px; }
}

/* phone screenshots */
.phone { width: min(280px, 72vw); border-radius: 34px; border: 6px solid #05060F; background: #05060F; overflow: hidden; box-shadow: 0 18px 40px rgba(5, 6, 15, 0.35); }
.phone img { width: 100%; }
.phone img.light-shot { filter: brightness(var(--shot-dim)); }
.hero .phone { border-bottom: 0; border-radius: 34px 34px 0 0; max-height: 470px; }
.phone.small { width: min(230px, 64vw); border-radius: 28px; }

/* sections */
.section { padding-block: 56px; }
.section + .section { border-top: 1px solid var(--hairline); }
.section h2 { font-size: var(--step-3); text-transform: lowercase; max-width: 22ch; }
.section .intro { margin-top: 12px; color: var(--text2); max-width: var(--read); }
.eyebrow { font-size: var(--step--1); color: var(--text3); text-transform: lowercase; letter-spacing: 0.02em; margin-bottom: 10px; font-weight: 600; }

/* cards: the app's own outline + hard bottom edge */
.card { background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); box-shadow: 0 4px 0 var(--edge); padding: 18px 20px; }
.grid { display: grid; gap: 16px; margin-top: 28px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .grid.two { grid-template-columns: minmax(0, 1fr); } }
.card h3 { font-size: var(--step-1); text-transform: lowercase; }
.card p { margin-top: 6px; color: var(--text2); font-size: var(--step--1); }
a.card { color: var(--ink); text-decoration: none; display: block; }
a.card:hover { background: var(--accent-soft); }
a.card .more { margin-top: 10px; color: var(--accent-text); font-weight: 600; font-size: var(--step--1); }

.steps { counter-reset: step; list-style: none; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 28px; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: var(--step--1); margin-bottom: 10px; }

.group-label { margin-top: 30px; font-size: var(--step--1); color: var(--text3); text-transform: lowercase; font-weight: 600; }
.missions { list-style: none; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); margin-top: 12px; }
.missions li { background: var(--surface); border: 2px solid var(--edge); border-radius: 16px; box-shadow: 0 3px 0 var(--edge); padding: 14px 16px; }
.missions b { display: block; text-transform: lowercase; font-size: var(--step-0); }
.missions span { display: block; color: var(--text2); font-size: var(--step--1); text-transform: lowercase; margin-top: 2px; }
.missions a { color: inherit; text-decoration: none; }
.missions a:hover b { text-decoration: underline; }

/* compact mission summary: four groups, names only */
.mission-groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); margin-top: 28px; }
.mission-groups .card p { margin-top: 4px; }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pills li, .pills a { display: inline-block; background: var(--accent-soft); color: var(--accent-text); border-radius: 999px; padding: 6px 13px; font-size: var(--step--1); font-weight: 600; text-transform: lowercase; text-decoration: none; }
.pills li:has(a) { padding: 0; background: none; }
.pills a { text-decoration: underline; text-underline-offset: 3px; }
.pills a:hover { background: var(--surface); }
.after-grid { margin-top: 22px; color: var(--text2); max-width: var(--read); }
.after-grid a { font-weight: 600; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.split.flip { grid-template-columns: auto minmax(0, 1fr); }
.split.flip .phone { order: -1; }
.split .phone { justify-self: center; }
@media (max-width: 760px) { .split, .split.flip { grid-template-columns: minmax(0, 1fr); gap: 26px; } .split.flip .phone { order: 0; } }
.ticks { list-style: none; display: grid; gap: 12px; margin-top: 22px; max-width: var(--read); }
.ticks li { padding-left: 30px; position: relative; color: var(--text2); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 0.45em; width: 12px; height: 7px; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg); }
.ticks b { color: var(--ink); }

.shots { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.shots figure { margin: 0; display: grid; gap: 10px; justify-items: center; }
@media (max-width: 760px) {
  .shots { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .shots figure { flex: 0 0 auto; scroll-snap-align: center; }
  .shots .phone.small { width: 200px; }
}
.shots figcaption { font-size: var(--step--1); color: var(--text2); text-transform: lowercase; text-align: center; max-width: 230px; }

/* faq */
.faq { margin-top: 24px; display: grid; gap: 10px; max-width: var(--read); }
.faq details { background: var(--surface); border: 2px solid var(--edge); border-radius: 14px; padding: 0 16px; }
.faq summary { cursor: pointer; font-weight: 600; padding-block: 14px; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-text); font-weight: 700; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 16px; color: var(--text2); }

/* closing call */
.closing .wrap { padding-block: 56px; display: grid; gap: 18px; justify-items: start; }
.closing h2 { font-size: var(--step-3); text-transform: lowercase; max-width: 20ch; }
.closing p { color: var(--night-text2); max-width: 36rem; }

/* article / guide pages */
.article { padding-block: 40px 56px; }
.article .wrap { max-width: 46rem; }
.crumbs { font-size: var(--step--1); color: var(--text3); display: flex; gap: 8px; flex-wrap: wrap; text-transform: lowercase; }
.crumbs a { color: var(--text3); }
.article h1 { font-size: var(--step-4); text-transform: lowercase; margin-top: 14px; }
.byline { margin-top: 14px; color: var(--text3); font-size: var(--step--1); }
.answer { margin-top: 22px; font-size: var(--step-1); color: var(--ink); background: var(--accent-soft); border-radius: 16px; padding: 18px 20px; }
.article-figure { margin: 24px 0 0; }
.article-figure img { width: 100%; max-width: 26rem; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); border: 2px solid var(--edge); }
.toc { margin-top: 26px; background: var(--surface); border: 2px solid var(--edge); border-radius: 16px; padding: 16px 20px; }
.toc b { text-transform: lowercase; font-size: var(--step--1); color: var(--text3); }
.toc ol { margin-top: 8px; padding-left: 20px; display: grid; gap: 4px; font-size: var(--step--1); }
.prose { margin-top: 8px; display: grid; gap: 16px; }
.prose h2 { font-size: var(--step-2); text-transform: lowercase; margin-top: 26px; }
.prose h3 { font-size: var(--step-1); text-transform: lowercase; margin-top: 10px; }
.prose p, .prose li { color: var(--text2); }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 8px; }
.prose strong { color: var(--ink); }
.prose sup { line-height: 0; font-size: 0.75em; }
.inline-cta { margin-top: 10px; background: var(--surface); border: 2px solid var(--edge); border-radius: 16px; box-shadow: 0 4px 0 var(--edge); padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; }
.inline-cta p { color: var(--ink); font-weight: 600; max-width: 26rem; }
.sources { margin-top: 30px; font-size: var(--step--1); }
.sources a, .prose a { overflow-wrap: anywhere; }
.sources ol { padding-left: 20px; display: grid; gap: 8px; margin-top: 8px; color: var(--text2); }
.related { margin-top: 34px; }
.related h2 { font-size: var(--step-2); text-transform: lowercase; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
th { text-transform: lowercase; color: var(--text3); font-weight: 600; }

/* footer */
.site-foot { border-top: 1px solid var(--hairline); background: var(--bg); }
.site-foot .wrap { padding-block: 36px; display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); font-size: var(--step--1); }
.site-foot b { text-transform: lowercase; color: var(--text3); font-weight: 600; }
.site-foot ul { list-style: none; display: grid; gap: 7px; margin-top: 10px; }
.site-foot a { color: var(--text2); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; color: var(--ink); }
.legal { color: var(--text3); font-size: var(--step--1); padding-bottom: 28px; }
.contact-line { user-select: all; font-weight: 600; color: var(--ink); }

/* preview-only strip (not part of the live site) */
.preview-strip { background: var(--accent-soft); color: var(--accent-text); font-size: var(--step--1); }
.preview-strip .wrap { padding-block: 8px; display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; }
.preview-strip a { color: var(--accent-text); font-weight: 600; }
.preview-pages { background: var(--raised); border-top: 1px solid var(--hairline); }
.preview-pages .wrap { padding-block: 28px; }
.preview-pages h2 { font-size: var(--step-1); text-transform: lowercase; }
.preview-pages ul { list-style: none; display: grid; gap: 6px 18px; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 12px; font-size: var(--step--1); }

/* free tools (calculators) */
.tool { margin-top: 24px; display: grid; gap: 16px; }
.tool-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.tool-row label { font-weight: 600; }
.tool input, .tool select { font: inherit; font-weight: 700; color: var(--ink); background: var(--raised); border: 2px solid var(--edge); border-radius: 12px; padding: 9px 12px; min-width: 8.5rem; }
.tool-label { text-transform: lowercase; color: var(--text3); font-size: var(--step--1); font-weight: 600; margin-top: 4px; }
.tool-results { list-style: none; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.tool-results li { background: var(--raised); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.tool-results li.best { background: var(--accent-soft); }
.tool-results b { font-size: var(--step-2); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tool-results span { color: var(--text2); font-size: var(--step--1); }

/* planned-article placeholders (review preview only) */
.planned { margin-top: 44px; border-top: 2px dashed var(--edge); padding-top: 28px; }
.planned h2 { font-size: var(--step-2); text-transform: lowercase; }
.planned-note { margin-top: 8px; color: var(--accent-text); background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; font-size: var(--step--1); max-width: var(--read); }
.planned-group { margin-top: 26px; }
.planned-group h3 { font-size: var(--step-1); text-transform: lowercase; }
.planned-group p { color: var(--text2); font-size: var(--step--1); margin-top: 4px; max-width: var(--read); }
.planned-group ul { list-style: none; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-top: 12px; }
.planned-group li { border: 2px dashed var(--edge); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; align-content: start; }
.planned-group li b { font-size: var(--step-0); }
.planned-group li span { color: var(--text2); font-size: var(--step--1); }
.planned-group li em { font-style: normal; font-size: var(--step--1); font-weight: 600; color: var(--accent-text); }

/* tiktok in-app browser page */
.get-page { min-height: 70vh; display: grid; align-content: start; }
.get-page .wrap { padding-block: 40px; display: grid; gap: 22px; justify-items: center; text-align: center; }
.get-page h1 { font-size: var(--step-3); text-transform: lowercase; max-width: 16ch; }
.get-page p { color: var(--night-text2); max-width: 30rem; }
.open-tip { background: #EFE9DC; color: #14141D; border-radius: 16px; padding: 16px 18px; font-weight: 700; font-size: var(--step-1); max-width: 26rem; text-align: left; position: relative; }
.open-tip::before { content: ""; position: absolute; top: -12px; right: 26px; border: 12px solid transparent; border-top: 0; border-bottom-color: #EFE9DC; }
.open-tip em { font-style: normal; color: #3B46B8; }
