/* THI-330 (Thiago 1 Dec: "all that is missing, build to the same layout, colour specs"). Today's Workspace cards that the v68
   design has no card for, drawn in the v68 Workspace card look: same .card frame, headings, muted text and buttons. Tokens only. */
.kept{order:999;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:12px}
/* THI-362: check-in controls are 44px, and the profile sections stack on a phone. */
html body.flora-page .flora-profile .flora-btn,html body.flora-page .flora-profile .flora-pro-tabs a{min-height:44px;min-width:44px;display:inline-flex;align-items:center}
html body.flora-page .flora-profile .flora-photos{display:flex;flex-wrap:wrap;gap:12px}
@media (max-width:700px){html body.flora-page .flora-profile .bot-stats-grid{display:grid;gap:8px}}
@media(min-width:900px){.kept{grid-template-columns:repeat(2,minmax(0,1fr))}.kept>.kept-wide{grid-column:1/-1}}
.kept-card h2{margin:0 0 8px}
.kept-card dl{display:grid;grid-template-columns:minmax(0,9rem) minmax(0,1fr);gap:6px 12px;margin:0}
.kept-card dt{color:var(--muted);font-size:14px}
.kept-card dd{margin:0;overflow-wrap:anywhere}
.kept-card ul{list-style:none;padding:0;margin:0}.kept-card li{padding:6px 0}
.kept-card .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.kept-card form{display:grid;gap:8px;margin:0}.kept-card form.inline{display:inline}
.kept-card textarea{width:100%;min-height:88px;padding:10px;border:1px solid var(--line);border-radius:9px;font:inherit;color:inherit;background:var(--surface)}
.kept-card label{font-weight:600}
/* Review pop-up: Mila's real forms sit inside the pack's action row and boxes without changing their layout. */
.pr-actions .pr-form{display:contents}
.pr-modal form.pr-edit{display:grid;gap:8px}.pr-modal form.pr-edit[hidden]{display:none}
/* Item 16 (Thiago 1 Dec): Mila's filter pills on Overview: one thin border, no second ring or glow (the page's ::before ring is dropped). */
html body.overview-page .filters button::before{content:none}
html body.overview-page .filters button{box-shadow:none !important}

/* THI-330 item 18: the review pop-up's More menu sits cleanly on top. The pack's own "dialog button" rule (gradient, !important)
   was painting the menu items as dark pills; this restores the pack's intended .pr-more-menu look (same tokens). */
html body dialog .pr-more-menu{z-index:10;background:var(--surface);box-shadow:var(--shadow-pop, 0 10px 24px rgba(20, 33, 61, 0.12))}
html body dialog .pr-more-menu button{background:transparent !important;color:var(--ink) !important;border:0 !important;box-shadow:none !important;border-radius:8px !important;font-weight:var(--type-row, 500);min-height:36px;padding:0 10px;text-align:left;width:100%}
html body dialog .pr-more-menu button:hover,html body dialog .pr-more-menu button:focus-visible{background:var(--blue-100) !important}
/* item 18 (Luna FIX 13b7f485): 44px touch targets for the menu actions on tablet and phone */
@media (max-width:1024px),(pointer:coarse){html body dialog .pr-more-menu button{min-height:44px !important}}
/* THI-330 item 19: Save caption and Cancel sit side by side under the caption box */
.pr-edit-btns{display:flex;flex-wrap:wrap;gap:8px}
@media (max-width:1024px),(pointer:coarse){html body dialog .pr-edit .pr-btn{min-height:44px}}
/* Tubis 66bee661: the pop-up action buttons are 44px touch targets on tablet and phone too */
@media (max-width:1024px),(pointer:coarse){html body dialog .pr-actions .pr-btn{min-height:44px}}
/* THI-330 My Day (Tubis 21fcb107): on phones the mockup cards fill the width (358px at 390); with short real content they must too */
@media (max-width:600px){html body.myday-page .myday-grid .card{align-self:stretch}}
/* Thiago 1 Dec 4:08pm: the short forecast under the temperature on the clock card */
html body .clock-widget .wx-now{flex-wrap:wrap;justify-content:flex-end}
html body .clock-widget .wx-desc{flex-basis:100%;text-align:right;font-size:12px;font-weight:500;color:var(--navy);margin-top:2px}
/* THI-330 Tasks (Thiago 4:42pm, Tubis ba0a60b6): when a task card is narrow (T.U.B.I.S. panel open, tablet), the title column fell to 0px and
   the pills covered it. The pack's own phone rule (pills under the title) now follows the card's width, not only the screen's. */
