/* ==========================================================================
   Labour Life practice system: home.css. Owner: home (M6).
   The home screen (SPEC 7.5.1) and Admin, Recurring tasks (SPEC 7.5.9).
   Prefixes hm- and rec-.
     .hm-hero (--morning --afternoon --evening --night __sky __in __text __day __hi __slogan __dot)
                                          the band at the top; the red flow behind the page is shell.css .pgflow (16 Nov 2026)
     .hm-wx (__in __icon __now __temp __cond __meta __place __pin __here),
     .hm-wi (__sun __sunb __ray __moon __cloud __drops __flakes __bolt __fog)   the weather on the band (27 Oct 2026)
     .hm-body                             the column of Home, a container (hm) for the layouts below
     Since 16 Nov 2026 laid out like Jose's mock-up (decision 500):
     .hm-tiles, .hm-tile (--key .is-late .is-new __i __b __l __n __go __dot)   the four tiles
     .hm-card (__head), .hm-all, .hm-none a card of Home
     .hm-tasks (a container: hmtasks, __head __t __lead __links), .hm-menlink (.is-new __n)
                                          My tasks, and the Mentions link in its head
     .hm-secs, .hm-sec (--key .is-late __head __t __hint __none)   Today, Upcoming and Overdue one under the other
     .hm-rows, .hm-more-rows, .hm-cut     the rows of a group, "Show all N"
     .hm-item (.has-tick .is-cc), .hm-tick (__box), .hm-tick-gap   one row, and the tick box of a step that can be ticked here
     .hm-row (__main __top __title __sub __co __cname __wname __go), .hm-cc, .hm-prio,
     .hm-chip (--today --upcoming --overdue --none)   one task and its chip
     .hm-trio (--two)                     Recent documents, Recent emails and the calendar in one row
     .hm-cal (__head __m __nav __wd __grid __d), .hm-next   the calendar card and its "Next" line
     .hm-recent, .hm-rec (__a __b __t __s __i __dot), .hm-ext (--kind)   Recent documents and emails
     .hm-opened (__h __none), .hm-chips (__more), .hm-ochip (__n)   Recently opened
     .hm-mens-box, .hm-mens (__top), .hm-men (__b __top __who __new __dot __when __text __task), .hm-more
                                          the Mentions dialog
     .rec-filter, .rec-hint               the list: the company filter, the line under the table
     .rec-open, .rec-two (__s), .rec-status (__b __p)          cells of the list
     .rec-form (__note), .rec-fixed, .rec-segf, .rec-rule, .rec-on, .rec-num,
     .rec-lead (__u), .rec-preview        the form
   Phone first: the base styles are the phone. Tokens only, no colour of its
   own. The layouts of Home follow the width of Home itself (container
   queries), so the menu on a computer can take its room.
   ========================================================================== */

/* ---------- the band at the top ----------
   Jose's band of 25 and 27 Oct 2026 runs from the top bar to both edges,
   with the day, the greeting, the slogan and the weather of the practice's
   town. Since 16 Nov 2026 it looks like his mock-up of Home (decision 500,
   Franro: "where is that red flow he has in his mockups?"): open to the
   page, a red line before the greeting, and the words in the ink of the
   page. The red flow is not the band's own: it lies behind the whole of
   Home, from the bottom left corner of the window to the top right one,
   and shows wherever nothing stands (decision 503, shell.css .pgflow). The weather comes from the server (GET /home): the browser
   asks nobody. */

.hm-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center;
  /* Full bleed: the page's own padding (pages.css .page) is taken back, so the band touches the top bar and both edges. */
  margin: calc(var(--s5) * -1) calc(var(--gutter) * -1) 0;
  min-height: 176px; padding: var(--s6) var(--gutter) var(--s6);
  border-radius: 0;
  /* Open to the page: the red flow behind the whole of Home shows through (shell.css .pgflow, decision 503). */
  background: transparent; color: var(--ink);
}
.hm-hero__in {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s4) var(--s6); width: 100%; min-width: 0;
}
.hm-hero__in > .hm-hero__text { flex: 1 1 320px; }
/* The red line before the day and the greeting (the mock-up). */
.hm-hero__text { position: relative; min-width: 0; padding-left: var(--s4); }
.hm-hero__text::before {
  content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 4px;
  border-radius: var(--r-pill); background: var(--red);
}
.hm-hero__day { margin: 0 0 var(--s1); color: var(--ink-soft); letter-spacing: .14em; }
.hm-hero__hi { margin: 0; color: var(--ink); font-size: var(--fs-h1); line-height: var(--lh-tight); overflow-wrap: anywhere; }
.hm-hero__slogan {
  margin: var(--s2) 0 0; color: var(--red-ink);
  font: 600 var(--fs-sm)/1.4 var(--font-body); letter-spacing: .24em; text-transform: uppercase;
}
.hm-hero__dot { display: inline-block; width: 5px; height: 5px; margin: 0 .1em; border-radius: var(--r-pill); background: currentColor; vertical-align: middle; }

