/* Zen's own layer over the shared library's stylesheet: only what the
   library does not already say. Addresses never appear here; images and
   fonts come from the library or the page. */

/* The notch and the home indicator (viewport-fit=cover is set by the
   library's document). */
body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Safari zooms into any input under 16px; nobody asked it to. */
input,
select,
textarea {
  font-size: max(16px, 1rem);
}

.brand-mark {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
}

.zen-form {
  display: grid;
  gap: 1rem;
  margin-block: 1rem 2rem;
}

section + section {
  margin-top: 2rem;
}

/* Phase 2: capture, the inbox, what is waiting. */

.zen-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.zen-capture {
  display: grid;
  gap: 0.5rem;
  margin-block: 1rem 1.5rem;
}

.zen-capture__label {
  font-weight: 600;
}

.zen-capture__hint,
.zen-capture__status,
.zen-thought__meta,
.zen-not-sent__reason {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.75;
}

.zen-capture__actions,
.zen-thought__actions,
.zen-not-sent__actions,
.zen-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* The start field's place chip and chips (plans/002-usability.md, U2a):
   the place beside the label, the chips under the field, in one row that
   wraps. Each is shown by the script; `hidden` must win over the layout. */
.zen-capture__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.zen-place__select {
  width: auto;
  max-width: 100%;
  min-height: var(--ui-touch, 2.75rem);
  border-radius: 999px;
}

.zen-chips,
.zen-chips__set,
.zen-chips__people {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.zen-chips__people {
  flex-basis: 100%;
}

.zen-chips[hidden],
.zen-chips__set[hidden],
.zen-chips__people[hidden],
.zen-place[hidden] {
  display: none;
}

.zen-chip {
  min-height: var(--ui-touch, 2.75rem);
  border-radius: 999px;
}

/* "So schreibst du": a part per section, its lines to copy. */
.zen-help {
  margin-block: 1.25rem;
}

.zen-help__examples {
  display: grid;
  gap: 0.25rem;
  padding-inline-start: 1.25rem;
}


.zen-inline {
  display: inline-block;
  margin: 0;
}

/* Rows of controls: an input with its button, a row of buttons. They keep
   a gap between them and wrap whole, the input taking the room that is
   left, never its button's. */

.zen-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.zen-row > .ui-input {
  flex: 1 1 12rem;
  min-width: 0;
  width: auto;
}

.zen-row > .ui-btn,
.zen-row > .zen-inline {
  flex: none;
}

/* A form of a label over such a row, set apart from what is above it. */
.zen-stack {
  display: grid;
  gap: 0.375rem;
  margin-block: 1rem;
  justify-items: start;
}

.zen-stack > .zen-row {
  width: 100%;
}

/* The buttons under a page's facts, a form's foot. */
.zen-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-block: 1rem;
}

/* A form's buttons keep their own width; the fields take the column. */
.zen-form > .ui-btn {
  justify-self: start;
}

.ui-kv {
  margin-block: 1rem;
}

.zen-lead {
  color: var(--ui-text-muted);
}

/* Start: what today holds, above the field, and the line a section shows
   when it has nothing (plans/001-zen.md, *Pages*, Start). */
.zen-today {
  margin: 0 0 0.75rem;
}

.zen-empty {
  color: var(--ui-text-muted);
  margin: 0;
}

/* The switches a page is shown by — which tasks, which calendar, which
   inbox: the library's segmented control, a thumb's width tall on a
   phone. */
.zen-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-block: 0.5rem 1rem;
}

