:root:not([data-font=serif]) .page-home h1,
:root:not([data-font=serif]) .page-home .home-scope h2,
:root:not([data-font=serif]) .page-home .home-next h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}

.home-wrap {
  width: min(100%, 87rem);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3.5rem);
}

@media (min-width: 67rem) {
  .page-home .site-header .site-header-inner {
    max-width: 87rem;
    padding: .8rem 3.5rem;
    flex-wrap: nowrap;
  }

  .page-home .site-header .home-brand { width: clamp(20rem, 32vw, 29rem); }
  .page-home .site-header .site-nav { width: auto; border: 0; margin-inline-start: auto; padding: 0; }
  .page-home .site-header .display-trigger { order: 1; margin-inline-start: .7rem; }
}

.page-home .site-header { border-color: var(--welcome-line); }

body.page-home main > .home-welcome {
  --hero-ink: #f5fbf7;
  --hero-muted: #c4d8cc;
  --hero-accent: #c6f4d9;
  --hero-on-accent: #173a2b;
  --hero-focus: #9ff4f0;
  --hero-border: #668675;
  --stage-bg: #234637;
  --stage-panel: #203e32;
  --stage-code: #163024;
  --stage-issue: #ffce94;
  --stage-issue-bg: #493526;
  --stage-fixed: #c6f4d9;
  --stage-fixed-bg: #1e4037;
  position: relative;
  overflow: clip;
  padding-block: clamp(2rem, 5vw, 5.4rem);
  border: 0;
  background:
    radial-gradient(ellipse at 94% 54%, var(--welcome-tint), transparent 68%),
    radial-gradient(ellipse at 30% 100%, var(--welcome-glow), transparent 75%),
    var(--bg);
}

:root[data-theme=contrast] body.page-home main > .home-welcome {
  --hero-ink: #fff;
  --hero-muted: #fff;
  --hero-accent: #fff177;
  --hero-on-accent: #000;
  --hero-focus: #74edff;
  --hero-border: #fff;
  --stage-bg: #000;
  --stage-panel: #000;
  --stage-code: #101010;
  --stage-issue: #fff;
  --stage-issue-bg: #000;
  --stage-fixed: #fff177;
  --stage-fixed-bg: #000;
}

.welcome-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4.5vw, 4.65rem);
  align-items: center;
}

.welcome-copy { position: relative; z-index: 1; }

.welcome-copy h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3.4rem, 6.1vw, 6.4rem);
  letter-spacing: -.035em;
  line-height: .94;
  text-wrap: pretty;
}

.welcome-copy h1 span, .welcome-copy h1 em { display: block; }
.welcome-copy h1 em { color: var(--welcome-accent); font-style: normal; }

.welcome-lead {
  max-width: 42ch;
  margin: 1.3rem 0 1.5rem;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.6;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.15rem;
}

.home-actions .btn {
  border-radius: .65rem;
  padding: .85rem 1.2rem;
}

.welcome-example,
.welcome-help,
.home-hero .demo-footer a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.75rem;
  font-weight: 650;
  font-size: .9375rem;
}

.home-signup-note {
  color: var(--muted);
  margin: .65rem 0 0;
  font-size: .875rem;
}

.welcome-help { font-size: .875rem; min-height: 2.75rem; }

.welcome-stage { position: relative; isolation: isolate; min-width: 0; }

.welcome-depth {
  position: absolute;
  pointer-events: none;
  z-index: -1;
  inset: -3.2rem -2.5rem -2.25rem -2.5rem;
}

.welcome-depth .atropos-inner { overflow: visible; }

.welcome-orbit,
.welcome-light,
.welcome-rim { display: block; position: absolute; }

.welcome-orbit {
  inset: -.4rem 0 -.5rem 15%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 48% 40%, var(--welcome-tint), transparent 67%);
  border: 1px solid var(--welcome-line);
}

.welcome-light {
  inset: 6% 12% 12% 2%;
  background: linear-gradient(135deg, var(--welcome-light), transparent 65%);
  filter: blur(1.15rem);
  border-radius: 45%;
}

.welcome-rim {
  inset: 8% 3% -2% 10%;
  border: 1px solid var(--welcome-line);
  border-radius: 1.6rem;
  rotate: -7deg;
  background: linear-gradient(130deg, var(--welcome-tint), transparent 86%);
}

