:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #68736c;
  --line: #d8dfda;
  --paper: #f4f7f2;
  --card: #ffffff;
  --accent: #ff5d38;
  --accent-dark: #dd3d1c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-underline-offset: 3px; }
button, input { font: inherit; }
.container { width: min(720px, calc(100% - 32px)); margin-inline: auto; }

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 900; letter-spacing: -.05em; text-decoration: none; font-size: 1.1rem; }
.brand span { color: var(--accent); margin-inline: .14em; }
nav, nav form { display: flex; align-items: center; gap: 14px; }
.user { color: var(--muted); font-size: .85rem; }
.text-button { border: 0; padding: 0; background: transparent; color: var(--ink); text-decoration: underline; cursor: pointer; }

main { padding-block: 72px; }
.hero, .welcome { margin-bottom: 36px; }
.welcome { padding-block: 8vh; }
.eyebrow { color: var(--accent-dark); font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 8px 0 12px; font-size: clamp(2.5rem, 8vw, 5rem); line-height: .95; letter-spacing: -.065em; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); }
.hero p:last-child, .welcome > p:last-of-type { max-width: 580px; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.actions { display: flex; gap: 10px; margin-top: 28px; }
.button, button[type="submit"] { border: 1px solid var(--ink); border-radius: 10px; padding: 11px 17px; background: var(--ink); color: white; font-weight: 750; text-decoration: none; cursor: pointer; }
.button.secondary { background: transparent; color: var(--ink); }

.task-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 18px; }
input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; background: var(--card); color: var(--ink); outline: none; }
input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 33, 27, .08); }
.task-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 16px 50px rgba(28, 41, 32, .06); }
.task-panel ul { margin: 0; padding: 0; list-style: none; }
.task { display: grid; grid-template-columns: 28px 1fr 32px; gap: 12px; align-items: center; min-height: 58px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task.is-done span { color: var(--muted); text-decoration: line-through; }
.check { width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: white; color: white; cursor: pointer; }
.is-done .check { border-color: var(--ink); background: var(--ink); }
.delete { border: 0; background: transparent; color: #9a4030; font-size: 1.5rem; cursor: pointer; opacity: .6; }
.delete:hover { opacity: 1; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty span { display: inline-grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); }

.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.auth-card { width: 100%; padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 16px 50px rgba(28, 41, 32, .06); }
.auth-card h1 { font-size: 2.8rem; }
.auth-card h2 { margin: 8px 0 24px; font-size: 2rem; letter-spacing: -.04em; }
.stack { display: grid; gap: 16px; }
.stack label { display: grid; gap: 7px; font-size: .86rem; font-weight: 700; }
.muted { color: var(--muted); font-size: .9rem; }
.error { padding: 11px 13px; border: 1px solid #e7aaa0; border-radius: 9px; background: #fff0ed; color: #8c2413; }
.status { position: fixed; right: 20px; bottom: 20px; max-width: min(420px, calc(100% - 40px)); margin: 0; padding: 12px 15px; border: 1px solid #e7aaa0; border-radius: 10px; background: #fff0ed; color: #8c2413; box-shadow: 0 12px 35px rgba(28, 41, 32, .14); }
.status.success { border-color: #a9d3b6; background: #eef9f1; color: #1e6535; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.htmx-request { opacity: .55; transition: opacity .15s; }

@media (max-width: 560px) {
  main { padding-block: 46px; }
  .user { display: none; }
  .task-form { grid-template-columns: 1fr; }
  .task-form button { width: 100%; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 22px; }
}
