/* ============================================================================
   INSTRUMENT — V2 HOME page styles · ProfitPlus Command Center
   Requires v2/tokens.css + v2/base.css. Consumed only by v2/home.js.

   ---------------------------------------------------------------------------
   RULES THIS FILE OBEYS (lint gate, DESIGN_SYSTEM.md)
   ---------------------------------------------------------------------------
   . ZERO literal font-size / font-weight / border-radius values -- tokens only.
   . ZERO hex colours. Every colour is var(--v2-*).
   . Every selector is scoped under .v2-home, so nothing here can reach a V1 view
     (V1 Home stays pixel-identical while the cutover flag is off).
   . Every transition names its properties -- never the `all` keyword.
   . Mobile-first. Desk refinements live in ONE block at the bottom (761px+).
   . Nothing animates width/height/layout; only colour, opacity, transform,
     box-shadow. No overshoot, no replayed entry animations (v640 discipline).
   ============================================================================ */

/* ============================================================================
   PAGE SHELL — a single vertical stack of instruments inside the V1 #content.
   ============================================================================ */
.v2-home {
  /* SECTION RHYTHM — three steps on the 4px grid, derived from tokens so the
     cadence survives a density change. 12 = inside a group (title -> its list),
     20 = between sections, 28 = between ZONES (work above, money below). */
  --v2h-gap-tight: var(--v2-space-3);                              /* 12 */
  --v2h-gap:       calc(var(--v2-space-4) + var(--v2-space-1));    /* 20 */
  --v2h-gap-loose: calc(var(--v2-space-5) + var(--v2-space-1));    /* 28 */
  /* Scroll distance over which the large title condenses (iOS uses ~52-76px). */
  --v2h-title-range: calc(var(--v2-space-7) + var(--v2-space-5));  /* 72 */

  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--v2h-gap);
  padding-bottom: calc(var(--v2-space-5) + var(--v2-sab));
  font-family: var(--v2-font);
  font-size: var(--v2-fs-body);
  line-height: var(--v2-lh-body);
  letter-spacing: var(--v2-tr-body);
  font-weight: var(--v2-fw-normal);
  font-feature-settings: var(--v2-font-features);
  color: var(--v2-text);
  -webkit-tap-highlight-color: transparent;
}

.v2-home h2 { margin: 0; }

/* --flush means padding 0 at EVERY width. base.css re-declares
   `.v2-card { padding: var(--v2-card-pad) }` inside its >=721px block, which at
   equal specificity and later source order silently re-pads every flush card on
   desktop: the gauge rail stops reaching its own edges (segments float in a
   16px moat) and the engraved lists pick up a second inset their rows already
   carry. Corrected here at (0,2,0) rather than by editing base.css. */
.v2-home .v2-card--flush { padding: 0; }

/* Section heads: engraved labels, never headlines. */
.v2-home .v2h-hd-meta {
  font-size: var(--v2-fs-micro);
  line-height: var(--v2-lh-micro);
  letter-spacing: var(--v2-tr-micro);
  font-weight: var(--v2-fw-medium);
  color: var(--v2-text-3);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--v2-font-features-num);
  white-space: nowrap;
}

/* ============================================================================
   1. HEADER — the LARGE TITLE (iOS playbook #9, lite). The needle button is the
   ONE red fill on the page (admin only).

   ---------------------------------------------------------------------------
   WHY THIS HEADER IS NOT position:sticky
   ---------------------------------------------------------------------------
   The app shell already owns the sticky title slot: #mainhead is
   `position:sticky; top:0; z-index:90` with a glass + backdrop-blur background
   (index.html 4477) and on Home it renders the "Home" crumb (js/app.js 1169).
   A SECOND sticky bar at top:0 either hides behind that glass (lower z-index) or
   covers the crumb + bell (higher z-index); parking it below the crumb needs the
   crumb's height, which is variable per module and exposed as no CSS var. So the
   playbook's shell half is already shipped — the crumb IS the collapsed title —
   and this header supplies the other half: a large title that CONDENSES on scroll
   and hands off to it. Compositor-only (transform + opacity, no height, no JS
   scroll listener), driven by `animation-timeline: scroll()`, and it degrades to
   a plain large title where that isn't supported.
   ============================================================================ */
.v2-home .v2h-head {
  display: flex;
  align-items: center;
  gap: var(--v2-space-3);
  min-height: var(--v2-row-h);
  /* The title belongs to the section under it: 20 - 8 = the tight 12 step. */
  margin-bottom: calc(var(--v2h-gap-tight) - var(--v2h-gap));
}

.v2-home .v2h-head-tx {
  flex: 1 1 auto;
  min-width: 0;
  /* Real iOS titles shrink toward the top-left corner, never the centre. */
  transform-origin: left center;
}

