.guide-hero h1 { max-width: 11ch; }

.guide-hero::before {
  top: -20%;
  right: -14%;
  width: min(62vw, 920px);
  background: var(--violet);
  clip-path: polygon(18% 0, 100% 0, 100% 82%, 43% 100%, 0 58%);
  border-radius: 0;
  transform: none;
}

.guide-hero::after {
  top: 22%;
  right: 9%;
  width: clamp(10rem, 25vw, 25rem);
}

.guide-return {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.78rem;
}

.guide-return:hover { color: var(--acid); }

.guide-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(calc(100% - 2.5rem), calc(var(--max) - 9rem));
  margin: clamp(3rem, 7vw, 6rem) auto 0;
  overflow: hidden;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
}

.guide-strip div {
  padding: clamp(1.3rem, 3vw, 2.2rem);
}

.guide-strip div + div { border-left: 1px solid var(--line); }

.guide-strip span {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--acid);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-strip strong {
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 520;
}

.guide-prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.guide-prompt {
  min-height: 10rem;
  padding: 1.25rem;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 1rem;
  transition: color 350ms ease, background 350ms ease, transform 500ms cubic-bezier(0.32, 0.94, 0.6, 1);
}

.guide-prompt:hover {
  color: var(--ink);
  background: var(--acid);
  transform: translateY(-0.35rem);
}