@media (max-width: 640px), (pointer: coarse) {
  .zen-switches .ui-segmented__item {
    min-height: var(--ui-touch);
  }
  .ui-pager .ui-btn {
    height: var(--ui-touch);
    min-width: var(--ui-touch);
  }
}
.zen-thoughts,
.zen-not-sent {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.zen-thought,
.zen-not-sent__item {
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
  border-radius: 0.5rem;
  display: grid;
  gap: 0.4rem;
}

.zen-thought--waiting {
  border-style: dashed;
}

/* What people write keeps its lines. */
.zen-thought__text,
.zen-not-sent__text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.zen-thought__note {
  margin: 0;
  font-style: italic;
}

.zen-thought__audio {
  width: 100%;
  max-width: 28rem;
}

.zen-queue {
  margin-block: 1rem;
}

.zen-break {
  overflow-wrap: anywhere;
}

.zen-dialog {
  max-width: min(32rem, calc(100vw - 2rem));
  border-radius: 0.75rem;
}

/* Phase 3: the tab bar at the bottom on a phone (plans/001-zen.md, *Pages*). The bar
   at the top shows the page's name there instead of the sections — the same
   breakpoint the library's bar takes its phone shape at. */

.zen-tabbar {
  display: none;
}

@media (max-width: 640px), (max-height: 520px) {
  .zen-tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 30;
    display: flex;
    justify-content: space-around;
    padding: 0.25rem max(0.5rem, env(safe-area-inset-right)) max(0.25rem, env(safe-area-inset-bottom))
      max(0.5rem, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--ui-bg) 92%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--ui-border);
  }
  .zen-tabbar__tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    min-height: 3rem;
    padding: 0.375rem 0.25rem;
    font-size: 0.75rem;
    color: var(--ui-text-muted);
    text-decoration: none;
    border-radius: var(--ui-radius-md);
  }
  .zen-tabbar__tab .ui-icon {
    font-size: 1.375rem;
  }
  .zen-tabbar__tab[aria-current="page"] {
    color: var(--ui-text);
    font-weight: 600;
  }
  .zen-tabbar__tab:focus-visible {
    outline: none;
    box-shadow: var(--ui-ring);
  }
  /* Room under the content for the bar. */
  body {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom));
  }
}

/* The shopping view: one big button per item, for a thumb in a shop. */

.zen-items {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.375rem;
}

.zen-section h2,
.zen-due h2 {
  font-size: 1rem;
  margin-block: 1.25rem 0.5rem;
}

.zen-item {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
  border-radius: 0.5rem;
}

.zen-item__form {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  display: flex;
}

.zen-item__tick {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  min-height: 3.25rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 1.0625rem;
  text-align: start;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0.5rem;
  cursor: pointer;
}

.zen-item__tick:focus-visible,
.zen-item__edit:focus-visible {
  outline: none;
  box-shadow: var(--ui-ring);
}

.zen-item__box {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid currentColor;
  border-radius: 0.375rem;
  opacity: 0.6;
}

.zen-item__name {
  flex: 1 1 8rem;
  overflow-wrap: anywhere;
}

.zen-item__due,
.zen-item__note,
.zen-item__waiting {
  flex-basis: 100%;
  padding-inline-start: 2.25rem;
  font-size: 0.8125rem;
  opacity: 0.75;
}

.zen-item__edit {
  flex: none;
  display: grid;
  place-items: center;
  width: 3rem;
  color: inherit;
  border-radius: 0.5rem;
  opacity: 0.7;
}

/* Ticked: struck through, the box filled — not by colour alone. */
.zen-item--done .zen-item__name,
.zen-item--ticked .zen-item__name {
  text-decoration: line-through;
  opacity: 0.7;
}

.zen-item--done .zen-item__box,
.zen-item--ticked .zen-item__box {
  background: currentColor;
}

.zen-item--waiting {
  border-style: dashed;
}

.zen-bought {
  margin-block: 1.5rem;
}

.zen-bought summary {
  font-weight: 600;
  cursor: pointer;
  padding-block: 0.625rem;
}

/* plans/002-usability.md, U1d: "Kopieren als neue Liste", folded away
   under a list's actions, and "Bereiche ordnen". */
.zen-copy {
  margin-block: 1rem;
}

.zen-copy summary {
  font-weight: 600;
  cursor: pointer;
  padding-block: 0.625rem;
}

/* plans/002-usability.md, U1e: "Vergangen" and "Ohne Termin" under
   "Listen für Termine", folded. */
.zen-folded {
  margin-block: 0.75rem;
}

.zen-folded summary {
  font-weight: 600;
  cursor: pointer;
  padding-block: 0.625rem;
}

.zen-sections {
  list-style: none;
  padding: 0;
  margin-block: 1rem;
}

.zen-sections li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.375rem;
}

.zen-sections .zen-actions {
  margin: 0;
}

.zen-count {
  font-size: 0.875rem;
  opacity: 0.75;
  white-space: nowrap;
}