.v2-home .v2h-greet {
  font-size: var(--v2-fs-xl);
  line-height: var(--v2-lh-xl);
  letter-spacing: var(--v2-tr-xl);
  font-weight: var(--v2-fw-semi);
  color: var(--v2-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-home .v2h-date {
  font-size: var(--v2-fs-small);
  line-height: var(--v2-lh-small);
  letter-spacing: var(--v2-tr-small);
  color: var(--v2-text-3);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--v2-font-features-num);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* On a phone the large title owns the row, so the needle button drops its label
   and becomes a square icon target (its title attribute keeps the accessible
   name). The label comes back at desk width, where there is room for both. */
.v2-home .v2h-pp {
  flex: 0 0 auto;
  min-width: var(--v2-ctl-h);
  padding: 0 var(--v2-space-2);
}

.v2-home .v2h-pp span { display: none; }

/* The condense itself. Scroll-driven, so it runs on the compositor and cannot
   be the thing that janks a scroll. No JS listener anywhere. */
@supports (animation-timeline: scroll()) {
  .v2-home .v2h-head-tx {
    animation: v2h-title-condense linear both;
    animation-timeline: scroll(nearest);
    animation-range: 0 var(--v2h-title-range);
  }

  /* The date leaves FIRST and faster — a collapsing large title sheds its
     subtitle before it finishes shrinking, otherwise the two read as one blur. */
  .v2-home .v2h-date {
    animation: v2h-title-fade linear both;
    animation-timeline: scroll(nearest);
    animation-range: 0 calc(var(--v2h-title-range) * 0.6);
  }
}

/* 20px x .85 lands on 17 = --v2-fs-lg: the collapsed title is a real type step,
   not an arbitrary scale. */
@keyframes v2h-title-condense { to { transform: scale(.85); } }
@keyframes v2h-title-fade { to { opacity: 0; } }

/* ============================================================================
   2-3 / 6. ROWS — the engraved list. Two lines of text, so the row runs at
   --v2-row-h-tall; everything else is inherited from .v2-row in base.css.
   ============================================================================ */
.v2-home .v2h-rows { display: flex; flex-direction: column; }

/* Inside a --flush card the list carries the inset instead of the card. */
.v2-home .v2h-rows--flush { padding: var(--v2-space-1); }

/* Alignment law: the engraved section label and the row's status dot sit on the
   SAME left edge. A row already carries --v2-row-pad-x of its own, so inside a
   padded (non-flush) card the list is pulled back by exactly that much --
   otherwise the label and the data read as two different columns. */
.v2-home .v2-card:not(.v2-card--flush) .v2h-rows {
  margin-left: calc(var(--v2-row-pad-x) * -1);
  margin-right: calc(var(--v2-row-pad-x) * -1);
}

.v2-home .v2h-row {
  min-height: var(--v2-row-h-tall);
  padding-top: var(--v2-space-1);
  padding-bottom: var(--v2-space-1);
  transition:
    background-color var(--v2-dur-1) var(--v2-ease),
    color var(--v2-dur-1) var(--v2-ease),
    box-shadow var(--v2-dur-1) var(--v2-ease),
    transform var(--v2-dur-1) var(--v2-ease);
}

/* PRESS. There is no Vibration API in WebKit, so the scale + tint IS the haptic.
   :active fires on a <div> too, so read-only rows must be excluded by name --
   a streak row that flinches when you touch it is lying about being tappable. */
.v2-home .v2h-row:not(.v2h-row--static):active {
  transform: scale(.995);
  background: var(--v2-surface-2);
}

/* Status dot -- one lightness plane, no status shouts. */
.v2-home .v2h-dot {
  flex: 0 0 auto;
  width: var(--v2-space-2);
  height: var(--v2-space-2);
  border-radius: var(--v2-r-pill);
  background: var(--v2-text-4);
}

.v2-home .v2h-dot--neutral { background: var(--v2-text-4); }
.v2-home .v2h-dot--green   { background: var(--v2-green); }
.v2-home .v2h-dot--amber   { background: var(--v2-amber); }
.v2-home .v2h-dot--blue    { background: var(--v2-blue); }
.v2-home .v2h-dot--violet  { background: var(--v2-violet); }
.v2-home .v2h-dot--slate   { background: var(--v2-slate); }
/* The needle: live / critical only. */
.v2-home .v2h-dot--needle  { background: var(--v2-accent); box-shadow: 0 0 0 var(--v2-space-1) var(--v2-accent-softer); }
.v2-home .v2h-dot--off     { background: transparent; box-shadow: inset 0 0 0 var(--v2-hairline-w) var(--v2-hairline-strong); }

/* Trailing readout. */
.v2-home .v2h-count {
  font-size: var(--v2-fs-body);
  line-height: var(--v2-lh-body);
  font-weight: var(--v2-fw-semi);
  color: var(--v2-text-2);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--v2-font-features-num);
  min-width: 2ch;
  text-align: right;
}

.v2-home .v2h-chev { display: inline-flex; align-items: center; color: var(--v2-text-4); }
.v2-home .v2h-chev svg { width: var(--v2-icon-md); height: var(--v2-icon-md); }

/* Risk-reason chips sit under the client name. */
.v2-home .v2h-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--v2-space-1);
  margin-top: var(--v2-space-0);
}

/* EMPTY STATE. RUN 2: My day / week-log / all-widgets-hidden now render the
   global `.g-empty` primitive (icon + title + message — see the LIQUID GLASS
   SKIN section at the end of this file for its Home-specific spacing), so the
   old bare `.v2h-empty` quiet-line rule that used to live here is gone —
   nothing in v2/home.js emits that class any more. */

/* "View all N ..." footer -- a hairline-separated quiet control. */
.v2-home .v2h-more {
  display: block;
  width: 100%;
  min-height: var(--v2-row-h);
  padding: 0 var(--v2-card-pad);
  border: 0;
  background: transparent;
  color: var(--v2-text-2);
  font-family: var(--v2-font);
  font-size: var(--v2-fs-small);
  line-height: var(--v2-lh-small);
  letter-spacing: var(--v2-tr-small);
  font-weight: var(--v2-fw-medium);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 var(--v2-hairline);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition:
    color var(--v2-dur-1) var(--v2-ease),
    background-color var(--v2-dur-1) var(--v2-ease),
    transform var(--v2-dur-1) var(--v2-ease);
}

.v2-home .v2h-more:active { background: var(--v2-surface-2); transform: scale(.995); }

/* ============================================================================
   4. AGENCY GAUGES — ONE milled instrument cluster, not six boxes.

   The CARD is the rail (--v2-card + e1 + r-12, from .v2-card--flush) and each
   gauge is a SEGMENT engraved into it by a hairline — the same "engraving, not
   stacking" law the row lists follow. Six separate cards meant six rings, six
   shadows and six gaps of dead canvas: chrome competing with the numbers.
   One rail = one edge, and the eye reads the six readouts as one instrument.

   Each segment is a three-line readout: micro-caps label / tabular metric at
   --v2-fs-metric on the tight metric leading / unit-and-context line under it.
   ============================================================================ */
.v2-home .v2h-gauges {
  /* Money is its own zone — the loose 28 step separates it from the work above. */
  margin-top: calc(var(--v2h-gap-loose) - var(--v2h-gap));
}

.v2-home .v2h-gauge-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  /* Snap to the segment EDGE so a half-read number can never sit at the bezel. */
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;   /* momentum, and it stays inside the rail */
  scrollbar-width: none;
}

.v2-home .v2h-gauge-track::-webkit-scrollbar { display: none; }

.v2-home .v2h-gauge {
  scroll-snap-align: start;
  flex: 0 0 auto;
  /* Just under half: the third segment's hairline peeks at the right edge, which
     is the whole "there is more, swipe me" affordance. No arrows, no fades. */
  min-width: 48%;
  display: flex;
  flex-direction: column;
  gap: var(--v2-space-0);
  align-items: stretch;
  text-align: left;
  /* Horizontal inset matches --v2-card-pad, so every gauge label lands on the
     same left edge as the rail's own engraved header. */
  padding: var(--v2-card-pad-tight) var(--v2-card-pad);
  border: 0;
  background: transparent;
  color: var(--v2-text);
  font-family: var(--v2-font);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: background-color var(--v2-dur-1) var(--v2-ease), transform var(--v2-dur-1) var(--v2-ease);
}

/* THE ENGRAVING — a hairline BETWEEN segments, never around them. Redeclared per
   breakpoint below because a wrapped row needs its separator on top instead. */
.v2-home .v2h-gauge-track > .v2h-gauge { box-shadow: inset 1px 0 0 var(--v2-hairline); }
.v2-home .v2h-gauge-track > .v2h-gauge:first-child { box-shadow: none; }

.v2-home .v2h-gauge:active { transform: scale(.98); background: var(--v2-surface-2); }

/* The readout. --v2-fs-metric + --v2-lh-metric (1.15) inherited from
   .v2-stat-value: nothing here overrides the metric step back down. */
.v2-home .v2h-gauge-v {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Colour is DATA. A value only leaves the ink ramp when the number itself is the
   news, and then only on the one-lightness status plane (--v2-green / --v2-amber
   at L .53 light, L .78 dark) or on the needle for genuinely critical. */
.v2-home .v2h-gauge-v.is-good { color: var(--v2-green); }
.v2-home .v2h-gauge-v.is-warn { color: var(--v2-amber); }
.v2-home .v2h-gauge-v.is-crit { color: var(--v2-accent); }

/* The unit / context line under the metric. */
.v2-home .v2h-gauge .v2-stat-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================================
   5. CLOCK — one compact row. The live ids (timerElapsed / clockHoursDay /
   clockHoursWeek) are patched in place by TimeTrack.tick(); nothing here may
   reflow when a digit changes, hence tabular figures + fixed dot.
   ============================================================================ */
.v2-home .v2h-clock-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--v2-space-2) var(--v2-space-3);
}

