:root {
  --color-brand: #173b2d;
  --color-brand-strong: #0e2c22;
  --color-brand-soft: #dfe9e3;
  --color-on-brand: #fffdf8;
  --color-accent: #bd7a12;
  --color-accent-soft: #f6e8c7;
  --color-page: #f3f1eb;
  --color-surface: #fffdf8;
  --color-surface-muted: #ecefe9;
  --color-text: #18251f;
  --color-text-muted: #526159;
  --color-border: #cbd4ce;
  --color-border-strong: #87958e;
  --color-success: #18563b;
  --color-success-soft: #e2f0e7;
  --color-pending: #684100;
  --color-danger: #8b2b22;
  --color-danger-soft: #fbeae5;
  --color-focus: #f0b64a;
  --shadow-low: 0 1px 2px rgb(14 44 34 / 8%);
  --shadow-raised: 0 12px 32px rgb(14 44 34 / 10%);
  --radius-sm: 4px;
  --radius-md: 8px;
  --content-width: 1120px;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Noto Serif TC", "Source Han Serif TC", "Songti TC", serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--color-text);
  background: var(--color-page);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--color-page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--color-page);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

button {
  min-height: 44px;
  cursor: pointer;
}

a {
  color: var(--color-brand);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-brand-strong);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

h1,
h2,
h3 {
  color: var(--color-text);
  line-height: 1.25;
}

h1,
h2 {
  font-family: var(--font-display);
}

h1 {
  max-width: 20ch;
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--color-on-brand);
  color: var(--color-brand-strong);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 180ms ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header {
  border-bottom: 1px solid rgb(255 253 248 / 20%);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.app-header__inner,
.primary-nav__inner {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
}

.app-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 88px;
  padding-block: 16px;
}

.brand-lockup {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  color: var(--color-on-brand);
  text-decoration: none;
}

.brand-lockup:hover {
  color: var(--color-on-brand);
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, 1fr);
  width: 40px;
  height: 40px;
  border: 1px solid rgb(255 253 248 / 74%);
}

.brand-mark span {
  border-right: 1px solid rgb(255 253 248 / 48%);
}

.brand-mark span:nth-child(2) {
  align-self: end;
  height: 60%;
  background: var(--color-accent);
}

.brand-mark span:last-child {
  border-right: 0;
}

.brand-copy {
  display: grid;
  line-height: 1.25;
}

.brand-eyebrow {
  color: #d7e4dc;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.jurisdiction {
  display: none;
  line-height: 1.3;
  text-align: right;
}

.jurisdiction span {
  display: block;
  color: #d7e4dc;
  font-size: 0.75rem;
}

.jurisdiction strong {
  font-size: 0.95rem;
}

.logout-form {
  margin: 0;
}

.header-button {
  min-width: 72px;
  padding: 8px 16px;
  border: 1px solid rgb(255 253 248 / 48%);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-on-brand);
  font-weight: 700;
  transition: background-color 180ms ease-out, border-color 180ms ease-out;
}

.header-button:hover {
  border-color: var(--color-on-brand);
  background: rgb(255 253 248 / 10%);
}

.header-button:active {
  background: rgb(0 0 0 / 14%);
}

.primary-nav {
  border-top: 1px solid rgb(255 253 248 / 18%);
  background: var(--color-brand-strong);
}

.primary-nav__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.primary-nav a,
.primary-nav--status span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px;
  border-bottom: 3px solid transparent;
  color: #edf4ef;
  font-size: 0.875rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease-out, border-color 180ms ease-out;
}

.primary-nav a:hover {
  background: rgb(255 253 248 / 8%);
  color: var(--color-on-brand);
}

.primary-nav a:active {
  background: rgb(0 0 0 / 16%);
}

.primary-nav a[aria-current="page"] {
  border-bottom-color: var(--color-focus);
  background: rgb(255 253 248 / 7%);
  color: var(--color-on-brand);
}

.primary-nav--status .primary-nav__inner {
  grid-template-columns: 1fr;
}

