:root { font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: #20252b; background: #f5f6f7; color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(880px, calc(100% - 32px)); margin: 32px auto; }
header, .connection, .list-heading, .form-actions, .dialog-actions { display: flex; align-items: center; gap: 12px; }
header, .list-heading { justify-content: space-between; }
header { margin-bottom: 24px; flex-wrap: wrap; }
h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.03em; }
h2 { margin: 0 0 16px; font-size: 1.05rem; }
header p { margin: 2px 0 0; color: #58616c; }
.connection, #count, .optional, .hint, footer { font-size: .85rem; color: #59616b; }
.panel { background: #fff; border: 1px solid #dce0e4; border-radius: 6px; padding: 22px; margin-bottom: 18px; }
.login { max-width: 520px; margin: 56px auto 18px; }
.login p { color: #59616b; }
.login form { display: grid; gap: 14px; }
.login button { justify-self: start; }
form#task-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.full { grid-column: 1 / -1; }
label { font-size: .9rem; font-weight: 600; }
input, select, button { font: inherit; border: 1px solid #bbc2c9; border-radius: 4px; }
input, select { min-width: 0; width: 100%; padding: 9px 10px; background: #fff; color: inherit; }
button { padding: 8px 12px; background: #fff; color: inherit; cursor: pointer; min-height: 40px; }
button:hover { background: #f0f2f4; }
button.primary { background: #263b51; border-color: #263b51; color: #fff; }
button.primary:hover { background: #172b40; }
button.danger { color: #a12828; }
button:disabled, input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid #4984bc; outline-offset: 3px; }
[hidden] { display: none !important; }
#message { padding: 12px; border: 1px solid #afc7b6; border-radius: 4px; background: #f0f8f2; overflow-wrap: anywhere; }
#message.error { border-color: #dbb2ae; background: #fff2f0; color: #862521; }
#connection.offline { color: #9d3125; }
.list-heading h2 { margin-bottom: 0; }
.list-heading { margin-bottom: 12px; }
.task-list, .children { list-style: none; padding: 0; margin: 0; }
.task-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; padding: 16px 0; border-top: 1px solid #e7e9ec; }
.task-row input[type="checkbox"] { width: 19px; height: 19px; margin: 4px 0 0; accent-color: #263b51; }
.task-name { font-weight: 600; overflow-wrap: anywhere; }
.done .task-name { text-decoration: line-through; color: #65707c; }
.metadata { margin-top: 3px; color: #606b77; font-size: .82rem; }
.task-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.task-actions button { font-size: .82rem; padding: 5px 9px; min-height: 34px; }
.children { padding-left: 20px; margin-left: 8px; border-left: 2px solid #e4e7eb; }
.hint { margin: 18px 0 0; }
footer { text-align: center; padding-bottom: 16px; }
dialog { width: min(440px, calc(100% - 32px)); padding: 24px; border: 1px solid #bbb; border-radius: 6px; }
dialog::backdrop { background: #0005; }
#delete-description { overflow-wrap: anywhere; font-weight: 600; }
.dialog-actions { justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 520px) {
  main { margin: 20px auto; }
  .panel { padding: 16px; }
  form#task-form { grid-template-columns: 1fr; }
  .children { padding-left: 9px; margin-left: 2px; }
  .connection { width: 100%; justify-content: space-between; }
  .login { margin-top: 28px; }
}