/* The weather block on the right: the drawn icon, "16°C" large, the word,
   then the town and "Min 9° · Max 21°" beside a thin line. A soft card of
   the page's surface keeps it clear of the flow behind it. */
.hm-wx {
  position: relative; flex: 0 1 auto; min-width: 0;
  padding: var(--s3) var(--s4); border-radius: var(--r-lg);
  background: var(--hero-glass); border: 1px solid var(--line);
  color: var(--ink); box-shadow: var(--shadow-soft);
}
.hm-wx[hidden] { display: none; }
.hm-wx__in { display: flex; align-items: center; gap: var(--s3) var(--s4); min-width: 0; }
.hm-wx__icon { flex: none; display: grid; place-items: center; width: 56px; height: 56px; }
.hm-wi { width: 100%; height: 100%; overflow: visible; }
.hm-wi__sun { fill: var(--wi-sun); }
.hm-wi__ray { stroke: var(--wi-sun); stroke-width: 3; stroke-linecap: round; }
.hm-wi__moon { fill: var(--wi-moon); }
.hm-wi__cloud { fill: var(--wi-cloud); }
.hm-wi__cloud.is-dark { fill: var(--wi-cloud-dark); }
.hm-wi__drops line { stroke: var(--wi-drop); stroke-width: 3; stroke-linecap: round; }
.hm-wi__flakes circle { fill: var(--wi-cloud-dark); }
.hm-wi__bolt { fill: var(--wi-bolt); }
.hm-wi__fog line { stroke: var(--wi-fog); stroke-width: 4; stroke-linecap: round; }
.hm-wx__icon--sun .hm-wi__sunb { transform-box: fill-box; transform-origin: center; animation: hmSpin 60s linear infinite; }
@keyframes hmSpin { to { transform: rotate(360deg); } }
.hm-wx__now { display: grid; gap: 2px; min-width: 0; }
.hm-wx__temp { font: 700 clamp(2rem, 1.6rem + 1.4vw, 2.75rem)/1 var(--font-display); letter-spacing: -.01em; }
.hm-wx__cond { font-weight: 600; font-size: var(--fs-body); overflow-wrap: anywhere; }
.hm-wx__meta {
  display: grid; gap: var(--s1); min-width: 0;
  padding-left: var(--s4); border-left: 1px solid var(--line);
  font-size: var(--fs-sm); color: var(--ink-soft);
}
.hm-wx__place { display: inline-flex; align-items: center; gap: var(--s1); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.hm-wx__pin { flex: none; width: 14px; height: 14px; fill: var(--red-ink); }
/* "Use my location" under the weather (19 Nov 2026): a small link, while Home may offer it. */
.hm-wx__here { display: inline-flex; align-items: center; min-height: 28px; margin-top: var(--s1); font-size: var(--fs-sm); font-weight: 600; }
@media (pointer: coarse) { .hm-wx__here { min-height: var(--tap); } }

@media (max-width: 719px) {
  .hm-hero { min-height: 0; padding: var(--s5) var(--gutter) var(--s5); }
  .hm-hero__slogan { font-size: var(--fs-label); letter-spacing: .16em; }
  /* The weather goes under the greeting, the whole width, smaller. */
  .hm-hero__in { gap: var(--s3); }
  .hm-wx { flex: 1 1 100%; padding: var(--s2) var(--s3); }
  .hm-wx__in { flex-wrap: wrap; gap: var(--s2) var(--s3); }
  .hm-wx__icon { width: 44px; height: 44px; }
  .hm-wx__temp { font-size: 2rem; }
  .hm-wx__meta { margin-left: auto; padding-left: var(--s3); }
}
@media (min-width: 720px) {
  .hm-hero__hi { font-size: var(--fs-stat, 2.75rem); }
}
@media (min-width: 960px) {
  .hm-hero { min-height: 200px; }
}

/* ---------- the column of Home ----------
   Jose's mock-up of 16 Nov 2026 (decision 500): the tiles, My tasks, one
   row of three cards and the slim bar Recently opened, one under the
   other. The layouts follow the width of Home itself (container hm). */

.hm-body {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); min-width: 0;
  container-type: inline-size; container-name: hm;
}
.hm-body > * { min-width: 0; }
.hm-body > .hm-tiles { margin-top: var(--s1); }

/* ---------- the tiles: Today, Upcoming, Overdue, Unread emails (or Mentions) ----------
   An icon in a soft tinted square, the word, the number large and a chevron.
   Two by two on a phone, four in a row when Home is wide enough. At least
   60px high. */

