:root {
  --navy-950: #071426;
  --navy-900: #0b1f3a;
  --navy-800: #12345b;
  --blue-650: #1f6094;
  --gold-500: #d9a62e;
  --gold-300: #f2d47b;
  --green-600: #147a5b;
  --red-600: #b42335;
  --ink: #172231;
  --muted: #617083;
  --line: #dce3eb;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --shadow: 0 18px 48px rgba(7, 20, 38, 0.13);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface-soft);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -12%, rgba(217, 166, 46, 0.16), transparent 30rem),
    radial-gradient(circle at 100% 0%, rgba(31, 96, 148, 0.14), transparent 34rem),
    var(--surface-soft);
}

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

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

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 56px);
  color: #fff;
  background: rgba(7, 20, 38, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.32));
}

.brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.brand-copy span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

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

.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  white-space: nowrap;
}

.session-chip::before {
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: #4bd0a0;
  box-shadow: 0 0 0 4px rgba(75, 208, 160, 0.15);
}

.main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(38px, 7vw, 80px) 0 64px;
}

.hero {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin-bottom: 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--blue-650);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 2px;
  content: "";
  background: var(--gold-500);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--navy-950);
  font-size: clamp(2.15rem, 6vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero p {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.65;
}

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

.option-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 188px;
  padding: clamp(24px, 4vw, 36px);
  overflow: hidden;
  border: 1px solid rgba(18, 52, 91, 0.1);
  border-radius: var(--radius-xl);
  color: inherit;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.option-card::after {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 170px;
  height: 170px;
  content: "";
  border-radius: 50%;
  background: rgba(217, 166, 46, 0.08);
}

.option-card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 166, 46, 0.65);
  box-shadow: 0 24px 60px rgba(7, 20, 38, 0.18);
}

.option-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 19px;
  color: #fff;
  background: linear-gradient(145deg, var(--navy-800), var(--blue-650));
  box-shadow: 0 12px 24px rgba(18, 52, 91, 0.22);
}

.option-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

.option-copy h2 {
  margin-bottom: 8px;
  color: var(--navy-950);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  letter-spacing: -0.02em;
}

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

.option-arrow {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--navy-900);
  background: #f1f4f8;
  font-size: 1.2rem;
  font-weight: 800;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid #d9e3ee;
  border-radius: var(--radius-md);
  color: #44566a;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.5;
}

.notice strong {
  color: var(--navy-900);
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--navy-900);
  box-shadow: 0 8px 20px rgba(7, 20, 38, 0.17);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.button:hover {
  background: var(--navy-800);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--navy-900);
  background: #e9eef4;
  box-shadow: none;
}

.button.compact {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 0.84rem;
}

.button.ghost {
  min-height: 38px;
  padding: 7px 13px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  box-shadow: none;
}

.button.danger {
  background: var(--red-600);
}

.button[disabled] {
  opacity: 0.58;
  cursor: wait;
  transform: none;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.7fr);
  background: var(--navy-950);
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(30px, 6vw, 78px);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(7, 20, 38, 0.72), rgba(7, 20, 38, 0.95)),
    radial-gradient(circle at 25% 28%, rgba(217, 166, 46, 0.34), transparent 24rem),
    linear-gradient(120deg, var(--navy-800), var(--navy-950));
}

.auth-story::after {
  position: absolute;
  right: -130px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.025), 0 0 0 140px rgba(255, 255, 255, 0.018);
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.35));
}

.auth-brand strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-brand span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
}

.auth-message {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.auth-message h1 {
  color: #fff;
  font-size: clamp(2.7rem, 7vw, 6.5rem);
}

.auth-message p {
  max-width: 560px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.auth-footnote {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
}

.auth-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px;
  background: #fff;
}

.auth-card {
  width: min(100%, 420px);
}

.auth-card .eyebrow {
  margin-bottom: 18px;
}

.auth-card h2 {
  margin-bottom: 12px;
  color: var(--navy-950);
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.04em;
}

.auth-card > p {
  margin-bottom: 30px;
  color: var(--muted);
  line-height: 1.6;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field label {
  color: var(--navy-900);
  font-size: 0.86rem;
  font-weight: 750;
}

.field input,
.field select,
.field textarea,
.search-input {
  width: 100%;
  min-height: 54px;
  padding: 12px 15px;
  border: 1px solid #cdd7e2;
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.5;
}

.field select {
  cursor: pointer;
}

.pin-input {
  text-align: center;
  font-size: 1.65rem;
  font-weight: 750;
  letter-spacing: 0.34em;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-input:focus,
.button:focus-visible,
.option-card:focus-visible,
.filter-button:focus-visible,
.choice-option:focus-within,
.checkbox-field:focus-within,
.review-confirmation:focus-within {
  border-color: var(--blue-650);
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 96, 148, 0.14);
}

.auth-card .button {
  width: 100%;
}

.form-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.form-message.error {
  color: var(--red-600);
}

.form-message.success {
  color: var(--green-600);
}

.document-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 24px 0;
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-button {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #d5dee8;
  border-radius: 999px;
  color: #4c5d70;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.filter-button.active {
  color: #fff;
  border-color: var(--navy-900);
  background: var(--navy-900);
}

.document-list {
  display: grid;
  gap: 12px;
}

.catalog-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.catalog-status .form-message {
  margin: 0;
}

.document-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 7px 22px rgba(7, 20, 38, 0.055);
}

.document-file-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 54px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue-650), var(--navy-800));
  font-size: 0.72rem;
  font-weight: 850;
}