.v2-home .v2h-clock-state {
  flex: 1 1 55%;
  min-width: 0;
  font-size: var(--v2-fs-body);
  line-height: var(--v2-lh-body);
  letter-spacing: var(--v2-tr-body);
  color: var(--v2-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-home .v2h-tick {
  color: var(--v2-text);
  font-weight: var(--v2-fw-semi);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--v2-font-features-num);
}

.v2-home .v2h-clock-figs {
  display: flex;
  gap: var(--v2-space-4);
  flex: 0 0 auto;
  margin-left: auto;
}

.v2-home .v2h-clock-figs .v2-stat-value {
  font-size: var(--v2-fs-md);
  line-height: var(--v2-lh-md);
  letter-spacing: var(--v2-tr-md);
}

.v2-home .v2h-clock-btns {
  display: flex;
  gap: var(--v2-space-2);
  flex: 1 1 100%;
}

.v2-home .v2h-clock-btns .v2-btn { flex: 1 1 0; }

/* ============================================================================
   5b. THIS WEEK — streaks (read-only rows) + the async week log inside a fold.
   ============================================================================ */
/* A read-only row: no press-scale, no chevron, no pointer. */
.v2-home .v2h-row--static { cursor: default; }

/* Deliberately NOT .v2h-rows: that class carries the negative-margin trick padded
   cards use to line rows up with their section label, and a fold body has no
   padding to absorb the overflow — V1's `.home-fold-inner { overflow: hidden }`
   (index.html) would clip the trailing count clean off. Here the rows simply drop
   their own inset, so the dot lands on the fold chevron's edge instead. */
.v2-home .v2h-streaks { display: flex; flex-direction: column; }
.v2-home .v2h-streaks .v2h-row { padding-left: 0; padding-right: 0; }

.v2-home .v2h-weeklog { margin-top: var(--v2-space-2); }

/* paintWeekLog() (v2/home.js, section 5c) REPLACES this subtree with the day
   rows. They separate themselves with hairlines, so the container adds no gap. */
.v2-home .v2h-weeklog-body {
  display: flex;
  flex-direction: column;
}

/* RUN 2: the loading gap used to be a plain "Loading your week…" line here
   (`.v2h-weeklog-load`). It is now `weekLogSkeletonHtml()`'s three shimmering
   `.g-skeleton` rows (`.v2h-weeklog-skel*`, styled in the LIQUID GLASS SKIN
   section at the end of this file) — nothing in v2/home.js emits
   `.v2h-weeklog-load` any more. */

/* ============================================================================
   5c. WEEK LOG — markup this page OWNS.

   ---------------------------------------------------------------------------
   WHAT CHANGED (v651) AND WHY IT MATTERED
   ---------------------------------------------------------------------------
   This block used to be a scoped RE-SKIN: V1's renderWeekLog() injected
   V1-classed `.weeklog-*` rows and these rules over-rode index.html's styling
   for them, scoped `.v2-home #weekLogBody` to win on specificity. It worked, and
   it left this page's appearance DEPENDING on a V1 stylesheet it does not
   control — rename or delete a `.weeklog-*` rule in index.html and V2 Home
   changes with it.
   The dependency was already real: `.weeklog-detail-sum { display: block }`
   (index.html 676) was never restated here, so the expanded day's summary line
   was being laid out by V1 CSS on a V2 page.

   v2/home.js now renders the week log itself (section 5c there) under this
   page's own `v2h-` namespace, so these rules style markup this file owns and
   nothing here can be reached by — or reach — a V1 selector. The declarations
   are unchanged from the re-skin, less the specificity crutch: `.v2-home` alone
   scopes them now that the class names are unique.

   WHAT THIS BLOCK STILL DELIBERATELY DOES DIFFERENTLY FROM V1's LOOK:
   . the open row's red background wash violated the one-needle law (red = live
     or critical, never a state tint) — it is a --v2-surface lightness step;
   . V1 laid the row out on `grid-template-columns`, and an ADMIN row renders SIX
     children into a five-column grid, wrapping the trash icon onto its own line.
     Flex + a full-width detail line has no column count to get wrong;
   . V1's day cell renders value-then-caption; every other readout on this page
     is label-above-value. `column-reverse` puts it in the same grammar.

   HAZARD: do not declare `display` on .v2h-weeklog-detail. The collapsed state
   is the `hidden` attribute, enforced by index.html's forced [hidden] reset
   (line 41) — a `display` here is exactly the kind of author rule that reset
   exists to survive. The [hidden] rule is restated below so the contract is
   visible at the point of use.
   ============================================================================ */

/* ---- the day row ---------------------------------------------------------
   Engraving, not boxes: V1's per-row border + glass fill becomes a transparent
   row with ONE hairline between neighbours — identical to `.v2-row + .v2-row`
   in base.css, so a logged day and a My Day item are the same object. Padding
   is 0 horizontally for the same reason .v2h-streaks rows are: a fold body has
   no padding to absorb an inset, and `.home-fold-inner { overflow: hidden }`
   (index.html 5085) would clip anything that tried to hang outside it. */
.v2-home .v2h-weeklog-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--v2-space-3);
  width: 100%;
  min-height: var(--v2-row-h-tall);
  padding: var(--v2-space-1) 0;
  border: 0;
  border-radius: var(--v2-r-8);
  background: transparent;
  color: var(--v2-text);
  text-align: left;
  font-family: var(--v2-font);
  font-size: var(--v2-fs-body);
  line-height: var(--v2-lh-body);
  letter-spacing: var(--v2-tr-body);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--v2-font-features-num);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition:
    background-color var(--v2-dur-1) var(--v2-ease),
    color var(--v2-dur-1) var(--v2-ease),
    box-shadow var(--v2-dur-1) var(--v2-ease),
    transform var(--v2-dur-1) var(--v2-ease);
}

/* V1 also hangs `grid-template-columns` off .has-del; flex ignores it, which is
   the point — the admin row's sixth child no longer wraps onto its own line. */
.v2-home .v2h-weeklog-row + .v2h-weeklog-row { box-shadow: inset 0 1px 0 var(--v2-hairline); }

/* THE OPEN STATE. V1 paints `--accent-softer` here; on this page red means live
   or critical and nothing else, so an expanded day is a lightness step instead.
   It also grounds the interval chips inside it, which sit one step higher. */
.v2-home .v2h-weeklog-row.is-open { background: var(--v2-surface); }

.v2-home .v2h-weeklog-row:active { transform: scale(.995); background: var(--v2-surface-2); }

/* ---- the readouts --------------------------------------------------------
   Date reads as a row title; the two cells read as .v2-stat gauges one step
   down. column-reverse is what puts the engraved caption ABOVE its number, so
   these match the gauge rail and the clock figures instead of inverting them. */
.v2-home .v2h-weeklog-date {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--v2-fs-body);
  line-height: var(--v2-lh-body);
  letter-spacing: var(--v2-tr-body);
  font-weight: var(--v2-fw-medium);
  color: var(--v2-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-home .v2h-weeklog-cell {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: var(--v2-space-0);
  flex: 0 0 auto;
}

.v2-home .v2h-weeklog-cell b {
  font-size: var(--v2-fs-md);
  line-height: var(--v2-lh-md);
  letter-spacing: var(--v2-tr-md);
  font-weight: var(--v2-fw-semi);
  color: var(--v2-text);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--v2-font-features-num);
}

