/* The desktop dashboard canvas (design/dashboard-canvas), on the phone app's tokens from docs/DESIGN.md: work green,
   break amber, travel indigo. Assumed time is hatched, a stretch still running at the last sync fades out. */
@font-face{font-family:'Bricolage Grotesque';font-style:normal;font-display:swap;font-weight:200 800;src:url(fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Bricolage Grotesque';font-style:normal;font-display:swap;font-weight:200 800;src:url(fonts/bricolage-grotesque-latin-opsz-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
  color-scheme: light;
  --bg: #FBF9F4; --lowest: #FFFFFF; --container: #F1EEE7; --high: #E6E2D9;
  --on: #1C1B18; --var: #5D5B55; --outline: #B8B4AA; --outline-var: #DDD9D0;
  --primary: #1E7A64; --on-primary: #FFFFFF; --wc: #CDEBE1; --on-wc: #0B3F33; --sec: #D9E6E1; --on-sec: #12312A;
  --work: #1E7A64; --break: #B9800F; --travel: #5459C8; --err: #A4471C; --scrim: rgba(28, 27, 24, .32);
  --h1: #DCEFE7; --h2: #A9DAC8; --h3: #5FB79C; --h4: #1E7A64; --h5: #0E4D3E;
  --tip-bg: #1C1B18; --tip-ink: #ECE9E1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141412; --lowest: #1C1C19; --container: #262622; --high: #30302B;
    --on: #ECE9E1; --var: #A8A59C; --outline: #5A5952; --outline-var: #37362F;
    --primary: #6FC9B0; --on-primary: #003527; --wc: #0F5646; --on-wc: #BDF0E0; --sec: #2E4A43; --on-sec: #CFE8E0;
    --work: #6FC9B0; --break: #F0BC5A; --travel: #A3A8F2; --err: #F0A27A; --scrim: rgba(0, 0, 0, .5);
    --h1: #173B32; --h2: #1D5A4A; --h3: #2E8A70; --h4: #6FC9B0; --h5: #B6EAD9;
    --tip-bg: #ECE9E1; --tip-ink: #1C1B18;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141412; --lowest: #1C1C19; --container: #262622; --high: #30302B;
  --on: #ECE9E1; --var: #A8A59C; --outline: #5A5952; --outline-var: #37362F;
  --primary: #6FC9B0; --on-primary: #003527; --wc: #0F5646; --on-wc: #BDF0E0; --sec: #2E4A43; --on-sec: #CFE8E0;
  --work: #6FC9B0; --break: #F0BC5A; --travel: #A3A8F2; --err: #F0A27A; --scrim: rgba(0, 0, 0, .5);
  --h1: #173B32; --h2: #1D5A4A; --h3: #2E8A70; --h4: #6FC9B0; --h5: #B6EAD9;
  --tip-bg: #ECE9E1; --tip-ink: #1C1B18;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--on);
  font: 14px/20px 'Segoe UI', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
a:hover { color: var(--on-wc); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1, h2, p { margin: 0; }
button, select { font: inherit; color: inherit; }
.d { font-family: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif; font-optical-sizing: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.tn { font-variant-numeric: tabular-nums; }
.muted { color: var(--var); }
.small { font-size: 13px; line-height: 18px; }
.lbl { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .04em; color: var(--var); }
.ico { flex: none; fill: currentColor; }
.grow { flex-grow: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 22px; border: 0; background: var(--primary); color: var(--on-primary) !important;
  font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn.tonal { background: var(--sec); color: var(--on-sec) !important; }
.btn.out { background: transparent; color: var(--primary) !important; box-shadow: inset 0 0 0 1px var(--outline); }
.btn.txt { background: transparent; color: var(--primary) !important; padding: 0 14px; }
.btn.big { height: 52px; padding: 0 26px; border-radius: 26px; font-size: 15px; gap: 10px; }
.btn.out:hover, .btn.txt:hover, .ib:hover, .nv:hover { background: color-mix(in srgb, var(--on) 6%, transparent); }
.ib {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 22px;
  border: 0; background: transparent; color: var(--on); cursor: pointer; text-decoration: none;
}

/* Shell: the sidebar wraps above the page on a narrow window */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }
.side {
  flex: 1 1 232px; padding: 24px 16px 20px; display: flex; flex-direction: column; gap: 28px; background: var(--container);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; color: var(--on) !important; }
.brand .d { font-size: 20px; line-height: 28px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nv {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; border-radius: 22px;
  color: var(--var) !important; text-decoration: none; font-weight: 500;
}
.nv[aria-current] { background: var(--sec); color: var(--on-sec) !important; font-weight: 600; }
.synccard { background: var(--lowest); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.synccard .d { font-size: 16px; line-height: 24px; }
.stack { display: flex; flex-direction: column; gap: 2px; }
.menu { position: relative; padding: 0 8px; }
.menu summary { list-style: none; cursor: pointer; color: var(--var); font-size: 13px; line-height: 18px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; min-height: 24px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding: 6px; border-radius: 16px; background: var(--lowest); }
.menu-pop button { text-align: left; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.menu-pop button:hover { background: var(--container); }
.menu-pop .danger { color: var(--err); }
.side-note { display: flex; gap: 10px; padding: 0 8px; color: var(--var); font-size: 13px; line-height: 18px; }
.side-note .ico { margin-top: 1px; }
.site-links { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 14px 8px 0; border-top: 1px solid var(--outline-var); font-size: 13px; line-height: 18px; }
.site-links a { color: var(--var); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.site-links a:hover { color: var(--on); }

.main { flex: 999 1 640px; min-width: 0; padding: 28px 36px 48px; display: flex; flex-direction: column; gap: 24px; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.head h1 { font-size: 30px; line-height: 36px; letter-spacing: -0.01em; }
.head-actions { display: flex; align-items: center; gap: 4px; }
/* EN · DE, as on the website: the current language is the darker one. */
.langs { display: inline-flex; align-items: center; color: var(--outline); font-size: 14px; line-height: 20px; font-weight: 600; }
.langs button { border: 0; background: transparent; color: var(--var); font: inherit; padding: 12px 6px; border-radius: 12px; cursor: pointer; }
.langs button:hover { color: var(--on); text-decoration: underline; }
.langs button[aria-pressed="true"] { color: var(--on); }
.ib.today-btn { width: auto; padding: 0 16px; font-weight: 500; color: var(--primary); }
.banner { padding: 12px 16px; border-radius: 16px; background: var(--container); color: var(--var); }
#view { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
body.is-empty .side, body.is-empty .head { display: none; }
body.is-empty .main { padding: 0; }

/* Cards */
.card { background: var(--lowest); border-radius: 28px; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card h2 { font-size: 18px; line-height: 24px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.hero { background: var(--wc); color: var(--on-wc); border-radius: 28px; padding: 24px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.hero.sec { background: var(--sec); color: var(--on-sec); }
.hero .soft { opacity: .78; }
.hero .big { font-size: 56px; line-height: 60px; letter-spacing: -0.02em; }
.hero .sub { font-size: 16px; line-height: 22px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.kpis.lead { grid-template-columns: minmax(240px, 1.4fr) repeat(auto-fit, minmax(160px, 1fr)); }
.kpi { background: var(--lowest); border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-width: 0; }
.kpi .v { font-size: 26px; line-height: 32px; }
.kpi .k { color: var(--var); display: flex; align-items: center; gap: 8px; }
.kpi .n { color: var(--var); font-size: 13px; line-height: 18px; }
.kpi.lead { background: var(--wc); color: var(--on-wc); border-radius: 24px; padding: 18px 22px; }
.kpi.lead .k, .kpi.lead .n { color: inherit; opacity: .78; }
.kpi.lead .n { font-size: 14px; line-height: 20px; }
.kpi.lead .v { font-size: 44px; line-height: 48px; letter-spacing: -0.02em; }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .wide { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split > .narrow { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.note-box { padding: 12px 14px; border-radius: 12px; background: var(--container); color: var(--var); }
.hint-row { display: flex; align-items: center; gap: 10px; color: var(--var); font-size: 13px; line-height: 18px; }
.empty-card { background: var(--lowest); border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.empty-card .d { font-size: 22px; line-height: 28px; }

/* Rings: a 270° arc, the target is the full arc */
.ring { position: relative; flex: none; }
.ring svg { display: block; }
.ring .track { fill: none; stroke: currentColor; stroke-opacity: .16; stroke-linecap: round; }
.ring .fill { fill: none; stroke: var(--work); stroke-linecap: round; }
.ring .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring .mid small { font-size: 11px; line-height: 14px; opacity: .75; }

/* Segment keys and fills */
.key { --c: var(--work); flex: none; display: inline-block; width: 20px; height: 10px; border-radius: 5px; background: var(--c); }
.sg { --c: var(--work); position: absolute; top: 0; bottom: 0; border-radius: 10px; background: var(--c); }
.vb { --c: var(--work); flex: none; width: 10px; border-radius: 5px; background: var(--c); }
.nd { --c: var(--work); flex: none; width: 14px; height: 14px; border-radius: 50%; border: 4px solid var(--c); background: var(--lowest); }
.b { --c: var(--break); }
.t { --c: var(--travel); }
.a { background: repeating-linear-gradient(135deg, var(--c) 0 4px, color-mix(in srgb, var(--c) 45%, var(--lowest)) 4px 8px); }
.sg.o { border-top-right-radius: 0; border-bottom-right-radius: 0; -webkit-mask-image: linear-gradient(90deg, #000 50%, transparent); mask-image: linear-gradient(90deg, #000 50%, transparent); }
.vb.o { -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.key.o { -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent); mask-image: linear-gradient(90deg, #000 30%, transparent); }
.nd.goal { border: 2px dashed var(--var); background: transparent; }
.nd.guess { border: 2px dashed var(--var); }
.rw { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--container); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .04em; color: var(--var); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--var); font-size: 13px; line-height: 18px; }
.legend li { display: flex; align-items: center; gap: 6px; }

/* Week: hour by hour */
.hours { padding: 20px 16px 16px; gap: 6px; }
.hours .card-head { padding: 0 12px 8px; }
.wgrid { display: grid; grid-template-columns: 64px minmax(0, 1fr) 26px 84px 48px; align-items: center; column-gap: 16px; }
.waxis { padding: 0 12px; font-size: 11px; line-height: 16px; color: var(--var); }
.waxis .right { text-align: right; }
.waxis .center { text-align: center; }
.ticks { position: relative; height: 16px; }
.ticks span { position: absolute; white-space: nowrap; }
.wr { width: 100%; height: 52px; padding: 0 12px; border: 0; border-radius: 14px; background: transparent; color: var(--on); text-align: left; cursor: pointer; }
.wr:hover { background: color-mix(in srgb, var(--on) 5%, transparent); }
.wr[aria-pressed="true"] { background: var(--sec); }
.wl { font-size: 13px; line-height: 16px; color: var(--var); }
.wl.today { color: var(--primary); font-weight: 600; }
.tr { position: relative; height: 20px; border-radius: 10px; background-color: var(--container); background-image: linear-gradient(90deg, var(--outline-var) 1px, transparent 1px); background-size: 12.5% 100%; }
.wr[aria-pressed="true"] .tr, .wr[aria-pressed="true"] .wb { background-color: color-mix(in srgb, var(--lowest) 60%, transparent); }
.pl { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 13px; color: var(--var); }
.pl.guess { outline: 1.5px dashed var(--var); outline-offset: -1.5px; }
.wt { font-size: 16px; line-height: 24px; text-align: right; white-space: nowrap; }
.wt.none { color: var(--var); }
.wb { position: relative; height: 6px; border-radius: 3px; background: var(--container); }
.wbf { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--work); }
.synctick { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--on); }

/* The day panel and step by step: a vertical timeline of stops and stretches */
.panel { padding: 22px 24px 24px; gap: 16px; }
.panel-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-top .total { font-size: 40px; line-height: 46px; letter-spacing: -0.02em; }
.chip { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--wc); color: var(--on-wc); align-self: flex-start; font-weight: 500; }
.chip .pulse { width: 16px; height: 16px; border-radius: 8px; background: color-mix(in srgb, var(--work) 28%, transparent); display: flex; align-items: center; justify-content: center; }
.chip .pulse::after { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--work); }
.rule { height: 1px; background: var(--outline-var); }
.vt { display: flex; flex-direction: column; }
.vt-stop, .vt-stretch, .vt-sync, .vt-togo { display: flex; gap: 12px; }
.vt-stop { align-items: center; height: 24px; }
.vt-stretch, .vt-togo { align-items: stretch; }
.vt-sync { align-items: center; height: 28px; }
.vt-time { width: 48px; flex: none; font-weight: 500; font-variant-numeric: tabular-nums; }
.vt-time.guess { font-style: italic; }
.vt-rail { width: 24px; flex: none; display: flex; justify-content: center; }
.vt-stretch .vt-rail { padding: 3px 0; }
.vt-body { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.vt-body .d { font-size: 18px; line-height: 24px; }
.vt-title { display: flex; align-items: center; gap: 8px; }
.vt-sync .vt-time { width: 52px; margin-left: -4px; height: 28px; border-radius: 14px; background: var(--work); color: var(--on-primary); display: flex; align-items: center; justify-content: center; }
.vt-sync .nd { box-shadow: 0 0 0 6px var(--wc); }
.vt-sync .lab { color: var(--work); font-weight: 500; }
.vt-togo { height: 56px; }
.vt-togo .vt-rail span { width: 0; border-left: 2px dotted var(--outline); }
.vt-togo .vt-body { color: var(--var); }

/* Day: the hour-by-hour bar */
.daybar { position: relative; height: 44px; border-radius: 14px; background-color: var(--container); background-image: linear-gradient(90deg, var(--outline-var) 1px, transparent 1px); }
.daybar .sg { border-radius: 12px; display: flex; align-items: center; padding: 0 12px; overflow: hidden; white-space: nowrap; color: var(--on-primary); font-size: 13px; line-height: 18px; font-weight: 500; }
.daybar .sg.a { color: var(--on); }
.daybar .endline { position: absolute; top: -8px; bottom: -8px; border-left: 2px dashed var(--var); }
.dayticks { position: relative; height: 34px; font-size: 12px; line-height: 16px; color: var(--var); }
.dayticks span { position: absolute; white-space: nowrap; }
.dayticks .endlab { top: 18px; transform: translateX(-50%); color: var(--on); font-style: italic; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 16px; background: color-mix(in srgb, var(--lowest) 35%, transparent); font-weight: 500; }
.hero-right { display: flex; align-items: center; gap: 24px; }
.hero-right .stack { gap: 8px; align-items: flex-end; }
.why { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--container); }

/* Tables */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .04em; color: var(--var); padding: 0 16px 10px 0; border-bottom: 1px solid var(--outline-var); white-space: nowrap; }
td, tbody th { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--outline-var); white-space: nowrap; }
tbody th { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--on); }
tbody th a { color: inherit; text-decoration: none; }
tbody th a:hover { text-decoration: underline; }
tr.muted td, tr.muted th { color: var(--var); }
tr.today td, tr.today th { background: color-mix(in srgb, var(--wc) 45%, transparent); }
tfoot td { border-bottom: 0; padding-top: 14px; }
.num { text-align: right; }
.guess { font-style: italic; color: var(--var); }
.flag { display: inline-flex; align-items: center; gap: 6px; }
.flag .key { width: 14px; height: 8px; border-radius: 4px; }

/* Month: the calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) 108px; gap: 8px; }
.cal .lbl { padding: 0 4px; }
.cell { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 104px; padding: 10px 12px 12px; border-radius: 16px; background: var(--container); color: var(--on) !important; text-decoration: none; min-width: 0; }
.cell:hover { box-shadow: inset 0 0 0 2px var(--outline); }
.cell.empty { background: transparent; box-shadow: inset 0 0 0 1px var(--outline-var); }
.cell.future { background: transparent; opacity: .55; }
.cell.today { box-shadow: inset 0 0 0 2px var(--primary); }
.cell .row1, .cell .row2 { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; min-width: 0; }
.cell .row2 { align-items: center; }
.cell .num { font-size: 13px; line-height: 16px; color: var(--var); text-align: left; }
.cell.today .num { color: var(--primary); font-weight: 600; }
.cell .mark { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .tot { font-size: 18px; line-height: 24px; white-space: nowrap; }
.cell .ico { color: var(--var); }
.mb { position: relative; height: 8px; border-radius: 4px; background: var(--lowest); }
.cell.empty .mb, .cell.future .mb { background: var(--container); }
.mb .sg { border-radius: 4px; }
.mb .sg.a { background: repeating-linear-gradient(135deg, var(--c) 0 3px, color-mix(in srgb, var(--c) 45%, var(--lowest)) 3px 6px); }
.wk { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 4px 0 14px; border-left: 1px solid var(--outline-var); color: var(--var) !important; text-decoration: none; font-size: 13px; line-height: 18px; min-width: 0; }
.wk:hover { color: var(--on) !important; }
.wk .d { font-size: 16px; line-height: 22px; color: var(--on); }
.side-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.trow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--outline-var); }
.trow:first-of-type { border-top: 0; }
.trow .d { font-size: 16px; }
.look { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--container); color: var(--on) !important; text-decoration: none; }
.look:hover { background: var(--high); }
.look .stack { flex-grow: 1; }

/* Year */
.bal { position: relative; height: 220px; margin-left: 52px; }
.bal .gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--outline-var); }
.bal .gl.zero { border-top-color: var(--outline); }
.bal .gl span { position: absolute; left: -52px; width: 44px; text-align: right; transform: translateY(-50%); font-size: 12px; color: var(--var); }
.bal svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bal .area { fill: var(--work); fill-opacity: .1; }
.bal .line { fill: none; stroke: var(--work); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bal .dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 6px; background: var(--work); box-shadow: 0 0 0 2px var(--lowest); }
.bal .endv { position: absolute; transform: translate(12px, -50%); font-size: 16px; line-height: 22px; white-space: nowrap; }
.bal .endv.left { transform: translate(calc(-100% - 12px), -50%); }
.mlabels { position: relative; height: 16px; margin-left: 52px; font-size: 12px; color: var(--var); }
.mlabels span { position: absolute; }
.heat { display: flex; gap: 10px; width: max-content; }
.heat-days { display: grid; grid-template-rows: 16px repeat(7, 13px); row-gap: 3px; font-size: 11px; line-height: 13px; color: var(--var); }
.heat-cols { display: flex; flex-direction: column; gap: 3px; }
.heat-months { position: relative; height: 16px; font-size: 11px; line-height: 16px; color: var(--var); }
.heat-months span { position: absolute; }
.heat-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); grid-auto-columns: 13px; gap: 3px; }
.hc { position: relative; display: block; width: 13px; height: 13px; border-radius: 3px; background: transparent; box-shadow: inset 0 0 0 1px var(--outline-var); }
.hc.home::after { content: ""; position: absolute; inset: 4.5px; border-radius: 50%; background: var(--lowest); }
.hc.e { box-shadow: none; background: color-mix(in srgb, var(--outline-var) 45%, transparent); }
.hc.f, .hc.x { box-shadow: none; background: transparent; }
.hc.h1 { background: var(--h1); box-shadow: none; } .hc.h2 { background: var(--h2); box-shadow: none; } .hc.h3 { background: var(--h3); box-shadow: none; }
.hc.h4 { background: var(--h4); box-shadow: none; } .hc.h5 { background: var(--h5); box-shadow: none; }
.hc.a { background-image: repeating-linear-gradient(135deg, transparent 0 2px, color-mix(in srgb, var(--lowest) 70%, transparent) 2px 4px); }
.hc.today { outline: 2px solid var(--on); outline-offset: 1px; }
.legend .hc { display: inline-block; }
.mbar { position: relative; height: 8px; border-radius: 4px; background: var(--container); min-width: 120px; }
.mbf { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--work); }
.mtick { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--on); }

/* Timesheet */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.seg { display: inline-flex; height: 40px; padding: 3px; border-radius: 20px; background: var(--container); gap: 2px; }
.seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 17px; background: transparent; color: var(--var); font-size: 13px; line-height: 18px; font-weight: 500; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--lowest); color: var(--on); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.callout { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--container); color: var(--var); }
.callout b { color: var(--on); font-weight: 600; }

/* First run */
.welcome { min-height: 100vh; padding: 28px 36px 56px; display: flex; flex-direction: column; gap: 32px; }
.welcome-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.welcome-top .brand { padding: 0; }
.welcome-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 24px; }
.welcome-nav a { color: var(--var); text-decoration: none; font-weight: 500; }
.welcome-nav a.go { color: var(--primary); }
.welcome-body { width: min(1120px, 100%); align-self: center; display: flex; flex-wrap: wrap; align-items: center; gap: 48px 64px; }
.welcome-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.welcome-text h1 { font-size: 52px; line-height: 56px; letter-spacing: -0.02em; }
.welcome-text .lede { font-size: 17px; line-height: 26px; color: var(--var); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 24px; }
.steps li { display: flex; gap: 14px; align-items: center; }
.stepnum { flex: none; width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--primary); color: var(--on-primary); font-weight: 600; }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.welcome-art { flex: 1 1 420px; min-width: 0; display: flex; justify-content: center; }
.art { position: relative; width: 420px; max-width: 100%; height: 440px; }
.art-card { position: absolute; left: 0; top: 30px; width: 300px; height: 360px; border-radius: 28px; background: var(--lowest); box-shadow: 0 24px 64px rgba(0, 0, 0, .12); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.art-card .d { font-size: 40px; line-height: 44px; }
.art-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.art-row { display: flex; align-items: center; gap: 10px; }
.art-row .tn { width: 44px; font-size: 12px; color: var(--var); }
.art-row .tr { flex: 1; height: 12px; border-radius: 6px; background-image: none; }
.art-row .sg { border-radius: 6px; }
.phone { position: absolute; right: 0; top: 0; width: 168px; height: 320px; transform: rotate(6deg); border-radius: 30px; background: #111110; box-shadow: 0 24px 56px rgba(0, 0, 0, .3), inset 0 0 0 2px #2C2B28; }
/* The app's Show on PC screen (DESIGN.md 5.17), drawn in its light colours whatever this page's theme. */
.phone-screen { position: absolute; inset: 8px; border-radius: 23px; background: #FBF9F4; display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 18px 10px 0; color: #1C1B18; }
.phone-screen .d { font-size: 14px; line-height: 18px; font-weight: 600; padding-left: 2px; }
.phone-screen .seg { display: flex; border: 1px solid #B8B4AA; border-radius: 12px; overflow: hidden; font-size: 9px; line-height: 20px; text-align: center; }
.phone-screen .seg span { flex: 1; }
.phone-screen .seg .on { background: #D9E6E1; color: #12312A; font-weight: 500; }
.phone-screen .qr { display: flex; justify-content: center; padding: 12px 0; border-radius: 16px; background: #FFFFFF; }
.phone-screen small { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 10px; line-height: 14px; color: #5D5B55; }
.phone-screen .dot { width: 6px; height: 6px; border-radius: 3px; background: #1E7A64; box-shadow: 0 0 0 3px rgba(30, 122, 100, .28); }
.facts { width: min(1120px, 100%); align-self: center; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.facts .card { padding: 24px 26px; gap: 12px; }
.fact { display: flex; gap: 10px; align-items: flex-start; }
.fact .ico { fill: var(--primary); }
.fact.no .ico { fill: var(--var); }

/* Sync dialog */
dialog#rx { width: min(880px, calc(100% - 32px)); max-width: none; padding: 0; border: 0; border-radius: 28px; background: var(--lowest); color: var(--on); box-shadow: 0 24px 64px rgba(0, 0, 0, .18); overflow: hidden; }
dialog#rx::backdrop { background: var(--scrim); }
.rx { display: flex; flex-wrap: wrap; }
.rx-cam { flex: 1 1 420px; min-width: 0; position: relative; aspect-ratio: 4 / 3; background: #0E0E0D; }
.rx-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .1s; }
.rx-cam video.hit { outline-color: #6FC9B0; }
.rx-badge { position: absolute; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 14px; background: rgba(0, 0, 0, .55); color: #ECE9E1; font-size: 12px; line-height: 16px; font-weight: 500; }
.rx-badge::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: #A8A59C; }
.rx-badge.live::before { background: #6FC9B0; }
.rx-mirror { position: absolute; right: 16px; bottom: 14px; color: rgba(236, 233, 225, .7); font-size: 12px; }
.rx-side { flex: 1 1 360px; min-width: 0; padding: 26px 28px 22px; display: flex; flex-direction: column; gap: 18px; }
.rx-side h2 { font-size: 22px; line-height: 28px; }
.rx-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rx-steps li { display: flex; align-items: flex-start; gap: 12px; }
.rx-steps li > span:last-child { padding-top: 3px; }
.rx-steps .col { display: flex; flex-direction: column; gap: 2px; }
.dot { flex: none; width: 26px; height: 26px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; background: var(--primary); color: var(--on-primary); }
.rx-status { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--container); }
.rx-status .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rx-status .d { font-size: 16px; }
.pbar { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--outline-var) 70%, transparent); overflow: hidden; }
.pbar span { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--work); transition: width .2s; }
.rx-error { color: var(--err); }
.rx-error:empty { display: none; }
.rx-camera { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--var); }
.rx-camera select { height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--outline); background: var(--lowest); color: var(--on); }
.rx-foot { display: flex; justify-content: flex-end; margin-top: auto; }

/* Tooltip and toast */
#tip { position: fixed; z-index: 10; max-width: 280px; padding: 8px 12px; border-radius: 12px; background: var(--tip-bg); color: var(--tip-ink); font-size: 13px; line-height: 18px; pointer-events: none; font-variant-numeric: tabular-nums; }
#toast { position: fixed; z-index: 11; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(640px, calc(100% - 32px)); padding: 12px 18px; border-radius: 16px; background: var(--tip-bg); color: var(--tip-ink); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }

@media (max-width: 720px) {
  .main { padding: 20px 16px 40px; }
  .welcome { padding: 20px 16px 40px; }
  .welcome-text h1 { font-size: 38px; line-height: 44px; }
  .hero .big { font-size: 44px; line-height: 48px; }
  .wgrid { grid-template-columns: 52px minmax(0, 1fr) 26px 64px; column-gap: 10px; }
  .wgrid > :nth-child(5) { display: none; }
  .ticks span { display: none; }
  .ticks span:nth-child(4n+1) { display: inline; }
  .cal { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .cal .wk, .cal .wkh { display: none; }
  .cell { min-height: 64px; padding: 6px; border-radius: 10px; }
  .cell .tot { font-size: 13px; line-height: 18px; }
  .cell .mark, .cell .ico { display: none; }
}
