/* ===========================================================================
   Dashboard
   ---------------------------------------------------------------------------
   A 12-column grid, as the design lays it out, with panels spanning 12, 7, 6 or
   5. Each panel is the reference container (the company drawer's .ovbox): a
   16px radius, a faint edge, the softest shadow, 12px of page grey between
   them, 16px from each heading to what it heads.
   =========================================================================== */

/* minmax(0, 1fr), not 1fr.
   A bare `1fr` track is minmax(auto, 1fr), and that `auto` floor is the item's
   min-content — so one wide child drags the whole grid out with it. The
   "Businesses added" strip is a flex row of 262px cards; its min-content is
   about 2200px, which stretched the entire dashboard to 2245px inside a 386px
   phone and pushed the hero, its stats and every panel off the side of the
   screen. A zero floor lets the track take the width it is given and leaves the
   strip to scroll, which is what it is built to do. */
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px }
/* A period button refetches only the performance figures, so only those fade
   while it happens. The numbers you were reading stay legible and stay put
   rather than being replaced by a spinner and then landing somewhere else. */
.dash__perfdata { transition: opacity .18s ease }
.dash__perfdata[aria-busy="true"] { opacity: .45 }
.sp12 { grid-column: span 12 }
.sp7  { grid-column: span 7 }
.sp6  { grid-column: span 6 }
.sp5  { grid-column: span 5 }

.panel {
  background: var(--card); border: 1px solid rgba(16, 33, 31, .07);
  border-radius: 16px; padding: var(--pad-box); box-shadow: 0 1px 2px rgba(16, 33, 31, .04);
}
/* A bare heading and a heading row sit the same distance above what they head. */
.panel > h3 { margin: 0 0 16px; font-size: 17px; font-weight: var(--weight-strong) }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px }
.panel__head h3 { margin: 0; font-size: 17px; font-weight: var(--weight-strong) }
.panel__link { background: none; border: none; font-family: inherit; font-size: 13px; font-weight: var(--weight-strong); color: var(--text); cursor: pointer }
.panel__link:hover { color: var(--coral) }

/* A labelled bar. Used for stages, priorities, pain points, steps, outcomes —
   the design varies only the track height and the label width. */
.barrow { display: flex; align-items: center; gap: 16px }
.barrow__name { flex: 0 0 130px; min-width: 130px; font-size: 13.5px; overflow-wrap: anywhere }
.barrow__name--flex { flex: 1 1 auto; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.barrow__track { flex: 1 1 40px; min-width: 40px; height: 12px; border-radius: var(--r-pill); background: var(--page); overflow: hidden }
.barrow__track--sm { height: 10px }
.barrow__track > div { height: 100%; border-radius: var(--r-pill); background: var(--teal); transition: width .6s cubic-bezier(.4, 0, .2, 1) }
.barrow__value { flex: 0 0 auto; text-align: right; font-size: 13.5px; font-weight: var(--weight-strong); white-space: nowrap }
.barrow__meta { flex: 0 0 auto; text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap }

/* Priority rows put the label above a full-width bar rather than beside it. */
.prio { display: flex; flex-direction: column; gap: 8px }
.prio__head { display: flex; align-items: center; justify-content: space-between }
.prio__head b { font-size: 13.5px; font-weight: var(--weight-strong) }
.prio__head span { font-size: 13px; color: var(--muted) }
.prio__track { height: 8px; border-radius: var(--r-pill); background: var(--page); overflow: hidden }
.prio__track > div { height: 100%; border-radius: var(--r-pill); background: var(--teal); transition: width .6s cubic-bezier(.4, 0, .2, 1) }


/* Performance */
.perf__head { flex-wrap: wrap; row-gap: 12px }
.perf__periods { margin-left: auto; display: flex; align-items: center; gap: 2px; flex-wrap: wrap }
.perf__periods .perfrange__wrap { margin-left: 6px }
/* Also the tab strip on Settings, and the type pickers in the add forms — a
   chip is a button, so it stands the same height as one. */
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--control-h); padding: 0 20px;
  font-size: 12.5px; font-weight: var(--weight-strong); border-radius: var(--r-btn);
  border: 1px solid var(--btn-edge); background: var(--card); color: var(--muted);
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.chip:has(> .ms:first-child) { padding-left: 16px }
/* The same holds at the far end: a trailing chevron or count carries weight,
   so its side takes the icon side's 16 rather than the label's 20. */
.chip:has(> .ms:last-child:not(:first-child), > .tabchips__n:last-child) { padding-right: 16px }
.chip .ms { font-size: 16px }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink) }
/* A toggle in a toolbar (Show people) is a setting, not the page's action,
   so on it is a grey wash rather than a second ink button beside the
   primary one. */
.table__toggle[aria-pressed="true"],
.table__toggle[aria-pressed="true"]:hover {
  background: color-mix(in srgb, var(--text) 7%, var(--card)); border-color: var(--btn-edge-hover);
  color: var(--text);
}
/* Sub tabs: a row of chips that picks what a section shows (the Thread's
   channels, Activity's kinds and periods, whose deals on Pipeline, Settings'
   sections). They sit a step below anything that moves between places: no
   outlines, the chosen one in a soft grey wash rather than ink, so they never
   outweigh a tab or a button. Each is its icon, its label and, when it counts
   something, its count in a small counter after it. A chip with nothing behind it stays
   in its place, faded. Chips that are a choice in a form keep the outlined
   .chip. */
.tabchips { display: flex; align-items: center; gap: 2px; flex-wrap: wrap }
.tabchips .chip {
  height: 32px; padding: 0 12px 0 8px; gap: 6px; border-radius: var(--r-btn-sm);
  border-color: transparent; background: none; color: var(--muted); box-shadow: none;
}
.tabchips .chip .ms { font-size: 16px }
/* Sub tabs keep their tighter 32px sides, 12 / 8, over the small size's 20 / 16. */
.tabchips .chip:has(> .ms:first-child) { padding-left: 8px }
.tabchips .chip:has(> .ms:last-child:not(:first-child), > .tabchips__n:last-child) { padding-right: 8px }
.tabchips .chip:not([aria-pressed="true"]):not(:disabled):hover {
  border-color: transparent; color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent);
}
/* A tint rather than a colour, so the wash reads the same on a card or on
   the grey page. */
.tabchips .chip[aria-pressed="true"],
.tabchips .chip[aria-pressed="true"]:hover {
  border-color: transparent; color: var(--text); background: color-mix(in srgb, var(--text) 9%, transparent);
}
.tabchips .chip:disabled { opacity: .4; cursor: default; transform: none }
/* The count is a small counter of its own, as Canny and Unify set one, so it
   never reads as part of the label. Its fill is always the opposite of its
   chip's: a grey tint on a plain chip, white on the chosen one's grey wash. */
.tabchips__n {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px;
  margin-left: 2px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--text) 7%, transparent);
}
.tabchips .chip[aria-pressed="true"] .tabchips__n { color: var(--text); background: var(--card) }
/* On a touch screen every control is 44 (design/corners-and-spacing.md). */
@media (pointer: coarse) {
  .tabchips .chip { height: 44px; border-radius: var(--r-btn) }
}
/* Shown only when the Custom period is picked: one button the shape of a
   chip, with both dates inside it, so it reads as a single range. It opens
   the calendar below. */