/* The unit caption follows the .v2-stat-sub grammar (lowercase micro, --text-3),
   NOT the uppercase .v2-stat-label grammar. A section or gauge label appears
   ONCE and can afford to be engraved; this one repeats on every row, and set in
   caps it stops reading as a unit and starts reading as a column header
   re-printed per row — six shouting labels against three day names. Compared
   side by side (uppercase-above / lowercase-above / caption-below / header-on-
   first-row-only), this is the only treatment where the NUMBERS dominate while
   every row keeps its unit for scanning and for a screen reader. */
.v2-home .v2h-weeklog-cell small {
  font-size: var(--v2-fs-micro);
  line-height: var(--v2-lh-micro);
  letter-spacing: var(--v2-tr-micro);
  font-weight: var(--v2-fw-normal);
  text-transform: none;
  color: var(--v2-text-3);
}

.v2-home .v2h-weeklog-chev {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: var(--v2-text-4);
  transition: transform var(--v2-dur-2) var(--v2-ease-in-out);
}

.v2-home .v2h-weeklog-chev svg { width: var(--v2-icon-md); height: var(--v2-icon-md); }
.v2-home .v2h-weeklog-row.is-open .v2h-weeklog-chev { transform: rotate(90deg); }

/* ---- edit / delete: QUIET ICONS ------------------------------------------
   V1 gives each a 1px border and a 7px radius, so two chrome chips ride every
   row and compete with the numbers. Here they are bare glyphs at --v2-text-4
   that only gain a ground on hover — the same "controls are quiet until you
   reach for them" rule the rest of the page follows. Sized off --v2-ctl-sm so
   they grow with density (26 desk / 32 touch) instead of staying a fixed 24. */
.v2-home .v2h-weeklog-edit,
.v2-home .v2h-weeklog-del {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: var(--v2-ctl-sm);
  height: var(--v2-ctl-sm);
  border: 0;
  border-radius: var(--v2-r-6);
  background: transparent;
  color: var(--v2-text-4);
  cursor: pointer;
  transition:
    background-color var(--v2-dur-1) var(--v2-ease),
    color var(--v2-dur-1) var(--v2-ease),
    transform var(--v2-dur-1) var(--v2-ease);
}

.v2-home .v2h-weeklog-edit svg,
.v2-home .v2h-weeklog-del svg { width: var(--v2-icon-sm); height: var(--v2-icon-sm); }

.v2-home .v2h-weeklog-edit:active,
.v2-home .v2h-weeklog-del:active { transform: scale(.94); }

/* ---- the expanded detail -------------------------------------------------
   flex-basis 100% is what drops it onto its own line, replacing V1's
   `grid-column: 1 / -1`. The dashed rule becomes an inset hairline: this file
   has exactly one kind of separator. */
.v2-home .v2h-weeklog-detail {
  flex: 1 1 100%;
  min-width: 0;
  margin-top: var(--v2-space-1);
  padding-top: var(--v2-space-2);
  border: 0;
  box-shadow: inset 0 1px 0 var(--v2-hairline);
  font-size: var(--v2-fs-small);
  line-height: var(--v2-lh-small);
  letter-spacing: var(--v2-tr-small);
  color: var(--v2-text-2);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--v2-font-features-num);
  white-space: normal;
}

/* Restated at the point of use — see the HAZARD note above. */
.v2-home .v2h-weeklog-detail[hidden] { display: none; }

/* THE RULE THIS PAGE USED TO BORROW. The summary is a <span> inside a <span>,
   so without a display it runs inline and the interval list starts on the same
   line as "Clocked in 9:04 AM". V2 Home was getting this from index.html 676
   (`.weeklog-detail-sum{display:block}`) — a V1 rule for a V1 class, on a V2
   page. It is declared here now because this page renders the element. */
.v2-home .v2h-weeklog-detail-sum { display: block; }

.v2-home .v2h-weeklog-ivs {
  list-style: none;
  margin: var(--v2-space-2) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--v2-space-1);
}

/* One step above the open row it sits in (card -> surface -> surface-2), so the
   ladder stays honest on both themes instead of relying on a translucent grey. */
.v2-home .v2h-weeklog-iv {
  display: grid;
  grid-template-columns: var(--v2-ctl-xs) 1fr auto;
  align-items: center;
  gap: var(--v2-space-2);
  padding: var(--v2-space-1) var(--v2-space-2);
  border-radius: var(--v2-r-6);
  background: var(--v2-surface-2);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--v2-font-features-num);
}

.v2-home .v2h-weeklog-iv-n {
  width: var(--v2-ctl-xs);
  height: var(--v2-ctl-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--v2-r-pill);
  background: var(--v2-hairline-strong);
  color: var(--v2-text-2);
  font-size: var(--v2-fs-micro);
  line-height: var(--v2-lh-micro);
  font-weight: var(--v2-fw-semi);
}

.v2-home .v2h-weeklog-iv-when {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--v2-fs-small);
  line-height: var(--v2-lh-small);
  color: var(--v2-text-2);
}

.v2-home .v2h-weeklog-iv-dur {
  font-size: var(--v2-fs-small);
  line-height: var(--v2-lh-small);
  font-weight: var(--v2-fw-semi);
  color: var(--v2-text);
  white-space: nowrap;
}

/* THE ONE NEEDLE IN THIS BLOCK. A running interval is literally live, which is
   what the needle is for; --v2-accent-soft (not -softer) because the chip has to
   out-read its --v2-surface-2 siblings on both themes, and --v2-accent-fill for
   the badge because it carries white text — the two accent tokens are never
   interchangeable. It also replaces the literal white hex V1 hard-codes here. */
.v2-home .v2h-weeklog-iv.is-running { background: var(--v2-accent-soft); }
.v2-home .v2h-weeklog-iv.is-running .v2h-weeklog-iv-dur { color: var(--v2-accent); }
.v2-home .v2h-weeklog-iv.is-running .v2h-weeklog-iv-n {
  background: var(--v2-accent-fill);
  color: var(--v2-text-on-accent);
}

/* ---- week total + empty state -------------------------------------------- */
.v2-home .v2h-weeklog-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--v2-space-3);
  margin-top: var(--v2-space-1);
  padding: var(--v2-space-2) 0 0;
  border: 0;
  box-shadow: inset 0 1px 0 var(--v2-hairline);
  font-size: var(--v2-fs-small);
  line-height: var(--v2-lh-small);
  letter-spacing: var(--v2-tr-small);
  color: var(--v2-text-3);
}

.v2-home .v2h-weeklog-total b {
  font-weight: var(--v2-fw-semi);
  color: var(--v2-text);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--v2-font-features-num);
}

/* RUN 2: the "No clock-ins yet" state is now the global `.g-empty` primitive
   (`.v2h-weeklog-empty-glass`, spacing in the LIQUID GLASS SKIN section at
   the end of this file) — nothing in v2/home.js emits the bare
   `.v2h-weeklog-empty` class any more. */