.document-copy h2 {
  margin-bottom: 5px;
  color: var(--navy-950);
  font-size: 1rem;
}

.document-copy p {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.document-meta {
  color: #718095;
  font-size: 0.76rem;
}

.document-meta-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.document-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #0d684c;
  background: #e1f5ed;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.document-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.document-actions .button {
  min-width: 112px;
}

.empty-state {
  padding: 44px 24px;
  text-align: center;
  border: 1px dashed #c8d3df;
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
}

.document-form-main {
  width: min(960px, calc(100% - 32px));
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 0.84rem;
}

.breadcrumb a {
  color: var(--blue-650);
  font-weight: 750;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.document-form-hero {
  display: grid;
  gap: 13px;
  max-width: 780px;
  margin-bottom: 28px;
}

.document-form-hero h1 {
  font-size: clamp(2.05rem, 6vw, 3.8rem);
  line-height: 1.02;
}

.document-form-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.workflow-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #68778a;
  background: rgba(255, 255, 255, 0.64);
  font-size: 0.84rem;
  font-weight: 750;
}

.workflow-steps li span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #637287;
  background: #e8edf3;
  font-size: 0.74rem;
}

.workflow-steps li[aria-current="step"] {
  color: #fff;
  border-color: var(--navy-900);
  background: var(--navy-900);
}

.workflow-steps li[aria-current="step"] span {
  color: var(--navy-950);
  background: var(--gold-300);
}

.status-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 180px;
  text-align: center;
}

.status-panel p {
  margin: 0;
}

.status-panel .form-message {
  max-width: 560px;
}

.loading-indicator {
  width: 25px;
  height: 25px;
  border: 3px solid #d7e0ea;
  border-top-color: var(--blue-650);
  border-radius: 50%;
  animation: loading-spin 750ms linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

.flow-stage {
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow);
}

.flow-stage:focus {
  outline: none;
}

.stage-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.stage-heading > div {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 11px;
}

.stage-heading h2 {
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.stage-heading > p {
  max-width: 390px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: right;
}

.stage-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #fff;
  background: var(--navy-900);
  font-size: 0.82rem;
  font-weight: 850;
}

.form-sections {
  display: grid;
  gap: 22px;
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 22px;
  border: 1px solid #dce4ed;
  border-radius: var(--radius-lg);
  background: #fafbfd;
}

.form-section > legend {
  max-width: 100%;
  padding: 0 8px;
  color: var(--navy-900);
  font-size: 1rem;
  font-weight: 850;
}

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

.form-field {
  min-width: 0;
  margin: 0;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.required-mark {
  color: var(--red-600);
}

.choice-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend {
  margin-bottom: 9px;
  padding: 0;
  color: var(--navy-900);
  font-size: 0.86rem;
  font-weight: 750;
}

.choice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-option,
.checkbox-field,
.review-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #d5dee8;
  border-radius: 13px;
  color: #35475b;
  background: #fff;
  line-height: 1.45;
  cursor: pointer;
}

.choice-option input,
.checkbox-field input,
.review-confirmation input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--navy-800);
}

.checkbox-field {
  min-height: 54px;
}

.flow-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  margin-top: 24px;
}

.split-actions {
  justify-content: space-between;
}

.flow-actions-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
}

.review-sections {
  display: grid;
  gap: 18px;
}

.review-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.review-section h3 {
  margin: 0;
  padding: 15px 18px;
  color: var(--navy-900);
  background: #f0f4f8;
  font-size: 1rem;
}

.review-list {
  margin: 0;
}

