:root {
  --bg: #f6efe5;
  --card: rgba(255, 250, 242, 0.82);
  --card-strong: #fffaf2;
  --ink: #1d1712;
  --muted: #625345;
  --line: rgba(57, 41, 26, 0.1);
  --rust: #a24c2f;
  --rust-dark: #7f3d26;
  --shadow: 0 22px 50px rgba(72, 45, 19, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(162, 76, 47, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(13, 49, 78, 0.08), transparent 24%),
    linear-gradient(180deg, #faf4ea 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(250, 244, 234, 0.9);
  border-bottom: 1px solid var(--line);
}

.site-header__inner,
.site-footer__inner,
.hero__actions,
.pill-row,
.panel__actions,
.metric-list li,
.steps li {
  display: flex;
  gap: 0.75rem;
}

.site-header__inner {
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.brand__dot {
  color: var(--rust);
  margin: 0 0.2rem;
}

.site-nav {
  display: flex;
  gap: 1.4rem;
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rust), #c36a43);
  color: #fff9f4;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 16px 28px rgba(162, 76, 47, 0.2);
}

.button--ghost {
  background: rgba(255,255,255,0.58);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero,
.section {
  padding: 3.25rem 0;
}

.hero {
  padding-top: 3rem;
}

.hero__grid,
.two-up {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 1.5rem;
}

.hero__copy,
.hero__panel,
.card,
.panel,
.prose-card {
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero__copy {
  padding: 2.4rem;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 20%),
    linear-gradient(155deg, #1f1611 0%, #35231a 42%, #57382a 100%);
  color: #fbf1e7;
  position: relative;
  overflow: hidden;
}

.hero__copy::after {
  content: "";
  position: absolute;
  inset: auto -6% -14% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 199, 183, 0.26), transparent 68%);
  pointer-events: none;
}

.hero__copy h1 {
  margin: 0.6rem 0 1rem;
  font-family: "Fraunces", serif;
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.94;
  max-width: 11ch;
}

.hero__copy .lede {
  max-width: 58ch;
  color: rgba(251, 241, 231, 0.85);
  line-height: 1.8;
  font-size: 1rem;
}

.hero__panel,
.card,
.panel,
.prose-card {
  background: var(--card);
  backdrop-filter: blur(10px);
}

.hero__panel {
  padding: 2rem;
}

/* Trust strip — concrete credibility cues directly under the hero */
.trust-strip {
  margin-top: 1.5rem;
}

.trust-strip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
}

.trust-strip li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

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

.hero__panel h2,
.card h2,
.panel h2,
.prose-card h1,
.process-copy h2 {
  margin: 0.4rem 0 0.8rem;
  font-family: "Fraunces", serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.02;
}

.hero__panel p,
.card p,
.panel p,
.prose,
.process-copy p,
.step-card p {
  color: var(--muted);
  line-height: 1.8;
}

.eyebrow {
  margin: 0;
  color: #f0c7b7;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow--dark,
.eyebrow--rust {
  color: var(--rust);
}

.pill-row {
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.pill-row span {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(251,241,231,0.8);
  font-size: 0.78rem;
}

.metric-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.metric-list li {
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}

.metric-list strong {
  font-family: "Fraunces", serif;
  font-size: 1.05rem;
}

.metric-list span {
  color: var(--muted);
  line-height: 1.65;
}

.card,
.panel,
.prose-card {
  padding: 2rem;
}

.section--story {
  padding-top: 0.5rem;
}

.story-grid,
.explainer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 1.5rem;
}

.bullet-list {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
}

.bullet-list li + li {
  margin-top: 0.75rem;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.steps li {
  flex-direction: column;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.steps li:first-child {
  border-top: none;
  padding-top: 0;
}

.steps strong {
  font-family: "Fraunces", serif;
  font-size: 1.02rem;
}

.steps span {
  color: var(--muted);
  line-height: 1.7;
}

.process-shell {
  padding: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.95) 0%, rgba(248, 240, 230, 0.9) 100%);
}

.process-copy {
  max-width: 720px;
  margin-bottom: 1.3rem;
}

.process-copy h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.96;
}

.process-copy p {
  margin: 0;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.step-card {
  padding: 1.5rem;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.92);
}

.step-card__num {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--rust);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.step-card h3 {
  margin: 0 0 0.6rem;
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  line-height: 1.04;
}

.step-card p {
  margin: 0;
  line-height: 1.75;
}

.panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(38, 28, 22, 0.98), rgba(84, 55, 41, 0.96));
  color: #fbf1e7;
}

.panel__copy {
  max-width: 720px;
}

.panel__copy p,
.panel__copy h2 {
  color: inherit;
}

.panel__copy p:last-child {
  margin-bottom: 0;
  color: rgba(251, 241, 231, 0.84);
}

.panel .button--ghost {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  color: #fbf1e7;
}

.site-footer {
  padding: 0 0 2rem;
}

.site-footer__inner {
  justify-content: space-between;
  align-items: center;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,250,242,0.78);
  box-shadow: var(--shadow);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.checker-shell {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.checker-frame-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
  background: var(--card-strong);
}

.checker-frame {
  display: block;
  width: 100%;
  height: min(900px, calc(100vh - 200px));
  min-height: 560px;
  border: 0;
  background: #fff;
}

/* Back-to-site affordance — only shown in mobile app mode (see media query) */
.checker-escape {
  display: none;
}

.prose-card .prose > *:first-child {
  margin-top: 0;
}

@media (max-width: 980px) {
  .hero__grid,
  .two-up,
  .story-grid,
  .explainer-grid,
  .process-grid,
  .panel,
  .site-footer__inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header__inner {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.9rem 0;
  }
}

@media (max-width: 700px) {
  .shell,
  .checker-shell {
    width: min(100%, calc(100% - 1rem));
  }

  .hero__copy,
  .hero__panel,
  .card,
  .panel,
  .prose-card,
  .checker-frame-wrap,
  .site-footer__inner,
  .process-shell,
  .step-card {
    border-radius: 24px;
  }

  .hero__copy {
    padding: 1.6rem;
  }

  .hero__copy h1 {
    font-size: clamp(2.2rem, 11vw, 3.6rem);
    max-width: none;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    font-size: 0.95rem;
  }

  .checker-frame {
    height: min(820px, calc(100vh - 180px));
    min-height: 520px;
  }
}

/* ── Checker app mode: fullscreen, edge-to-edge tool on phones ── */
@media (max-width: 760px) {
  .jts-checker-page .site-header,
  .jts-checker-page .site-footer {
    display: none;
  }

  .jts-checker-page .checker-shell {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  /* Drop the editorial intro card — the user is here to use the tool */
  .jts-checker-page .checker-intro {
    display: none;
  }

  /* Strip the framed-card chrome so the app sits flush to the screen edges */
  .jts-checker-page .checker-frame-wrap {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
  }

  .jts-checker-page .checker-frame {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
  }

  /* Floating return-to-site chip, kept clear of the app's top save banner */
  .jts-checker-page .checker-escape {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    position: fixed;
    left: 0.6rem;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 0.6rem);
    z-index: 60;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(20, 15, 12, 0.66);
    color: #fff9f4;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.66rem;
    letter-spacing: 0.05em;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  }
}