/* ============================================================================
   7. AGENCY PULSE — the SECONDARY RAIL + the lead-funnel fold.

   ---------------------------------------------------------------------------
   WHY THE PULSE TILES ARE GONE (v645)
   ---------------------------------------------------------------------------
   Until now these four readouts were `.v2h-tile`: --v2-surface chips with a
   --v2-ring-top highlight and a --v2-fs-lg value, laid out on a 2x2 grid inside
   a padded card. Directly above them the Agency rail said the SAME kind of
   thing — label / metric / context — in a completely different visual language:
   hairline segments engraved into one flush rail. Two grammars for one kind of
   readout is the single loudest tell that a page was assembled rather than
   designed, and it was the last real inconsistency on this page.

   So the tiles are deleted (nothing else in the codebase referenced them) and
   the pulse is a SECOND RAIL built from the same .v2h-gauge-track / .v2h-gauge
   parts, differing in exactly two controlled ways:

     1. ONE TYPE STEP DOWN — --v2-fs-xl (20) instead of --v2-fs-metric (26).
        The money rail must stay the biggest number on the page; base.css
        already ships this exact step-down as `.v2-stat--sm` (metric -> xl), so
        the secondary rail reuses a sanctioned step rather than inventing a
        scale. The page's readout ladder is now three real type steps with one
        job each: 26 agency money / 20 agency pulse / 15 inline clock figures.
        --v2-fs-lg (17) was rejected: 4px above body text, it reads as bold copy
        instead of a gauge — part of why the tiles never looked like instruments.

     2. A 4-WIDE LATTICE instead of a 6-wide scrolling one. Four segments fit
        2x2 on a phone and 4-across at desk, which is the tiles' old layout
        exactly — so nothing moves, nothing hides behind a swipe, and only the
        grammar changes. (The money rail scrolls because six readouts cannot fit
        a 390px viewport; four can.)
   ============================================================================ */
.v2-home .v2h-gauge-track--sub {
  /* A 4-segment rail always fits, so it wraps instead of scrolling: every
     number stays on screen and no data hides behind a swipe gesture. */
  flex-wrap: wrap;
  overflow: visible;
  scroll-snap-type: none;
}

.v2-home .v2h-gauge-track--sub > .v2h-gauge {
  flex: 1 1 50%;
  max-width: 50%;
  min-width: 0;
}

.v2-home .v2h-gauge-track--sub .v2h-gauge-v {
  font-size: var(--v2-fs-xl);
  line-height: var(--v2-lh-xl);
  letter-spacing: var(--v2-tr-xl);
}

/* THE 2x2 LATTICE. Same engraving law as the money rail, one column narrower:
   left edge on the right-hand column, top edge on the second row, and the
   corner segment carries neither. Equal specificity with the generic rules
   above, so these must stay BELOW them in source order. */
.v2-home .v2h-gauge-track--sub > .v2h-gauge { box-shadow: inset 1px 0 0 var(--v2-hairline), inset 0 1px 0 var(--v2-hairline); }
.v2-home .v2h-gauge-track--sub > .v2h-gauge:nth-child(2n+1) { box-shadow: inset 0 1px 0 var(--v2-hairline); }
.v2-home .v2h-gauge-track--sub > .v2h-gauge:nth-child(-n+2) { box-shadow: inset 1px 0 0 var(--v2-hairline); }
.v2-home .v2h-gauge-track--sub > .v2h-gauge:first-child { box-shadow: none; }

/* The fold is the only padded thing in a --flush card, so it carries the inset
   the card gave up, plus the hairline that separates it from the rail. */
.v2-home .v2h-fold {
  padding: var(--v2-space-2) var(--v2-card-pad) var(--v2-space-3);
  box-shadow: inset 0 1px 0 var(--v2-hairline);
}

.v2-home .v2h-fbar {
  display: flex;
  align-items: center;
  gap: var(--v2-space-2);
  min-height: var(--v2-row-h-head);
}

.v2-home .v2h-fbar-l {
  width: var(--v2-space-7);
  flex: 0 0 auto;
  font-size: var(--v2-fs-small);
  line-height: var(--v2-lh-small);
  color: var(--v2-text-2);
}

/* The track is a WELL: --v2-surface-2 plus a hairline ring, so it reads recessed
   on both themes instead of as a light-grey stripe painted on the card. */
.v2-home .v2h-fbar-t {
  flex: 1 1 auto;
  height: var(--v2-space-2);
  border-radius: var(--v2-r-pill);
  background: var(--v2-surface-2);
  box-shadow: var(--v2-ring-inset);
  overflow: hidden;
}

.v2-home .v2h-fbar-f {
  display: block;
  height: 100%;
  border-radius: var(--v2-r-pill);
  background: var(--v2-text-4);
}

.v2-home .v2h-fbar-f.is-blue   { background: var(--v2-blue); }
.v2-home .v2h-fbar-f.is-violet { background: var(--v2-violet); }
.v2-home .v2h-fbar-f.is-green  { background: var(--v2-green); }

.v2-home .v2h-fbar-n {
  width: var(--v2-space-5);
  flex: 0 0 auto;
  text-align: right;
  font-size: var(--v2-fs-body);
  line-height: var(--v2-lh-body);
  font-weight: var(--v2-fw-semi);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--v2-font-features-num);
}

.v2-home .v2h-fbar-p {
  width: var(--v2-space-6);
  flex: 0 0 auto;
  text-align: right;
  font-size: var(--v2-fs-micro);
  line-height: var(--v2-lh-micro);
  color: var(--v2-text-3);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--v2-font-features-num);
}

.v2-home .v2h-frates {
  display: flex;
  gap: var(--v2-space-4);
  flex-wrap: wrap;
  margin-top: var(--v2-space-2);
  padding-top: var(--v2-space-2);
  box-shadow: inset 0 1px 0 var(--v2-hairline);
  font-size: var(--v2-fs-small);
  line-height: var(--v2-lh-small);
  color: var(--v2-text-3);
}

.v2-home .v2h-frates b {
  color: var(--v2-text);
  font-weight: var(--v2-fw-semi);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--v2-font-features-num);
}

/* ============================================================================
   DESK REFINEMENTS — mobile-first everywhere above this line.
   ============================================================================ */