.primary-nav--status span {
  justify-content: flex-start;
}

.page-shell {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  padding-block: 32px 64px;
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--color-brand);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-kicker--light {
  color: #d7e4dc;
}

.page-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border-strong);
}

.page-heading > div:first-child {
  max-width: 68ch;
}

.page-heading p:not(.section-kicker) {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.dashboard-heading {
  align-items: center;
}

.context-stamp {
  min-width: 160px;
  padding: 12px 16px;
  border-left: 4px solid var(--color-accent);
  background: var(--color-surface);
  box-shadow: var(--shadow-low);
  line-height: 1.35;
}

.context-stamp span {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.context-stamp strong {
  font-size: 1.05rem;
}

.back-nav {
  margin-bottom: 24px;
}

.back-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.back-nav a::before {
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.workspace-toolbar {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-strong);
}

.workspace-toolbar__title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  min-width: 0;
}

.workspace-toolbar__title .back-nav {
  flex: 0 0 auto;
  margin: 0;
}

.workspace-toolbar__title .back-nav a {
  font-size: 0.875rem;
}

.workspace-toolbar__title .section-kicker {
  margin-bottom: 2px;
}

.workspace-toolbar__title h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.workspace-toolbar .list-progress {
  min-width: 0;
  padding: 12px;
}

.workspace-toolbar .list-progress > span {
  margin-bottom: 8px;
}

.workspace-toolbar .list-progress strong {
  margin-right: 4px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-brand);
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out, box-shadow 180ms ease-out;
}

.button:hover {
  border-color: var(--color-brand-strong);
  background: var(--color-brand-soft);
  color: var(--color-brand-strong);
}

.button:active {
  box-shadow: inset 0 2px 4px rgb(14 44 34 / 18%);
}

.button.primary {
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.button.primary:hover {
  border-color: var(--color-brand-strong);
  background: var(--color-brand-strong);
  color: var(--color-on-brand);
}

.button.secondary {
  background: transparent;
}

.button--full {
  width: 100%;
}

.button.primary.button--light {
  border-color: var(--color-on-brand);
  background: var(--color-on-brand);
  color: var(--color-brand-strong);
}

.button.primary.button--light:hover {
  border-color: var(--color-focus);
  background: var(--color-accent-soft);
  color: var(--color-brand-strong);
}

.button.compact {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 0.875rem;
}

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

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

.login-page {
  background: var(--color-brand-strong);
}

.login-shell {
  display: grid;
  width: min(1184px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--color-surface);
}

.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  padding: 32px 24px;
  overflow: hidden;
  border-bottom: 8px solid var(--color-accent);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.login-intro h1 {
  color: var(--color-on-brand);
  font-size: clamp(2.4rem, 6vw, 4.75rem);
}

.login-intro p:not(.section-kicker) {
  max-width: 38ch;
  color: #e4eee8;
  font-size: 1.05rem;
}

.login-intro__topline {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.brand-mark--light {
  width: 36px;
  height: 36px;
}

.login-intro__copy {
  position: relative;
  z-index: 1;
  margin-block: 56px 24px;
}

.login-ledger {
  display: grid;
  gap: 12px;
  width: min(320px, 78%);
}

.login-ledger span {
  display: block;
  height: 1px;
  background: rgb(255 253 248 / 34%);
}

.login-ledger span:nth-child(2) {
  width: 72%;
}

.login-ledger span:nth-child(3) {
  width: 45%;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 24px;
  background: var(--color-surface);
}

.auth-panel__header {
  max-width: 34rem;
  margin-bottom: 24px;
}

.auth-panel__header h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.auth-panel__header > p:last-child {
  color: var(--color-text-muted);
}

.security-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-soft);
}

.security-note p {
  color: #4f3a14;
  font-size: 0.875rem;
}

.security-note__mark {
  position: relative;
  display: block;
  width: 24px;
  height: 28px;
  border: 2px solid var(--color-pending);
  border-radius: 12px 12px 8px 8px;
}

