/* Yellow Slate SEO reporting. Follows the live study's order: heading, stats,
   testimonial, the problem, before, now, what changed. Every section reads
   with no scroll effects; page.js adds the grind and the turn on top.
   Loaded after the engine and the site stylesheet, so site tokens win. */

:root {
  --sc-canvas: var(--bg);
  --sc-ink: var(--text);
  --sc-accent: var(--accent);
  --sc-font-display: var(--h-font);
  --sc-font-text: var(--b-font);
  --sc-font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;

  /* Before: the site's near black. Now: the site's light ground. */
  --before-ink: #f2f2f2;
  --before-soft: var(--muted-2);            /* 7.3:1 on --dark */
  --before-line: var(--line-dark);
  /* The one hue at two lightnesses: #FD3A25 clears 5.5:1 on --dark but only
     3.4:1 on --bg, so small accent text on light ground uses the deeper stop. */
  --accent-on-dark: var(--accent);
  --accent-on-light: #c8200f;               /* 5.3:1 on --bg */

  --side-pad: clamp(24px, 5vw, 88px);
  --gap: clamp(56px, 8vh, 96px);
}

/* Owner's decision: an ordinary header at the top, not a bar that follows. */
.tf-header { position: absolute; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- layout -- */
.ys { background: var(--bg); color: var(--text); }
.wrap { max-width: 76rem; margin-inline: auto; padding-inline: var(--side-pad); }
.ys > .wrap + .wrap, .ys > .wrap + section, .ys > section + .wrap { margin-top: var(--gap); }
.prose > * { max-width: 46rem; }
.prose > * + * { margin-top: 18px; }
.prose p { font-size: 1.1rem; line-height: 1.7; color: var(--muted); }
.prose p strong { color: var(--text); }
.ys h2 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.8rem); letter-spacing: -.02em; }
.ys h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.8rem); letter-spacing: -.01em; }

/* ---------------------------------------------------------------- hero -- */
.ys-hero {
  position: relative; overflow: clip;
  padding-top: clamp(150px, 22vh, 220px); padding-bottom: 24px;
}
.hero-copy { position: relative; z-index: 2; }
.hero-copy > * + * { margin-top: 20px; }
.hero-line {
  font-family: var(--h-font); font-weight: 700;
  font-size: clamp(2.2rem, 1.2rem + 3.2vw, 4rem);
  line-height: 1.06; letter-spacing: -.03em;
  max-width: 16ch; margin: 0;
}
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.6; max-width: 38ch; color: var(--muted); }
.client { display: inline-block; border-radius: var(--inner-radius); transition: opacity .2s ease, transform .2s ease; }
.client:hover { opacity: .78; }
.client:active { transform: scale(.97); }
.client img { width: 132px; height: auto; }

/* Hero depth: the sheet grid lags most, the sealed report less, the copy
   moves with the page. */
.plane { position: absolute; margin: 0; pointer-events: none; }
.plane--grid {
  inset: -340px 0 0 0; z-index: 0;   /* covers the 300px the grid lags at rate 6 */
  --grid-line: color-mix(in oklab, var(--text) 6%, transparent);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 120px 32px;
  -webkit-mask-image: radial-gradient(80% 70% at 70% 60%, #000 30%, transparent 85%);
          mask-image: radial-gradient(80% 70% at 70% 60%, #000 30%, transparent 85%);
}
.plane--mid { z-index: 1; right: max(var(--side-pad), calc((100% - 76rem) / 2 + var(--side-pad))); bottom: 40px; width: 16rem; }

.sealed {
  display: flex; flex-direction: column; gap: 10px; padding: 18px 20px;
  background: var(--card-bg); border-radius: var(--card-radius); box-shadow: var(--card-shadow);
}
.sealed-title { font-size: 13px; font-weight: 600; color: var(--muted); }
.sealed-line { height: 6px; border-radius: 3px; background: var(--line); }
.sealed-line:nth-of-type(4) { width: 70%; }
.seal {
  position: absolute; right: -14px; bottom: -14px;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-on-light); color: #fff;
}

/* --------------------------------------------------------------- stats -- */
.ys > .stats { margin-top: 56px; }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.stat {
  display: flex; flex-direction: column; padding: 26px 26px 28px;
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--card-radius);
}
.stat-viz { height: 64px; margin-bottom: 22px; }

