:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-subtle: #f7f9f9;
  --surface-sunken: #eef2f3;
  --ink: #15191b;
  --muted: #59616a;
  --faint: #6a727b;
  --border: #e4e8ea;
  --border-strong: #c9cfd4;
  --accent: #0a757d;
  --accent-hover: #085f66;
  --accent-bright: #12a2ab;
  --accent-soft: #e8f5f5;
  --accent-line: #b0dade;
  --warning: #9a6400;
  --warning-soft: #fff8e6;
  --warning-line: #ecd7a4;
  --danger: #b23a34;
  --danger-soft: #fff2f0;
  --danger-line: #ecc2be;
  --success: #1f7a4d;
  --success-soft: #ecf8f1;
  --sidebar-width: 264px;
  --rail-width: 296px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --radius-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(17, 24, 28, 0.05);
  --shadow-sm: 0 1px 3px rgba(17, 24, 28, 0.06), 0 1px 2px rgba(17, 24, 28, 0.04);
  --shadow-md: 0 6px 16px rgba(17, 24, 28, 0.07), 0 2px 5px rgba(17, 24, 28, 0.04);
  --shadow-lg: 0 26px 64px rgba(17, 24, 28, 0.16), 0 6px 16px rgba(17, 24, 28, 0.06);
  --ring: 0 0 0 3px rgba(10, 117, 125, 0.28);
  --font-ui: "Geist", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-prose: "Geist", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Google Sans Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-code: var(--font-mono);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

:where(a, button, input, textarea, select, summary, dialog, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.noscript-banner {
  padding: 14px 18px;
  color: #fff;
  background: var(--danger);
  font-size: 14px;
  text-align: center;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--rail-width);
  max-width: 1680px;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 16px 20px;
  background: var(--surface);
  color: var(--ink);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 4px;
  margin: -4px;
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
}

.brand-lockup > span:last-child {
  display: grid;
  line-height: 1.25;
}

.brand-lockup strong {
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.brand-lockup small {
  margin-top: 2px;
  color: var(--faint);
  font-family: var(--font-prose);
  font-size: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 10px;
  font-size: 19px;
  font-weight: 700;
}

.prototype-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin: 20px 0 22px;
  padding: 5px 11px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.prototype-tag span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(18, 162, 171, 0.18);
}