.security-note__mark::after {
  position: absolute;
  top: 7px;
  left: 8px;
  width: 5px;
  height: 8px;
  border-right: 2px solid var(--color-pending);
  border-bottom: 2px solid var(--color-pending);
  content: "";
  transform: rotate(45deg);
}

.alert,
[role="alert"] {
  margin-bottom: 24px;
  padding: 12px 16px;
  border: 1px solid #d99c94;
  border-left: 4px solid var(--color-danger);
  border-radius: var(--radius-sm);
  background: var(--color-danger-soft);
  color: #70231c;
  font-weight: 650;
}

.form-stack,
.survey-form {
  display: grid;
  gap: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

.field > label,
fieldset > legend {
  color: var(--color-text);
  font-weight: 750;
}

input:not([type="hidden"]):not([type="radio"]),
textarea {
  width: 100%;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out;
}

input:not([type="hidden"]):not([type="radio"]) {
  min-height: 48px;
  padding: 10px 12px;
}

textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

input:hover,
textarea:hover {
  border-color: var(--color-brand);
}

input:focus-visible,
textarea:focus-visible {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 1px var(--color-brand);
}

.field-help {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.required-mark {
  color: var(--color-danger);
  font-weight: 800;
}

.narrow-page {
  width: min(680px, 100%);
  margin-inline: auto;
}

.narrow-page--wide {
  width: min(760px, 100%);
}

.form-panel,
.response-panel,
.reference-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-low);
}

.form-panel {
  padding: 24px;
}

.form-panel__heading,
.response-panel__heading,
.reference-panel__heading {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.form-panel__heading p,
.response-panel__heading > p:last-child {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 8px;
}

.progress-feature {
  display: grid;
  overflow: hidden;
  margin-bottom: 32px;
  border-radius: var(--radius-md);
  background: var(--color-brand);
  color: var(--color-on-brand);
  box-shadow: var(--shadow-raised);
}

.progress-feature h2 {
  color: var(--color-on-brand);
}

.progress-feature__status,
.next-step {
  padding: 24px;
}

.progress-feature__status {
  border-bottom: 1px solid rgb(255 253 248 / 22%);
}

.progress-number {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.progress-number strong {
  color: var(--color-on-brand);
  font-family: var(--font-display);
  font-size: clamp(3.75rem, 10vw, 6.5rem);
  line-height: 0.9;
}

.progress-number span {
  color: #d7e4dc;
  font-size: 1.1rem;
  font-weight: 700;
}

progress {
  --progress-track: #dce4df;
  --progress-fill: var(--color-brand);
  display: block;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--progress-track);
  accent-color: var(--progress-fill);
}

progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--progress-track);
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--progress-fill);
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--progress-fill);
}

.progress-feature progress {
  --progress-track: #4b6a5e;
  --progress-fill: #efb64d;
}

.progress-caption {
  margin: 12px 0 0;
  color: #e4eee8;
  font-size: 0.9rem;
}

.next-step {
  align-self: center;
}

.next-step__label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border: 1px solid #e5bd6f;
  border-radius: 999px;
  background: rgb(246 232 199 / 10%);
  color: #ffdc98;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.next-step > p:not(.next-step__label) {
  max-width: 42ch;
  color: #e4eee8;
}

.dashboard-support {
  display: grid;
  gap: 24px;
  margin-bottom: 32px;
}

.metric-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 12px;
  align-items: baseline;
  padding: 24px;
  border-top: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: var(--shadow-low);
}

