:root {
  color-scheme: light;
  --navy-950: #081a2d;
  --navy-900: #10243e;
  --navy-800: #193654;
  --navy-700: #2c4e6c;
  --teal-700: #0f6966;
  --teal-600: #137c79;
  --teal-100: #dff2f0;
  --amber-500: #f2a93b;
  --amber-100: #fff1d5;
  --red-700: #ae2c3b;
  --red-100: #ffeaec;
  --ink: #14283d;
  --muted: #5f7182;
  --line: #dbe4e8;
  --line-strong: #c5d2d8;
  --surface: #ffffff;
  --surface-soft: #f4f7f8;
  --surface-tint: #edf5f5;
  --shadow-sm: 0 8px 24px rgba(16, 36, 62, 0.08);
  --shadow-lg: 0 28px 80px rgba(16, 36, 62, 0.14);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --focus: 0 0 0 4px rgba(19, 124, 121, 0.18);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
input,
textarea,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: var(--teal-700);
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--navy-900);
  color: white;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 4%, rgba(19, 124, 121, 0.11), transparent 27rem),
    radial-gradient(circle at 5% 22%, rgba(242, 169, 59, 0.11), transparent 22rem),
    linear-gradient(180deg, #f9fbfb 0%, #f1f6f7 56%, #edf2f4 100%);
}

.backdrop-grid {
  position: absolute;
  width: 220px;
  aspect-ratio: 1;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(16, 36, 62, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 36, 62, 0.18) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
  mask-image: linear-gradient(to bottom, black, transparent);
}

.backdrop-grid--one {
  top: 7rem;
  right: -5rem;
  transform: rotate(9deg);
}

.backdrop-grid--two {
  bottom: -7rem;
  left: -6rem;
  transform: rotate(-12deg);
}

.app-shell {
  width: min(100% - 24px, 960px);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 0 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 5px 10px rgba(16, 36, 62, 0.18));
}

.brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.brand-copy strong {
  overflow: hidden;
  color: var(--navy-900);
  font-size: 0.9rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.header-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 auto;
}

.direction-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 4px 0 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.direction-panel label,
.dialog label:not(.checkbox-label) {
  display: block;
  margin-bottom: 5px;
  color: var(--navy-900);
  font-size: 0.8rem;
  font-weight: 750;
}

.direction-panel label span { color: var(--muted); font-weight: 500; }
.direction-panel__select { min-width: 0; }
.direction-panel__select label span { display: block; }
.direction-panel__name { grid-column: 1 / -1; }
.direction-panel__name summary { cursor: pointer; color: var(--teal-700); font-size: 0.75rem; }
.direction-panel__name[open] label { margin-top: 9px; }
.direction-panel__note { grid-column: 1 / -1; color: var(--muted); font-size: 0.7rem; }
.direction-panel > .button { align-self: end; padding: 8px 12px; }

.direction-panel input,
.direction-panel select,
.dialog input[type="text"],
.dialog textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fbfcfc;
  color: var(--ink);
  font-size: 16px;
}

.direction-panel select:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 2px; }
.dialog textarea { margin-bottom: 10px; resize: vertical; }
.dialog hr { margin: 22px 0; border: 0; border-top: 1px solid var(--line); }
.dialog p.field-error { color: var(--red-700); }
.checkbox-label { display: flex; align-items: flex-start; gap: 9px; margin: 15px 0 10px; font-size: 0.85rem; }
.checkbox-label input { width: 20px; height: 20px; accent-color: var(--teal-600); }
.restore-confirm { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--amber-100); }
.restore-confirm .button { width: 100%; margin-top: 10px; }
.dialog .backup-note { margin-top: 18px; font-size: 0.75rem; }
.continuation-help { color: var(--muted); font-size: 0.83rem; }
.continuation-help span { display: block; }
.clipboard-fallback { position: fixed; left: -9999px; top: 0; }

.version-badge {
  color: var(--navy-700);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.save-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.save-status__label--compact {
  display: none;
}

.save-status[data-state="saved"] .save-status__dot {
  background: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(19, 124, 121, 0.12);
}

.save-status[data-state="saving"] .save-status__dot {
  background: var(--amber-500);
}

.welcome-screen,
.workflow-screen {
  padding: 4px 0 30px;
}

.welcome-card,
.form-card,
.prompt-card,
.prompt-success,
.prompt-next-steps,
.progress-panel,
.privacy-note,
.explain-grid article {
  border: 1px solid rgba(197, 210, 216, 0.75);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.welcome-card {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 18px;
  border-radius: 22px;
}

.welcome-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--teal-600) 0 44%, var(--amber-500) 44% 68%, var(--navy-900) 68%);
  content: "";
}

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

