/* ============================================================================
   54-timeline.css - v0.24.0.0: the board as a timeline, and the plan editor.

   Components/Timeline/DayTimeline, WeekTimeline and PlanEditor, plus the List /
   Timeline toggle in Home.razor's tasks card.

   ONE GEOMETRY. Every position arrives as a unitless number of minutes in an inline
   custom property (--m for a line, --top/--h for a block, --to/--from for a band) and
   is turned into pixels here with a single hour height, --tl-hour. The same number
   lives in TimelineGeometry.HourPx (the layout's minimum block height is computed from
   it), and TimelineSurfaceTests pins the two together. 56px an hour keeps every hour
   row above the 44px row floor and a 45 minute minimum block at 42px, above the 40px
   floor for anything a thumb has to hit.

   NOTHING JUMPS. The hour axis and the phone's week agenda live in boxes of a fixed
   height that scroll inside themselves (svh, so a phone's collapsing address bar does
   not resize them), the deadline strip is one row that scrolls sideways (a day
   without deadlines draws none, and on the board the box takes that room), and the
   header is one line on a wide card and two fixed lines on a phone. A day that fills
   up never changes the height of the card.

   TIME IS NOT MIRRORED. Logical properties throughout, so the surrounding chrome
   follows the page; the axis itself is pinned left to right in 95-rtl.css (section 1),
   which is where that kind of rule lives.

   Colours come from the base tokens, so the dark theme restyles almost everything for
   free. The now-line starts in the board's urgency red (.main-task.urgent, #DC2626),
   with the dark theme's own red twin, declared once as --tl-now below, and its time
   sits in the streak clock's bezel, which points a red arrow at it (see "now"). Before 95-rtl and the dark theme in
   ChronosHead, like every component sheet.
   ============================================================================ */

.tl {
    --tl-hour: 56px;
    --tl-px: calc(var(--tl-hour) / 60);
    /* Room for the now pointer: its start stands at least 5px off the box's frame. An arrow skin
       with a glyph (styles/now-<id>) gives the glyph a slot of its own in the bezel
       (--tl-now-glyph-room, below); the gutter grows by the same room so the pointer still clears
       the frame. Unset, it is 0 and the default marker is exactly the signed-off one. */
    --tl-gutter: calc(56px + var(--tl-now-glyph-room, 0px));
    --tl-now: #DC2626;
    /* The line: three whole pixels on a phone, four from 720px (below). The pointer is as much taller
       than the line as leaves an even number of pixels over, so it is centred on whole pixels. */
    --tl-now-h: 3px;
    --tl-now-halo: var(--chronos-card-bg);
    --tl-now-halo-w: 1px;
    --tl-now-glow: color-mix(in srgb, var(--tl-now) 40%, transparent);
    --tl-now-glow-size: 6px 1px;
    /* The pointer: 21px on a phone, a size up from 720px (below). The tip is about as long as the
       pointer is half tall, so its nose is a right angle. */
    --tl-now-tag: 21px;
    --tl-now-tip-w: 10px;
    /* The marker's direction: which way the pointer's tip faces, where the face's violet glint sits
       and which way the rim runs from violet into red. The axis is never mirrored, so only the phone's week agenda
       turns these round in a right-to-left language (95-rtl.css). */
    --tl-now-flow: 90deg;
    --tl-now-tip: polygon(0 0, 100% 50%, 0 100%);
    --tl-now-face-glow: 88% 30%;
    --tl-overdue: #DC2626;
    --tl-height: 460px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    /* The deadline strip and the one-line header hold nowrap content that is wider than a phone on
       purpose (the strip scrolls sideways). Without this their min-content width climbs through
       the board's flex column and widens the whole page past 375px. The timeline takes the width
       the card gives it and never asks for more. */
    contain: inline-size;
}
@supports (height: 1svh) {
    .tl { --tl-height: clamp(340px, 58svh, 600px); }
}
/* A desk has room: the line a pixel heavier and the pointer a size up, so neither is a speck on a
   1440px canvas, and the gutter wide enough to hold it. */
@media (min-width: 720px) {
    .tl {
        --tl-gutter: calc(62px + var(--tl-now-glyph-room, 0px));
        --tl-now-h: 4px;
        --tl-now-tag: 24px;
        --tl-now-tip-w: 12px;
        --tl-now-glow-size: 8px 1px;
    }
}
:root[data-theme="dark"] .tl {
    /* Same urgency on the dark grid. The lighter #F87171 read salmon there; #EF4444 is still red,
       about 5:1 on the dark card. The glow is tighter so it does not smear the muted text it passes,
       and the pointer's face is a step lighter than the top-bar clock's, so on the dark card it
       reads as a solid device and not as an outline (see "now"). */
    --tl-now: #EF4444;
    --tl-now-glow: color-mix(in srgb, var(--tl-now) 45%, transparent);
    --tl-now-glow-size: 6px 0;
    --tl-now-face-top: #2C2643;
    --tl-now-rim: rgba(167, 139, 250, 0.6);
    --tl-overdue: #F87171;
}

/* The tasks card's slot for the timeline, in place of .task-cols. It takes the card's slack the
   same way, so the completed bar still rides the bottom edge. */
.board-timeline {
    flex: 1;
    min-width: 0;
    padding: 4px 14px 12px;
}

/* ---- the toggle ---------------------------------------------------------------------------- */
/* The bar's row. min-height is the toggle's own height, so a horizon that hides the toggle
   leaves the row exactly as tall as one that shows it.
   v0.25.3.0 density pass: 38 -> 34, the buttons 32 -> 28 and the doors with them. Phones keep
   their 46px row below: those are thumb targets, not desktop chrome. */
.aggregate-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
}
.aggregate-top > .bar-row {
    flex: 1;
    min-width: 0;
}
.board-view {
    flex: none;
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius-pill);
    background: var(--chronos-chip-bg);
}
.board-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 28px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--chronos-fg-muted);
    font: inherit;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.board-view-btn .material-icons { font-size: 18px; }
.board-view-btn:hover { border-color: color-mix(in srgb, var(--hover-ink) var(--hover-lift), transparent); }
.board-view-btn.is-active {
    background: var(--chronos-card-bg);
    color: var(--chronos-violet);
    box-shadow: 0 1px 3px rgba(15, 17, 22, 0.14);
}
/* Validation 2: in timeline mode the card's taskbar folds into these doors (the almanac, the drafts)
   so its 48px go to the hour box. As tall as the toggle beside them, so the row keeps its height;
   the count rides inside, in the taskbar's own badge (.completed-count, 06-planning-tasks.css). */
.board-door {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--chronos-chip-bg);
    color: var(--chronos-fg-muted);
    font: inherit;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.board-door .material-icons { font-size: 18px; }