.perfrange__wrap { position: relative; display: inline-flex }
.perfrange__wrap:has(.rangecal) { z-index: 30 }
.perfrange {
  display: inline-flex; align-items: center; gap: 6px;
  height: var(--control-h); padding: 0 12px 0 14px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--card);
  font-family: inherit; font-size: 12.5px; font-weight: var(--weight-strong); line-height: 1;
  color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.perfrange .ms { font-size: 17px; color: var(--muted) }
.perfrange .perfrange__caret { font-size: 18px; transition: transform .18s ease }
.perfrange[aria-expanded="true"] .perfrange__caret { transform: rotate(180deg) }
.perfrange:hover, .perfrange[aria-expanded="true"] { border-color: var(--ink) }
.perfrange:focus-visible { outline: none; border-color: var(--ink); box-shadow: var(--ring) }
.perfrange:active { transform: translateY(1px) }
.perfrange__to { font-weight: 500; color: var(--muted) }

/* The calendar. Ends of the range are ink discs, as a pressed chip is ink;
   the days between sit on a teal band, teal being the selection colour. */
.rangecal {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 1;
  padding: 18px 18px 16px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-top);
  animation: rangecal-in .16s cubic-bezier(.16, 1, .3, 1) both;
}
.rangecal--left { right: auto; left: 0 }
@keyframes rangecal-in { from { opacity: 0; transform: translateY(-4px) } }
.rangecal .rangecal__step { position: absolute; top: 12px; width: 34px; height: 34px; flex: none; border-color: transparent; color: var(--text) }
.rangecal .rangecal__step:hover:not(:disabled) { border-color: transparent; background: var(--page) }
.rangecal .rangecal__step:disabled { opacity: .3; cursor: default }
.rangecal__step:first-child { left: 12px }
.rangecal__step:nth-child(2) { right: 12px }
.rangecal__months { display: flex; gap: 28px }
.rangecal__month { width: calc(7 * 38px) }
.rangecal__title {
  display: flex; align-items: center; justify-content: center; height: 22px; margin-bottom: 12px;
  font-size: 13.5px; font-weight: var(--weight-strong);
}
.rangecal__grid { display: grid; grid-template-columns: repeat(7, 38px); row-gap: 2px }
.rangecal__wd {
  height: 26px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: var(--weight-strong); color: var(--muted); text-decoration: none;
}
.rangecal__day {
  height: 38px; padding: 0; border: 0; background: none; display: grid; place-items: center;
  font-family: inherit; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text); cursor: pointer;
}
.rangecal__day span {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-pill);
}
.rangecal__day:hover:not(:disabled) span { background: var(--page) }
.rangecal__day.is-today span { box-shadow: inset 0 0 0 1px var(--line); font-weight: var(--weight-strong) }
.rangecal__day:disabled { color: color-mix(in srgb, var(--muted) 45%, var(--card)); cursor: default }
.rangecal__day:focus-visible { outline: none }
.rangecal__day:focus-visible span { box-shadow: 0 0 0 2px var(--teal) }
/* The band: full cells between the ends, half cells behind the ends, and
   rounded off at each row's and month's edges. */
.rangecal__day.is-in { background: color-mix(in srgb, var(--teal) 16%, var(--card)) }
.rangecal__day.is-in.is-rowstart { border-radius: var(--r-pill) 0 0 var(--r-pill) }
.rangecal__day.is-in.is-rowend { border-radius: 0 var(--r-pill) var(--r-pill) 0 }
.rangecal__day.is-in.is-rowstart.is-rowend { border-radius: var(--r-pill) }
.rangecal__day.is-span.is-start:not(.is-rowend) { background: linear-gradient(to right, transparent 50%, color-mix(in srgb, var(--teal) 16%, var(--card)) 50%) }
.rangecal__day.is-span.is-end:not(.is-rowstart) { background: linear-gradient(to left, transparent 50%, color-mix(in srgb, var(--teal) 16%, var(--card)) 50%) }
.rangecal__day.is-start span, .rangecal__day.is-end span,
.rangecal__day.is-start:hover span, .rangecal__day.is-end:hover span {
  background: var(--ink); color: var(--on-ink); font-weight: var(--weight-strong); box-shadow: none;
}
.rangecal__day.is-start:focus-visible span, .rangecal__day.is-end:focus-visible span { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--teal) }
@media (prefers-reduced-motion: reduce) { .rangecal, .perfrange__caret { animation: none; transition: none } }
@media (max-width: 640px) {
  .rangecal { padding: 16px 12px 12px }
  .rangecal__month { width: calc(7 * 40px) }
  .rangecal__grid { grid-template-columns: repeat(7, 40px) }
  .rangecal__day { height: 40px }
  .rangecal__day span { width: 38px; height: 38px }
}

/* The dashboard's four headline numbers. This lived as an inline style on the
   element, which meant the phone could not touch it: an inline
   repeat(4, 1fr) kept four columns at 375px, squeezing each tile to about
   60px, and 1fr has no floor — so a long value like £153,000 pushed its own
   column wider and ran the whole row off the side of the screen. Both the
   track sizing and the gap belong here, where a media query can reach them. */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 24px 26px }
/* Labels and written deltas are the admin console's; the customer dashboard
   names its figures with icons and draws its deltas as arrows. */
