/* Today as one day (views/today.js, today-day.js, today-rows.js, day-score.js): the date row, the day card with its
   ring and five pillar bars, the fixed rows (label, value, +), The day, and the "Adding to" line of the Add sheet
   (views/add.js). Colours come from the tokens in style.css only. */

/* The date row: the arrows at the ends, the date between them (a button that opens the month calendar). */
.tdy-date{display:flex;align-items:center;gap:6px;margin-block-end:10px}
/* an arrow: a 48 px pill, the chevron at its outer end and the day it opens beside it, so it does not read as the
   top bar's round Back */
.tdy-step{display:inline-flex;align-items:center;gap:2px;flex:none;min-block-size:48px;padding-block:0;padding-inline:6px 12px;border-radius:24px;border:1px solid var(--edge);background:var(--surface);color:var(--ink2);font:700 .85rem var(--sans);white-space:nowrap;cursor:pointer}
.tdy-step.next{padding-inline:12px 6px}
.tdy-step .i{width:18px;height:18px}
/* the place of an arrow not offered (the next day on today, the day before the demo's first), kept so the date stays centred */
span.tdy-step{visibility:hidden}
.tdy-datef{flex:1;min-inline-size:0;display:flex;flex-direction:column;align-items:center;min-block-size:48px;justify-content:center;padding:0;border:0;background:none;color:inherit;font:inherit;cursor:pointer}
.tdy-datef b{font-size:1.02rem}
.tdy-back{flex:none}

/* The month calendar (views/today-cal.js): the month between its arrows, the weeks Sunday first at the inline start,
   a dot under a day that holds an entry, the day shown filled, today ringed. 44 px cells: seven fit 390 px. */
.tcal-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-block-end:8px}
.tcal-head b{font-size:1.05rem}
.tcal-head .iconbtn:disabled{opacity:.35;cursor:default}
.tcal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;justify-items:center;padding-block-end:8px}
.tcal-wd{font-size:.76rem;font-weight:800;color:var(--mut);padding-block:4px}
.tcal-day{position:relative;inline-size:44px;block-size:44px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:none;color:var(--ink);font:700 .95rem var(--sans);cursor:pointer}
.tcal-day i{position:absolute;inset-block-end:5px;inline-size:5px;block-size:5px;border-radius:50%;background:transparent}
.tcal-day[data-has="1"] i{background:var(--a)}
.tcal-day[data-today="1"]{box-shadow:inset 0 0 0 2px var(--a)}
.tcal-day[aria-current=date]{background:var(--a);color:var(--surface)}
.tcal-day[aria-current=date] i{background:var(--surface)}
.tcal-day:disabled{color:var(--mut);opacity:.45;cursor:default}

/* The day card: the head (title, body chip), the ring with the five pillars beside it, the sentence and More. */
/* gap and block padding kept tight: the head and More are 48 px targets already, and Today in Hebrew (its sentence on
   two lines) must stay within a root's two screens (P5) */
.day-card{display:flex;flex-direction:column;gap:8px;padding:12px 18px;background:linear-gradient(165deg,var(--a-soft),color-mix(in srgb,var(--d-soft) 45%,var(--surface)))}
.dc-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.dc-title{display:inline-flex;align-items:center;gap:4px;min-block-size:48px;padding:0;border:0;background:none;color:var(--mut);font:800 .78rem var(--sans);letter-spacing:.1em;text-transform:uppercase;cursor:pointer}
[lang=he] .dc-title{letter-spacing:0;font-size:.86rem}
.dc-body{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:16px;cursor:pointer}
.dc-ring{position:relative;inline-size:104px;block-size:104px;display:grid;place-items:center;align-content:center}
.dc-ring svg{position:absolute;inset:0;inline-size:100%;block-size:100%}
.dc-track{fill:none;stroke:var(--line);stroke-width:8}
.dc-arc{fill:none;stroke:var(--a);stroke-width:8;stroke-linecap:round}
.dc-n{position:relative;font:600 2.1rem/1 var(--serif);color:var(--ink)}
.dc-w{position:relative;font-weight:700;font-size:.74rem;color:var(--ink2)}
/* one grid for the five rows, so every bar starts after the longest label of the language (Hebrew's Rest is long);
   rows 4 px apart, so the five stand about the ring's 104 px and do not make the card taller than the ring */
.dc-pillars{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:4px 8px;font-size:.8rem;font-weight:700;color:var(--ink2)}
.dc-pillars li{display:contents}
.dc-bar{display:block;block-size:8px;border-radius:var(--pill);background:var(--surface2);overflow:hidden}
.dc-bar i{display:block;block-size:100%;border-radius:var(--pill);background:var(--a)}
.dc-bar[data-on=none]{background:repeating-linear-gradient(90deg,var(--surface2) 0 6px,transparent 6px 10px)}
.dc-sent{margin:0;color:var(--ink);font-weight:600}
.dc-more summary{cursor:pointer;color:var(--a);font-weight:700;min-block-size:48px;display:flex;align-items:center}
.dc-open{align-self:flex-start;display:inline-flex;align-items:center;gap:4px;min-block-size:48px}
/* the body score as the card's last line, "Your body: 85, very good" with its arrow to Body */
.dc-bodyl{align-self:stretch;display:flex;align-items:center;justify-content:space-between;gap:8px;min-block-size:48px;padding-block-start:4px;border-block-start:1px solid var(--line);color:var(--ink);font-weight:700;text-align:start}