.finding-demo :focus-visible, .finding-demo:focus-visible { outline-color: var(--hero-focus); }

.finding-demo {
  position: relative;
  min-width: 0;
  border: 1px solid var(--hero-border);
  border-radius: 1.2rem;
  color: var(--hero-ink);
  background: var(--stage-bg);
  box-shadow: 0 1.7rem 3.7rem #1d3b3138, .65rem .75rem 0 -1px #e2f2e55c, .65rem .75rem 0 #315d4a57;
  scroll-margin-top: 1rem;
}

.demo-header,
.demo-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .3rem 1rem;
  padding: .8rem 1rem;
}

.demo-header { border-bottom: 1px solid var(--hero-border); border-radius: 1.15rem 1.15rem 0 0; }
.demo-header h2 { color: var(--hero-ink); font-size: 1.05rem; margin: 0; letter-spacing: 0; }
.demo-footer { color: var(--hero-muted); font-size: .78rem; }
.home-hero .demo-footer a { color: var(--hero-accent); font-size: .825rem; }

.tour-console {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--hero-border);
  background: var(--stage-panel);
}

.tour-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 1 1 auto;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tour-track li { min-width: 0; }
.tour-track button, .tour-play, .tour-next {
  min-height: 2.9rem;
  min-width: 0;
  border: 1px solid var(--hero-border);
  padding: .42rem .7rem;
  border-radius: .4rem;
  background: transparent;
  color: var(--hero-ink);
  font-size: .875rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.tour-track button { width: 100%; text-align: start; }
.tour-track button[aria-current=step] {
  background: var(--stage-fixed-bg);
  border-color: var(--hero-accent);
  color: var(--hero-accent);
  box-shadow: inset 0 -.2rem var(--hero-accent);
}
.tour-play { color: var(--hero-accent); border-radius: 99rem; }
.tour-play:hover, .tour-track button:hover { background: var(--stage-fixed-bg); }

.tour-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .45rem 1rem;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--hero-border);
}

.tour-caption p { color: var(--hero-muted); font-size: .92rem; margin: 0; }
.tour-next { background: var(--hero-accent); color: var(--hero-on-accent); border-color: var(--hero-accent); }
.tour-next[aria-disabled=true] { cursor: progress; }

.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  padding: .6rem .7rem;
  border-bottom: 1px solid var(--hero-border);
}

.demo-tabs button {
  min-height: 2.75rem;
  min-width: 0;
  padding: .35rem .65rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  background: transparent;
  color: var(--hero-muted);
  font-size: .83rem;
  font-weight: 650;
  overflow-wrap: anywhere;
  text-align: left;
}

.demo-tabs button:hover { color: var(--hero-ink); }
.demo-tabs button[aria-selected=true] {
  border-color: var(--hero-border);
  background: var(--stage-fixed-bg);
  color: var(--hero-accent);
}