.section-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-nav-button {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.section-nav-button:hover {
  color: var(--ink);
  background: var(--surface-sunken);
}

.section-nav-button[aria-current="step"] {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}

.section-nav-code {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
}

.section-nav-button[aria-current="step"] .section-nav-code {
  color: var(--accent);
}

.section-nav-label {
  overflow: hidden;
  font-family: var(--font-prose);
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-nav-button[aria-current="step"] .section-nav-label {
  font-weight: 600;
}

.section-nav-state {
  color: var(--muted);
  font-size: 13px;
}

.section-nav-button.is-complete .section-nav-state {
  color: var(--success);
}

.section-nav-button.is-partial .section-nav-state {
  color: var(--accent);
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 22px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.55;
}

.sidebar-footer p {
  margin: 0;
}

.sidebar-footer .muted {
  color: var(--faint);
}

.mobile-header {
  display: none;
}

.main-column {
  min-width: 0;
  min-height: 100vh;
  padding: 34px clamp(24px, 4vw, 60px) 72px;
  background: var(--surface);
}

.topbar {
  min-height: 58px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow,
.rail-label {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 6px 0 0;
  font-family: var(--font-prose);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 620;
  letter-spacing: -0.028em;
  line-height: 1.2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.save-status {
  color: var(--faint);
  font-size: 13px;
  white-space: nowrap;
}

.progress-track {
  width: 100%;
  height: 6px;
  margin: 26px 0 24px;
  background: var(--surface-sunken);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 260ms ease;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 26px;
  padding: 15px 17px;
  border: 1px solid;
  border-radius: var(--radius);
  font-family: var(--font-prose);
  font-size: 14px;
}

.notice strong {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 620;
  letter-spacing: -0.005em;
}

.notice p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.text-button {
  margin: 9px 0 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.text-button:hover {
  color: var(--accent-hover);
}

.notice-test {
  color: var(--ink);
  background: var(--surface-subtle);
  border-color: var(--border);
}

.notice-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
}

.section-intro {
  margin-bottom: 26px;
  padding: 24px 26px;
  background: var(--accent-soft);
  color: var(--ink);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
}

.section-intro h2 {
  margin: 0 0 9px;
  font-family: var(--font-prose);
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.section-intro p {
  max-width: 740px;
  margin: 0;
  color: #2c4548;
  font-family: var(--font-prose);
  font-size: 15px;
  line-height: 1.65;
}

.section-intro ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #2c4548;
  font-family: var(--font-prose);
  font-size: 14px;
}

.question-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.question-card {
  position: relative;
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  scroll-margin-top: 20px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.question-card:focus-within {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-sm);
}

.question-card.has-error {
  border-color: var(--danger-line);
  background: var(--danger-soft);
}

.question-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.question-code {
  flex: 0 0 auto;
  min-width: 42px;
  padding: 4px 9px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.question-title-wrap {
  min-width: 0;
  flex: 1;
}

.question-title {
  margin: 0;
  font-family: var(--font-prose);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.45;
}

.required-mark {
  color: var(--danger);
  font-family: var(--font-ui);
  font-size: 14px;
  vertical-align: top;
}

.question-help {
  max-width: 790px;
  margin: 8px 0 0;
  color: var(--muted);
  font-family: var(--font-prose);
  font-size: 14px;
  line-height: 1.6;
}

.question-example {
  margin: 13px 0 0;
  padding: 12px 15px;
  color: var(--muted);
  background: var(--surface-subtle);
  border-left: 3px solid var(--accent-line);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-prose);
  font-size: 14px;
}

.info-card {
  padding: 22px 24px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-prose);
}

.info-card.info-accent {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.info-card h3 {
  margin: 0 0 9px;
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -0.012em;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.info-card p + p,
.info-card ul + p {
  margin-top: 11px;
}

.info-card ul {
  margin: 11px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.study-catalog {
  display: grid;
  gap: 26px;
}

.study-catalog-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.study-catalog-summary h3 {
  margin: 5px 0 0;
  font-family: var(--font-prose);
  font-size: 20px;
  font-weight: 630;
  letter-spacing: -0.02em;
}

.study-catalog-summary > strong {
  min-width: 48px;
  color: var(--accent);
  font-size: 30px;
  font-weight: 650;
  text-align: right;
}

.study-catalog-group {
  display: grid;
  gap: 10px;
}

.study-catalog-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px;
}

.study-catalog-group-heading h3 {
  margin: 0;
  font-family: var(--font-prose);
  font-size: 17px;
  font-weight: 630;
  text-transform: capitalize;
}

.study-catalog-group-heading span {
  color: var(--faint);
  font-size: 12px;
}

.study-catalog-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.study-catalog-task {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 18px 20px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.study-catalog-task:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.study-catalog-task.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.study-catalog-task-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.study-catalog-task-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.study-catalog-task-title strong {
  font-family: var(--font-prose);
  font-size: 17px;
  font-weight: 640;
  letter-spacing: -0.015em;
}

.study-catalog-task-title code {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.study-catalog-taxonomy {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.study-catalog-description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-prose);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.study-catalog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.study-catalog-tags > span {
  padding: 2px 8px;
  color: var(--muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 11px;
}

.study-catalog-task-action {
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.study-task-brief {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.study-task-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 17px;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
}

.study-task-header h3 {
  margin: 6px 0 3px;
  font-family: var(--font-prose);
  font-size: 21px;
  font-weight: 630;
  letter-spacing: -0.025em;
}

.study-task-header p {
  margin: 0;
  color: var(--faint);
  font-family: var(--font-prose);
  font-size: 13px;
}

.study-task-header > code {
  max-width: 42%;
  padding: 6px 10px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.study-task-description {
  margin: 0;
  padding: 18px 22px;
  color: var(--ink);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-prose);
  font-size: 14px;
  line-height: 1.7;
}

.study-task-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.study-task-facts > div {
  min-width: 0;
  padding: 13px 22px;
}

.study-task-facts > div + div {
  border-left: 1px solid var(--border);
}

.study-task-facts dt {
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.study-task-facts dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.study-task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
}

.study-task-tags span {
  padding: 4px 10px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}

.study-task-prompt {
  background: var(--surface);
}

.study-task-prompt summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style-position: inside;
}

.study-task-prompt summary:hover {
  color: var(--accent);
  background: var(--surface-subtle);
}

.study-task-prompt summary small {
  color: var(--faint);
  font-size: 12px;
  font-weight: 500;
}

.study-task-prompt pre {
  max-height: 620px;
  margin: 0;
  padding: 20px 22px 24px;
  overflow: auto;
  color: var(--ink);
  background: var(--surface-subtle);
  border-top: 1px solid var(--border);
  font: 13px/1.75 var(--font-mono);
  overflow-wrap: anywhere;
  tab-size: 2;
  white-space: pre-wrap;
}

.study-task-brief.is-compact .study-task-description,
.study-task-brief.is-compact .study-task-facts,
.study-task-brief.is-compact .study-task-tags {
  display: none;
}

.study-task-brief.is-compact .study-task-header {
  padding-block: 14px;
}

.study-task-brief.is-compact .study-task-header h3 {
  font-size: 17px;
}

.review-choice-list {
  display: grid;
  gap: 8px;
}

.review-choice {
  position: relative;
  display: grid;
  grid-template-columns: 18px 40px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 48px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 130ms ease, border-color 130ms ease;
}

.review-choice:hover {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
}

.review-choice:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  box-shadow: inset 3px 0 var(--accent);
}

.review-choice:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.review-choice input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.review-choice-mark {
  min-width: 36px;
  padding: 3px 6px;
  color: var(--muted);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
}

.review-choice:has(input:checked) .review-choice-mark {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.review-choice-copy {
  display: grid;
  gap: 4px;
  font-family: var(--font-prose);
}

.review-choice-copy strong {
  font-size: 15px;
  font-weight: 620;
}

.review-choice-copy small {
  max-width: 760px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.review-open-response {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.review-open-response > label {
  color: var(--ink);
  font-family: var(--font-prose);
  font-size: 14px;
  font-weight: 600;
}

.review-open-response .text-area {
  min-height: 92px;
}

.review-basis {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  margin-top: 16px;
  padding: 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

.review-basis > label {
  color: var(--ink);
  font-family: var(--font-prose);
  font-size: 14px;
  font-weight: 600;
}

.review-basis > span {
  color: var(--faint);
  font-size: 12px;
}

.review-basis .text-area {
  grid-column: 1 / -1;
  min-height: 105px;
  background: var(--surface);
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 46px;
  padding: 12px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: default;
  transition: background 130ms ease, border-color 130ms ease;
}

.choice-row:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}

.choice-row:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.choice-row:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.choice-row > input[type="radio"],
.choice-row > input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.choice-label {
  cursor: pointer;
  font-family: var(--font-prose);
  font-size: 15px;
  line-height: 1.5;
}

.choice-support {
  grid-column: 2;
  display: grid;
  gap: 7px;
  margin-top: -6px;
  color: var(--muted);
  font-family: var(--font-prose);
  font-size: 13px;
  line-height: 1.55;
}

.choice-description,
.choice-note {
  display: block;
}

.choice-note {
  color: var(--ink);
  font-weight: 600;
}

.inline-other {
  grid-column: 2;
  width: 100%;
  margin-top: 6px;
}

.text-list {
  display: grid;
  gap: 8px;
}

.text-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.text-list-row.is-multiline {
  align-items: start;
}

.text-list-field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.text-list-item-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.text-list-textarea {
  min-height: 104px;
}

.text-list-row.is-multiline .text-list-remove {
  margin-top: 28px;
}

.text-list-remove {
  width: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 18px;
}

.text-list-actions {
  margin-top: 2px;
}

.text-list-add {
  width: auto;
}

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

.field-group {
  display: grid;
  gap: 7px;
}

.field-group.span-2 {
  grid-column: 1 / -1;
}

.field-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.text-input,
.text-area,
.select-input,
.number-input {
  width: 100%;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 130ms ease, box-shadow 130ms ease;
}

.text-input,
.select-input,
.number-input {
  min-height: 46px;
  padding: 11px 13px;
}

.text-area {
  min-height: 118px;
  padding: 12px 14px;
  resize: vertical;
  font-family: var(--font-prose);
  line-height: 1.6;
}

.text-input:focus,
.text-area:focus,
.select-input:focus,
.number-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.text-input::placeholder,
.text-area::placeholder {
  color: #949ba2;
}

.char-count {
  color: var(--faint);
  font-size: 12px;
  text-align: right;
}

.field-error {
  min-height: 0;
  margin: 8px 0 0;
  color: var(--danger);
  font-family: var(--font-prose);
  font-size: 13px;
  font-weight: 500;
}

.scale-grid {
  display: grid;
  grid-template-columns: repeat(var(--scale-columns, 5), minmax(0, 1fr));
  gap: 8px;
}

.scale-option {
  position: relative;
  min-height: 84px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 10px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: background 130ms ease, border-color 130ms ease;
}

.scale-option:hover {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
}

.scale-option:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.scale-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.scale-option input {
  position: absolute;
  opacity: 0;
}

.scale-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 620;
}

.scale-option:has(input:checked) .scale-number {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.scale-number.scale-marker-text {
  width: auto;
  min-width: 38px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
}

.scale-label {
  color: var(--muted);
  font-family: var(--font-prose);
  font-size: 12px;
  line-height: 1.3;
}

.constant-sum-list {
  display: grid;
  gap: 10px;
}

.constant-sum-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
  gap: 16px;
  padding: 12px 15px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.constant-sum-row label {
  font-family: var(--font-prose);
  font-size: 14px;
}

.number-wrap {
  position: relative;
}

.number-wrap .number-input {
  padding-right: 32px;
  text-align: right;
}

.number-wrap span {
  position: absolute;
  right: 12px;
  top: 50%;
  color: var(--faint);
  font-size: 14px;
  transform: translateY(-50%);
}

.sum-total {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 11px;
  font-size: 14px;
}

.sum-total strong {
  min-width: 62px;
  color: var(--accent);
  text-align: right;
}

.sum-total.is-invalid strong {
  color: var(--danger);
}

.matrix-scroll {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.matrix-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  table-layout: fixed;
}

.matrix-table th,
.matrix-table td {
  padding: 11px 9px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.matrix-table th:last-child,
.matrix-table td:last-child {
  border-right: 0;
}

.matrix-table tr:last-child td {
  border-bottom: 0;
}

.matrix-table thead th {
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: none;
}

.matrix-table .matrix-row-label {
  width: 35%;
  min-width: 210px;
  padding-left: 14px;
  font-family: var(--font-prose);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.matrix-cell label {
  width: 100%;
  height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.matrix-cell input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.matrix-cell:has(input:checked) {
  background: var(--accent-soft);
}

.matrix-cell:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.repeater-list {
  display: grid;
  gap: 14px;
}

.repeater-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
}

.repeater-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
  color: var(--ink);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 620;
  letter-spacing: 0;
}

.repeater-card-heading {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: baseline;
  gap: 10px;
}

.tool-summary {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-prose);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repeater-card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.repeater-card-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.repeater-card.has-error {
  border-color: var(--danger-line);
}

.tool-check-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.tool-check-fieldset legend {
  margin-bottom: 7px;
  padding: 0;
}

.tool-other-field {
  display: grid;
  max-width: 560px;
  gap: 7px;
  margin-top: 9px;
}

.tool-entry-error {
  display: none;
  grid-column: 1 / -1;
  margin: 0;
  color: var(--danger);
  font-family: var(--font-prose);
  font-size: 13px;
}

.tool-entry-error:not(:empty) {
  display: block;
}

.mini-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mini-check {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-prose);
  font-size: 13px;
  cursor: pointer;
  transition: background 130ms ease, border-color 130ms ease;
}

.mini-check span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.mini-check:hover {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
}

.mini-check:has(input:checked) {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.mini-check:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mini-check input {
  accent-color: var(--accent);
}

.repeater-actions {
  margin-top: 12px;
}

.workflow-simple-editor {
  display: grid;
  gap: 12px;
}

.workflow-step-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.workflow-step-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
}

.workflow-step-row:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.workflow-step-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-top: 23px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}

.workflow-step-fields {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.workflow-step-fields label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 620;
}

.workflow-step-name,
.workflow-step-detail {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  transition: border-color 130ms ease, box-shadow 130ms ease;
}

.workflow-step-detail {
  color: var(--muted);
  font-size: 13px;
}

.workflow-step-name:focus,
.workflow-step-detail:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.workflow-step-name::placeholder,
.workflow-step-detail::placeholder {
  color: #949ba2;
}

.workflow-step-actions {
  display: flex;
  gap: 5px;
  padding-top: 22px;
}

.workflow-step-actions button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  color: var(--muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  font-size: 16px;
  cursor: pointer;
}

.workflow-step-actions button:hover:not(:disabled) {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.workflow-step-actions .workflow-step-remove:hover:not(:disabled) {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-line);
}

.workflow-step-actions button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.workflow-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-subtle);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.workflow-toolbar-copy {
  display: grid;
  gap: 3px;
}

.workflow-toolbar-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 620;
  letter-spacing: 0;
}

.workflow-toolbar-copy span {
  color: var(--muted);
  font-size: 13px;
}

.workflow-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workflow-toolbar .button {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--border-strong);
}

.workflow-toolbar .button:hover {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--accent-line);
}

.workflow-toolbar .workflow-add-block {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.workflow-toolbar .workflow-add-block:hover {
  color: #fff;
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.workflow-preview {
  padding: 16px;
  color: var(--ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
}

.workflow-preview h4 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.workflow-preview-connections {
  display: grid;
  gap: 6px;
  color: #2c4548;
  font-size: 13px;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 130ms ease, border-color 130ms ease, color 130ms ease, box-shadow 130ms ease;
}

.button {
  min-height: 44px;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button-primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-xs);
}

.button-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button-secondary {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.button-secondary:hover:not(:disabled) {
  color: var(--accent-hover);
  background: #dcefef;
}

.button-ghost {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--border-strong);
}

.button-ghost:hover:not(:disabled) {
  color: var(--ink);
  background: var(--surface-subtle);
  border-color: var(--faint);
}

.button-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-line);
}

.button-small {
  min-height: 36px;
  padding: 6px 12px;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--border-strong);
  font-size: 13px;
}

.button.button-small.button-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-line);
}

.tool-done-button {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.button-full {
  width: 100%;
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 1px solid var(--border-strong);
  font-size: 18px;
}

.icon-button:hover {
  background: var(--surface-subtle);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.form-footer-right {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.flexible-submit-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 28px;
  padding: 17px 18px;
  color: var(--ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
}

.flexible-submit-note[hidden] {
  display: none;
}

.flexible-submit-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
}

.flexible-submit-note strong {
  font-size: 14px;
  font-weight: 650;
}

.flexible-submit-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-family: var(--font-prose);
  font-size: 14px;
  line-height: 1.55;
}

.context-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 34px 22px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
}

.rail-card {
  margin-bottom: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.flexible-submit-card {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.rail-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.rail-card-header strong {
  color: var(--accent);
  font-size: 16px;
  font-weight: 650;
}

.completion-ring-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  margin: 14px auto;
}

.completion-ring {
  width: 132px;
  height: 132px;
  transform: rotate(-90deg);
}

.completion-ring circle {
  fill: none;
  stroke-width: 8;
}

.ring-track {
  stroke: var(--surface-sunken);
}

.ring-value {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 301.59;
  stroke-dashoffset: 301.59;
  transition: stroke-dashoffset 250ms ease;
}

.completion-center {
  position: absolute;
  display: grid;
  text-align: center;
}

.completion-center strong {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.completion-center span {
  color: var(--muted);
  font-family: var(--font-prose);
  font-size: 12px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--border);
}

.status-grid div {
  min-width: 0;
  padding: 13px 5px 0;
  text-align: center;
}

.status-grid dt {
  color: var(--faint);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

.status-grid dd {
  margin: 4px 0 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-card h2 {
  margin: 8px 0;
  font-family: var(--font-prose);
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.rail-card p {
  margin: 0 0 15px;
  color: var(--muted);
  font-family: var(--font-prose);
  font-size: 13px;
  line-height: 1.6;
}

.rail-new-response {
  display: block;
  margin: 12px auto 0;
}

.rail-card-compact a {
  display: block;
  margin-top: 10px;
  padding: 2px 0;
  color: var(--accent);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.rail-card-compact a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.modal {
  width: min(560px, calc(100vw - 28px));
  padding: 0;
  background: transparent;
  border: 0;
}

.modal::backdrop {
  background: rgba(15, 22, 26, 0.55);
  backdrop-filter: blur(3px);
}

.modal-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.modal-card > p {
  color: var(--muted);
  font-family: var(--font-prose);
  font-size: 14px;
  line-height: 1.6;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-header h2,
.success-card h2 {
  margin: 6px 0 0;
  font-family: var(--font-prose);
  font-size: 23px;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.modal-actions-spread {
  justify-content: space-between;
}

.recovery-input {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.key-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding: 15px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
}

.key-display code {
  min-width: 0;
  color: #0b3d41;
  font-family: var(--font-mono);
  font-size: clamp(13px, 2.3vw, 15px);
  font-weight: 600;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

.success-card {
  text-align: center;
}

.success-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
  color: #fff;
  background: var(--success);
  border-radius: 50%;
  font-size: 26px;
}

.success-card .eyebrow {
  color: var(--success);
}

.success-card > p {
  margin: 12px auto;
}

.fine-print {
  font-size: 13px !important;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 13px 16px;
  color: #f2f6f7;
  background: #1d2528;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-prose);
  font-size: 14px;
  animation: toast-in 160ms ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1220px) {
  :root {
    --rail-width: 250px;
    --sidebar-width: 232px;
  }

  .main-column {
    padding-inline: 28px;
  }

  .context-rail {
    padding-inline: 16px;
  }
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .context-rail {
    display: none;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
    box-shadow: none;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    color: var(--ink);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }

  .mobile-header .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .sidebar {
    position: fixed;
    inset: 59px 0 auto 0;
    z-index: 40;
    width: 100%;
    height: calc(100vh - 59px);
    display: none;
    padding: 18px;
    border-right: 0;
  }

  .sidebar.is-open {
    display: flex;
  }

  .sidebar-top .brand-lockup,
  .sidebar-top .prototype-tag {
    display: none;
  }

  .main-column {
    min-height: calc(100vh - 59px);
    padding: 24px 16px 56px;
  }

  .topbar {
    display: block;
  }

  .topbar-actions {
    justify-content: space-between;
    margin-top: 16px;
  }

  .section-intro,
  .question-card {
    padding: 20px 18px;
  }

  .question-header {
    gap: 10px;
  }

  .question-code {
    min-width: 38px;
  }

  .study-task-header {
    display: grid;
    padding: 18px;
  }

  .study-catalog-summary,
  .study-catalog-task {
    padding: 17px;
  }

  .study-catalog-task {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .study-catalog-task-title {
    display: grid;
    gap: 2px;
  }

  .study-catalog-task-action {
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .study-task-header > code {
    max-width: 100%;
    width: fit-content;
  }

  .study-task-description,
  .study-task-prompt pre {
    padding-inline: 18px;
  }

  .study-task-facts {
    grid-template-columns: 1fr;
  }

  .study-task-facts > div {
    padding-inline: 18px;
  }

  .study-task-facts > div + div {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .study-task-tags,
  .study-task-prompt summary {
    padding-inline: 18px;
  }

  .review-choice {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .review-choice-mark {
    display: none;
  }

  .review-basis {
    grid-template-columns: 1fr;
  }

  .review-basis .text-area {
    grid-column: 1;
  }

  .field-grid,
  .repeater-card-body {
    grid-template-columns: 1fr;
  }

  .repeater-card-header,
  .repeater-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-summary {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .repeater-card-actions {
    width: 100%;
  }

  .repeater-card-actions .button {
    min-height: 44px;
    flex: 1 1 0;
  }

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

  .scale-option {
    min-height: 48px;
    grid-template-columns: 34px minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }

  .constant-sum-row {
    grid-template-columns: 1fr 90px;
  }

  .workflow-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-step-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .workflow-step-number {
    margin-top: 23px;
  }

  .workflow-step-actions {
    grid-column: 2;
    padding-top: 2px;
  }

  .workflow-step-actions button {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .workflow-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-toolbar-actions .button {
    min-width: 0;
    padding-inline: 8px;
  }

  .form-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .form-footer > .button,
  .form-footer-right,
  .form-footer-right .button {
    width: 100%;
  }

  .modal-actions-spread {
    flex-direction: column-reverse;
  }

  .modal-actions-spread .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