/* 6 hours: a clock face, the arc sweeps to 6 of 12 hours and the hand follows. */
.viz-clock { width: 64px; overflow: visible; }
.clock-face { fill: var(--bg); stroke: var(--line); stroke-width: 2; }
.clock-arc {
  fill: none; stroke: var(--accent-on-light); stroke-width: 8; stroke-linecap: butt;
  stroke-dasharray: 6 12; stroke-dashoffset: 0;
  transform: rotate(-90deg); transform-origin: 32px 32px;
}
.clock-hand { stroke: var(--text); stroke-width: 3; stroke-linecap: round; transform: rotate(180deg); transform-origin: 32px 32px; }
.clock-pin { fill: var(--text); }

/* $3,000 a year: one tick per week of the year. */
.viz-weeks { display: grid; grid-template-columns: repeat(26, 1fr); gap: 3px; align-content: center; }
.viz-weeks i { height: 26px; border-radius: 2px; background: var(--accent-on-light); }

/* 10 pages, up from 2: the 2 that were checked before, then the 8 that are now. */
.viz-pages { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; align-items: end; }
.viz-pages i { height: 40px; border-radius: 4px; background: var(--accent-on-light); }
.viz-pages i.was { background: var(--text); }

/* Entry: the cards rise in one after another, then each picture fills.
   Motion only; without it everything shows in its finished state. */
.ys-motion .stat { transition: opacity .7s var(--sc-ease-out, ease-out), transform .7s var(--sc-ease-out, ease-out); transition-delay: calc(var(--n) * 120ms); }
.ys-motion .stats:not(.is-in) .stat { opacity: 0; transform: translateY(28px); }
.ys-motion .clock-arc { transition: stroke-dasharray 1.4s var(--sc-ease-out, ease-out) .35s; }
.ys-motion .clock-hand { transition: transform 1.4s var(--sc-ease-out, ease-out) .35s; }
.ys-motion .stats:not(.is-in) .clock-arc { stroke-dasharray: 0 12; }
.ys-motion .stats:not(.is-in) .clock-hand { transform: rotate(0deg); }
.ys-motion .viz-weeks i { transition: transform .35s var(--sc-ease-out, ease-out), opacity .35s; transition-delay: calc(.5s + var(--i) * 22ms); transform-origin: bottom; }
.ys-motion .stats:not(.is-in) .viz-weeks i { transform: scaleY(.15); opacity: .2; }
.ys-motion .viz-pages i { transition: transform .45s var(--sc-ease-out, ease-out), opacity .45s; transition-delay: calc(.7s + var(--i) * 90ms); transform-origin: bottom; }
.ys-motion .stats:not(.is-in) .viz-pages i:not(.was) { transform: scaleY(.1); opacity: .15; }
.stat-n {
  margin: 0; font-family: var(--h-font); font-weight: 700; color: var(--text);
  font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat-l { margin: 8px 0 0; font-size: 1rem; color: var(--muted); }

/* --------------------------------------------------------- testimonial -- */
.quote { margin-block: 0; }
.quote p {
  margin: 0; font-family: var(--h-font); font-weight: 600; color: var(--text);
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 3rem); line-height: 1.2; letter-spacing: -.025em;
  max-width: 26ch; text-wrap: balance;
}
.quote footer { margin-top: 20px; color: var(--muted); }
.quote footer strong { color: var(--text); }

/* -------------------------------------------------------------- before --
   The site's dark ground. It runs from the Before heading, through the
   grind, to the top of the turn, where it lifts. */