html body.tasks-page .task-group .task-list { container-type: inline-size; }
@container (max-width: 480px) {   /* 1280 desktop cards are 506px: they keep the mockup row; tablet and panel-open cards (about 370-450px) stack */
  html body.tasks-page .task-row { grid-template-columns: 18px 16px 36px minmax(0, 1fr) !important; }
  html body.tasks-page .task-copy { grid-column: 4; }
  html body.tasks-page .task-due-cluster, html body.tasks-page .task-date, html body.tasks-page .task-overdue-tag, html body.tasks-page .pill,
  html body.tasks-page .task-postpone, html body.tasks-page button.task-postpone { grid-column: 4 !important; justify-self: start !important; }
}
/* THI-330 (Bob, 1 Dec, panel-open capture): between 601 and 700px the pack's phone row (4 columns) puts linked rows' bare pill
   ("Due today" on a Mila or CRM row) in no column, and it slid left out of the card. It sits under the title like the other pills. */
@media (min-width:601px) and (max-width:700px) { html body.tasks-page .task-row > .pill { grid-column: 4 !important; justify-self: start !important; } }
/* THI-360: a reminder row stacks its time and Open on a phone so they cannot cover each other. Tick, Open, snooze and delete are 44px. */
html body.tasks-page article.rem-row > form { display: grid; place-items: center; width: 44px; height: 44px; margin: 0; }
html body.tasks-page article.rem-row button.task-check { width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; }
html body.tasks-page article.rem-row > [data-rem-open],
html body.tasks-page dialog.rem-dialog button { min-width: 44px !important; min-height: 44px !important; }
@media (max-width: 700px) {
  html body.tasks-page article.rem-row { grid-template-columns: 44px 36px minmax(0, 1fr) !important; }
  html body.tasks-page article.rem-row > span[aria-hidden="true"] { display: none !important; }
  html body.tasks-page article.rem-row > form { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
  html body.tasks-page article.rem-row > .task-av { grid-column: 2; grid-row: 1; }
  html body.tasks-page article.rem-row > .task-copy { grid-column: 3; grid-row: 1; min-width: 0; }
  html body.tasks-page article.rem-row > .pill { grid-column: 2 / -1 !important; grid-row: 2; justify-self: start !important; white-space: normal; }
  html body.tasks-page article.rem-row > [data-rem-open] { grid-column: 2 / -1 !important; grid-row: 3; justify-self: start !important; }
}
/* Tubis cf9d94ef: the checklist's "Add item" row looks like the other checklist rows (same row, a plain text box in place of the label) */
html body.tasks-page .task-d-check-row.task-d-add .task-d-add-input { flex: 1; min-width: 0; border: 0; border-bottom: 1px dashed var(--line); background: transparent; font: inherit; color: var(--ink); padding: 2px 0; min-height: 28px; }
html body.tasks-page .task-d-check-row.task-d-add .task-d-add-input:focus { outline: none; border-bottom-color: var(--navy); }
html body.tasks-page .task-d-check-row.task-d-add input[type=checkbox] { opacity: .45; }
/* THI-345 (Iris Mini 2 HOLD 672b5161, Tubis 50c8864c): from 601 to 1149px the pack stacks My Day cards in one column and each card is
   as wide as its content. The frozen pack's demo content makes Nora Calendar 489px and Ask T.U.B.I.S. 544px wide at 768; real content was
   shorter (272 / 450). Both now keep at least the frozen width there. 1280 (two-column grid) and phones (cards stretch) are unchanged. */
@media (min-width:601px) and (max-width:1149px) {
  html body.myday-page .myday-grid .timeline-card, html body.myday-page .myday-grid .ask-card { box-sizing: border-box; }   /* widths as measured on the frozen pack (outer) */
  html body.myday-page .myday-grid .timeline-card { min-width: min(489px, 100%); }
  html body.myday-page .myday-grid .ask-card { min-width: min(544px, 100%); }
}
/* Nora · Today (Thiago 9:38/9:39pm, Tubis b0d4859e / d8b18ad4): the email summary reads in the board's own type, one item per line;
   the Connections "Settings →" link is a one-line navy pill lined up with the card title (orange on hover), as in the frozen pack. */
html body.nora-page .nora-sum-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font: inherit; font-weight: 400; color: var(--ink); line-height: 1.5; }
html body.nora-page .nora-sum-list li { padding-left: 14px; position: relative; }
html body.nora-page .nora-sum-list li::before { content: ""; position: absolute; left: 0; top: .65em; width: 5px; height: 5px; border-radius: 50%; background: var(--navy); }
html body.nora-page #bot-connections .card-head { align-items: center; }
html body.nora-page #bot-connections .card-head .see-all.bot-settings { white-space: nowrap; display: inline-flex; align-items: center; width: auto; height: auto; min-height: 32px; padding: 6px 14px; border-radius: 999px; background: var(--navy); color: var(--surface); font-weight: 500; text-decoration: none; }
html body.nora-page #bot-connections .card-head .see-all.bot-settings:hover, html body.nora-page #bot-connections .card-head .see-all.bot-settings:focus-visible { background: var(--orange); color: var(--surface); }
html body.nora-page #bot-waiting .waiting-row { width: 100%; text-align: left; cursor: pointer; }
html body.nora-page dialog.pr-modal textarea { width: 100%; box-sizing: border-box; min-height: 160px; font: inherit; font-weight: 400; line-height: 1.5; color: var(--ink); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); resize: vertical; }
html body.nora-page #bot-waiting button.waiting-row[data-review], html body.nora-page #bot-waiting-you button.waiting-row[data-review] { width: 100%; text-align: left; background: transparent !important; background-image: none !important; color: inherit !important; border: 0 !important; box-shadow: none !important; border-radius: 12px !important; font: inherit; cursor: pointer; }
html body.nora-page #bot-waiting button.waiting-row[data-review]:hover, html body.nora-page #bot-waiting-you button.waiting-row[data-review]:hover { background: var(--gray-1) !important; }   /* the pack's button[data-review] pill rule is for review triggers; these are list rows */
/* Thiago 9:57pm (Tubis 64954b5f): Urgent is a callout, a solid orange pill with white text, on the Waiting approval row and the pop-up; Draft stays quiet. */
html body.nora-page .pill.is-urgent, html body.nora-page .status-pill.is-urgent { background: var(--orange) !important; color: var(--surface) !important; border-color: var(--orange) !important; font-weight: 600; }
/* THI-356 (Tubis 89ed0246): a program's energy shows its full range ("TEE −30% to −20%"), never cut off with an ellipsis. */
html body.flora-page .flora-program-macros li strong { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }
html body.flora-page .flora-program-card-head { flex-wrap: wrap; gap: 8px; }
html body.flora-page .flora-program-card-title h3 { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
html body.flora-page .flora-program-card-title { flex: 1 1 auto !important; min-width: min-content !important; overflow: visible !important; }
/* THI-355 (Iris HOLD eadc4c1a): at phone width the chart's intrinsic size and the status pill's auto column
   ran past the page edge. Tiles stay two by two. The pill moves under the name so the whole label is on the page. */
@media (max-width: 700px) {
  html body.money-page, html body.sign-page { overflow-x: clip; }
  html body.money-page main, html body.sign-page main,
  html body.money-page .card, html body.sign-page .card,
  html body.money-page .bot-glance, html body.sign-page .bot-glance,
  html body.money-page .bot-glance-row, html body.sign-page .bot-glance-row,
  html body.money-page .mx-chart, html body.sign-page .bot-bar {
    min-width: 0; max-width: 100%; box-sizing: border-box;
  }
  html body.money-page .board-chart { display: block; width: 100%; min-width: 0; max-width: 100%; height: auto; }
  html body.money-page .bot-stat, html body.sign-page .bot-stat,
  html body.money-page .bot-stat strong, html body.sign-page .bot-stat strong { overflow-wrap: anywhere; }
  html body.money-page .board-row, html body.sign-page .board-row {
    grid-template-columns: 36px minmax(0, 1fr) !important; width: 100%; max-width: 100%; box-sizing: border-box;
  }
  html body.money-page .board-row .status-pill, html body.sign-page .board-row .status-pill {
    grid-column: 2; justify-self: start; max-width: 100%; margin-top: 6px; height: auto; min-height: 22px; white-space: normal;
  }
}
@media (max-width: 700px), (pointer: coarse) {
  html body.sign-page .board-drawer-close { width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; }
  html body.sign-page .sign-row-actions a, html body.sign-page .sign-row-actions button,
  html body.sign-page .board-drawer-actions a, html body.sign-page .board-drawer-actions button {
    min-height: 44px; display: inline-flex; align-items: center;
  }
  html body.sign-page .board-drawer-close:focus-visible, html body.sign-page .board-btn:focus-visible,
  html body.sign-page .board-btn-ghost:focus-visible, html body.sign-page .sign-row-actions a:focus-visible,
  html body.sign-page .sign-row-actions button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
}

/* THI-354 (Tubis 1f1be0ec): on a phone the bot tab row (Mila: Today, Drafts, Calendar, Dashboard, How to) never cuts a tab off silently.
   It stays one row that scrolls sideways (swipe or keyboard: a focused tab scrolls into view by itself), with a soft fade on the right edge
   while there is more to see. Wider screens are unchanged. */
@media (max-width: 600px) {
  html body .bot-tabs { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important; overflow-y: hidden; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; max-width: 100%; padding-right: 28px; scroll-padding-inline: 12px;
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent); mask-image: linear-gradient(to right, black calc(100% - 28px), transparent); }
  html body .bot-tabs::-webkit-scrollbar { display: none; }
  html body .bot-tabs > a, html body .bot-tabs > button { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }
}
/* THI-364: caption editing on a phone. The pop-up sits in the visible area above the keyboard (--pr-vv-top / --pr-vv-h set by
   v68-frame.js from the visual viewport): a small post preview pinned at the top, the caption filling the middle, Save and Cancel
   just above the keys. The page behind doesn't scroll. Wider screens are unchanged. */