.board-door:hover {
    color: var(--chronos-fg-primary);
    border-color: color-mix(in srgb, var(--hover-ink) var(--hover-lift), transparent);
}
@media (max-width: 480px) {
    .aggregate-top { min-height: 46px; }
    .board-door {
        min-width: 46px;
        height: 46px;
        padding: 0 10px;
    }
    .board-view-btn {
        width: 40px;
        height: 40px;
        padding: 0;
    }
    .board-view-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

/* ---- the header ---------------------------------------------------------------------------- */
/* Title, totals, and "N more in the list" when the timeline cannot place everything. A grid with
   named areas, so the link has a place of its own and its coming or going never re-flows the rest. */
.tl-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "title stats more";
    align-items: baseline;
    column-gap: 14px;
    min-height: 22px;
    white-space: nowrap;
}
.tl-head > .tl-title { grid-area: title; }
.tl-head > .tl-stats { grid-area: stats; }
.tl-head > .tl-more {
    grid-area: more;
    /* A 40px target that occupies one text line: the padding is given back by the margin. */
    min-height: 0;
    margin: -10px -4px;
    padding: 10px 4px;
}
.tl-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--text-md);
    font-weight: var(--weight-semibold);
    color: var(--chronos-fg-primary);
}
.tl-title::first-letter { text-transform: uppercase; }
.tl-stats {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    font-size: var(--text-sm);
    color: var(--chronos-fg-muted);
    font-variant-numeric: tabular-nums;
}
/* The free total is the number this header is for, so it never gives way. When the line is short
   (a phone, with "N more in the list" beside it) the planned total shrinks and says so with an
   ellipsis: a total cut through its first glyph ("Свободно (") read as a wrong value. */
.tl-stat {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tl-stat-free {
    flex: none;
    color: var(--chronos-violet);
    font-weight: var(--weight-semibold);
}
.tl-stat-sep {
    flex: none;
}
/* v0.27.0.0: a day off says so where the free total would stand. Muted, not violet: there is no
   number here to act on. */
.tl-stat-off {
    flex: none;
    color: var(--chronos-fg-muted);
    font-weight: var(--weight-semibold);
}
@media (max-width: 480px) {
    /* Two fixed lines rather than a wrap that depends on how long today's numbers print: the day
       and the link on the first, the totals on the second. */
    .tl-head {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "title more" "stats stats";
        row-gap: 2px;
        min-height: 40px;
    }
    .tl-head > .tl-stats { max-width: 100%; }
}

/* ---- the deadline strip -------------------------------------------------------------------- */
.tl-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 48px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}
.tl-strip::-webkit-scrollbar { display: none; }
.tl-strip-label {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-inline-end: 2px;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--chronos-fg-muted);
}
.tl-strip-label .material-icons { font-size: 15px; }
.tl-due {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 240px;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid var(--chronos-outline);
    border-radius: var(--radius-pill);
    background: var(--chronos-card-inset);
    color: var(--chronos-fg-primary);
    font: inherit;
    font-size: var(--text-sm);
    cursor: pointer;
}
.tl-due:hover { border-color: color-mix(in srgb, var(--hover-ink) var(--hover-lift), var(--chronos-outline)); }
.tl-due-when {
    flex: none;
    font-family: var(--chronos-font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    color: var(--chronos-violet);
    white-space: nowrap;
}
.tl-due-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tl-due.is-eod .tl-due-when {
    font-family: inherit;
    font-weight: var(--weight-medium);
    color: var(--chronos-fg-muted);
}
.tl-due.is-overdue {
    border-color: color-mix(in srgb, var(--tl-overdue) 45%, transparent);
    background: color-mix(in srgb, var(--tl-overdue) 10%, var(--chronos-card-bg));
}
.tl-due.is-overdue .tl-due-when { color: var(--tl-overdue); }
.tl-due.is-done { opacity: 0.55; }
.tl-due.is-done .tl-due-title { text-decoration: line-through; }
.tl-more {
    flex: none;
    min-height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--radius-pill);
    background: none;
    color: var(--chronos-violet);
    font: inherit;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    white-space: nowrap;
    cursor: pointer;
}
.tl-more:hover { text-decoration: underline; }
@media (pointer: fine) {
    .tl-strip { height: 40px; }
    .tl-due, .tl-more { min-height: 32px; }
}

/* ---- the scroll box and the axis ----------------------------------------------------------- */
.tl-scroll {
    position: relative;
    height: var(--tl-height);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--chronos-outline);
    border-radius: 12px;
    background: var(--chronos-card-bg);
    scrollbar-width: thin;
}
/* THE AXIS IS ITS OWN STACK (isolation), so nothing inside it can rise over the week's sticky heads
   or anything else on the page, and its layers are counted here, bottom to top:
     -1  the hour rows: the floor, every tap that misses a block lands on one
      0  the hatching, the past, the blocks' surfaces (no z-index: a block must not be a stack of its
         own, or its text could not rise over the now-line), the week's leader to today
      3  the rim of today's arrowhead in the week grid
      4  the now-line, its pointer riding on it
      5  a block's words, on plates of its own colour (see "blocks")
      6  the week gutter's pointer */
.tl-axis {
    position: relative;
    isolation: isolate;
    height: calc(var(--tl-len) * var(--tl-px));
}
/* Hours outside the working window: hatched, so it is plain why free time is counted only between
   them. v0.27.0.0: the window is the account's own setting (08:00-22:00 every day until it is set),
   and a day that is not a working day is hatched from end to end (TimelineBoard's OffHours). */
.tl-off {
    position: absolute;
    inset-inline: var(--tl-gutter) 0;
    top: calc(var(--from) * var(--tl-px));
    height: calc((var(--to) - var(--from)) * var(--tl-px));
    background: repeating-linear-gradient(135deg,
        transparent 0 7px,
        color-mix(in srgb, var(--chronos-fg-muted) 9%, transparent) 7px 8px);
    pointer-events: none;
}
/* Today, the part already gone. It is a loss the reader can see. */
.tl-past {
    position: absolute;
    inset-inline: var(--tl-gutter) 0;
    top: 0;
    height: calc(var(--to) * var(--tl-px));
    background: color-mix(in srgb, var(--chronos-fg-muted) 7%, transparent);
    pointer-events: none;
}
/* One button per local hour: the row is the tap target that plans a task at that hour. Its line
   starts at the gutter; the label sits centred on the line, in the numeral face. */
.tl-hour {
    position: absolute;
    inset-inline: 0;
    top: calc(var(--m) * var(--tl-px));
    height: var(--tl-hour);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
    pointer-events: auto;
    z-index: -1;
}
.tl-hour::before {
    content: "";
    position: absolute;
    inset-inline: calc(var(--tl-gutter) - 6px) 0;
    top: 0;
    height: 1px;
    background: var(--chronos-outline);
}
/* The half hour, fainter. */
.tl-hour::after {
    content: "";
    position: absolute;
    inset-inline: var(--tl-gutter) 0;
    top: 50%;
    height: 1px;
    background: color-mix(in srgb, var(--chronos-outline) 55%, transparent);
}
.tl-hour.is-first::before { background: transparent; }
.tl-hour:hover,
.tl-hour:focus-visible {
    background: linear-gradient(to right, transparent var(--tl-gutter),
        color-mix(in srgb, var(--chronos-violet) 6%, transparent) var(--tl-gutter));
}
.tl-hour-label {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: calc(var(--tl-gutter) - 10px);
    transform: translateY(-50%);
    text-align: end;
    font-family: var(--chronos-font-mono);
    font-size: var(--text-xs);
    line-height: 1;
    color: var(--chronos-fg-muted);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}
