:root {
  --bg: #111411;
  --panel: #191e19;
  --panel-2: #202720;
  --ink: #f4f0e7;
  --muted: #a8b0a4;
  --quiet: #788273;
  --line: #30382f;
  --moss: #8fb37e;
  --moss-strong: #5f8f61;
  --gold: #e4bd63;
  --clay: #d48b70;
  --sky: #9fc7d3;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(143, 179, 126, .16), transparent 32rem),
    radial-gradient(circle at 80% 20%, rgba(159, 199, 211, .10), transparent 28rem),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 44px 44px, 44px 44px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(17, 20, 17, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 44%, rgba(255,255,255,.34) 45% 55%, transparent 56%),
    var(--moss-strong);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  min-height: 38px;
  padding: 9px 12px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
}

.nav a:hover {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(340px, 1.05fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(30px, 5vw, 76px) clamp(18px, 4vw, 56px);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.label {
  margin: 0 0 10px;
  color: var(--moss);
  font-size: 13px;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 22px;
  font-size: clamp(46px, 7vw, 88px);
  line-height: .94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.16;
}

.lede {
  max-width: 610px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
}

.hero-actions,
.timer-actions,
.note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
}

.primary {
  color: #101410;
  background: var(--moss);
  border-color: var(--moss);
  box-shadow: 0 14px 30px rgba(143, 179, 126, .18);
  font-weight: 780;
}

.secondary {
  color: var(--ink);
  background: var(--panel-2);
  border-color: var(--line);
}

.secondary:hover,
.primary:hover {
  transform: translateY(-1px);
}

.panel {
  background: rgba(25, 30, 25, .94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-card {
  padding: clamp(16px, 2vw, 22px);
}

.summary-head,
.focus-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.summary-head h2 {
  margin-bottom: 0;
  font-size: 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--moss);
  background: rgba(143, 179, 126, .12);
  border: 1px solid rgba(143, 179, 126, .26);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.progress-wrap {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  margin: 24px 0;
  padding: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.progress-ring {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background:
    conic-gradient(var(--moss) var(--score, 0%), rgba(255,255,255,.08) 0);
}

.progress-ring span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  color: var(--ink);
  background: var(--panel);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 850;
}

.progress-wrap p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.next-box {
  min-height: 96px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(159, 199, 211, .12), rgba(143, 179, 126, .08));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.next-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.next-box strong {
  display: block;
  font-size: 22px;
  line-height: 1.25;
}

.section {
  padding: clamp(36px, 6vw, 82px) clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 760px;
  margin-bottom: 22px;
}

.stack-panel,
.focus-card,
.stats-card,
.note-panel {
  padding: 16px;
}

.add-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px auto;
  gap: 10px;
  margin-bottom: 14px;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: #101410;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input,
select {
  height: 46px;
  padding: 0 12px;
}

textarea {
  min-height: 220px;
  padding: 14px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(143, 179, 126, .74);
  box-shadow: 0 0 0 4px rgba(143, 179, 126, .14);
}

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

.task-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task-row.done {
  opacity: .58;
}

.task-row.done .task-title {
  text-decoration: line-through;
}

.round-check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: #101410;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.round-check span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.task-row.done .round-check span {
  background: var(--moss);
}

.task-title {
  display: block;
  margin-bottom: 5px;
  line-height: 1.3;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--quiet);
  font-size: 13px;
}

.task-actions {
  display: flex;
  gap: 4px;
}

.small-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.small-button:hover {
  color: var(--ink);
  background: rgba(255,255,255,.06);
}

.empty-row {
  padding: 18px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

.focus-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, .7fr);
  gap: 14px;
}

.timer {
  margin: 30px 0 8px;
  color: var(--gold);
  font-size: clamp(58px, 9vw, 108px);
  font-weight: 860;
  line-height: .9;
}

.cue {
  color: var(--muted);
  line-height: 1.5;
}

.stats-card {
  display: grid;
  gap: 10px;
}

.metric {
  min-height: 92px;
  padding: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.metric strong {
  font-size: 32px;
}

.note-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 28px clamp(18px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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

  .nav {
    display: none;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 44px;
  }

  .add-form,
  .progress-wrap {
    grid-template-columns: 1fr;
  }

  .progress-ring {
    margin: 0 auto;
  }

  .task-row {
    grid-template-columns: 32px 1fr;
  }

  .task-actions {
    grid-column: 2;
  }

  .footer {
    flex-direction: column;
  }
}