:root {
  color-scheme: light dark;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef2f6;
  color: #17212b;
}

* { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; }

button, input, select { font: inherit; }

.shell {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 80px;
}

header { margin-bottom: 24px; }

h1, h2, h3, p { margin-top: 0; }

h1 { font-size: clamp(2rem, 7vw, 3.5rem); margin-bottom: 8px; }

.eyebrow {
  margin-bottom: 8px;
  color: #52616f;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status { color: #52616f; }

.status.ok { color: #166534; }

.status.error { color: #b42318; }

.card {
  padding: 24px;
  border: 1px solid #cad3dc;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgb(23 33 43 / 8%);
}

form, label { display: grid; gap: 8px; }

form { gap: 16px; }

label { color: #344450; font-weight: 650; }

input, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #aebbc6;
  border-radius: 10px;
  background: #ffffff;
  color: #17212b;
}

input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 3px solid #67a3ff;
  outline-offset: 2px;
}

.actions, .session-actions, .workspace-heading, .section-heading, .item-form, .compact-form, .document-form {
  display: flex;
  align-items: end;
  gap: 12px;
}

.workspace-heading, .section-heading { justify-content: space-between; align-items: start; }

.workspace-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid #d7dee5; }

.item-form, .document-form { margin: 20px 0; }

.item-form label, .compact-form label, .document-form label { flex: 1; }

.project-picker { min-width: 220px; }

.summary { color: #52616f; white-space: nowrap; }

button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #17212b;
  border-radius: 10px;
  background: #17212b;
  color: #ffffff;
  cursor: pointer;
}

button.secondary { background: transparent; color: #17212b; }

button.danger { border-color: #b42318; color: #b42318; }

.project-actions { display: grid; justify-items: end; gap: 8px; }

.session-actions { justify-content: flex-end; }

button:disabled { cursor: wait; opacity: 0.6; }

ul { display: grid; gap: 10px; padding: 0; list-style: none; }

li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d7dee5;
  border-radius: 12px;
}

li.done span { color: #52616f; text-decoration: line-through; }

.item-copy { display: grid; gap: 3px; }

.item-priority {
  color: #52616f;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.empty, .message { color: #52616f; }

.message { min-height: 1.5em; margin-top: 16px; }

@media (prefers-color-scheme: dark) {
  :root { background: #111820; color: #f4f7f9; }
  .card { background: #18222d; border-color: #344453; }
  .eyebrow, .status, label, .empty, .message, .summary { color: #b9c5cf; }
  .status.ok { color: #7ee2a8; }
  .status.error { color: #ff938a; }
  input, select { background: #101820; color: #f4f7f9; border-color: #66798a; }
  button { background: #f4f7f9; color: #111820; border-color: #f4f7f9; }
  button.secondary { color: #f4f7f9; border-color: #90a2b3; }
  button.danger { color: #ff938a; border-color: #ff938a; }
  li, .workspace-section { border-color: #415160; }
  li.done span { color: #aebbc6; }
  .item-priority { color: #b9c5cf; }
}

@media (max-width: 560px) {
  .shell { padding-top: 32px; }
  .actions, .session-actions, .section-heading, .item-form, .compact-form, .document-form { align-items: stretch; flex-direction: column; }
  .project-picker { min-width: 0; }
  button { width: 100%; }
}
