/* Kiosk UI: a deliberately narrow palette – purple, gray and near-black
   surfaces, with green reserved for "after"/fixed states and red for
   "before"/broken ones. Colour roles are token-driven so both themes stay
   above 4.5:1 contrast. */

:root {
  color-scheme: dark;
  --bg: #07050a;
  --surface: #140f1f;
  --surface-2: #231a38;
  --surface-3: #3d2d62;
  --border: #755bb3;
  --border-soft: #423e49;
  --text: #f5f5f5;
  --text-muted: #A0A0A0;
  --accent: #a999d0;
  --accent-strong: #07050a;
  --accent-soft: #3d2d62;
  --success: #3fb950;
  --success-strong: #052e16;
  --success-soft: #123822;
  --warn: #bfb2dc;
  --warn-strong: #231a38;
  --danger: #ff7b72;
  --danger-strong: #3b0d0c;
  --focus: #bfb2dc;
  --brand-purple: #5a428f;
  --brand-lavender: #a999d0;
  --white: #ffffff;
  --action-bg: #5a428f;
  --action-hover: #3d2d62;
  --action-text: #ffffff;
  --highlight-bg: #5a428f;
  --highlight-border: #bfb2dc;
  --highlight-text: #ffffff;
  --warning-bg: #f6ffab;
  --warning-text: #231a38;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 18px 44px rgb(7 5 10 / 0.36);
  --shadow-lift: 0 22px 50px rgb(7 5 10 / 0.42);
  --glow: rgb(90 66 143 / 0.16);
  /* Tint layer behind the page; kept very light in the light theme so the
     body gradient stays soft instead of banding across the screen. */
  --body-tint: #231a38;
  --body-wash: #140f1f;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --demo-animation-delay: 1.5s;
  --diff-line-delay: 0.42s;
  --activity-step-delay: 1.15s;
}

.agent-activity__icon::before {
  content: counter(activity);
  font-size: 0.8rem;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #faf8fd;
  --surface: #ffffff;
  --surface-2: #f2eef9;
  --surface-3: #e5e0f1;
  --border: #755bb3;
  --border-soft: #afa3ca;
  --text: #1b142b;
  --text-muted: #4f4468;
  --accent: #5a428f;
  --accent-strong: #ffffff;
  --accent-soft: #d3cbe4;
  --success: #1a7f37;
  --success-strong: #ffffff;
  --success-soft: #e6f4ea;
  --warn: #e5e0f1;
  --danger: #b4232c;
  --danger-strong: #ffffff;
  --focus: #5a428f;
  --highlight-bg: #bfb2dc;
  --highlight-border: #5a428f;
  --highlight-text: #231a38;
  --shadow-soft: 0 14px 34px rgb(35 26 56 / 0.12);
  --shadow-lift: 0 20px 44px rgb(35 26 56 / 0.18);
  --glow: rgb(117 91 179 / 0.07);
  --body-tint: #f6f3fb;
  --body-wash: #f8f6fc;
}

/* rise-in has no "to" keyframe, so the animation settles on the element's own
   values. These blocks must therefore stay visible in the base rule; the
   "backwards" fill of the delayed animation keeps them hidden until their turn. */
.fix-change {
  animation: rise-in 0.55s var(--ease) calc(var(--code-start-delay) + var(--diff-lines) * var(--diff-line-delay) + 0.5s) both;
}

/* Shared label utilities used across Find, File, and Fix screens. */
/* Metadata dt elements opt into this class in markup so their label treatment
   stays consistent across different grids. */
.prompt__eyebrow,
.meta-label {
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
}

.prompt__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.meta-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  line-height: 1.25rem;
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  font-size: 19px;
  line-height: 1.5;
}

body {
  background:
    radial-gradient(circle at 8% -12%, var(--glow), transparent 38rem),
    radial-gradient(circle at 94% 4%, var(--body-tint), transparent 42rem),
    radial-gradient(circle at 50% 115%, var(--glow), transparent 46rem),
    linear-gradient(135deg, var(--bg) 0%, var(--body-wash) 52%, var(--bg) 100%),
    var(--bg);
  background-attachment: fixed;
}

h1,
h2,
h3 {
  letter-spacing: -0.01em;
}

.screen--intro .screen__title {
  letter-spacing: 0.015em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  background: var(--accent);
  color: var(--accent-strong);
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
  top: 0;
}

/* ------------------------------------------------------------------ shell */

.kiosk {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: calc(100% - 7rem);
  max-width: 1180px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 1.25rem 0 1.1rem;
}

.kiosk__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 48px;
}

.kiosk__controls {
  display: flex;
  flex-wrap: nowrap;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  gap: 0.7rem;
}

/* ---------------------------------------------------------------- progress */

.progress__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 2.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress__phase {
  position: relative;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.progress__phase + .progress__phase::before {
  content: "→";
  position: absolute;
  left: -1.55rem;
  top: 50%;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
}

.kiosk__header .progress__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: inherit;
  text-transform: uppercase;
}

button.progress__link {
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

button.progress__link:hover {
  background: var(--action-bg);
  color: var(--action-text);
}

.progress__number {
  flex: none;
  font: inherit;
  color: var(--accent);
}

.progress__phase.is-done {
  color: var(--text-muted);
}

.progress__phase.is-done .progress__number {
  color: var(--success);
  animation: pop-in 0.4s var(--ease) both;
}

.progress__phase.is-current {
  border-color: var(--action-bg);
  background: var(--action-bg);
  color: var(--action-text);
  animation: pill-in 0.45s var(--ease) both;
}

.progress__phase.is-current .progress__number {
  color: inherit;
}

/* ------------------------------------------------------------------- main */

.kiosk__main {
  display: flex;
  flex: 1;
  min-height: 0;
}

.kiosk__main:focus {
  outline: none;
}

.screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 1.35rem;
  width: 100%;
  min-width: 0;
}

