:root {
  color-scheme: light;
  --paper: #f3faf5;
  --paper-strong: #ffffff;
  --ink: #193126;
  --muted: #5f756a;
  --accent: #2f7d5a;
  --accent-deep: #1f5b40;
  --line: rgba(25, 49, 38, 0.12);
  --card: rgba(255, 255, 255, 0.94);
  --danger: #8e3b3b;
  --shadow: 0 18px 42px rgba(47, 125, 90, 0.08);
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f7fcf8 0%, #edf6ef 100%);
  color: var(--ink);
}

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

.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 520px);
  gap: 1.5rem;
  align-items: start;
  padding: 2.5rem;
  margin-bottom: 1.5rem;
}

.eyebrow,
.label,
.counter,
.task-card__status {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.73rem;
  color: var(--muted);
}

.hero h1,
.panel h2,
.task-card h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.1;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  letter-spacing: -0.05em;
}

.hero-copy {
  max-width: 52ch;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  align-content: start;
}

.status-card {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
}

.status-card--wide {
  grid-column: 1 / -1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.6rem 0 0;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
}

.status-pill::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: currentColor;
}

.status-pill--ok {
  background: #dcefe4;
  color: var(--accent-deep);
}

.status-pill--degraded,
.status-pill--unknown {
  background: #eef4f0;
  color: var(--muted);
}

.endpoint-text {
  margin: 0.6rem 0 0;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.94rem;
  color: var(--accent-deep);
  word-break: break-word;
}

.meta-detail {
  margin: 0.35rem 0 0;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-word;
}

.panel {
  padding: 1.6rem;
  margin-bottom: 1.5rem;
}

.panel-form {
  display: grid;
  gap: 1rem;
}

.panel-list {
  display: grid;
  gap: 1.4rem;
}

.stack-form,
.edit-form {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
}

label span {
  color: var(--muted);
  font-size: 0.85rem;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(25, 49, 38, 0.14);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: #ffffff;
  color: var(--ink);
}

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

button {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  background: var(--accent);
  color: #f7fcf8;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 10px 24px rgba(47, 125, 90, 0.16);
}

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

button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.secondary-button,
.filter-button {
  background: #dcefe4;
  color: var(--accent-deep);
  box-shadow: none;
}

.ghost-button {
  background: #eef4f0;
  color: var(--ink);
  box-shadow: none;
}

.danger-button {
  background: #f4e4e4;
  color: var(--danger);
  box-shadow: none;
}

button[type="submit"],
.filter-button.is-active {
  background: var(--accent);
  color: #f7fcf8;
}

.feedback {
  margin: 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid #c47474;
  background: #f8eeee;
  color: var(--danger);
}

.feedback--success {
  border-left-color: var(--accent);
  background: rgba(47, 125, 90, 0.1);
  color: var(--accent-deep);
}

.board-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.board-tools {
  display: grid;
  gap: 0.8rem;
  justify-items: end;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.task-list {
  display: grid;
  gap: 1rem;
}

.task-card {
  display: grid;
  grid-template-columns: 1.6fr minmax(220px, 320px);
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
}

.task-card--done {
  background: #edf8f1;
}

.task-card__summary,
.task-card__actions {
  display: grid;
  gap: 0.8rem;
}

.task-card__description,
.task-card__meta,
.empty-state {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.task-card__actions {
  align-content: start;
}

.task-card__actions button {
  width: 100%;
}

.edit-form {
  grid-column: 1 / -1;
  padding-top: 1rem;
  border-top: 1px dashed rgba(25, 49, 38, 0.16);
}

.edit-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.empty-state {
  padding: 1.2rem;
  border: 1px dashed rgba(25, 49, 38, 0.16);
  border-radius: 22px;
  background: #f9fcfa;
}

@media (max-width: 920px) {
  .hero,
  .task-card {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-header {
    flex-direction: column;
    align-items: start;
  }

  .board-tools {
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1.2rem, 100%);
    padding-top: 1rem;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .status-card--wide {
    grid-column: auto;
  }

  .hero {
    padding: 2rem 1.4rem;
  }

  .panel,
  .task-card {
    border-radius: 22px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 14vw, 3.8rem);
  }

  .panel {
    padding: 1.4rem;
  }

  .filter-button,
  .task-card__actions button,
  .edit-form__actions button {
    width: 100%;
  }
}