.before {
  background: var(--dark); color: var(--before-ink);
  padding-top: var(--gap); padding-bottom: var(--gap);
}
.before h2, .before h3 { color: #fff; }
.before .prose p { color: var(--before-soft); }
.before .prose p strong { color: #fff; }
.before .cost { margin-top: var(--gap); }
.before .cost .cost-line { font-size: clamp(1.2rem, 1rem + .6vw, 1.45rem); line-height: 1.5; }

.grind { margin-top: 48px; }
.grind-stage { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.steps { margin: 20px 0 0; padding-left: 1.4em; color: var(--before-soft); font-size: 1.1rem; line-height: 1.5; }
.steps li + li { margin-top: 8px; }

.log-note { font-size: 14px; color: var(--before-soft); margin: 0 0 10px; }
.log {
  list-style: none; margin: 0; padding: 0;
  font-family: var(--sc-font-mono); font-size: 14px; line-height: 1.35;
  border-top: 1px solid var(--before-line);
}
.log li {
  display: grid; grid-template-columns: 1fr auto auto; gap: 16px;
  padding: 6px 0; border-bottom: 1px solid var(--before-line); color: #cfcfcf;
}
.log li span:last-child { color: var(--accent-on-dark); }

.counter { margin-top: 28px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.counter-n {
  font-family: var(--sc-font-mono); font-weight: 600; font-variant-numeric: tabular-nums;
  font-size: clamp(3rem, 2rem + 4vw, 5.5rem); line-height: 1; color: var(--accent-on-dark);
}
.counter-l { color: var(--before-soft); }

/* The pinned grind. Only with motion: page.js sets .ys-motion. */
.ys-motion .grind { margin-top: 0; }
.ys-motion .grind-stage {
  align-items: stretch; padding-block: clamp(56px, 10vh, 112px);
  background: var(--dark);
}
.ys-motion .grind-copy { display: flex; flex-direction: column; justify-content: center; }
/* The scene: the incognito window and the sheet share one cell, so each
   step can bring its own object forward. */
.browser { display: none; }
.ys-motion .scene { display: flex; flex-direction: column; min-height: 0; }
.ys-motion .scene-stack { flex: 1; min-height: 0; display: grid; }
.ys-motion .scene-stack > * { grid-area: 1 / 1; min-height: 0; }
.ys-motion .log-wrap { display: flex; flex-direction: column; min-height: 0; will-change: transform, opacity; }

.ys-motion .browser {
  display: flex; flex-direction: column; align-self: center; z-index: 2;
  height: min(100%, 26rem); overflow: hidden;
  background: #141414; border: 1px solid var(--before-line); border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
  will-change: transform, opacity;
}
.browser-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: #1c1c1c; border-bottom: 1px solid var(--before-line);
  font-size: 13px; color: var(--before-soft);
}
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a3a; }
.browser-bar span { margin-left: 8px; }
.browser-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.search {
  margin: 0; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 10px 18px;
  border-radius: 999px; background: #242424;
  font-family: var(--sc-font-mono); font-size: 15px; color: #fff;
}
.search-icon { flex: none; width: 14px; height: 14px; border: 2px solid var(--before-soft); border-radius: 50%; }
.caret { width: 2px; height: 1.1em; background: var(--accent-on-dark); animation: ys-blink 1s steps(1) infinite; }
@keyframes ys-blink { 50% { opacity: 0; } }
.results {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 82%, transparent);
          mask-image: linear-gradient(#000 82%, transparent);
}
.results-track { display: flex; flex-direction: column; gap: 10px; will-change: transform; }
.results-page {
  margin: 8px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--before-soft);
}
.hit { flex: none; height: 32px; border-radius: 8px; background: #1f1f1f; }
.hit--found {
  height: auto; display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px;
  font-size: 15px; color: #fff; border: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.hit--found b { font-weight: 600; color: var(--before-soft); }
.hit--found.is-found { background: #2a1512; border-color: var(--accent-on-dark); }
.hit--found.is-found b { color: #fff; }
.ys-motion .grind-stage .log li.is-writing span:nth-child(2)::after {
  content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px;
  background: var(--accent-on-dark); animation: ys-blink 1s steps(1) infinite;
}
.ys-motion .grind-stage .log {
  flex: 1; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-start;   /* fills from the top; page.js drops old rows off the top once full */
}
.ys-motion .grind-stage .log li { flex: none; }
.ys-motion .grind-stage .log li.is-empty { border-bottom-style: dashed; min-height: calc(1.35em + 13px); }
.ys-motion .grind-stage .log li.is-new { animation: ys-stamp 420ms var(--sc-ease-out, ease-out); }
@keyframes ys-stamp {
  from { background: color-mix(in oklab, var(--accent-on-dark) 28%, transparent); color: #fff; }
  to { background: transparent; }
}
/* One step at a time. All four share one cell; page.js gives each its own
   opacity, lift and blur, and sets --sp (0 to 1) for the progress bar. */
.ys-motion .steps { display: grid; list-style: none; padding-left: 0; margin-top: 28px; }
.ys-motion .steps li {
  grid-area: 1 / 1; margin: 0; color: #fff;
  font-family: var(--h-font); font-weight: 600; letter-spacing: -.01em;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem); line-height: 1.25;
  will-change: transform, opacity, filter;
}
.ys-motion .steps li::before {
  content: "Step " counter(list-item) " of 4"; display: block; margin-bottom: 10px;
  font-family: var(--b-font); font-size: 14px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-on-dark);
}
.ys-motion .steps::after {
  content: ""; grid-area: 2 / 1; margin-top: 24px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-on-dark) calc(var(--sp, 0) * 100%), var(--before-line) 0);
}

/* ----------------------------------------------------------------- now --
   The turn is the peak. With motion the stage starts on the Before ground,
   the pile folds, the ground lifts to light (--lit, 0 to 1), and the email
   card takes over. Without motion it is simply the resolved card. */
.now { padding-bottom: 0; }   /* the next section's margin is the gap; padding here doubled it */
.turn-stage {
  --lit: 1;
  background: color-mix(in oklab, var(--bg) calc(var(--lit) * 100%), var(--dark));
  display: flex; align-items: center;
  padding-block: var(--gap);
}
.turn-grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.turn-now > * + * { margin-top: 16px; }
.turn-now h2 { font-size: clamp(3rem, 2rem + 4vw, 5.5rem); line-height: 1; letter-spacing: -.04em; }
/* The live study's pull line holds the dark start of the turn. Motion only:
   without motion the ground is light from the start and this line is not needed. */
.turn-before { display: none; }
.ys-motion .turn-copy { display: grid; }
.ys-motion .turn-copy > * { grid-area: 1 / 1; align-self: center; }
.ys-motion .turn-before {
  display: block; margin: 0; max-width: 15ch; color: #fff;
  font-family: var(--h-font); font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.12;
}
.time { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-on-light); }
.turn-line { font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem); line-height: 1.5; color: var(--text); max-width: 24ch; }
.now > .prose { margin-top: 8px; }

