:root {
  --bg: #0d1514;
  --rail: #09100f;
  --surface: #131e1c;
  --surface-raised: #182522;
  --surface-soft: #101a18;
  --text: #f4efe7;
  --muted: #9daaa5;
  --line: #2b3a36;
  --line-strong: #40514c;
  --accent: #f2bd69;
  --accent-soft: rgba(242, 189, 105, 0.12);
  --attention: #f2bd69;
  --success: #82cbb7;
  --danger: #ef8d84;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 78% -15%, rgba(101, 160, 145, 0.08), transparent 36rem),
    var(--bg);
}

.mode-artist {
  --accent: #91d1bf;
  --accent-soft: rgba(145, 209, 191, 0.12);
}

.mode-technical-artist {
  --accent: #91bde5;
  --accent-soft: rgba(145, 189, 229, 0.12);
}

.mode-advanced {
  --accent: #c0a5ef;
  --accent-soft: rgba(192, 165, 239, 0.12);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  --rail-width: clamp(248px, 22vw, 320px);
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

/* Persistent two-cell navigation column */

.mode-rail {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 100svh;
  min-height: 560px;
  flex-direction: column;
  width: var(--rail-width);
  border-right: 1px solid var(--line);
  background: rgba(9, 16, 15, 0.97);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.rail-collapse-toggle {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -14px;
  display: grid;
  width: 28px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transform: translateY(-50%);
}

.rail-collapse-toggle:hover,
.rail-collapse-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.rail-collapse-toggle svg,
.rail-touch-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.rail-show-icon {
  display: none;
}

.rail-edge-reveal {
  position: fixed;
  z-index: 45;
  top: 0;
  left: 0;
  display: none;
  width: 20px;
  height: 100svh;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: e-resize;
}

.rail-edge-indicator {
  position: absolute;
  top: 50%;
  left: 5px;
  display: flex;
  gap: 3px;
  transform: translateY(-50%);
}

.rail-edge-indicator i {
  width: 1px;
  height: 42px;
  background: currentColor;
  transition: height 140ms ease, background 140ms ease;
}

.rail-edge-reveal:hover .rail-edge-indicator i,
.rail-edge-reveal:focus-visible .rail-edge-indicator i {
  height: 60px;
  background: var(--accent);
}

.rail-touch-arrow {
  display: none;
}

.app-shell.nav-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.app-shell.nav-collapsed .mode-rail {
  position: fixed;
  top: 0;
  left: 0;
  transform: translateX(calc(-100% - 18px));
}

.app-shell.nav-collapsed .rail-edge-reveal {
  display: block;
}

.app-shell.nav-collapsed.nav-peeking .mode-rail {
  box-shadow: 18px 0 54px rgba(0, 0, 0, 0.42);
  transform: translateX(0);
}

.app-shell.nav-collapsed.nav-peeking .rail-hide-icon {
  display: none;
}

.app-shell.nav-collapsed.nav-peeking .rail-show-icon {
  display: block;
}

.app-shell.nav-collapsed.nav-peeking .rail-edge-reveal {
  opacity: 0;
  pointer-events: none;
}

@media (hover: none), (pointer: coarse) {
  .rail-edge-reveal {
    top: 50%;
    width: 42px;
    height: 72px;
    border: 1px solid var(--line-strong);
    border-left: 0;
    border-radius: 0 18px 18px 0;
    color: var(--accent);
    background: var(--surface);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transform: translateY(-50%);
  }

  .rail-edge-indicator {
    display: none;
  }

  .rail-touch-arrow {
    display: block;
    margin: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell,
  .mode-rail,
  .rail-edge-indicator i {
    transition: none;
  }
}

.shepherd-sprite {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  flex: 0 0 auto;
  background-image: url("/static/asset-shepherd-thinking.png");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 200% 200%;
  image-rendering: pixelated;
}

.shepherd-sprite-thinking {
  animation: shepherd-thinking 880ms step-end infinite;
}

@keyframes shepherd-thinking {
  0%, 24.99% { background-position: 0 0; }
  25%, 49.99% { background-position: 100% 0; }
  50%, 74.99% { background-position: 0 100%; }
  75%, 100% { background-position: 100% 100%; }
}

.mode-nav {
  display: flex;
  width: 100%;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: clamp(18px, 2vw, 28px);
}

.rail-group-label {
  width: 100%;
  margin: 0 0 4px;
  color: #71807b;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.style-tiles {
  display: grid;
  gap: 10px;
}

.rail-spacer {
  flex: 1;
  min-height: 18px;
}

.rail-divider {
  width: 100%;
  height: 1px;
  margin: 0 0 4px;
  background: var(--line);
}

.utility-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mode-link {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 80px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #84918d;
  background: rgba(19, 30, 28, 0.55);
  text-decoration: none;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.mode-link svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.mode-label {
  min-width: 0;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
}

.style-tile {
  min-height: 116px;
  grid-template-columns: 52px minmax(0, 1fr);
  justify-items: start;
  padding: 20px 22px;
}

.style-tile svg {
  width: 36px;
  height: 36px;
}

.utility-tile {
  min-height: 96px;
  grid-template-rows: 32px auto;
  gap: 10px;
  padding: 14px 10px;
  text-align: center;
}

.rail-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.intent-rail .rail-actions .utility-tile {
  margin-top: 0;
}

.help-icon {
  color: currentColor;
  font-size: 2.55rem;
  font-weight: 480;
  line-height: 0.8;
}

.mode-link:hover,
.mode-link:focus-visible,
.mode-link.active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-soft);
  outline: none;
}

.mode-link:hover,
.mode-link:focus-visible {
  transform: translateX(2px);
}

.mode-link.active::before {
  position: absolute;
  left: -1px;
  width: 4px;
  height: 42px;
  border-radius: 0 5px 5px 0;
  background: var(--accent);
  content: "";
}

.mode-hint {
  position: absolute;
  z-index: 50;
  left: calc(100% + 14px);
  top: 50%;
  width: max-content;
  max-width: 250px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: #16221f;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-5px, -50%);
  transition: opacity 120ms ease, transform 120ms ease;
}

.mode-link:hover .mode-hint,
.mode-link:focus-visible .mode-hint {
  opacity: 1;
  transform: translate(0, -50%);
}

/* Workspace shell */

.workspace-shell {
  display: grid;
  min-width: 0;
  grid-column: 2;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 96px minmax(0, 1fr);
}

.workspace-header {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(24px, 3.2vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(13, 21, 20, 0.82);
  backdrop-filter: blur(14px);
}

.workspace-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.workspace-logo {
  display: block;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  text-decoration: none;
}

.workspace-header h1 {
  margin: 0;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 650;
  letter-spacing: -0.025em;
}

.workspace-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workspace-body {
  width: 100%;
  padding: clamp(24px, 3vw, 48px) clamp(24px, 3.2vw, 52px) 64px;
}

.section-label {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.alert {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.82rem;
}

.alert.danger {
  border-color: rgba(239, 141, 132, 0.5);
  color: var(--danger);
  background: rgba(239, 141, 132, 0.08);
}

.alert span {
  color: var(--muted);
}

.intake-refusal {
  margin-top: 24px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
}

/* Help-me-choose workspace */

.chooser-panel {
  width: min(1160px, 100%);
  margin: clamp(28px, 6vh, 72px) auto 0;
}

.chooser-panel h2 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(3.4rem, 7vw, 7rem);
  font-weight: 520;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.style-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(34px, 6vh, 70px);
}

.style-choices a {
  display: grid;
  min-height: clamp(180px, 24vh, 260px);
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 22px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(19, 30, 28, 0.55);
  text-decoration: none;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.style-choices a:hover,
.style-choices a:focus-visible {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--accent-soft);
  outline: none;
  transform: translateY(-4px);
}

.style-choices a b {
  font-size: 1.5rem;
}

.style-choices strong {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.15;
}

.choice-icon {
  grid-column: 1 / -1;
  align-self: start;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9rem;
}

/* Intent-first entry and agreement */

.intent-rail ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-primary {
  display: grid;
  gap: 8px;
}

.rail-primary-option {
  display: grid;
  min-height: 58px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 0 10px 10px 0;
  color: #87948f;
  text-decoration: none;
}

.rail-primary-option svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

a.rail-primary-option:hover,
a.rail-primary-option:focus-visible,
.rail-primary-option.active {
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
  border-left-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
  outline: none;
}

.rail-primary-option[aria-disabled="true"] {
  color: #687570;
}

.rail-workflow .hosted-flow {
  gap: 3px;
  margin: 5px 0 0 20px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.rail-workflow .hosted-flow li {
  min-height: 44px;
  padding-block: 7px;
}

.rail-workflow .hosted-flow .refine-step {
  grid-template-rows: auto auto;
}

.rail-workflow .refine-iterations {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
  margin: 6px 0 0 15px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.rail-workflow .refine-iterations li {
  min-height: 36px;
  padding: 5px 8px;
}

.rail-workflow .refine-iterations li span {
  width: auto;
  min-width: 38px;
  border: 0;
  border-radius: 0;
  font-size: 0.82rem;
}

.intent-rail li {
  display: grid;
  min-height: 54px;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  color: #6f7d78;
}

.intent-rail li span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 0.72rem;
}

.intent-rail li.active {
  border-left-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}

.flow-step-link {
  display: contents;
  color: inherit;
  text-decoration: none;
}

.intent-rail li:focus-within {
  color: var(--text);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* How it works */

.how-page {
  width: min(1180px, 100%);
  margin: clamp(20px, 4vh, 52px) auto 0;
}

.how-hero {
  max-width: 1040px;
}

.how-hero h2 {
  max-width: 1000px;
  margin: 0;
  font-size: clamp(3.4rem, 6.8vw, 7rem);
  font-weight: 520;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.how-hero > p:last-child {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);
  line-height: 1.55;
}

.how-flow {
  display: grid;
  margin: clamp(42px, 7vh, 78px) 0 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
  list-style: none;
}

.how-flow li {
  display: grid;
  min-height: 132px;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  padding: 24px 4px;
  border-bottom: 1px solid var(--line);
}

.how-flow li > span {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.how-flow strong {
  display: block;
  color: var(--text);
  font-size: clamp(1.45rem, 2.3vw, 2.2rem);
  font-weight: 580;
  letter-spacing: -0.03em;
}

.how-flow p {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.25vw, 1.12rem);
  line-height: 1.5;
}

.how-finish {
  display: flex;
  justify-content: flex-end;
  padding: clamp(38px, 6vh, 68px) 0 12px;
}

.how-cta {
  min-width: 220px;
  text-decoration: none;
}

.faq-list {
  display: grid;
  margin-top: clamp(36px, 6vh, 64px);
  border-top: 1px solid var(--line-strong);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: grid;
  min-height: 88px;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 24px;
  padding: 20px 4px;
  color: var(--text);
  font-size: clamp(1.1rem, 1.65vw, 1.45rem);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  content: "+";
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list summary:hover,
.faq-list summary:focus-visible {
  color: var(--accent);
  outline: none;
}

.faq-answer {
  max-width: 880px;
  padding: 0 52px 24px 4px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.faq-answer p {
  margin: 0;
}

.faq-answer p + p {
  margin-top: 12px;
}

.faq-answer code,
.faq-answer kbd {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}

.faq-answer kbd {
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
}

.intent-stage {
  width: 100%;
  margin: clamp(16px, 3vh, 40px) 0 0;
}

.intent-stage .intent-heading {
  max-width: none;
}

.intent-stage .intent-heading h2 {
  max-width: none;
  font-size: clamp(1.75rem, 2.4vw, 2.5rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.intent-heading {
  max-width: 800px;
}

.intent-heading h2 {
  margin: 0;
  font-size: clamp(2.8rem, 6.5vw, 6.2rem);
  font-weight: 520;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.intent-heading > p:last-child {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.55;
}

.intent-form {
  display: grid;
  gap: 22px;
  margin-top: 34px;
}

.intent-form label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.intent-form textarea,
.intent-form input,
.intent-form select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  outline: none;
}

.intent-form textarea {
  min-height: 160px;
  padding: 20px;
  resize: vertical;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

.intent-form input,
.intent-form select {
  min-height: 54px;
  padding: 0 14px;
}

.intent-form textarea:focus,
.intent-form input:focus,
.intent-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.intent-targets {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
}

.number-with-unit {
  position: relative;
  display: block;
}

.number-with-unit input {
  padding-right: 44px;
}

.number-with-unit b {
  position: absolute;
  top: 50%;
  right: 15px;
  color: var(--muted);
  transform: translateY(-50%);
}

.intent-confirmation .fine-print {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.intent-form > .primary-button {
  justify-self: end;
}

.clarification-form {
  grid-template-columns: minmax(0, 1fr);
}

.clarification-form .intent-confirm-actions {
  grid-column: 1 / -1;
}

.intent-confirmation blockquote {
  margin: 34px 0 24px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 18px;
  color: var(--text);
  background: var(--accent-soft);
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
  font-weight: 520;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.intent-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.intent-facts div {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(19, 30, 28, 0.55);
}

.intent-facts dt {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.intent-facts dd {
  margin: 0;
  line-height: 1.35;
}

.intent-scope-note {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 16px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: var(--surface-soft);
}

.intent-scope-note strong {
  color: var(--text);
}

.intent-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

.proposal-decision-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(30px, 5vh, 54px);
}

.proposal-decision-row form {
  justify-self: end;
}

.proposal-evidence {
  max-width: 760px;
  color: var(--muted);
}

.proposal-evidence summary {
  width: fit-content;
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
}

.proposal-evidence dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.proposal-evidence dl div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
}

.proposal-evidence dt {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.proposal-evidence dd,
.proposal-evidence p {
  margin: 0;
  line-height: 1.5;
}

.proposal-evidence p {
  margin-top: 14px;
  font-size: 0.82rem;
}

.intent-adjust {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.intent-adjust summary {
  width: fit-content;
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
}

.intent-adjust .intent-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.intent-adjust .secondary-button,
.intent-adjust .back-link {
  grid-column: 1 / -1;
  justify-self: start;
}

.intent-adjust .intent-form > label,
.intent-adjust .intent-form > p {
  grid-column: 1 / -1;
}

.intent-adjust .intent-form > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.confirmation-question {
  display: grid;
  gap: 16px;
  margin-top: clamp(26px, 4vh, 42px);
}

.confirmation-question .decision-question {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.confirmation-actions .intent-adjust {
  margin: 0;
  padding: 0;
  border: 0;
}

.confirmation-actions .intent-adjust > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  list-style: none;
}

.confirmation-actions .intent-adjust > summary::-webkit-details-marker {
  display: none;
}

.confirmation-actions .intent-adjust[open] {
  flex: 0 0 100%;
}

.confirmation-actions .intent-adjust[open] > summary {
  border-color: var(--accent);
}

.confirmation-actions .intent-adjust .intent-form {
  width: 100%;
}

.feedback-link {
  width: fit-content;
  color: var(--muted);
  font-size: 0.86rem;
}

.feedback-page {
  display: grid;
  width: min(900px, 100%);
  gap: clamp(24px, 4vh, 38px);
  margin: clamp(24px, 5vh, 64px) auto 0;
}

.feedback-page > header {
  display: grid;
  gap: 10px;
}

.feedback-page h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 520;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.feedback-page > header p {
  margin: 0;
  color: var(--muted);
}

.feedback-form {
  display: grid;
  gap: 28px;
}

.feedback-form fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.feedback-form legend,
.feedback-note > span {
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 750;
}

.feedback-reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.feedback-reasons label {
  display: flex;
  min-height: 54px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
  cursor: pointer;
}

.feedback-reasons input {
  accent-color: var(--accent);
}

.feedback-note {
  display: grid;
}

.feedback-note textarea {
  width: 100%;
  min-height: 160px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  resize: vertical;
}

.feedback-form > .primary-button {
  justify-self: end;
}

.expectation-sheet {
  margin-top: clamp(22px, 3vh, 32px);
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.expectation-sheet.compact {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.expectation-groups {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.expectation-group {
  background: var(--surface);
}

.expectation-group > summary {
  display: grid;
  grid-template-columns: minmax(130px, 0.24fr) minmax(0, 1fr) auto;
  gap: 14px 22px;
  align-items: center;
  padding: 20px;
  list-style: none;
  cursor: pointer;
}

.expectation-group > summary::-webkit-details-marker {
  display: none;
}

.expectation-group > summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.15rem;
}

.expectation-group[open] > summary::after {
  content: "−";
}

.expectation-group > summary span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.expectation-group > summary strong {
  font-size: 1rem;
  line-height: 1.4;
}

.expectation-group-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.expectation-group-items article {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 18px 20px;
  background: var(--surface-soft);
}

.expectation-group-items small {
  color: var(--accent);
  font-size: 0.72rem;
}

.expectation-group-items strong {
  font-size: 0.98rem;
  line-height: 1.4;
}

.expectation-group-items p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.universal-expectations {
  margin-top: 18px;
  color: var(--muted);
}

.universal-expectations summary {
  width: fit-content;
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
}

.universal-expectations dl {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.universal-expectations dl div {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(0, 1fr);
  gap: 18px;
}

.universal-expectations dt {
  color: var(--text);
  font-weight: 700;
}

.universal-expectations dd {
  margin: 0;
  line-height: 1.5;
}

.intent-confirmation > .fine-print {
  margin-top: 18px;
  padding: 0;
}

/* Shared single-step workflow */

.intake-workspace,
.job-workspace {
  width: min(1280px, 100%);
  margin-inline: auto;
}

.intake-workspace > *,
.job-workspace > * {
  width: 100%;
  min-width: 0;
}

.job-context {
  display: flex;
  min-height: 58px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}

.mode-context {
  max-width: 980px;
  margin-bottom: 28px;
}

.mode-question {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  font-weight: 560;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.intake-target-line {
  margin: 14px 0 0;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 720;
}

.intake-intent-summary {
  width: min(760px, 100%);
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.intake-intent-summary summary {
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.intake-intent-summary p {
  margin: 10px 0 0;
  line-height: 1.55;
}

.intake-form,
.job-workspace {
  display: grid;
  gap: 20px;
}

.workflow-nav {
  display: grid;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(19, 30, 28, 0.66);
}

.intake-workflow-nav {
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
}

.job-workflow-nav {
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr);
}

.workflow-nav button,
.workflow-nav a {
  display: grid;
  min-height: 55px;
  grid-template-columns: 29px auto;
  grid-template-rows: 1fr;
  align-content: center;
  justify-content: center;
  column-gap: 10px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  min-width: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.workflow-nav button > span,
.workflow-nav a > span {
  display: grid;
  width: 29px;
  height: 29px;
  grid-row: auto;
  place-items: center;
  align-self: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 750;
}

.workflow-nav strong {
  align-self: center;
  color: inherit;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.workflow-nav small {
  color: #77837f;
  font-size: 0.66rem;
  text-transform: capitalize;
}

.workflow-nav > i {
  width: 100%;
  height: 1px;
  background: var(--line-strong);
}

.workflow-nav button:hover,
.workflow-nav button:focus-visible,
.workflow-nav a:hover,
.workflow-nav a:focus-visible,
.workflow-nav [aria-current="step"] {
  color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.workflow-nav a.complete > span {
  color: var(--bg);
  border-color: var(--success);
  background: var(--success);
}

.workflow-nav a.attention > span {
  color: var(--bg);
  border-color: var(--accent);
  background: var(--accent);
}

.workflow-panel,
.intake-panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(24, 37, 34, 0.96), rgba(16, 26, 24, 0.96));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.14);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.panel-heading h2,
.approval-copy h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.panel-heading > p {
  max-width: 360px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: right;
}

/* Rules */

.profile-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-option-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(10, 17, 16, 0.36);
}

.profile-option-shell:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.policy-proposal-card {
  max-width: 900px;
  margin-inline: auto;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.policy-proposal-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
}

.policy-proposal-heading > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--surface);
  background: var(--accent);
}

.policy-proposal-heading > div {
  display: grid;
  gap: 4px;
}

.policy-proposal-heading strong {
  font-size: 1.18rem;
}

.policy-proposal-heading small,
.policy-reasons dt small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.policy-reasons .policy-rule-list div {
  grid-template-columns: minmax(150px, 0.4fr) minmax(0, 1fr);
}

.profile-option {
  display: flex;
  min-height: 108px;
  align-items: center;
  gap: 13px;
  padding: 20px;
  cursor: pointer;
}

.profile-option input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
}

.profile-option > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.profile-option strong {
  font-size: 1.12rem;
}

.profile-option small,
.custom-policy small,
.fine-print {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.policy-summary,
.policy-rule-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}

.policy-summary div,
.policy-rule-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
}

.policy-summary dt,
.policy-rule-list dt {
  color: #7f8c87;
  font-size: 0.76rem;
  font-weight: 650;
}

.policy-summary dd,
.policy-rule-list dd {
  margin: 0;
  color: #cbd3d0;
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.policy-review,
.custom-policy,
.technical-details,
.approval-evidence {
  border-top: 1px solid var(--line);
}

details summary {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  color: #d6ddda;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  color: var(--accent);
  content: "+";
  font-size: 1rem;
}

details[open] summary::after {
  content: "−";
}

.custom-policy {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(10, 17, 16, 0.3);
}

.custom-policy summary > span,
.technical-details summary > span {
  display: grid;
  gap: 2px;
}

.custom-policy-body,
.details-body {
  padding: 0 16px 16px;
}

.custom-policy-body > p {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 0.74rem;
}

.custom-policy-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.custom-policy-toggle input {
  accent-color: var(--accent);
}

.custom-policy-toggle > span {
  display: grid;
  gap: 2px;
}

.custom-policy-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.custom-policy-fields fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.custom-policy-fields legend {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 750;
}

.custom-policy-fields label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.68rem;
}

.custom-policy-fields input,
.custom-policy-fields select {
  width: min(170px, 100%);
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface-soft);
}

.custom-policy-boundary {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  background: var(--accent-soft);
  font-size: 0.7rem;
  line-height: 1.5;
}

.custom-policy-boundary strong {
  color: var(--text);
}

.step-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.step-actions.end {
  justify-content: flex-end;
}

.step-actions.split {
  justify-content: space-between;
}

.step-validation {
  margin: 0 auto 0 0;
  color: var(--danger);
  font-size: 0.74rem;
}

.primary-button,
.secondary-button,
.download-button {
  border-radius: 9px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 18px;
}

.primary-button {
  border: 1px solid var(--accent);
  color: #111714;
  background: var(--accent);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: transparent;
}

.primary-button:hover,
.primary-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent);
  outline-offset: 2px;
}

.inline-button {
  width: fit-content;
  margin-top: 6px;
}

/* Upload */

.upload-panel {
  max-width: 860px;
  margin-inline: auto;
}

.selected-policy-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.72rem;
}

.selected-policy-line strong {
  color: var(--text);
  text-align: right;
}

.drop-zone {
  display: grid;
  min-height: 230px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--accent);
  border-radius: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
  text-align: center;
}

.drop-zone:hover,
.drop-zone:focus-within,
.drop-zone.dragging {
  background: color-mix(in srgb, var(--accent-soft) 76%, var(--surface-raised));
}

.drop-zone.dragging {
  border-style: solid;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.drop-zone.invalid {
  border-color: var(--danger);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.drop-zone strong {
  max-width: 90%;
  overflow-wrap: anywhere;
}

.drop-zone span {
  color: var(--muted);
  font-size: 0.72rem;
}

.drop-zone .drop-zone-error {
  min-height: 1em;
  color: var(--danger);
}

.drop-zone .drop-zone-error:empty {
  display: none;
}

.fine-print {
  margin: 0;
  padding: 0 16px 16px;
}

.upload-notes {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

/* Job context and status */

.job-context {
  min-height: 38px;
  align-items: center;
  margin-bottom: 0;
}

.back-link {
  color: var(--muted);
  font-size: 0.74rem;
  text-underline-offset: 4px;
}

.job-context > p {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.job-context > p strong {
  max-width: 330px;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.state-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.state-pill.attention {
  color: var(--accent);
}

.state-pill.success {
  color: var(--success);
}

.state-pill.danger {
  color: var(--danger);
}

/* Inspect */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.workflow-panel.inspect-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.inspection-progress,
.inspection-summary,
.inspection-next {
  width: 100%;
}

.inspection-progress > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.inspection-progress > header h2,
.inspection-summary h3,
.inspection-next h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.inspection-progress > header span {
  color: var(--muted);
  font-size: 0.78rem;
}

.inspection-stream {
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.inspection-lane-table {
  width: 100%;
  border-spacing: 0;
  table-layout: fixed;
}

.inspection-lane-table thead th {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.inspection-lane-table thead th:first-child {
  width: 19%;
}

.inspection-lane-table thead th:nth-child(2) {
  width: 29%;
}

.inspection-lane-table thead th:nth-child(3) {
  width: 72px;
  text-align: center;
}

.inspection-check {
  position: relative;
}

.inspection-check > * {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 1.06rem;
  line-height: 1.45;
  text-align: left;
  vertical-align: middle;
}

.inspection-check.attention > * {
  background: color-mix(in srgb, var(--attention) 12%, transparent);
}

.inspection-check.attention > :first-child {
  border-left: 4px solid var(--attention);
}

.inspection-check.repaired > * {
  background: color-mix(in srgb, var(--success) 8%, transparent);
}

.inspection-check.repaired > :first-child {
  border-left: 4px solid var(--success);
}

.inspection-check.blocked > * {
  background: rgba(239, 141, 132, 0.09);
}

.inspection-check.blocked > :first-child {
  border-left: 4px solid var(--danger);
}

.inspection-check:last-child > * {
  border-bottom: 0;
}

.inspection-check strong {
  font-size: 1.08rem;
}

.inspection-finding,
.inspection-action {
  overflow-wrap: anywhere;
}

.inspection-action > span {
  display: block;
}

.inspection-proposal-response {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.inspection-proposal-response select,
.inspection-proposal-response textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
}

.inspection-proposal-response select {
  min-height: 40px;
  padding: 0 10px;
}

.inspection-proposal-response textarea {
  min-height: 86px;
  padding: 10px;
  resize: vertical;
  line-height: 1.4;
}

.component-proposals {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.component-color-0 {
  --component-color: #83d6ca;
  --component-label-color: #b3f1e8;
}

.component-color-1 {
  --component-color: #f3c766;
  --component-label-color: #ffe39a;
}

.component-color-2 {
  --component-color: #e89bdd;
  --component-label-color: #ffc4f5;
}

.component-color-3 {
  --component-color: #8fb8ff;
  --component-label-color: #bdd4ff;
}

.component-color-4 {
  --component-color: #acd477;
  --component-label-color: #d0efa8;
}

.component-color-5 {
  --component-color: #f29b70;
  --component-label-color: #ffc4a7;
}

.component-proposal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.34fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--component-color, var(--line)) 58%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--component-color, var(--surface)) 4%, var(--surface));
  box-shadow: inset 3px 0 0 var(--component-color, var(--line-strong));
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.component-proposal.active {
  border-color: var(--component-color, var(--line-strong));
  background: color-mix(in srgb, var(--component-color, var(--surface)) 11%, var(--surface));
  box-shadow: inset 4px 0 0 var(--component-color, var(--line-strong));
}

.component-focus {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: crosshair;
  text-align: left;
}

.component-focus strong {
  flex: 0 0 auto;
  color: var(--component-label-color, var(--attention));
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.94rem;
}

.component-focus span {
  min-width: 0;
  color: var(--muted);
}

.component-focus:hover span,
.component-focus:focus-visible span {
  color: var(--text);
}

.component-focus:focus-visible {
  outline: 2px solid var(--component-color, var(--attention));
  outline-offset: 4px;
}

.component-disposition {
  color: var(--success);
  font-weight: 800;
  text-align: right;
}

.inspection-status {
  text-align: center;
}

.inspection-check-icon {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 850;
}

.inspection-check-icon::after {
  position: absolute;
  display: none;
  z-index: 80;
  box-sizing: border-box;
  top: 50%;
  left: calc(100% + 12px);
  width: max-content;
  max-width: min(420px, 65vw);
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  background: #1a2623;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
  content: attr(data-tooltip);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-4px, -50%);
  transition: opacity 120ms ease, transform 120ms ease;
}

.inspection-check-icon:hover::after,
.inspection-check-icon:focus-visible::after {
  display: block;
  opacity: 1;
  transform: translate(0, -50%);
}

.inspection-check-icon:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.inspection-check.pass .inspection-check-icon {
  color: var(--success);
}

.inspection-check.repaired .inspection-check-icon {
  width: 48px;
  color: var(--success);
  border-radius: 999px;
}

.inspection-check.attention .inspection-check-icon {
  color: var(--attention);
}

.inspection-check.blocked .inspection-check-icon {
  color: var(--danger);
}

.inspection-check.replaying {
  color: var(--muted);
}

.inspection-check.replaying .inspection-finding,
.inspection-check.replaying .inspection-action {
  opacity: 0;
}

.inspection-check.replaying .inspection-check-icon {
  border-style: dashed;
}

.inspection-details {
  margin-top: 8px;
}

.inspection-details > summary {
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
}

.inspection-details-body {
  display: grid;
  grid-template-columns: minmax(240px, 0.35fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.inspection-details model-viewer {
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1211;
}

.inspection-table-wrap {
  overflow: auto;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.inspection-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.inspection-table th,
.inspection-table td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.inspection-table th {
  position: sticky;
  top: 0;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inspection-table td:first-child {
  width: 22%;
  color: var(--accent);
  font-weight: 750;
}

.inspection-table td:nth-child(2) {
  width: 34%;
  color: var(--text);
  font-weight: 650;
}

.inspection-table td:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.inspection-summary,
.inspection-next {
  margin-top: clamp(14px, 2vh, 24px);
  padding-top: clamp(14px, 2vh, 22px);
  border-top: 1px solid var(--line);
}

.inspection-summary .section-label {
  margin-bottom: 8px;
}

.inspection-summary > p:not(.section-label),
.inspection-summary li {
  max-width: 900px;
  line-height: 1.55;
}

.inspection-basics {
  color: var(--muted);
}

.inspection-summary ul {
  display: grid;
  max-width: 900px;
  gap: 6px;
  margin: 14px 0 0;
  padding-left: 22px;
}

.inspection-next-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.inspection-experience.replaying [data-inspection-result] {
  visibility: hidden;
}

.inspection-experience.replay-complete [data-inspection-result] {
  visibility: visible;
}

.inspect-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  align-items: start;
  gap: 24px;
}

.preview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1211;
}

.preview-label {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.74rem;
}

.preview-label span {
  color: var(--muted);
  font-size: 0.64rem;
  text-transform: uppercase;
}

model-viewer {
  display: block;
  width: 100%;
  height: clamp(330px, 45vh, 520px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, #283531, #0b1211 70%);
  background-size: 24px 24px, 24px 24px, auto;
}

.viewer-fallback {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--muted);
  font-size: 0.76rem;
}

.viewer-error::after {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--danger);
  content: "Preview unavailable";
}

.bounds-line {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.64rem;
}

.inspection-evidence {
  min-width: 0;
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.metric-list div {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 15px;
  background: var(--surface-soft);
}

.metric-list dt {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.metric-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  font-weight: 650;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.section-heading h3 {
  margin: 0;
  font-size: 1.05rem;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.76rem;
}

.finding-list {
  display: grid;
  max-height: 540px;
  gap: 9px;
  overflow-y: auto;
  padding-right: 3px;
}

.finding {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(9, 16, 15, 0.42);
}

.finding > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.finding code,
.finding > div span {
  color: var(--accent);
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.finding h4 {
  margin: 12px 0 2px;
  font-size: 1rem;
}

.finding p,
.finding small,
.empty-state,
.warning-list,
.session-note {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.finding-detail {
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.finding-detail summary {
  min-height: 42px;
  padding: 0;
}

.finding-detail > p,
.finding-detail > small {
  display: block;
  margin: 0 0 10px;
}

.finding p {
  margin: 0 0 7px;
}

.finding .rule-provenance {
  padding: 7px 8px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
}

.finding .rule-provenance strong {
  color: var(--text);
}

.finding .rule-provenance code {
  display: block;
  margin-top: 3px;
}

/* Decide */

.approval-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(30px, 5vw, 72px);
}

.approval-copy > p:not(.section-label) {
  max-width: 660px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.dimension-compare {
  display: grid;
  max-width: 520px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}

.dimension-compare div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.dimension-compare small {
  color: var(--muted);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.dimension-compare strong {
  font-size: 1.35rem;
}

.dimension-compare > span {
  color: var(--accent);
}

.approval-evidence {
  border: 1px solid var(--line);
  border-radius: 9px;
}

.approval-components {
  display: grid;
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.approval-components > div {
  padding: 12px;
  background: var(--surface-soft);
}

.approval-components strong,
.approval-components span {
  font-size: 0.7rem;
}

.approval-components span {
  float: right;
  color: var(--accent);
}

.approval-components p,
.decision-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.decision-note {
  margin: 15px 0;
}

.decision-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.decision-records {
  display: grid;
  max-width: 760px;
  gap: 10px;
  margin-bottom: 22px;
}

.decision-records article {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 5px 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.decision-records article > span {
  grid-row: 1 / 3;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
}

.decision-records small {
  color: var(--muted);
  font-size: 0.68rem;
}

/* Download */

.success-copy strong,
.success-copy .section-label {
  color: var(--success);
}

.danger-copy .section-label {
  color: var(--danger);
}

.download-button {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  color: #101614;
  background: var(--accent);
}

.download-button > span {
  display: grid;
  gap: 2px;
}

.download-button small {
  font-size: 0.62rem;
  text-transform: uppercase;
}

.download-button strong {
  font-size: 0.88rem;
}

.download-button b {
  font-size: 1.25rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.preview-grid.single {
  max-width: 620px;
  grid-template-columns: 1fr;
}

.download-panel model-viewer {
  height: clamp(300px, 42vh, 480px);
}

.model-comparison {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 18px 0 0;
  border: 1px solid rgba(127, 202, 183, 0.3);
  border-radius: 12px;
  background: #09110f;
  overflow: hidden;
}

.comparison-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid var(--line);
}

.comparison-header h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 680;
}

.comparison-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}

.comparison-icon-button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.comparison-icon-button:hover,
.comparison-icon-button:focus-visible,
.comparison-icon-button.active {
  border-color: rgba(242, 198, 107, 0.5);
  color: var(--text);
  background: rgba(242, 198, 107, 0.12);
}

.comparison-tool-glyph,
.comparison-icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
}

.comparison-tool-glyph {
  color: var(--accent);
}

.comparison-icon-button {
  flex: 0 0 36px;
  padding: 0;
  border-color: var(--line);
}

.comparison-tool-glyph svg,
.comparison-icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.banana-button svg path:first-child {
  fill: rgba(242, 198, 107, 0.18);
}

.comparison-stage {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(126, 205, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 205, 184, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, rgba(35, 80, 69, 0.25), transparent 58%),
    #07100e;
  background-size: 32px 32px, 32px 32px, auto, auto;
}

.model-comparison .comparison-viewer {
  height: clamp(440px, 60vh, 680px);
  background: transparent;
  --min-hotspot-opacity: 0;
  --max-hotspot-opacity: 0;
}

.comparison-anchor {
  width: 0;
  height: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  opacity: 0;
}

.comparison-hud {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.comparison-component-wireframe {
  fill: color-mix(in srgb, var(--component-color, #83d6ca) 3%, transparent);
  stroke: var(--component-color, #83d6ca);
  stroke-linecap: square;
  stroke-linejoin: round;
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.comparison-component-label {
  fill: var(--component-label-color, #a9efe2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.08em;
  paint-order: stroke;
  stroke: rgba(5, 13, 11, 0.94);
  stroke-width: 4px;
  text-transform: uppercase;
}

.comparison-component-box.active .comparison-component-wireframe {
  fill: color-mix(in srgb, var(--component-color, #83d6ca) 9%, transparent);
  stroke: var(--component-color, #83d6ca);
  stroke-width: 2.4;
}

.comparison-component-box.active .comparison-component-label {
  fill: var(--component-label-color, #a9efe2);
}

.comparison-target-box,
.comparison-leader,
.comparison-banana-box,
.comparison-banana-leader,
.comparison-origin-marker {
  fill: none;
  stroke-linecap: square;
  stroke-linejoin: round;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.comparison-target-box {
  opacity: 0.82;
}

.comparison-target-box.before,
.comparison-leader.before {
  stroke: #80d6f4;
}

.comparison-target-box.after,
.comparison-leader.after {
  stroke: #83d5b9;
}

.comparison-target-label,
.comparison-axis-label,
.comparison-banana-label,
.comparison-origin-label {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  paint-order: stroke;
  stroke: rgba(5, 13, 11, 0.92);
  stroke-width: 3px;
  text-transform: uppercase;
}

.comparison-target-label.before {
  fill: #9be3ff;
}

.model-comparison.source-only .comparison-target-label.before {
  fill: #eef5f1;
  font-size: 14px;
  letter-spacing: 0.045em;
  text-transform: none;
}

.comparison-target-label.after {
  fill: #9ce4ca;
}

.comparison-origin-marker {
  stroke: #f2c66b;
  opacity: 0.95;
}

.comparison-origin-label {
  fill: #f7d68d;
}

.comparison-origin-marker.proposed {
  stroke: #83d5b9;
  stroke-width: 1.8;
}

.comparison-origin-label.proposed {
  fill: #9ce4ca;
}

.comparison-axis-line,
.comparison-axis-mark {
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.comparison-axis-x .comparison-axis-line,
.comparison-axis-x .comparison-axis-mark {
  stroke: #ef7777;
}

.comparison-axis-y .comparison-axis-line,
.comparison-axis-y .comparison-axis-mark {
  stroke: #83d5b9;
}

.comparison-axis-z .comparison-axis-line,
.comparison-axis-z .comparison-axis-mark {
  stroke: #78aef2;
}

.comparison-axis-x .comparison-axis-label {
  fill: #f09a9a;
}

.comparison-axis-y .comparison-axis-label {
  fill: #9ce4ca;
}

.comparison-axis-z .comparison-axis-label {
  fill: #9fc2f1;
}

.comparison-banana-box,
.comparison-banana-leader {
  stroke: #f2c66b;
}

.comparison-banana-label {
  fill: #f7d68d;
}

.comparison-status {
  position: absolute;
  z-index: 3;
  inset: 50% auto auto 50%;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  transform: translate(-50%, -50%);
}

.model-comparison figcaption {
  padding: 9px 14px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

.technical-details {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 16, 15, 0.35);
}

.technical-details summary small {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 500;
}

.stage-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin: 5px 0 15px;
  padding: 0;
  list-style: none;
}

.stage-list li {
  padding: 8px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.62rem;
  text-align: center;
}

.stage-list li.complete {
  color: var(--success);
  border-color: rgba(130, 203, 183, 0.45);
}

.stage-list li.current {
  color: var(--accent);
  border-color: rgba(242, 189, 105, 0.45);
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.check-row > span {
  color: var(--success);
}

.check-row > div {
  display: grid;
  gap: 2px;
}

.check-row strong {
  font-size: 0.68rem;
}

.check-row small {
  color: var(--muted);
  font-size: 0.64rem;
}

.check-row.fail > span {
  color: var(--danger);
}

.metric-list.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
}

.session-note {
  margin: 10px 0 0;
}

@media (max-width: 980px) {
  .app-shell {
    --rail-width: 224px;
  }

  .mode-nav {
    padding-inline: 16px;
  }

  .style-tile {
    min-height: 78px;
    grid-template-columns: 36px minmax(0, 1fr);
    padding-inline: 13px;
  }

  .utility-tiles {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .utility-tile {
    min-height: 58px;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: 1fr;
    justify-items: start;
    padding: 10px 13px;
    text-align: left;
  }

  .inspect-layout,
  .approval-layout {
    grid-template-columns: 1fr;
  }

  .source-inspection {
    max-width: 680px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    --rail-width: 76px;
  }

  .mode-rail {
    min-height: 500px;
  }

  .workspace-logo {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .mode-nav {
    align-items: center;
    gap: 5px;
    padding: 16px 8px;
  }

  .style-tiles,
  .utility-tiles {
    display: contents;
  }

  .rail-spacer {
    min-height: 8px;
  }

  .rail-divider {
    width: 42px;
    margin-block: 8px 5px;
  }

  .mode-link {
    width: 58px;
    min-height: 60px;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    justify-items: center;
    padding: 10px;
  }

  .mode-link svg {
    width: 22px;
    height: 22px;
  }

  .rail-actions {
    gap: 5px;
  }

  .help-icon {
    font-size: 1.9rem;
  }

  .mode-link.active::before {
    left: -1px;
  }

  .mode-hint,
  .mode-label,
  .rail-group-label {
    display: none;
  }

  .intent-rail ol {
    gap: 3px;
  }

  .rail-primary {
    width: 100%;
    gap: 4px;
  }

  .rail-primary-option {
    width: 58px;
    min-height: 54px;
    grid-template-columns: 1fr;
    justify-items: center;
    margin-inline: auto;
    padding: 8px;
    border-radius: 8px;
  }

  .rail-primary-option strong {
    display: none;
  }

  .rail-primary-option svg {
    width: 22px;
    height: 22px;
  }

  .rail-workflow .hosted-flow {
    margin: 2px 0 0;
    padding: 0;
    border-left: 0;
  }

  .intent-rail li {
    min-height: 42px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 5px;
  }

  .intent-rail li strong {
    display: none;
  }

  .intent-rail li span {
    width: 24px;
    height: 24px;
  }

  .workspace-header {
    min-height: 72px;
    padding-inline: 16px;
  }

  .workspace-shell {
    grid-template-rows: 72px minmax(0, 1fr);
  }

  .workspace-header h1 {
    font-size: 1rem;
  }

  .workspace-body {
    padding: 20px 14px 44px;
  }

  .how-hero h2 {
    font-size: clamp(3rem, 12.5vw, 4.6rem);
  }

  .how-flow {
    margin-top: 40px;
  }

  .how-flow li {
    min-height: 0;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding-block: 22px;
  }

  .how-flow li > span {
    padding-top: 2px;
    font-size: 1.1rem;
  }

  .how-finish {
    justify-content: flex-start;
  }

  .how-cta {
    width: 100%;
  }

  .chooser-panel {
    margin-top: 28px;
  }

  .chooser-panel h2 {
    font-size: clamp(2.5rem, 11vw, 4rem);
  }

  .style-choices a {
    min-height: 104px;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    align-items: center;
    gap: 10px;
  }

  .style-choices {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 28px;
  }

  .style-choices .choice-icon {
    grid-column: auto;
    align-self: center;
  }

  .intent-stage {
    margin-top: 24px;
  }

  .intent-heading h2 {
    font-size: clamp(2.5rem, 11vw, 4rem);
  }

  .intent-targets,
  .intent-facts {
    grid-template-columns: 1fr;
  }

  .intent-confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .proposal-decision-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .proposal-decision-row form,
  .proposal-decision-row .primary-button {
    width: 100%;
  }

  .intent-confirm-actions .secondary-button,
  .intent-confirm-actions form,
  .intent-confirm-actions .primary-button {
    width: 100%;
  }

  .workflow-panel,
  .intake-panel {
    padding: 18px;
  }

  .panel-heading {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
  }

  .panel-heading > p {
    max-width: none;
    text-align: left;
  }

  .workflow-nav button,
  .workflow-nav a {
    grid-template-columns: 26px auto;
    column-gap: 7px;
  }

  .workflow-nav button > span,
  .workflow-nav a > span {
    width: 26px;
    height: 26px;
  }

  .workflow-nav small {
    display: none;
  }

  .job-workflow-nav {
    grid-template-columns: minmax(0, 1fr) 8px minmax(0, 1fr) 8px minmax(0, 1fr);
  }

  .profile-options,
  .custom-policy-fields,
  .preview-grid,
  .check-list {
    grid-template-columns: 1fr;
  }

  .custom-policy-fields label {
    align-items: flex-start;
    flex-direction: column;
  }

  .custom-policy-fields input,
  .custom-policy-fields select {
    width: 100%;
  }

  .job-context {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .job-context > p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .metric-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finding-list {
    max-height: none;
  }

  .dimension-compare {
    gap: 10px;
  }

  .decision-actions,
  .step-actions.split {
    display: grid;
    grid-template-columns: 1fr;
  }

  .step-actions.split .secondary-button {
    grid-row: 2;
  }

  .stage-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  model-viewer,
  .download-panel model-viewer {
    height: 300px;
  }

  .comparison-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .comparison-tools {
    width: 100%;
    justify-content: space-between;
  }

  .model-comparison .comparison-viewer {
    height: clamp(400px, 58vh, 520px);
  }

  .comparison-tool-glyph {
    display: none;
  }

  .comparison-target-label,
  .comparison-axis-label,
  .comparison-banana-label {
    font-size: 11px;
  }

  .model-comparison figcaption {
    text-align: left;
  }
}

@media (max-width: 430px) {
  .app-shell {
    --rail-width: 64px;
  }

  .mode-link {
    width: 50px;
  }

  .workspace-header h1 {
    font-size: 0.88rem;
  }

  .intake-workflow-nav {
    grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
  }

  .job-workflow-nav {
    grid-template-columns: minmax(0, 1fr) 8px minmax(0, 1fr) 8px minmax(0, 1fr);
  }

  .workflow-nav button,
  .workflow-nav a {
    grid-template-columns: 1fr;
    place-items: center;
    text-align: center;
  }

  .workflow-nav button > span,
  .workflow-nav a > span {
    display: none;
  }

  .workflow-nav strong {
    font-size: 0.67rem;
  }

  .policy-summary div,
  .policy-rule-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .step-actions.end {
    align-items: stretch;
    flex-direction: column;
  }

  .selected-policy-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .selected-policy-line strong {
    text-align: left;
  }

  .dimension-compare {
    grid-template-columns: 1fr;
  }

  .dimension-compare > span {
    transform: rotate(90deg);
    text-align: center;
  }

  .metric-list,
  .metric-list.compact {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* D019 conversation-led hosted workspace */

.mode-conversation {
  --accent: #8fd2be;
  --accent-soft: rgba(143, 210, 190, 0.12);
}

.workspace-home {
  display: grid;
  width: min(1180px, 100%);
  gap: 24px;
  margin: 0 auto;
}

.workspace-home-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.workspace-home-heading h2,
.workspace-home-heading p {
  margin: 0;
}

.workspace-home-heading p {
  color: var(--muted);
}

.asset-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 14px;
}

.asset-gallery-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}

.asset-gallery-card:hover,
.asset-gallery-card:focus-within {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.asset-gallery-resume {
  display: grid;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.asset-gallery-card model-viewer {
  width: 100%;
  height: 180px;
  pointer-events: none;
  background: var(--surface-soft);
}

.asset-gallery-resume > span {
  display: grid;
  gap: 3px;
  padding: 14px 16px 16px;
}

.asset-gallery-actions {
  display: flex;
  border-top: 1px solid var(--line);
}

.asset-gallery-actions form {
  display: contents;
}

.asset-redo,
.asset-replace {
  flex: 1;
  padding: 12px 16px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.asset-redo:hover,
.asset-redo:focus-visible,
.asset-replace:hover,
.asset-replace:focus-visible {
  color: var(--accent);
}

.asset-replace + .asset-redo,
.asset-redo + .asset-replace {
  border-left: 1px solid var(--line);
}

.new-asset-card {
  min-height: 248px;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 1.1rem;
  text-decoration: none;
}

.new-asset-card > span {
  font-size: 2rem;
}

.single-step {
  display: grid;
  width: min(1060px, 100%);
  min-height: calc(100vh - 220px);
  align-content: center;
  gap: 18px;
  margin: 0 auto;
}

.workflow-notebook,
.single-step.workflow-notebook,
.describe-step.workflow-notebook {
  display: grid;
  width: min(1120px, 100%);
  min-height: auto;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  align-content: start;
  gap: 30px;
  padding: clamp(8px, 2vw, 24px) 0 64px;
}

.workflow-cell {
  display: grid;
  min-width: 0;
  gap: 14px;
  padding: 0 0 30px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.workflow-cell:last-child {
  border-bottom: 0;
}

.workflow-cell-header {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 1rem;
}

.workflow-cell-header > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.86rem;
}

.workflow-cell.current > .workflow-cell-header {
  color: var(--text);
}

.workflow-cell.current > .workflow-cell-header > span {
  border-color: var(--accent);
  color: var(--accent);
}

.notebook-cell-edit,
.workflow-cell-header > form {
  margin-left: auto;
}

.notebook-cell-edit > summary,
.notebook-edit-button {
  padding: 4px 0;
  border: 0;
  color: var(--accent-cool);
  background: transparent;
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.notebook-cell-edit[open] {
  width: min(520px, 100%);
}

.notebook-cell-edit[open] > summary {
  margin-bottom: 10px;
  text-align: right;
}

.notebook-cell-edit form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.notebook-rewind {
  color: var(--muted);
}

.notebook-rewind > p {
  max-width: 520px;
  margin: 0 0 12px auto;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
  text-align: right;
}

.compact-file-replacement {
  display: flex;
  min-width: min(280px, 100%);
  flex: 1;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}

.compact-file-replacement input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.single-step-form {
  display: grid;
  gap: 18px;
}

.single-step-form .primary-button {
  justify-self: end;
}

.agent-model-choice {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.agent-model-choice > summary {
  padding: 14px 16px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
}

.agent-model-options {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.agent-model-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.agent-model-option:has(input:checked) {
  border-color: var(--accent-cool);
  background: color-mix(in srgb, var(--accent-cool) 10%, transparent);
}

.agent-model-option input {
  margin-top: 4px;
  accent-color: var(--accent-cool);
}

.agent-model-option span {
  display: grid;
  gap: 3px;
}

.agent-model-option small {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.4;
}

.describe-step {
  width: min(1360px, 100%);
  grid-template-columns: minmax(360px, 0.82fr) minmax(440px, 1.18fr);
  align-items: center;
  align-content: center;
  gap: clamp(28px, 4vw, 64px);
}

.describe-step-copy {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.model-comparison.source-only {
  margin: 0;
}

.model-comparison.source-only .comparison-header {
  justify-content: flex-end;
}

.model-comparison.source-only .comparison-viewer {
  height: clamp(400px, 54vh, 620px);
}

.single-step .drop-zone {
  min-height: 280px;
}

.upload-format-note {
  width: fit-content;
  max-width: 680px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.upload-format-note summary {
  color: var(--accent-cool);
  cursor: pointer;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upload-format-note[open] summary {
  color: var(--text);
}

.upload-format-note p {
  margin: 10px 0 0;
}

.asset-gallery-card small {
  color: var(--muted);
}

.asset-gallery-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  font-size: 15px;
  font-weight: 750;
}

.asset-gallery-status i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

.asset-gallery-status.pending {
  color: var(--muted);
}

.asset-gallery-status.attention {
  color: var(--attention);
}

.asset-gallery-status.success {
  color: var(--success);
}

.asset-gallery-status.danger {
  color: var(--danger);
}

.new-asset-panel {
  border-top: 1px solid var(--line);
}

.new-asset-panel > summary {
  display: flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 20px 0;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.new-asset-panel > summary::-webkit-details-marker {
  display: none;
}

.new-asset-panel .conversation-start {
  min-height: 0;
  padding: 18px 0 42px;
}

.replacement-choice {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
}

.replacement-choice select {
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
}

.conversation-start {
  display: grid;
  width: min(1180px, 100%);
  min-height: calc(100vh - 180px);
  align-content: center;
  gap: 28px;
  margin: 0 auto;
}

.conversation-start .intent-heading h2 {
  max-width: none;
  font-size: clamp(1.75rem, 2.4vw, 2.5rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.conversation-start-form {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  gap: 16px;
}

.conversation-start-form > label:first-child {
  display: grid;
  gap: 9px;
}

.conversation-start-form textarea {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface);
  resize: vertical;
}

.drop-zone.compact {
  min-height: 160px;
}

.conversation-start-form .primary-button {
  grid-column: 1 / -1;
  justify-self: end;
}

.hosted-workspace {
  display: grid;
  gap: 18px;
}

.hosted-context {
  display: grid;
  align-items: center;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.hosted-context p {
  display: flex;
  gap: 12px;
  margin: 0;
}

.hosted-context p span,
.hosted-context > code {
  color: var(--muted);
}

.hosted-columns {
  --evidence-column-width: 34%;
  display: grid;
  align-items: start;
  grid-template-columns: minmax(500px, 1fr) 14px minmax(300px, var(--evidence-column-width));
  column-gap: clamp(8px, 1vw, 14px);
}

.conversation-pane {
  display: grid;
  min-width: 0;
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding: clamp(10px, 2vw, 24px) 0 60px;
}

.evidence-sidebar {
  position: sticky;
  top: 112px;
  min-width: 0;
  max-height: calc(100vh - 136px);
  padding-top: clamp(10px, 2vw, 24px);
}

.workspace-column-resizer {
  position: sticky;
  top: 112px;
  display: grid;
  width: 14px;
  height: calc(100vh - 136px);
  min-height: 420px;
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--line-strong);
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

.workspace-column-resizer > span,
.workspace-column-resizer > span::after {
  display: block;
  width: 1px;
  height: 54px;
  background: currentColor;
  content: "";
}

.workspace-column-resizer > span {
  position: relative;
  transform: translateX(-2px);
}

.workspace-column-resizer > span::after {
  position: absolute;
  left: 4px;
  top: 0;
}

.workspace-column-resizer:hover,
.workspace-column-resizer:focus-visible,
.workspace-column-resizer.dragging {
  color: var(--accent);
  outline: none;
}

body.resizing-evidence,
body.resizing-evidence * {
  cursor: col-resize !important;
  user-select: none !important;
}

.evidence-sidebar .model-comparison {
  margin: 0;
  box-shadow: 0 18px 44px rgb(0 0 0 / 20%);
}

.evidence-sidebar .model-comparison .comparison-viewer,
.evidence-sidebar .model-comparison.source-only .comparison-viewer {
  height: clamp(420px, 62vh, 700px);
}

.conversation-history {
  display: grid;
  gap: 18px;
}

.conversation-turn-record {
  display: grid;
  gap: 10px;
  scroll-margin-top: 24px;
}

.notebook-scene-slot {
  position: relative;
  min-height: 1px;
  scroll-margin-block: 12vh;
}

.notebook-scene-slot.active {
  min-height: 1px;
}

.notebook-shared-scene {
  width: 100%;
}

.notebook-shared-scene > .model-comparison {
  margin-top: 0;
}

.evidence-sidebar.loading .notebook-shared-scene {
  min-height: 420px;
  opacity: 0.45;
}

.notebook-scene-error {
  display: grid;
  min-height: 160px;
  margin: 0;
  place-items: center;
  color: var(--danger);
  font-size: 1rem;
}

.history-agent-message,
.history-user-message {
  margin: 0;
  padding: 15px 17px;
  font-size: 1.04rem;
  line-height: 1.5;
}

.history-agent-message {
  display: grid;
  width: fit-content;
  max-width: 84%;
  gap: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  background: var(--surface-soft);
}

.history-agent-message strong {
  color: var(--success);
}

.history-agent-message span {
  color: var(--muted);
}

.history-user-message {
  width: fit-content;
  max-width: 78%;
  margin-left: auto;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 18px 18px 6px 18px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.history-user-message p {
  margin: 4px 0 0;
}

.notebook-intake-message {
  margin-bottom: 2px;
}

.current-turn-message {
  scroll-margin-top: 18vh;
}

#current-turn {
  scroll-margin-top: 24px;
}

.refine-iterations a {
  display: contents;
  color: inherit;
  text-decoration: none;
}

.workflow-anchor {
  display: contents;
  color: inherit;
  text-decoration: none;
}

.intent-rail li.scene-current {
  border-left-color: var(--success);
  color: var(--text);
  background: color-mix(in srgb, var(--success) 10%, transparent);
}

.conversation-prompt {
  max-width: 84%;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.08rem, 1.35vw, 1.28rem);
  font-weight: 680;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

.conversation-prompt.agent-message {
  position: relative;
  display: grid;
  gap: 8px;
  width: fit-content;
  max-width: min(84%, 760px);
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--success) 52%, var(--line));
  border-radius: 18px 18px 18px 5px;
  background: color-mix(in srgb, var(--surface-raised) 91%, var(--success) 9%);
  box-shadow: 0 14px 34px rgb(0 0 0 / 12%);
}

.conversation-prompt.agent-message::after {
  position: absolute;
  bottom: -7px;
  left: 15px;
  width: 13px;
  height: 13px;
  border-right: 1px solid color-mix(in srgb, var(--success) 52%, var(--line));
  border-bottom: 1px solid color-mix(in srgb, var(--success) 52%, var(--line));
  background: color-mix(in srgb, var(--surface-raised) 91%, var(--success) 9%);
  content: "";
  transform: rotate(45deg);
}

.agent-message-speaker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.agent-message-speaker::before {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--success) 58%, transparent);
  border-radius: 50%;
  content: "✦";
  font-family: sans-serif;
  font-size: 0.78rem;
}

.conversation-prompt.completion-prompt {
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  line-height: 1.45;
}

.conversation-prompt.completion-prompt.blocked {
  max-width: 940px;
  padding-left: 14px;
  border-left: 4px solid var(--danger);
}

.conversation-prompt.agent-message.completion-prompt.blocked {
  border-color: color-mix(in srgb, var(--danger) 65%, var(--line));
  border-left-width: 1px;
}

.conversation-pane > header h2 {
  max-width: 760px;
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.conversation-pane > header h2.approval-heading {
  font-size: clamp(1.75rem, 2.7vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.conversation-pane > header h2.completion-heading {
  max-width: 880px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.conversation-message,
.target-card {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  font-size: 1.02rem;
  line-height: 1.55;
}

.conversation-message p {
  margin: 0 0 12px;
}

.conversation-message p:last-of-type {
  margin-bottom: 0;
}

.conversation-message small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
}

.result-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.result-status > div {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 18px;
}

.result-status > div + div {
  border-left: 1px solid var(--line);
}

.result-status small {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-status strong {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.35;
}

.result-status p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.result-status.failed {
  border-color: rgba(239, 119, 119, 0.48);
}

.model-comparison.candidate-rejected {
  border-color: rgba(239, 119, 119, 0.46);
}

.model-comparison.candidate-rejected .comparison-target-box.after,
.model-comparison.candidate-rejected .comparison-leader.after {
  stroke: #ef9a77;
}

.model-comparison.candidate-rejected .comparison-target-label.after {
  fill: #f2ae90;
}

.target-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.55fr);
  gap: 18px;
}

.target-card > label:not(.supported-goal-check) {
  display: grid;
  gap: 8px;
}

.target-card select,
.target-card input[type="number"],
.target-card textarea,
.evidence-question select {
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface-soft);
}

.target-card textarea {
  min-height: 140px;
  padding: 14px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

.supported-goal-check {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.supported-goal-check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.target-card .primary-button {
  grid-column: 1 / -1;
  justify-self: end;
}

.target-review-card {
  grid-template-columns: minmax(0, 1fr);
}

.target-review-card > .intent-adjust {
  margin: 0;
}

.target-confirm-form {
  display: grid;
  gap: 18px;
}

.target-confirm-form .primary-button {
  justify-self: end;
}

.target-understood {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  color: var(--muted);
}

.target-proposal,
.target-card > .fine-print {
  grid-column: 1 / -1;
}

.hosted-advanced {
  grid-column: 1 / -1;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hosted-advanced summary {
  cursor: pointer;
  font-weight: 750;
}

.hosted-advanced > p {
  color: var(--muted);
  line-height: 1.5;
}

.hosted-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hosted-advanced-grid label {
  display: grid;
  gap: 6px;
}

.hosted-advanced-grid input,
.hosted-advanced-grid select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  background: var(--surface-soft);
}

.approval-details {
  margin: -8px 0 4px;
}

.hosted-decision {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.context-actions {
  justify-content: flex-start;
}

.context-feedback-panel {
  display: grid;
  gap: 9px;
}

.context-feedback-panel[hidden] {
  display: none;
}

.context-feedback-panel label {
  font-weight: 700;
}

.turn-composer {
  width: 100%;
  min-height: 112px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}

.turn-composer:focus-visible {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 28%, transparent);
  outline-offset: 2px;
}

.turn-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
}

.evidence-question {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.evidence-question label {
  display: grid;
  gap: 7px;
}

.job-contract {
  display: grid;
  max-height: none;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
}

.job-contract-dialog {
  width: min(860px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  padding: 24px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.55);
}

.job-contract-dialog::backdrop {
  background: rgba(3, 8, 7, 0.78);
  backdrop-filter: blur(5px);
}

.job-contract > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.compact-button {
  min-height: 40px;
  padding: 0 14px;
}

.job-contract header h2 {
  margin: 5px 0 10px;
  font-size: 1.7rem;
}

.job-contract details {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.job-contract summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 750;
}

.job-contract summary span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.job-contract dl {
  display: grid;
  gap: 9px;
  margin: 15px 0 0;
}

.job-contract dl div {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
}

.job-contract dt {
  color: var(--muted);
}

.job-contract dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.contract-finding {
  display: grid;
  gap: 3px;
  padding: 8px 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.contract-finding span,
.contract-retention {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

textarea.asset-description-input {
  width: 100%;
  height: 168px;
  min-height: 168px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  resize: vertical;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.5;
}

.asset-description-field {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.description-examples-link {
  width: fit-content;
  padding: 0;
  border: 0;
  color: var(--accent-cool);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.description-examples-link:hover {
  color: var(--text);
}

.description-examples-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(86vh, 820px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.55);
}

.description-examples-dialog::backdrop {
  background: rgba(3, 8, 7, 0.78);
  backdrop-filter: blur(5px);
}

.description-examples-content {
  display: grid;
  gap: 24px;
  padding: 30px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
}

.description-examples-content header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.description-examples-content .description-examples-title,
.description-examples-content p,
.description-examples-content ol {
  margin: 0;
}

.description-examples-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 750;
}

.description-examples-content > p {
  max-width: 64ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.description-examples-content ol {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.description-examples-content li {
  display: grid;
  grid-template-columns: minmax(140px, 0.45fr) minmax(0, 1fr);
  gap: 22px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}

.description-examples-content li span {
  color: var(--muted);
}

.endpoint-help-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
}

.endpoint-help-button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--success) 62%, var(--line));
  border-radius: 50%;
  color: var(--success);
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 850;
}

.endpoint-help-button:hover,
.endpoint-help-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.endpoint-help-dialog .description-examples-content > p:last-child {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.endpoint-choice,
.viewing-use-choice,
.target-bounds {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
}

.viewing-use-choice {
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  margin-top: 8px;
}

.viewing-use-choice legend {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.viewing-use-legend {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.viewing-use-option {
  position: relative;
  display: grid;
  min-height: 94px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  cursor: pointer;
}

.viewing-use-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.viewing-use-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.viewing-use-option span {
  display: grid;
  gap: 7px;
}

.viewing-use-option small,
.viewing-use-choice > p {
  color: var(--muted);
  line-height: 1.45;
}

.viewing-use-choice > p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 0.82rem;
}

.endpoint-choice {
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
}

.target-bounds legend {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.endpoint-option {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  min-height: 118px;
}

.endpoint-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.endpoint-option label {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 116px;
  padding: 16px;
  cursor: pointer;
}

.endpoint-option strong {
  text-align: center;
  line-height: 1.25;
}

.endpoint-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.endpoint-option > a {
  position: absolute;
  top: 8px;
  right: 10px;
  color: var(--muted);
  text-decoration: none;
}

.endpoint-orbit {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--accent);
  animation: endpoint-orbit-spin 5s linear infinite;
}

.endpoint-orbit::before,
.endpoint-orbit::after {
  content: "";
  position: absolute;
  inset: 7px -5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transform: rotate(60deg);
}

.endpoint-orbit::after {
  transform: rotate(-60deg);
}

.endpoint-orbit i {
  position: absolute;
  top: -3px;
  left: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.endpoint-orbit.other {
  border-style: dashed;
}

@keyframes endpoint-orbit-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .endpoint-orbit { animation: none; }
}

.endpoint-choice > input[type="text"] {
  grid-column: 1 / -1;
}

.target-bounds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 700px) {
  .target-bounds {
    grid-template-columns: 1fr;
  }
}

textarea.asset-description-input::placeholder {
  color: var(--muted);
  font-weight: 400;
  opacity: 1;
}

textarea.asset-description-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.result-review {
  display: grid;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow-activity {
  display: grid;
  gap: 8px;
  width: min(680px, 100%);
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.conversation-pane.is-working {
  align-content: start;
  min-height: 260px;
}

.conversation-pane.is-working .notebook-locked :is(
  .confirmation-question,
  .decision-actions,
  .result-review,
  .single-step-form,
  .notebook-cell-edit,
  form.target-card
) {
  display: none;
}

.workflow-working-cell {
  min-height: 190px;
  align-content: start;
}

.workflow-working-cell .workflow-activity {
  margin-top: 4px;
}

.workflow-working-message {
  min-height: 160px;
}

.workflow-thinking-message {
  width: min(560px, 92%);
}

.workflow-thinking-body {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.workflow-thinking-body > .shepherd-sprite {
  width: 48px;
}

@media (max-width: 900px) {
  .workflow-working-cell {
    min-height: 150px;
  }
}

.workflow-activity-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  color: var(--muted);
  font-size: 1.02rem;
}

.workflow-activity-item.active {
  color: var(--text);
}

.workflow-activity-status {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--success);
  font-weight: 800;
}

.workflow-activity-item.active .workflow-activity-status {
  width: 34px;
  height: 34px;
  border: 0;
}

.workflow-activity-item.error .workflow-activity-status {
  color: var(--danger);
}

@media (prefers-reduced-motion: reduce) {
  .shepherd-sprite-thinking { animation: none; }
}

.result-review .decision-question,
.result-review p {
  margin: 0;
}

.result-review-question,
.result-accepted-prompt {
  display: grid;
  gap: 14px;
}

.result-accepted-prompt[hidden] {
  display: none;
}

.result-review-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.result-review-actions details > summary {
  list-style: none;
  cursor: pointer;
}

.result-review-actions details > summary::-webkit-details-marker {
  display: none;
}

.result-review-actions details form {
  display: grid;
  gap: 9px;
  width: min(620px, 75vw);
  margin-top: 12px;
}

.result-review-actions textarea {
  width: 100%;
  min-height: 110px;
  padding: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font: inherit;
  resize: vertical;
}

.limit-note {
  align-self: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.result-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.gallery-return-button {
  display: grid;
  width: min(390px, 100%);
  min-height: 86px;
  grid-template-columns: 70px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding: 7px 14px 7px 7px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent-cool) 62%, var(--line));
  border-radius: 16px;
  color: var(--text);
  background: linear-gradient(110deg, rgba(130, 203, 183, 0.12), rgba(12, 22, 20, 0.36));
  text-decoration: none;
}

.gallery-return-button:hover,
.gallery-return-button:focus-visible {
  border-color: var(--accent-cool);
  background: linear-gradient(110deg, rgba(130, 203, 183, 0.2), rgba(12, 22, 20, 0.46));
  outline: 2px solid color-mix(in srgb, var(--accent-cool) 45%, transparent);
  outline-offset: 2px;
}

.gallery-return-button strong {
  font-size: 1.03rem;
}

.gallery-return-sprite {
  display: block;
  width: 70px;
  aspect-ratio: 1;
  background-image: url("/static/asset-shepherd-run-away.png");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 200% 200%;
  image-rendering: pixelated;
}

.gallery-return-button:is(:hover, :focus-visible) .gallery-return-sprite {
  animation: shepherd-run-away 1040ms step-end infinite;
}

.gallery-return-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent-cool);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1.2rem;
  font-weight: 800;
}

@keyframes shepherd-run-away {
  0%, 24.99% { background-position: 0 0; }
  25%, 49.99% { background-position: 100% 0; }
  50%, 74.99% { background-position: 0 100%; }
  75%, 100% { background-position: 100% 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-return-button:is(:hover, :focus-visible) .gallery-return-sprite {
    animation: none;
  }
}

.blocked-result-controls {
  display: grid;
  width: 100%;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.blocked-refinement-trigger {
  grid-column: 1;
  grid-row: 1;
  min-width: 156px;
}

.blocked-refinement-form:not([hidden]) {
  display: contents;
}

.blocked-refinement-form textarea {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  min-height: 148px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.blocked-refinement-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: 0;
}

.blocked-refinement-form .primary-button {
  grid-column: 1;
  grid-row: 2;
  min-width: 156px;
}

.blocked-result-links {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1;
  grid-row: 1;
  align-items: center;
  justify-self: start;
  gap: 12px;
}

.blocked-result-controls.has-refinement > .blocked-result-links {
  grid-column: 2;
}

.blocked-refinement-form:not([hidden]) + .blocked-result-links {
  grid-column: 2;
  grid-row: 2;
}

.hosted-inspection {
  margin: 4px 0 24px;
}

.hosted-inspection .inspection-table-wrap {
  max-height: 260px;
  margin-top: 12px;
}

@media (max-width: 1550px) and (min-width: 1151px) {
  .inspection-lane-table thead {
    display: none;
  }

  .inspection-lane-table,
  .inspection-lane-table tbody,
  .inspection-check {
    display: block;
    width: 100%;
  }

  .inspection-check {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .inspection-check > * {
    display: block;
    padding: 12px 16px;
    border-bottom: 0;
  }

  .inspection-check > :first-child {
    grid-column: 1;
    padding-bottom: 5px;
  }

  .inspection-check .inspection-status {
    grid-column: 2;
    grid-row: 1;
    padding-bottom: 5px;
  }

  .inspection-check .inspection-finding,
  .inspection-check .inspection-action {
    grid-column: 1 / -1;
    padding-top: 5px;
  }

  .inspection-check .inspection-action {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }

  .inspection-check:last-child .inspection-action {
    border-bottom: 0;
  }
}

@media (max-width: 1150px) {
  .describe-step {
    width: min(860px, 100%);
    grid-template-columns: 1fr;
  }

  .hosted-columns {
    grid-template-columns: 1fr;
  }

  .workspace-column-resizer {
    display: none;
  }

  .evidence-sidebar {
    display: none;
  }

  .notebook-scene-slot.active {
    min-height: 320px;
  }

  .notebook-scene-slot.active .notebook-shared-scene {
    display: block;
  }

  .notebook-scene-slot .model-comparison .comparison-viewer,
  .notebook-scene-slot .model-comparison.source-only .comparison-viewer {
    height: clamp(400px, 56vh, 580px);
  }

  .job-contract {
    position: static;
    max-height: none;
  }

  .inspection-lane-table thead {
    display: none;
  }

  .inspection-lane-table,
  .inspection-lane-table tbody,
  .inspection-check {
    display: block;
    width: 100%;
  }

  .inspection-check {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .inspection-check > * {
    display: block;
    padding: 12px 16px;
    border-bottom: 0;
  }

  .inspection-check > :first-child {
    grid-column: 1;
    padding-bottom: 5px;
  }

  .inspection-check .inspection-status {
    grid-column: 2;
    grid-row: 1;
    padding-bottom: 5px;
  }

  .inspection-check .inspection-finding,
  .inspection-check .inspection-action {
    grid-column: 1 / -1;
    padding-top: 5px;
  }

  .inspection-check .inspection-action {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }

  .inspection-check:last-child .inspection-action {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .hosted-workspace,
  .hosted-context,
  .hosted-columns,
  .conversation-pane,
  .conversation-message,
  .job-contract,
  .model-comparison {
    min-width: 0;
    max-width: 100%;
  }

  .conversation-message strong,
  .hosted-context code {
    overflow-wrap: anywhere;
  }

  .model-comparison.source-only .comparison-viewer {
    height: clamp(280px, 54vh, 440px);
  }

  .result-status {
    grid-template-columns: 1fr;
  }

  .result-status > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .inspection-details-body {
    grid-template-columns: 1fr;
  }

  .inspection-details model-viewer {
    min-height: 260px;
  }

  .inspection-table {
    min-width: 720px;
  }

  .inspection-lane-table thead {
    display: none;
  }

  .inspection-lane-table,
  .inspection-lane-table tbody,
  .inspection-check {
    display: block;
    width: 100%;
  }

  .inspection-check {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .inspection-check > * {
    display: block;
    padding: 11px 14px;
    border-bottom: 0;
  }

  .inspection-check > :first-child {
    grid-column: 1;
    padding-bottom: 5px;
  }

  .inspection-check .inspection-status {
    grid-column: 2;
    grid-row: 1;
    padding-bottom: 5px;
  }

  .inspection-check .inspection-finding,
  .inspection-check .inspection-action {
    grid-column: 1 / -1;
    padding-top: 5px;
  }

  .inspection-check .inspection-action {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
  }

  .inspection-check:last-child .inspection-action {
    border-bottom: 0;
  }

  .inspection-check-icon::after {
    right: calc(100% + 12px);
    left: auto;
    transform: translate(4px, -50%);
  }

  .inspection-check-icon:hover::after,
  .inspection-check-icon:focus-visible::after {
    transform: translate(0, -50%);
  }

  .component-proposal {
    grid-template-columns: 1fr;
  }

  .component-disposition {
    text-align: left;
  }

  .conversation-start-form,
  .target-card,
  .hosted-advanced-grid {
    grid-template-columns: 1fr;
  }

  .asset-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-gallery-card model-viewer {
    height: 140px;
  }

  .job-contract-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 18px;
  }

  .description-examples-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .description-examples-content {
    gap: 18px;
    padding: 22px;
  }

  .description-examples-content li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .hosted-context {
    grid-template-columns: 1fr auto;
  }

  .hosted-context p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .evidence-question {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .evidence-question label,
  .evidence-question select,
  .evidence-question .secondary-button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .expectation-group > summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
  }

  .expectation-group > summary span,
  .expectation-group > summary strong {
    grid-column: 1;
  }

  .expectation-group > summary::after {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .confirmation-actions > form,
  .confirmation-actions > form .primary-button,
  .confirmation-actions .intent-adjust,
  .confirmation-actions .intent-adjust > summary {
    width: 100%;
  }

  .feedback-reasons {
    grid-template-columns: 1fr;
  }

  .result-review-actions,
  .result-review-actions details,
  .result-review-actions details form {
    width: 100%;
  }

  .result-review-actions {
    flex-direction: column;
  }

  .result-download-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .gallery-return-button {
    width: 100%;
  }

  .blocked-result-controls,
  .blocked-result-links {
    width: 100%;
  }

  .blocked-result-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .blocked-refinement-trigger,
  .blocked-refinement-form .primary-button,
  .blocked-result-links .secondary-button {
    width: 100%;
  }

  .blocked-refinement-trigger,
  .blocked-refinement-form textarea,
  .blocked-refinement-form .primary-button {
    grid-column: 1;
  }

  .blocked-refinement-trigger,
  .blocked-refinement-form textarea {
    grid-row: 1;
  }

  .blocked-refinement-form .primary-button {
    grid-row: 2;
  }

  .blocked-result-controls.has-refinement > .blocked-result-links,
  .blocked-refinement-form:not([hidden]) + .blocked-result-links {
    grid-column: 1;
  }

  .blocked-result-controls.has-refinement > .blocked-result-links {
    grid-row: 2;
  }

  .blocked-refinement-form:not([hidden]) + .blocked-result-links {
    grid-row: 3;
  }

  .universal-expectations dl div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