@media (min-width: 761px) {
  /* DENSITY — a mouse does not need a 44px target. Two-line rows drop to the
     --v2-row-h step and shed 4px of vertical padding: measured 44 -> 40 per row
     (the two text lines, not the min-height, set the floor), ~10% more list on a
     screen without moving a single type size. Phones keep touch sizing. */
  .v2-home .v2h-row {
    min-height: var(--v2-row-h);
    padding-top: var(--v2-space-0);
    padding-bottom: var(--v2-space-0);
  }

  /* The week-log day is a two-line row too, so it takes the same density step
     rather than staying a phone-sized target inside a desk-sized list. */
  .v2-home .v2h-weeklog-row {
    min-height: var(--v2-row-h);
    padding-top: var(--v2-space-0);
    padding-bottom: var(--v2-space-0);
  }

  /* A rail you swipe with a thumb becomes a cluster you read with your eyes.
     flex-wrap (not a fixed grid) so a 2-gauge non-admin rail fills its width
     instead of leaving four dead columns. */
  .v2-home .v2h-gauge-track {
    flex-wrap: wrap;
    overflow: visible;
  }

  .v2-home .v2h-gauge {
    flex: 1 1 30%;             /* 3 per row */
    min-width: 0;
    padding: var(--v2-card-pad);
  }

  /* A rail that CAN wrap (4+ readouts) locks its segments to exact thirds, so a
     short second row stays in column with the first instead of stretching to
     fill -- a lattice only reads as machined if the verticals line up. A rail
     that cannot wrap (1-3 readouts, e.g. the non-admin Runway + Goal pace pair)
     is left uncapped so it fills its own width. Falls back to the uncapped
     behaviour wherever :has() is unsupported. */
  .v2-home .v2h-gauge-track:has(> .v2h-gauge:nth-child(4)) > .v2h-gauge {
    max-width: calc(100% / 3);
  }

  /* Wrapped rows engrave on TOP; the first column of each row has no left edge. */
  .v2-home .v2h-gauge-track > .v2h-gauge {
    box-shadow: inset 1px 0 0 var(--v2-hairline), inset 0 1px 0 var(--v2-hairline);
  }
  .v2-home .v2h-gauge-track > .v2h-gauge:nth-child(3n+1) { box-shadow: inset 0 1px 0 var(--v2-hairline); }
  .v2-home .v2h-gauge-track > .v2h-gauge:nth-child(-n+3) { box-shadow: inset 1px 0 0 var(--v2-hairline); }
  .v2-home .v2h-gauge-track > .v2h-gauge:first-child { box-shadow: none; }

  /* SECONDARY RAIL goes 4-across — the tiles' old desk layout, unchanged. The
     double class is deliberate: the money rail's `:has(> :nth-child(4))` third
     cap above is (0,4,0) and would otherwise win and wrap this rail 3 + 1. */
  .v2-home .v2h-gauge-track.v2h-gauge-track--sub > .v2h-gauge {
    flex: 1 1 22%;
    max-width: calc(100% / 4);
  }

  .v2-home .v2h-gauge-track--sub > .v2h-gauge { box-shadow: inset 1px 0 0 var(--v2-hairline), inset 0 1px 0 var(--v2-hairline); }
  .v2-home .v2h-gauge-track--sub > .v2h-gauge:nth-child(4n+1) { box-shadow: inset 0 1px 0 var(--v2-hairline); }
  .v2-home .v2h-gauge-track--sub > .v2h-gauge:nth-child(-n+4) { box-shadow: inset 1px 0 0 var(--v2-hairline); }
  .v2-home .v2h-gauge-track--sub > .v2h-gauge:first-child { box-shadow: none; }

  .v2-home .v2h-clock-btns { flex: 0 0 auto; }
  .v2-home .v2h-clock-btns .v2-btn { flex: 0 0 auto; }

  /* Room for the label again: the needle button stops being icon-only. */
  .v2-home .v2h-pp { padding: 0 var(--v2-space-3); }
  .v2-home .v2h-pp span { display: inline; }
}

@media (min-width: 1200px) {
  .v2-home { max-width: 1040px; }

  /* All six readouts on ONE row — the full instrument cluster, single hairline
     rhythm, no wrapped second row to break the scan. */
  .v2-home .v2h-gauge { flex-basis: 15%; }
  .v2-home .v2h-gauge-track > .v2h-gauge:nth-child(-n+6) { box-shadow: inset 1px 0 0 var(--v2-hairline); }
  .v2-home .v2h-gauge-track > .v2h-gauge:first-child { box-shadow: none; }

  /* The 6-across rule above is (0,4,0) and lives AFTER the desk block, so the
     secondary rail restates its own 4-wide lattice rather than inheriting a
     result that only happens to be right for exactly four segments. */
  .v2-home .v2h-gauge-track--sub > .v2h-gauge:nth-child(4n+1) { box-shadow: inset 0 1px 0 var(--v2-hairline); }
  .v2-home .v2h-gauge-track--sub > .v2h-gauge:nth-child(-n+4) { box-shadow: inset 1px 0 0 var(--v2-hairline); }
  .v2-home .v2h-gauge-track--sub > .v2h-gauge:first-child { box-shadow: none; }
}

/* ============================================================================
   HOVER — pointer devices only. On touch, :hover sticks after a tap and leaves
   controls looking permanently armed (base.css follows the same rule).
   ============================================================================ */
@media (hover: hover) and (pointer: fine) {
  .v2-home .v2h-weeklog-row:hover { background: var(--v2-row-hover); }
  .v2-home .v2h-weeklog-edit:hover { background: var(--v2-row-hover); color: var(--v2-text-2); }
  /* Destructive intent is carried by the GLYPH turning red, not by a red ground:
     the needle may say "this is critical", it may never be a background wash.
     V1 paints --accent-softer behind this control; that is corrected here. */
  .v2-home .v2h-weeklog-del:hover { background: var(--v2-row-hover); color: var(--v2-accent); }
}

/* ============================================================================
   FOCUS RINGS LAST — every ring here competes with a hairline written in a
   media query above, and equal-specificity ties go to source order. Keyboard
   only, one ring, never a layout shift.
   ============================================================================ */
.v2-home .v2h-gauge-track > .v2h-gauge:focus-visible,
.v2-home .v2h-more:focus-visible,
.v2-home .v2h-weeklog-row:focus-visible,
.v2-home .v2h-weeklog-edit:focus-visible,
.v2-home .v2h-weeklog-del:focus-visible { outline: none; box-shadow: var(--v2-ring); }

/* Motion confirms; it never performs. For users who asked for less, it stops. */
@media (prefers-reduced-motion: reduce) {
  .v2-home .v2h-row:not(.v2h-row--static):active,
  .v2-home .v2h-gauge:active,
  .v2-home .v2h-more:active,
  .v2-home .v2h-weeklog-row:active,
  .v2-home .v2h-weeklog-edit:active,
  .v2-home .v2h-weeklog-del:active { transform: none; }

  .v2-home .v2h-weeklog-chev { transition-duration: 1ms; }

  /* The large title stops collapsing and simply stays large. */
  .v2-home .v2h-head-tx,
  .v2-home .v2h-date { animation: none; }
}

/* ============================================================================
   LIQUID GLASS SKIN — RUN 2 / LANE B1 (Home)
   ----------------------------------------------------------------------------
   Everything ABOVE this line is the page's structural/spacing CSS and is left
   alone. Everything below RE-SKINS it onto css/glass.css's `--g-*` ladder —
   translucency, blur, sheen, specular rim, hairline edge, stacked shadow —
   instead of the flat `--v2-*` surface fills. Nothing here changes layout,
   spacing, or breakpoints; only fills / blur / radius / shadow / colour.

   WHY OVERRIDE TOKENS INSTEAD OF SWAPPING CLASSES
   ---------------------------------------------------------------------------
   `.v2-card` / `.v2-btn` / `.v2-row` / `.v2-chip` / `.v2-fold-hd` are shared
   base.css classes used by every V2 page, not owned by this file. Swapping
   this page's markup onto bare `.glass-2` etc. would mean carrying TWO
   parallel class systems on one element (sizing from `.v2-card`, skin from
   `.glass-2`) with no shared spacing contract between them. Instead, every
   selector below is re-declared scoped under `.v2-home` — the exact pattern
   this file already used for `.v2-card--flush` padding — so specificity
   (0,2,0+) beats base.css's (0,1,0) regardless of source order, and nothing
   outside Home is touched. `--g-*` resolves through the SAME `data-theme`
   attribute `--v2-*` already keys off (verified against v2/tokens.css), so
   light/dark need no duplicate blocks here — everything below is theme-aware
   for free.

   THE THREE GENUINE MARKUP CHANGES (v2/home.js) THIS CSS PAIRS WITH
   ---------------------------------------------------------------------------
   1. The header (`.v2h-head`) now also carries `.glass-1` + `.v2h-head-glass`
      — a real chrome bar, giving the page a "held" top edge.
   2. The Customize button + panel now carry real `.g-btn` / `.g-popover` /
      `.g-check` / `.g-icon-btn` primitives (their OWN skin ships free from
      glass.css; only the panel's internal layout is styled here).
   3. Empty / loading / error states now use `.g-empty` / `.g-skeleton` /
      `.g-error-state` (global primitives; only page-specific spacing here).

   THE ONE RULE THIS BLOCK ENFORCES BY HAND: NO NESTED BLUR
   ---------------------------------------------------------------------------
   Every `.v2-card` on this page becomes a real blurred glass-2 surface.
   `.v2-btn` (the clock's Clock-in/Start-work pair) lives INSIDE those cards,
   so it deliberately does NOT get its own `backdrop-filter` — it takes the
   de-blurred "nested glass" fill (`--g-fill-nested` / `--g-sheen-nested`,
   the same recipe glass.css's own §5 nested-blur cap uses for a glass
   surface caught inside another one), matching Rule 1 in glass.css's header
   (max 2 blurred layers, never stacked) without needing that structural
   selector to know about `.v2-btn` at all.
   ============================================================================ */

