:root {
  color-scheme: light;
  --bg: #f6f7f3;
  --ink: #171918;
  --muted: #626963;
  --line: rgba(23, 25, 24, 0.16);
  --panel: rgba(255, 255, 255, 0.78);
  --green: #1e6f5c;
  --blue: #294f8f;
  --red: #c84f3a;
  --yellow: #f0c85a;
  --shadow: 5px 5px 0 rgba(23, 25, 24, 0.82);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 25, 24, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 25, 24, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 243, 0.86);
  backdrop-filter: blur(16px);
}

.brand,
.nav-links,
.hero-actions,
.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.brand {
  font-weight: 950;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--ink);
  background: #fff;
  box-shadow: 3px 3px 0 rgba(23, 25, 24, 0.18);
}

.nav-links {
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a,
.filter,
.primary-action,
.secondary-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(23, 25, 24, 0.18);
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.nav-links a,
.filter,
.secondary-action {
  background: rgba(255, 255, 255, 0.78);
}

.nav-links a {
  padding: 0 12px;
  font-size: 0.9rem;
}

.primary-action,
.secondary-action {
  padding: 0 18px;
}

.primary-action {
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.secondary-action {
  border: 2px solid var(--ink);
  color: var(--ink);
}

.primary-action:hover,
.secondary-action:hover,
.nav-links a:hover,
.filter:hover {
  transform: translateY(-1px);
  background: #fff;
}

.primary-action:hover {
  background: var(--green);
}

.primary-action:active,
.secondary-action:active,
.filter:active {
  transform: translateY(1px);
  box-shadow: 2px 2px 0 rgba(23, 25, 24, 0.82);
}

.primary-action.full {
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 26px;
  align-items: end;
  padding: 54px 0 36px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: 5.6rem;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2.4rem;
  line-height: 1.02;
}

.lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.8;
}

.hero-actions {
  margin-top: 28px;
}

.panel,
.summary-panel,
.task-card {
  border: 2px solid var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.summary-panel {
  padding: 24px;
}

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

.summary-grid article {
  min-width: 0;
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}

.summary-grid span {
  display: block;
  font-size: 3rem;
  font-weight: 950;
  line-height: 1;
}

.summary-grid small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 850;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 22px;
  padding: 18px 0 70px;
}

.panel {
  padding: 24px;
}

.section-title {
  margin-bottom: 20px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 2px solid rgba(23, 25, 24, 0.18);
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 116px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(41, 79, 143, 0.14);
}

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

.filters {
  margin-bottom: 18px;
}

.filter {
  padding: 0 12px;
}

.filter.is-active {
  border-color: var(--ink);
  background: var(--yellow);
  box-shadow: 3px 3px 0 rgba(23, 25, 24, 0.24);
}

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

.column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 14px;
  font-weight: 950;
}

.column-head strong {
  display: inline-flex;
  min-width: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
}

.task-list {
  display: grid;
  gap: 12px;
}

.task-card {
  min-width: 0;
  padding: 16px;
}

.task-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.task-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 680;
  line-height: 1.65;
}

.task-meta,
.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-meta {
  margin-top: 14px;
}

.task-meta span,
.status-select,
.delete-btn {
  min-height: 34px;
  border: 1px solid rgba(23, 25, 24, 0.18);
  background: #fff;
  padding: 0 9px;
  font-size: 0.86rem;
  font-weight: 850;
}

.task-actions {
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.status-select {
  width: auto;
}

.delete-btn {
  color: var(--red);
}

.empty-state {
  margin: 18px 0 0;
  border: 2px dashed rgba(23, 25, 24, 0.24);
  padding: 18px;
  color: var(--muted);
  font-weight: 850;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(380px, calc(100% - 36px));
  border: 2px solid var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-weight: 900;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 880px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .hero,
  .workspace,
  .task-columns {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 3.7rem;
  }
}

@media (max-width: 560px) {
  .shell,
  .topbar {
    width: calc(100% - 24px);
  }

  .nav-links a,
  .hero-actions > *,
  .filters > *,
  .primary-action.full {
    width: 100%;
  }

  h1 {
    font-size: 2.6rem;
    line-height: 1;
  }

  h2 {
    font-size: 1.9rem;
  }

  .form-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}
