:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #182520;
  background: #f5f7f4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  width: min(100% - 48px, 1080px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  min-height: 84px;
  border-bottom: 1px solid #e2e8e2;
}

.brand {
  font-size: 1.05rem;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -0.04em;
}

.brand span {
  color: #65806f;
  font-weight: 500;
}

.header-note,
.site-footer {
  color: #6d7971;
  font-size: 0.85rem;
}

.container {
  width: min(100% - 48px, 1080px);
  margin: 0 auto;
  flex: 1;
}

.hero {
  max-width: 680px;
  padding: 88px 0 48px;
}

.eyebrow,
.demo-number {
  color: #527a61;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.5rem, 7vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.065em;
}

.intro {
  max-width: 570px;
  margin-bottom: 0;
  color: #66736a;
  font-size: 1.08rem;
  line-height: 1.7;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 80px;
}

.demo-card {
  min-height: 238px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid #e0e7df;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.demo-card:hover {
  transform: translateY(-3px);
  border-color: #a9c0ad;
  box-shadow: 0 12px 28px #1e39200d;
}

.demo-card h2 {
  margin: 20px 0 8px;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.demo-card p {
  margin-bottom: 24px;
  color: #6d7971;
  line-height: 1.6;
}

.card-link {
  margin-top: auto;
  color: #3e7250;
  font-size: 0.9rem;
  font-weight: 650;
}

.site-footer {
  min-height: 72px;
  border-top: 1px solid #e2e8e2;
}

.app-page {
  background: #f5f7f4;
}

.app-main {
  width: min(100% - 48px, 680px);
  margin: auto;
  padding: 56px 0 80px;
  flex: 1;
}

.back-link {
  display: inline-block;
  margin-bottom: 42px;
  color: #527a61;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.app-panel {
  padding: clamp(24px, 6vw, 44px);
  border: 1px solid #e0e7df;
  border-radius: 16px;
  background: #fff;
}

.app-panel h1 {
  margin: 12px 0;
  font-size: clamp(2rem, 6vw, 3rem);
}

.app-description {
  color: #6d7971;
  line-height: 1.6;
}

.counter {
  margin: 30px 0;
  color: #3e7250;
  font-size: 5rem;
  font-weight: 750;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

button,
.task-form input {
  min-height: 46px;
  border: 1px solid #dbe3db;
  border-radius: 8px;
  font: inherit;
}

button {
  padding: 0 18px;
  color: #26352b;
  background: #fff;
  cursor: pointer;
  font-weight: 650;
}

button:hover {
  border-color: #91ae98;
  background: #f4f8f4;
}

button.primary {
  border-color: #3e7250;
  color: #fff;
  background: #3e7250;
}

button.primary:hover {
  border-color: #315d40;
  background: #315d40;
}

.task-form {
  display: flex;
  gap: 10px;
  margin: 26px 0;
}

.task-form input {
  width: 100%;
  padding: 0 14px;
}

.task-form input:focus {
  outline: 2px solid #8eb497;
  outline-offset: 2px;
}

.task-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid #edf0ed;
}

.task-list input {
  width: 18px;
  height: 18px;
  accent-color: #3e7250;
}

.task-list .completed span {
  color: #879189;
  text-decoration: line-through;
}

.task-list .remove-task {
  min-height: 34px;
  margin-left: auto;
  padding: 0 10px;
  color: #78827b;
  font-size: 0.85rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.empty-state {
  padding: 20px 0;
  color: #78827b;
  text-align: center;
}

@media (max-width: 620px) {
  .site-header,
  .site-footer,
  .container {
    width: min(100% - 36px, 1080px);
  }

  .header-note {
    font-size: 0.75rem;
  }

  .hero {
    padding: 64px 0 36px;
  }

  .demo-grid {
    grid-template-columns: 1fr;
    padding-bottom: 56px;
  }

  .demo-card {
    min-height: 216px;
  }

  .app-main {
    width: min(100% - 36px, 680px);
    padding-top: 36px;
  }

  .task-form {
    flex-direction: column;
  }
}