.zen-item__tick--static {
  cursor: default;
}

.zen-task__note {
  white-space: pre-line;
}

.zen-fieldset {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}

.zen-fieldset legend {
  font-weight: 600;
  margin-bottom: 0.375rem;
}

/* Phase 6: the calendar — the agenda's days, the month grid, a time in a
   row — and the pager between weeks and months. */

.zen-time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.zen-day h3 {
  margin: 1.25rem 0 0.25rem;
  font-size: 1rem;
}

/* A day's heading makes an appointment on that day (plans/002-usability.md,
   U5): it reads as a heading, with a small plus. */
.zen-day__new {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: inherit;
  text-decoration: none;
}

.zen-day__new:hover {
  text-decoration: underline;
}

.zen-day__new svg {
  width: 1rem;
  height: 1rem;
  color: var(--ui-text-muted);
}

/* The calendar's walk: the month's name, then earlier, today, later. */
.zen-walk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-block: 0.5rem;
}

.zen-walk__title {
  margin: 0;
}

.zen-month {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.zen-month th {
  padding: 0.25rem;
  font-weight: 600;
  color: var(--ui-text-muted);
}

.zen-month__day {
  position: relative;
  height: 5.5rem;
  padding: 0.25rem;
  vertical-align: top;
  border: 1px solid var(--ui-border);
  overflow: hidden;
}

.zen-month__day--other {
  color: var(--ui-text-muted);
  background: color-mix(in srgb, var(--ui-border) 25%, transparent);
}

.zen-month__day--today .zen-month__date {
  font-weight: 700;
  text-decoration: underline;
}

.zen-month__date {
  display: block;
  color: inherit;
  text-decoration: none;
}

.zen-month__entry {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
}

/* A day's number makes an appointment on it; on a phone a busy day leads to
   its list first (plans/002-usability.md, U5). */
.zen-month__jump,
.zen-month__dots,
.zen-month-list {
  display: none;
}

/* On a phone a day's titles cannot be read in a seventh of the screen: the
   grid shows a dot per entry, the whole day is the link to it in the list
   below, and the list says what is on each day. */
@media (max-width: 640px) {
  .zen-month__day {
    height: 3.5rem;
    text-align: center;
  }
  .zen-month__entry {
    display: none;
  }
  .zen-month__jump {
    display: block;
  }
  .zen-month__day--busy .zen-month__new {
    display: none;
  }
  .zen-month__date::after {
    content: "";
    position: absolute;
    inset: 0;
  }
  .zen-month__date:focus-visible {
    outline: none;
  }
  .zen-month__day:has(.zen-month__date:focus-visible) {
    box-shadow: inset var(--ui-ring);
  }
  .zen-month__dots {
    display: flex;
    justify-content: center;
    gap: 0.1875rem;
    margin-top: 0.375rem;
  }
  .zen-month__dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: currentColor;
  }
  .zen-month-list {
    display: block;
    margin-top: 1rem;
  }
}

/* Rows with an aside — the agenda, search, what is coming: the title
   breaks between words, and on a phone the aside goes under it rather than
   squeezing it to a few letters a line. The aside sits on the title's
   baseline. */
.zen-rows .ui-list__title,
.ui-list__title {
  overflow-wrap: break-word;
}

.ui-list__trail {
  align-self: baseline;
}

.zen-row-sub {
  display: block;
  font-size: var(--ui-text-sm);
  color: var(--ui-text-muted);
}

@media (max-width: 640px) {
  .zen-rows .ui-list__link {
    flex-wrap: wrap;
    row-gap: 0.125rem;
  }
  .zen-rows .ui-list__title {
    flex: 1 1 0;
    min-width: 0;
  }
  .zen-rows .ui-list__trail {
    flex-basis: 100%;
    padding-inline-start: calc(7.5rem + 0.75rem);
  }
  .zen-rows .ui-list--wide-lead .ui-list__lead {
    flex-basis: 6.5rem;
  }
  .zen-rows .ui-list--wide-lead .ui-list__trail {
    padding-inline-start: calc(6.5rem + 0.75rem);
  }
  .zen-rows .ui-list:not(.ui-list--wide-lead) .ui-list__trail {
    padding-inline-start: calc(4.5rem + 0.75rem);
  }
  .zen-rows .ui-list__link:not(:has(.ui-list__lead)) .ui-list__trail {
    padding-inline-start: 0;
  }
}