html.pr-lock, html.pr-lock body { overflow: hidden !important; overscroll-behavior: none; }
@media (max-width: 600px) {
  html body dialog.pr-modal.pr-editing { position: fixed !important; inset: auto 0 auto 0 !important; top: var(--pr-vv-top, 0) !important; height: var(--pr-vv-h, 100dvh) !important; max-height: var(--pr-vv-h, 100dvh) !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; border-radius: 0 !important; display: flex !important; flex-direction: column; gap: 8px; overflow: hidden !important; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)) !important; box-sizing: border-box; }
  html body dialog.pr-modal.pr-editing .pr-top { flex: 0 0 auto; margin: 0; }
  html body dialog.pr-modal.pr-editing .pr-top h2 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html body dialog.pr-modal.pr-editing .pr-preview { flex: 0 0 auto; display: grid; grid-template-columns: 56px 1fr; grid-template-areas: "photo plat" "photo when"; gap: 2px 10px; align-items: center; padding: 8px; margin: 0; }
  html body dialog.pr-modal.pr-editing .pr-preview .pr-photo { grid-area: photo; width: 56px; height: 56px; object-fit: cover; border-radius: 10px; margin: 0; }
  html body dialog.pr-modal.pr-editing .pr-preview .pr-platform { grid-area: plat; margin: 0; }
  html body dialog.pr-modal.pr-editing .pr-preview .pr-when { grid-area: when; margin: 0; font-size: 13px; }
  html body dialog.pr-modal.pr-editing .pr-preview .pr-caption, html body dialog.pr-modal.pr-editing .pr-preview .pr-account,
  html body dialog.pr-modal.pr-editing .pr-h3, html body dialog.pr-modal.pr-editing .pr-actions { display: none !important; }
  html body dialog.pr-modal.pr-editing .pr-edit[data-pr-box="edit"] { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; margin: 0; }
  html body dialog.pr-modal.pr-editing .pr-edit[data-pr-box="edit"] textarea { flex: 1 1 auto; min-height: 72px; height: auto; resize: none; font-size: 16px; }
  html body dialog.pr-modal.pr-editing .pr-edit-btns { flex: 0 0 auto; display: flex; gap: 8px; }
  html body dialog.pr-modal.pr-editing .pr-edit-btns .pr-btn { flex: 1 1 0; min-height: 44px; }
}
/* Mila calendar (Tubis 5941437a): an orange "now" line across today's column, with a dot at the left edge. */
html body.mila-page .cal-day-col { position: relative; }
html body.mila-page .cal-now.mila-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--orange); z-index: 3; pointer-events: none; }
html body.mila-page .cal-now.mila-now .cal-now-dot { position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
/* Mila Today at tablet width (Tubis 5941437a, "768 Waiting card"): the side column is narrow, so in Waiting on you the title gets the room.
   Every row there is waiting, and the line under the title already says so, so the extra pill is hidden. Phones and desktop are unchanged. */
@media (min-width: 601px) and (max-width: 1149px) {
  html body.mila-page #bot-waiting-you .bot-work-row .status-pill { display: none; }
  html body.mila-page #bot-waiting-you .bot-work-copy { flex: 1 1 auto; min-width: 0; }
  html body.mila-page #bot-waiting-you .bot-work-copy strong { overflow-wrap: break-word; word-break: normal; hyphens: auto; }
}

/* Nora message board (Thiago 2 Dec): one conversation per person. */
html body.nora-page .msg-threads { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
html body.nora-page .msg-thread { border: 1px solid var(--gray-3); border-radius: 14px; padding: 10px 14px; background: var(--surface); }
html body.nora-page .msg-thread > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 44px; }
html body.nora-page .msg-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
html body.nora-page .msg-item { border-top: 1px solid var(--gray-2); padding-top: 10px; }
html body.nora-page .msg-them { margin: 0 0 4px; overflow-wrap: anywhere; }
html body.nora-page .msg-nora { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; overflow-wrap: anywhere; }
html body.nora-page .msg-who { font-weight: 600; }

/* Mila: a refused action (weekly limit, past time, ...) is a clear warning, not faint text */
#mila-flash.mila-flash-warn { border: 2px solid var(--bad, var(--orange)); background: var(--surface-1, var(--surface)); color: inherit; font-weight: 600; padding: 12px 14px; border-radius: 12px; margin: 0 0 16px; }

/* Flora profile tabs use the full card width and their own list rows. */
html body.is-flora-profile .flora-profile { box-sizing: border-box; min-width: 0; }
html body.is-flora-profile .flora-pro-panel,
html body.is-flora-profile .flora-pro-panel > .fp-card {
  grid-column: 1 / -1;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
.flora-pro-panel .fp-tab-list { list-style: none; margin: 0; padding: 0; }
.flora-pro-panel .fp-scan-row,
.flora-pro-panel .fp-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--tab-rest-border);
}
.flora-pro-panel .fp-tab-list > :last-child { border-bottom: 0; }
.flora-pro-panel .fp-scan-row { grid-template-columns: max-content minmax(0, 1fr); gap: 12px 24px; }
.flora-pro-panel .fp-scan-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.flora-pro-panel .fp-scan-metrics > div { padding: 8px; border-radius: 8px; background: var(--ground); }
.flora-pro-panel .fp-scan-metrics dt { font-size: 12px; }
.flora-pro-panel .fp-scan-metrics dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.flora-pro-panel .fp-file-row > div { min-width: 0; overflow-wrap: anywhere; }
html body.is-flora-profile .fp-file-row > a {
  width: auto;
  min-height: 44px;
  justify-self: end;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .flora-pro-panel .fp-scan-row { grid-template-columns: minmax(0, 1fr); }
}
html body.flora-page #flora-settings-form select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--tab-rest-border);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  font: inherit;
}
html body.flora-page .bot-settings-drawer .bot-set-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  line-height: 1;
  text-decoration: none;
}