.tl-hour.is-first .tl-hour-label { transform: none; top: 4px; }
/* The label the now pointer stands on (TimelineMarkup.NearNow): hidden whole, never half covered.
   The pointer says the time, closer than that. The row stays a tap target with its own name. */
.tl-hour.is-near-now .tl-hour-label,
.tlw-gutter-label.is-near-now {
    visibility: hidden;
}

/* ---- blocks ---------------------------------------------------------------------------------- */
/* 3px off the gutter, so the now pointer's nose (2px into the lane, see "now") lands on the line's
   own red and not on a block's leading edge. */
.tl-lane {
    position: absolute;
    inset-block: 0;
    inset-inline: calc(var(--tl-gutter) + 3px) 6px;
    pointer-events: none;
}
/* The board's task card at timeline size: the priority hue on the leading edge (violet when none
   is set), a tint of it for the surface, the same hairline and the house hover. Overlapping blocks
   split the width by --col / --cols from TimelineLayout.

   NO Z-INDEX, NO OPACITY. Either would make the block a stack of its own, and its text could then
   never rise over the now-line. The surface sits on layer 0, the line passes over it, and the words
   rise over the line (layer 5) on plates of the block's own surface colour: the red runs behind a
   word and on beside it, never through it. A struck-through title is how this board says "done",
   and the line used to say it about whichever block was running. */
.tl-block {
    --acc: var(--task-accent, var(--chronos-violet));
    --tl-block-surface: color-mix(in srgb, var(--acc) 13%, var(--chronos-card-bg));
    /* How far a word's plate reaches past it, sideways only (see "the words over the now-line"). */
    --tl-plate-x: 4px;
    position: absolute;
    top: calc(var(--top) * var(--tl-px) + 1px);
    height: calc(var(--h) * var(--tl-px) - 2px);
    inset-inline-start: calc(100% / var(--cols) * var(--col));
    width: calc(100% / var(--cols) - 3px);
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 4px 8px 4px 9px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--acc) 32%, var(--chronos-outline));
    border-inline-start: 3px solid var(--acc);
    border-radius: 8px;
    background: var(--tl-block-surface);
    box-shadow: 0 1px 2px rgba(15, 17, 22, 0.06);
    color: var(--chronos-fg-primary);
    font: inherit;
    text-align: start;
    cursor: pointer;
    pointer-events: auto;
    transition: border-color 0.15s ease;
}
.tl-block:hover {
    border-color: color-mix(in srgb, var(--hover-ink) var(--hover-lift), color-mix(in srgb, var(--acc) 32%, var(--chronos-outline)));
    border-inline-start-color: var(--acc);
}
/* The title's box reaches --tl-plate-x into the block's padding on both sides (and gives it back
   with the margin, so the words stay where they were), because it clips: the plates its words wear
   under the now-line (below) reach that far past them. */
.tl-block-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--lines, 1);
    overflow: hidden;
    overflow-wrap: anywhere;
    padding-inline: var(--tl-plate-x);
    margin-inline: calc(-1 * var(--tl-plate-x));
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    line-height: 1.25;
}
/* One line, and a cut one says so: a label clipped without an ellipsis ("09:00-10:3") reads as a
   wrong time. A day-lane block split three ways prints its start alone (DayTimeline.BlockTime).
   As wide as its text (never wider than the block), so its plate under the now-line is too; the
   plate reaches up to the title and two pixels below the digits (see below). */
.tl-block-time {
    align-self: flex-start;
    max-width: calc(100% + 2 * var(--tl-plate-x));
    margin-block-start: -1px;
    margin-inline: calc(-1 * var(--tl-plate-x));
    padding: 3px var(--tl-plate-x) 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--chronos-font-mono);
    font-size: var(--text-xs);
    line-height: 1;
    color: var(--chronos-fg-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
/* THE WORDS OVER THE NOW-LINE (layer 5, see the axis), each line of them on a plate of the block's
   own surface: invisible on the block, a gap in the red where the line passes behind a word, the
   way a map draws a road behind a town's name. Beside the words the line runs on over the block.
   A rim round each glyph alone left the red showing between the letters, a dashed line through
   "18:00"; a plate the width of the title's box hid the line across most of a narrow block. So the
   plate is on the words: the title's inline span (.tl-block-words, one plate per line it wraps to)
   and the one-line time, shrunk to its text.

   Round 3: THE PLATE HUGS THE INK. It used to be a 2px spread on every side of the text's line box,
   which reaches 4-5px past the glyphs, so the line went missing for half an inch under "18:00"
   where no glyph touched it, then came back a minute later. Now it reaches past the words only
   sideways, --tl-plate-x on each side through padding the margin gives back, so a word reads as a
   label on a road and not as a strikethrough with its middle hidden. Upward and downward the label
   (the title's lines and the time under them) stops at the ink: its top is the first line's letters
   (the title's plate is a band that leaves out the empty strip above them) and its bottom is the
   time's baseline and two pixels, so the red and its halo keep clear of the digits (text-box cuts
   them to cap height and baseline, line-height 1 is the fallback). Between its own rows the label is solid: each line's plate reaches down to the
   next one and the time's reaches up to the title, because a 1-3px slit there let the line, or only
   its glow, show through under a word as an underline. */
.tl-block > * {
    position: relative;
    z-index: 5;
}
/* The same reach on both sides of every line, so a label sits square on the road. Round 3 carried
   each line's plate 0.75em further on its end side for a clamped title's ellipsis (drawn by the
   title box, outside this span), and every line read lopsided for a rare case. Round 4: symmetric;
   a clamped title's dots may sit on the line. */
.tl-block-words {
    padding-inline: var(--tl-plate-x);
    margin-inline: calc(-1 * var(--tl-plate-x));
    padding-block: 0 0.35em;
    border-radius: 3px;
    background: linear-gradient(var(--tl-block-surface) 0 0) 0 100% / 100% calc(100% - 0.2em) no-repeat;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.tl-block-time {
    border-radius: 3px;
    background: var(--tl-block-surface);
}
@supports (text-box: trim-both cap alphabetic) {
    .tl-block-time { text-box: trim-both cap alphabetic; }
}
/* The block running now (TimelineMarkup.IsRunning): its time is set bold in the primary ink. Not red:
   a red time is how the board says "late". Round 4: its leading edge no longer takes the line's red
   either. That edge is the priority channel, and Blaze is the same red, so a running block read as a
   Blaze one. The edge keeps the block's own priority hue. */
.tl-block.is-now .tl-block-time {
    color: var(--chronos-fg-primary);
    font-weight: var(--weight-semibold);
}
/* The day's Main task: ringed in violet, the highlight the card above it wears. */
.tl-block.is-main {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--chronos-violet) 60%, transparent),
                0 4px 14px rgba(124, 58, 237, 0.25);
}
/* Done: dimmed to what opacity 0.55 drew (a 13% tint at 55% is about 7%), but by mixing the colours
   toward the card, because opacity would make the block a stack of its own (see above). */