.metric-panel__label {
  grid-column: 1 / -1;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.metric-panel strong {
  color: var(--color-brand);
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.task-links {
  display: grid;
  gap: 8px;
}

.task-links a {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 64px;
  padding: 12px 48px 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
  transition: background-color 180ms ease-out, border-color 180ms ease-out;
}

.task-links a::after {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--color-brand);
  border-right: 2px solid var(--color-brand);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.task-links a:hover {
  border-color: var(--color-brand);
  background: var(--color-brand-soft);
}

.task-links span {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.export-band {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-brand);
  background: var(--color-surface-muted);
}

.export-band h2 {
  margin-bottom: 4px;
}

.export-band p:not(.section-kicker) {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.list-progress {
  display: grid;
  min-width: min(260px, 100%);
  padding: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-low);
}

.list-progress strong {
  color: var(--color-brand);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.list-progress span {
  margin-bottom: 12px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.survey-workspace {
  display: grid;
  gap: 24px;
  align-items: start;
}

.workspace-index {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  max-height: min(460px, 58dvh);
  overflow: hidden;
  border: 1px solid var(--color-border-strong);
  border-top: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-low);
}

.workspace-index__heading {
  padding: 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}

.workspace-index__heading h2 {
  margin-bottom: 4px;
  font-size: 1.4rem;
}

.workspace-index__heading > p:last-child {
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.workspace-index__scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.workspace-index__scroll:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: -3px;
}

.item-detail {
  min-width: 0;
}

.item-detail__heading {
  margin-bottom: 24px;
  padding: 4px 0 20px 20px;
  border-bottom: 1px solid var(--color-border-strong);
  border-left: 4px solid var(--color-accent);
}

.item-detail__heading h2 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.item-detail__heading > p:last-child {
  max-width: 62ch;
  margin-bottom: 0;
  color: var(--color-text-muted);
}

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

.item-list li {
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: var(--shadow-low);
}

.item-list li.is-answered {
  border-left-color: var(--color-success);
}

.item-list li.is-unanswered {
  border-left-color: var(--color-accent);
}

.item-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  min-height: 84px;
  padding: 12px 16px;
  color: var(--color-text);
  text-decoration: none;
  transition: background-color 180ms ease-out, box-shadow 180ms ease-out;
}

.item-row:hover {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.item-row:active {
  background: var(--color-brand-soft);
}

.item-row[aria-current="page"] {
  background: var(--color-brand-soft);
  box-shadow: inset 4px 0 0 var(--color-brand);
}

.item-seq {
  color: var(--color-text-muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.item-copy {
  display: grid;
  min-width: 0;
}

.item-copy strong,
.item-copy span {
  overflow-wrap: anywhere;
}

.item-copy span {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.item-state {
  display: flex;
  grid-column: 2;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.current-marker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid var(--color-brand);
  border-radius: 999px;
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.current-marker::before {
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--color-focus);
  content: "";
}

.status-complete {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.status-pending {
  background: var(--color-accent-soft);
  color: var(--color-pending);
}

.status-symbol {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.status-complete .status-symbol::after {
  position: absolute;
  top: 2px;
  left: 4px;
  width: 3px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.status-pending .status-symbol::after {
  position: absolute;
  top: 5px;
  left: 3px;
  width: 6px;
  border-top: 1.5px solid currentColor;
  content: "";
}

.row-chevron {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--color-brand);
  border-right: 2px solid var(--color-brand);
  transform: rotate(45deg);
}

.empty-state {
  display: grid;
  gap: 4px;
  padding: 24px;
  color: var(--color-text-muted);
}

.empty-state strong {
  color: var(--color-text);
}

.empty-state--panel {
  justify-items: start;
  min-height: 220px;
  align-content: center;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.empty-state__mark {
  display: block;
  width: 48px;
  height: 40px;
  margin-bottom: 12px;
  border: 2px solid var(--color-border-strong);
  border-top: 6px solid var(--color-brand);
}

.empty-state--panel p {
  margin-bottom: 0;
}

.item-layout {
  display: grid;
  gap: 24px;
}

.reference-panel,
.response-panel {
  padding: 24px;
}

.reference-panel {
  align-self: start;
  border-top: 4px solid var(--color-border-strong);
  background: var(--color-surface-muted);
}

.reference-panel__heading {
  position: relative;
  padding-right: 96px;
}

.reference-label {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 8px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.reference-list {
  display: grid;
  gap: 16px;
  margin: 0;
}

.reference-list > div {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.reference-list dt {
  margin-bottom: 4px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.reference-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.response-panel {
  border-top: 4px solid var(--color-brand);
}

.reference-panel__heading h3,
.response-panel__heading h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

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

fieldset + fieldset {
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

fieldset > legend {
  padding: 0;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.choice-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.choice-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 60px;
  padding: 12px 16px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  font-weight: 700;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.choice-card:hover {
  border-color: var(--color-brand);
  background: var(--color-brand-soft);
}

.choice-card:active {
  box-shadow: inset 0 2px 4px rgb(14 44 34 / 14%);
}

.choice-card:has(input:checked) {
  border-color: var(--color-brand);
  background: var(--color-brand-soft);
  box-shadow: inset 4px 0 0 var(--color-brand);
}

.choice-card:has(input:focus-visible) {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.choice-card input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--color-brand);
}

.choice-card input[type="radio"]:focus-visible {
  outline: 0;
}

.conditional-field {
  margin-top: 16px;
  padding: 16px;
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-soft);
}

.noscript-note {
  margin: 0;
  padding: 12px 16px;
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-soft);
  color: #4f3a14;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-low);
}

.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.data-table th {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

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

.data-table tbody tr:hover {
  background: #f7f8f5;
}

.actions-cell {
  min-width: 144px;
}

.inline-action {
  display: inline-block;
  margin-left: 4px;
}

.admin-summary-grid,
.admin-export-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}

.admin-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-panel {
  margin-bottom: 32px;
}

.admin-panel__heading {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-panel__heading > p {
  max-width: 44ch;
  margin-bottom: 4px;
  color: var(--color-text-muted);
}

.admin-export-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.admin-export-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-brand);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-low);
  text-decoration: none;
}

.admin-export-card:hover {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-raised);
}

.admin-export-card strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.admin-export-card span,
.table-secondary {
  color: var(--color-text-muted);
}

.table-secondary {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.admin-progress-table {
  min-width: 900px;
}

.admin-users-table {
  min-width: 980px;
}

.admin-account-note {
  margin-bottom: 24px;
  padding: 20px 24px;
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-soft);
}

.admin-account-note h2 {
  font-size: 1.25rem;
}

.admin-account-note p:last-child {
  margin-bottom: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pill--active {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.status-pill--pending {
  background: var(--color-accent-soft);
  color: var(--color-pending);
}

.status-pill--disabled {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.admin-user-actions {
  min-width: 260px;
}

@media (min-width: 560px) {
  .jurisdiction {
    display: block;
  }

  .app-header__inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .primary-nav__inner {
    display: flex;
    gap: 4px;
  }

  .primary-nav a {
    justify-content: flex-start;
    min-width: 128px;
    padding-inline: 16px;
  }

  .choice-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reference-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reference-list__wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .app-header__inner,
  .primary-nav__inner,
  .page-shell {
    width: min(var(--content-width), calc(100% - 64px));
  }

  .page-shell {
    padding-block: 48px 80px;
  }

  .page-heading {
    margin-bottom: 40px;
    padding-bottom: 32px;
  }

  .form-panel,
  .reference-panel,
  .response-panel {
    padding: 32px;
  }

  .progress-feature {
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    margin-bottom: 40px;
  }

  .progress-feature__status,
  .next-step {
    padding: 40px;
  }

  .progress-feature__status {
    border-right: 1px solid rgb(255 253 248 / 22%);
    border-bottom: 0;
  }

  .dashboard-support {
    grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
    margin-bottom: 40px;
  }

  .item-row {
    grid-template-columns: 40px minmax(0, 1fr) 16px;
    gap: 12px;
    padding-inline: 20px;
  }

  .login-intro,
  .auth-panel {
    padding-inline: 48px;
  }
}

@media (min-width: 960px) {
  .login-shell {
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
    min-height: min(760px, calc(100dvh - 64px));
    margin-block: 32px;
    box-shadow: 0 24px 80px rgb(0 0 0 / 28%);
  }

  .login-intro {
    min-height: auto;
    padding: 56px;
    border-right: 8px solid var(--color-accent);
    border-bottom: 0;
  }

  .auth-panel {
    padding: 56px;
  }

  .survey-workspace {
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
    gap: 32px;
  }

  .workspace-index {
    position: sticky;
    top: 24px;
    max-height: calc(100dvh - 48px);
  }
}

@media (min-width: 960px) and (min-height: 720px) {
  .item-workbench-page {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .item-workbench-page .app-header__inner {
    min-height: 64px;
    padding-block: 8px;
  }

  .item-workbench-page .primary-nav a {
    min-height: 44px;
    padding-block: 4px;
  }

  .item-workbench-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    width: min(1400px, calc(100% - 32px));
    min-height: 0;
    height: 100%;
    padding-block: 8px 12px;
    overflow: hidden;
  }

  .item-workbench-shell .workspace-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 16px;
    align-items: center;
    margin: 0;
    padding: 0;
    border-bottom: 0;
  }

  .item-workbench-shell .workspace-toolbar__title {
    flex-wrap: nowrap;
  }

  .item-workbench-shell .workspace-toolbar__title h1 {
    font-size: 1.5rem;
    white-space: nowrap;
  }

  .item-workbench-shell .workspace-toolbar .list-progress {
    grid-template-columns: auto minmax(80px, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 44px;
    padding: 6px 10px;
  }

  .item-workbench-shell .workspace-toolbar .list-progress > span {
    margin: 0;
    white-space: nowrap;
  }

  .item-workbench-shell .workspace-toolbar .list-progress strong {
    font-size: 1.25rem;
  }

  .item-workbench-shell .workspace-toolbar progress {
    height: 8px;
  }

  .item-workbench-shell .survey-workspace {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    min-height: 0;
    height: 100%;
  }

  .item-workbench-shell .workspace-index {
    position: static;
    min-height: 0;
    height: 100%;
    max-height: none;
  }

  .item-workbench-shell .workspace-index__heading {
    padding: 10px 12px;
  }

  .item-workbench-shell .workspace-index__heading .section-kicker {
    margin-bottom: 2px;
  }

  .item-workbench-shell .workspace-index__heading h2 {
    display: inline;
    margin: 0 8px 0 0;
    font-size: 1.15rem;
  }

  .item-workbench-shell .workspace-index__heading > p:last-child {
    display: inline;
    font-size: 0.8125rem;
  }

  .item-workbench-shell .item-list {
    gap: 4px;
  }

  .item-workbench-shell .item-row {
    grid-template-columns: 32px minmax(0, 1fr) 12px;
    gap: 8px;
    min-height: 64px;
    padding: 8px 10px;
  }

  .item-workbench-shell .item-copy span,
  .item-workbench-shell .status-badge,
  .item-workbench-shell .current-marker {
    font-size: 0.75rem;
  }

  .item-workbench-shell .status-badge,
  .item-workbench-shell .current-marker {
    min-height: 24px;
    padding-block: 2px;
  }

  .item-workbench-shell .item-detail {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 0;
  }

  .item-workbench-shell .item-detail__heading {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    align-items: baseline;
    margin-bottom: 8px;
    padding: 2px 0 6px 12px;
  }

  .item-workbench-shell .item-detail__heading .section-kicker,
  .item-workbench-shell .item-detail__heading h2 {
    margin: 0;
  }

  .item-workbench-shell .item-detail__heading h2 {
    font-size: 1.55rem;
  }

  .item-workbench-shell .alert {
    margin-bottom: 8px;
    padding: 8px 12px;
  }

  .item-workbench-shell .item-layout {
    grid-row: 3;
    grid-template-columns: minmax(210px, 0.78fr) minmax(390px, 1.22fr);
    gap: 12px;
    min-height: 0;
  }

  .item-workbench-shell .reference-panel,
  .item-workbench-shell .response-panel {
    min-width: 0;
    padding: 12px;
  }

  .item-workbench-shell .reference-panel {
    align-self: stretch;
  }

  .item-workbench-shell .form-panel__heading,
  .item-workbench-shell .response-panel__heading,
  .item-workbench-shell .reference-panel__heading {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .item-workbench-shell .response-panel__heading {
    display: flex;
    gap: 8px;
    align-items: baseline;
  }

  .item-workbench-shell .response-panel__heading .section-kicker {
    margin: 0;
  }

  .item-workbench-shell .reference-panel__heading h3,
  .item-workbench-shell .response-panel__heading h3 {
    font-size: 1.15rem;
  }

  .item-workbench-shell .reference-list {
    gap: 8px;
  }

  .item-workbench-shell .reference-list > div {
    padding: 8px 10px;
  }

  .item-workbench-shell .reference-list dt {
    margin-bottom: 2px;
  }

  .item-workbench-shell .survey-form {
    gap: 6px;
  }

  .item-workbench-shell fieldset + fieldset {
    padding-top: 8px;
  }

  .item-workbench-shell fieldset > legend {
    margin-bottom: 0;
    font-size: 1rem;
  }

  .item-workbench-shell .choice-grid {
    gap: 6px;
    margin-top: 6px;
  }

  .item-workbench-shell .choice-card {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 8px;
    min-height: 44px;
    padding: 6px 10px;
  }

  .item-workbench-shell .choice-card input[type="radio"] {
    width: 18px;
    height: 18px;
  }

  .item-workbench-shell .field {
    gap: 3px;
  }

  .item-workbench-shell textarea {
    min-height: 52px;
    padding: 8px 10px;
    line-height: 1.35;
  }

  .item-workbench-shell .conditional-field {
    margin-top: 6px;
    padding: 6px 10px;
  }

  .item-workbench-shell .field-help {
    font-size: 0.875rem;
  }

  .item-workbench-shell .form-actions {
    flex-wrap: nowrap;
    gap: 8px;
    padding-top: 0;
  }

  .item-workbench-shell .form-actions .button {
    min-height: 44px;
    padding: 6px 12px;
  }

  .item-workbench-page.workbench-needs-scroll {
    display: block;
    height: auto;
    overflow: visible;
  }

  .item-workbench-page.workbench-needs-scroll .item-workbench-shell {
    display: block;
    height: auto;
    overflow: visible;
  }

  .item-workbench-page.workbench-needs-scroll .workspace-toolbar {
    margin-bottom: 8px;
  }

  .item-workbench-page.workbench-needs-scroll .survey-workspace {
    height: auto;
  }

  .item-workbench-page.workbench-needs-scroll .workspace-index {
    position: sticky;
    top: 16px;
    height: auto;
    max-height: calc(100dvh - 32px);
  }

  .item-workbench-page.workbench-needs-scroll .item-detail {
    display: block;
  }
}

@media (max-width: 559px) {
  .app-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .brand-lockup {
    min-width: 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-eyebrow {
    font-size: 0.65rem;
  }

  .brand-name {
    font-size: 0.9rem;
  }

  .header-button {
    min-width: 64px;
    padding-inline: 12px;
  }

  .page-heading--split > .button {
    width: 100%;
  }

  .context-stamp,
  .list-progress {
    width: 100%;
  }

  .item-row {
    grid-template-columns: 32px minmax(0, 1fr) 12px;
    gap: 8px;
  }

  .row-chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .form-actions .button,
  .export-band .button {
    width: 100%;
  }

  .table-scroll {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

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

  .data-table tr {
    margin-bottom: 12px;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-brand);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    box-shadow: var(--shadow-low);
  }

  .data-table td {
    display: grid;
    grid-template-columns: minmax(88px, 0.7fr) minmax(0, 1.3fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .data-table td::before {
    color: var(--color-text-muted);
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 750;
  }

  .data-table td:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .data-table .actions-cell {
    display: block;
    min-width: 0;
  }

  .data-table .actions-cell::before {
    display: block;
    margin-bottom: 8px;
  }

  .actions-cell .button,
  .inline-action {
    width: 100%;
  }

  .inline-action {
    margin-top: 8px;
    margin-left: 0;
  }
}

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