.review-list > div {
  display: grid;
  grid-template-columns: minmax(160px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  padding: 14px 18px;
  border-top: 1px solid #e5eaf0;
}

.review-list dt {
  color: #647489;
  font-size: 0.82rem;
  font-weight: 750;
}

.review-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.review-confirmation {
  margin-top: 22px;
  border-color: #c7d6e5;
  background: #f6f9fc;
  font-weight: 700;
}

.confirmation-card {
  display: grid;
  justify-items: center;
  text-align: center;
}

.confirmation-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 50%;
  color: #fff;
  background: var(--green-600);
  box-shadow: 0 12px 30px rgba(20, 122, 91, 0.24);
  font-size: 2rem;
  font-weight: 850;
}

.confirmation-card h2 {
  margin: 12px 0 10px;
  color: var(--navy-950);
  font-size: clamp(1.65rem, 4vw, 2.35rem);
}

.confirmation-card > p {
  max-width: 580px;
  color: var(--muted);
  line-height: 1.55;
}

.confirmation-details {
  width: min(100%, 660px);
  margin: 20px 0 4px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.confirmation-details > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 17px;
  border-top: 1px solid var(--line);
}

.confirmation-details > div:first-child {
  border-top: 0;
}

.confirmation-details dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.confirmation-details dd {
  min-width: 0;
  margin: 0;
  color: var(--navy-900);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.confirmation-actions {
  justify-content: center;
}

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

.panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin-bottom: 8px;
  color: var(--navy-950);
}

.panel p {
  color: var(--muted);
  line-height: 1.55;
}

.admin-facts {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.admin-facts > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.admin-facts dt {
  color: var(--muted);
  font-size: .82rem;
}

.admin-facts dd {
  margin: 0;
  color: var(--navy-900);
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.qr-frame {
  display: grid;
  place-items: center;
  min-height: 280px;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.qr-frame img {
  width: min(250px, 84%);
  height: auto;
}

.hidden {
  display: none !important;
}

.page-footer {
  width: min(1120px, calc(100% - 32px));
  margin: auto auto 0;
  padding: 24px 0 34px;
  color: #7b8795;
  font-size: 0.76rem;
  text-align: center;
}

@media (max-width: 860px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-story {
    min-height: 34vh;
    padding: 28px 24px 36px;
  }

  .auth-message h1 {
    margin-top: 42px;
    font-size: clamp(2.5rem, 12vw, 4.5rem);
  }

  .auth-message p,
  .auth-footnote {
    display: none;
  }

  .auth-panel {
    min-height: 66vh;
    padding: 36px 24px;
    border-radius: 28px 28px 0 0;
    margin-top: -24px;
    position: relative;
    z-index: 2;
  }

  .option-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .document-toolbar {
    grid-template-columns: 1fr;
  }

  .dynamic-fields-grid {
    grid-template-columns: 1fr;
  }

  .form-field-wide {
    grid-column: auto;
  }

  .stage-heading {
    display: grid;
    gap: 10px;
  }

  .stage-heading > p {
    max-width: none;
    text-align: left;
  }

  .split-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .flow-actions-group {
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 66px;
    padding: 9px 14px;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand-copy span,
  .session-chip {
    display: none;
  }

  .main {
    width: min(100% - 24px, 1120px);
    padding-top: 32px;
  }

  h1 {
    font-size: clamp(2.2rem, 13vw, 3.2rem);
  }

  .option-card {
    grid-template-columns: 54px 1fr;
    min-height: 160px;
    padding: 22px;
  }

  .option-icon {
    width: 54px;
    height: 54px;
  }

  .option-arrow {
    display: none;
  }

  .document-item {
    grid-template-columns: 42px 1fr;
    align-items: start;
  }

  .document-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .document-actions .button {
    flex: 1 1 140px;
    width: 100%;
  }

  .document-form-main {
    width: min(100% - 24px, 960px);
  }

  .breadcrumb {
    margin-bottom: 22px;
  }

  .workflow-steps {
    gap: 5px;
  }

  .workflow-steps li {
    justify-content: center;
    gap: 6px;
    min-height: 46px;
    padding: 7px 5px;
    font-size: 0.7rem;
    text-align: center;
  }

  .workflow-steps li span {
    width: 23px;
    height: 23px;
    font-size: 0.66rem;
  }

  .flow-stage {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .form-section {
    padding: 18px 14px;
  }

  .choice-options {
    display: grid;
  }

  .review-list > div,
  .confirmation-details > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .flow-actions,
  .flow-actions-group,
  .confirmation-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .flow-actions .button,
  .flow-actions-group .button,
  .confirmation-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