/* Every direct child of a screen enters on the same staged rhythm. */
.screen > :not(.explore-layout) {
  animation: rise-in 0.5s var(--ease) both;
  animation-delay: calc(var(--enter, 0) * 70ms);
}

.screen--find > :not(.explore-layout) {
  animation-duration: 0.65s;
}

.screen > *:nth-child(2) { --enter: 1; }
.screen > *:nth-child(3) { --enter: 2; }
.screen > *:nth-child(4) { --enter: 3; }
.screen > *:nth-child(5) { --enter: 4; }
.screen > *:nth-child(6) { --enter: 5; }
.screen > *:nth-child(7) { --enter: 6; }

.screen__title {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  line-height: 1.08;
}

/* The opening screen uses a tagline; workflow screens move that context into
   their left-hand story or tool panel instead of repeating it here. */
.screen__subtitle {
  margin: -0.25rem 0 1.15rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 66ch;
}

.screen__title .accent {
  color: var(--accent);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  min-height: 52px;
  padding: 0.75rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease), filter 0.18s var(--ease);
}

.btn--primary {
  background: var(--action-bg);
  color: var(--action-text);
  box-shadow: 0 4px 12px var(--glow);
}

.btn--primary:hover {
  background: var(--action-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--glow);
}

.btn--primary:active {
  transform: translateY(0) scale(0.985);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: var(--action-bg);
  border-color: var(--action-bg);
  color: var(--action-text);
  transform: translateY(-2px);
}

.btn--ghost:active {
  transform: translateY(0) scale(0.985);
}

.btn--small {
  min-height: 44px;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
}

.btn--icon {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  padding-inline: 0.6rem;
  border-radius: 999px;
}

/* Header toggles match the play/pause control's 44px height and 20px glyphs,
   so every booth control reads as one compact family. A visible border keeps
   them from blending into the light-theme surface; the global :focus-visible
   outline is the only extra affordance, so no separate focus ring is added
   for the pressed/unpressed states. */
.kiosk__controls .btn--icon {
  min-height: 44px;
  padding-block: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px var(--glow);
}

.btn__icon-svg {
  flex: none;
  transition: transform 0.3s var(--ease);
}

.kiosk__controls .btn__icon-svg {
  width: 20px;
  height: 20px;
}

.btn--icon:hover .btn__icon-svg {
  transform: rotate(18deg) scale(1.08);
}

/* Only the icon matching the current state is shown. Light mode and active
   animation use white controls; dark mode and paused animation use purple. */
#theme-toggle [data-icon="sun"],
#motion-toggle [data-icon="pause"] {
  display: none;
}

#theme-toggle[aria-pressed="true"] [data-icon="moon"],
#motion-toggle[aria-pressed="true"] [data-icon="play"] {
  display: none;
}

#theme-toggle[aria-pressed="true"] [data-icon="sun"],
#motion-toggle[aria-pressed="true"] [data-icon="pause"] {
  display: inline;
}

#theme-toggle[aria-pressed="true"],
#motion-toggle[aria-pressed="false"] {
  background: var(--white);
  color: var(--brand-purple);
}

#theme-toggle[aria-pressed="false"],
#motion-toggle[aria-pressed="true"] {
  background: var(--brand-purple);
  color: var(--white);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

/* Back sits opposite the step's own action, so returning to the previous screen
   is always available without competing with the way forward. */