.eyebrow {
  margin: 0 0 7px;
  color: var(--teal-700);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  color: var(--navy-900);
  line-height: 1.2;
}

.welcome-copy h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(1.75rem, 8vw, 3.85rem);
  letter-spacing: -0.045em;
}

.welcome-copy h1 span,
.step-heading h1 span,
.dialog h2 span {
  display: block;
  margin-top: 4px;
  color: var(--navy-700);
  font-size: 0.62em;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.welcome-lead {
  max-width: 650px;
  margin: 14px 0 0;
  color: #3d566c;
  font-size: 0.9rem;
  line-height: 1.52;
}

.welcome-lead--zh {
  margin-top: 6px;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  min-height: 50px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:focus-visible,
.footer-link:focus-visible,
.text-button:focus-visible,
.dialog-close:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.button small {
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0.82;
}

.button--large {
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
}

.button--primary {
  background: var(--navy-900);
  color: white;
  box-shadow: 0 11px 26px rgba(16, 36, 62, 0.22);
}

.button--primary:hover {
  background: var(--navy-800);
  box-shadow: 0 14px 30px rgba(16, 36, 62, 0.26);
}

.button--secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--navy-900);
}

.button--secondary:hover {
  border-color: var(--teal-600);
  background: var(--surface-tint);
}

.button--danger {
  background: var(--red-700);
  color: white;
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.68rem;
  list-style: none;
}

.trust-list li {
  display: flex;
  align-items: center;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.35;
}

.trust-list li span {
  display: inline-grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: var(--teal-100);
  color: var(--teal-700);
  font-size: 0.7rem;
  font-weight: 900;
}

.ecosystem-preview {
  display: none;
}

.explain-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.explain-grid article {
  position: relative;
  padding: 16px;
  border-radius: var(--radius-md);
}

.explain-number {
  color: var(--amber-500);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.explain-grid h2 {
  margin: 6px 0 4px;
  font-size: 1rem;
}

.explain-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.privacy-note {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(237, 245, 245, 0.92);
}

.privacy-note__icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--teal-600);
  color: white;
  font-weight: 900;
}

.privacy-note h2 {
  margin: 0 0 5px;
  font-size: 0.96rem;
}

.privacy-note p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-panel {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.progress-track {
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: #e5ecef;
}

.progress-track span {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-600), #239993);
  transition: width 260ms ease;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.progress-steps button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  color: #87959f;
}

.progress-steps button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.progress-steps button:not(:disabled):hover,
.progress-steps button:not(:disabled):focus-visible {
  border-color: var(--teal-600);
  outline: 0;
}

.progress-steps .is-active button {
  border-color: var(--teal-600);
  background: var(--teal-100);
  color: var(--teal-700);
  box-shadow: 0 0 0 2px rgba(19, 124, 121, 0.08);
}

.progress-steps .is-complete button {
  border-color: #bad8d5;
  background: #f3f9f8;
  color: var(--navy-700);
}

.progress-step__number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: white;
  font-size: 0.76rem;
  font-weight: 850;
}

.progress-step__label {
  display: none;
}

.form-card {
  padding: 20px 16px 16px;
  border-radius: 22px;
}

.step-heading {
  margin-bottom: 22px;
}

.step-heading h1 {
  margin: 0;
  font-size: clamp(1.65rem, 7vw, 2.35rem);
  letter-spacing: -0.035em;
}

.step-heading h1:focus,
#reviewTitle:focus,
#promptTitle:focus {
  outline: none;
}

.step-heading > #stepDescription {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.step-heading .step-tip {
  margin: 15px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--amber-500);
  border-radius: 0 11px 11px 0;
  background: var(--amber-100);
  color: #664818;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.55;
}

.fields-grid {
  display: grid;
  gap: 24px;
}

.field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field-label,
.fieldset-label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy-900);
  font-size: 0.91rem;
  font-weight: 800;
  line-height: 1.45;
}

.fieldset-label {
  padding: 0;
}

.field-label span,
.fieldset-label span {
  display: block;
  color: var(--navy-700);
  font-size: 0.83rem;
  font-weight: 600;
}