.tl-block.is-done {
    --acc: color-mix(in srgb, var(--task-accent, var(--chronos-violet)) 55%, var(--chronos-card-bg));
    color: color-mix(in srgb, var(--chronos-fg-primary) 55%, var(--chronos-card-bg));
}
.tl-block.is-done .tl-block-title { text-decoration: line-through; }
.tl-block.is-done .tl-block-time { color: color-mix(in srgb, var(--chronos-fg-muted) 55%, var(--chronos-card-bg)); }
/* Continued from the evening before, or on into the next day: open at that edge. */
.tl-block.is-cont-top {
    border-top-style: dashed;
    border-start-start-radius: 0;
    border-start-end-radius: 0;
}
.tl-block.is-cont-bottom {
    border-bottom-style: dashed;
    border-end-start-radius: 0;
    border-end-end-radius: 0;
}

/* ---- now --------------------------------------------------------------------------------------- */
/* v0.24.0.0 (owner: "style the red current-time line in the app's own style, not a default one";
   then, 2026-10-23: "the current-time arrow is not very noticeable"). The marker must be the first
   thing the eye finds on the timeline, in every state, on a phone and on a desk, in both themes.

   AN ARROW-POINTER. The time sits in the top-bar streak clock's bezel (.streak-clock,
   01-topbar.css) - its dark device face with the violet glint, violet rim, glowing mono digits, the
   pill radius on the start side - and the bezel ends in a RED arrowhead toward the lane, a right
   angle at the nose, which flows straight into the red line: a dark device pointing a red arrow,
   "you are here". The rim runs from the clock's violet into the red of the nose, so rim and nose
   are one outline and not a violet chip with a red triangle glued on. The device is dark in both
   themes, like the clock; only the red, its glow and the face's top stop are retuned for the dark
   grid (see .tl above).

   OVER THE BLOCKS, UNDER THEIR WORDS. The line runs over every block's surface (it used to run
   under them, and inside a block only the bezel was left of it) and a block's words rise over the
   line on plates of the block's colour that hug the ink (see "blocks"), so the line is never hidden
   where no letter is and never strikes a title through. The block running now sets its time bold in
   the primary ink; its leading edge stays the priority's (a red edge there read as Blaze). A 1px halo
   in the card's colour above and below keeps the line a ribbon of its own over a block; over the
   past (above the line, always) the upper halo is the past's own tint, so it leaves no pale sliver
   on the empty grid. Only above and below: a halo round the line's start would cut a notch between
   the nose and the line.

   PRESENCE. Three whole pixels on a phone, four on a desk, solid FOMO red to its end. Round 4: the
   violet end cap is gone, at the end of a red line it read as a magenta smear. A soft glow sits
   outside the halo. The line ends where the blocks of the last column end.

   STILL. The app is pulse-budgeted (01-topbar.css: static glows only): the glow is a box-shadow
   that never moves, and the marker moves once a minute because the minute does, and that is all.

   CRISP. 56px an hour puts most minutes on a fractional pixel; round() snaps the line to whole
   pixels where it is understood, and the plain calc above it is the fallback. The pointer is an
   even number of pixels taller than the line, so it is centred on whole pixels too. Taps pass
   through all of it. */
.tl-now {
    --tl-now-halo-above: color-mix(in srgb, var(--chronos-fg-muted) 7%, var(--tl-now-halo));
    position: absolute;
    /* The lane's 6px end inset and the 3px a block leaves before it. */
    inset-inline: var(--tl-gutter) 9px;
    top: calc(var(--m) * var(--tl-px) - var(--tl-now-h) / 2);
    top: round(calc(var(--m) * var(--tl-px) - var(--tl-now-h) / 2), 1px);
    height: var(--tl-now-h);
    /* Square where the nose overlaps it, round at the far end. */
    border-start-end-radius: 2px;
    border-end-end-radius: 2px;
    background: var(--tl-now);
    box-shadow:
        0 calc(-1 * var(--tl-now-halo-w)) 0 var(--tl-now-halo-above),
        0 var(--tl-now-halo-w) 0 var(--tl-now-halo),
        0 0 var(--tl-now-glow-size) var(--tl-now-glow);
    pointer-events: none;
    z-index: 4;
}
/* The bezel. Same face, glint, rim and ink as .streak-clock, scaled to the axis, open on the end
   side where the arrowhead takes over. One rule for the day, the week gutter and the phone's
   agenda. The rim is a border-box layer under a transparent border, so it can run from the clock's
   violet into the nose's red; the face is clipped inside it. Its violet glow is a box-shadow of the
   bezel alone: a drop-shadow of the whole tag would also wrap the nose and leave a pale notch where
   the line leaves it.

   ARROW SKINS (v0.25.0.0, styles/now-<id>/). A skin is a cosmetic the owner of the board alone
   sees: .tl.now-skin.now-<id> on the timeline root, overriding --tl-now* tokens only. Besides the
   line's colour, the tip and the rim, these hooks reach the bezel; unset, each falls back to the
   clock's own value written beside it, so the default marker is exactly the one above:
     --tl-now-glyph      a picture layered over the face (a full background layer), default none
     --tl-now-glint      the face's glint colour
     --tl-now-face-mid   the face's middle and lower stops (the top one is --tl-now-face-top)
     --tl-now-face-low
     --tl-now-ink-glow   the glow under the digits
     --tl-now-lift       the glow that lifts the device off the card
     --tl-now-glyph-room a slot of its own for the glyph at the bezel's start, before the digits,
                         default 0 (v0.25.0.0 store round 2: a glyph squeezed into the 6px start
                         padding sat under the digits as a 2px sliver, and two skins read as one) */
