/* The Tasks page (B6). Colors and fonts come from style.css. */
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
.tasks-head { display: flex; align-items: center; gap: 12px; }
.tasks-head h1 { flex: 1; margin: 0; font: 600 30px/1.1 var(--serif); }
.back-home { color: var(--soft); text-decoration: none; font-size: 15px; }
.back-home:hover { color: var(--ink); }
.hint { color: var(--soft); font-size: 14px; margin: 6px 0 0; }
@media (pointer: coarse) { .only-desktop { display: none; } }
.tasks-page section { margin-top: 20px; }
.tasks-page h2 { margin: 0 0 6px; }
.empty { color: var(--soft); font-size: 16px; }

.primary {
  border: 0; border-radius: 999px; padding: 8px 16px;
  background: var(--accent); color: #fff; font-weight: 600;
}
.primary.small { padding: 6px 14px; font-size: 15px; }
.link { border: 0; background: none; padding: 6px 4px; color: var(--accent); font-weight: 600; }
.link.small { font-size: 14px; white-space: nowrap; }
.link.soft { color: var(--soft); }
.primary:focus-visible, .link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.task-row {
  display: grid; grid-template-columns: 32px 1fr auto; align-items: start; gap: 4px 8px;
  padding: 10px 10px; border-radius: 12px;
  -webkit-user-select: none; user-select: none;
}
.task-row:hover { background: var(--card); }
.task-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.task-row.on { background: var(--accent-soft); }
.selecting .task-row { cursor: pointer; }
.task-row input[type=checkbox] { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--accent); cursor: pointer; }
.task-main { min-width: 0; display: flex; flex-direction: column; }
.task-name { overflow-wrap: anywhere; }
.task-row.done .task-name { text-decoration: line-through; color: var(--soft); }
.task-sub { color: var(--soft); font-size: 14px; }
.task-sub a { color: var(--soft); display: inline-block; padding: 4px 0; } /* a 24px tap target */
.task-sub a:hover { color: var(--accent); }

.bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: center;
  padding: 10px 16px calc(env(safe-area-inset-bottom) + 10px);
  background: var(--card); border-top: 1px solid var(--line);
  font-size: 16px;
}
#bar-count { color: var(--soft); }
.move-to { display: flex; align-items: center; gap: 6px; color: var(--soft); font-size: 15px; }
.move-to input { font: inherit; font-size: 15px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.with-bar main { padding-bottom: 160px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 24px);
  margin: 0; padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: 15px;
}
.with-bar .toast { bottom: calc(env(safe-area-inset-bottom) + 120px); }

/* Later (upc1): reads like the other group headings, with a full-size tap target. */
.tasks-page h2 .later-toggle { font: inherit; letter-spacing: inherit; text-transform: inherit; padding: 0; min-height: 44px; }

/* A1: the views on the left, each on a number key; one view at a time. */
.tasks-head .primary kbd { margin-left: 6px; padding: 0 5px; border-radius: 4px; background: rgba(255, 255, 255, .25); font: 600 12px/1.4 var(--sans); }
.tasks-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; margin-top: 18px; }
.views { display: flex; flex-direction: column; gap: 2px; align-self: start; position: sticky; top: 16px; }
.views a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 16px;
}
.views a:hover { background: var(--card); }
.views a[aria-current] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.views a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.views kbd { color: var(--soft); font: 500 12px/1 var(--sans); }
.view-body .hint { margin: 0 0 4px; }
.view-body section:first-of-type, .view-body .hint + section { margin-top: 4px; }
@media (max-width: 720px), (pointer: coarse) {
  .tasks-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 12px; }
  .views { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .views a { padding: 8px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; }
  .views kbd { display: none; }
}
@media (pointer: coarse) { .tasks-head kbd { display: none; } }

/* A task of its own: its name opens it in the quick-add box. */
.task-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
button.task-name {
  border: 0; background: none; padding: 0; margin: 0; text-align: left; color: inherit; font: inherit; cursor: pointer;
  min-height: 24px;
}
button.task-name:hover { color: var(--accent); }
button.task-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
/* The Today flag: Must and Like, never a priority. */
.task-flag { flex: none; padding: 1px 8px; border-radius: 999px; font: 600 12px/1.6 var(--sans); letter-spacing: .02em; }
.task-flag.must { background: var(--accent); color: #fff; }
.task-flag.like { background: var(--goal-soft); color: var(--goal); }
.task-row.flag-must input[type=checkbox] { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
.toast .toast-undo { color: var(--bg); text-decoration: underline; padding: 0 4px; }

/* Reminders view. */
.reminder-list { list-style: none; margin: 0; padding: 0; }
.reminder-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; }
.reminder-row:hover { background: var(--card); }
.reminder-row .reminder-at { color: var(--soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.reminder-row .reminder-name { overflow-wrap: anywhere; }

/* A week goal (A6): the star. */
.task-star { color: #c9962b; margin-right: 6px; }
