:root {
  color-scheme: light;
  --bg: #f4efe4;
  --bg-accent: #efe5d1;
  --panel: rgba(255, 252, 245, 0.96);
  --panel-muted: rgba(249, 242, 228, 0.96);
  --text: #283128;
  --muted: #687261;
  --border: rgba(81, 95, 66, 0.16);
  --brand: #2f6c4f;
  --brand-strong: #204e38;
  --warm: #d97a33;
  --danger: #ab3f2e;
  --danger-soft: #fff0eb;
  --shadow: 0 18px 48px rgba(71, 53, 30, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --tap: 48px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 122, 51, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(47, 108, 79, 0.16), transparent 32%),
    linear-gradient(180deg, #faf5ea 0%, var(--bg) 100%);
}

button,
input {
  font: inherit;
}

.page-shell {
  padding: 24px 14px 48px;
}

.page {
  width: min(100%, 720px);
  margin: 0 auto;
}

.page-home,
.page-list {
  display: grid;
  gap: 16px;
}

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

.hero-card {
  padding: 24px 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 247, 232, 0.92)),
    var(--panel);
}

.hero-card-list {
  padding-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.lede {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.hero-actions {
  display: grid;
  gap: 14px;
}

.panel {
  padding: 18px 16px;
}

.panel-muted {
  background: var(--panel-muted);
}

.panel-danger {
  border-color: rgba(171, 63, 46, 0.2);
  background: var(--danger-soft);
}

.stack-form,
.inline-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

label span {
  font-weight: 600;
}

input {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  border: 1px solid rgba(60, 72, 51, 0.16);
  border-radius: var(--radius-md);
  background: #fffefb;
  color: var(--text);
}

input:focus {
  outline: 3px solid rgba(47, 108, 79, 0.12);
  border-color: rgba(47, 108, 79, 0.45);
}

.button {
  min-height: var(--tap);
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(47, 108, 79, 0.12);
  color: var(--brand-strong);
  font-weight: 700;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: linear-gradient(135deg, #2f6c4f, #3d8d67);
  color: #fff;
}

.button-secondary {
  background: rgba(217, 122, 51, 0.14);
  color: #9a541d;
}

.button-danger {
  background: linear-gradient(135deg, #ab3f2e, #c94a35);
  color: #fff;
}

.status-message {
  min-height: 1.5rem;
  padding: 0 6px;
  color: var(--brand-strong);
  font-size: 0.95rem;
}

.status-message.is-error {
  color: var(--danger);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(47, 108, 79, 0.1);
  color: var(--brand-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.items {
  display: grid;
  gap: 12px;
}

.item-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(60, 72, 51, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.75);
}

.item-card.is-checked {
  opacity: 0.74;
}

.item-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.item-toggle {
  width: 26px;
  height: 26px;
  margin-top: 4px;
  accent-color: var(--brand);
}

.item-main {
  display: grid;
  gap: 6px;
}

.item-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.item-actions,
.editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.item-action {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(60, 72, 51, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
}

.item-action[data-variant="danger"] {
  color: var(--danger);
}

.item-editor {
  display: none;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px dashed rgba(60, 72, 51, 0.16);
}

.item-editor.is-open {
  display: grid;
}

.empty-state {
  padding: 18px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  text-align: center;
}

.two-up {
  display: grid;
  gap: 12px;
}

.grow {
  flex: 1 1 auto;
}

@media (min-width: 640px) {
  .page-shell {
    padding: 32px 22px 56px;
  }

  .panel {
    padding: 20px 20px;
  }

  .hero-actions {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .inline-form {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

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