.actions__back {
  margin-right: auto;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.actions__hint {
  margin: 0 auto 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ------------------------------------------------------------ choose cards */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cards li {
  display: flex;
}

/* Persona cards are content blocks, so they keep sentence case and their own
   larger type instead of the compact uppercase control styling. */
.btn--card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  min-height: 260px;
  padding: 1rem;
  border-radius: var(--radius);
  border-color: var(--border-soft);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font-size: 0.98rem;
  text-transform: none;
  box-shadow: var(--shadow-soft);
  animation: rise-in 0.55s var(--ease) both;
  animation-delay: calc(140ms + var(--card-index, 0) * 90ms);
}

.btn--card:hover,
.btn--card:focus-visible {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.btn--card:active {
  transform: translateY(-1px) scale(0.99);
}

.card__top {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.card__image,
.persona-image {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  border: 4px solid var(--accent);
  background: var(--surface-2);
  object-fit: cover;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

/* The picker is the one screen where the person comes first, so their portrait
   is noticeably larger there than in the in-flow panels. */
.card__image {
  width: 104px;
  height: 104px;
}

.btn--card:hover .card__image {
  border-color: var(--accent);
  transform: scale(1.06);
}

.card__identity {
  display: grid;
  gap: 0.1rem;
}

.card__persona {
  font-size: 1.1rem;
  line-height: 1.2;
}

.card__story {
  color: var(--accent);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

.card__goal {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.card__details {
  display: grid;
  gap: 0.6rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-soft);
}

.card__detail {
  display: grid;
  gap: 0.1rem;
  font-size: 0.86rem;
  font-weight: 600;
}

.card__label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card__action {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  /* Solid action purple with white text in both themes, so the label clears
     4.5:1 and the pill's own edge clears 3:1 against the card behind it. */
  background: var(--action-bg);
  color: var(--action-text);
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn--card:hover .card__action,
.btn--card:focus-visible .card__action {
  background: var(--action-hover);
  border-color: var(--border);
  color: var(--action-text);
}

.card__arrow {
  transition: transform 0.25s var(--ease);
}

.btn--card:hover .card__arrow {
  transform: translateX(5px);
}

/* ------------------------------------------------------------ intro screen */

.intro__eyebrow {
  order: -2;
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The opening headline sits directly on the page, like a tagline. */
.screen--intro {
  gap: 1.35rem;
  justify-content: flex-start;
  padding-top: 0.5rem;
}

.screen--intro .screen__title {
  max-width: 17ch;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  white-space: pre-line;
}

.screen--intro .screen__subtitle {
  max-width: 52ch;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
}

.intro__phases {
  order: -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intro__phase {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface);
  animation: pop-in 0.45s var(--ease) both;
  animation-delay: calc(var(--phase-index, 0) * 120ms);
}

.intro__phase:nth-child(2) { --phase-index: 1; }
.intro__phase:nth-child(3) { --phase-index: 2; }

.intro__phase + .intro__phase::before {
  content: "→";
  position: absolute;
  left: -1.25rem;
  color: var(--accent);
  font-weight: 700;
}

.intro__phase-index {
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-strong);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 800;
}

.intro__phase-label {
  font-weight: 700;
  font-size: 1rem;
}

.intro__cards {
  margin-top: 0.2rem;
}

/* ------------------------------------------------------------- flow layout */

/* Story and tool context stay in the left column. The code or before/after
   evidence stays in the right column throughout the workflow. */
.flow-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
  min-height: 0;
}

.flow-layout--file {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flow-layout--report {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.flow-layout__context {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.flow-layout__context .report-panel {
  flex: 1 1 auto;
}

.report-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.1rem;
  border: 0;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.screen--report .report-panel,
.screen--report .report-panel__body {
  background: var(--accent-soft);
  color: var(--text);
}

.scanner-panel__header,
.report-panel__header,
.copilot-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-soft);
}

.scanner-panel__mark,
.copilot-brand__mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-strong);
  font-size: 1.1rem;
  animation: spark-in 0.6s var(--ease) both;
}

.scanner-panel__title,
.scanner-panel__status,
.report-panel__title,
.report-panel__status,
.copilot-brand__title,
.copilot-brand__status {
  margin: 0;
}

.scanner-panel__title,
.report-panel__title,
.copilot-brand__title {
  font-weight: 700;
  font-size: 0.98rem;
}

.scanner-panel__status,
.report-panel__status,
.copilot-brand__status {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.screen--report .report-panel__status {
  color: var(--text-muted);
}

/* The Copilot header introduces the whole fix, so its name, its status and the
   blocks beneath it need more air than the compact panel headers above. */
.copilot-brand {
  gap: 0.9rem;
  padding-bottom: 1rem;
  margin-bottom: 0.3rem;
}

.copilot-brand__status {
  margin-top: 0.35rem;
  font-size: 0.8rem;
}

.scanner-panel__count,
.report-panel__count {
  margin-left: auto;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  animation: pop-in 0.45s var(--ease) 0.35s both;
}

/* The scan, not the person, states the finding, so its summary outranks the
   muted body copy of the panel. */
.scanner-panel .scanner-panel__summary {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.3;
}

.scan-result {
  display: grid;
  gap: 0.35rem;
  visibility: hidden;
  animation: scan-result-in 0.55s var(--ease)
    calc(var(--code-start-delay) + var(--diff-lines) * var(--diff-line-delay) + 0.3s) both;
}

.scan-result .prompt__eyebrow {
  margin-bottom: 0;
}

.scanner-panel__result-title {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.3;
}

.scan-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  margin: 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.8rem;
  line-height: 1.25rem;
}

.scan-meta dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* The person's own words are primary content, so they stay at full contrast;
   only the hand-off line beneath them recedes. */
.report-panel__body {
  position: relative;
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0.5rem 1.65rem;
}

.report-panel__body::before,
.report-panel__body::after {
  position: absolute;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 0.7;
}

.report-panel__body::before {
  content: "“";
  top: 0.7rem;
  left: 0;
}

.report-panel__body::after {
  content: "”";
  right: 0;
  bottom: 0;
}

.report-panel__body p {
  margin: 0;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.45;
}

.report-panel__next {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.severity {
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--warn-strong);
  background: var(--warn);
}

.severity--violation {
  background: var(--danger);
  color: var(--danger-strong);
}

.severity--needs-review {
  background: var(--warn);
  color: var(--warn-strong);
}

/* ------------------------------------------------------------- file screen */

.step-explainer {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Step context reads as a tagline, without competing with the content panels. */
.detail-block.step-task {
  padding: 0;
  margin-bottom: 0.7rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 1rem;
}

.step-task .prompt__eyebrow {
  margin-bottom: 0.3rem;
  color: var(--accent);
  font-size: 0.9rem;
}

.step-task--blocked .prompt__eyebrow {
  color: var(--accent);
}

.step-task .prompt__text {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.35;
}

/* The bug the scan opened. */
.file-layout {
  display: grid;
  gap: 0.7rem;
}

.issue {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.screen--file > .flow-layout {
  animation: none;
}

.screen--file .issue {
  /* The filed bug writes in readable beats: JS sets each entry's step count
     from its text length, then CSS staggers entries across the ticket. */
  --ticket-type-duration: 0.5s;
  --ticket-type-delay: 0.15s;
  --ticket-stagger: 0.16s;
  animation: issue-open 0.6s var(--ease) both;
}

.screen--file .issue__written {
  animation: issue-type-in var(--ticket-type-duration) steps(var(--ticket-steps, 12), end) calc(var(--ticket-type-delay) + var(--ticket-index, 0) * var(--ticket-stagger)) both;
}

.issue__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid #5c5766;
  background: #545454;
}

/* The title column starts at the top left of the header and absorbs the free
   space, so the state pill never gets squeezed onto two lines beside it. */
.issue__header > div {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.issue__meta,
.issue__title {
  margin: 0;
}

.issue__title {
  color: #f0f6fc;
  font-size: 1rem;
  line-height: 1.25;
}

.issue__meta {
  margin-top: 0.25rem;
  color: #c9d1d9;
  font-size: 0.76rem;
}

.issue__state {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--brand-lavender);
  border-radius: 999px;
  background: var(--brand-lavender);
  color: #231a38;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* This aria-hidden bullet is a graphical status accent beside the Open text.
   #0b5323 separates the Open dot from the #14431f closed-state green while
   maintaining 3:1+ non-text contrast against the shared lavender pill (#a999d0). */
.issue__state-dot {
  color: #009332;
  line-height: 1;
}

/* The same bug, closed once the rescan and the re-test both pass. */
.issue__state--closed {
  margin-left: auto;
  align-self: center;
  border-color: #b7e4c0;
  background: #b7e4c0;
  color: #14431f;
}

.issue__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 1.25rem;
  align-items: start;
  padding: 1.15rem 1.35rem 1.35rem;
}

.issue__main {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.issue__comment {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.issue__bot-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-strong);
  font-size: 1rem;
}

.issue__comment-box {
  flex: 1;
  min-width: 0;
}

.issue__comment-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  padding: 0.25rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
}

/* The access need travels with the report, so the issue keeps the person
   attached without forcing them to spell it out in their own comment. */
.issue__comment-meta {
  color: var(--text-muted);
  font: inherit;
}

.issue__comment-body {
  display: grid;
  gap: 1rem;
}

.issue__scan-summary {
  margin: 0;
  font-size: 0.9rem;
}

/* The scan details and the person they block are plain issue metadata. */
.issue__meta-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1rem;
  margin: 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.8rem;
  line-height: 1.25rem;
}

.issue__meta-list dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.issue__sidebar {
  display: grid;
  gap: 1rem;
}

.issue__sidebar-section {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-soft);
}

.issue__sidebar-section:first-child {
  padding-top: 0;
  border-top: none;
}

.issue__sidebar-label {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.issue__label-chip {
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.72rem;
}

.issue__assignee {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.issue__assignee-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-strong);
  font-size: 0.8rem;
}

.issue__label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

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

.issue__story-group {
  display: grid;
  align-content: start;
  gap: 0.25rem;
  padding: 0.8rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.issue__story dt {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue__story dd {
  margin: 0;
  font-size: 0.98rem;
}

/* The bug keeps the person attached: who reported it and what it blocks. */
.issue__byline {
  color: var(--text);
}

/* -------------------------------------------------------------- fix screen */

/* Copilot's summary and proposed code change share the row equally. */
.fix-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1.25rem;
  padding: 1.1rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.final-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
  gap: 1.25rem 2rem;
  min-height: 0;
}

.screen--find .fix-layout,
.screen--fix .fix-layout {
  --activity-start-delay: 0s;
  --code-start-delay: calc(1.35s + (var(--activity-count) - 1) * var(--activity-step-delay));
}

.screen--find .agent-activity > .prompt__eyebrow,
.screen--fix .agent-activity > .prompt__eyebrow {
  animation: rise-in 0.6s var(--ease) var(--activity-start-delay) both;
}

.fix-code {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

/* Both versions stack in the same cell and span every row of the panel, so the
   black code surface fills the panel instead of stopping at the last line. */
.fix-code__before,
.fix-code__after {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.3rem;
  grid-area: 1 / 1 / -1 / -1;
  min-height: 0;
  min-width: 0;
}

.fix-code .diff-wrap {
  min-height: 0;
}

.fix-code .diff {
  height: 100%;
}

.fix-code__before {
  visibility: hidden;
  animation: fix-original 0s var(--code-start-delay) both;
}

.fix-code__after {
  animation: fix-proposed 0s var(--code-start-delay) both;
}

@keyframes fix-original {
  from { visibility: visible; }
  to { visibility: hidden; }
}

@keyframes fix-proposed {
  from { visibility: hidden; }
  to { visibility: visible; }
}

/* The technical verification trail belongs to the fix, before the human check. */
.fix-layout > .completion-panel {
  grid-column: 1 / -1;
}

/* Filing is the exception: the ticket needs the whole row to itself. */
.flow-layout--file > .flow-layout__context {
  grid-column: 1 / -1;
}

.comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.85rem;
}

.copilot-summary {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.copilot-summary > p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.agent-activity ol {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  list-style: none;
  counter-reset: activity;
}

/* Copilot's work plays out slowly, one finished step at a time. The delayed
   animation fills backwards, so each step stays hidden until its turn. */
.agent-activity li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  counter-increment: activity;
  line-height: 1.5;
  animation: rise-in 0.6s var(--ease) calc(var(--activity-start-delay, var(--demo-animation-delay)) + var(--activity-index) * var(--activity-step-delay)) both;
}

.agent-activity__icon {
  display: grid;
  place-items: center;
  width: 1.5em;
  height: 1.5em;
  flex: none;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: inherit;
  line-height: 1;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.55);
  animation: agent-check-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.35) calc(var(--activity-start-delay, var(--demo-animation-delay)) + 0.35s + var(--activity-index) * var(--activity-step-delay)) both;
}

.prompt__text {
  margin: 0;
  font-size: 1rem;
}

.workspace__title {
  margin: 0.75rem 0 0.35rem;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.9rem;
}

.diff-wrap {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  min-height: 0;
  display: grid;
  align-content: start;
  height: 100%;
  background: #000000;
  box-shadow: none;
  overflow: hidden;
}

.diff {
  margin: 0;
  padding: 0.8rem 0 1rem;
  height: 100%;
  max-height: clamp(150px, 24vh, 320px);
  background: #000000;
  overflow: auto;
}

.code-panel .diff {
  max-height: none;
}

.diff__line {
  display: block;
  padding: 0.12rem 1.15rem;
  color: #e3e0ea;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9rem;
  /* Code wraps instead of scrolling sideways, so the whole change stays
     readable on a kiosk display. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The diff types itself in, line by line, at close to real writing speed. */
.code-fill .diff__line {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: code-type 0.5s steps(26, end) forwards;
  animation-delay: calc(var(--code-start-delay) + (var(--line-index) * var(--diff-line-delay)));
}

.diff__line--added {
  background: #0f2e17;
  color: #7ee787;
}

.diff__line--removed {
  background: #3a1417;
  color: #ffb3b3;
}

/* ----------------------------------------------------------- verify screen */

.completion-panel {
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.completion-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.completion-flow__item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
}

.completion-flow__item + .completion-flow__item::before {
  content: "→";
  position: absolute;
  left: -1.15rem;
  top: 0.1rem;
  color: var(--success);
  font-size: 0.9rem;
}

.completion-flow__icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 999px;
  background: var(--success);
  color: var(--success-strong);
  font-size: 0.75rem;
  font-weight: 900;
  animation: check-burst 0.7s var(--ease) 0.2s both;
}

.completion-flow__copy {
  min-width: 0;
}

.completion-flow__title,
.completion-flow__meta {
  margin: 0;
}

.completion-flow__title {
  font-size: 0.9rem;
  font-weight: 700;
}

.completion-flow__meta {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.completion-flow__state {
  grid-column: 2;
  justify-self: start;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--success);
  border-radius: 999px;
  color: var(--success);
  font-size: 0.68rem;
  font-weight: 800;
}

.completion-panel__checks {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-soft);
}

.completion-panel__checks .checks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem 1.5rem;
}