.turn-objects { display: grid; }
.turn-objects > * { grid-area: 1 / 1; align-self: center; }
.email {
  background: var(--card-bg); border-radius: var(--card-radius);
  box-shadow: var(--card-shadow); padding: 26px 30px; max-width: 36rem;
}
.email-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.email-mark { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-on-light); box-shadow: inset 0 0 0 9px #fbe3df; }
.email-from { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--text); }
.email-time { margin: 0; font-size: 14px; color: var(--muted); }
.email-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 0 0; }
.email-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; }   /* numbers line up at the top when labels wrap */
.email-stats dt { font-size: 14px; color: var(--muted); }
.email-stats dd {
  margin: 0; font-family: var(--h-font); font-weight: 700; color: var(--text);
  font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.6rem); line-height: 1; letter-spacing: -.03em;
}
.email-stats div:last-child dd { color: var(--accent-on-light); }
.email-flags { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.email-flags-h { margin: 0 0 10px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; font-weight: 700; color: var(--text); }
.email-flags-h span { font-weight: 400; color: var(--muted); }
.email-flags ul { list-style: none; margin: 0; padding: 0; }
.email-flags li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
  font-family: var(--sc-font-mono); font-size: 14px; color: var(--text);
}
.flag { padding: 3px 10px; border-radius: 999px; font-family: var(--b-font); font-size: 13px; font-weight: 600; background: #fbe3df; color: #9e1a0c; }
.flag--fail { background: #ececec; color: #3d3d3d; }
.email-foot { margin: 18px 0 0; font-size: 14px; color: var(--muted); }

.pile { display: none; }
.ys-motion .turn-stage { height: 100svh; padding-block: 0; }
.ys-motion .pile {
  display: flex; flex-direction: column; overflow: hidden;
  max-width: 30rem; padding: 18px 22px;
  background: var(--dark-2); border: 1px solid var(--before-line); border-radius: var(--inner-radius);
  will-change: transform, height, opacity;
}
.ys-motion .pile-rows {
  display: flex; flex-direction: column; justify-content: flex-end;
  flex: 1; min-height: 0; overflow: hidden; border-top: 0;
}
.ys-motion .pile-rows li { flex: none; }
.folded { margin: 14px 0 0; flex: none; display: flex; align-items: baseline; gap: 12px; color: var(--before-soft); }
.folded .counter-n { font-size: clamp(2.4rem, 1.8rem + 2vw, 3.6rem); }
.ys-motion .turn-stage .email { opacity: 0; }

.receipt { margin: 36px 0 0; max-width: none; }
.receipt img { width: 100%; height: auto; border-radius: var(--inner-radius); }
.receipt figcaption { margin-top: 12px; font-size: 15px; color: var(--muted); }

/* --------------------------------------------------------------- close --
   The close holds: one settled screen, one button, then the footer. */
.close { display: flex; flex-direction: column; align-items: flex-start; padding-bottom: calc(var(--gap) * 1.5); }   /* holds with room below, not a tall empty band above */
.close > * + * { margin-top: 18px; }
.close p { font-size: 1.1rem; color: var(--muted); max-width: 46rem; }
.close .tf-btn { margin-top: 28px; }
.ys .tf-btn:active { transform: translateY(0) scale(.98); filter: brightness(1.05); }

/* --------------------------------------------------------------- tablet -- */
@media (max-width: 1000px) {
  .plane--mid { display: none; }
}

/* ---------------------------------------------------------------- phone -- */
@media (max-width: 760px) {
  /* Thumb-sized hit areas for the site header's two controls, without changing how they look. */
  .logo-site { display: inline-block; padding-block: 7px; }
  .menu-toggle { padding: 14px 10px; }
  .ys-hero { padding-top: 130px; }
  .hero-line { font-size: clamp(1.9rem, 1.2rem + 3vw, 2.5rem); max-width: 18ch; }
  .stats { grid-template-columns: 1fr; gap: 16px; }
  .grind-stage, .turn-grid { grid-template-columns: 1fr; }
  .log li { gap: 12px; }
  /* The pinned grind is one screen tall: steps and count on top, the log fills the rest. */
  .ys-motion .grind-stage { grid-template-rows: auto 1fr; gap: 20px; padding-block: 72px 92px; }   /* log ends above the site's back-to-top button */
  .ys-motion .steps { font-size: 1rem; }
  .ys-motion .counter { margin-top: 14px; }
  .ys-motion .counter-n { font-size: 3rem; }
  .ys-motion .turn-grid { gap: 20px; }
  /* The finished turn has to fit one phone screen. */
  .turn-now h2 { font-size: 2.6rem; }
  .turn-now > * + * { margin-top: 10px; }
  .turn-line { font-size: 1.1rem; max-width: none; }
  .email { padding: 18px 20px; }
  .email-head { padding-bottom: 12px; }
  .email-mark { width: 28px; height: 28px; box-shadow: inset 0 0 0 7px #fbe3df; }
  .email-stats { margin-top: 14px; }
  .email-flags { margin-top: 14px; padding-top: 12px; }
  .email-flags li { padding: 6px 0; }
  .email-foot { margin-top: 10px; }
}
@media (max-width: 760px) and (max-height: 720px) {
  .ys-motion .turn-before { font-size: 1.8rem; }
  .time, .email-foot { display: none; }   /* never the illustration note: it must stay with the sample rows */
  .email-time { display: none; }
}