.hm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.hm-tile {
  display: flex; align-items: center; gap: var(--s2);
  min-width: 0; min-height: 60px; padding: var(--s3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  color: var(--ink); text-align: left; text-decoration: none; cursor: pointer;
  font: inherit;
}
.hm-tile:hover { border-color: var(--field-line); box-shadow: var(--shadow-lift); }
.hm-tile:active { background: var(--sunken); }
.hm-tile__i {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md);
  background: var(--red-wash); color: var(--red-ink);
}
.hm-tile--upcoming .hm-tile__i { background: var(--info-bg); color: var(--info-ink); }
.hm-tile--overdue .hm-tile__i { background: var(--warning-bg); color: var(--warning-ink); }
.hm-tile--mentions .hm-tile__i { background: var(--success-bg); color: var(--success-ink); }
.hm-tile--mail .hm-tile__i { background: var(--danger-bg); color: var(--red-ink); }
.hm-tile__b { flex: 1; display: grid; gap: 2px; min-width: 0; }
.hm-tile__l {
  display: inline-flex; align-items: center; gap: var(--s1); min-width: 0;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); overflow-wrap: break-word;
}
.hm-tile__n { font: 700 var(--fs-h2)/1 var(--font-display); }
/* The chevron from 600px of Home: on a phone the word needs the room. */
.hm-tile__go { flex: none; display: none; place-items: center; color: var(--ink-mute); }
.hm-tile.is-late .hm-tile__n { color: var(--danger-ink); }
/* Unseen mentions and unread emails: a red dot. The number keeps its ink: they are not late. */
.hm-tile__dot { flex: none; width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--red-ink); }
@container hm (min-width: 600px) {
  .hm-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
  .hm-tile { min-height: 76px; gap: var(--s3); }
  .hm-tile__i { width: 44px; height: 44px; border-radius: var(--r-lg); }
  .hm-tile__go { display: grid; }
}
@container hm (min-width: 860px) {
  .hm-tiles { gap: var(--s4); }
  .hm-tile { padding: var(--s4); gap: var(--s4); min-height: 88px; }
  .hm-tile__i { width: 52px; height: 52px; }
  .hm-tile__l { font-size: var(--fs-body); }
  .hm-tile__n { font-size: 2rem; }
}

/* ---------- a card ---------- */

.hm-card { min-width: 0; scroll-margin-top: var(--s4); border-radius: var(--r-lg); }
.hm-card:focus { outline: none; }
.hm-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hm-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3); margin-bottom: var(--s3); }
.hm-card__head h2 { display: inline-flex; align-items: center; gap: var(--s2); margin: 0; font-size: var(--fs-lg); }
.hm-card__head h2 .i { color: var(--ink-soft); }
.hm-none { margin: 0; color: var(--ink-mute); font-size: var(--fs-sm); }
/* "View all documents ->": small and red, as in the mock-up. */
.hm-all {
  display: inline-flex; align-items: center; gap: var(--s1); min-height: var(--tap);
  color: var(--red-ink); font-size: var(--fs-sm); font-weight: 600; text-decoration: none;
}
.hm-all:hover { text-decoration: underline; }

/* ---------- My tasks: Today, Upcoming and Overdue one under the other ----------
   Each group has a coloured bar on the left, its icon and "Today (2)"; then
   one compact row per task (container hmtasks). */

.hm-tasks { container-type: inline-size; container-name: hmtasks; }
.hm-tasks__head { align-items: flex-start; }
.hm-tasks__t { display: grid; gap: 2px; min-width: 0; }
.hm-card__head .hm-tasks__t h2 { font-size: var(--fs-h3); }
.hm-tasks__t h2 .i { color: var(--ink); }
.hm-tasks__lead { margin: 0; color: var(--ink-soft); font-size: var(--fs-sm); }
.hm-tasks__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); }
/* The small Mentions link: a pill with the unseen number in red. */
.hm-menlink {
  display: inline-flex; align-items: center; gap: var(--s1);
  min-height: 36px; padding: 0 var(--s3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  color: var(--ink-soft); font: 600 var(--fs-sm)/1 var(--font-body); cursor: pointer;
}
.hm-menlink:hover { border-color: var(--field-line); color: var(--ink); }
.hm-menlink.is-new { color: var(--ink); }
.hm-menlink__n {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-pill); background: var(--red); color: var(--on-red); font-size: var(--fs-label);
}
@media (pointer: coarse) { .hm-menlink { min-height: var(--tap); } }