/* Overview uses the same four surface colours and Ask card as My Day. */
html body.overview-page .snapshot .metric[data-tone="attention"] { background: var(--peach-100); }
html body.overview-page .snapshot .metric[data-tone="sales"] { background: var(--blue-100); }
html body.overview-page .snapshot .metric[data-tone="money"] { background: var(--gold-100); }
html body.overview-page .snapshot .metric[data-tone="usage"] { background: var(--cream); }
html body.overview-page .snapshot .metric .status-pill { display: inline-flex; margin-inline-start: 8px; vertical-align: middle; }
html body.overview-page .myday-grid > * { min-width: 0; }
html body.overview-page .ask-card { background: var(--blue-100); }
html body.overview-page .overview-published summary { cursor: pointer; min-height: 44px; align-content: center; }
@media (min-width: 1100px) {
  html body.overview-page .myday-side.is-sticky { position: sticky; top: 16px; align-self: start; }
}

/* THI-375 SMS card on Nora's Messages board. */
html body.nora-page #nora-sms { margin-bottom: 16px; }
html body.nora-page #nora-sms .card-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; }
html body.nora-page .sms-new { display: grid; gap: 6px; margin: 8px 0 14px; max-width: 560px; }
html body.nora-page .sms-new input[type="text"], html body.nora-page .sms-new input:not([type]), html body.nora-page .sms-new textarea { width: 100%; min-height: 44px; border: 1px solid var(--gray-3); border-radius: 10px; padding: 8px 10px; font: inherit; background: var(--surface); }
html body.nora-page .sms-consent { display: flex; gap: 8px; align-items: center; min-height: 44px; }
html body.nora-page .sms-new button { justify-self: start; }