.tl-now-time,
.tlw-now-time,
.tlw-anow-time {
    display: inline-flex;
    align-items: center;
    height: var(--tl-now-tag);
    padding-block: 0;
    padding-inline: calc(6px + var(--tl-now-glyph-room, 0px)) 2px;
    border: 1px solid transparent;
    border-inline-end: 0;
    border-start-start-radius: var(--radius-pill);
    border-end-start-radius: var(--radius-pill);
    background:
        var(--tl-now-glyph, none),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 45%) padding-box,
        radial-gradient(130% 100% at var(--tl-now-face-glow), var(--tl-now-glint, rgba(168, 85, 247, 0.28)), transparent 62%) padding-box,
        linear-gradient(180deg, var(--tl-now-face-top, #241F35) 0%, var(--tl-now-face-mid, #14121F) 58%, var(--tl-now-face-low, #1A1728) 100%) padding-box,
        linear-gradient(var(--tl-now-flow),
            var(--tl-now-rim, rgba(139, 92, 246, 0.55)) 0 40%,
            color-mix(in srgb, var(--tl-now) 80%, transparent) 100%) border-box;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -2px 4px rgba(0, 0, 0, 0.35),
        0 2px 8px var(--tl-now-lift, color-mix(in srgb, var(--chronos-violet) 30%, transparent));
    color: #F1ECFF;
    font-family: var(--chronos-font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    line-height: 1;
    /* Untracked mono digits: the bezel's start then stands 6px off the box's frame on a phone. */
    letter-spacing: 0;
    text-shadow: 0 0 6px var(--tl-now-ink-glow, rgba(167, 139, 250, 0.6));
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}
@media (min-width: 720px) {
    .tl-now-time,
    .tlw-now-time {
        font-size: var(--text-sm);
    }
}
/* The arrowhead: the line's own red, a sheen on its upper rows of the same strength as the face's,
   and a breath of the device's dark at its base so it grows out of the bezel. As tall as the whole
   bezel, rim included, and outside its box on the end side. */
.tl-now-time::after,
.tlw-now-time::after,
.tlw-anow-time::after {
    content: "";
    position: absolute;
    inset-inline-start: 100%;
    top: -1px;
    bottom: -1px;
    width: var(--tl-now-tip-w);
    clip-path: var(--tl-now-tip);
    background: var(--tl-now);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 45%),
        linear-gradient(var(--tl-now-flow), color-mix(in srgb, var(--tl-now) 85%, #14121F) 0%, var(--tl-now) 55%);
}
/* Day: the bezel sits in the gutter and its nose reaches 2px into the lane, over the line's square
   start, so the arrow and the line are one red stroke. Positioned from the line, so the two can
   never drift apart. */
.tl-now-time {
    position: absolute;
    inset-inline-end: calc(100% + var(--tl-now-tip-w) - 2px);
    top: calc((var(--tl-now-h) - var(--tl-now-tag)) / 2);
}
:root[data-theme="dark"] .tl-now-time,
:root[data-theme="dark"] .tlw-now-time,
:root[data-theme="dark"] .tlw-anow-time {
    /* On the dark card the face is a step lighter (--tl-now-face-top, .tl above) and the rim a step
       brighter than the top-bar clock's, and a wider violet glow lifts the device off the card. */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -2px 4px rgba(0, 0, 0, 0.35),
        0 0 10px var(--tl-now-lift, color-mix(in srgb, var(--chronos-violet) 50%, transparent));
}
@media (prefers-reduced-motion: reduce) {
    .board-view-btn, .board-door, .tl-block { transition: none; }
}
/* Where the box opens (TimelineLayout.InitialScrollMinutes), read by chronosCalendar.scrollTimeline. */
.tl-anchor {
    position: absolute;
    inset-inline-start: 0;
    top: calc(var(--m) * var(--tl-px));
    width: 1px;
    height: 1px;
    pointer-events: none;
}

/* ---- the week: a grid from 720px ------------------------------------------------------------- */
.tlw-grid { display: none; }
.tlw-heads {
    position: sticky;
    top: 0;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(var(--tl-days), minmax(0, 1fr));
    padding-inline-start: var(--tl-gutter);
    border-bottom: 1px solid var(--chronos-outline);
    background: var(--chronos-card-bg);
}
.tlw-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
    height: 74px;
    padding: 6px 4px;
    border: 0;
    border-inline-start: 1px solid var(--chronos-outline);
    background: transparent;
    color: var(--chronos-fg-primary);
    font: inherit;
    cursor: pointer;
}
.tlw-head:hover .tlw-date { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hover-ink) var(--hover-lift), transparent); }
.tlw-dow {
    font-size: var(--text-2xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.06em;
    color: var(--chronos-fg-muted);
}
.tlw-date {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-family: var(--chronos-font-mono);
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    font-variant-numeric: tabular-nums;
}
.tlw-head.is-today .tlw-date {
    background: var(--chronos-violet);
    color: #fff;
}
.tlw-head-due {
    display: flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    height: 16px;
    font-size: var(--text-xs);
    color: var(--chronos-violet);
}
.tlw-head-due .material-icons { flex: none; font-size: 12px; }
.tlw-head-due.is-overdue { color: var(--tl-overdue); }
.tlw-head-due-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tlw-head-due-more {
    flex: none;
    font-weight: var(--weight-semibold);
    font-variant-numeric: tabular-nums;
}
.tlw-gutter {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--tl-gutter);
    pointer-events: none;
}
.tlw-gutter-label {
    position: absolute;
    inset-inline-end: 10px;
    top: calc(var(--m) * var(--tl-px));
    transform: translateY(-50%);
    font-family: var(--chronos-font-mono);
    font-size: var(--text-xs);
    line-height: 1;
    color: var(--chronos-fg-muted);
    font-variant-numeric: tabular-nums;
}
.tlw-gutter-label.is-first { transform: none; top: 4px; }
/* Week: the pointer waits in the gutter, on the same rows as today's line, its nose 2px over the
   leader's start. Over the first column's blocks and their text; the axis's own stack keeps it under
   the sticky heads. */
.tlw-now-time {
    position: absolute;
    inset-inline-end: calc(var(--tl-now-tip-w) - 2px);
    top: calc(var(--m) * var(--tl-px) - var(--tl-now-h) / 2);
    top: round(calc(var(--m) * var(--tl-px) - var(--tl-now-h) / 2), 1px);
    margin-top: calc((var(--tl-now-h) - var(--tl-now-tag)) / 2);
    z-index: 6;
}
/* The pointer's leader: from the gutter's nose to the start of today's column (--today, from the
   markup), where today's own line takes over. Round 3: a solid 2px leader beside today's 3px line
   read as one red now-line drawn across the days already gone. It is a dashed path now, two whole
   pixels of red dashes, and the one solid, glowing stretch of red in the grid is today's. It stops
   there: past today, "now" is not now. Under the blocks (layer 0, before the columns), so it crosses
   no title on the days before. On Monday it has no length at all. Centred on today's line. */
.tlw-now-guide {
    position: absolute;
    inset-inline-start: var(--tl-gutter);
    width: calc((100% - var(--tl-gutter)) * var(--today, 0) / var(--tl-days));
    top: calc(var(--m) * var(--tl-px) - 1px);
    top: calc(round(calc(var(--m) * var(--tl-px) - var(--tl-now-h) / 2), 1px) + (var(--tl-now-h) - 2px) / 2);
    height: 2px;
    background: repeating-linear-gradient(90deg,
        color-mix(in srgb, var(--tl-now) 70%, transparent) 0 6px,
        transparent 6px 10px);
    pointer-events: none;
}
/* The columns are layout only: a tap falls through them to an hour row or lands on a block. */
.tlw-cols {
    position: absolute;
    inset-block: 0;
    inset-inline: var(--tl-gutter) 0;
    display: grid;
    grid-template-columns: repeat(var(--tl-days), minmax(0, 1fr));
    pointer-events: none;
}
.tlw-col {
    /* Today's arrowhead (below): the pointer's right-angled nose at column size. */
    --tlw-arrow-w: 9px;
    --tlw-arrow-h: 18px;
    position: relative;
    height: calc(var(--tl-len) * var(--tl-px));
    border-inline-start: 1px solid var(--chronos-outline);
}
/* Today's column: a stronger violet wash than any other, and a wider glow on its stretch of the
   line, so the one solid red in the grid is easy to find from across the room. */
.tlw-col.is-today {
    --tl-now-glow-size: 8px 2px;
    background: color-mix(in srgb, var(--chronos-violet) 7%, transparent);
}
:root[data-theme="dark"] .tlw-col.is-today { --tl-now-glow-size: 8px 1px; }
.tlw-col .tl-hour::before { inset-inline: 0; }
.tlw-col .tl-hour::after { inset-inline: 0; }
.tlw-col .tl-hour:hover,
.tlw-col .tl-hour:focus-visible { background: color-mix(in srgb, var(--chronos-violet) 6%, transparent); }
/* A DST column (23 or 25 hours) labels its own hours: from the change on, its rows sit an hour off
   the shared gutter, and a block must line up with a label on its own axis. */