/* ---- 1. THE HEADER — a real chrome bar (.glass-1 supplies fill/blur/sheen/
   edge/specular/shadow/radius; this only adds the inset the rounded corners
   now need and keeps the row from wrapping awkwardly on the very first
   paint). --g-origin below is what the Customize popover reads to grow from
   the button instead of the page's top-left. */
.v2-home .v2h-head.v2h-head-glass {
  padding: var(--g-pad-card-tight) var(--g-pad-card);
  margin-bottom: var(--g-s-3);
  flex-wrap: wrap;
  row-gap: var(--g-s-2);
}

.v2-home .v2h-cz-wrap { position: relative; flex: 0 0 auto; }

/* ---- 2. CARDS — every `.v2-card` on Home (My day, Clock, This week) and
   every `.v2-card--flush` rail (Needs attention, Agency, At-risk, Pulse)
   becomes a real glass-2 pane. `isolation: isolate` matches glass.css's own
   surfaces (§5) so a child's blend mode can never leak past the pane edge. */
/* W6-v2css 2026-08-04: the page-scoped clone is GONE — every Home card carries
   the .glass-2 primitive in its own markup now (v2/home.js), and base.css's
   .v2-card paper rule was subtracted in the same change. isolation:isolate
   comes with the primitive (glass.css §5). --raised below stays: a (0,2,0)
   variant override the primitive is meant to lose to. */
.v2-home .v2-card--raised { box-shadow: var(--g-edge-2), var(--g-spec-2), var(--g-shadow-3); }
.v2-home .v2-card--flush > .v2-card-hd { box-shadow: inset 0 -1px 0 var(--g-hairline); }

/* ---- 3. BUTTONS INSIDE CARDS — the clock's Clock-in/Start-work pair. See
   the "NO NESTED BLUR" note above: opaque-nested fill, no backdrop-filter of
   its own, because it already sits on a blurred `.v2-card`. */
.v2-home .v2-btn {
  background-color: var(--g-fill-nested);
  background-image: var(--g-sheen-nested);
  box-shadow: var(--g-edge-2), var(--g-spec-2);
  border-radius: var(--g-r-ctl);
  transition:
    transform var(--g-t-fast) var(--g-ease-out),
    box-shadow var(--g-t-fast) var(--g-ease-out),
    background-color var(--g-t-fast) var(--g-ease);
}
.v2-home .v2-btn:active { background-color: var(--g-fill-press); box-shadow: var(--g-edge-2), var(--g-spec-2); }
@media (hover: hover) and (pointer: fine) {
  .v2-home .v2-btn:hover { background-color: var(--g-fill-hover); }
}
/* `.v2-btn--quiet` is not used on this page today, but a future widget may
   reuse it — restated here so it does not silently inherit the nested fill
   above if it ever does. */
.v2-home .v2-btn--quiet { background-color: transparent; background-image: none; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .v2-home .v2-btn--quiet:hover { background-color: var(--g-fill-hover); box-shadow: none; }
}

/* ---- 4. ROWS — press/hover/selected tints move onto the same fill ladder
   every other glass control presses into. Radius bumps to the system's
   control-radius step ("everything's round"). */
.v2-home .v2-row,
.v2-home .v2h-row,
.v2-home .v2h-weeklog-row { border-radius: var(--g-r-sm); }
.v2-home .v2h-row:not(.v2h-row--static):active { background: var(--g-fill-press); }
.v2-home .v2h-more:active { background: var(--g-fill-press); }
.v2-home .v2h-gauge:active { background: var(--g-fill-press); }
.v2-home .v2h-weeklog-row:active { background: var(--g-fill-press); }
.v2-home .v2h-weeklog-row.is-open { background: var(--g-fill-nested); }
@media (hover: hover) and (pointer: fine) {
  .v2-home .v2h-more:hover { background: var(--g-fill-hover); }
}

/* ---- 5. HERO NUMBERS — the money rail and the pulse rail are the page's
   instruments; their readouts get the system's heavy tabular weight so the
   number, not the label, is what the eye lands on first. */
.v2-home .v2h-gauge-v {
  font-weight: var(--g-fw-heavy);
  font-feature-settings: var(--g-font-num);
}
.v2-home .v2h-weeklog-cell b,
.v2-home .v2h-weeklog-total b,
.v2-home .v2h-fbar-n {
  font-feature-settings: var(--g-font-num);
}

/* ---- 6. STATUS DOTS — remapped onto the system's status ladder so a
   red/amber/green anywhere on Home is the exact same red/amber/green as
   every other converted page. The needle also PULSES (reusing glass.css's
   own `g-pulse` keyframe) — status now reads in motion, not only in colour,
   for a genuinely live condition (overdue money, a running timer). */
.v2-home .v2h-dot--neutral { background: var(--g-text-4); }
.v2-home .v2h-dot--green   { background: var(--g-green); }
.v2-home .v2h-dot--amber   { background: var(--g-amber); }
.v2-home .v2h-dot--blue    { background: var(--g-blue); }
.v2-home .v2h-dot--violet  { background: var(--g-violet); }
.v2-home .v2h-dot--slate   { background: var(--g-slate); }
.v2-home .v2h-dot--needle {
  background: var(--g-accent);
  box-shadow: 0 0 0 var(--g-s-2) var(--g-accent-softer);
  animation: g-pulse 2.2s var(--g-ease-in-out) infinite;
}
.v2-home .v2h-dot--off {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--g-hairline-strong);
}
@media (prefers-reduced-motion: reduce) {
  .v2-home .v2h-dot--needle { animation: none; }
}