.required-mark {
  display: inline !important;
  margin-left: 3px;
  color: var(--red-700) !important;
}

.optional-mark {
  display: inline !important;
  margin-left: 5px;
  color: var(--muted) !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fbfcfc;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.field input {
  min-height: 52px;
  padding: 12px 14px;
}

.field textarea {
  min-height: 132px;
  padding: 13px 14px;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  border-color: #a9bcc5;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--teal-600);
  background: white;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--red-700);
  background: #fffafa;
}

.field-footer {
  display: grid;
  gap: 3px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.field-help {
  display: grid;
  max-width: none;
  color: #40586d;
  font-weight: 600;
  line-height: 1.55;
}

.field-help > span {
  display: block;
}

.field-help > span[lang="zh"] {
  color: var(--muted);
  font-weight: 550;
}

.radio-group + .field-help {
  display: block;
  max-width: none;
  margin-top: 10px;
  font-size: 0.8rem;
}

.character-count {
  justify-self: end;
  margin-top: 1px;
  color: #718391;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.field-examples {
  margin-top: 9px;
  padding: 12px 13px;
  border: 1px solid #d7e7e6;
  border-radius: 12px;
  background: #f3f9f8;
}

.field-examples strong {
  display: block;
  margin-bottom: 7px;
  color: var(--teal-700);
  font-size: 0.76rem;
}

.field-examples ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.field-examples li {
  color: #40586d;
  font-size: 0.76rem;
  line-height: 1.45;
}

.field-examples li span {
  display: block;
}

.field-examples li span[lang="zh"] {
  color: var(--muted);
}

.field-error {
  margin: 7px 0 0;
  color: var(--red-700);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.radio-card {
  position: relative;
}

.radio-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.radio-card label {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fbfcfc;
  color: var(--navy-900);
  font-weight: 750;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.radio-card label::before {
  width: 19px;
  height: 19px;
  border: 2px solid #9db0b9;
  border-radius: 999px;
  content: "";
}

.radio-card input:checked + label {
  border-color: var(--teal-600);
  background: var(--surface-tint);
  box-shadow: 0 0 0 3px rgba(19, 124, 121, 0.08);
}

.radio-card input:checked + label::before {
  border: 5px solid var(--teal-600);
  background: white;
}

.radio-card input:focus-visible + label {
  box-shadow: var(--focus);
}

.radio-card label span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 550;
}

.form-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  position: sticky;
  bottom: 10px;
  z-index: 4;
  margin: 28px -7px -7px;
  padding: 9px;
  border: 1px solid rgba(197, 210, 216, 0.85);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 32px rgba(16, 36, 62, 0.15);
  backdrop-filter: blur(16px);
}

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

.review-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfc;
}

.review-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.review-section__header h2 {
  margin: 0;
  font-size: 0.96rem;
}

.review-edit {
  min-height: 38px;
  padding: 6px 10px;
  border: 0;
  border-radius: 9px;
  background: var(--teal-100);
  color: var(--teal-700);
  font-size: 0.75rem;
  font-weight: 800;
}

.review-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.review-item {
  display: grid;
  gap: 3px;
  padding: 13px 16px;
  border-bottom: 1px solid #e7edef;
}

.review-item:last-child {
  border-bottom: 0;
}

.review-item dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.review-item dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.review-item dd.is-empty {
  color: #93a0a9;
  font-style: italic;
}

.review-assurance {
  display: grid;
  gap: 2px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 13px;
  background: var(--surface-tint);
  color: var(--teal-700);
  font-size: 0.78rem;
}

.prompt-success {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 22px;
}

.success-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--teal-600);
  color: white;
  font-size: 1.3rem;
  font-weight: 900;
  box-shadow: 0 9px 22px rgba(19, 124, 121, 0.25);
}

.prompt-success h1 {
  margin: 0;
  font-size: clamp(1.25rem, 5.5vw, 2.1rem);
  letter-spacing: -0.03em;
}

