:root {
	color-scheme: light;
	--paper: #f6f7f2;
	--ink: #202b28;
	--muted: #78827c;
	--line: #e2e7df;
	--green: #2f725d;
	--green-dark: #245a49;
	--green-soft: #e7f0e9;
	--white: #fff;
	--coral: #c76c55;
	--shadow: 0 18px 55px rgb(39 58 48 / 8%);
}

* { box-sizing: border-box; }

body {
	min-width: 320px;
	min-height: 100vh;
	margin: 0;
	color: var(--ink);
	background-color: var(--paper);
	background-image: radial-gradient(#dce4db 0.65px, transparent 0.65px);
	background-size: 15px 15px;
	font-family: "DM Sans", sans-serif;
}

button, input { font: inherit; }
button { color: inherit; }

.page {
	width: min(100% - 40px, 1020px);
	margin: 0 auto;
	padding: 34px 0 52px;
}

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 4px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0;
}

.brand-mark {
	display: grid;
	width: 31px;
	height: 31px;
	place-items: center;
	border-radius: 9px;
	background: var(--green);
	color: white;
	font-size: 16px;
}

.today-label {
	color: var(--muted);
	font-family: "DM Mono", monospace;
	font-size: 11px;
	letter-spacing: 0;
	text-transform: uppercase;
}

.intro {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 28px;
	margin: 76px 0 34px;
}

.eyebrow {
	margin: 0 0 12px;
	color: var(--green);
	font-family: "DM Mono", monospace;
	font-size: 11px;
	letter-spacing: 0;
	text-transform: uppercase;
}

h1 {
	margin: 0;
	font-size: clamp(38px, 6vw, 62px);
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.04;
}

.intro-note {
	max-width: 235px;
	margin: 0 0 4px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.65;
}

.workspace {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 270px;
	overflow: hidden;
	min-height: 470px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--white);
	box-shadow: var(--shadow);
	animation: rise-in 500ms ease both;
}

.task-panel { padding: 30px 34px 28px; }

.panel-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
}

h2 {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0;
}

.task-count {
	color: var(--muted);
	font-family: "DM Mono", monospace;
	font-size: 11px;
}

.task-form {
	display: flex;
	gap: 9px;
	padding: 6px;
	border: 1px solid var(--line);
	border-radius: 6px;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.task-form:focus-within {
	border-color: #8eaf9e;
	box-shadow: 0 0 0 3px rgb(47 114 93 / 9%);
}

.task-input {
	width: 100%;
	min-width: 0;
	padding: 9px 10px;
	border: 0;
	outline: 0;
	color: var(--ink);
	background: transparent;
	font-size: 14px;
}

.task-input::placeholder { color: #a0a9a2; }

.add-button {
	flex: 0 0 auto;
	min-height: 38px;
	padding: 0 15px;
	border: 0;
	border-radius: 4px;
	background: var(--green);
	color: white;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	transition: background 160ms ease, transform 160ms ease;
}

.add-button:hover { background: var(--green-dark); }
.add-button:active { transform: scale(0.98); }

.filters {
	display: flex;
	gap: 5px;
	margin: 23px 0 12px;
	border-bottom: 1px solid var(--line);
}

.filter-button {
	position: relative;
	padding: 0 12px 12px;
	border: 0;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	font-size: 12px;
}

.filter-button:first-child { padding-left: 2px; }

.filter-button[aria-pressed="true"] {
	color: var(--green-dark);
	font-weight: 700;
}

.filter-button[aria-pressed="true"]::after {
	position: absolute;
	right: 12px;
	bottom: -1px;
	left: 12px;
	height: 2px;
	background: var(--green);
	content: "";
}

.filter-button:first-child[aria-pressed="true"]::after { left: 2px; }

.task-list {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.task-row {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 55px;
	padding: 8px 4px;
	border-bottom: 1px solid #eef0ec;
	animation: appear 180ms ease both;
}

.check-button {
	display: grid;
	flex: 0 0 19px;
	width: 19px;
	height: 19px;
	place-items: center;
	padding: 0;
	border: 1.5px solid #b8c5bb;
	border-radius: 50%;
	background: transparent;
	color: white;
	cursor: pointer;
	font-size: 11px;
	transition: background 160ms ease, border-color 160ms ease;
}

.check-button:hover { border-color: var(--green); }
.task-row.is-done .check-button { border-color: var(--green); background: var(--green); }

.task-text {
	flex: 1;
	min-width: 0;
	overflow-wrap: anywhere;
	font-size: 14px;
	line-height: 1.5;
}

.task-row.is-done .task-text { color: #9aa39c; text-decoration: line-through; }

.delete-button {
	display: grid;
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: #9aa39c;
	cursor: pointer;
	font-size: 17px;
	opacity: 0;
	transition: color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.task-row:hover .delete-button,
.delete-button:focus-visible { opacity: 1; }
.delete-button:hover { background: #f9eeeb; color: var(--coral); }

.empty-state {
	padding: 40px 10px;
	color: var(--muted);
	font-size: 13px;
	text-align: center;
}

.panel-footer {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding-top: 15px;
	color: var(--muted);
	font-size: 11px;
}

.clear-button {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--green);
	cursor: pointer;
	font-size: 11px;
}

.clear-button:hover { color: var(--green-dark); text-decoration: underline; }

.side-panel {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 29px 25px 24px;
	border-left: 1px solid var(--line);
	background: #f8faf6;
}

.progress-label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	color: var(--muted);
	font-family: "DM Mono", monospace;
	font-size: 10px;
	text-transform: uppercase;
}

.progress-number {
	margin: 0;
	font-size: 42px;
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1;
}

.progress-caption {
	margin: 9px 0 17px;
	color: var(--muted);
	font-size: 12px;
}

.progress-track {
	height: 5px;
	overflow: hidden;
	border-radius: 5px;
	background: #e4eae3;
}

.progress-fill {
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: var(--green);
	transition: width 250ms ease;
}

.note-block {
	padding: 17px;
	border: 1px solid #e5ebe3;
	border-radius: 6px;
	background: white;
}

.note-mark {
	display: grid;
	width: 27px;
	height: 27px;
	margin-bottom: 13px;
	place-items: center;
	border-radius: 7px;
	background: var(--green-soft);
	color: var(--green-dark);
	font-size: 14px;
}

.note-block p {
	margin: 0;
	color: #58665e;
	font-size: 12px;
	line-height: 1.65;
}

.side-caption {
	margin: 20px 0 0;
	color: #87918a;
	font-family: "DM Mono", monospace;
	font-size: 10px;
	line-height: 1.6;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	clip-path: inset(50%);
}

@keyframes rise-in {
	from { opacity: 0; transform: translateY(9px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes appear {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
	.page { width: min(100% - 28px, 520px); padding-top: 22px; }
	.intro { align-items: start; flex-direction: column; gap: 13px; margin: 54px 0 25px; }
	.intro-note { max-width: 330px; }
	.workspace { grid-template-columns: 1fr; }
	.task-panel { padding: 24px 20px 22px; }
	.side-panel { gap: 24px; padding: 22px 20px; border-top: 1px solid var(--line); border-left: 0; }
	.note-block { display: flex; align-items: center; gap: 13px; }
	.note-mark { flex: 0 0 27px; margin: 0; }
	.side-caption { margin-top: 0; }
	.delete-button { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}