.app-shell {
  margin: 0 auto;
  max-width: 760px;
  min-height: 100vh;
  padding: 16px;
}

.loading-panel,
.screen {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 auto;
  padding: 22px;
}

.screen {
  display: grid;
  gap: 18px;
}

.eyebrow {
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(2rem, 10vw, 3rem);
  line-height: 1.02;
  margin-bottom: 0;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin-bottom: 0;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.notice {
  background: var(--surface-muted);
  border-left: 4px solid var(--primary);
  padding: 12px;
}

.progress {
  display: grid;
  gap: 8px;
}

.progress-bar {
  appearance: none;
  background: var(--line);
  border: 0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  width: 100%;
}

.progress-bar::-webkit-progress-bar {
  background: var(--line);
}

.progress-bar::-webkit-progress-value,
.progress-bar::-moz-progress-bar {
  background: var(--primary);
}

.field-grid,
.card-grid,
.result-grid {
  display: grid;
  gap: 12px;
}

fieldset {
  border: 0;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

legend,
label {
  font-weight: 700;
}

.choice,
.path-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 12px;
}

.choice input,
.path-card input {
  inline-size: 20px;
  block-size: 20px;
}

select,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 48px;
  padding: 10px;
  width: 100%;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

button,
.button {
  align-items: center;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  text-decoration: none;
}

button.primary,
.button.primary {
  background: var(--primary);
  color: white;
}

button.secondary,
.button.secondary {
  background: white;
  color: var(--primary);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.status-pill {
  border-radius: 999px;
  color: white;
  display: inline-block;
  font-weight: 800;
  padding: 8px 12px;
  width: fit-content;
}

.status-stable {
  background: var(--ok);
}

.status-watch {
  background: var(--warning);
}

.status-action_needed {
  background: var(--accent);
}

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

.stat strong {
  display: block;
  font-size: 1.4rem;
}

.sync {
  color: var(--muted);
  font-size: 0.92rem;
  min-height: 24px;
}

.error-summary {
  background: #fff4f0;
  border: 1px solid #e3a091;
  border-radius: var(--radius);
  color: #6f1f10;
  padding: 12px;
}

@media (min-width: 640px) {
  .app-shell {
    padding: 28px;
  }

  .screen {
    padding: 32px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