.hm-secs { display: grid; gap: var(--s4); }
.hm-sec {
  min-width: 0; padding-left: var(--s3);
  border-left: 3px solid var(--red); scroll-margin-top: var(--s4);
}
.hm-sec--upcoming { border-left-color: var(--info); }
.hm-sec--overdue { border-left-color: var(--warning); }
.hm-sec:focus { outline: none; }
.hm-sec:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hm-sec__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); margin-bottom: var(--s2); }
.hm-sec__t { display: inline-flex; align-items: center; gap: var(--s2); margin: 0; font: 700 var(--fs-body)/1.3 var(--font-body); color: var(--ink); }
.hm-sec__t .i { flex: none; color: var(--red-ink); }
.hm-sec--upcoming .hm-sec__t .i { color: var(--info-ink); }
.hm-sec--overdue .hm-sec__t .i { color: var(--warning-ink); }
.hm-sec.is-late .hm-sec__t { color: var(--danger-ink); }
.hm-sec__hint { font-size: var(--fs-sm); color: var(--ink-mute); }
.hm-sec__none { margin: 0; padding: var(--s1) 0; color: var(--ink-mute); font-size: var(--fs-sm); }
.hm-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.hm-more-rows { min-height: var(--tap); margin-top: var(--s1); font-weight: 600; font-size: var(--fs-sm); }
.hm-cut { margin: var(--s1) 0 0; color: var(--ink-mute); font-size: var(--fs-sm); }

/* ---------- one row: one task ----------
   Phone: the title with its grey line and the chevron, then the company and
   the chip. From 640px of card one line: title, company, chip, chevron. The
   tick box stands beside the link, never inside it: a tap on it must not
   open the task. */

.hm-item {
  display: flex; align-items: stretch; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.hm-item:hover { border-color: var(--field-line); }
/* A 44px target with a small box in it, as in the mock-up. */
.hm-tick {
  flex: none; display: grid; place-items: center; width: var(--tap); min-height: var(--tap); padding: 0;
  background: none; border: 0; color: transparent; cursor: pointer;
}
.hm-tick__box {
  display: grid; place-items: center; width: 20px; height: 20px;
  border: 2px solid var(--field-line); border-radius: var(--r-sm); background: var(--surface);
  transition: border-color var(--dur-1) ease, background-color var(--dur-1) ease, color var(--dur-1) ease;
}
.hm-tick:hover .hm-tick__box, .hm-tick:focus-visible .hm-tick__box { border-color: var(--success); background: var(--success-bg); color: var(--success); }
.hm-tick.is-busy .hm-tick__box { border-color: var(--success); background: var(--success); color: var(--surface); }
.hm-tick:disabled { cursor: default; }
/* A little room where nothing can be ticked; from 640px of card the room of a tick box, so the titles line up. */
.hm-tick-gap { flex: none; width: var(--s3); }
.hm-row {
  flex: 1; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; grid-template-areas: "main main go" "co chip chip";
  align-items: center; gap: var(--s1) var(--s3);
  min-height: var(--tap); padding: var(--s2) var(--s3) var(--s2) 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--ink); text-decoration: none;
}
.hm-row:hover { background: var(--tint); }
.hm-row:active { background: var(--tint-2); }
.hm-row__main { grid-area: main; display: grid; gap: 2px; min-width: 0; }
.hm-row__top { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s2); min-width: 0; }
.hm-row__title { min-width: 0; font-weight: 700; line-height: var(--lh-snug); overflow-wrap: anywhere; }
.hm-row__sub {
  display: flex; align-items: flex-start; gap: var(--s1); min-width: 0;
  font-size: var(--fs-sm); color: var(--ink-mute); line-height: var(--lh-snug); overflow-wrap: anywhere;
}
.hm-row__sub.is-done { color: var(--success-ink); }
.hm-row__sub .i { flex: none; margin-top: 2px; }
.hm-row__co { grid-area: co; display: grid; min-width: 0; line-height: var(--lh-snug); }
.hm-row__cname { color: var(--ink-soft); overflow-wrap: anywhere; }
.hm-row__wname { font-size: var(--fs-sm); color: var(--ink-mute); overflow-wrap: anywhere; }
.hm-row__go { grid-area: go; display: grid; place-items: center; color: var(--ink-mute); }
.hm-row .hm-chip { grid-area: chip; justify-self: end; }
/* The small marks beside a title: In CC, High. */
.hm-cc, .hm-prio {
  display: inline-block; padding: 0 6px; border-radius: var(--r-sm);
  font: 600 var(--fs-label)/1.6 var(--font-body);
  background: var(--neutral-bg); color: var(--ink-soft);
}
.hm-prio--high { background: var(--danger-bg); color: var(--danger-ink); }
/* The chip on the right: today red, upcoming blue, overdue amber, no deadline grey. */
.hm-chip {
  display: inline-flex; align-items: center; gap: var(--s1); white-space: nowrap;
  min-height: 26px; padding: 0 var(--s3); border-radius: var(--r-pill);
  font: 600 var(--fs-sm)/1 var(--font-body);
  background: var(--neutral-bg); color: var(--ink-soft);
}
.hm-chip--today { background: var(--danger-bg); color: var(--danger-ink); }
.hm-chip--upcoming { background: var(--info-bg); color: var(--info-ink); }
.hm-chip--overdue { background: var(--warning-bg); color: var(--warning-ink); }