.demo-scene {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(.9rem, 2vw, 1.65rem);
  padding: clamp(.8rem, 2vw, 1.5rem);
  background: radial-gradient(ellipse at 15% 80%, #38615550, transparent 60%), var(--stage-panel);
  border-bottom: 1px solid var(--hero-border);
}

.demo-screen {
  position: relative;
  min-width: 0;
  border: 1px solid #6f8178;
  border-radius: .65rem;
  align-self: start;
  overflow: hidden;
  color: #253c32;
  background: #f3f1e7;
  box-shadow: .6rem .65rem 0 -.16rem #b5f3cf22, 0 1.1rem 2rem #0006;
}

@media (min-width: 65rem) and (prefers-reduced-motion: no-preference) {
  :root:not([data-theme=contrast]):not([data-motion=reduced]) .demo-screen {
    transform: perspective(65rem) rotateY(8deg) rotateX(3deg);
    transform-origin: center;
    transition: transform .62s cubic-bezier(.24,.9,.3,1);
  }
  :root:not([data-theme=contrast]):not([data-motion=reduced]) [data-phase=inspect] .demo-screen { transform: perspective(65rem) rotateY(0deg) scale(1.02); }
  :root:not([data-theme=contrast]):not([data-motion=reduced]) [data-phase=fix] .demo-screen { transform: perspective(65rem) rotateY(-6deg); }
  :root:not([data-theme=contrast]):not([data-motion=reduced]) [data-phase=recheck] .demo-screen { transform: perspective(65rem) rotateY(2deg); }
}

.mock-sweep {
  position: absolute;
  z-index: 2;
  top: 7%;
  inset-inline: 0;
  height: .32rem;
  pointer-events: none;
  background: #b5ffde;
  box-shadow: 0 0 .4rem .22rem #10e6a7, 0 -.6rem 1.8rem .4rem #8cffbb;
}
:root[data-motion=reduced] .mock-sweep { display: none; }
@media (prefers-reduced-motion: reduce) { .mock-sweep { display: none; } }
[data-phase=scan] .mock-target, [data-sweeping=true] .mock-target { border-color: #82918a; box-shadow: none; }
[data-phase=scan] .demo-evidence h3, [data-phase=scan] .demo-evidence p { display: none; }

.mock-chrome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .55rem;
  padding: .55rem .65rem;
  background: #dce8df;
  border-bottom: 1px solid #879e90;
  font: .66rem/1.4 ui-monospace, monospace;
  overflow-wrap: anywhere;
}

.mock-dots {
  width: .35rem;
  height: .35rem;
  margin-inline-end: .8rem;
  border-radius: 50%;
  background: #577466;
  box-shadow: .4rem 0 #769589, .8rem 0 #99b3a5;
}

.mock-content { display: grid; gap: .65rem; min-height: 13rem; padding: 1.05rem 1rem; }
.mock-brand { display: block; color: #365349; font-weight: 720; font-size: .66rem; }
.mock-head { color: #17372a; font: 400 1.55rem/1 Georgia, serif; overflow-wrap: anywhere; }

.mock-target {
  position: relative;
  display: grid;
  gap: .22rem;
  padding: .38rem;
  border: .13rem solid #a65524;
  border-radius: .32rem;
  background: #fffaf0;
  box-shadow: 0 0 0 .19rem #a6552430;
  overflow-wrap: anywhere;
}

.mock-label, .mock-image-note { font-size: .65rem; font-weight: 650; }

.mock-input {
  min-height: 1.32rem;
  padding: .25rem .45rem;
  border: 1px solid #8d9b8d;
  background: #fff;
  border-radius: .16rem;
  color: #4a5c50;
  font-size: .65rem;
}

.mock-submit {
  justify-self: start;
  padding: .3rem .5rem;
  border-radius: .2rem;
  color: #fff;
  background: #446353;
  font-size: .65rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.mock-after { display: none; }
.demo-scene[data-fixed=true] .mock-target {
  border-color: #267248;
  box-shadow: 0 0 0 .19rem #26724830;
}
.demo-scene[data-fixed=true] .mock-before { display: none; }
.demo-scene[data-fixed=true] .mock-after { display: inline; }

.mock-plant {
  position: relative;
  min-height: 4.4rem;
  border-radius: .25rem;
  background: radial-gradient(ellipse at 63% 36%, #f9eed7, #dbbd93);
}

.mock-plant::before {
  content: "";
  position: absolute;
  width: 25%;
  height: 31%;
  inset-block-end: 11%;
  inset-inline-start: 39%;
  border-radius: .12rem .12rem .48rem .48rem;
  background: linear-gradient(110deg, #b56142, #743521);
  box-shadow: .2rem .22rem .2rem #65312145;
}

.mock-plant span {
  position: absolute;
  width: 32%;
  height: 23%;
  inset-block-start: 31%;
  inset-inline-start: 24%;
  transform: rotate(29deg);
  border-radius: 0 78% 0 78%;
  background: #3b6950;
}

.mock-plant span + span {
  inset-inline-start: 45%;
  inset-block-start: 21%;
  transform: rotate(-67deg);
  background: #537a43;
}

.mock-menu-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .45rem;
}
.mock-menu-row .mock-target { font-size: .72rem; font-weight: 650; }
.mock-line { display: block; height: .28rem; border-radius: 1rem; background: #adc0ae; }
.mock-line.short { width: 63%; }

.demo-evidence { min-width: 0; align-self: center; }
.demo-status {
  display: inline-block;
  padding: .22rem .46rem;
  border-radius: .3rem;
  border: 1px solid currentColor;
  color: var(--stage-issue);
  background: var(--stage-issue-bg);
  font-size: .73rem;
  font-weight: 680;
}
.demo-scene[data-fixed=true] .demo-status { color: var(--stage-fixed); background: var(--stage-fixed-bg); }
.finding-demo:is([data-phase=scan],[data-sweeping=true]) .demo-status { color: var(--hero-muted); background: var(--stage-bg); }

.demo-evidence h3 {
  margin: .55rem 0 .25rem;
  color: var(--hero-ink);
  font-size: 1.04rem;
  line-height: 1.32;
}

.demo-evidence p { margin: 0; color: var(--hero-muted); font-size: .86rem; line-height: 1.48; }
.demo-evidence pre {
  padding: .63rem;
  margin: .65rem 0 .55rem;
  background: var(--stage-code);
  border: 1px solid var(--hero-border);
  color: var(--hero-accent);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.demo-evidence pre code { color: inherit; font-size: .78rem; }

body.page-home main > .home-scope,
body.page-home main > .home-next {
  padding-block: clamp(2.5rem, 6vw, 5.4rem);
}

.home-scope h2, .home-next h2 {
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  max-width: none;
  margin: 0 0 .75em;
  letter-spacing: -.02em;
  line-height: 1.06;
}

.home-scope { background: var(--surface); }
.home-scope-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: start;
  gap: 2.25rem 5rem;
}
.home-scope-grid h2 { margin-bottom: .4em; }
.home-scope-grid p { font-size: 1rem; margin-bottom: 0; }

.scope-checks {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  margin: .95rem 0;
  padding: 0;
}

.scope-checks li {
  border: 1px solid var(--line);
  border-radius: .32rem;
  background: var(--panel);
  color: var(--ink);
  padding: .27rem .6rem;
  font-size: .86rem;
}

.home-results {
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: .8rem;
}
.home-results h3 { margin: 0 0 .6rem; }
.home-results dl { margin: 0; }
.home-results dl > div { padding: .65rem 0; border-top: 1px solid var(--line); }
.home-results dd { font-size: .9rem; margin: .35rem 0 0; }
.home-results .chip { font-weight: 650; }
.home-next .home-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.6rem; justify-content: space-between; }
.home-next h2 { margin: 0; }

@media (max-width: 64rem) {
  .welcome-grid { grid-template-columns: minmax(0, 1fr); max-width: 52rem; gap: 2.4rem; }
  .welcome-copy h1 { max-width: 16ch; }
  .welcome-copy h1 span, .welcome-copy h1 em { display: inline; }
}

@media (max-width: 43rem) {
  .welcome-copy h1 { font-size: clamp(2.8rem, 11vw, 4.05rem); }
  .home-scope-grid { grid-template-columns: minmax(0, 1fr); }
  .finding-demo { box-shadow: 0 .65rem 1.5rem #0004, .35rem .38rem 0 #63868255; }
}

@media (max-width: 34rem) {
  .tour-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-scene { grid-template-columns: minmax(0, 1fr); }
  .mock-content { min-height: auto; }
}

:root:is([data-text-size="150"], [data-text-size="200"]) .welcome-grid,
:root:is([data-text-size="150"], [data-text-size="200"]) .home-scope-grid,
:root:is([data-text-size="150"], [data-text-size="200"]) .demo-scene {
  grid-template-columns: minmax(0, 1fr);
}
:root:is([data-text-size="150"], [data-text-size="200"]) .welcome-copy h1 {
  font-size: clamp(1.9rem, 8vw, 3.25rem);
  line-height: 1.08;
}
:root:is([data-text-size="150"], [data-text-size="200"]) .welcome-copy h1 :is(span, em) { display: inline; }
:root[data-spacing=roomy] .welcome-copy h1 { line-height: 1.35; }
:root[data-theme=contrast] .chip { border: 1px solid currentColor; }
:root[data-theme=contrast] .welcome-depth { display: none; }

@media (forced-colors: active) {
  .demo-tabs button[aria-selected=true], .tour-track button[aria-current=step] {
    border-color: Highlight;
    color: Highlight;
  }
  .welcome-depth { display: none; }
}