.prompt-success p:last-child {
  display: grid;
  gap: 2px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.prompt-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.prompt-card__header {
  display: grid;
  gap: 11px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.prompt-card__header > div:not(.prompt-card__actions) {
  display: grid;
}

.prompt-card__header strong {
  color: var(--navy-900);
  font-size: 0.86rem;
}

.prompt-card__header > div:not(.prompt-card__actions) span {
  color: var(--muted);
  font-size: 0.7rem;
}

.button--copy {
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
}

.prompt-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#promptOutput {
  display: block;
  width: 100%;
  min-height: 170px;
  max-height: 210px;
  padding: 15px;
  border: 0;
  outline: 0;
  background: #f9fbfb;
  color: #24394d;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  line-height: 1.65;
  resize: vertical;
}

@media (max-width: 560px) {
  .version-badge {
    display: none;
  }

  .save-status__label--full {
    display: none;
  }

  .save-status__label--compact {
    display: inline;
  }

  .brand-copy strong {
    font-size: 0.84rem;
  }

  .brand-copy span {
    font-size: 0.7rem;
  }
}

.copy-help {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 16px 18px;
  border-top: 1px solid #efd39d;
  border-left: 5px solid var(--amber-500);
  background: var(--amber-100);
  color: #60420f;
  font-size: 0.88rem;
  line-height: 1.5;
}

.copy-help strong {
  margin-bottom: 3px;
  color: var(--navy-900);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prompt-next-steps {
  margin-top: 14px;
  padding: 20px;
  border-radius: var(--radius-md);
}

.prompt-next-steps h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.prompt-next-steps h2 span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.prompt-next-steps ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prompt-next-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.83rem;
}

.prompt-next-steps li div {
  display: grid;
  gap: 2px;
}

.prompt-next-steps li strong {
  color: var(--navy-900);
  font-size: 0.82rem;
  line-height: 1.4;
}

.prompt-next-steps li small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.prompt-next-steps li span {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: var(--amber-100);
  color: #87570f;
  font-weight: 900;
}

.text-button {
  display: block;
  min-height: 44px;
  margin: 16px auto 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--teal-700);
  font-size: 0.82rem;
  font-weight: 800;
}

.site-footer {
  display: grid;
  gap: 11px;
  padding: 24px 4px 34px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.74rem;
}

.site-footer > div {
  display: grid;
}

.site-footer strong {
  color: var(--navy-900);
  font-size: 0.82rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 15px;
}

.footer-link {
  min-height: 36px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--teal-700);
  font-size: 0.75rem;
  font-weight: 750;
  text-align: left;
}

.footer-link--danger {
  color: var(--red-700);
}

.site-footer p {
  margin: 0;
}

.disclaimer {
  color: #82909a;
}

.notice {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 12px;
}

.notice--error {
  background: var(--red-100);
  color: var(--red-700);
}