/* Inbox triage: the list, then the common steps in one row with Drop at
   its end, and making an appointment behind its own disclosure. */
.zen-thought__actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.zen-thought__actions > .zen-row > .zen-to-list__select {
  flex: 1 1 12rem;
  max-width: 20rem;
}

.zen-more > summary {
  cursor: pointer;
  padding-block: 0.75rem;
  line-height: 1.25rem;
  font-size: var(--ui-text-sm);
  font-weight: var(--ui-control-weight);
}

.zen-triage-event {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
}

.zen-triage-event__field {
  display: grid;
  gap: 0.25rem;
  flex: 1 1 9rem;
}

.zen-triage-event .zen-capture__hint {
  flex-basis: 100%;
}

/* plans/002-usability.md, U2b: the field for a new thought folded to one
   line on the inbox, the older thoughts folded with "Alle älteren
   verwerfen", and the split before "Auf die Liste". */
.zen-new-thought,
.zen-older {
  margin-block: 0.75rem;
}

.zen-new-thought > summary,
.zen-older > summary {
  font-weight: 600;
  cursor: pointer;
  padding-block: 0.625rem;
}

.zen-new-thought > .zen-capture {
  margin-block: 0.5rem 1rem;
}

.zen-older__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-block: 0.25rem 0.75rem;
}

.zen-older__actions > .zen-capture__hint {
  flex-basis: 100%;
  margin: 0;
}

.zen-split__thought {
  margin: 0 0 1rem;
  padding-inline-start: 0.75rem;
  border-inline-start: 3px solid var(--ui-border);
  white-space: pre-line;
  overflow-wrap: break-word;
  color: var(--ui-text-muted);
}

/* What is overdue says so in a word; the date stays bold beside it. */
.zen-late {
  font-weight: 700;
}

/* A task ticked off in a calendar app has no box: its words start where
   the box would be. */
.zen-item--elsewhere .zen-item__due,
.zen-item--elsewhere .zen-item__note {
  padding-inline-start: 0;
}

.zen-rows .zen-count {
  white-space: normal;
}

/* The settings' boxes and an appointment's people: one under the other. */
.zen-fieldset {
  display: grid;
  gap: 0.25rem;
}

/* plans/002-usability.md, U1a: lists in the shop. What stands fixed at the
   bottom, from the bottom up: the tab bar (on a phone), the add field (in
   shopping mode), the toast. Each one's height is a variable the next one
   stands on; the script measures the add field and the toast, and how far
   the keyboard covers the page. */

:root {
  --zen-tabbar-h: 0px;
  --zen-add-h: 0px;
  --zen-toast-h: 0px;
  --zen-keyboard: 0px;
}

@media (max-width: 640px), (max-height: 520px) {
  :root {
    --zen-tabbar-h: calc(3.75rem + env(safe-area-inset-bottom));
  }
  .zen-tabbar {
    box-sizing: border-box;
    height: var(--zen-tabbar-h);
  }
}

/* A list page's last rows stay reachable above everything fixed. */
body:has(.zen-shop) {
  padding-bottom: max(env(safe-area-inset-bottom), calc(var(--zen-tabbar-h) + var(--zen-add-h) + var(--zen-toast-h) + 0.75rem));
}

/* Why a change sent in place was not made, on its row. */
.zen-item__problem {
  flex-basis: 100%;
  padding-inline-start: 2.25rem;
  font-size: 0.8125rem;
  color: var(--ui-danger);
}

.zen-item[aria-busy="true"] .zen-item__tick {
  opacity: 0.6;
}

.zen-capture__status:empty {
  display: none;
}

/* The toast: what a change did, and its Undo — until the next change or
   until it is closed, never on a timer. */
.zen-toast {
  position: fixed;
  z-index: 32;
  inset-inline: 0;
  bottom: calc(max(var(--zen-tabbar-h), var(--zen-keyboard)) + var(--zen-add-h) + 0.5rem);
  display: flex;
  justify-content: center;
  padding-inline: max(0.75rem, env(safe-area-inset-left)) max(0.75rem, env(safe-area-inset-right));
  pointer-events: none;
}