.guide-prompt span {
  display: block;
  margin-bottom: 2.5rem;
  color: var(--acid);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.guide-prompt:hover span { color: var(--violet); }

.guide-prompt p {
  margin: 0;
  color: inherit;
  font-size: 0.98rem;
  line-height: 1.5;
}

.guide-table {
  width: 100%;
  margin-top: 1.5rem;
  border-collapse: collapse;
}

.guide-table th,
.guide-table td {
  padding: 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.guide-table th {
  color: var(--acid);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guide-table td {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.guide-signal-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.guide-signal {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem;
  background: rgba(73, 48, 255, 0.1);
  border: 1px solid rgba(112, 92, 255, 0.32);
  border-radius: 0.9rem;
}

.guide-signal span {
  display: grid;
  place-items: center;
  width: 2.6rem;
  aspect-ratio: 1;
  color: var(--ink);
  background: var(--acid);
  border-radius: 50%;
  font-weight: 800;
}

.guide-signal h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.guide-signal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.guide-worksheet {
  margin-top: 1.5rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  color: var(--ink);
  background: var(--acid);
  border-radius: 1.2rem;
}

.guide-worksheet h3 {
  max-width: 13ch;
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 450;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.guide-worksheet ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: worksheet;
}

.guide-worksheet li {
  position: relative;
  padding: 0.9rem 0 0.9rem 2.5rem;
  border-top: 1px solid rgba(7, 7, 10, 0.18);
  color: rgba(7, 7, 10, 0.78);
  counter-increment: worksheet;
}

.guide-worksheet li::before {
  content: counter(worksheet, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--violet);
  font-size: 0.7rem;
  font-weight: 800;
}

/* Integration map: connected-system hover language.
   Motion stays transform-led so the guide remains smooth on long pages. */
body[data-route="integration-map"] .guide-strip div {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition:
    color 340ms ease,
    background-color 340ms ease,
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-route="integration-map"] .guide-strip div::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 100%;
  background: var(--acid);
  transform: scaleY(0.025);
  transform-origin: bottom;
  transition: transform 640ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-route="integration-map"] .guide-strip strong,
body[data-route="integration-map"] .guide-strip span {
  position: relative;
  display: block;
  transition:
    color 300ms ease,
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-route="integration-map"] .guide-prompt {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transform-origin: 50% 100%;
  transition:
    color 340ms ease,
    background-color 340ms ease,
    border-color 340ms ease,
    border-radius 620ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-route="integration-map"] .guide-prompt::after {
  content: "↗";
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.15rem;
  aspect-ratio: 1;
  color: var(--paper);
  background: var(--violet);
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-0.55rem, 0.55rem, 0) rotate(-35deg) scale(0.72);
  transition:
    opacity 300ms ease,
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-route="integration-map"] .guide-prompt span,
body[data-route="integration-map"] .guide-prompt p {
  position: relative;
  z-index: 1;
  transition:
    color 300ms ease,
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-route="integration-map"] .guide-table tbody tr {
  transition:
    background-color 360ms ease,
    transform 540ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-route="integration-map"] .guide-table tbody td {
  transition: color 320ms ease, border-color 320ms ease;
}

body[data-route="integration-map"] .guide-table tbody td:first-child {
  color: var(--paper);
  transition:
    color 320ms ease,
    padding-left 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-route="integration-map"] .guide-signal {
  position: relative;
  overflow: hidden;
  transition:
    background-color 360ms ease,
    border-color 360ms ease,
    border-radius 620ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-route="integration-map"] .guide-signal span,
body[data-route="integration-map"] .guide-signal h3,
body[data-route="integration-map"] .guide-signal p {
  transition:
    color 320ms ease,
    background-color 320ms ease,
    border-radius 560ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-route="integration-map"] .guide-worksheet li {
  transition:
    color 320ms ease,
    background-color 320ms ease,
    padding-left 540ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-route="integration-map"] .guide-worksheet li::before {
  transition:
    color 320ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  body[data-route="integration-map"] .guide-strip div:hover {
    z-index: 1;
    color: var(--ink);
    transform: translate3d(0, -0.45rem, 0);
  }

  body[data-route="integration-map"] .guide-strip div:hover::after {
    transform: scaleY(1);
  }

  body[data-route="integration-map"] .guide-strip div:hover span {
    color: var(--violet);
    transform: translate3d(0.3rem, 0, 0);
  }

  body[data-route="integration-map"] .guide-strip div:hover strong {
    transform: translate3d(0.3rem, -0.12rem, 0);
  }

  body[data-route="integration-map"] .guide-prompt:hover {
    color: var(--ink);
    background: var(--acid);
    border-color: var(--acid);
    border-radius: 1rem 2.25rem 1rem 1rem;
    transform: translate3d(0, -0.55rem, 0) rotate(0.25deg);
  }

  body[data-route="integration-map"] .guide-prompt:nth-child(even):hover {
    transform: translate3d(0, -0.55rem, 0) rotate(-0.25deg);
  }

  body[data-route="integration-map"] .guide-prompt:hover::after {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }

  body[data-route="integration-map"] .guide-prompt:hover span {
    color: var(--violet);
    transform: translate3d(0.2rem, 0, 0);
  }

  body[data-route="integration-map"] .guide-prompt:hover p {
    transform: translate3d(0.2rem, -0.12rem, 0);
  }

  body[data-route="integration-map"] .guide-table tbody tr:hover {
    background: rgba(105, 76, 255, 0.12);
    transform: translate3d(0.35rem, 0, 0);
  }

  body[data-route="integration-map"] .guide-table tbody tr:hover td {
    color: var(--paper);
    border-color: rgba(223, 255, 25, 0.32);
  }

  body[data-route="integration-map"] .guide-table tbody tr:hover td:first-child {
    color: var(--acid);
    padding-left: 1.35rem;
  }

  body[data-route="integration-map"] .guide-signal:hover {
    background: rgba(105, 76, 255, 0.2);
    border-color: rgba(223, 255, 25, 0.62);
    border-radius: 0.9rem 2rem 0.9rem 0.9rem;
    transform: translate3d(0.45rem, -0.18rem, 0);
  }

  body[data-route="integration-map"] .guide-signal:hover span {
    color: var(--paper);
    background: var(--violet);
    border-radius: 32% 68% 46% 54%;
    transform: rotate(8deg) scale(1.06);
  }

  body[data-route="integration-map"] .guide-signal:hover h3 {
    color: var(--acid);
    transform: translate3d(0.2rem, 0, 0);
  }

  body[data-route="integration-map"] .guide-signal:hover p {
    color: rgba(255, 255, 255, 0.76);
    transform: translate3d(0.2rem, 0, 0);
  }

  body[data-route="integration-map"] .guide-worksheet li:hover {
    padding-left: 3rem;
    color: var(--ink);
    background: rgba(7, 7, 10, 0.08);
  }

  body[data-route="integration-map"] .guide-worksheet li:hover::before {
    color: var(--ink);
    transform: translate3d(0.25rem, 0, 0) rotate(-8deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-route="integration-map"] .guide-strip div,
  body[data-route="integration-map"] .guide-strip div::after,
  body[data-route="integration-map"] .guide-strip span,
  body[data-route="integration-map"] .guide-strip strong,
  body[data-route="integration-map"] .guide-prompt,
  body[data-route="integration-map"] .guide-prompt::after,
  body[data-route="integration-map"] .guide-prompt span,
  body[data-route="integration-map"] .guide-prompt p,
  body[data-route="integration-map"] .guide-table tbody tr,
  body[data-route="integration-map"] .guide-table tbody td,
  body[data-route="integration-map"] .guide-signal,
  body[data-route="integration-map"] .guide-signal *,
  body[data-route="integration-map"] .guide-worksheet li,
  body[data-route="integration-map"] .guide-worksheet li::before {
    transition: none !important;
    transform: none !important;
  }
}

/* Decision guides — route-specific tool interactions */
body[data-route="ai-readiness"] {
  --guide-card-fill: var(--acid);
  --guide-card-text: var(--ink);
  --guide-card-accent: var(--violet);
}

body[data-route="project-brief"] {
  --guide-card-fill: #f5f3ee;
  --guide-card-text: var(--ink);
  --guide-card-accent: var(--violet);
}

body[data-route="product-opportunity"] {
  --guide-card-fill: var(--acid);
  --guide-card-text: var(--ink);
  --guide-card-accent: var(--violet);
}

:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-strip div,
:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-prompt,
:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-signal {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition:
    color 340ms ease,
    background-color 400ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 340ms ease,
    border-radius 620ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-strip div::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--guide-card-accent);
  transform: scaleX(0.08);
  transform-origin: left;
  transition: transform 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-strip span,
:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-strip strong,
:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-prompt span,
:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-prompt p,
:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-signal span,
:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-signal h3,
:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-signal p {
  position: relative;
  z-index: 1;
  transition:
    color 320ms ease,
    background-color 320ms ease,
    border-radius 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-table tbody tr {
  transition:
    background-color 340ms ease,
    transform 540ms cubic-bezier(0.22, 1, 0.36, 1);
}

:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-table tbody td {
  transition: color 320ms ease, border-color 320ms ease, padding-left 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

:is(
  body[data-route="ai-readiness"],
  body[data-route="project-brief"],
  body[data-route="product-opportunity"]
) .guide-worksheet li {
  transition:
    color 320ms ease,
    background-color 320ms ease,
    padding-left 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* AI readiness: evaluation state marker */
body[data-route="ai-readiness"] .guide-prompt::after {
  content: "?";
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.1rem;
  aspect-ratio: 1;
  color: var(--paper);
  background: var(--violet);
  border-radius: 50%;
  font-weight: 800;
  opacity: 0;
  transform: rotate(-20deg) scale(0.65);
  transition: opacity 300ms ease, border-radius 520ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Project brief: document-corner motion */
body[data-route="project-brief"] .guide-prompt::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 3.2rem;
  aspect-ratio: 1;
  background: var(--violet);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  opacity: 0.18;
  transform: translate3d(1rem, -1rem, 0);
  transition: opacity 320ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Product opportunity: hypothesis bracket */
body[data-route="product-opportunity"] .guide-prompt::after {
  content: "→";
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--paper);
  font-size: 1.25rem;
  opacity: 0;
  transform: translate3d(-0.75rem, 0, 0);
  transition: opacity 300ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-strip div:hover {
    background: rgba(105, 76, 255, 0.13);
    transform: translate3d(0, -0.42rem, 0);
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-strip div:hover::after {
    transform: scaleX(1);
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-strip div:hover span,
  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-strip div:hover strong {
    transform: translate3d(0.25rem, 0, 0);
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-prompt:hover {
    color: var(--guide-card-text);
    background: var(--guide-card-fill);
    border-color: var(--guide-card-fill);
  }

  body[data-route="ai-readiness"] .guide-prompt:hover {
    border-radius: 1rem 2.4rem 1rem 1rem;
    transform: translate3d(0, -0.55rem, 0) rotate(0.25deg);
  }

  body[data-route="ai-readiness"] .guide-prompt:nth-child(even):hover {
    transform: translate3d(0, -0.55rem, 0) rotate(-0.25deg);
  }

  body[data-route="ai-readiness"] .guide-prompt:hover::after {
    opacity: 1;
    border-radius: 30% 70% 42% 58%;
    transform: rotate(8deg) scale(1);
  }

  body[data-route="project-brief"] .guide-prompt:hover {
    border-radius: 0.45rem 1rem 1rem 1rem;
    transform: translate3d(0.35rem, -0.42rem, 0);
  }

  body[data-route="project-brief"] .guide-prompt:hover::after {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  body[data-route="product-opportunity"] .guide-prompt:hover {
    border-radius: 1rem;
    transform: translate3d(0, -0.55rem, 0) scale(0.985);
  }

  body[data-route="product-opportunity"] .guide-prompt:hover::after {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-prompt:hover span {
    color: var(--guide-card-accent);
    transform: translate3d(0.2rem, 0, 0);
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-prompt:hover p {
    transform: translate3d(0.2rem, -0.1rem, 0);
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-signal:hover {
    background: rgba(105, 76, 255, 0.2);
    border-color: rgba(223, 255, 25, 0.62);
    border-radius: 0.9rem 2rem 0.9rem 0.9rem;
    transform: translate3d(0.4rem, -0.18rem, 0);
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-signal:hover span {
    color: var(--paper);
    background: var(--guide-card-accent);
    border-radius: 30% 70% 42% 58%;
    transform: rotate(8deg) scale(1.05);
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-signal:hover h3 {
    color: var(--acid);
    transform: translate3d(0.2rem, 0, 0);
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-signal:hover p {
    color: rgba(255, 255, 255, 0.78);
    transform: translate3d(0.2rem, 0, 0);
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-table tbody tr:hover {
    background: rgba(105, 76, 255, 0.12);
    transform: translate3d(0.32rem, 0, 0);
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-table tbody tr:hover td {
    color: var(--paper);
    border-color: rgba(223, 255, 25, 0.3);
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-table tbody tr:hover td:first-child {
    color: var(--acid);
    padding-left: 1.3rem;
  }

  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) .guide-worksheet li:hover {
    padding-left: 3rem;
    color: var(--ink);
    background: rgba(7, 7, 10, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) :is(.guide-strip div, .guide-prompt, .guide-signal, .guide-table tr, .guide-table td, .guide-worksheet li),
  :is(
    body[data-route="ai-readiness"],
    body[data-route="project-brief"],
    body[data-route="product-opportunity"]
  ) :is(.guide-strip div, .guide-prompt, .guide-signal)::after {
    transition: none !important;
    transform: none !important;
  }
}

@media (max-width: 760px) {
  .guide-strip,
  .guide-prompt-grid { grid-template-columns: 1fr; }
  .guide-strip div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .guide-table { display: block; overflow-x: auto; }
}

@media print {
  .guide-strip { width: 100%; }
  .guide-prompt, .guide-signal, .guide-worksheet { break-inside: avoid; }
}
