:root {
  color-scheme: light;
  --ink: #20262e;
  --muted: #68717c;
  --line: #dce1e6;
  --surface: #ffffff;
  --surface-soft: #f3f5f7;
  --accent: #ec6b4f;
  --accent-soft: #fff0ec;
  --success: #227a58;
  --danger: #b5413f;
  --shadow: 0 24px 60px rgba(32, 38, 46, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(236, 107, 79, 0.1), transparent 30rem),
    #f7f8f9;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.page-shell {
  width: min(100% - 2rem, 880px);
  margin: 0 auto;
  padding: 4rem 0 2rem;
}

.page-header {
  max-width: 650px;
  margin-bottom: 2rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

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

h1 {
  max-width: 600px;
  margin-bottom: 1rem;
  font-size: clamp(2.3rem, 6vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.intro {
  max-width: 500px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.card {
  margin-bottom: 1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--surface);
  border: 1px solid rgba(220, 225, 230, 0.8);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.role-badge,
.target-label {
  flex: 0 0 auto;
  padding: 0.45rem 0.7rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.target-label {
  color: var(--muted);
  background: var(--surface-soft);
}

.target-label strong {
  color: var(--ink);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.status-item {
  min-width: 0;
  padding: 0.9rem 1rem;
  background: var(--surface-soft);
  border-radius: 0.8rem;
}

.status-item dt {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status-item dd {
  margin: 0;
  overflow: hidden;
  font-size: 0.93rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-state="success"] {
  color: var(--success);
}

[data-state="error"] {
  color: var(--danger);
}

[data-state="pending"] {
  color: var(--muted);
}

.value-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem !important;
}

.status-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.button {
  min-height: 2.8rem;
  padding: 0.75rem 1.15rem;
  border: 0;
  border-radius: 0.65rem;
  font-size: 0.9rem;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

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

.button-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(236, 107, 79, 0.22);
}

.button-dark {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(32, 38, 46, 0.18);
}

.helper-text {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-field textarea {
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.page-footer {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 620px) {
  .page-shell {
    padding-top: 2.5rem;
  }

  .card-heading,
  .status-actions,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