.zen-toast__box {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 34rem;
  padding: 0.375rem 0.375rem 0.375rem 1rem;
  color: var(--ui-text);
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border-strong);
  border-radius: 0.75rem;
  box-shadow: var(--ui-shadow-md);
}

.zen-toast__box[hidden] {
  display: none;
}

.zen-toast__text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.zen-toast__close {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--ui-touch);
  height: var(--ui-touch);
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0.5rem;
  cursor: pointer;
}

.zen-toast__close:focus-visible {
  outline: none;
  box-shadow: var(--ui-ring);
}

/* Shopping mode, on a phone: compact rows, one line and 48px to tap, and
   the add field folded to one line fixed above the tab bar, opening when it
   is tapped — and above the keyboard while that is open. */
@media (max-width: 599.98px) {
  .zen-shop .zen-items {
    gap: 0.25rem;
  }
  .zen-shop .zen-item__tick {
    flex-wrap: nowrap;
    min-height: 48px;
    padding-block: 0.25rem;
    gap: 0.625rem;
  }
  .zen-shop .zen-item__name {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .zen-shop .zen-item__due,
  .zen-shop .zen-item__note,
  .zen-shop .zen-item__waiting,
  .zen-shop .zen-item__problem {
    flex: 0 1 auto;
    max-width: 45%;
    padding-inline-start: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .zen-shop .zen-item__edit {
    width: 48px;
  }
  .zen-list-add {
    position: fixed;
    z-index: 31;
    inset-inline: 0;
    bottom: max(var(--zen-tabbar-h), var(--zen-keyboard));
    box-sizing: border-box;
    margin: 0;
    gap: 0.375rem;
    padding: 0.375rem max(0.75rem, env(safe-area-inset-right)) 0.375rem max(0.75rem, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--ui-bg) 94%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--ui-border);
  }
  .zen-list-add .zen-capture__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .zen-list-add textarea {
    height: 44px;
    min-height: 44px;
    resize: none;
  }
  .zen-list-add:not(:focus-within):not(.zen-list-add--open) .zen-capture__hint,
  .zen-list-add:not(:focus-within):not(.zen-list-add--open) .zen-capture__actions {
    display: none;
  }
  .zen-list-add:focus-within textarea,
  .zen-list-add.zen-list-add--open textarea {
    height: auto;
    min-height: 4.5rem;
  }
  :root:has(.zen-list-add) {
    --zen-add-h: 3.5rem;
  }
}

/* On a wide screen the placeholder says nothing the label above it does
   not. */
@media (min-width: 600px) {
  .zen-list-add textarea::placeholder {
    color: transparent;
  }
}

/* plans/002-usability.md, U2c: a thought hit shows its whole text (up to
   300 characters), its lines kept, the words found marked. */
.zen-found-text {
  white-space: pre-line;
}

.zen-found-text mark {
  background: color-mix(in srgb, var(--ui-accent, #e0b000) 30%, transparent);
  color: inherit;
  border-radius: 2px;
}

.zen-search {
  display: grid;
  gap: 0.5rem;
}

.zen-search-period .ui-date-range {
  margin-top: 0.5rem;
}

/* "Zuletzt geändert": one change a line, an undone one struck through. */
.zen-recent {
  list-style: none;
  margin: 0;
  padding: 0;
}

.zen-recent__line {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--ui-border);
}

.zen-recent__meta {
  margin: 0;
  font-size: var(--ui-text-sm);
  color: var(--ui-text-muted);
}

.zen-recent__text {
  margin: 0.125rem 0 0;
}

.zen-recent__line--undone .zen-recent__text {
  color: var(--ui-text-muted);
}

.zen-recent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

/* plans/002-usability.md, U3: a task row — its box ticks it off (44px,
   and nothing else on the row does), its title opens it, and an open
   one-off task has a "⋯" menu to put it off. */

.zen-task {
  align-items: center;
}

.zen-task__check {
  flex: none;
  margin: 0;
  display: flex;
}

.zen-task .zen-item__tick.zen-task__tick {
  flex: none;
  justify-content: center;
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  margin-inline-start: 0.25rem;
}

.zen-task__nobox {
  flex: none;
  width: 0.5rem;
}

.zen-task__open {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  min-height: 3.25rem;
  padding: 0.5rem 0.5rem 0.5rem 0.25rem;
  font-size: 1.0625rem;
  color: inherit;
  text-decoration: none;
  border-radius: 0.5rem;
}

.zen-task__open:hover .zen-item__name {
  text-decoration: underline;
}

.zen-task__open:focus-visible,
.zen-more__button:focus-visible {
  outline: none;
  box-shadow: var(--ui-ring);
}

.zen-task .zen-item__due,
.zen-task .zen-item__note,
.zen-task .zen-item__waiting {
  padding-inline-start: 0;
}

.zen-more {
  position: relative;
  flex: none;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.zen-more__button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0.5rem;
  list-style: none;
}

.zen-more__button::-webkit-details-marker {
  display: none;
}

.zen-more__menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% - 0.25rem);
  z-index: 20;
  display: grid;
  gap: 0.375rem;
  min-width: 13rem;
  padding: 0.5rem;
  background: var(--ui-bg-card, var(--ui-bg));
  border: 1px solid var(--ui-border);
  border-radius: 0.5rem;
  box-shadow: var(--ui-shadow-md);
}