.checks {
  display: grid;
  gap: 0;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.checks__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0;
  border-top: 1px solid var(--border-soft);
  font-size: 0.76rem;
}

.checks__icon {
  color: var(--success);
  font-weight: 800;
}

.checks__label {
  flex: 1;
}

.checks__state {
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 700;
}

.feedback {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
  padding: 1.25rem;
  border: 0;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  box-shadow: var(--shadow-soft);
}

.feedback__image {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 4px solid var(--accent);
  object-fit: cover;
}

.feedback__block {
  position: relative;
  margin: 0;
  padding: 0 1.65rem;
}

.feedback__block::before,
.feedback__block::after {
  position: absolute;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 0.7;
}

.feedback__block::before {
  content: "“";
  left: 0;
  top: 0.2rem;
}

.feedback__block::after {
  content: "”";
  right: 0;
  bottom: -0.4rem;
}

.feedback__quote {
  margin: 0;
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.45;
}

/* Lead with the person rather than another status card. */
.screen--verify .feedback--thanks {
  align-self: start;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.25rem;
  background: var(--accent-soft);
  color: var(--text);
}

.screen--verify .feedback__image {
  width: 128px;
  height: 128px;
  border: 6px solid var(--highlight-border);
}

.screen--verify .feedback__quote {
  font-size: 1.25rem;
  line-height: 1.4;
}

