/* deadlines — solid content only (no glass), the shell's tokens, scoped under .dl (lists) and .dl-form (the
 * add sheet). Works at 320 px; respects reduced motion and more contrast. */

.dl .dl-row { gap: 10px; padding-left: 12px; }
.dl .dl-row + .dl-row::before, .dl .dl-toggle + .dl-overdue-items .dl-row:first-child::before { left: 55px; }
.dl .dl-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start;
  padding: 2px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.dl .dl-main:active { opacity: .6; }
.dl .dl-title { overflow-wrap: anywhere; }
.dl .dl-when { font-variant-numeric: tabular-nums; text-align: right; font-size: 15px; line-height: 1.25; }
.dl .dl-when .dl-day, .dl .dl-when .dl-hm { display: block; }
.dl .dl-when .dl-hm { font-size: 13px; }
.dl .is-soon .dl-when { color: var(--accent); }
.dl .is-done .dl-when { color: var(--hint); }

/* The tap target is 44 × 44 (the most used control on the list); the ring drawn inside it is 28 px. The
 * negative margins keep the row's height and the title's position as they were. */
.dl-check {
  position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  margin: -7px -4px -7px -7px; padding: 0; border: 0; border-radius: 50%; background: none; color: transparent;
  cursor: pointer; transition: color .18s ease; -webkit-tap-highlight-color: transparent;
}
.dl-check::before {
  content: ""; position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; box-sizing: border-box;
  border: 1.6px solid rgb(var(--text-rgb) / 0.32); border-radius: 50%;
  transition: background .18s ease, border-color .18s ease;
}
.dl-check .ico { position: relative; width: 17px; height: 17px; stroke-width: 2.4; }
.dl-check[aria-checked="true"] { color: var(--accent-text); }
.dl-check[aria-checked="true"]::before { background: var(--accent); border-color: var(--accent); }
.dl-check:focus-visible, .dl-main:focus-visible, .dl-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dl .is-done .dl-title { text-decoration: line-through; color: var(--hint); }

.dl .dl-toggle { cursor: pointer; }
.dl .dl-toggle .badge { flex: none; }
.dl .dl-chev { transition: transform .2s ease; }
.dl .dl-toggle[aria-expanded="true"] .dl-chev { transform: rotate(180deg); }
.dl .dl-overdue-items .dl-when { color: var(--hint); }
.dl .dl-all-done { color: var(--hint); font-size: 15px; }

.dl .dl-card { text-align: left; }
.dl .dl-card-title { font-size: 22px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.dl .dl-card.is-done .dl-card-title { text-decoration: line-through; color: var(--hint); }
.dl .dl-card-when { margin-top: 10px; font-size: 15px; font-weight: 600; color: var(--accent); }
.dl .dl-card-when.is-past, .dl .dl-card.is-done .dl-card-when { color: var(--hint); }
.dl .dl-danger { margin-top: 24px; display: grid; }

.dl-form { display: grid; gap: 12px; }
.dl-input {
  width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 12px;
  background: var(--bg2); color: var(--text); font: inherit; font-size: 16px;
  -webkit-user-select: text; user-select: text;
}
.dl-input:focus { outline: 2px solid rgb(var(--accent-rgb) / 0.5); outline-offset: 0; }
.dl-label { font-size: 15px; font-weight: 600; color: var(--section-header); margin-top: 4px; }
.dl-subjects { max-height: 132px; overflow-y: auto; }
.dl-shortcuts { display: grid; gap: 8px; }
.dl-shortcuts:empty { display: none; }
.dl-hint { margin: 0; font-size: 14px; line-height: 1.4; color: var(--hint); }
.dl-when-row { display: grid; gap: 10px; }
.dl-when-row .date-picker { display: flex; justify-content: space-between; width: 100%; min-width: 0;
                            padding: 4px; border-radius: 12px; background: var(--bg2); }
.dl-when-row .date-picker .stepper-value { flex: 1; min-width: 0; font-size: 16px; }
.dl-time-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
               padding: 0 4px 0 14px; border-radius: 12px; background: var(--bg2); }
.dl-time-row span { font-size: 16px; }
.dl-time { flex: 0 0 auto; width: 120px; min-height: 42px; text-align: right; background: none;
           font-variant-numeric: tabular-nums; }
.dl-anchor { margin: 0; font-size: 14px; color: var(--accent); }
.dl-error { margin: 0; min-height: 1.3em; font-size: 14px; color: var(--destructive); }

.dl-switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative;
  width: 51px; height: 31px; margin: 0; border-radius: 16px; background: rgb(var(--text-rgb) / 0.16);
  cursor: pointer; transition: background .2s ease;
}
.dl-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform .2s ease;
}
.dl-switch:checked { background: var(--accent); }
.dl-switch:checked::after { transform: translateX(20px); }
.dl-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .dl-check, .dl-check::before, .dl .dl-chev, .dl-switch, .dl-switch::after { transition: none; }
}
@media (prefers-contrast: more) {
  .dl-check::before { border-color: var(--text); }
  .dl .is-done .dl-title, .dl .dl-all-done, .dl-hint { color: var(--text); }
  .dl-switch { box-shadow: inset 0 0 0 1px var(--text); }
  .dl-input { box-shadow: inset 0 0 0 1px var(--sep); }
}