@container hmtasks (min-width: 640px) {
  .hm-row {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) 7.5rem 20px; grid-template-areas: "main co chip go";
    column-gap: var(--s4); padding-top: var(--s2); padding-bottom: var(--s2);
  }
  .hm-tick-gap { width: var(--tap); }
  .hm-row__co { padding-left: var(--s4); border-left: 1px solid var(--line); }
  .hm-row .hm-chip { justify-self: start; }
}

/* ---------- the three cards: Recent documents, Recent emails, the calendar ----------
   One column on a phone; from 640px of Home the documents and emails side
   by side and the calendar under them; from 1040px three in a row. On
   Phase 2 there are no emails: the documents and the calendar. */

.hm-trio { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: stretch; min-width: 0; }
.hm-trio > * { min-width: 0; }
@container hm (min-width: 640px) {
  .hm-trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-trio:not(.hm-trio--two) > .hm-cal { grid-column: 1 / -1; }
}
@container hm (min-width: 1040px) {
  .hm-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-trio:not(.hm-trio--two) > .hm-cal { grid-column: auto; }
  .hm-trio--two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}

/* ---------- the calendar card ---------- */

.hm-cal__head { flex-wrap: nowrap; }
.hm-cal__m { color: var(--ink); text-decoration: none; }
.hm-cal__m:hover { text-decoration: underline; }
.hm-cal__nav { display: inline-flex; align-items: center; gap: var(--s1); }
.hm-cal__wd, .hm-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; max-width: 420px; margin: 0 auto; }
.hm-cal__wd { margin-bottom: var(--s1); font-size: var(--fs-label); font-weight: 600; color: var(--ink-mute); }
.hm-cal__d {
  position: relative; display: grid; place-items: center; justify-self: center;
  width: 100%; max-width: 40px; min-height: 32px; border-radius: var(--r-md);
  color: var(--ink); text-decoration: none; font-size: var(--fs-sm);
}
a.hm-cal__d:hover { background: var(--tint); }
.hm-cal__d.is-out { visibility: hidden; }
.hm-cal__d.is-today { background: var(--red); color: var(--on-red); font-weight: 700; }
.hm-cal__d.has-items::after { content: ""; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: var(--r-pill); background: var(--red-ink); }
.hm-cal__d.is-today.has-items::after { background: var(--on-red); }
@media (pointer: coarse) { .hm-cal__d { min-height: 40px; } }
/* "Next: Review employment contract at 14:00" under the month. */
.hm-next {
  display: flex; align-items: center; gap: var(--s2);
  margin: var(--s3) 0 0; padding-top: var(--s3); min-height: var(--tap);
  border-top: 1px solid var(--line);
  color: var(--ink); font-size: var(--fs-sm); text-decoration: none; overflow-wrap: anywhere;
}
.hm-next .i { flex: none; color: var(--ink-soft); }
a.hm-next:hover { color: var(--link); }

/* ---------- Recent documents and Recent emails ---------- */