.zen-postpone__form {
  margin: 0;
}

.zen-postpone__form .ui-btn,
.zen-more__menu .zen-postpone__date summary {
  width: 100%;
}

.zen-postpone__choices {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}

.zen-postpone__date summary {
  cursor: pointer;
  padding-block: 0.375rem;
  min-height: var(--ui-touch, 2.75rem);
  display: flex;
  align-items: center;
}

.zen-postpone__date .zen-row {
  margin-top: 0.375rem;
}

/* Finished: who and when, first; a rule Zen does not know, said once. */
.zen-task__done {
  font-weight: 600;
}

.zen-task__unknown {
  color: var(--ui-text-muted);
}

/* "Neu für dich" and "Erledigt" on the start page. */
.zen-news h2 {
  font-size: 1rem;
  margin-block: 1.25rem 0.5rem;
}

.zen-news__list {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.zen-news__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--ui-border);
}

.zen-news__text {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.zen-news__meta {
  font-size: var(--ui-text-sm);
  color: var(--ui-text-muted);
}

.zen-news__seen,
.zen-news__all {
  margin: 0;
  flex: none;
}

/* The Tasks tab's count, filled in while online. */
.zen-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3125rem;
  margin-inline-start: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--ui-danger, #b42318);
  border-radius: 999px;
}

.zen-tabbar__tab {
  position: relative;
}

.zen-tabbar__tab .zen-badge {
  position: absolute;
  top: 0.125rem;
  inset-inline-start: calc(50% + 0.375rem);
  margin: 0;
}

/* plans/002-usability.md, U4. The dot on the settings icon when /status has
   a problem, filled in while online. */
.zen-header-settings {
  position: relative;
}

.zen-dot {
  position: absolute;
  top: 0.375rem;
  inset-inline-end: 0.375rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--ui-danger, #b42318);
  border-radius: 999px;
  pointer-events: none;
}

/* The settings' matrix: kinds down, channels across. */
.zen-matrix {
  width: 100%;
  border-collapse: collapse;
}

.zen-matrix th,
.zen-matrix td {
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--ui-border);
}

.zen-matrix th[scope="row"] {
  text-align: start;
  font-weight: 400;
}

.zen-matrix td,
.zen-matrix th[scope="col"] {
  text-align: center;
  width: 5rem;
}

.zen-matrix input[type="checkbox"] {
  width: 1.375rem;
  height: 1.375rem;
}

/* A device code: big enough to read off one screen and type into another,
   and its QR code. */
.zen-device-code code {
  font-size: 2rem;
  letter-spacing: 0.1em;
}

.zen-qr-figure {
  margin: 1rem 0;
}

.zen-qr {
  display: block;
  width: 100%;
  max-width: 16rem;
  height: auto;
}

.zen-feed__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* The attendee boxes of a calendar not chosen (plans/002-usability.md, U5):
   hidden, whatever the fieldset's own display says. */
.zen-fieldset[hidden] {
  display: none;
}