.dialog {
  width: min(calc(100% - 28px), 460px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.dialog::backdrop {
  background: rgba(8, 26, 45, 0.58);
  backdrop-filter: blur(5px);
}

.dialog form {
  padding: 24px;
}

.dialog-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 13px;
  font-size: 1.25rem;
  font-weight: 900;
}

.dialog-icon--warning {
  background: var(--red-100);
  color: var(--red-700);
}

.dialog h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.dialog p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.dialog--wide {
  width: min(calc(100% - 28px), 680px);
  max-height: min(80vh, 720px);
}

.dialog--wide form {
  overflow-y: auto;
  max-height: inherit;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.dialog-header h2 {
  margin: 0;
}

.dialog-close {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--navy-900);
  font-size: 1.45rem;
}

.update-entry {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.update-entry:first-child {
  border-top: 0;
}

.update-entry h3 {
  margin: 0 0 9px;
  color: var(--navy-900);
  font-size: 0.94rem;
}

.update-entry ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.update-entry li span {
  display: block;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 18px;
  left: 14px;
  z-index: 90;
  max-width: 420px;
  margin: auto;
  padding: 13px 16px;
  border-radius: 13px;
  background: var(--navy-950);
  color: white;
  box-shadow: var(--shadow-lg);
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) {
  .app-shell {
    width: min(100% - 64px, 960px);
  }

  .site-header {
    padding: 28px 4px 22px;
  }

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

  .brand-copy strong {
    font-size: 1.02rem;
  }

  .brand-copy span,
  .save-status,
  .version-badge {
    font-size: 0.78rem;
  }

  .header-meta {
    align-items: center;
    flex-direction: row;
    gap: 15px;
  }

  .welcome-screen,
  .workflow-screen {
    padding: 12px 0 54px;
  }

  .welcome-card {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 34px;
    align-items: center;
    min-height: 520px;
    padding: 48px;
  }

  .welcome-copy h1 {
    font-size: clamp(3rem, 6vw, 4.15rem);
  }

  .button--large {
    width: auto;
    min-width: 260px;
  }

  .trust-list {
    grid-template-columns: repeat(3, auto);
    gap: 13px;
  }

  .trust-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    max-width: 125px;
  }

  .ecosystem-preview {
    display: block;
    position: relative;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(237, 245, 245, 0.96), rgba(255, 255, 255, 0.88));
    box-shadow: inset 0 1px 0 white, 0 20px 50px rgba(16, 36, 62, 0.1);
  }

  .ecosystem-label {
    margin-bottom: 14px;
    color: var(--teal-700);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
  }

  .ecosystem-label span {
    margin-left: 4px;
    color: var(--muted);
  }

  .mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    position: relative;
  }

  .mini-grid::before,
  .mini-grid::after {
    position: absolute;
    background: rgba(19, 124, 121, 0.28);
    content: "";
  }

  .mini-grid::before {
    top: 50%;
    right: 12%;
    left: 12%;
    height: 1px;
  }

  .mini-grid::after {
    top: 12%;
    bottom: 12%;
    left: 50%;
    width: 1px;
  }

  .mini-cell {
    z-index: 1;
    aspect-ratio: 1;
    border: 1px solid #d7e3e7;
    border-radius: 14px;
    background: white;
    box-shadow: 0 7px 16px rgba(16, 36, 62, 0.08);
  }

  .mini-cell:nth-child(1),
  .mini-cell:nth-child(2),
  .mini-cell:nth-child(3) {
    border-top: 3px solid var(--teal-600);
  }

  .mini-cell:nth-child(4),
  .mini-cell:nth-child(6) {
    border-top: 3px solid var(--amber-500);
  }

  .mini-cell:nth-child(7),
  .mini-cell:nth-child(8),
  .mini-cell:nth-child(9) {
    border-top: 3px solid var(--navy-700);
  }

  .mini-cell--centre {
    display: grid;
    place-items: center;
    border: 0;
    background: var(--navy-900);
  }

  .mini-cell--centre img {
    width: 58%;
    height: 58%;
  }

  .ecosystem-legend {
    display: flex;
    justify-content: space-between;
    gap: 7px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.65rem;
    text-align: center;
  }

  .ecosystem-legend span {
    display: grid;
    flex: 1;
  }

  .ecosystem-legend b {
    color: var(--navy-900);
    font-size: 1rem;
  }

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

  .privacy-note {
    padding: 24px;
  }

  .progress-panel {
    padding: 18px 24px;
  }

  .progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .progress-steps li {
    color: #87959f;
    font-size: 0.7rem;
    font-weight: 700;
  }

  .progress-steps button {
    justify-content: flex-start;
    gap: 8px;
    padding: 7px 9px;
  }

  .progress-step__label {
    display: block;
    overflow: hidden;
    font-size: 0.68rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .progress-steps li.is-active {
    color: var(--teal-700);
  }

  .progress-steps li.is-complete {
    color: var(--navy-700);
  }

  .form-card {
    padding: 38px 40px 30px;
  }

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

  .radio-group {
    grid-template-columns: repeat(3, 1fr);
  }

  .radio-card label {
    align-items: flex-start;
    flex-direction: column;
    min-height: 96px;
  }

  .form-actions {
    position: static;
    grid-template-columns: 180px minmax(220px, 280px);
    justify-content: end;
    margin: 34px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

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

  .review-item {
    border-right: 1px solid #e7edef;
  }

  .review-item:nth-child(even) {
    border-right: 0;
  }

  .prompt-success,
  .prompt-next-steps {
    padding: 28px 32px;
  }

  .prompt-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
  }

  .prompt-card__actions {
    display: flex;
  }

  .button--copy {
    min-width: 132px;
  }

  #promptOutput {
    min-height: 330px;
    max-height: none;
    padding: 24px;
    font-size: 0.84rem;
  }

  .prompt-next-steps ol {
    grid-template-columns: repeat(3, 1fr);
  }

  .prompt-next-steps li {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    align-items: start;
    padding: 28px 4px 44px;
  }

  .site-footer p {
    grid-column: 1 / -1;
  }

  .site-footer nav {
    justify-content: flex-end;
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .form-actions,
  .button,
  .text-button,
  .site-backdrop {
    display: none !important;
  }

  body {
    background: white;
  }

  .app-shell {
    width: 100%;
  }
}
