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

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

:root {
  --ink: #1b2f28;
  --ink-soft: #3d534b;
  --muted: #5c6f67;
  --paper: #f4efe4;
  --paper-2: #ebe4d4;
  --card: #fffdf8;
  --line: #d7ceba;
  --accent: #215c45;
  --accent-2: #2e7a5b;
  --accent-soft: #e4f1ea;
  --gold: #8a5a12;
  --gold-soft: #f8edd6;
  --attention: #8a4b12;
  --attention-soft: #f6e6d2;
  --later: #5e6a65;
  --later-soft: #eef1ef;
  --danger: #7a2e1f;
  --focus: #1b4f8a;
  --shadow: 0 10px 30px rgba(27, 47, 40, 0.08);
  --radius: 18px;
  --tap: 48px;
  --max: 40rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  min-height: 100dvh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(46, 122, 91, 0.08), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(138, 90, 18, 0.07), transparent 50%);
  z-index: 0;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -40px;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  z-index: 20;
}

.skip-link:focus {
  top: 0.75rem;
}

#app {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
  min-height: 100vh;
  min-height: 100dvh;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.logo {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.logo svg {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

.wordmark {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.wordmark strong {
  font-size: clamp(1.85rem, 8vw, 2.35rem);
  letter-spacing: 0.01em;
  line-height: 1.12;
  font-weight: 700;
}

.wordmark span {
  font-size: clamp(0.95rem, 3.6vw, 1.08rem);
  color: var(--muted);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.3;
  overflow-wrap: break-word;
  max-width: min(24rem, calc(100vw - 6.5rem));
}

h1,
h2,
h3 {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  line-height: 1.25;
  margin: 0 0 0.6rem;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.7rem, 6vw, 2.15rem);
}

h2 {
  font-size: 1.35rem;
}

.lede {
  color: var(--ink-soft);
  margin: 0 0 1rem;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

form.card {
  margin: 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.muted {
  color: var(--muted);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.95rem;
}

.kicker {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font: 650 1rem/1.2 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.btn.btn-secondary,
button.btn.btn-secondary {
  background: transparent;
  color: var(--accent);
}

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

.btn.btn-ghost,
button.btn.btn-ghost,
a.btn.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  width: auto;
  min-width: var(--tap);
}

.btn.btn-ghost:hover,
button.btn.btn-ghost:hover,
a.btn.btn-ghost:hover {
  background: transparent;
  border-color: transparent;
  color: var(--accent-2);
}

.btn.btn-danger,
button.btn.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn.btn-danger:hover,
button.btn.btn-danger:hover {
  background: #632417;
  border-color: #632417;
  color: #fff;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  background: #c5cdc8;
  border-color: #c5cdc8;
  color: #5b6561;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.progress {
  margin: 0 0 1rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.progress-track {
  height: 8px;
  background: var(--paper-2);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  min-height: var(--tap);
  padding: 0.85rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  text-align: left;
  font: 500 1rem/1.4 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  cursor: pointer;
}

.choice:hover,
.choice:focus-visible {
  border-color: var(--accent);
}

.choice[aria-checked="true"],
.choice.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.choice input {
  margin-top: 0.2rem;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

label.field-label {
  display: block;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 650;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="url"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: var(--tap);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: 1rem/1.4 "Segoe UI", system-ui, sans-serif;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

.unsure {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-height: var(--tap);
  font-family: "Segoe UI", system-ui, sans-serif;
}

.error {
  color: var(--danger);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.95rem;
  margin: 0;
}

.error::before {
  content: "⚠ ";
}

.focus-card {
  background: var(--accent);
  color: #fff;
  border: 0;
}

.focus-card .kicker,
.focus-card .lede,
.focus-card p {
  color: #e7f3ec;
}

.focus-card h2 {
  font-size: clamp(1.35rem, 5vw, 1.7rem);
}

.next-action {
  background: var(--gold-soft);
  border-color: #e2c98a;
}

.warning-card {
  background: var(--attention-soft);
  border-color: #e3c49a;
}

.snapshot {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.snapshot dt {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0;
}

.snapshot dd {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
}

.path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.path-item {
  display: grid;
  grid-template-columns: 1.25rem 1fr auto;
  gap: 0.7rem;
  align-items: center;
  position: relative;
  padding: 0.55rem 0 0.55rem 0.1rem;
}

.path-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 1.7rem;
  bottom: -0.2rem;
  width: 2px;
  background: var(--line);
}

.path-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 99px;
  background: var(--later);
  z-index: 1;
}

.path-item[data-status="READY"] .path-dot {
  background: var(--accent);
}

.path-item[data-status="NEEDS ATTENTION"] .path-dot {
  background: var(--attention);
}

.status {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  white-space: nowrap;
}

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

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

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

.list-plain {
  margin: 0;
  padding-left: 1.15rem;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.nav-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.nav-tabs .btn {
  flex: 1;
}

.task {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn.is-copied,
.btn.is-copied:hover {
  background: #163d2e;
  border-color: #163d2e;
  color: #fff;
}

.copied {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--accent);
  font-weight: 700;
  min-height: 1.2em;
  margin: 0;
}

.copied.is-visible {
  background: var(--accent-soft);
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(27, 47, 40, 0.45);
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

.modal {
  width: min(100%, 28rem);
  background: var(--card);
  border-radius: 18px 18px 12px 12px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.site-footer {
  margin-top: 2rem;
  color: var(--muted);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.88rem;
}

.welcome-points {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.welcome-points li {
  margin: 0.25rem 0;
}

.example {
  color: var(--muted);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.92rem;
}

.hidden {
  display: none !important;
}

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

@media (min-width: 640px) {
  .btn-row.horizontal {
    flex-direction: row;
  }

  .modal-backdrop {
    align-items: center;
  }

  .modal {
    border-radius: 18px;
  }
}
