:root {
  color-scheme: light;
  --purple: #7045f6;
  --purple-dark: #351577;
  --action: #452095;
  --lavender: #ded6ff;
  --lime: #c5f567;
  --ink: #252037;
  --muted: #4d435e;
  --bg: #f5f2ff;
  --line: #e8e2f7;
  --danger: #a0181a;
  --danger-bg: #a0181a;
  --danger-hover: #8c1717;
  --surface: #fff;
  --surface-raised: #fdfcff;
  --surface-soft: #faf8ff;
  --surface-active: #f0eaff;
  --surface-hover: #ede7fc;
  --header-bg: #ffffff40;
  --board-bg: #ece7f7;
  --control-border: #8a809d;
  --secondary-border: #bba5ff;
  --button-bg: #452095;
  --button-hover: #351577;
  --on-lime: #252037;
  --inverse-bg: #252037;
  --tag-work: #e0ebff;
  --tag-study: #ecf9df;
  --tag-personal: #f2e7fa;
  --tag-high: #ffe0e4;
  --tag-medium: #fff1cb;
  --tag-low: #eaf9d7;
  --error-bg: #fff0f0;
  --error-ink: #9e2020;
  --success-bg: #edfadf;
  --success-ink: #294e0d;
  --radius: 12px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --purple: #bba5ff;
  --purple-dark: #e0d4ff;
  --action: #d5c5ff;
  --lavender: #39304f;
  --ink: #f5f2ff;
  --muted: #c8bfd9;
  --bg: #15111e;
  --line: #443b54;
  --danger: #ffb4bd;
  --surface: #211b2d;
  --surface-raised: #1c1726;
  --surface-soft: #282132;
  --surface-active: #3c3154;
  --surface-hover: #342a45;
  --header-bg: #1c1726;
  --board-bg: #1c1726;
  --control-border: #9c8eaf;
  --secondary-border: #a28acb;
  --tag-work: #253653;
  --tag-study: #2b3c26;
  --tag-personal: #3d2b4c;
  --tag-high: #4b2634;
  --tag-medium: #443619;
  --tag-low: #2d3c22;
  --error-bg: #40212b;
  --error-ink: #ffc1c9;
  --success-bg: #24351e;
  --success-ink: #d0f2b9;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
h1,
h2,
h3,
h4,
.brand {
  font-family: Outfit, Arial, sans-serif;
  line-height: 1.18;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.025em;
}
h1 {
  font-size: 40px;
}
h2 {
  font-size: 21px;
}
h3 {
  font-size: 18px;
}
p {
  margin: 0 0 16px;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button {
  color: inherit;
}
input,
select,
textarea {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--control-border);
  border-radius: 7px;
  padding: 11px 12px;
  min-width: 0;
  max-width: 100%;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--action);
}
input[type="checkbox"] {
  accent-color: var(--action);
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
textarea {
  resize: vertical;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
}
fieldset {
  min-inline-size: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
legend {
  padding: 0;
  margin: 0 0 10px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
}
::selection {
  background: var(--lavender);
}
.container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}
.purple {
  color: var(--action);
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  color: var(--action);
  margin: 0 0 14px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 23px;
  border: 1px solid var(--purple);
  border-radius: 7px;
  background: var(--button-bg);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  transition:
    background 0.15s,
    transform 0.15s;
}
.btn:hover {
  background: var(--button-hover);
  border-color: var(--button-hover);
}
.btn:active {
  transform: translateY(1px);
}
.btn.small {
  padding: 9px 19px;
  min-height: 38px;
  font-size: 12px;
}
.btn.secondary {
  background: transparent;
  color: var(--action);
  border-color: var(--secondary-border);
}
.btn.secondary:hover {
  background: var(--surface-hover);
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}
.theme-toggle:hover {
  background: var(--surface-hover);
}
.theme-toggle[aria-pressed="true"] {
  background: var(--lavender);
  border-color: var(--purple);
}
@media (max-width: 1100px) {
  .theme-toggle {
    width: 44px;
    padding: 8px;
  }
  .theme-toggle > span {
    display: none;
  }
}
.btn.danger {
  background: var(--danger-bg);
  border-color: var(--danger-bg);
}
.btn.danger:hover {
  background: var(--danger-hover);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: #7045f6;
  padding: 4px;
}
.brand-mark > span {
  width: 100%;
  height: 100%;
  border: 1.5px solid white;
  border-radius: 4px;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tabs button {
  border: 0;
  background: none;
  padding: 7px 15px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.tabs .active {
  background: var(--lavender);
  color: var(--purple-dark);
  font-weight: 600;
}
.tabs button:hover {
  background: var(--surface-hover);
  color: var(--action);
}
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 1.4;
  padding: 3px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.tag.work {
  background: var(--tag-work);
}
.tag.study {
  background: var(--tag-study);
}
.tag.personal {
  background: var(--tag-personal);
}
.tag.high {
  background: var(--tag-high);
}
.tag.medium {
  background: var(--tag-medium);
}
.tag.low {
  background: var(--tag-low);
}
.tag i,
.priority-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tag.high i,
.priority-dot.high {
  background: #eb4b64;
}
.tag.medium i,
.priority-dot.medium {
  background: #e9ad12;
}
.tag.low i,
.priority-dot.low {
  background: #4ba526;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin: 15px 0 6px;
}
progress {
  width: 100%;
  height: 8px;
  appearance: none;
  border: none;
  border-radius: 99px;
  overflow: hidden;
  background: var(--lavender);
  display: block;
}
progress::-webkit-progress-bar {
  background: var(--lavender);
  border-radius: 99px;
}
progress::-webkit-progress-value {
  background: var(--purple);
  border-radius: 99px;
}
progress::-moz-progress-bar {
  background: var(--purple);
  border-radius: 99px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #70ad32;
  display: inline-block;
  flex-shrink: 0;
}
.notice {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 13px 16px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 24px;
  color: var(--muted);
}
.notice a {
  text-decoration: underline;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
}
.text-link {
  color: var(--action);
  font-size: 12px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  text-decoration: none;
}
.text-link:hover {
  text-decoration: underline;
}
.error-message,
.success-message {
  font-size: 13px;
  padding: 14px 16px;
  border-radius: 7px;
  background: var(--error-bg);
  color: var(--error-ink);
  margin-bottom: 20px;
}
.error-message > .text-link {
  margin-left: 15px;
}
.success-message {
  background: var(--success-bg);
  color: var(--success-ink);
}
.error-page {
  padding-block: 100px;
}
.error-page > p {
  margin: 20px 0;
}
.error-page > .btn {
  margin-right: 12px;
}
.loading-page {
  padding-top: 90px;
}
.skeleton {
  height: 65px;
  border-radius: 9px;
  background: #ded6ff77;
  margin: 20px 0;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 20px;
  z-index: 200;
  background: var(--inverse-bg);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
}
.skip-link:focus {
  top: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Workspace */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.field-hint {
  font-size: 10px;
  color: var(--muted);
  margin: -10px 0 0;
}
@media (max-width: 740px) {
  .container {
    width: calc(100% - 40px);
  }
  .hero-copy .eyebrow {
    font-size: 10px;
  }
  .form-grid {
    gap: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
*::before,
*::after {
    transition: none !important;
    animation: none !important;
  }
}
.workspace-content {
  min-width: 0;
}

/* Minimum hit areas apply after compact variants and responsive overrides. */
button, summary, .btn, input:not([type="checkbox"]):not([type="hidden"]), select {
  min-height: 44px;
}
button, summary, .btn { min-width: 44px; }
.btn.small { min-height: 44px; }
label, .form-grid > *, .task-form > * { min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
@media (max-width: 480px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
