  /* ---- Today ---- */
  body.layout-editing #todayPanel .tp-label > .fold-btn { display: none; }
  .tp-inbox-list { margin: 6px 0 8px; padding-left: 18px; }
  .tp-inbox-list li { margin: 2px 0; }
  /* the "In <group>" card: a row per module's line, its words over its name and how long ago, a › to its page. */
  .tp-news-row { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; min-height: 44px; padding: 0; text-align: left; background: none; border: 0; color: var(--ink); font: inherit; }
  button.tp-news-row { cursor: pointer; }
  button.tp-news-row:hover .tp-news-text { color: var(--accent-text); }
  .tp-news-text { grid-column: 1; overflow-wrap: anywhere; }
  .tp-news-meta { grid-column: 1; font-size: 12px; color: var(--muted); }
  .tp-news-go { grid-column: 2; grid-row: 1 / span 2; font-size: 20px; line-height: 1; color: var(--muted); }
  /* a line for each list of yours with something open, under Today's Tasks. */
  .tp-mylists { list-style: none; margin: 6px 0 0; padding: 0; }
  .tp-mylist { display: block; width: 100%; min-height: 44px; padding: 8px 0; text-align: left; background: none; border: none; font-family: var(--sans); font-size: 13px; color: var(--ink); cursor: pointer; }
  .tp-mylist:hover { color: var(--accent-text); }
  .td-add { margin: 8px 0 4px; }
  #todayInboxOpen { min-height: 44px; padding: 8px 14px; margin-top: 4px; border-radius: var(--r); font-size: 13px; font-family: var(--sans); }
  body.inbox-open #todayInboxOpen { display: none; } /* not on the page it opens */
  #todayChanged { white-space: pre-wrap; font-size: 13px; line-height: 1.5; color: var(--ink-soft); margin-top: 10px; }
  #todayChanged:empty { display: none; }
  #todayChanged .chip { display: block; margin-top: 6px; border-radius: var(--r-pill); padding: 6px 14px; font-size: 13px; min-height: 44px; font-family: var(--sans); cursor: pointer; }
  #todayPanel .nav-block { margin-top: 28px; }
  #todayPanel .nav-block .nav-label { padding-left: 0; padding-top: 0; }
  #todayPanel .wk-day.wk-today { font-weight: 600; color: var(--ink); }
  /* ---- the Today panel (the right column) ---- */
  #todayPanel { display: none; width: var(--side-width); flex: none; border-left: var(--bw) var(--bs) var(--line); background: var(--rail); padding: 26px 18px; overflow-y: auto; box-shadow: var(--titlebar-rail); }
  body.today-on #todayPanel { display: block; }
  #todayPanel .tp-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
  #todayPanel .tp-title { font-family: var(--display); font-size: 22px; font-weight: 500; margin: 0; }
  #closeTodayBtn { display: none; }
  /* section titles in the Look's accent text and more room between sections than within one; sub-headings quieter
     (normal weight, muted); no rule above a section, its title sets it apart. */
  #todayPanel .tp-section, #todayPanel .tp-slot { margin-top: 28px; } /* the greeting's slots (the Inbox, an invitation, a check-in) keep the sections' gap */
  #todayPanel .tp-label { font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 8px; }
  #todayPanel .tp-sub { font-size: 12px; color: var(--muted); font-weight: 400; margin: 10px 0 4px; }
  /* the date beside Today stays on its line, even on a narrow phone. */
  #todayPanel .tp-title { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  /* Today's greeting card, first on Today. Modern tints it with the accent; Editorial has no card behind it; square
     Looks keep square corners (their own radii). */
  #todayPanel .tp-greet { margin: 0 0 4px; padding: 16px 16px 14px; border-radius: var(--r-lg); background: var(--card); border: var(--bw) var(--bs) var(--line); }
  #todayPanel .tp-hello { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; margin: 0; color: var(--ink); text-wrap: balance; text-shadow: var(--heading-shadow); }
  #todayPanel .tp-greet-date { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
  #todayPanel .tp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
  #todayPanel .tp-greet-signin { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink); }
  #todayPanel .tp-greet-signin[hidden] { display: none; }
  #todayPanel .tp-chips[hidden] { display: none; }
  /* the first-day guide in the greeting: a line, then the two steps, the one to do now in ink, the others muted */
  #todayPanel .tp-welcome { margin: 12px 0 0; }
  #todayPanel .tp-welcome[hidden] { display: none; }
  #todayPanel .tp-welcome-line { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
  #todayPanel .tp-welcome-steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
  #todayPanel .tp-step { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; color: var(--muted); }
  #todayPanel .tp-step-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-pill); border: var(--bw) var(--bs) var(--line); font-size: 13px; font-weight: 600; }
  #todayPanel .tp-step.is-now, #todayPanel .tp-step.is-wait { color: var(--ink); }
  #todayPanel .tp-step.is-now .tp-step-n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  #todayPanel .tp-step-title { display: block; font-weight: 600; font-size: 14px; line-height: 1.35; }
  #todayPanel .tp-step-text { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; }
  #todayPanel .tp-step .btn-primary { margin-top: 8px; }
  #todayPanel .tp-chips li { display: block; border: var(--bw) var(--bs) var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 500; line-height: 1.4; }
  #todayPanel .tp-chips button { display: block; padding: 5px 12px; border: 0; border-radius: inherit; background: none; color: inherit; font: inherit; }
  #todayPanel .tp-chips button:hover { background: var(--hover-wash); }
  :root[data-look="modern"] #todayPanel .tp-greet { border-color: transparent; background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 17%, var(--card)) 0%, color-mix(in srgb, var(--accent) 5%, var(--card)) 60%, var(--card) 100%); }
  :root[data-look="modern"] #todayPanel .tp-chips li { border-color: transparent; box-shadow: 0 1px 3px var(--shadow-color); }
  :root:not([data-look]) #todayPanel .tp-greet, :root[data-look="editorial"] #todayPanel .tp-greet { background: none; border: 0; padding: 0 0 6px; }
  /* the invitation and check-in cards under the greeting, a card in every Look and place (the right column too); Modern
     gives an invitation and the check-ins' offer its accent. The invitations' slot only holds their cards. */
  #todayPanel .tp-card, body.today-open #todayPanel .tp-card { margin-top: 12px; padding: 14px 16px; background: var(--card); border: var(--bw) var(--bs) var(--line); border-radius: var(--r-md); }
  #todayPanel #todaySafe { margin-bottom: 12px; } /* safe mode's card, above the greeting */
  #todayPanel #todayInvite, body.today-open #todayPanel #todayInvite { margin: 0; padding: 0; background: none; border: 0; max-width: none; }
  #todayPanel .tp-card-title { margin: 0; font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--ink); }
  #todayPanel .tp-card-text { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
  #todayPanel .tp-card-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  #todayPanel #todayInvite > .tp-note { margin: 10px 0 0; }
  :root[data-look="modern"] #todayPanel .tp-card.tp-offer { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
  #todayPanel ul { list-style: none; margin: 0; padding: 0; }
  #todayPanel li { font-size: 13px; line-height: 1.45; color: var(--ink); padding: 6px 0; border-bottom: var(--bw) var(--bs) var(--line); display: flex; gap: 8px; align-items: flex-start; }
  #todayPanel li.done span { text-decoration: line-through; color: var(--muted); }
  #todayPanel input[type=checkbox] { margin-top: 3px; accent-color: var(--accent); }
  #todayPanel .tp-empty, #todayPanel .tp-note { font-size: 12.5px; color: var(--muted); font-style: italic; }
  /* tasks due later, folded. */
  #todayPanel .tp-later summary { font-size: 12px; color: var(--muted); cursor: pointer; margin: 6px 0 2px; min-height: 24px; }
  #todayPanel .tp-due { font-size: 11.5px; color: var(--muted); margin-left: 6px; white-space: nowrap; }
  #todayPanel .tp-capture-note { font-size: 11.5px; color: var(--muted); margin: -2px 0 4px; }
  #todayPanel ul.tp-ideas li { color: var(--ink-soft); padding-left: 2px; }
  #todayPanel ul.tp-ideas li::before { content: "\2013"; color: var(--muted); margin-right: 6px; }
  #todayPanel li.deadline { flex-direction: column; gap: 2px; }
  #todayPanel .dl-personal { align-self: flex-start; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); border: var(--bw) var(--bs) var(--accent); border-radius: var(--r-xs); padding: 0 5px; }
  #thisWeekBox h3.tp-label { margin: 0 0 6px; }
  #todayPanel .wk-day { font-size: 12.5px; font-weight: 400; color: var(--muted); margin: 10px 0 4px; }
  #todayPanel ul.wk-items li { gap: 8px; }
  #todayPanel .wk-time { flex: none; min-width: 64px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
  #todayPanel li.wk-deadline .wk-time { color: var(--accent-text); font-weight: 600; }
  #todayPanel .dl-when { font-size: 11.5px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
  #todayPanel .dl-when.upcoming { color: var(--muted); }
  #todayPanel .dl-when.soon { color: var(--accent-text); font-weight: 600; }
  #todayPanel .dl-when.tomorrow, #todayPanel .dl-when.today, #todayPanel .dl-when.overdue { color: var(--on-danger); background: var(--danger); border-radius: var(--r-xs); padding: 1px 6px; align-self: flex-start; font-weight: 600; }
  #todayPanel li label { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: inherit; font-size: inherit; cursor: pointer; }
  /* the right column on wide screens. */
  @media (min-width: 1101px) { #todayPanel { position: relative; } }
  @media (max-width: 1100px) {
    body.today-on #todayPanel { display: block; position: fixed; top: 0; right: 0; bottom: 0; width: 340px; max-width: 92vw; z-index: 21; box-shadow: var(--titlebar-rail), var(--shadow-panel-left); transform: translateX(105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; padding-top: calc(20px + env(safe-area-inset-top)); }
  }
  @media (max-width: 820px) {
    #todayPanel li { padding: 10px 0; }
    #todayPanel { display: block; padding: 18px 16px 24px; background: var(--paper); }
    body:not(.today-on) #todayPageEmpty { display: block; }
    #todayPanel .tp-section { margin-top: 12px; background: var(--card); border: var(--bw) var(--bs) var(--line); border-radius: var(--r-md); padding: 14px 16px; }
    #todayPanel li { font-size: 15px; }
    #todayPanel .tp-hello { font-size: 27px; } /* the greeting card, the mock-up's size on a phone */
    .tp-slot { margin-top: 12px; background: var(--card); border: var(--bw) var(--bs) var(--line); border-radius: var(--r-md); padding: 14px 16px; }
    #todayPanel .tp-label > .fold-btn { height: 44px; margin-top: -14px; margin-bottom: -14px; } /* a finger's size, the title's line as it was */
  }
  @media (min-width: 821px) {
    body.today-open #todayPanel, body.today-on.today-open #todayPanel { display: grid; grid-template-columns: repeat(auto-fit, minmax(max(300px, calc((100% - 54px) / 4)), 1fr)); justify-content: center; align-content: start; align-items: start; column-gap: 18px; position: fixed; top: var(--title-h); bottom: 0; left: var(--slim-w, 76px); right: 0; width: auto; max-width: none; z-index: 21; visibility: visible; transform: none; transition: none; box-shadow: none; border: 0; overflow-y: auto; padding: 26px max(40px, calc((100% - var(--slim-w, 76px) - var(--page-max)) / 2)) 24px; background: var(--paper); }
    body.today-open:not(.today-on) #todayPageEmpty { display: block; }
    body.today-open #todayPanel .tp-section, body.today-open .tp-slot { margin-top: 12px; background: var(--card); border: var(--bw) var(--bs) var(--line); border-radius: var(--r-md); padding: 14px 16px; }
    body.today-open #todayPanel > * { grid-column: 1 / -1; min-width: 0; }
    body.today-open #todayPanel > .tp-section { grid-column: auto; justify-self: center; width: 100%; max-width: 440px; } /* up to four columns, a card at most 440px */
    /* no wider than any page (--page-max): the padding takes the rest, centered, with Chat beside it too */
    body.chat-beside.today-open #todayPanel, body.chat-beside.today-on.today-open #todayPanel { padding-left: max(40px, calc((100% - var(--slim-w, 76px) - var(--side-width) - var(--page-max)) / 2)); padding-right: max(40px, calc((100% - var(--slim-w, 76px) - var(--side-width) - var(--page-max)) / 2)); }
    body.today-open.layout-editing #todayPanel { grid-template-columns: minmax(0, 720px); }
    /* the cards stack in their columns with no row gaps (rows of 1px, each card spanning its own height, set by
       stackToday); a card goes under the column that frees first. */
    body.today-open:not(.layout-editing) #todayPanel.tp-stacked { grid-auto-rows: 1px; row-gap: 0; }
  }
