:root {
  --paper: #ffffff;
  --canvas: #eef2f6;
  --ink: #13283a;
  --muted: #637282;
  --line: #d6dfe7;
  --soft-line: #e8edf2;
  --teal: #087c70;
  --teal-dark: #05645b;
  --teal-soft: #e6f3f0;
  --amber: #b9750c;
  --amber-soft: #fff4dc;
  --danger: #b63b36;
  --danger-soft: #fff0ee;
  --shadow: 0 12px 36px rgba(23, 44, 62, 0.06);
  --radius: 12px;
  color-scheme: light;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 551px), rgba(19, 40, 58, 0.05) calc(50% - 551px), rgba(19, 40, 58, 0.05) calc(50% - 550px), transparent calc(50% - 550px)),
    var(--canvas);
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(8, 124, 112, 0.25);
  outline-offset: 3px;
}

.page-shell {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 72px;
  align-items: end;
  padding: 30px 8px 38px;
}

.eyebrow,
.section-index,
footer {
  font-family: inherit;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 16px;
  font-family: inherit;
  font-size: clamp(21px, 2.75vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.hero-description {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.route-note {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.route-note li {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  min-height: 50px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.route-note span {
  font-family: inherit;
  color: var(--teal);
  font-size: 12px;
}

.account-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: -7px 0 18px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.account-bar[hidden] {
  display: none;
}

.account-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.account-links a,
.account-links button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.account-links a:hover,
.account-links button:hover {
  text-decoration: underline;
}

.workspace,
.results {
  border: 1px solid rgba(19, 40, 58, 0.08);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.workspace {
  padding: 30px 32px;
}

.section-heading {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  margin-bottom: 24px;
  align-items: start;
}

.section-heading.compact {
  margin-bottom: 16px;
}

.section-index {
  margin: 2px 0 0;
  color: var(--teal);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.45;
}

.section-heading h2 {
  margin: 0 0 5px;
  font-family: inherit;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-heading label {
  display: block;
  margin-bottom: 5px;
  font-family: inherit;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.results-heading h2 {
  margin: 0 0 5px;
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-heading p:not(.section-index),
.results-heading p:not(.section-index) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.category-card {
  position: relative;
  min-height: 142px;
  padding: 18px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: #9fb8b5;
}

.category-card[aria-pressed="true"] {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.category-number {
  display: block;
  margin-bottom: 23px;
  color: var(--teal);
  font-family: inherit;
  font-size: 11px;
}

.category-card strong,
.category-card small {
  position: relative;
  display: block;
}

.category-card strong {
  margin-bottom: 8px;
  font-size: 17px;
}

.category-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.topic-block {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--soft-line);
}

textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  padding: 15px 17px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  transition: border-color 160ms ease, background 160ms ease;
}

textarea:hover,
textarea:focus {
  border-color: #91aaa7;
  background: var(--paper);
}

textarea::placeholder {
  color: #93a0ac;
}

.input-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 2px 6px;
  color: var(--muted);
  font-size: 12px;
}

.input-meta p {
  margin-bottom: 0;
}

.example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.secondary-action,
#retry-button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.secondary-action:hover,
#retry-button:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.example-list button {
  position: relative;
  padding: 3px 0 3px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.example-list button::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
  content: "";
  transform: translateY(-50%);
}

.example-list button:hover {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.example-list button[hidden] {
  display: none;
}

.constraints-disclosure {
  margin-top: 14px;
  border-top: 1px solid var(--soft-line);
}

.constraints-disclosure > summary,
.settings-disclosure > summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.constraints-disclosure > summary::-webkit-details-marker,
.settings-disclosure > summary::-webkit-details-marker,
.writing-details > summary::-webkit-details-marker {
  display: none;
}

.constraints-disclosure > summary::before,
.settings-disclosure > summary::before,
.writing-details > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
}

.constraints-disclosure[open] > summary::before,
.settings-disclosure[open] > summary::before,
.writing-details[open] > summary::before {
  content: "−";
}

.constraints-disclosure > summary small,
.settings-disclosure > summary small {
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.constraints-body {
  margin-top: 13px;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 7px;
  background: #f8fafb;
}

.constraints-intro,
.constraints-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.condition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  margin: 13px 0 11px;
}

.condition-field {
  display: grid;
  gap: 6px;
}

.condition-field > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.condition-field select {
  width: 100%;
  min-height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.condition-field select:hover {
  border-color: var(--teal);
}

.condition-field select:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.condition-field select:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.condition-text-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin: 2px 0 11px;
}

.condition-text-field > span:first-child {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.condition-text-field small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.condition-text-field textarea {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
}

.condition-text-field textarea:hover {
  border-color: var(--teal);
}

.condition-text-field textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.condition-text-field textarea:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.condition-text-count {
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
}

.field-error {
  min-height: 0;
  margin: 6px 2px 0;
  color: var(--danger);
  font-size: 13px;
}

.field-error:empty {
  display: none;
}

.submit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--soft-line);
}

.privacy-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.privacy-note span {
  margin-right: 7px;
  color: var(--teal);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-width: 212px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  background: var(--teal);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.primary-action:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--teal-dark);
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button-arrow {
  font-size: 20px;
}

.status-box,
.error-box {
  margin-top: 16px;
  border-radius: 7px;
}

.status-box {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(8, 124, 112, 0.18);
  background: #f7fbfa;
  color: var(--ink);
}

.status-box::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--teal);
  content: "";
}

.status-box[hidden],
.error-box[hidden],
.results[hidden] {
  display: none;
}

.progress-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.progress-kicker {
  margin-bottom: 5px;
  color: var(--teal);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.progress-heading h3 {
  margin: 0;
  font-family: inherit;
  font-size: 23px;
  font-weight: 600;
}

.progress-timing {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto auto;
  overflow: hidden;
  border: 1px solid rgba(8, 124, 112, 0.14);
  border-radius: 6px;
  background: white;
}

.progress-elapsed,
.progress-estimate {
  padding: 5px 8px;
  color: var(--teal-dark);
  font-family: inherit;
  font-size: 11px;
  white-space: nowrap;
}

.progress-estimate {
  border-left: 1px solid rgba(8, 124, 112, 0.14);
  background: rgba(230, 243, 240, 0.55);
  color: var(--muted);
}

.progress-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 24px 0 20px;
  padding: 0;
  list-style: none;
}

.progress-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 9px;
  min-width: 0;
  color: #586978;
  text-align: center;
}

.progress-step:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 15px;
  left: 50%;
  width: 100%;
  height: 1px;
  background: var(--line);
  content: "";
  transition: background 220ms ease;
}

.progress-step.is-complete:not(:last-child)::after {
  background: rgba(8, 124, 112, 0.7);
}

.progress-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f7fbfa;
  font-family: inherit;
  font-size: 10px;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.progress-check {
  display: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}

.progress-label {
  max-width: 112px;
  font-size: 12px;
  line-height: 1.4;
  transition: color 180ms ease;
}

.progress-step.is-active,
.progress-step.is-repairing {
  color: var(--ink);
  font-weight: 700;
}

.progress-step.is-active .progress-marker {
  border-color: var(--teal);
  background: white;
  color: var(--teal-dark);
  box-shadow: 0 0 0 5px rgba(8, 124, 112, 0.08);
}

.progress-step.is-active .progress-marker::after,
.progress-step.is-repairing .progress-marker::after {
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(8, 124, 112, 0.3);
  border-radius: 50%;
  content: "";
  animation: progress-ring 1.8s ease-out infinite;
}

.progress-step.is-repairing .progress-marker {
  border-color: #895607;
  color: #895607;
  box-shadow: 0 0 0 5px rgba(185, 117, 12, 0.08);
}

.progress-step.is-repairing .progress-marker::after {
  border-color: rgba(185, 117, 12, 0.32);
}

.progress-step.is-complete .progress-marker {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.progress-step.is-complete .progress-number {
  display: none;
}

.progress-step.is-complete .progress-check {
  display: inline;
}

.progress-live {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 15px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: white;
}

.progress-signal {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(8, 124, 112, 0.22);
  animation: signal-pulse 1.8s ease-out infinite;
}

.status-box.is-repairing .progress-signal {
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(185, 117, 12, 0.22);
  animation-name: signal-pulse-amber;
}

#status-text {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

#status-summary {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

@keyframes progress-ring {
  0% { opacity: 0; transform: scale(0.82); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.2); }
}

@keyframes signal-pulse {
  0% { box-shadow: 0 0 0 0 rgba(8, 124, 112, 0.22); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(8, 124, 112, 0); }
}

@keyframes signal-pulse-amber {
  0% { box-shadow: 0 0 0 0 rgba(185, 117, 12, 0.22); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(185, 117, 12, 0); }
}

.error-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px 13px 16px;
  border: 1px solid rgba(182, 59, 54, 0.18);
  border-left: 3px solid var(--danger);
  background: #fff8f7;
  color: var(--danger);
}