.screen--verify .feedback__attribution {
  margin: 0.65rem 1.65rem 0;
  font-size: 0.78rem;
  font-style: normal;
}

.screen--verify .feedback__attribution span {
  display: block;
}

.screen--verify .feedback--thanks .feedback__attribution {
  color: var(--text-muted);
}

.feedback__attribution {
  margin-top: 0.85rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* One shared wrapper keeps the takeaways and QR together without nested cards. */
.explore-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.learn-more__topics {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1.4;
}

/* Each line is one takeaway sentence that opens with its phase word; an arrow
   marker points the reader through the steps instead of a neutral dot. */
.learn-more__topics li {
  position: relative;
  margin: 0;
  padding-left: 1.5em;
}

.learn-more__topics li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* The phase words carry the strongest text colour; the arrows stay in the
   softer accent so they read as wayfinding rather than emphasis. */
.learn-more__topics strong {
  color: var(--text);
}

.qr-panel__code {
  display: block;
  width: min(20vw, 240px, max(160px, calc(100dvh - 500px)));
  max-width: 100%;
  height: auto;
  background: var(--white);
}

.learn-more__resource {
  margin: 0;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------- browser preview */

.report-recording {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.report-recording__replay {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  flex: none;
  padding-block: 0;
  border-color: var(--brand-purple);
  border-radius: var(--radius-sm);
  background: var(--brand-purple);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
}

/* The playback glyph is an SVG icon, matched to the motion toggle. */
.report-recording__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.report-recording__replay:hover {
  border-color: var(--brand-purple);
  background: var(--action-hover);
  color: var(--white);
  filter: brightness(1.08);
}

.report-recording__captions {
  display: grid;
  grid-column: 1;
  grid-row: 2;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  min-width: 0;
}

.report-recording__context-label {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.report-recording__caption-lines {
  display: grid;
  min-width: 0;
}

.report-recording__controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.report-recording:not([data-playback="playing"]) * {
  animation-play-state: paused !important;
}

.report-recording[data-playback="finished"] * {
  animation: none !important;
}

.report-recording__progress {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  /* Track stays a neutral surface so the accent fill is clearly readable at
     every point of the animation. */
  background: var(--surface-3);
}

.report-recording__progress-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: recording-progress 8s linear var(--demo-animation-delay) both;
}

.report-recording[data-playback="finished"] .report-recording__progress-fill {
  transform: scaleX(1);
  animation: none;
}

@keyframes recording-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.report-recording__caption {
  grid-area: 1 / 1;
  margin: 0;
  padding: 0.15rem 0;
  color: var(--text);
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  animation: recording-caption calc(8s / 3) linear both;
  animation-delay: calc(var(--demo-animation-delay) + var(--frame-index) * 8s / 3);
}

.report-recording__caption:last-child {
  opacity: 1;
  animation: recording-final 8s linear var(--demo-animation-delay) both;
}

.report-recording[data-playback="idle"] .report-recording__caption {
  opacity: 0;
  animation: none;
}

.report-recording[data-playback="idle"] .report-recording__caption:first-child {
  opacity: 1;
}

.report-recording .preview--keyboard-access:not(.preview--fixed) .preview__target {
  animation: target-pulse 2s ease-out calc(var(--demo-animation-delay) + 4s) both;
}

.report-recording .preview__button {
  animation: recording-submit 8s linear var(--demo-animation-delay) both;
}

.report-recording .preview__error {
  animation: recording-result 8s linear var(--demo-animation-delay) both;
}

.preview__dialog {
  position: absolute;
  inset: 35% 8%;
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 3px solid var(--brand-purple);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: #1c1a24;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  animation: recording-dialog 8s linear var(--demo-animation-delay) both;
}

@keyframes recording-submit {
  0%, 12%, 28%, 100% {
    background: #413d4c;
    transform: translateY(0) scale(1);
  }
  18%, 24% {
    background: var(--brand-purple);
    transform: translateY(2px) scale(0.9);
  }
}

@keyframes recording-result {
  0%, 32% { opacity: 0; }
  33%, 100% { opacity: 1; }
}

@keyframes recording-dialog {
  0%, 33%, 67%, 100% { opacity: 0; }
  34%, 66% { opacity: 1; }
}

@keyframes recording-caption {
  0%, 100% { opacity: 0; }
  0.01%, 99.99% { opacity: 1; }
}

@keyframes recording-final {
  0%, 66.65% { opacity: 0; }
  66.66%, 100% { opacity: 1; }
}

.preview-wrap {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.preview {
  position: relative;
  flex: 1;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #f1f0f5;
  color: #1c1a24;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.preview__chrome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: #e2e0e9;
  border-bottom: 1px solid #cbc8d4;
}

.preview__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #8b8697;
}

.preview__url {
  flex: 1;
  min-width: 0;
  margin-left: 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #fbfafd;
  color: #565064;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.preview__site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.9rem;
  background: var(--white);
  border-bottom: 1px solid #dcd9e3;
  color: #565064;
  font-size: 0.82rem;
}

.preview__site-header strong {
  margin-right: auto;
  color: #1c1a24;
  font-size: 0.95rem;
}

.preview__content {
  display: grid;
  gap: 0.9rem;
  padding: 0.9rem;
}

.preview__form {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  min-height: 196px;
  padding: 0.9rem;
  border-radius: 12px;
  background: var(--white);
}

.preview__heading {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.preview__field {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.preview__label {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.preview__input {
  padding: 0.5rem 0.7rem;
  border: 2px solid #726d7e;
  border-radius: 8px;
  background: var(--white);
}

.preview__error {
  font-size: 0.9rem;
  font-weight: 600;
  color: #8a1c14;
}

.preview__button {
  justify-self: start;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 7px;
  background: #413d4c;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.preview__target {
  padding: 0.45rem;
  border: 2px dashed #b3261e;
  border-radius: 6px;
  transition: border-color 0.3s var(--ease);
}

.preview--fixed .preview__target {
  border-color: #1a7f37;
  border-style: solid;
}

/* Only the illustrated failure uses low contrast, never the kiosk's guidance. */
.preview--color-contrast:not(.preview--fixed) .preview__error {
  color: #f2b8b5;
  font-weight: 400;
}

.preview--color-contrast .preview__input {
  border-color: #97929f;
}

.preview--color-contrast.preview--fixed .preview__error {
  border: 0;
  background: var(--warning-bg);
  color: var(--warning-text);
}

.preview__error-icon {
  color: #b3261e;
}

.preview--image-alt .preview__plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.preview__plan-icon {
  display: block;
  min-width: 0;
  width: 100%;
  padding: 0.65rem;
  border-radius: 8px;
  background: var(--white);
}

.preview--keyboard-access .preview__story-control {
  margin: 0;
  color: var(--brand-purple);
  text-decoration: underline;
}

.preview--keyboard-access .preview__story-control--fixed {
  background: #1a7f37;
  color: var(--white);
  outline: 3px solid var(--brand-purple);
  outline-offset: 3px;
  text-decoration: none;
}

.preview__next-control {
  margin: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid #7b7687;
  border-radius: 6px;
  color: #1c1a24;
  font-size: 0.8rem;
}

.preview__next-control--focused {
  outline: 3px solid var(--brand-purple);
  outline-offset: 2px;
}

.report-recording .preview__tab-stop {
  outline: 3px solid transparent;
  outline-offset: 2px;
  animation: keyboard-focus calc(8s / 3) linear both;
  animation-delay: calc(var(--demo-animation-delay) + var(--focus-index) * 8s / 3);
}

.report-recording .preview__tab-stop--last {
  outline-color: var(--brand-purple);
  animation: keyboard-focus-final 8s linear var(--demo-animation-delay) both;
}

@keyframes keyboard-focus {
  0%, 100% { outline-color: transparent; }
  0.01%, 99.99% { outline-color: var(--brand-purple); }
}

@keyframes keyboard-focus-final {
  0%, 66.65% { outline-color: transparent; }
  66.66%, 100% { outline-color: var(--brand-purple); }
}

.preview__key-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
}

.preview__key-path kbd {
  padding: 0.15rem 0.45rem;
  border: 1px solid #7b7687;
  border-bottom-width: 3px;
  border-radius: 4px;
}

.preview__caption {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-top: 0.55rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.preview__caption-label {
  flex: none;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preview__caption-label--before {
  background: var(--danger);
  color: var(--danger-strong);
}

.preview__caption-label--after {
  background: var(--success);
  color: var(--success-strong);
}

/* Keep the person and the fixed experience together on the final screen. */
.screen--verify {
  gap: 0.7rem;
}

/* Keep the paired content compact instead of stretching short blocks to fill
   the remaining screen height. */
.screen--find .fix-layout,
.screen--fix .fix-layout {
  min-height: 0;
  padding: 1.5rem;
  overflow: hidden;
}

.final-visual {
  display: grid;
  align-self: center;
  min-width: 0;
}

.final-visual .workspace__title {
  margin: 0 0 0.65rem;
}

/* Side by side, the two states drop the browser frame and the site name: the
   comparison is about the element that changed, and the height they save keeps
   the barrier and its resolution fully visible. */
.comparison .preview__chrome,
.comparison .preview__site-header {
  display: none;
}

.comparison .preview__content {
  padding: 0.6rem;
}

.comparison .preview__form {
  gap: 0.4rem;
  min-height: 0;
  padding: 0.6rem;
}

/* The pricing icons are context for the images, so they stay small here. */
.comparison .preview__plan-icon {
  padding: 0.4rem 0.3rem;
  font-size: 0.72rem;
}

/* The account button is not part of the error state being compared, and the
   simulation label is already carried by the before/after captions. */
.comparison .preview__button,
.comparison .preview__sim-label {
  display: none;
}

.comparison .preview__next-control {
  padding: 0.3rem 0.5rem;
}

.comparison .preview {
  flex: none;
  min-height: 240px;
}

.comparison .preview__heading {
  margin-bottom: 0.35rem;
  font-size: 0.98rem;
}

.comparison .preview__caption {
  margin-top: 0.45rem;
  font-size: 0.82rem;
}

/* Side by side, a coloured edge tells the two states apart at a glance. */
.comparison .preview {
  border-top: 4px solid var(--danger);
}

.comparison .preview--fixed {
  border-top-color: var(--success);
}

/* ------------------------------------------------------- inline detail */

.detail-block {
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.detail-block > :last-child {
  margin-bottom: 0;
}

.detail-block.detail-block--plain {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* The label sits on the page surface above the code, so the black block holds
   only the code itself and the heading reads as a normal section label. */
.code-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
  gap: 0.3rem;
  min-height: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.code-panel .prompt__eyebrow {
  margin: 0;
  padding: 0;
  color: var(--text-muted);
}

.source-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.source-panel .diff-wrap {
  min-height: 0;
}

.source-panel .scan-code {
  height: 100%;
  min-height: 0;
}

.scan-code__line--flagged {
  background: #641c25;
  color: var(--white);
  font-weight: 700;
}

.fix-final {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--success);
  border-radius: var(--radius-sm);
  background: var(--surface);
  animation: rise-in 0.55s var(--ease) calc(1.05s + var(--diff-lines) * var(--diff-line-delay)) both;
}

.fix-final p {
  margin: 0;
}

.fix-final p + p {
  font-size: 0.95rem;
}

.fix-final p + p + p {
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.fix-explanation {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.report__meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.report__meta dt {
  color: var(--text);
  font-weight: 700;
}

.report__meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* ----------------------------------------------------------------- footer */

.noscript-note {
  max-width: 60ch;
  margin: 2rem auto;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.idle-dialog {
  width: min(90%, 460px);
  padding: 1.5rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lift);
}

.idle-dialog::backdrop {
  background: rgb(0 0 0 / 0.72);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------- operator guide */

.guide {
  width: min(100% - 2rem, 960px);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 0;
}

.guide__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.guide__title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
}

.guide__lede {
  max-width: 65ch;
  color: var(--text-muted);
  font-size: 1.15rem;
}

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

.guide__card {
  padding: 1.25rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.guide__card--wide {
  grid-column: 1 / -1;
}

.guide__card h2 {
  margin-top: 0;
}

.guide__card ol,
.guide__card ul {
  padding-left: 1.3rem;
}

.guide__card li + li {
  margin-top: 0.6rem;
}

.badge {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cheat-sheet {
  display: grid;
  gap: 0.75rem;
}

.cheat-sheet__item {
  margin: 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-2);
}

.cheat-sheet__cue {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--accent);
  font-weight: 800;
}

.guide .btn--primary {
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}

/* ------------------------------------------------------- screen-led motion */

.screen--find .preview__target {
  animation: target-pulse 1.1s ease-out var(--demo-animation-delay) 2 both;
}

.screen--fix .preview--fixed {
  animation: change-reveal 0.6s var(--ease) var(--demo-animation-delay) both;
}

.screen--verify .comparison .preview:not(.preview--fixed) {
  opacity: 0.88;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(0.65rem);
  }
}

@keyframes scan-result-in {
  from {
    visibility: hidden;
    opacity: 0;
    transform: translateY(0.65rem);
  }
  to {
    visibility: visible;
    opacity: 1;
    transform: none;
  }
}

@keyframes pill-in {
  from {
    opacity: 0.4;
    transform: scale(0.94);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
}

@keyframes spark-in {
  from {
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
  }
}

@keyframes code-type {
  from {
    opacity: 1;
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes issue-open {
  from {
    transform: translateY(0.6rem) scale(0.99);
  }
  to {
    transform: none;
  }
}

@keyframes issue-type-in {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes agent-check-in {
  70% {
    opacity: 1;
    transform: scale(1.22);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes check-burst {
  0% {
    opacity: 0;
    transform: scale(0.4);
    box-shadow: 0 0 0 0 var(--glow);
  }
  60% {
    opacity: 1;
    transform: scale(1.18);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 12px rgb(63 185 80 / 0);
  }
}

@keyframes target-pulse {
  from {
    box-shadow: 0 0 0 0 rgb(179 38 30 / 0.45);
  }
  to {
    box-shadow: 0 0 0 10px rgb(179 38 30 / 0);
  }
}

@keyframes change-reveal {
  from {
    opacity: 0;
    transform: translateY(0.5rem) scale(0.985);
  }
}

@media (prefers-reduced-motion: reduce) {
  *:not(.report-recording[data-playback="playing"] *),
  *:not(.report-recording[data-playback="playing"] *)::before,
  *:not(.report-recording[data-playback="playing"] *)::after {
    transition: none !important;
    animation: none !important;
  }

  .screen > *,
  .btn--card,
  .code-fill .diff__line,
  .screen--file .issue,
  .screen--file .issue__written,
  .fix-change,
  .scan-result,
  .agent-activity li,
  .agent-activity__icon {
    visibility: visible !important;
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
  }

  .btn:hover,
  .btn:active,
  .btn:focus-visible,
  .btn:hover .card__image,
  .btn:hover .card__arrow,
  .btn:hover .btn__icon-svg {
    transform: none !important;
  }
}

/* The in-kiosk motion toggle should work regardless of the OS-level
   prefers-reduced-motion setting, so these rules live outside that query. */
:root.motion-paused *:not(.report-recording[data-playback="playing"] *),
:root.motion-paused *:not(.report-recording[data-playback="playing"] *)::before,
:root.motion-paused *:not(.report-recording[data-playback="playing"] *)::after {
  animation: none !important;
  transition: none !important;
}

:root.motion-paused .screen > *,
:root.motion-paused .btn--card,
:root.motion-paused .code-fill .diff__line,
:root.motion-paused .screen--file .issue,
:root.motion-paused .screen--file .issue__written,
:root.motion-paused .fix-change,
:root.motion-paused .scan-result,
:root.motion-paused .agent-activity li,
:root.motion-paused .agent-activity__icon {
  visibility: visible !important;
  opacity: 1 !important;
  clip-path: none !important;
  transform: none !important;
}

/* Paused motion also covers hover and press movement: controls change colour,
   never position, so nothing moves while the toggle is off. */
:root.motion-paused .btn:hover,
:root.motion-paused .btn:active,
:root.motion-paused .btn:focus-visible,
:root.motion-paused .btn:hover .card__image,
:root.motion-paused .btn:hover .card__arrow,
:root.motion-paused .btn:hover .btn__icon-svg {
  transform: none !important;
}

/* ------------------------------------------------------------- responsive */

/* Short kiosk displays: tighten the rhythm so no screen ever scrolls. */
@media (max-height: 960px) {
  .kiosk {
    gap: 0.85rem;
    padding: 0.85rem 0 0.75rem;
  }

  /* Every step now carries its own highlighted block, so the rhythm around the
     title and between blocks tightens to keep the step on one screen. */
  .screen {
    gap: 0.8rem;
  }

  .screen__subtitle {
    margin-bottom: 0.55rem;
  }

  .screen__title {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
  }

  .card__image,
  .persona-image {
    width: 58px;
    height: 58px;
  }

  /* Short displays still lead with the person on the picker screen. */
  .card__image {
    width: 84px;
    height: 84px;
  }

  .preview__form {
    min-height: 150px;
  }

  .copilot-summary {
    gap: 1.1rem;
  }

  .fix-layout {
    gap: 0.75rem 1.1rem;
    padding: 0.8rem;
  }

  .screen--fix {
    gap: 0.65rem;
  }

  .workspace__title {
    margin-top: 0.5rem;
  }

  .copilot-brand {
    padding-bottom: 0.8rem;
    margin-bottom: 0.1rem;
  }

  .detail-block {
    padding: 0.45rem 0.65rem;
  }

  .agent-activity ol {
    gap: 0.4rem;
  }

  .comparison .preview__form {
    min-height: 84px;
  }

  /* The verified screen still has to fit the quote, the rescan and both
     previews above the fold, with nothing clipped inside either preview. */
  .comparison .preview {
    min-height: 220px;
  }

  .screen--verify {
    gap: 0.75rem;
  }

  .final-layout {
    gap: 1rem 1.5rem;
  }

  .feedback__attribution {
    margin-top: 0.2rem;
  }

  .checks__item {
    padding: 0.22rem 0;
  }

  /* The filed issue keeps the person's own words, so the chrome around them
     tightens instead. */
  .issue__header {
    padding: 0.7rem 1.15rem;
  }

  .issue__layout {
    gap: 1rem;
    padding: 0.85rem 1.15rem;
  }

  .issue__main {
    gap: 0.6rem;
  }

  /* Bug report and Find each carry one context panel, so the panels tighten a
     little rather than pushing the step off screen. */
  .screen--report .report-panel {
    gap: 0.85rem;
    padding: 0.85rem 0.95rem;
  }

  .step-task .prompt__text {
    font-size: 1.05rem;
  }

  .screen--report,
  .screen--find {
    gap: 0.9rem;
  }

  .fix-final {
    padding: 0.6rem 0.8rem;
  }

  .learn-more__topics {
    gap: 0.85rem;
    font-size: 1.2rem;
  }

  .feedback__image {
    width: 48px;
    height: 48px;
  }

  .btn {
    min-height: 46px;
  }
}

@media (max-width: 900px) {
  .progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .cards,
  .flow-layout,
  .fix-layout,
  .comparison,
  .final-layout,
  .completion-flow,
  .completion-panel__checks .checks,
  .issue__story,
  .issue__layout,
  .explore-layout {
    grid-template-columns: 1fr;
  }

  .completion-flow__item + .completion-flow__item::before {
    content: "↓";
    left: 0.4rem;
    top: -1.3rem;
  }

  .qr-panel__code {
    width: min(100%, 280px);
    justify-self: center;
  }
}

@media (max-width: 620px) {
  .kiosk {
    width: calc(100% - 2rem);
  }

  .guide__grid {
    grid-template-columns: 1fr;
  }

  .preview__plans {
    grid-template-columns: 1fr;
  }

  .issue__header,
  .feedback {
    flex-direction: column;
    align-items: flex-start;
  }
}
