:root {
  --bg: #f4f1ea;
  --ink: #172026;
  --muted: #65717a;
  --panel: rgba(255, 255, 255, 0.86);
  --line: rgba(23, 32, 38, 0.12);
  --green: #1f9d73;
  --green-dark: #0f6f55;
  --coral: #ff6f59;
  --blue: #2563eb;
  --shadow: 0 24px 70px rgba(23, 32, 38, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 111, 89, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(31, 157, 115, 0.16), transparent 24rem),
    linear-gradient(135deg, #f7f4ed 0%, #eef5f1 48%, #eef1f8 100%);
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(31, 157, 115, 0.28);
}

.intro {
  min-height: calc(100vh - 64px);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr minmax(340px, 460px);
  gap: 56px;
  align-items: center;
  padding-top: 72px;
}

.intro-copy h1,
.list-head h1,
.unlock-form h1 {
  margin: 0;
  letter-spacing: 0;
}

.intro-copy h1 {
  max-width: 720px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
}

.lead {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.create-form,
.unlock-form {
  display: grid;
  gap: 18px;
  padding: 24px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 157, 115, 0.14);
}

button,
.ghost {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.primary {
  color: white;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.18);
}

.secondary,
.ghost {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
}

.flash {
  margin-bottom: 16px;
  padding: 14px 18px;
  color: #8a2e1f;
  background: rgba(255, 111, 89, 0.13);
  border: 1px solid rgba(255, 111, 89, 0.28);
  border-radius: 8px;
}

.flash p {
  margin: 0;
}

.center-card {
  display: grid;
  min-height: calc(100vh - 64px);
  align-content: center;
  justify-items: center;
  gap: 32px;
}

.unlock-form {
  width: min(440px, 100%);
}

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

.topbar,
.list-head,
.actions,
.share-box,
.copy-form,
.add-form {
  display: flex;
  gap: 14px;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 18px;
}

.list-head {
  justify-content: space-between;
  padding: 24px;
}

.list-head h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.progress-wrap {
  min-width: 190px;
}

#counter {
  display: block;
  margin-bottom: 8px;
  font-size: 1.4rem;
  font-weight: 900;
  text-align: right;
}

.progress {
  overflow: hidden;
  height: 12px;
  background: rgba(23, 32, 38, 0.1);
  border-radius: 999px;
}

.progress div {
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--green));
  transition: width 180ms ease;
}

.actions,
.add-form {
  padding: 16px;
}

.suggestions {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.is-hidden {
  display: none;
}

.suggestions h2 {
  margin: -8px 0 0;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.suggestion-chip {
  min-height: 40px;
  color: var(--green-dark);
  background: rgba(31, 157, 115, 0.1);
  border: 1px solid rgba(31, 157, 115, 0.2);
  box-shadow: none;
}

.suggestion-chip:hover {
  background: rgba(31, 157, 115, 0.16);
}

.share-box {
  flex: 1 1 55%;
}

.share-box span {
  color: var(--muted);
  font-weight: 800;
}

.copy-form {
  flex: 1 1 45%;
}

.items {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 28px rgba(23, 32, 38, 0.08);
}

.item-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 16px 18px;
}

.item-check {
  display: grid;
  place-items: center;
  cursor: pointer;
}

.item-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkbox-visual {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid rgba(23, 32, 38, 0.22);
  border-radius: 8px;
  background: white;
}

.checkbox-visual::after {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 3px solid white;
  border-bottom: 3px solid white;
  opacity: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}

.item-check input:checked + .checkbox-visual {
  border-color: var(--green);
  background: var(--green);
}

.item-check input:checked + .checkbox-visual::after {
  opacity: 1;
}

.rename-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.rename-form input {
  font-size: 1.04rem;
  font-weight: 700;
}

.save-state {
  min-width: 86px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.item.done .rename-form input {
  color: var(--muted);
  text-decoration: line-through;
}

.compact {
  min-height: 42px;
  padding: 0 14px;
}

.danger {
  color: #ffffff;
  background: var(--coral);
}

.add-form input {
  flex: 1;
}

@media (max-width: 860px) {
  .intro-grid,
  .actions,
  .list-head,
  .share-box,
  .copy-form,
  .add-form,
  .item-row,
  .rename-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .save-state {
    min-width: 0;
  }

  .item-check {
    justify-self: start;
  }

  .intro-grid {
    gap: 28px;
    padding-top: 44px;
  }

  .intro-copy h1 {
    font-size: clamp(2.7rem, 16vw, 5rem);
  }

  .progress-wrap {
    min-width: 0;
  }

  #counter {
    text-align: left;
  }
}
