/**
 * Starting picture intake — calm, one-handed, progressive.
 */

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1100px 520px at 8% -12%, #e7efe9 0%, transparent 55%),
    radial-gradient(900px 480px at 100% 0%, #f0e8dc 0%, transparent 52%),
    linear-gradient(180deg, #f7f4ee 0%, var(--bg) 42%, #efebe3 100%);
  color: var(--text);
  font-family: var(--sans);
}

.shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 1.25rem 5.5rem;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.subtitle {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.controls {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.ghost {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem;
}

.ghost:hover { color: var(--text); }

.hero {
  padding: 1.25rem 0 0.75rem;
  animation: rise 480ms ease-out both;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  max-width: 16ch;
}

.lede {
  margin: 0.65rem 0 0;
  color: var(--muted);
  line-height: 1.5;
  max-width: 42ch;
}

.note {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.mode-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.mode-btn {
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.mode-btn.is-active {
  background: var(--text);
  color: #f7f4ee;
  border-color: var(--text);
}

.update-panel {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.update-panel label {
  display: grid;
  gap: 0.35rem;
}

.update-panel label span {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.update-panel input,
.update-panel select {
  font: inherit;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  min-height: 44px;
  width: 100%;
}

.account-rows {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.account-row {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  display: grid;
  gap: 0.7rem;
}

.row-legend {
  padding: 0;
  font-weight: 650;
  font-size: 0.95rem;
}

.account-row label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.account-row input,
.account-row select {
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  min-height: 44px;
  width: 100%;
}

.kind-help {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

.remove-row {
  justify-self: start;
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  font: inherit;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  border: 0;
}

.btn-primary {
  background: var(--text);
  color: #f7f4ee;
}

.btn-primary:hover { background: var(--accent); }
.btn-primary:disabled {
  background: var(--btn-bg-disabled);
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-secondary:hover { background: var(--bg-soft); }

.form-error {
  margin-top: 0.85rem;
  color: var(--risk);
  font-size: 0.92rem;
}

.success {
  margin-top: 1.25rem;
  padding: 1.15rem;
  border: 1px solid color-mix(in srgb, var(--good) 28%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--good) 8%, var(--bg-elev));
  animation: rise 480ms ease-out both;
}

.success h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--good);
}

.success p { margin: 0.55rem 0 0; line-height: 1.45; }
.muted { color: var(--muted); font-size: 0.92rem; }

.saved-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.saved-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.saved-list em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.85rem;
}

.success-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.progress-line {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.complete-panel {
  margin-top: 0.35rem;
  animation: rise 480ms ease-out both;
}

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

.complete-row {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  display: grid;
  gap: 0.7rem;
}

.complete-row.is-focused {
  border-color: var(--accent, #2f5d50);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #2f5d50) 25%, transparent);
}

.complete-meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.complete-row label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.complete-row input {
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  min-height: 44px;
  width: 100%;
}

.complete-row .complete-save {
  justify-self: start;
  min-width: 10rem;
}

.complete-empty {
  margin: 0.5rem 0 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--muted);
  line-height: 1.45;
}

.complete-empty p {
  margin: 0;
}

.complete-empty-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.complete-empty-links a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.complete-empty-links a:hover {
  text-decoration: underline;
}

#complete-unavailable .btn-secondary {
  margin-top: 0.75rem;
}

#complete-finish-note {
  margin: 0.85rem 0 0;
}

@media (max-width: 720px) {
  .shell { padding: 0.85rem 1rem 5.75rem; }
  .form-actions { flex-direction: column; }
  .form-actions .btn-primary,
  .form-actions .btn-secondary { width: 100%; }
  .complete-row .complete-save { width: 100%; justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .hero, .success { animation: none; }
}