.hm-rec { list-style: none; margin: 0; padding: 0; display: grid; }
.hm-rec > li + li { border-top: 1px solid var(--line); }
.hm-rec__a { display: flex; align-items: center; gap: var(--s3); min-height: var(--tap); padding: var(--s2); margin: 0 calc(var(--s2) * -1); border-radius: var(--r-md); color: var(--ink); text-decoration: none; }
.hm-rec__a:hover { background: var(--tint); }
.hm-rec__b { display: grid; gap: 1px; min-width: 0; flex: 1; }
.hm-rec__t { font-weight: 600; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: var(--lh-snug); }
.hm-rec__a.is-unread .hm-rec__t { font-weight: 800; }
.hm-rec__s { font-size: var(--fs-label); color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-rec__i { flex: none; color: var(--ink-soft); }
/* A red dot before an unread email; the place stays, so the icons line up. */
.hm-rec__dot { flex: none; width: 8px; height: 8px; margin-right: calc(var(--s2) * -1); border-radius: var(--r-pill); }
.hm-rec__a.is-unread .hm-rec__dot { background: var(--red-ink); }
.hm-ext { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; font: 700 10px/1 var(--font-body); color: var(--on-file); background: var(--file-other); }
.hm-ext--pdf { background: var(--file-pdf); }
.hm-ext--word { background: var(--file-word); }
.hm-ext--excel { background: var(--file-excel); }
.hm-ext--image { background: var(--file-image); }

/* ---------- Recently opened ----------
   A slim bar: the words, a thin line and the chips. Since 19 Nov 2026 (Jose:
   "The ask AI can be removed to crop the recent view so that there is not a
   tab to drag") no Ask AI and no sideways scroll: the chips that fit show,
   on one line from 720px of Home, on two on a phone, and "+2" counts the
   rest (views/home.js fitOpened(), core/home-row.js fitChips()). The bar
   keeps clear of the chat bubble at the bottom right. */

.hm-opened { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); margin-bottom: var(--s7); }
.hm-opened__h { flex: 1 1 100%; display: inline-flex; align-items: center; gap: var(--s2); margin: 0; font-size: var(--fs-body); white-space: nowrap; }
.hm-opened__h .i { color: var(--ink-soft); }
/* position: relative keeps the screen-reader words of a chip inside the bar. */
.hm-chips {
  position: relative;
  flex: 1 1 100%; min-width: 0; list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--s2);
}
.hm-chips > li { flex: none; min-width: 0; max-width: 100%; }
.hm-chips > li[hidden] { display: none; }
.hm-ochip {
  display: inline-flex; align-items: center; gap: var(--s2); max-width: min(15rem, 100%);
  min-height: 40px; padding: 0 var(--s3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  color: var(--ink); font-size: var(--fs-sm); text-decoration: none; white-space: nowrap;
}
.hm-ochip:hover { border-color: var(--field-line); background: var(--tint); }
.hm-ochip .i { flex: none; color: var(--ink-soft); }
.hm-ochip__n { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (pointer: coarse) { .hm-ochip { min-height: var(--tap); } }
/* "+2": the chips left out, their names in its title. */
.hm-chips__more {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s2);
  color: var(--ink-mute); font: 600 var(--fs-sm)/1 var(--font-body); white-space: nowrap;
}
.hm-opened__none { flex: 1 1 100%; }
@container hm (min-width: 720px) {
  .hm-opened { flex-wrap: nowrap; }
  .hm-opened__h { flex: none; padding-right: var(--s3); border-right: 1px solid var(--line); }
  .hm-chips, .hm-opened__none { flex: 1 1 0; }
}

/* ---------- the Mentions dialog ---------- */

.hm-mens__top { display: flex; justify-content: flex-end; margin-bottom: var(--s2); }
.hm-mens { list-style: none; margin: 0; padding: 0; }
.hm-mens > li + li { border-top: 1px solid var(--line); }
.hm-men {
  display: flex; align-items: flex-start; gap: var(--s3);
  min-height: var(--tap); padding: var(--s3) var(--s2); margin: 0 calc(var(--s2) * -1);
  border-radius: var(--r-md);
  color: var(--ink); text-decoration: none;
}
.hm-men:hover { background: var(--tint); }
.hm-men:active { background: var(--tint-2); }
.hm-men__b { display: grid; gap: 2px; min-width: 0; flex: 1; }
.hm-men__top { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s2); min-width: 0; }
.hm-men__who { font-weight: 600; overflow-wrap: anywhere; }
.hm-men__when { margin-left: auto; font-size: var(--fs-sm); color: var(--ink-mute); white-space: nowrap; }
.hm-men__new {
  display: inline-flex; align-items: center; gap: var(--s1);
  font: 600 var(--fs-label)/1.25 var(--font-display); letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--danger-ink);
}
.hm-men__dot { width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--red-ink); }
.hm-men__text {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  color: var(--ink-soft); line-height: var(--lh-snug); overflow-wrap: anywhere; white-space: pre-line;
}
.hm-men.is-new .hm-men__text { color: var(--ink); }
.hm-men__task {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2);
  font-size: var(--fs-sm); color: var(--ink-mute); line-height: var(--lh-snug);
}
.hm-men__task > span { min-width: 0; overflow-wrap: anywhere; }
.hm-more { margin-top: var(--s3); }

/* ---------- motion, contrast, print ---------- */

@media (prefers-reduced-motion: reduce) {
  /* The sun of the weather icon stands still (the flow behind the page: shell.css). */
  .hm-wx__icon--sun .hm-wi__sunb { animation: none; }
}
@media (forced-colors: active) {
  .hm-tile, .hm-card, .hm-item, .hm-ochip, .hm-chip, .hm-menlink { border: 1px solid ButtonText; }
  .hm-sec { border-left-color: ButtonText; }
  .hm-tick__box { border-color: ButtonText; }
  .hm-hero, .hm-wx { border: 1px solid CanvasText; }
  .hm-men__dot, .hm-tile__dot, .hm-rec__a.is-unread .hm-rec__dot, .hm-cal__d.has-items::after { background: Highlight; }
}
@media print {
  .hm-tiles, .hm-more, .hm-more-rows, .hm-tick, .hm-menlink, .hm-cal, .hm-opened, .hm-wx__icon { display: none; }
  .hm-hero { background: none; color: var(--ink); margin: 0; border: 0; }
  .hm-hero__hi, .hm-hero__slogan, .hm-wx { color: var(--ink); }
  .hm-wx { background: none; box-shadow: none; }
}