.kpi__label { font-size: 11.5px; font-weight: var(--weight-strong); color: var(--muted); margin-bottom: 12px }
.kpi__delta { font-size: 12.5px; font-weight: 500; color: #2E9E63; margin-top: 6px }
.kpi__delta--bad { color: #C0362C }
/* Every realistic figure fits the tile at both sizes — a seven-figure pipeline
   still clears it on a 375px phone. This is the backstop for the one that does
   not: a number that outgrows its tile is trimmed inside the card rather than
   allowed to spill across the rounded border and out of the layout. */
.kpi__value {
  font-size: 34px; font-weight: var(--weight-strong); letter-spacing: -.03em;
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Dashboard hero. The one dark panel in the app, and the only thing on the
   dashboard that carries a moving element — a slow drifting blob behind the
   figure, exactly as the design has it. */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--on-ink);
  border-radius: 28px; padding: 38px 40px;
}
.hero__blob {
  position: absolute; top: -150px; right: -70px; width: 480px; height: 400px;
  background: var(--teal); opacity: .14; pointer-events: none;
  border-radius: 58% 42% 47% 53% / 46% 55% 45% 54%;
  animation: blobDrift 24s ease-in-out infinite;
}
.hero__label { font-size: 12px; font-weight: var(--weight-strong); color: color-mix(in srgb, var(--on-ink) 76%, transparent); margin-bottom: 14px }

/* The dashboard's band. On top, the money on the table (the open pipeline)
   as the one big number, and the win rate in the top right as a ring.
   Under them the deals funnel across the full width:
   the companies with a deal widen into the deals, which split into won, open
   and lost. Each node is a solid bar in its colour, its head just over the
   bar's top; each stream leaves the deals neutral and takes on its colour as
   it goes. The outcome colours are set once here, lifted so they read on the ink: green
   won, blue still open, red lost. The flow runs to the panel's right edge;
   each stream's label stands on it, right-aligned to its end. The chart's
   height comes from the script as --flow-h, so the panel always grows to
   hold the whole flow, and heads and labels are placed by share of that
   height and of the chart's width, so they stay on their node. */
.hero--dash {
  --flow-won: color-mix(in srgb, var(--good) 74%, #fff);
  --flow-open: color-mix(in srgb, var(--stage-2) 55%, #fff);
  --flow-lost: color-mix(in srgb, var(--bad) 72%, #fff);
  border-radius: 16px; padding: 30px 36px 26px;
}
.hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; margin-bottom: 14px }
.hero__money { display: flex; flex-direction: column; gap: 12px; min-width: 0 }
.hero__win { display: flex; align-items: center; gap: 16px }
.hero__win .ring__mid { font-size: 18px; color: var(--on-ink) }
.hero__win.is-quiet .ring__mid { opacity: .45 }
.hero__wintext { display: flex; flex-direction: column; gap: 6px }
.hero__foot { font-size: 12.5px; font-weight: 500; color: color-mix(in srgb, var(--on-ink) 66%, transparent) }
.hero__big {
  font-size: 60px; font-weight: var(--weight-strong); letter-spacing: -.045em; line-height: 1;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.hero__key {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
  color: color-mix(in srgb, var(--on-ink) 74%, transparent);
}

.heroflow { min-width: 0 }
.heroflow__canvas, .heroflow__stage { position: relative; min-width: 0 }
.heroflow__svg { display: block; width: 100%; height: var(--flow-h); overflow: visible }
.heroflow__head {
  position: absolute; transform: translateY(calc(-100% - 8px));
  display: flex; align-items: baseline; gap: 8px; white-space: nowrap;
}
.heroflow__n {
  font-size: 22px; font-weight: var(--weight-strong); letter-spacing: -.02em; line-height: 1;
  color: var(--on-ink); font-variant-numeric: tabular-nums;
}
.heroflow__name {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: color-mix(in srgb, var(--on-ink) 74%, transparent);
}
.heroflow__name .ms { font-size: 16px }
.heroflow__node { stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke }
.heroflow__node.is-cos { stroke: color-mix(in srgb, var(--on-ink) 40%, transparent) }
.heroflow__node.is-deals { stroke: color-mix(in srgb, var(--on-ink) 80%, transparent) }
.heroflow__node.is-won { stroke: var(--flow-won) }
.heroflow__node.is-open { stroke: var(--flow-open) }
.heroflow__node.is-lost { stroke: var(--flow-lost) }
.heroflow__end {
  position: absolute; right: 0; transform: translateY(calc(-100% - 7px));
  display: flex; align-items: baseline; gap: 7px; white-space: nowrap;
}
.heroflow__end.is-won .heroflow__n { color: var(--flow-won) }
.heroflow__end.is-open .heroflow__n { color: var(--flow-open) }
.heroflow__end.is-lost .heroflow__n { color: var(--flow-lost) }
.heroflow__end.is-quiet { opacity: .45 }
.heroflow__val {
  margin-left: 4px; font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--on-ink) 66%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  svg.heroflow__svg { animation: heroflowIn 1.2s cubic-bezier(.22, 1, .36, 1) both }
}
@keyframes heroflowIn { from { clip-path: inset(-4px 100% -4px -4px) } to { clip-path: inset(-4px -4px -4px -4px) } }

/* To do list, Today. On top, what Candid has for the rep today, an agenda
   line per section; under it the day as a calendar to work down.
   Full width. Both panels are the reference container (the company drawer's
   .ovbox): a 16px radius, the softest shadow, 12px of page grey between them;
   the day calendar has the faint edge too, the agenda its ink fill. */
.todopage { display: flex; flex-direction: column; gap: 12px; width: 100% }

/* Inset as the day calendar under it is, and its heading at the same size, so
   the two panels read as one page. The last line's own padding makes up the
   bottom, so the space under it matches the space over the heading. */
.todaylist { background: var(--ink); color: var(--on-ink); border-radius: 16px; padding: 26px 32px 28px; box-shadow: 0 1px 2px rgba(16, 33, 31, .04) }
.todaylist h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 17px; font-weight: var(--weight-strong) }
.todaylist h2 .ms { font-size: 19px; color: inherit }
/* Pip heads the panel in the sparkle's place (todayPip in app/today.js). */
.todaylist h2 .todaylist__pip { margin: -4px 0 -2px }
/* A tile per section, read in a glance: the section's icon in its colour
   and who is waiting as faces, the number large, a short label under it, and
   for calls the day's calls made as a bar. Tinted in the section's colour on
   the dark panel; the tiles are the visual, not boxes round text. */
.todaylist__items {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px;
  /* --cols (tileGrid in app/today.js) balances the rows: a column is never
     narrower than 1/--cols of the row, so 7 tiles sit 4 + 3, not 6 + 1; a
     narrow panel still wraps sooner at 150px. */
  grid-template-columns: repeat(auto-fill, minmax(max(170px, calc((100% - (var(--cols, 6) - 1) * 10px) / var(--cols, 6) - 1px)), 1fr));
}
.todaylist__item { display: flex; min-width: 0 }
/* Ring tiles (Rob, 17 Nov 2026, option B): the section's icon inside a ring
   that fills as far through it as the rep is today, and beside it the number
   over a short label. Compact: about half the height of the stacked tile. */
.todaylist__tile {
  position: relative; display: flex; align-items: center; gap: 12px;
  flex: 1; min-width: 0; padding: 12px 14px;
  border-radius: 12px; background: color-mix(in srgb, var(--tone) 16%, var(--ink));
  color: color-mix(in srgb, var(--on-ink) 80%, transparent);
  transition: background-color .15s ease-out;
}
.todaylist__tile:hover { background: color-mix(in srgb, var(--tone) 26%, var(--ink)) }
.todaylist__tile:focus-visible { outline: 2px solid color-mix(in srgb, var(--tone) 60%, #FFF); outline-offset: 2px }
.todaylist__ring { position: relative; display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px }
/* The ring: a conic fill to --p over a faint track, masked to a 4px band. */
.todaylist__ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(color-mix(in srgb, var(--tone) 70%, #FFF) var(--p, 0%), color-mix(in srgb, var(--on-ink) 14%, transparent) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
}
.todaylist__icon { font-size: 20px; color: color-mix(in srgb, var(--tone) 55%, #FFF) }
.todaylist__text { display: flex; flex-direction: column; min-width: 0 }
.todaylist__n { font-size: 24px; font-weight: var(--weight-strong); letter-spacing: -.02em; line-height: 1; color: var(--on-ink); font-variant-numeric: tabular-nums }
.todaylist__label { margin-top: 4px; font-size: 12.5px; font-weight: 500; line-height: 1.25; text-wrap: balance }
/* Moved or finished: its state as a badge on the ring's top right corner,
   the one thing on the tile that stays bright (amber arrow, green tick). */
.todaylist__state {
  position: absolute; top: -6px; right: -8px; display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%; background: var(--ink);
}
.todaylist__state .ms { font-size: 18px; color: #F5B83D }
.todaylist__state--done .ms { color: color-mix(in srgb, var(--good) 55%, #FFF) }
/* No time for it today, or finished (Rob, 17 Nov 2026): the whole tile fades,
   its wash, ring, number and label, and only the state mark stays bright, so
   the row says at a glance what today still holds. */
:is(.todaylist__item.is-moved, .todaylist__item.is-done) .todaylist__tile { background: color-mix(in srgb, var(--tone) 6%, var(--ink)) }
:is(.todaylist__item.is-moved, .todaylist__item.is-done) .todaylist__tile:hover { background: color-mix(in srgb, var(--tone) 12%, var(--ink)) }
:is(.todaylist__item.is-moved, .todaylist__item.is-done) :is(.todaylist__icon, .todaylist__text),
:is(.todaylist__item.is-moved, .todaylist__item.is-done) .todaylist__ring::before { opacity: .35 }
/* The key, once under the tiles: what the arrow and the tick mean. */
.todaylist__key { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 12px 2px 0; font-size: 12.5px; font-weight: 500; color: color-mix(in srgb, var(--on-ink) 72%, transparent) }
.todaylist__keyitem { display: inline-flex; align-items: center; gap: 6px }
.todaylist__keyitem .ms { font-size: 16px; color: #F5B83D }
.todaylist__keyitem--done .ms { color: color-mix(in srgb, var(--good) 55%, #FFF) }
.todaylist__clear { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px }
.todaylist__clear .ms { font-size: 22px; color: color-mix(in srgb, var(--good) 60%, #FFF) }
/* Setup left for later: no count, so it is one wide tile, and the one that
   is a link (back into setup). */
.todaylist__item--setup { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px }
.todaylist__item--setup .linkbtn { text-align: left; color: var(--on-ink) }
.todaylist__item--setup .linkbtn:hover { color: color-mix(in srgb, var(--teal) 62%, #FFF) }
/* A day with no room left: the sentence and the day drawn as a bar, on the
   agenda's two columns, then what moved as the agenda's own lines. */
.todayfull__head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; align-items: center; padding: 2px 0 16px }
.todayfull__said { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; font-weight: var(--weight-strong); line-height: 1.35; text-wrap: pretty }
.todayfull__said .ms { flex: 0 0 auto; font-size: 20px; color: var(--on-ink) }
.todayfull__day { display: flex; align-items: center; gap: 10px; min-width: 0 }
.todayfull__clock { flex: 0 0 auto; font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--on-ink) 78%, transparent) }
.todayfull__bar { position: relative; flex: 1 1 auto; min-width: 0; height: 12px; border-radius: var(--r-pill); overflow: hidden; background: var(--teal) }
.todayfull__gone { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--ink) 45%, transparent) }
.todayfull__tick { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink) }

/* The day: an hour a row with the half hour dashed, the past hatched, each
   block where it falls, and a red line at now with the time in the gutter. */
.daycal {
  background: var(--card); border: 1px solid rgba(16, 33, 31, .07); border-radius: 16px;
  padding: 26px 32px 32px 20px; box-shadow: 0 1px 2px rgba(16, 33, 31, .04);
  /* The calendar (day and week) keeps Candid's own colours whatever the
     customer's brand: its meeting, prep, notetaker and "Now" marks were
     checked against each other and the section tones, and a brand's main,
     secondary or accent landing here could collapse them. Re-declaring the
     brandable slots pins every rule inside. Keep in step with :root in
     design-system.css. */
  --ink: var(--ink-fixed); --coral: var(--coral-fixed); --teal: var(--teal-fixed);
  --on-ink: #FFFFFF; --on-teal: var(--ink-fixed); --on-coral: var(--ink-fixed);
  --text: var(--ink-fixed);
}
.daycal__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 16px 12px }
.daycal__head h3 { margin: 0 auto 0 0; font-size: 17px; font-weight: var(--weight-strong) }
.daycal__hours { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums }
.daycal__hours .ms { font-size: 17px }
.daycal__views { flex: 0 0 auto }
.daycal__grid { position: relative }
.daycal__lines { position: absolute; inset: 0 }
.daycal__hour { position: absolute; left: 0; right: 0; border-top: 1px solid var(--hair) }
.daycal__hour span {
  position: absolute; left: 0; top: -9px; width: 52px; padding-right: 8px; box-sizing: border-box;
  text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; background: var(--card);
}
/* When a block runs, in the gutter: a bracket from its top edge to its
   bottom one, its arms reaching to the block, the start on the top arm and
   the end on the bottom, so both times sit on the day's scale and the line
   says which block they belong to. Blocks back to back share one time at
   the joint (today.js). Ink still to come, grey once past, the bracket red
   while it is on, as the now line is. The hours stay as faint guides
   across empty stretches only. */
.daycal__at {
  position: absolute; left: -64px; top: 2px; bottom: 2px; width: 60px; pointer-events: none;
  font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums;
}
.daycal__at::before {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 7px;
  border: 1.5px solid color-mix(in srgb, var(--muted) 45%, var(--card)); border-right: 0; border-radius: 4px 0 0 4px;
}
.daycal__atstart, .daycal__atend { position: absolute; right: 12px; background: var(--card); padding: 1px 0 1px 2px }
.daycal__atstart { top: 0; transform: translateY(calc(-50% + var(--dodge, 0px))); font-weight: var(--weight-strong); color: var(--text) }
.daycal__atend { bottom: 0; transform: translateY(calc(50% + var(--dodge, 0px))); font-weight: 500; color: var(--muted) }
/* A free stretch still ahead: a faint dashed slot with how long it is,
   so an empty part of the day reads as time on the calendar. Not a block:
   no fill, no bracket, nothing to click. */
.daycal__gap { box-sizing: border-box; padding-block: 2px; pointer-events: none }
.daycal__gapin {
  display: flex; align-items: center; gap: 8px; height: 100%; box-sizing: border-box; padding: 0 20px;
  border: 1.5px dashed color-mix(in srgb, var(--line) 85%, var(--card)); border-radius: 12px;
  font-size: 12.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums;
}
.daycal__gapin .ms { font-size: 16px }
.daycal__item.is-past .daycal__at::before { border-color: color-mix(in srgb, var(--muted) 22%, var(--card)) }
.daycal__item.is-past .daycal__atstart { font-weight: 500; color: var(--muted) }
.daycal__item.is-now .daycal__at::before { border-color: var(--bad) }
.daycal__item.is-joined .daycal__at { bottom: 0 }
.daycal__item.is-prepped .daycal__at { top: 0 }
.daycal__hour span { color: color-mix(in srgb, var(--muted) 60%, var(--card)); font-size: 11px }
.daycal__half { position: absolute; left: 64px; right: 0; border-top: 1px dashed var(--hair) }
.daycal__past {
  /* A flat grey wash, not hatching: hatching is the rep's own diary, so the
     two must not look alike. */
  position: absolute; top: 0; left: 64px; right: 0;
  background: color-mix(in srgb, var(--page) 70%, transparent); border-radius: 0 0 12px 12px;
}
/* Today opens an hour before now: the morning folds into one row in the
   blocks' column, the past's grey, with when it ran and how much is done.
   The grid under it is pulled up by the folded part and clipped there (the
   clip reaches out at the sides and foot so hover and "now" shadows show),
   with room at the top for the first hour's label. */
.daycal__earlier {
  display: flex; align-items: center; gap: 8px; width: calc(100% - 64px); min-height: 44px; margin: 0 0 14px 64px;
  padding: 0 16px; box-sizing: border-box; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--page); color: var(--muted); font: inherit; font-size: 14px; text-align: left;
  transition: background-color .18s ease, color .18s ease;
}
.daycal__earlier:hover { background: color-mix(in srgb, var(--text) 8%, var(--card)); color: var(--text) }
.daycal__earlier:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px }
.daycal__earlier .ms { font-size: 20px }
.daycal__earlierlabel { font-weight: var(--weight-strong); color: var(--text) }
.daycal__earlierwhen { font-size: 12.5px; font-variant-numeric: tabular-nums }
.daycal__earlierdone { display: inline-flex; align-items: baseline; gap: 4px; margin-left: auto; color: var(--good) }
.daycal__earlierdone .ms { align-self: center; font-size: 17px; font-variation-settings: 'FILL' 1 }
.daycal__earlierdone b { font-size: 15px; font-weight: var(--weight-strong); font-variant-numeric: tabular-nums }
.daycal__earlierdone .figcap { color: inherit }
/* The folded morning to scale: a segment a block in its colour, on a track
   the past's grey; the rep's diary hatched grey, as in the calendar. */
.daycal__strip {
  position: relative; flex: 1 1 auto; min-width: 48px; height: 10px; margin: 0 8px;
  border-radius: 999px; background: color-mix(in srgb, var(--line) 45%, var(--page)); overflow: hidden;
}
.daycal__seg { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: color-mix(in srgb, var(--tone, var(--muted)) 70%, var(--card)) }
.daycal__seg--meeting, .daycal__seg--prep { background: var(--teal) }
.daycal__seg--questions { --tone: var(--text) }
.daycal__seg--busy, .daycal__seg--lunch { background: color-mix(in srgb, var(--muted) 35%, var(--card)) }
.daycal__seg--free { display: none }

/* A client meeting or its prep: the company's logo in the icon's place, a
   touch larger but taking the icon's 18px of row (negative margins), so the
   text starts on the same edge as every other block's. */
.daycal__logo {
  flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; margin: -2px -2px;
  border-radius: 6px; background: var(--card); color: var(--text); font-size: 8.5px; font-weight: var(--weight-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}
.daycal__item.is-past .daycal__logo { opacity: .6 }
.daycal__window { padding-top: 10px; margin-top: -10px }
/* Clipped at the bar whether folded or not, so the day slides out from
   under it as it opens and back under it as it closes. */
.daycal__window { clip-path: inset(0 -32px -32px -32px) }
.daycal__window.is-folded > .daycal__grid { margin-top: calc(-1 * var(--cut)) }
@media (prefers-reduced-motion: reduce) { .daycal__earlier { transition: none } }
.daycal__blocks { list-style: none; margin: 0; padding: 0; position: absolute; top: 0; bottom: 0; left: 64px; right: 0 }
.daycal__item { position: absolute; left: 0; right: 0 }
.daycal__block {
  position: relative;
  display: flex; align-items: center; gap: 16px; height: 100%; box-sizing: border-box; padding: 20px;
  border-radius: var(--r-inner); overflow: hidden; color: var(--text); text-decoration: none; font-size: 14px;
  transition: background-color .18s ease, box-shadow .18s ease;
}
a.daycal__block:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px }
/* Under half an hour: no padding to spare, so the two lines sit close and,
   where the width allows, side by side. */
.daycal__item.is-short .daycal__block { padding-block: 0; row-gap: 0; line-height: 1.25 }
.daycal__item.is-short .daycal__main { gap: 1px }
@media (min-width: 641px) {
  .daycal__item.is-short .daycal__main { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px }
  .daycal__item.is-short .daycal__when { padding-left: 0 }
}
/* The title, and the time under it. */
.daycal__main { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; flex: 1 1 auto; min-width: 0 }
.daycal__top { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; max-width: 100% }
.daycal__top .ms { flex: 0 0 auto; font-size: 18px }
.daycal__title { min-width: 0; font-weight: var(--weight-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
/* How far through, on the right, as one meter the same width on every
   block so they line up down the day: a dial filling in the section's
   colour with what is left in its middle, and beside it what that number
   is ("Left", "Waiting") over how many are done, in green. Finished, the
   dial is full green with a tick; moved, hollow with an arrow, in amber. */
.daycal__progress {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-width: 118px; box-sizing: border-box; padding-left: 4px;
}
.daycal__ring .ring__track { stroke: color-mix(in srgb, var(--tone) 22%, var(--card)) }
.daycal__ring .ring__mid { font-size: 15px; color: var(--text) }
.daycal__ring .ring__mid .ms { font-size: 20px }
.daycal__meterwords { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.2; white-space: nowrap }
.daycal__meterword { font-size: 12.5px; font-weight: 500; color: var(--muted) }
.daycal__meterdone { font-size: 12.5px; font-weight: var(--weight-strong); color: #1F7A4A }
.daycal__meterdone.is-none { font-weight: 500; color: var(--muted) }
.daycal__progress.is-done .ring__mid, .daycal__progress.is-done .daycal__meterword { color: #1F7A4A }
.daycal__progress.is-done .daycal__meterword { font-weight: var(--weight-strong) }
.daycal__progress.is-done .ring__track { stroke: var(--good) }
.daycal__progress.is-moved .ring__mid, .daycal__progress.is-moved .daycal__meterword { color: #A15C07 }
/* Lined up under the title, past the icon. */
.daycal__when {
  flex: 0 1 auto; min-width: 0; max-width: 100%; box-sizing: border-box; padding-left: 26px;
  font-size: 12.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums;
}
/* Slipped since it was first planned today: where it began, in amber. */
.daycal__moved {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0;
  font-size: 12.5px; font-weight: var(--weight-strong); color: #8A5A00; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.daycal__moved .ms { flex: 0 0 auto; font-size: 15px }
/* The calls block the list is likeliest to pick up in: "Best time", in
   green, after its time, so a phone keeps it too. */
.daycal__best {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; vertical-align: bottom;
  font-size: 12.5px; font-weight: var(--weight-strong); color: #1F7A4A; white-space: nowrap;
}
.daycal__best .ms { flex: 0 0 auto; font-size: 15px }
/* Where you are: "Now" in red, as a calendar marks the time; "Next" too. */
.daycal__flag { flex: 0 0 auto; font-size: 12.5px; font-weight: var(--weight-strong); color: var(--bad) }
.daycal__faces { display: flex; align-items: center; flex: 0 0 auto }
.daycal__face {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: var(--r-pill);
  display: grid; place-items: center; font-size: 10px; font-weight: var(--weight-strong);
  background: var(--coral); color: var(--on-coral); box-shadow: 0 0 0 2px var(--card);
}
.daycal__face + .daycal__face { margin-left: -8px }
.daycal__more { margin-left: 6px; font-size: 12px; font-weight: var(--weight-strong); color: var(--muted) }
/* Says the block is the way in; on hover it darkens and the arrow steps on. */
.daycal__open {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  font-size: 13px; font-weight: var(--weight-strong); color: var(--muted); transition: color .18s ease;
}
.daycal__open .ms { font-size: 17px; transition: transform .18s ease }
/* The block keeps its own text colour on hover; the link colour is for links in text. */
a.daycal__block:hover { color: var(--text) }
a.daycal__block--meeting:hover { color: var(--on-ink) }
a.daycal__block:hover .daycal__open { color: var(--text) }
a.daycal__block:hover .daycal__open .ms { transform: translateX(3px) }
.daycal__block--meeting .daycal__open { color: color-mix(in srgb, var(--on-ink) 72%, transparent) }
a.daycal__block--meeting:hover .daycal__open { color: var(--on-ink) }

/* Work: tinted in its section's colour, deeper on hover. */
.daycal__block--work { background: color-mix(in srgb, var(--tone) 13%, var(--card)) }
.daycal__block--work:hover { background: color-mix(in srgb, var(--tone) 24%, var(--card)); box-shadow: var(--shadow-low) }
.daycal__block--work .daycal__top .ms { color: color-mix(in srgb, var(--tone) 72%, var(--ink-fixed)) }
.daycal__block--work .daycal__face { box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 13%, var(--card)) }
.daycal__block--meeting { background: var(--ink); color: var(--on-ink) }
.daycal__block--meeting:hover { background: color-mix(in srgb, var(--ink) 88%, var(--teal)) }
.daycal__block--meeting .daycal__top .ms { color: var(--teal) }
.daycal__block--meeting .daycal__when { color: color-mix(in srgb, var(--on-ink) 72%, transparent) }
.daycal__block--meeting .daycal__flag { color: var(--coral) }
.daycal__block--meeting .daycal__face { box-shadow: 0 0 0 2px var(--ink) }
/* Time to read a meeting's prep, just before it: the accent's tint, and
   "Ready" in green once it is written. */
.daycal__block--prep { background: color-mix(in srgb, var(--teal) 12%, var(--card)) }
.daycal__block--prep:hover { background: color-mix(in srgb, var(--teal) 22%, var(--card)) }
.daycal__block--prep .daycal__top .ms { color: color-mix(in srgb, var(--teal) 62%, var(--ink-fixed)) }
.daycal__item.is-past .daycal__block--prep { background: var(--page) }.daycal__ready {
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  font-size: 13px; font-weight: var(--weight-strong); color: #1F7A4A; white-space: nowrap;
}
.daycal__ready .ms { font-size: 17px }
.daycal__ready.is-wait { color: var(--muted) }
@media (prefers-reduced-motion: no-preference) {
  .daycal__ready.is-wait .ms { animation: cdSpin 1s linear infinite }
}
/* What kind of entry it is, beside the title: a video call, in a quiet word. */
.daycal__kind {
  flex: 0 0 auto; font-size: 12.5px; font-weight: 500; white-space: nowrap;
  color: color-mix(in srgb, var(--on-ink) 70%, transparent);
}
/* Candid's notetaker in the call: a face beside the client's, the accent
   disc with a sound wave, and a red dot that pulses while it waits to join. */
.daycal__notes {
  margin-right: 10px; font-size: 13px; font-weight: var(--weight-strong); white-space: nowrap;
  color: color-mix(in srgb, var(--on-ink) 88%, transparent);
}
.daycal__face--bot {
  position: relative; width: 30px; height: 30px; flex-basis: 30px;
  background: var(--teal); color: var(--on-teal);
}
.daycal__face--bot .ms { font-size: 18px }
.daycal__botdot {
  position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--coral); box-shadow: 0 0 0 2px var(--ink);
}
@media (prefers-reduced-motion: no-preference) {
  .daycal__botdot { animation: cdPulse 1.6s ease-in-out infinite }
}
/* On a light work block (the calls), the words and the dot's ring take the
   block's own colours, and the face stands a little apart from the people. */
.daycal__block--work .daycal__notes { color: var(--text) }
.daycal__block--work .daycal__botdot { box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 13%, var(--card)) }
.daycal__block--work .daycal__face--bot { margin-left: 8px }
/* Where a diary entry came from: the rep's own calendar. */
.daycal__source { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle }
.daycal__source .ms { font-size: 15px }
/* Someone in the CRM: "Client" before who it is with, in the accent. */
.daycal__client { font-weight: var(--weight-strong); color: var(--teal) }
/* Over, the block greys and the accent no longer reads on it. */
.daycal__item.is-past .daycal__client { color: color-mix(in srgb, var(--on-ink) 85%, transparent) }
/* What the notetaker is doing, on the right: its wave and a word or two
   (the wave's states are in drawer-type-scale.css, "Auto notes"). */
.daycal__bot {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  font-size: 13px; font-weight: var(--weight-strong); white-space: nowrap;
}
/* On a phone who a meeting or its prep is with matters more than when it
   ends: the time keeps its start, the arrow goes (the block is the way in),
   and what sat beside the title moves so the title and the name get the width.
   A prep's Ready or Writing goes beside the time; a meeting's notetaker goes
   beside its title, and who it is with gets two lines. */
@media (max-width: 640px) {
  .daycal__end, .daycal__open { display: none }
  .daycal .daycal__block--meeting, .daycal .daycal__block--prep {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center;
    column-gap: 10px; row-gap: 3px; padding-block: 10px;
  }
  .daycal__block--meeting .daycal__main, .daycal__block--prep .daycal__main { display: contents }
  .daycal__block--meeting .daycal__top { grid-column: 1 / -1; grid-row: 1 }
  /* The notes marker sits beside who it is with, so the company has the
     title line's whole width. */
  .daycal__block--meeting .daycal__bot { grid-column: 2; grid-row: 2; font-size: 12.5px; gap: 5px }
  /* The notetaker's face says it; its sentence has no room and ran over the title. */
  .daycal__block--meeting .daycal__notes { display: none }
  .daycal__block--meeting .daycal__when {
    grid-column: 1; grid-row: 2;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal;
  }
  .daycal__item.is-short .daycal__block--meeting .daycal__when { -webkit-line-clamp: 1; line-clamp: 1 }
  .daycal__block--prep .daycal__top { grid-column: 1 / -1; grid-row: 1 }
  .daycal__block--prep .daycal__when { grid-column: 1; grid-row: 2 }
  .daycal__block--prep .daycal__ready { grid-column: 2; grid-row: 2; font-size: 12.5px }
  .daycal__block--prep .daycal__ready .ms { font-size: 15px }
  /* No room on a phone for the company and the meeting's own title: the
     company stays (the block's label still names the meeting). */
  .daycal__block--meeting .daycal__kind.is-mtitle { display: none }
  /* The strip says the morning's shape; its hours give way to it. */
  .daycal__earlierwhen { display: none }
}
.daycal__block--lunch { color: var(--muted); background: var(--page); border: 1px dashed var(--line) }
/* Finished for the day: green, with a tick in place of the section's icon. */
.daycal__block--done { background: color-mix(in srgb, var(--good) 13%, var(--card)) }
.daycal__block--done:hover { background: color-mix(in srgb, var(--good) 22%, var(--card)) }
.daycal__block--done .daycal__top .ms { color: var(--good); font-variation-settings: 'FILL' 1 }
.daycal__block--done .daycal__title { color: color-mix(in srgb, var(--text) 75%, transparent) }
.daycal__alldone { flex: 0 0 auto; font-size: 13px; font-weight: var(--weight-strong); color: #1F7A4A; white-space: nowrap }
.daycal__block--lunch .daycal__title { font-weight: 500 }
/* The rest of the diary: grey and quiet, there to plan around, not to open. */
.daycal__block--busy { color: color-mix(in srgb, var(--text) 78%, var(--muted)); background: color-mix(in srgb, var(--muted) 14%, var(--card)) }
.daycal__block--busy .daycal__title { font-weight: 500 }
.daycal__block--busy .daycal__top .ms { color: var(--muted) }
.daycal__item.is-past .daycal__block--busy { background: var(--page) }
/* A diary entry is a button: a click offers to ignore it. */
button.daycal__block { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer }
button.daycal__block:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px }
.daycal__item:hover > button.daycal__block--busy { background: color-mix(in srgb, var(--muted) 22%, var(--card)) }
/* With a mouse or trackpad, hovering an entry or tabbing into it brings up its
   choices on the block itself. They sit on the block's hover colour, so a long
   title stops at them. any-hover, not hover: a touchscreen laptop reports touch
   as its main input but has a trackpad too. With touch alone the block's tap
   opens the menu. */
.daycal__acts { display: none }
@media (any-hover: hover) {
  .daycal__acts {
    position: absolute; top: 3px; bottom: 3px; right: 1px;
    display: flex; align-items: center; gap: 8px; padding-inline: 16px 8px;
    border-radius: 0 12px 12px 0;
    background: color-mix(in srgb, var(--muted) 22%, var(--card));
    opacity: 0; pointer-events: none; transition: opacity .12s ease-out;
  }
  .daycal__item:hover > .daycal__acts, .daycal__item:focus-within > .daycal__acts { opacity: 1; pointer-events: auto }
  /* A week's column can't hold them in a row: they float, stacked, under the
     entry's title and over whatever is below, the last column's opening left. */
  .weekcal .daycal__acts {
    top: 28px; bottom: auto; left: 4px; right: auto;
    flex-direction: column; align-items: stretch; gap: 6px;
    width: max-content; min-width: calc(100% - 8px); padding: 6px;
    border-radius: 12px; background: var(--card); box-shadow: var(--shadow-top);
  }
  .weekcal__col:last-child .daycal__acts { left: auto; right: 4px }
  .weekcal__item:is(:hover, :focus-within) { z-index: 3 }
}
@media (prefers-reduced-motion: reduce) { .daycal__acts { transition: none } }
.daycal__act { white-space: nowrap }
/* An ignored entry keeps a narrow lane on the right, dashed and faded,
   and the work now in its time narrows beside it, as a calendar draws two
   events side by side. */
.daycal__item.is-free { left: calc(70% + 6px) }
.daycal__item.is-beside { right: 30% }
/* Narrowed, a block keeps its title: the note and the arrow give up the room. */
.daycal__item.is-beside :is(.daycal__notes, .daycal__open) { display: none }
/* On a phone, both sides need the room for their names: the counts and faces
   go from the block, and the icon from the lane, whose label may wrap. */
@media (max-width: 640px) {
  .daycal__item.is-free { left: calc(64% + 4px) }
  .daycal__item.is-beside { right: 36% }
  .daycal__item.is-beside :is(.daycal__progress, .daycal__faces, .daycal__flag) { display: none }
  .daycal__item.is-free .daycal__block--free { padding-inline: 8px }
  .daycal__item.is-free :is(.daycal__top, .daycal__source) .ms { display: none }
  .daycal__item.is-free .daycal__when { white-space: normal }
  .daycal__item.is-free .daycal__source { display: flex; white-space: normal; line-height: 1.25 }
}
/* A week's columns are narrow: the lane takes more of one. */
.weekcal__item.is-free { left: calc(55% + 3px) }
.weekcal__item.is-beside { right: 45% }
.daycal__block--free { gap: 8px; padding-inline: 12px; color: var(--muted); background: var(--card); border: 1px dashed var(--line) }
button.daycal__block--free { border: 1px dashed var(--line) }
button.daycal__block--free:hover { background: var(--page); color: var(--text) }
.daycal__block--free .daycal__title { font-weight: 500 }
.daycal__block--free .daycal__top .ms { color: var(--muted) }
/* Its lane is narrow and its place says when: under the title, only the label. */
.daycal__block--free .daycal__when { font-size: 0 }
.daycal__block--free .daycal__source { font-size: 12.5px; white-space: nowrap }
.daycal__item.is-free.is-short .daycal__when { display: none }

/* Gone by: there to see, drained of colour. */
.daycal__item.is-past .daycal__block--work { background: var(--page) }
.daycal__item.is-past .daycal__block--meeting { background: color-mix(in srgb, var(--ink) 60%, var(--page)) }
.daycal__item.is-past .daycal__block--work .daycal__title { color: var(--muted) }
.daycal__item.is-now { z-index: 1 }
.daycal__item.is-now .daycal__block--work { box-shadow: 0 0 0 2px var(--tone) }
.daycal__item.is-now .daycal__block--meeting { box-shadow: 0 0 0 2px var(--teal) }
/* The now line starts at the blocks' bracket line (11px left of them), so
   the pill's right edge meets the brackets' edge. */
.daycal__now { position: absolute; left: 53px; right: 0; height: 2px; margin-top: -1px; background: var(--bad); z-index: 2; pointer-events: none }
/* The time now: a solid red pill at the start of the now line, the line
   running straight out of it, as Google and Notion Calendar mark it. Its
   fill covers the blocks' brackets under it, so it never reads as one of
   their times; a block's time near now steps clear of it (today.js). */
.daycal__now span {
  position: absolute; right: 100%; top: 50%; transform: translateY(-50%);
  padding: 3px 7px; border-radius: var(--r-pill); background: var(--bad); color: #FFF;
  box-shadow: var(--shadow-top);
  font-size: 11.5px; font-weight: var(--weight-strong); line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) { .daycal__block, .daycal__open, .daycal__open .ms { transition: none } }

/* The week: a column a working day beside the hour gutter, each day's
   blocks in the day's colours and at its scale, as Clockwise and
   Teams lay out a work week. Work that is expected rather than already
   known (a day's usual replies) is outlined in its colour, dashed, as
   Clockwise draws a block it has only proposed. */
.weekcal { --head: 58px }
.weekcal__legend { display: inline-flex; align-items: center; gap: 14px; font-size: 12.5px; font-weight: 500; color: var(--muted) }
.weekcal__key { display: inline-flex; align-items: center; gap: 6px }
.weekcal__swatch { width: 14px; height: 10px; box-sizing: border-box; border-radius: 3px; background: color-mix(in srgb, var(--muted) 30%, var(--card)) }
.weekcal__swatch.is-expected { background: none; border: 1.5px dashed color-mix(in srgb, var(--muted) 75%, transparent) }
.weekcal__grid { position: relative; display: grid; grid-template-columns: 52px repeat(var(--days), minmax(0, 1fr)); column-gap: 6px }
.weekcal__lines { position: absolute; left: 0; right: 0; top: var(--head); height: var(--colh) }
.weekcal .daycal__half { left: 58px }
.weekcal__col { min-width: 0 }
.weekcal__dayhead {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--head); box-sizing: border-box; padding-bottom: 12px; margin: 0; font-weight: 400;
}
.weekcal__wd { font-size: 12.5px; font-weight: 500; color: var(--muted) }
.weekcal__date {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: var(--r-pill);
  font-size: 17px; font-weight: var(--weight-strong); font-variant-numeric: tabular-nums;
}
.weekcal__col.is-today .weekcal__wd { color: var(--text) }
.weekcal__col.is-today .weekcal__date { background: var(--ink); color: var(--on-ink) }
.weekcal__body { position: relative; height: var(--colh) }
/* The weekend between two columns: a firmer rule than the hour lines. */
.weekcal__col.is-gap .weekcal__body::before { content: ""; position: absolute; top: 0; bottom: 0; left: -4px; border-left: 2px solid var(--line) }
.weekcal__day { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0 }
.weekcal__item { top: var(--top); height: var(--h) }
.weekcal__past {
  /* Flat, as the day's past is: hatching is the rep's own diary. */
  position: absolute; top: 0; left: 0; right: 0;
  background: color-mix(in srgb, var(--page) 70%, transparent);
}
.weekcal__now { position: absolute; left: 0; right: 0; height: 2px; margin-top: -1px; background: var(--bad); z-index: 2; pointer-events: none }
.weekcal__now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--bad) }
.weekcal .weekcal__block.daycal__block {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
  padding: 5px 8px; border-radius: 8px; font-size: 12.5px; line-height: 1.3;
}
.weekcal .weekcal__item.is-short .weekcal__block { padding-block: 0; justify-content: center }
.weekcal__top { display: flex; align-items: center; gap: 5px; min-width: 0 }
.weekcal__top .ms { flex: 0 0 auto; font-size: 14px }
/* The logo at the week's icon size, holding the icon's 14px of row. */
.weekcal__top .daycal__logo { width: 16px; height: 16px; margin: -1px; border-radius: 4px; font-size: 6.5px }
.weekcal__title { flex: 1 1 auto; min-width: 0; font-weight: var(--weight-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.daycal__block--busy .weekcal__title, .daycal__block--lunch .weekcal__title { font-weight: 500 }
.weekcal__n { flex: 0 0 auto; font-weight: var(--weight-strong); font-variant-numeric: tabular-nums }
.weekcal__when { display: none; margin-top: 2px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums }
.weekcal__item.is-tall .weekcal__when { display: block }
.weekcal .weekcal__block.is-expected { background: var(--card); border: 1.5px dashed color-mix(in srgb, var(--tone) 65%, var(--card)) }
.weekcal .weekcal__block.is-expected:hover { background: color-mix(in srgb, var(--tone) 8%, var(--card)); box-shadow: none }

/* On a phone the days stack, each a list of its blocks with the time first. */
@media (max-width: 760px) {
  .weekcal__grid { display: block }
  .weekcal__lines, .weekcal__gutter, .weekcal__past, .weekcal__now, .weekcal__col.is-gap .weekcal__body::before { display: none }
  .weekcal__col + .weekcal__col { margin-top: 20px }
  .weekcal__dayhead { justify-content: flex-start; height: auto; padding: 0 0 8px 8px }
  .weekcal__body { height: auto }
  .weekcal__day { position: static; display: grid; gap: 4px }
  .weekcal__item { position: static; height: auto }
  .weekcal .daycal__acts { display: none }
  .weekcal .weekcal__block.daycal__block { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; font-size: 13.5px }
  .weekcal .weekcal__item.is-short .weekcal__block { padding-block: 8px }
  .weekcal__when, .weekcal__item.is-tall .weekcal__when { display: block; order: -1; flex: 0 0 40px; margin: 0 }
  .weekcal__top { flex: 1 1 auto }
}

@media (max-width: 760px) {
  .todaylist { padding: 18px 16px 16px }
  .todaylist h2 { margin: 0 2px 10px; font-size: 16px }
  .todaylist__items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px }
  .todayfull__head { grid-template-columns: minmax(0, 1fr); row-gap: 12px; padding: 0 2px 12px }
  .todaylist__tile { gap: 10px; padding: 10px 12px }
  .todaylist__ring { flex-basis: 38px; width: 38px; height: 38px }
  .todaylist__icon { font-size: 18px }
  .todaylist__n { font-size: 22px }
  .daycal { padding: 18px 16px 20px 6px }
  .daycal__head { margin: 0 0 16px 8px; flex-wrap: wrap }
  .daycal__hour span, .daycal__now span { width: 44px; font-size: 11.5px }
  .daycal__at { left: -50px; width: 47px; font-size: 11px }
  .daycal__at::before { width: 5px }
  .daycal__atstart, .daycal__atend { right: 9px }
  .daycal__half, .daycal__past, .daycal__blocks { left: 50px }
  .daycal__now { left: 42px }
  .daycal__earlier { width: calc(100% - 50px); margin-left: 50px; padding: 0 12px }
  .daycal__now span { width: auto; font-size: 11px; padding: 2px 5px }
  .daycal__block { padding: 12px; gap: 8px; font-size: 13px }
  /* Room for the title on a phone: the meter takes only its own width and
     its dial shrinks, its words kept (a figure always has its label); the
     word "Open" goes, the arrow still says the block opens. */
  .daycal__moved { display: none }
  .daycal__progress { min-width: 0; gap: 6px; padding-left: 0 }
  .daycal .daycal__ring { width: 32px; height: 32px }
  .daycal__ring .ring__mid { font-size: 13px }
  .daycal__open { font-size: 0; gap: 0 }
  .daycal__faces { display: none }
  /* Calls are always written up; a phone has no room to say so on every
     block of them, so only a meeting's marker (which can be off) stays. */
  .daycal__block--work .daycal__bot { display: none }
}

/* "This week": a line per kind of activity across seven days. The key is a
   row of chips that both name the lines and read out their numbers; the plot
   under it carries the gridlines, the lines, a dot per day and a tall button
   per day that the pointer, a finger or the keyboard lands on. */
.wchart { min-width: 0 }
/* The key is plain type on the panel: a line sample and a name, the figure
   under it, and space between. No boxes; the lines carry the colour. */
.wchart__key { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 40px }
.wchart__when { font-size: 13px; font-weight: var(--weight-strong); color: var(--muted) }
.wchart__chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 44px;
  padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: opacity .16s ease;
}
.wchart__chip:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 6px }
.wchart__name { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--muted) }
.wchart__chip:hover .wchart__name { color: var(--text) }
.wchart__swatch { width: 14px; height: 3px; border-radius: 2px; background: var(--tone); flex: 0 0 auto }
.wchart__name .ms { font-size: 17px; flex: 0 0 auto }
.wchart__label { white-space: nowrap }
.wchart__n { font-size: 24px; font-weight: var(--weight-strong); letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums }
/* Off: the figure stays, faded, and the sample goes grey, so it can be brought back. */
.wchart__chip[aria-pressed="false"] { opacity: .4 }
.wchart__chip[aria-pressed="false"] .wchart__swatch { background: var(--muted) }

.wchart__plot { position: relative; height: 220px; margin: 48px 0 0 36px }
.wchart__grid { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line) }
.wchart__grid span {
  position: absolute; right: calc(100% + 10px); top: -8px; font-size: 12.5px; font-weight: 500; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.wchart__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible }
.wchart__line {
  fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round;
  animation: wchart-in .5s cubic-bezier(.16, 1, .3, 1) both;
}
/* Meetings are what the rest of the week is for, so that line is the heaviest. */
.wchart__line--key { stroke-width: 3.25 }
.wchart__dot {
  position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--tone); box-sizing: border-box; pointer-events: none;
  animation: wchart-in .5s cubic-bezier(.16, 1, .3, 1) both;
}
.wchart__cols { position: absolute; inset: -12px 0 -8px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) }
.wchart__col {
  position: relative; border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: 10px;
}
.wchart__col--today { background: color-mix(in srgb, var(--teal) 7%, transparent) }
/* The day under the pointer: a guide down its middle. */
.wchart__col::after {
  content: ""; position: absolute; top: 12px; bottom: 8px; left: 50%; width: 1px;
  background: var(--text); opacity: 0; transition: opacity .12s ease;
}
.wchart__col.is-on::after { opacity: .35 }
.wchart__col:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px }
.wchart__days {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 14px 0 0 36px;
  font-size: 12.5px; font-weight: 500; color: var(--muted); text-align: center;
}
.wchart__today { font-size: 13px; color: var(--text); font-weight: var(--weight-strong) }
/* Nothing this week: the key is a static legend, the floor is solid so the
   chart reads as flat, and the state is named in the middle of the plot. */
.wchart--quiet .wchart__chip { cursor: default }
.wchart--quiet .wchart__chip .wchart__n { color: var(--muted) }
.wchart--quiet .wchart__grid:nth-child(3) { border-top-style: solid; border-top-color: var(--muted) }
.wchart__empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: var(--weight-strong); color: var(--muted); pointer-events: none;
}
.wchart__empty .ms { font-size: 20px }
@keyframes wchart-in { from { opacity: 0 } }
@media (prefers-reduced-motion: reduce) {
  .wchart__line, .wchart__dot { animation: none }
}