.tlw-col-hour {
    position: absolute;
    inset-inline-start: 3px;
    top: 2px;
    font-family: var(--chronos-font-mono);
    font-size: var(--text-xs);
    line-height: 1;
    color: var(--chronos-fg-muted);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}
.tlw-col .tl-past { inset-inline: 0; }
.tlw-col .tl-off { inset-inline: 0; }
/* v0.27.0.0: a day off in the week grid. The column is hatched whole by its .tl-off; the head dims
   its weekday so the week reads at a glance. */
.tlw-head.is-day-off .tlw-dow { opacity: 0.6; }
.tlw-col .tl-now { inset-inline: 0; }
/* The column variant: a seventh of the card has no room for the bezel, which waits in the gutter
   (.tlw-now-time). Today's column keeps the full line - the same pixels, halo and glow, over its
   blocks - and, where the dashed leader hands over, a red arrowhead with the pointer's own right-
   angled nose, sitting on the column's rule: the pointer, its path, and the arrow at the day it
   points to. Round 3: at 7x9 it was a speck that landed on a block's violet edge and smudged. It is
   9x18 now and stands on a card-coloured rim (.tlw-now-mark, layer 3: over the blocks, under the
   line, so the line runs on out of the nose without a notch). On Monday the gutter's nose touches
   the column itself, and a second arrowhead beside it would stutter. */
.tlw-col .tl-now::before {
    content: "";
    position: absolute;
    inset-inline-start: -1px;
    top: calc((var(--tl-now-h) - var(--tlw-arrow-h)) / 2);
    width: var(--tlw-arrow-w);
    height: var(--tlw-arrow-h);
    clip-path: var(--tl-now-tip);
    background: var(--tl-now);
}
/* The rim: the same nose 2px taller at each end and 2px longer, so its slopes run parallel to the
   arrowhead's, about a pixel and a half outside them. */
.tlw-now-mark {
    position: absolute;
    inset-inline-start: -1px;
    top: calc(var(--m) * var(--tl-px) - var(--tlw-arrow-h) / 2 - 2px);
    top: calc(round(calc(var(--m) * var(--tl-px) - var(--tl-now-h) / 2), 1px) + (var(--tl-now-h) - var(--tlw-arrow-h)) / 2 - 2px);
    width: calc(var(--tlw-arrow-w) + 2px);
    height: calc(var(--tlw-arrow-h) + 4px);
    clip-path: var(--tl-now-tip);
    background: var(--tl-now-halo);
    pointer-events: none;
    z-index: 3;
}
.tlw-col.is-today:first-child .tl-now::before { content: none; }
.tlw-col.is-today:first-child .tlw-now-mark { display: none; }
.tlw-col .tl-block {
    inset-inline-start: calc(2px + (100% - 4px) / var(--cols) * var(--col));
    width: calc((100% - 4px) / var(--cols) - 2px);
    padding: 3px 5px 3px 6px;
}
/* A narrow column breaks a title between words, never inside one (the day lane is wide enough
   for "anywhere"); what does not fit is clamped and clipped. break-word and hyphens: auto both
   still split a word that fits no line, and two overlapping blocks at 1024px shredded titles into
   "Чи/та/ть"; a clipped "Чит" reads, and the tooltip has the rest. */
.tlw-col .tl-block-title {
    font-size: var(--text-xs);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: manual;
}
.tlw-col .tl-block-time {
    overflow: hidden;
    text-overflow: ellipsis;
}
/* A three-way overlap leaves a week block about 17px of content: "Чи / кн / пр" and a time cut to
   "1...". From three columns on (TimelineMarkup.NarrowColumns) the block is a colour bar. Its title
   and time are hidden visually, not with display: none, so they still name the button; the tooltip
   keeps the span and the column head opens the Day view, where the block reads in full. */
.tlw-col .tl-block.is-narrow {
    padding: 0;
}
.tlw-col .tl-block.is-narrow > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---- the week: an agenda below 720px --------------------------------------------------------- */
.tlw-agenda { padding-bottom: 6px; }
.tlw-aday { border-bottom: 1px solid var(--chronos-outline); }
.tlw-aday:last-child { border-bottom: 0; }
.tlw-aday-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 48px;
    padding-inline: 6px 4px;
    background: var(--chronos-card-bg);
}
.tlw-aday-title {
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 40px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--chronos-fg-primary);
    font: inherit;
    font-size: var(--text-md);
    font-weight: var(--weight-semibold);
    text-align: start;
    cursor: pointer;
}
.tlw-aday-date::first-letter { text-transform: uppercase; }
.tlw-aday.is-today .tlw-aday-date { color: var(--chronos-violet); }
/* v0.27.0.0: "day off" beside an agenda date - the same pill as "today", in the quiet colours. */
.tlw-dayoff {
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--chronos-fg-muted) 14%, transparent);
    color: var(--chronos-fg-muted);
    font-size: var(--text-2xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.tlw-today {
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--chronos-violet);
    color: #fff;
    font-size: var(--text-2xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.tlw-add {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--chronos-outline);
    border-radius: 50%;
    background: var(--chronos-card-inset);
    color: var(--chronos-violet);
    cursor: pointer;
}
.tlw-add:hover { border-color: color-mix(in srgb, var(--hover-ink) var(--hover-lift), var(--chronos-outline)); }
.tlw-add .material-icons { font-size: 22px; }
.tlw-arow {
    --acc: var(--task-accent, var(--chronos-violet));
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 6px 14px;
    border: 0;
    background: none;
    color: var(--chronos-fg-primary);
    font: inherit;
    text-align: start;
    cursor: pointer;
}
.tlw-arow::before {
    content: "";
    flex: none;
    align-self: stretch;
    width: 3px;
    border-radius: 2px;
    background: var(--acc);
}
.tlw-arow:hover { background: color-mix(in srgb, var(--chronos-violet) 5%, transparent); }
.tlw-arow-time {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    width: 96px;
    font-family: var(--chronos-font-mono);
    font-size: var(--text-sm);
    color: var(--chronos-fg-muted);
    font-variant-numeric: tabular-nums;
}
.tlw-arow-time .material-icons { font-size: 14px; }
.tlw-arow-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--text-md);
}
.tlw-arow.is-due::before { background: transparent; }
.tlw-arow.is-due .tlw-arow-time { color: var(--chronos-violet); }
.tlw-arow.is-due.is-eod .tlw-arow-time { font-family: inherit; font-size: var(--text-xs); }
.tlw-arow.is-overdue .tlw-arow-time { color: var(--tl-overdue); }
.tlw-arow.is-done { opacity: 0.55; }
.tlw-arow.is-done .tlw-arow-title { text-decoration: line-through; }
.tlw-arow.is-main .tlw-arow-title { color: var(--chronos-violet); font-weight: var(--weight-semibold); }
/* A block run on from the evening before: its accent bar is dashed like the grid's open edge, and a
   quiet note under the time says where it began. */
