:root {
  --ink: #1c2320;
  --muted: #777d78;
  --paper: #f5f4ef;
  --card: #fff;
  --line: #deddd6;
  --green: #166b51;
  --green-light: #dcece5;
  --blue: #335f85;
  --blue-light: #dce8f1;
  --gold: #9a6b17;
  --gold-light: #f3e7c8;
  --shadow: 0 8px 22px rgba(31, 40, 35, .07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 5%, rgba(255,255,255,.95), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

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

.shell { max-width: 1500px; margin: 0 auto; padding: 0 42px 52px; }

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font: 800 21px "Manrope", sans-serif;
  letter-spacing: -.7px;
}

.brand-mark { display: flex; gap: 3px; align-items: flex-end; width: 24px; height: 24px; }
.brand-mark i { display: block; width: 6px; border-radius: 2px; background: var(--green); transform: skew(-16deg); }
.brand-mark i:nth-child(1) { height: 12px; }
.brand-mark i:nth-child(2) { height: 19px; }
.brand-mark i:nth-child(3) { height: 15px; }

.header-actions { display: flex; align-items: center; gap: 20px; }
.saved-indicator { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 7px; }
.saved-indicator span { width: 7px; height: 7px; border-radius: 50%; background: #4e987c; box-shadow: 0 0 0 4px #e3eee9; }

.primary-button, .secondary-button {
  border: 0;
  border-radius: 9px;
  padding: 11px 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.primary-button { background: var(--green); color: white; box-shadow: 0 4px 12px rgba(22,107,81,.17); }
.primary-button:hover { background: #115a44; transform: translateY(-1px); box-shadow: 0 7px 17px rgba(22,107,81,.2); }
.primary-button span { font-size: 20px; line-height: 0; margin-right: 6px; font-weight: 400; }
.secondary-button { background: #efeee9; }
.secondary-button:hover { background: #e4e2dc; }

.hero { padding: 48px 2px 28px; display: flex; align-items: flex-end; justify-content: space-between; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-weight: 800; letter-spacing: 1.7px; font-size: 11px; }
h1, h2 { font-family: "Manrope", sans-serif; }
h1 { margin: 0; font-size: clamp(32px, 4vw, 47px); line-height: 1.1; letter-spacing: -2px; }
.subtitle { color: var(--muted); margin: 10px 0 0; font-size: 15px; }
.task-total { color: var(--muted); font-size: 13px; margin: 0 0 5px; }

.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.column {
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(242,241,235,.7);
  overflow: hidden;
  transition: border-color .2s, background .2s;
}
.column.drag-over { border-color: #79a995; background: rgba(220,236,229,.5); }
.column-header { padding: 18px 19px 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.column-title { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 13px; letter-spacing: .2px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; }
.todo .status-dot { background: var(--gold); }
.progress .status-dot { background: var(--blue); }
.done .status-dot { background: var(--green); }
.count { min-width: 24px; height: 24px; padding: 0 7px; display: grid; place-items: center; border-radius: 12px; background: #e5e3dc; color: #6f736e; font-size: 12px; font-weight: 700; }

.card-list { min-height: 422px; padding: 13px; }
.card {
  position: relative;
  background: var(--card);
  border: 1px solid #e2e1db;
  border-radius: 11px;
  padding: 16px 16px 14px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(33,39,36,.025);
  cursor: grab;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s;
  touch-action: none;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card.dragging { opacity: .35; transform: scale(.98); }
.card.placeholder { height: 76px; border: 2px dashed #8daf9f; background: #edf3ef; box-shadow: none; }
.card h3 { margin: 0 30px 7px 0; font-size: 15px; line-height: 1.35; font-weight: 700; }
.card p { margin: 0 0 15px; color: var(--muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.card-meta { display: flex; align-items: center; justify-content: space-between; color: #969a96; font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; border-radius: 20px; padding: 4px 8px; font-weight: 700; font-size: 10px; }
.todo .status-pill { color: var(--gold); background: var(--gold-light); }
.progress .status-pill { color: var(--blue); background: var(--blue-light); }
.done .status-pill { color: var(--green); background: var(--green-light); }
.card-menu-button { position: absolute; right: 9px; top: 9px; border: 0; width: 30px; height: 28px; border-radius: 7px; background: transparent; color: #8f938f; font-size: 19px; line-height: 1; cursor: pointer; }
.card-menu-button:hover, .card-menu-button[aria-expanded="true"] { background: #f0efe9; color: var(--ink); }
.card-menu {
  position: absolute; z-index: 5; right: 9px; top: 39px; width: 116px; padding: 5px;
  background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow);
}
.card-menu button { width: 100%; border: 0; background: transparent; text-align: left; padding: 8px 9px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.card-menu button:hover { background: #f3f2ed; }
.card-menu .delete { color: #b23e38; }
.empty { min-height: 118px; display: grid; place-items: center; padding: 20px; color: #9a9d99; text-align: center; font-size: 12px; border: 1px dashed #d6d4cc; border-radius: 10px; }

.task-dialog {
  width: min(520px, calc(100% - 28px));
  border: 0;
  border-radius: 16px;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(21,29,25,.23);
}
.task-dialog::backdrop { background: rgba(28,35,32,.42); backdrop-filter: blur(3px); }
.task-dialog form { padding: 27px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.dialog-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.8px; }
.icon-button { border: 0; background: transparent; cursor: pointer; }
.close-button { font-size: 28px; line-height: 25px; color: #888; border-radius: 7px; }
.task-dialog label { display: block; margin: 16px 0 7px; font-size: 12px; font-weight: 800; }
.task-dialog label span { color: #999; font-weight: 400; float: right; }
.task-dialog input, .task-dialog textarea, .task-dialog select {
  width: 100%; border: 1px solid #d8d7d0; background: #fafaf7; border-radius: 8px; padding: 11px 12px; outline: none;
}
.task-dialog input:focus, .task-dialog textarea:focus, .task-dialog select:focus { border-color: #5f917d; box-shadow: 0 0 0 3px rgba(95,145,125,.12); }
.task-dialog textarea { resize: vertical; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  padding: 10px 15px; border-radius: 8px; background: #222a26; color: white; font-size: 12px;
  opacity: 0; pointer-events: none; transition: .22s ease; z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 850px) {
  .shell { padding: 0 20px 35px; }
  .board { grid-template-columns: 1fr; }
  .column { min-height: auto; }
  .card-list { min-height: 125px; }
}
@media (max-width: 520px) {
  .shell { padding: 0 14px 30px; }
  .topbar { height: 70px; }
  .saved-indicator { display: none; }
  .hero { padding: 35px 1px 23px; align-items: flex-start; }
  .task-total { margin-top: 14px; }
  .primary-button { padding: 10px 13px; }
  h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
