:root {
  --bg: #f5efe6;
  --bg-deep: #eadfce;
  --panel: rgba(255, 248, 240, 0.74);
  --panel-strong: rgba(255, 251, 246, 0.88);
  --line: rgba(89, 58, 34, 0.12);
  --text: #2f2117;
  --muted: #7a6555;
  --accent: #b35c3f;
  --accent-strong: #8c3d25;
  --olive: #67745b;
  --gold: #c69c58;
  --shadow: 0 24px 80px rgba(74, 43, 18, 0.12);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(198, 156, 88, 0.18), transparent 26%),
    radial-gradient(circle at 85% 10%, rgba(179, 92, 63, 0.16), transparent 24%),
    linear-gradient(135deg, var(--bg), var(--bg-deep));
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.7;
}

.ambient-one {
  width: 24rem;
  height: 24rem;
  top: -8rem;
  right: -4rem;
  background: rgba(198, 156, 88, 0.28);
}

.ambient-two {
  width: 28rem;
  height: 28rem;
  bottom: -14rem;
  left: -8rem;
  background: rgba(103, 116, 91, 0.18);
}

.app {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.hero-card,
.composer-panel,
.list-panel {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  gap: 28px;
  padding: 40px;
  border-radius: var(--radius-xl);
}

.eyebrow,
.section-label,
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.eyebrow,
.section-label {
  color: var(--accent-strong);
  font-size: 0.73rem;
  font-weight: 700;
}

.kicker {
  color: var(--olive);
  font-weight: 700;
  margin: 0 0 10px;
}

.hero-copy h1,
.panel-head h2,
.toolbar h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(3.4rem, 10vw, 6.8rem);
}

.hero-text {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.stats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid article {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  border: 1px solid rgba(89, 58, 34, 0.08);
}

.stats-grid span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.stats-grid strong {
  font-size: 1.8rem;
  font-weight: 700;
}

.board {
  margin-top: 28px;
  display: grid;
  gap: 24px;
  grid-template-columns: 380px minmax(0, 1fr);
}

.composer-panel,
.list-panel {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.panel-head h2,
.toolbar h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.todo-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.todo-form label,
.search-wrap {
  display: grid;
  gap: 8px;
}

.todo-form span {
  color: var(--muted);
  font-size: 0.92rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(89, 58, 34, 0.11);
  background: rgba(255, 252, 248, 0.9);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(179, 92, 63, 0.45);
  box-shadow: 0 0 0 4px rgba(179, 92, 63, 0.1);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
  min-height: 7rem;
}

.form-row {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 130px;
}

.primary-button,
.ghost-button,
.pill,
.toggle,
.icon-button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease, color 160ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.pill:hover,
.toggle:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  padding: 15px 18px;
  border-radius: 18px;
  color: #fff8f1;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 30px rgba(140, 61, 37, 0.22);
  font-weight: 600;
}

.quote-card {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(103, 116, 91, 0.12), rgba(198, 156, 88, 0.08));
  color: var(--muted);
}

.toolbar,
.controls,
.todo-main,
.todo-actions,
.todo-meta {
  display: flex;
  align-items: center;
}

.toolbar,
.controls {
  justify-content: space-between;
  gap: 16px;
}

.ghost-button {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(89, 58, 34, 0.06);
  color: var(--text);
}

.controls {
  margin-top: 18px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.75);
  color: var(--muted);
}

.pill.active {
  background: var(--text);
  color: #fff8f1;
}

.search-wrap {
  min-width: min(360px, 100%);
  flex: 1;
}

.feedback {
  min-height: 24px;
  margin-top: 16px;
  color: var(--accent-strong);
  font-size: 0.92rem;
}

.todo-list {
  margin-top: 8px;
  display: grid;
  gap: 16px;
}

.todo-card {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding: 18px;
  border-radius: 24px;
  background: var(--panel-strong);
  border: 1px solid rgba(89, 58, 34, 0.09);
  animation: rise 360ms ease;
}

.todo-main {
  gap: 16px;
  align-items: flex-start;
}

.toggle {
  width: 28px;
  height: 28px;
  margin-top: 6px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(103, 116, 91, 0.35);
  flex: none;
}

.todo-card.completed .toggle {
  background: linear-gradient(135deg, var(--olive), #8f9a82);
  border-color: transparent;
}

.todo-card.completed .toggle::after {
  content: "";
  display: block;
  width: 8px;
  height: 14px;
  margin: 4px auto 0;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(40deg);
}

.todo-copy {
  min-width: 0;
}

.todo-title {
  margin: 10px 0 8px;
  font-size: 1.2rem;
}

.todo-card.completed .todo-title {
  color: rgba(47, 33, 23, 0.54);
  text-decoration: line-through;
}

.todo-notes {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.category {
  background: rgba(103, 116, 91, 0.12);
  color: #4c5a42;
}

.priority {
  text-transform: capitalize;
}

.priority.low {
  background: rgba(103, 116, 91, 0.12);
  color: #4c5a42;
}

.priority.medium {
  background: rgba(198, 156, 88, 0.18);
  color: #8d6b36;
}

.priority.high {
  background: rgba(179, 92, 63, 0.14);
  color: var(--accent-strong);
}

.icon-button {
  padding: 11px 14px;
  border-radius: 999px;
  background: rgba(89, 58, 34, 0.07);
  color: var(--text);
}

.empty-state {
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
  border-radius: 24px;
  border: 1px dashed rgba(89, 58, 34, 0.18);
  background: rgba(255, 251, 246, 0.55);
}

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

@media (max-width: 980px) {
  .board {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 28px;
  }

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

@media (max-width: 640px) {
  .app {
    padding: 22px 14px 40px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: 3.4rem;
  }

  .form-row,
  .stats-grid,
  .todo-card {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .controls {
    align-items: stretch;
    flex-direction: column;
  }

  .search-wrap {
    min-width: 100%;
  }
}