.error-copy {
  min-width: 0;
}

.error-copy strong {
  display: block;
  margin-bottom: 3px;
  color: #8f2d29;
  font-size: 14px;
}

.error-box p {
  margin: 0;
  color: #a94a45;
  font-size: 13px;
  line-height: 1.55;
}

#retry-button {
  flex: 0 0 auto;
  border-color: rgba(182, 59, 54, 0.25);
  color: var(--danger);
}

.results {
  margin-top: 22px;
  padding: 34px;
}

.results-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

#results-title:focus {
  outline: none;
}

.result-actions {
  display: flex;
  gap: 8px;
}

.secondary-action {
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--soft-line);
}

th {
  background: #f7f9fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

th:first-child,
td:first-child {
  width: 112px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 46%;
}

th:last-child,
td:last-child {
  width: 88px;
}

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

tbody tr.recommended {
  background: var(--amber-soft);
}

.writing-detail-row td {
  padding: 0 18px 15px;
  background: var(--amber-soft);
}

.writing-details {
  border-left: 3px solid #d49a35;
  padding: 10px 12px 10px 14px;
  background: rgba(255, 255, 255, 0.62);
}

.writing-details > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8b5908;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.writing-details > summary::before {
  width: 18px;
  height: 18px;
  font-size: 11px;
}

.writing-grid {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px 14px;
  margin: 13px 0 2px;
}

.writing-grid dt {
  color: #8b5908;
  font-size: 11px;
  font-weight: 700;
}

.writing-grid dd {
  margin: 0;
  color: #3f4850;
  font-size: 13px;
  line-height: 1.65;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid rgba(11, 98, 96, 0.22);
  border-radius: 999px;
  background: rgba(11, 98, 96, 0.07);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.score-panel {
  margin-top: 12px;
  padding: 12px 0 2px;
  border-top: 1px solid rgba(139, 89, 8, 0.16);
}

.score-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #4b535b;
  font-size: 12px;
}

.score-total {
  color: var(--teal-dark);
  font-family: inherit;
  font-weight: 700;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}

.score-dimension {
  margin: 0;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.score-dimension dt {
  color: var(--muted);
  font-size: 10px;
}

.score-dimension dd {
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.score-dimension dd.is-unavailable {
  color: var(--muted);
  font-family: inherit;
  font-weight: 400;
}

.score-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.calibration-block {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(139, 89, 8, 0.16);
}

.calibration-note {
  margin: 0;
  color: #5c6670;
  font-size: 12px;
  line-height: 1.65;
}

.calibration-sources {
  display: grid;
  gap: 7px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.calibration-sources li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: baseline;
}

.calibration-sources a {
  color: var(--teal-dark);
  font-size: 12px;
  line-height: 1.55;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.source-meta {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

td {
  font-size: 15px;
  line-height: 1.7;
}

.rank-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-start;
}

.rank-number {
  font-family: inherit;
  color: var(--muted);
}

.recommend-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--amber);
  color: white;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.mobile-results {
  display: none;
}

.data-notice {
  margin: 18px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 8px 0;
  color: #7e8b97;
  font-size: 10px;
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 32px, 680px);
    padding-top: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px 2px 28px;
  }

  h1 {
    font-size: clamp(19px, 6vw, 27px);
  }

  .route-note {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .route-note li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    border-right: 1px solid var(--line);
    padding-left: 10px;
  }

  .route-note li:last-child {
    border-right: 0;
  }

  .workspace,
  .results {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-card {
    min-height: 145px;
  }

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

  .calibration-sources li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .source-meta {
    white-space: normal;
  }

  .submit-row,
  .results-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-action {
    width: 100%;
  }

  .progress-track {
    grid-template-columns: 1fr;
    gap: 0;
    margin: 20px 0;
  }

  .progress-step {
    grid-template-columns: 31px minmax(0, 1fr);
    justify-items: start;
    align-items: start;
    gap: 12px;
    min-height: 50px;
    text-align: left;
  }

  .progress-step:not(:last-child)::after {
    top: 31px;
    left: 15px;
    width: 1px;
    height: calc(100% - 1px);
  }

  .progress-label {
    max-width: none;
    padding-top: 6px;
  }

  .result-actions {
    width: 100%;
  }

  .secondary-action {
    flex: 1;
  }

  .table-wrap {
    display: none;
  }

  .mobile-results {
    display: grid;
    gap: 10px;
  }

  .result-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .result-card.recommended {
    border-color: #e7c37c;
    background: var(--amber-soft);
  }

  .result-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
  }

  .result-card dl {
    margin: 0;
  }

  .result-card dt {
    margin-top: 12px;
    color: var(--muted);
    font-size: 11px;
  }

  .result-card dd {
    margin: 5px 0 0;
    line-height: 1.65;
  }

  .result-card .writing-details {
    margin-top: 16px;
  }

  .result-card .writing-grid dt,
  .result-card .writing-grid dd {
    margin: 0;
  }

  .result-card-header .score-badge {
    margin-left: auto;
  }

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

  footer {
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 460px) {
  .account-bar {
    justify-content: flex-start;
  }

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

  .category-card {
    min-height: 126px;
  }

  .category-number {
    margin-bottom: 18px;
  }

  .example-list button {
    width: 100%;
    text-align: left;
  }

  .privacy-note {
    text-align: center;
  }

  .status-box {
    padding: 18px 16px;
  }

  .progress-heading h3 {
    font-size: 20px;
  }

  .progress-elapsed {
    margin-top: 1px;
  }

  .writing-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .writing-grid dd + dt {
    margin-top: 8px;
  }
}

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

  .progress-step .progress-marker::after,
  .progress-signal {
    animation: none !important;
  }
}