/* ---- 7. GAUGE / FUNNEL-BAR TONES — same remap. ---- */
.v2-home .v2h-gauge-v.is-good { color: var(--g-green); }
.v2-home .v2h-gauge-v.is-warn { color: var(--g-amber); }
.v2-home .v2h-gauge-v.is-crit { color: var(--g-accent); }
.v2-home .v2h-fbar-f { background: var(--g-text-4); }
.v2-home .v2h-fbar-f.is-blue   { background: var(--g-blue); }
.v2-home .v2h-fbar-f.is-violet { background: var(--g-violet); }
.v2-home .v2h-fbar-f.is-green  { background: var(--g-green); }
.v2-home .v2h-fbar-t {
  background: var(--g-fill-sunken);
  box-shadow: inset 0 0 0 1px var(--g-hairline), inset 0 1px 2px rgba(0,0,0,0.06);
}

/* ---- 8. CHIPS — risk-reason chips under an at-risk client's name. Pill
   radius ("everything's round"), colour remapped onto the shared status set. */
.v2-home .v2-chip { border-radius: var(--g-r-pill); }
.v2-home .v2-chip--amber  { color: var(--g-amber);  background: var(--g-amber-bg); }
.v2-home .v2-chip--green  { color: var(--g-green);  background: var(--g-green-bg); }
.v2-home .v2-chip--blue   { color: var(--g-blue);   background: var(--g-blue-bg); }
.v2-home .v2-chip--violet { color: var(--g-violet); background: var(--g-violet-bg); }
.v2-home .v2-chip--slate  { color: var(--g-slate);  background: var(--g-slate-bg); }
.v2-home .v2-chip--needle { color: var(--g-accent); background: var(--g-accent-soft); }

/* ---- 9. WEEK LOG interval well + the one live needle inside it. ---- */
.v2-home .v2h-weeklog-iv { background: var(--g-fill-nested); }
.v2-home .v2h-weeklog-iv-n { background: var(--g-hairline-strong); }
.v2-home .v2h-weeklog-iv.is-running { background: var(--g-accent-soft); }
.v2-home .v2h-weeklog-iv.is-running .v2h-weeklog-iv-dur { color: var(--g-accent); }
.v2-home .v2h-weeklog-iv.is-running .v2h-weeklog-iv-n {
  background: var(--g-accent-fill);
  color: var(--g-text-on-accent);
}
@media (hover: hover) and (pointer: fine) {
  .v2-home .v2h-weeklog-del:hover { color: var(--g-accent); background: var(--g-fill-hover); }
  .v2-home .v2h-weeklog-edit:hover { background: var(--g-fill-hover); color: var(--g-text-2); }
  .v2-home .v2h-weeklog-row:hover { background: var(--g-fill-hover); }
}

/* ---- 10. THE WEEK-LOG LOADING SKELETON (v2/home.js weekLogSkeletonHtml).
   `.g-skeleton` supplies the shimmer + honours prefers-reduced-motion
   globally (glass.css §3/§16); this only lays out the three fake rows so
   they read as the same list, not a different component. ---- */
.v2-home .v2h-weeklog-skel { display: flex; flex-direction: column; gap: var(--g-s-3); padding: var(--g-s-1) 0; }
.v2-home .v2h-weeklog-skel-row { display: flex; align-items: center; gap: var(--g-s-3); }
.v2-home .v2h-weeklog-skel-date { flex: 1 1 auto; height: 14px; }
.v2-home .v2h-weeklog-skel-cell { width: 44px; height: 30px; border-radius: var(--g-r-sm); }

/* ---- 11. EMPTY / ERROR STATES — `.g-empty` / `.g-error-state` are global
   primitives (glass.css §16); these just fit them into a card's own padding
   instead of the standalone spacing they assume when used bare. ---- */
.v2-home .g-empty { padding: var(--g-s-6) var(--g-s-2); }
.v2-home .v2h-cz-allhidden { margin-top: var(--g-s-2); }
.v2-home .v2h-weeklog-empty-glass,
.v2-home .v2h-weeklog-error { padding: var(--g-s-5) var(--g-s-2); }
.v2-home .v2h-weeklog-error { flex-wrap: wrap; }

/* ---- 12. THE CUSTOMIZE POPOVER (v2/home.js customizePanelHtml). `.g-popover`
   (glass.css §12) supplies the surface + the open/closing/closed animation
   contract; everything here is internal layout for the rows it holds. */
.v2-home .v2h-cz-panel.g-popover {
  top: calc(100% + var(--g-s-2));
  right: 0;
  left: auto;
  width: min(340px, 88vw);
  --g-origin: top right;
}
.v2-home .v2h-cz-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--g-s-3);
  margin-bottom: var(--g-s-1);
}
.v2-home .v2h-cz-sub { margin: 0 0 var(--g-s-3); }
.v2-home .v2h-cz-rows { display: flex; flex-direction: column; }
.v2-home .v2h-cz-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--g-s-3);
  min-height: 40px;
  padding: var(--g-s-1) var(--g-s-2);
  border-radius: var(--g-r-sm);
  transition: background-color var(--g-t-instant) var(--g-ease);
}
.v2-home .v2h-cz-row + .v2h-cz-row { box-shadow: inset 0 1px 0 var(--g-hairline); }
.v2-home .v2h-cz-row.is-off { opacity: 0.55; }
@media (hover: hover) and (pointer: fine) {
  .v2-home .v2h-cz-row:hover { background: var(--g-fill-hover); }
}
.v2-home .v2h-cz-check { flex: 1 1 auto; min-width: 0; cursor: pointer; }
.v2-home .v2h-cz-label {
  font-size: var(--g-fs-sm);
  color: var(--g-text);
  font-weight: var(--g-fw-medium);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-home .v2h-cz-move { display: flex; gap: 2px; flex: 0 0 auto; }
.v2-home .v2h-cz-mv svg { width: var(--g-icon-sm); height: var(--g-icon-sm); }

/* ---- 13. FOCUS RINGS — the system's ring, not the legacy one, for
   everything this page still hand-rolls interactivity for (rows, the
   gauge rail, week-log controls). Kept LAST so it beats the hairline rules
   declared earlier in this file at equal specificity. ---- */
.v2-home .v2h-gauge-track > .v2h-gauge:focus-visible,
.v2-home .v2h-more:focus-visible,
.v2-home .v2h-weeklog-row:focus-visible,
.v2-home .v2h-weeklog-edit:focus-visible,
.v2-home .v2h-weeklog-del:focus-visible { outline: none; box-shadow: var(--g-focus-ring); }

@media (prefers-reduced-motion: reduce) {
  .v2-home .v2-btn:active,
  .v2-home .v2h-cz-row { transition-duration: 1ms; }
}

/* Current daily Home: static section headers, existing clock/agenda/task layout. */
body.workspace-ui.workspace-design #content .home.home-always-visible{gap:14px}
body.workspace-design .home-always-visible .home-weeklog>.home-card-h{cursor:default;min-height:48px;padding:8px 16px}
body.workspace-design .home-always-visible .home-weeklog>.home-card-h>span:first-child{display:inline-flex;align-items:center;gap:8px;flex:1}
body.workspace-design .home-always-visible .home-weeklog>.home-fold-body{display:block;grid-template-rows:1fr}
body.workspace-design .home-always-visible .home-weeklog>.home-fold-body>.home-fold-inner{overflow:visible}
body.workspace-ui.workspace-design #content .home-always-visible .home-shortcuts .home-act,body.workspace-ui.workspace-design #content .home-always-visible .home-more{min-height:44px}
body.workspace-ui.workspace-design #content .home-always-visible .home-task,body.workspace-ui.workspace-design #content .home-always-visible .home-ag-row{min-height:54px;padding-block:8px}