/* THI-360: the Tasks / Reminders switch, and a reminder dialog that stays closed until Open. */
html body.tasks-page .task-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
html body.tasks-page .task-switch a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px; background: var(--surface); color: var(--navy); text-decoration: none;
  border: 1px solid var(--line-warm); font-weight: 600;
}
html body.tasks-page .task-switch a:focus-visible,
html body.tasks-page .task-check:focus-visible,
html body.tasks-page dialog.rem-dialog button:focus-visible {
  outline: 3px solid var(--orange); outline-offset: 2px;
}
html body.tasks-page dialog.rem-dialog:not([open]) { display: none !important; }
html body.tasks-page dialog.rem-dialog[open] {
  display: flex; flex-direction: column; gap: 12px; width: min(400px, 100vw); max-height: 100dvh;
  margin: 0 0 0 auto; padding: 16px; border: 0; border-left: 1px solid var(--line-warm);
  background: var(--surface); color: var(--ink);
}
html body.tasks-page dialog.rem-dialog::backdrop { background: rgba(15, 26, 51, 0.55); }

/* THI-398 (Thiago's test run): Nora's empty states are centred and use the card's own type, not a boxed note. */
html body.nora-page .nora-empty, html body.nora-page #cal-view[data-off] .nora-empty { display: grid; justify-items: center; gap: 8px; text-align: center; margin: 16px auto; padding: 24px 16px; max-width: 520px; font: inherit; font-size: 0.95rem; color: inherit; border: 0; background: none; box-shadow: none; }
html body.nora-page .nora-empty p { margin: 0; }
html body.nora-cal-page .nora-cal-connect { margin: 4px 0 12px; font-size: 0.95rem; }

/* THI-398 (Thiago's test run): inside the board frame, 100dvh is the frame's own (content-sized) height, so the frozen
   max-height: calc(100dvh - 200px) kept shrinking the Nora calendar and squashed the hour rows. Inside the frame the board
   is not capped; the 24-hour area scrolls in a fixed-height pane instead, rows at their full size. */
html.embedded body.nora-cal-page .cal-board { max-height: none !important; }
html.embedded body.nora-cal-page .cal-view { overflow: visible !important; }
html.embedded body.nora-cal-page .cal-timed { flex: none; overflow: visible !important; }
html.embedded body.nora-cal-page .cal-timed-scroll { flex: none; height: 560px; max-height: 560px;  /* compact, like Mila's calendar (Thiago 2 Dec) */ }

/* THI-398 (Thiago 2 Dec): the usage card left the Overview, so the three glance cards share the row evenly. */
@media (min-width: 701px) { html body:not(.myday-page) .glance-row:has(> dl > .metric:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