/* The short day card of a day with glucose (views/today-day.js shortCard): one row, at most 100 px tall at 390 px, so
   the glucose card's value and the top of its chart stay on the first screen. */
.dc-short{padding:10px 14px}
.dc-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;inline-size:100%;min-block-size:48px;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:start;cursor:pointer}
.dc-ring-s{inline-size:56px;block-size:56px}
.dc-ring-s .dc-n{font-size:1.35rem}
.dc-txt{display:flex;flex-direction:column;gap:2px;min-inline-size:0}
.dc-sw{font-size:.86rem;color:var(--ink2)}
.dc-short .dc-sent{font-size:.9rem;line-height:1.3;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden}
.dc-extra{display:flex;flex-direction:column;gap:6px;margin-block-start:12px}

/* The fixed rows: the label and its value open the row's home; the + (or the habit's tick) at the end. A row is its
   48 px target tall, no more, so the six rows and Food's usual-meal line keep Today within two screens (P5). */
/* the rows stand on the card's ground, never on the traces (P9); The day's rows are cards of their own */
.tdy-rows{display:flex;flex-direction:column;padding-inline:var(--s-4);border:1px solid var(--card-edge);border-radius:var(--r);background:var(--card-bg);box-shadow:var(--shadow-sm)}
.tdy-rows{margin-block:12px}
.tdy-rows>.tdy-row:last-child{border-block-end:0}
.tdy-row{border-block-end:1px solid var(--line)}
.tdy-rowh{display:flex;align-items:center;gap:8px}
.tdy-rowgo{flex:1;display:grid;grid-template-columns:6.2em minmax(0,1fr);align-items:center;gap:10px;min-block-size:48px;padding:6px 0;border:0;background:none;color:inherit;font:inherit;text-align:start;cursor:pointer}
.tdy-rowk{font-weight:800;font-size:.86rem;color:var(--mut)}
.tdy-rowv{font-weight:700;color:var(--ink);overflow:hidden;text-overflow:ellipsis}
/* a term and a number with its unit never break: today's Morning value (the HRV, its unit, its word) is one line, and a
   past day's, with its night, breaks only between its parts */
.tdy-rowv bdi{white-space:nowrap}
/* "Track your food?" unanswered: Yes and Not now under the question, in the value's column */
.tdy-ask{display:flex;flex-wrap:wrap;gap:8px;padding-block-end:10px;padding-inline-start:calc(6.2em + 10px)}
.tdy-row .lrows{padding-block-end:8px}
.tdy-tick{flex:none}
.tdy-row .home-lead{margin-block:6px 10px}

/* The day: every entry, the newest first, the time leading each row. */
.tdy-day .mrow .when{flex:none;min-inline-size:3.2em;color:var(--mut);font-size:.84rem;font-weight:700}
.tdy-empty{margin-block:12px;margin-inline:auto;text-align:center}

/* The day's score screen. */
.day-score{display:flex;flex-direction:column;gap:12px}
/* the word beside the big number, at body size so a two-word grade (Hebrew Exceptional) stays on one line */
.ds-word{display:inline-block;margin-inline-start:.4em;font-size:1.05rem;font-weight:800;color:var(--a);vertical-align:middle}
.me-segs{margin-block-end:10px}
/* the five parts under the day card's five words: the name, its bar, its points; one grid so the bars line up */
.ds-parts{list-style:none;margin:4px 0 0;padding:0;display:grid;grid-template-columns:max-content minmax(0,1fr) max-content;align-items:center;gap:10px 12px}
.ds-parts li{display:contents}
.ds-parts li[data-state=none] b{color:var(--mut);font-weight:600}
/* a measured Recovery whose usual still builds says so in two short lines, so its column does not crowd the bar off the card */
.ds-parts .ds-building{display:inline-block;max-inline-size:11em;line-height:1.3}
/* the rest of the screen folded under its headings, each a 48 px target; This week's own heading is the fold's */
/* (details.fold of widgets.css draws the summary and its arrow) */
.ds-fold>summary .sec{margin:0}
.ds-fold[open]>summary{margin-block-end:8px}
.ds-fold .fit-week>h2.sec:first-child{display:none}
.ds-cardio{margin:8px 4px}

/* The Add sheet's "Adding to <day>" line, with Change over a native date field. */
.add-day{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px;padding:8px 12px;border-radius:var(--r);background:var(--a-soft);color:var(--ink);font-weight:700}
.add-day span{display:inline-flex;align-items:center;gap:6px}
.add-dayc{position:relative;min-block-size:48px;display:inline-flex;align-items:center}
.add-dayc input{position:absolute;inset:0;opacity:0;inline-size:100%;cursor:pointer}

/* An import's hourly steps or pulse: one line of the day that opens its hours (views/today-rows.js hoursRow). The line
   is a summary drawn as the list's row, so the paper backdrop of a bare summary (paper.css) is taken off it. */
.tdy-hours>summary.mrow{list-style:none;width:auto;max-width:none;background:var(--surface);box-shadow:none;border-radius:var(--rm)}
.tdy-hours>summary.mrow::-webkit-details-marker{display:none}
.tdy-hrs{padding-inline-start:12px}