.tlw-arow.is-cont::before {
    background: repeating-linear-gradient(to bottom, var(--acc) 0 4px, transparent 4px 7px);
}
.tlw-arow.is-cont .tlw-arow-time {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}
.tlw-arow-cont {
    font-family: var(--chronos-font-sans);
    font-size: var(--text-2xs);
    line-height: 1.25;
    color: var(--chronos-fg-muted);
}
.tlw-aempty {
    margin: 0;
    padding: 2px 22px 12px;
    font-size: var(--text-sm);
    color: var(--chronos-fg-muted);
}
/* Today's "now" in the agenda: a marker row between the rows that have begun and the ones still
   ahead (TimelineMarkup.AgendaNowIndex) - the same pointer and line as the grid, laid along the
   list. The bezel's digits stand where the rows' times stand. Not a tap target. */
.tlw-anow {
    display: flex;
    align-items: center;
    height: 25px;
    /* A glyph's room widens the bezel at its start: the digits still stand where the rows' times do. */
    padding-inline: calc(20px - var(--tl-now-glyph-room, 0px)) 14px;
    pointer-events: none;
}
.tlw-anow-time {
    position: relative;
    flex: none;
}
/* The line starts 2px under the nose (the pointer is positioned, the line is not, so the nose is on
   top), square there and round at the far end. */
.tlw-anow-line {
    flex: 1;
    min-width: 0;
    height: var(--tl-now-h);
    margin-inline-start: calc(var(--tl-now-tip-w) - 2px);
    border-start-end-radius: 2px;
    border-end-end-radius: 2px;
    background: var(--tl-now);
    box-shadow:
        0 calc(-1 * var(--tl-now-halo-w)) 0 var(--tl-now-halo),
        0 var(--tl-now-halo-w) 0 var(--tl-now-halo),
        0 0 var(--tl-now-glow-size) var(--tl-now-glow);
}
/* The row running now stands above the marker (it has begun), and without a mark of its own it
   read as finished. Its time is set bold in the primary ink, the way a running block's is in the
   grid: this is the one under way. Not in red, because a red time is what an overdue row wears
   (--tl-overdue, the same #DC2626 in the light theme). Round 4: its edge keeps the priority hue; a
   red edge there read as Blaze. */
.tlw-arow.is-now .tlw-arow-time {
    color: var(--chronos-fg-primary);
    font-weight: var(--weight-semibold);
}

@media (min-width: 720px) {
    .tlw-grid { display: block; }
    .tlw-agenda { display: none; }
}

/* ---- dragging: move, stretch, place, clear -------------------------------------------------- */
/* wwwroot/js/chronos-timeline-drag.js. A block or a deadline chip of the viewer's own open task carries
   data-tl-drag; a block also carries two edge handles (TimelineDrag.CanDrag). Nothing here changes how
   a block is laid out, and a tap on any of it is still the tap it was.

   TOUCH. There is no touch-action rule in this sheet on purpose. A touch gesture starts after a long
   press and only then holds the scroll back from script, so a finger that starts on a block still
   scrolls the box; touch-action: none on a block or a handle would take that away.

   THE GHOST is the one thing that moves while a gesture runs. It is a fixed element on the body, sized
   once, and only ever moved by transform (the script's loop writes nothing else), so the gesture costs
   the compositor and not the layout. A stretch scales it from its top edge, which is why a stretched
   ghost has no top or bottom border and no radius: a scaled border would be fat and a scaled corner
   would be an oval. The time label is a separate element, so it is never scaled.

   THE SOURCE BLOCK is not dimmed with opacity (a block must not become a stack of its own, see "blocks"):
   it becomes an empty outline, the place the ghost left. State lives in data attributes the script sets
   (data-tl-gesture on the root, data-tl-target on the column or zone under the pointer, data-tl-source
   on what is being carried), because Blazor owns the class attribute and rewrites it on a render. */
.tl-block[data-tl-drag],
.tl-due[data-tl-drag] {
    cursor: grab;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
/* 14px hit areas on the top and bottom edge, inside the block (it clips). A grip shows on hover on a
   desk and always where there is no hover. The title and the time sit between them, so a tap on the
   middle still opens the popup, and so does a tap on an edge: a click bubbles to the block. */
.tl-block > .tl-handle {
    position: absolute;
    inset-inline: 0;
    height: 14px;
    z-index: 6;
    cursor: ns-resize;
}
.tl-block > .tl-handle-start { top: 0; }
.tl-block > .tl-handle-end { bottom: 0; }
.tl-handle::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    margin-inline: auto;
    width: min(22px, 70%);
    height: 3px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--acc) 70%, var(--chronos-fg-muted));
    opacity: 0;
    transition: opacity 0.12s ease;
}
.tl-handle-start::after { top: 3px; }
.tl-handle-end::after { bottom: 3px; }
.tl-block:hover > .tl-handle::after,
.tl-block:focus-visible > .tl-handle::after { opacity: 1; }
@media (hover: none), (pointer: coarse) {
    .tl-handle::after { opacity: 0.7; }
}
/* A week column's colour bar (is-narrow) hides every span it holds with a 1px clip; the handles are
   spans, and a bar is exactly where a handle is hardest to hit. */
.tlw-col .tl-block.is-narrow > .tl-handle {
    width: auto;
    height: 14px;
    overflow: visible;
    clip-path: none;
}
/* What was picked up: an empty outline where it stood. */
.tl-block[data-tl-source] {
    --tl-block-surface: transparent;
    border-style: dashed;
    color: var(--chronos-fg-muted);
}
.tl-block[data-tl-source] > * { visibility: hidden; }
.tl-due[data-tl-source] { opacity: 0.4; }

/* Where a block is dropped to leave the plan. A day with deadlines has the strip for it; a day without
   one (and the week) has this, a zero-height sticky row that costs the box nothing and shows its pill
   only while a block is carried. The week's sits under the 74px heads and their 1px rule. */
.tl-unplan {
    position: sticky;
    top: 0;
    z-index: 7;
    display: none;
    height: 0;
    pointer-events: none;
}
.tlw-grid > .tl-unplan { top: 75px; }
.tl[data-tl-gesture="move"] .tl-unplan { display: block; }
.tl-unplan-text {
    position: absolute;
    inset-inline: 8px;
    top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    border: 2px dashed color-mix(in srgb, var(--chronos-violet) 65%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--chronos-violet) 9%, var(--chronos-card-bg));
    color: var(--chronos-violet);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    text-align: center;
}
.tl-unplan-text[data-tl-target] {
    border-style: solid;
    background: color-mix(in srgb, var(--chronos-violet) 20%, var(--chronos-card-bg));
}
.tl[data-tl-gesture="move"] .tl-strip {
    outline: 2px dashed color-mix(in srgb, var(--chronos-violet) 55%, transparent);
    outline-offset: -2px;
    border-radius: 12px;
}
.tl-strip[data-tl-target] {
    outline-style: solid;
    background: color-mix(in srgb, var(--chronos-violet) 10%, transparent);
}
/* The week column the carried block would land in. */
.tlw-col[data-tl-target] { background: color-mix(in srgb, var(--chronos-violet) 9%, transparent); }

