.page-intro {
  margin-bottom: 20px;
}

.page-intro h2 {
  margin: 8px 0 12px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: 0;
}

.page-intro p {
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
  max-width: 720px;
}

.intake-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.intake-steps span {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.intake-steps .active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}

.topbar h1 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--accent-soft);
  font-weight: 900;
}

.section-heading h3,
.section-heading p {
  margin: 0;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-input);
  color: var(--ink);
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 180px;
  resize: vertical;
  padding: 13px;
  line-height: 1.45;
  transition: opacity 0.2s ease;
}

textarea.is-loading {
  opacity: 0.65;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.upload-note {
  color: var(--muted);
  font-size: 13px;
}

.primary-button,
.ghost-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 850;
}

.primary-button {
  background: var(--blue);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.ghost-button {
  background: var(--ghost-bg);
  color: var(--ghost-ink);
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 0 18px;
  background: linear-gradient(180deg, rgba(245, 247, 251, 0), var(--bg) 35%);
}

.sticky-save-status {
  flex: 1 1 100%;
  margin: 0;
  min-height: 20px;
  font-weight: 600;
}

.sticky-save-status:not(:empty) {
  color: #166534;
}

.sticky-save-status.error {
  color: #c2415d;
}

.save-status {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.save-status.error {
  color: #c2415d;
}

.score-row {
  margin-bottom: 18px;
}

.standing-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.standing-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.standing-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.standing-item .level {
  display: inline-grid;
  margin-top: 8px;
  min-height: 28px;
  padding: 0 12px;
  place-items: center;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
}

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

.level.mid {
  background: #fff4df;
  color: var(--amber);
}

.level.low {
  background: #ffe8ee;
  color: var(--red);
}

.action-list {
  display: grid;
  gap: 10px;
}

.action-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.action-item strong {
  display: block;
  margin-bottom: 4px;
}

.action-item p {
  margin: 0;
  color: var(--muted);
}

.link-button {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.link-button[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

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

.baseline-tile {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.baseline-tile span,
.baseline-tile strong {
  display: block;
}

.baseline-tile span {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.baseline-tile strong {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

@media (max-width: 720px) {
  .form-grid,
  .score-row,
  .baseline-grid {
    grid-template-columns: 1fr;
  }

  .standing-item {
    flex-direction: column;
    align-items: stretch;
  }

  .standing-item .percent-display {
    align-self: flex-end;
  }

  .upload-row,
  .sticky-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