/* ==========================================================================
   Recurring tasks
   ========================================================================== */

/* ---------- the list ---------- */

.rec-filter { max-width: 360px; }
.rec-filter .field { margin-bottom: 0; }
.rec-hint { color: var(--ink-mute); font-size: var(--fs-sm); }

.rec-open { font-weight: 600; text-align: left; overflow-wrap: anywhere; }
@media (min-width: 720px) { .rec-col-task { min-width: 200px; } }
.rec-two { display: grid; gap: 2px; min-width: 0; }
.rec-two__s { font-size: var(--fs-sm); color: var(--ink-mute); line-height: var(--lh-snug); }
.rec-status { display: grid; gap: var(--s1); min-width: 0; }
.rec-status__b { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }
.rec-status__p { max-width: 34ch; font-size: var(--fs-sm); color: var(--warning-ink); line-height: var(--lh-snug); }

/* ---------- the form ---------- */

.rec-form { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.rec-form__note { margin-bottom: var(--s4); }
.rec-fixed { font-weight: 600; overflow-wrap: anywhere; }
.rec-segf { display: flex; min-width: 0; }
.rec-rule, .rec-on { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--s4); min-width: 0; }
.rec-num { max-width: 9rem; }
.rec-lead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); min-width: 0; }
.rec-lead__u { color: var(--ink-soft); }
.rec-preview {
  margin-top: var(--s4); padding: var(--s3) var(--s4);
  background: var(--info-bg); border: 1px solid var(--info-line); border-radius: var(--r-md);
  color: var(--info-ink); font-weight: 600;
}
@media (min-width: 720px) {
  .rec-rule { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .rec-on { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

/* Item 127 (21 Oct 2026): the calendar (views/calendar.js). A month of six
   weeks, Monday first. On a computer a grid; under 720px the days with
   something, one under the other, with their full date. */
.cal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s3) 0; }
.cal-nav__m { margin: 0 var(--s2); font-size: var(--fs-lg, 1.125rem); min-width: 10rem; text-align: center; }
.cal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-d { min-height: 6.5rem; padding: var(--s1); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); min-width: 0; }
.cal-d.is-out { background: var(--sunken); color: var(--ink-soft); }
.cal-d.is-today { box-shadow: inset 0 0 0 2px var(--red-ink); }
.cal-d__n { font-weight: 600; font-size: var(--fs-sm); }
/* The full date ("Monday 26 Oct 2026") is read out on a computer and shown on a phone (26 Oct 2026). */
.cal-d__full { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.cal-d__items { list-style: none; margin: var(--s1) 0 0; padding: 0; display: grid; gap: 2px; }
.cal-i { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s1); font-size: var(--fs-sm); min-width: 0; }
.cal-i__a { display: grid; min-width: 0; padding: 2px var(--s1); border-radius: var(--r-sm); background: var(--tint); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; flex: 1 1 auto; }
.cal-i--step .cal-i__a { background: var(--sunken); }
.cal-i--email .cal-i__a { background: var(--warning-bg); }
.cal-i.is-overdue .cal-i__a { background: var(--danger-bg); color: var(--danger-ink); }
.cal-i.is-done .cal-i__a { opacity: .6; text-decoration: line-through; }
.cal-i__k { line-height: 1.2; }
/* 22 Oct 2026: appointments of your own, and the "+" of a day. */
.cal-i--event .cal-i__a { background: var(--success-bg); border: 0; font: inherit; text-align: left; cursor: pointer; }
.cal-i__p { color: var(--ink-soft); }
.cal-d__n { display: flex; align-items: center; gap: var(--s1); }
.cal-d__add { margin-left: auto; width: 28px; height: 28px; min-height: 0; opacity: 0; }
.cal-d:hover .cal-d__add, .cal-d__add:focus-visible { opacity: 1; }
@media (hover: none) { .cal-d__add { opacity: 1; } }
.cal-nav__new { margin-left: auto; }
/* What the calendar shows (12 Nov 2026, decision 482): one button a kind, pressed while it shows. */
.cal-show { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); }
.cal-show__l { margin-right: var(--s1); }
.cal-show__b {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink-mute); font: inherit; font-size: var(--fs-sm, .875rem); cursor: pointer;
}
.cal-show__b.is-on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.cal-show__b:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (pointer: coarse) { .cal-show__b { min-height: 44px; } }
.cal-ev__times { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (max-width: 719px) {
  .cal-grid { grid-template-columns: minmax(0, 1fr); border: 0; gap: var(--s2); }
  .cal-d { min-height: 0; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s2) var(--s3); }
  .cal-d.is-empty { display: none; }
  .cal-d__day { display: none; }
  .cal-d__full { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; clip-path: none; white-space: normal; }
  .cal-i { font-size: var(--fs-base, 1rem); }
  .cal-i__a { padding: var(--s2); min-height: var(--tap); }
  .cal-d__add { width: var(--tap); height: var(--tap); }
}
/* 26 Oct 2026 (Jose's change list): the names of the weekdays over the grid (a phone shows the full
   date on each day instead), the word Today on today, the day the reminder window opened, and
   appointments over several days: a bar on the left, on every day they cover. */
