:root {
  color-scheme: light dark;
  --bg: #f4f1ec;
  --panel: #fffaf2;
  --panel-strong: #f7ead6;
  --text: #1e2528;
  --muted: #697276;
  --line: #ded5c8;
  --accent: #157f72;
  --accent-ink: #effffc;
  --warning: #a85d16;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(21, 127, 114, 0.14), transparent 35%),
    var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 6vw, 48px);
  line-height: 1;
}

h2 {
  font-size: 18px;
}

button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

.state {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.panel {
  grid-column: span 4;
  min-height: 210px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, white);
}

.tasks-panel,
.projects-panel {
  grid-column: span 6;
}

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

.panel-title span {
  color: var(--muted);
  font-size: 12px;
}

.list {
  display: grid;
  gap: 10px;
}

.item,
.project {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--panel-strong);
}

.item a,
.project a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.meta,
.body {
  color: var(--muted);
  font-size: 13px;
}

.labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.label,
.status {
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.empty {
  color: var(--muted);
}

@media (max-width: 820px) {
  .panel,
  .tasks-panel,
  .projects-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding: 14px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101415;
    --panel: #182021;
    --panel-strong: #222b2b;
    --text: #eff4f2;
    --muted: #a9b4b2;
    --line: #303c3c;
    --accent: #39b7a9;
    --accent-ink: #061413;
  }
}