html.tl-dragging,
html.tl-dragging * {
    cursor: grabbing !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}
.tl-ghost {
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 400;
    width: 0;
    height: 0;
    pointer-events: none;
    direction: ltr;
}
.tl-ghost-box {
    position: absolute;
    inset: 0 auto auto 0;
    box-sizing: border-box;
    transform-origin: 0 0;
    will-change: transform;
    border: 1px solid color-mix(in srgb, var(--acc, var(--chronos-violet)) 60%, var(--chronos-outline));
    border-inline-start: 3px solid var(--acc, var(--chronos-violet));
    border-radius: 8px;
    background: color-mix(in srgb, var(--acc, var(--chronos-violet)) 30%, transparent);
    box-shadow: 0 10px 28px rgba(15, 17, 22, 0.24);
}
.tl-ghost-title {
    display: block;
    padding: 4px 8px;
    overflow: hidden;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    line-height: 1.25;
    color: var(--chronos-fg-primary);
    overflow-wrap: anywhere;
}
.tl-ghost.is-resize .tl-ghost-box {
    border-block-width: 0;
    border-radius: 0;
    box-shadow: none;
}
.tl-ghost.is-outside .tl-ghost-box,
.tl-ghost.is-clearing .tl-ghost-box {
    border-style: dashed;
    background: color-mix(in srgb, var(--chronos-fg-muted) 14%, transparent);
}
.tl-ghost-tag {
    position: absolute;
    inset: 0 auto auto 0;
    padding: 4px 9px;
    border-radius: var(--radius-pill);
    background: var(--chronos-fg-primary);
    color: var(--chronos-card-bg);
    font-family: var(--chronos-font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 8px rgba(15, 17, 22, 0.3);
}
.tl-ghost-tag:empty,
.tl-ghost.is-outside .tl-ghost-tag,
.tl-ghost.is-clearing .tl-ghost-tag { display: none; }
/* Dropped: a saved ghost fades where it stands (the block is drawn under it by then), a refused one
   slides back to the block it came from. */
.tl-ghost.is-settling .tl-ghost-box {
    opacity: 0;
    transition: transform 0.18s ease-out, opacity 0.18s ease-out;
}
.tl-ghost.is-settling .tl-ghost-tag {
    opacity: 0;
    transition: opacity 0.12s ease-out;
}
@media (prefers-reduced-motion: reduce) {
    .tl-handle::after,
    .tl-ghost.is-settling .tl-ghost-box,
    .tl-ghost.is-settling .tl-ghost-tag { transition: none; }
}

/* ---- the plan editor (create modal, detail sidebar) ------------------------------------------ */
.plan-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.plan-empty {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
}
.plan-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    color: var(--chronos-violet);
    font-weight: var(--weight-semibold);
    cursor: pointer;
}
.plan-add .material-icons { font-size: 18px; }
.plan-hint {
    font-size: var(--text-sm);
    color: var(--chronos-fg-muted);
}
.plan-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
}
.plan-row .dtf {
    flex: 1 1 200px;
    min-width: 0;
}
.plan-until {
    font-family: var(--chronos-font-mono);
    font-size: var(--text-sm);
    color: var(--chronos-fg-muted);
    white-space: nowrap;
}
.plan-durations {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

/* v0.30.3.4: the way to the lengths that did not fit the row. An icon, because the row's width is
   the whole problem - three worded chips and this button are what one row of the task window's
   side column holds in every language (PlanDefaults.QuickDurationPresets). It fills violet while
   the chosen length is one of the others, so the row still says that SOMETHING else is picked, and
   its title and accessible name say which. */
.plan-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-height: 32px;
    flex: none;
    padding: 0;
    border: 1px solid var(--chronos-outline);
    border-radius: var(--radius-pill);
    background: var(--chronos-card-inset);
    color: var(--chronos-fg-secondary);
    cursor: pointer;
}
.plan-more .material-icons { font-size: 18px; line-height: 1; }
@media (hover: hover) {
    .plan-more:hover:not(:disabled) {
        border-color: color-mix(in srgb, var(--hover-ink) var(--hover-lift), var(--chronos-outline));
        color: var(--chronos-fg-primary);
    }
}
.plan-more.is-on {
    border-color: var(--chronos-violet);
    background: var(--chronos-violet);
    color: #fff;
}
.plan-more:disabled { opacity: 0.55; cursor: default; }

/* The panel FLOATS. In flow it would push every field under it down the column each time it opens,
   and this window does not move while it is used; the label tray (51-label-picker.css) answers the
   same question the same way, and an absolutely positioned box still extends the body's scrollable
   area, so it can be reached even near the foot. Anchored to the row's end edge, because the
   button it belongs to is the last thing in that row. */
.plan-more-panel {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    padding: 8px;
    background: var(--chronos-card-bg);
    border: 1px solid var(--chronos-outline);
    border-radius: var(--radius-card);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
html[data-theme="dark"] .plan-more-panel { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }

/* The handle popover-dismiss.js pulls on an outside click or Escape. Off-screen, never
   display:none: the script dispatches a click on it, and a click needs a rendered box. */
.plan-dismiss {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.plan-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--chronos-outline);
    border-radius: var(--radius-pill);
    background: var(--chronos-card-inset);
    color: var(--chronos-fg-primary);
    font: inherit;
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    cursor: pointer;
}
.plan-chip:hover { border-color: color-mix(in srgb, var(--hover-ink) var(--hover-lift), var(--chronos-outline)); }
.plan-chip.is-selected {
    border-color: var(--chronos-violet);
    background: var(--chronos-violet);
    color: #fff;
}
.plan-chip.is-custom { cursor: default; }
.plan-chip:disabled { opacity: 0.55; cursor: default; }
.plan-clear {
    /* It lives in .plan-row now (align-items: center). The auto margin pushes it to the far end of
       whatever line it lands on, so it never reads as part of the "до 11:30" phrase beside it; in
       the wide modal the start field grows and the free space, and so the margin, is zero. */
    align-self: center;
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--chronos-fg-muted);
    font: inherit;
    font-size: var(--text-base);
    cursor: pointer;
}
.plan-clear .material-icons { font-size: 18px; }
.plan-clear:hover { color: var(--tl-overdue, #DC2626); }
.plan-clear:disabled { opacity: 0.55; cursor: default; }
/* The task window's side column is 288px at the full-size card and 240px once 94vw has narrowed it
   (59-task-window.css): the start field takes the whole row there either way. */
.tw-side .plan-row .dtf { flex-basis: 100%; }
.tw-side .plan-chip { padding: 0 10px; min-height: 30px; }
/* v0.30.3.2: the remove control is read, not aimed at, so 24px is its pointer floor and the column
   gets 8px back. Touch keeps 40px, re-stated at .tw-side weight below: a bare .plan-clear rule
   inside the media query is (0,1,0) and would silently LOSE to the line above it. */
.tw-side .plan-clear { min-height: 24px; }
@media (pointer: coarse) {
    .plan-chip, .plan-clear { min-height: 40px; }
    .tw-side .plan-chip, .tw-side .plan-clear { min-height: 40px; }
}