.cal-wd { list-style: none; margin: 0; padding: 0 0 var(--s1); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd li { padding: 0 var(--s1); font-size: var(--fs-label); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.cal-d__now { color: var(--red-ink); font-weight: 600; }
.cal-d.is-picked { background: var(--info-bg); }
.cal-i--event.is-multi .cal-i__a { border-left: 3px solid var(--success); }
.cal-i--event.is-cont .cal-i__a { border-top-left-radius: 0; border-bottom-left-radius: 0; }
@media (max-width: 719px) {
  .cal-wd { display: none; }
}

/* 26 Oct 2026: the reminder window of appointments (components/reminders.js), on every screen. Under
   the drawer, its scrim and every modal; over the page and the email panel, beside which it moves
   left. Above the bottom bar on a phone, and out of the way while the on-screen keyboard is up. */
.rmd {
  position: fixed; z-index: calc(var(--z-scrim) - 1);
  right: var(--s4); bottom: calc(var(--s4) + env(safe-area-inset-bottom, 0px));
  width: min(380px, calc(100vw - 2 * var(--s4))); max-height: min(70vh, 560px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-strong); border-top: 4px solid var(--red);
  border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  animation: llRise var(--dur-2) var(--ease-out) both;
}
.rmd__head { flex: none; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s3); }
.rmd__icon { display: grid; place-items: center; color: var(--red-ink); }
.rmd__h { flex: 1; min-width: 0; margin: 0; display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-base, 1rem); }
.rmd__n { min-width: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--red); color: var(--on-red); font-size: var(--fs-label); line-height: 20px; text-align: center; }
.rmd__list { list-style: none; margin: 0; padding: 0 var(--s3) var(--s3); display: grid; gap: var(--s2); min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.rmd__i { display: grid; gap: 2px; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.rmd__i.is-late { border-color: var(--danger-line); }
.rmd__t { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.rmd__when, .rmd__due { margin: 0; overflow-wrap: anywhere; }
.rmd__when { color: var(--ink-soft); }
.rmd__i.is-late .rmd__due { color: var(--danger-ink); font-weight: 600; }
.rmd__acts { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s1); }
.rmd__foot { flex: none; display: flex; justify-content: flex-end; padding: var(--s2) var(--s3); border-top: 1px solid var(--line); }
@media (max-width: 959px) {
  .rmd { left: var(--s3); right: var(--s3); width: auto; max-height: 60vh;
    bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px) + var(--s2)); }
  .kb-open .rmd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rmd { animation: none; }
}

/* The pop-up of the day (views/shell.js): what is due today and overdue. */
.cal-pop { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.cal-pop a { display: grid; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.cal-pop .is-overdue a { border-color: var(--danger-line); background: var(--danger-bg); }

/* Appointments with colleagues (27 Oct 2026): one a colleague invited this person to, "From {name}". */
.cal-i--event.is-from .cal-i__a { background: var(--info-bg); }
.cal-i--event.is-from.is-multi .cal-i__a { border-left-color: var(--info-ink); }
.cal-ev__view { display: grid; gap: var(--s3); }
.cal-ev__from { display: inline-flex; align-items: center; gap: var(--s2); margin: 0; font-weight: 600; color: var(--info-ink); }
.rmd__from { margin: 0; color: var(--info-ink); font-weight: 600; overflow-wrap: anywhere; }

/* 30 Oct 2026 (Jose: "as mens meer as een ding dagboek gooi hy alles in een lang tab ... kan elke een sy
   eie blok kry"): every item of a day is a block of its own, with room between the blocks, an edge all
   round and a bar on the left in its colour, and its time in bold, so two appointments never read as one. */
.cal-d__items { gap: var(--s1); }
.cal-i__a { padding: var(--s1) var(--s2); border: 1px solid var(--line-strong); border-left-width: 4px; box-shadow: var(--shadow-soft); }
.cal-i--event .cal-i__a { border: 1px solid var(--success-line); border-left: 4px solid var(--success); }
.cal-i--event.is-from .cal-i__a { border-color: var(--info-line); border-left-color: var(--info-ink); }
.cal-i--email .cal-i__a { border-color: var(--warning-line); border-left-color: var(--warning); }
.cal-i.is-overdue .cal-i__a { border-color: var(--danger-line); border-left-color: var(--danger-ink); }
.cal-i--event.is-cont .cal-i__a { border-left-style: dashed; }
.cal-i__k { font-weight: 600; color: inherit; }
