/* Operating Rhythm.
   Visual system: "Focus flow". A warm paper page, white surfaces with a hairline edge, ink for whatever is
   selected, amber for the one thing to press, forest green for done.
   Tokens first; every component below is built only from these.
   Type: Manrope at three weights (400 for text, 500 for controls, labels and the title of a row, 600 for headings
   and figures), in sentence case, at 11, 12, 13, 14, 16 and 18px and the page title. Spacing sits on a 4px grid.
   Corners go by size (8 a small control, 10 a control, 12 a card, 16 a tile, 20 a panel); only a status pill, a
   count and the account button are fully round. Nothing moves when it is hovered: a hover is a step of surface
   or of edge. The one rich thing on a page is its record: the segments of the Timeline and the marks made of them. */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
:root {
  --cream: #fbf8f3;        /* page background, and wells on a white surface */
  --ivory: #ffffff;        /* surface, and text on a dark or coloured fill */
  /* three text roles, and no others */
  --ink: #20201e;          /* text, and the fill of whatever is selected */
  --text2: #5a554c;        /* secondary text */
  --muted: #6e685e;        /* labels, meta, grey status */
  --label: var(--muted);   /* the same role under its older name */
  --rule: #efe9de;         /* row rule, bar track */
  --soft: #cfc7b8;         /* tick box edge, dashed edges */
  --line: rgba(32, 32, 30, .08);    /* hairline edge of a surface */
  --line-2: rgba(32, 32, 30, .14);  /* hairline edge of a control */
  --warm: #f7f2ea;         /* hover */
  --warm-2: #f1ece3;       /* quiet chip, stronger hover */
  --warm-3: #e8e0d2;       /* a quiet chip, hovered */
  --accent: #1e5430;       /* forest green: ticked, 1-1s, the account */
  --sage: #dce9d6;
  --sage-soft: #eaf2e6;    /* green tint */
  --good: #2e7d44;         /* done, on track */
  --soon: #e97a12;         /* due soon, at risk */
  --late: #c2412d;         /* late, blocked */
  --good-text: #1e5430;
  --soon-text: #8a4006;
  --late-text: #a3321f;
  --late-tint: #fbe4df;
  --late-tint-2: #f6d3cc;  /* the red tint, hovered */
  --late-wash: #fdf1ee;
  --amber: #f7b267;        /* the primary button */
  --amber-2: #f3a654;      /* the primary button, hovered */
  --amber-ink: #2a1703;
  --amber-tint: #fce9d6;   /* tags, today, the note box */
  --link: #b4570a;
  --today-tint: #fce9d6;
  --today-tint2: #fef6ec;
  --weekend: #f7f2ea;
  --postit-note: #fce9d6;
  --postit-decision: #eaf2e6;
  --postit-reminder: #f1ecf8;
  --leave: #e3daf4;        /* annual leave on the Timeline and in the marks: nothing was asked */
  --leave-edge: #b3a1d8;
  /* corners, by the size of what they round */
  --r-sm: 8px;             /* a small control */
  --r-ctl: 10px;           /* a control */
  --r-card: 12px;          /* a card, a ticket, a well */
  --r-tile: 16px;          /* a tile */
  --r-panel: 20px;         /* a panel */
  /* depth: surfaces lie flat on the page; only what is hovered or floating casts a shadow, and a small one */
  --lift: 0 1px 2px rgba(32, 32, 30, .05), 0 6px 16px -8px rgba(32, 32, 30, .14);     /* a hovered card */
  --float: 0 2px 6px rgba(32, 32, 30, .06), 0 16px 40px -12px rgba(32, 32, 30, .2);   /* pop-ups, dialogs, the sign-in card */
  --dock: 0 1px 2px rgba(32, 32, 30, .04);                                            /* the navigation */
  /* one curve and one time for everything that answers a hover or a press */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --fast: 150ms;
  --ui: "Manrope", "Segoe UI", system-ui, sans-serif;
  --hand: var(--ui);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(32, 32, 30, .08); }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--ui); font-size: 14px; line-height: 1.45; touch-action: manipulation; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--soon-text); }
b, strong { font-weight: 600; }
button, input, textarea, select { font-family: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
form { margin: 0; }
form.inline { display: inline-flex; }
form.contents, div.contents, fieldset.contents { display: contents; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
h1, h2, h3, p { margin: 0; }
input[type="checkbox"]:not(.sr) { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--accent); }
/* one size and one stroke for every drawn icon */
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hand { font-size: 13px; color: var(--text2); font-weight: 400; }
.hand.green { color: var(--good-text); }
.hand.red { color: var(--late-text); }
.muted { color: var(--text2); }
.empty { font-size: 14px; color: var(--muted); padding: 8px 0; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.strike { text-decoration: line-through; }
.c-good { color: var(--good); } .c-soon { color: var(--soon-text); } .c-late { color: var(--late-text); } .c-grey { color: var(--text2); } .c-accent { color: var(--accent); }

/* ---------- shell ---------- */
.shell { min-height: 100vh; max-width: 1480px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; padding: 20px clamp(16px, 4vw, 48px) 56px; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { height: 36px; width: auto; display: block; }
.brand-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.app-title { font-size: 16px; font-weight: 600; color: var(--ink); text-wrap: balance; }
.topbar .brand-text { max-width: 180px; }   /* "MD Operating Rhythm" fits on one line; a longer name takes two, so the top bar stays as wide as it was measured */
.app-sub { font-size: 12px; color: var(--text2); font-weight: 400; }
.title-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.label { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .01em; }

/* the navigation: a dock of the four sections, the open one in ink */
.tabs { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px; border-radius: 14px;
  background: var(--ivory); border: 1px solid var(--line-2); box-shadow: var(--dock); }
.tab { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-ctl); font-size: 14px; font-weight: 500; white-space: nowrap;
  color: var(--text2); text-decoration: none; }
.tab:hover { background: var(--warm); color: var(--ink); }
.tab.active, .tab.active:hover { background: var(--ink); color: var(--ivory); }
.tab-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; line-height: 1;
  background: var(--amber-tint); color: var(--soon-text); }
.tab.active .tab-count { background: rgba(255, 255, 255, .18); color: var(--ivory); }
/* the task lists on Home: the same dock inside the panel, one tab per list, each with the number still to do */
.tabs.inset { justify-content: flex-start; border-radius: var(--r-card); background: var(--cream); border-color: var(--line); box-shadow: none; }
.tabs.inset .tab { min-height: 36px; padding: 0 12px; border-radius: var(--r-sm); }
.tabs.inset .tab-count { background: rgba(32, 32, 30, .08); color: var(--ink); }
.tabs.inset .tab.active .tab-count { background: rgba(255, 255, 255, .18); color: var(--ivory); }
.tabs .tab .tab-count.soon { background: var(--amber); color: var(--amber-ink); }
.tabs .tab .tab-count.late { background: var(--late); color: var(--ivory); }

/* the square buttons of the top bar and of the Tasks panel (reminders, the funnel), and the round one of the account */
.round { position: relative; width: 40px; height: 40px; flex: none; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--ivory); color: var(--ink);
  display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 13px; font-weight: 600; }
.round:hover { background: var(--warm); color: var(--ink); }
.round.me, .round.me:hover { border-radius: 50%; background: var(--accent); color: var(--ivory); border: 0; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px; background: var(--late); color: var(--ivory);
  font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 2px solid var(--cream); }
/* the account button opens a small menu: settings, signing out */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { box-shadow: 0 0 0 3px var(--sage); }
.menu-body { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 240px; padding: 8px; display: flex; flex-direction: column; gap: 2px;
  border-radius: 14px; background: var(--ivory); border: 1px solid var(--line-2); box-shadow: var(--float); }
.menu-who { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--warm); color: var(--ink); }
.menu-item svg.i { color: var(--muted); }

/* the page heading: the date as a quiet line, the headline, one line of guidance */
.banner { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 860px; }
.banner h1 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.banner .hand { font-size: 14px; color: var(--text2); }
.date-pill { font-size: 13px; font-weight: 500; color: var(--muted); }
.content { flex: 1; display: flex; flex-direction: column; gap: 16px; }

.flash { padding: 12px 16px; border-radius: var(--r-ctl); font-size: 14px; font-weight: 500; background: var(--sage-soft); color: var(--good-text); }
.flash.error { background: var(--late-tint); color: var(--late-text); }
#toast { box-shadow: var(--float); }

/* ---------- layout ---------- */
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.row.stretch { align-items: stretch; }
.row.center { align-items: center; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col.tight { gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hflex { display: flex; align-items: center; gap: 8px; }
.hflex.base { align-items: baseline; }
.hflex.wrap { flex-wrap: wrap; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.grid-side { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.scroll-x { overflow-x: auto; }

/* ---------- panels ---------- */
.panel { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel.tight { gap: 2px; }
.panel.selected, .selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.panel-head { display: flex; align-items: baseline; gap: 8px 12px; flex-wrap: wrap; }
.panel-head.mid { align-items: center; }
.panel-title { font-size: 18px; font-weight: 600; color: var(--ink); text-wrap: balance; }
.panel-title.red { color: var(--late-text); }
.count-note { font-size: 13px; font-weight: 500; color: var(--text2); }

/* the head of a table, and the name of a group of rows. It keeps the gap of the rows under it, so that a column
   given the same width in both starts at the same place */
.band { display: flex; align-items: center; gap: 12px; background: var(--warm); border-radius: var(--r-sm); padding: 8px 12px; font-size: 12px; font-weight: 500;
  color: var(--muted); letter-spacing: .01em; }
.band.sub { margin-top: 4px; }
.line { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--rule); font-size: 14px; min-height: 44px; }
a.line:hover { background: var(--warm); }
.line.done { opacity: .55; }
.line.late { background: var(--late-wash); }
.line .title { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.line.done .title { text-decoration: line-through; }
.sub2 { font-size: 13px; color: var(--text2); font-weight: 400; }
.two { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }

/* ---------- pills and buttons ---------- */
/* a status is a pill; nothing else is */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; vertical-align: middle;
  background: var(--warm-2); color: var(--text2); }
.t-good { background: var(--sage-soft); color: var(--good-text); } .t-soon { background: var(--amber-tint); color: var(--soon-text); } .t-late { background: var(--late-tint); color: var(--late-text); }
.t-grey { background: var(--warm-2); color: var(--text2); } .t-accent { background: var(--ink); color: var(--ivory); }
.pill.out { height: 20px; padding: 0 8px; font-size: 11px; background: transparent; color: var(--text2); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill.count { background: rgba(32, 32, 30, .08); color: var(--ink); }
.tag-carried { display: inline-block; font-size: 11px; font-weight: 500; color: var(--soon-text); background: var(--amber-tint); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
/* Sentence case. A few short words are written in capitals in the page itself (the kind of a flag, a tag on a row,
   "TODAY" on the Timeline): they are shown like every other label, with only their first letter a capital. */
.kind, .pill.tag, .tag-carried, .tl-today b, .mx-head > div:first-child { text-transform: lowercase; }
.kind::first-letter, .pill.tag::first-letter, .tag-carried::first-letter, .tl-today b::first-letter, .mx-head > div:first-child::first-letter { text-transform: uppercase; }
.pill.tag { display: inline-block; line-height: 24px; }
.pill.out.tag { line-height: 20px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 20px; font-size: 14px; font-weight: 600; border-radius: var(--r-ctl); border: 0;
  background: var(--amber); color: var(--amber-ink); text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--amber-2); color: var(--amber-ink); }
.btn.wide { width: 100%; }
.btn-out { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; font-size: 14px; font-weight: 500; border-radius: var(--r-ctl);
  border: 1px solid var(--line-2); background: transparent; color: var(--ink); text-decoration: none; white-space: nowrap; }
.btn-out:hover { background: var(--warm); color: var(--ink); }
.btn-sm { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500; border-radius: var(--r-sm); border: 0;
  background: var(--warm-2); color: var(--ink); text-decoration: none; white-space: nowrap; }
.btn-sm:hover { background: var(--warm-3); color: var(--ink); }
.btn-sm.danger { background: var(--late-tint); color: var(--late-text); }
.btn-sm.danger:hover { background: var(--late-tint-2); color: var(--late-text); }
.btn-sm.quiet { background: transparent; color: var(--text2); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-sm.quiet:hover { background: var(--warm); }
.pbtn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 12px; font-size: 13px; font-weight: 500; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--ivory); color: var(--text2); text-decoration: none; white-space: nowrap; }
.pbtn:hover { background: var(--warm-2); color: var(--ink); }
.pbtn.on, .pbtn.on:hover { border-color: var(--ink); background: var(--ink); color: var(--ivory); }
.pbtn.sm { min-height: 32px; }
.pgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pgroup > .label { margin-right: 4px; }
/* radio buttons drawn as a group of buttons */
.pradio { position: relative; display: inline-flex; }
.pradio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pradio span { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 12px; font-size: 13px; font-weight: 500; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--ivory); color: var(--text2); white-space: nowrap; }
.pradio input:hover + span { background: var(--warm-2); }
.pradio input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--ivory); }
.pradio input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.pradio input:disabled { cursor: default; }
.pradio input:disabled:not(:checked) + span { opacity: .55; background: var(--ivory); }
.pradio.flex { flex: 1; } .pradio.flex span { flex: 1; padding: 0 8px; }
.link { border: 0; background: none; padding: 0; font-size: 13px; font-weight: 500; color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--soon-text); }
.link.grey { color: var(--muted); }
.link.grey:hover { color: var(--ink); }
.x { border: 0; background: none; padding: 0; width: 28px; height: 28px; border-radius: var(--r-sm); display: inline-grid; place-items: center; font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1; text-decoration: none; }
.x:hover { background: var(--late-tint); color: var(--late-text); }
.x.c-late { color: var(--late-text); }

/* ---------- inputs ---------- */
.input { min-height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--cream); font-size: 14px; min-width: 0; }
.input:hover { border-color: var(--soft); }
.input:focus { border-color: var(--ink); background: var(--ivory); outline: none; }
.input.lg { min-height: 44px; }
.input.sm { min-height: 36px; font-size: 13px; border-radius: var(--r-sm); }
.input[readonly], fieldset[disabled] .input { background: var(--warm); border-color: transparent; color: var(--text2); }
textarea.input { min-height: 80px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
textarea.input.short { min-height: 60px; }
select.input { padding-right: 8px; }
.input[type="time"], .input[type="date"], .input[type="number"] { padding-left: 10px; padding-right: 6px; }   /* room for the browser's own picker */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.fill, .field.fill > textarea { flex: 1 1 auto; }   /* takes the spare height of its panel */
.field > label, .field > .hflex > label, .flabel { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .01em; }
.bare { flex: 1; border: 0; background: transparent; font-size: 14px; padding: 6px 0; min-width: 0; }
.plus-box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px dashed var(--soft); color: var(--muted); font-weight: 500; display: grid; place-items: center; font-size: 14px; flex: none; }
.saved { font-size: 12px; font-weight: 500; color: var(--good-text); opacity: 0; transition: opacity 200ms var(--ease); }
.saved.show { opacity: 1; }

/* ---------- tick box ---------- */
.chk { position: relative; width: 24px; height: 24px; border-radius: var(--r-sm); border: 2px solid var(--soft); background: var(--ivory); color: var(--ivory); font-size: 13px; font-weight: 600;
  line-height: 1; padding: 0; flex: none; display: grid; place-items: center; }
.chk::after { content: ""; position: absolute; inset: -10px; }   /* a finger-sized target around the box */
/* ticked: the glyph in the markup is hidden and a drawn tick takes its place, so it is crisp at any size */
.chk.on { border-color: var(--accent); color: transparent;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 62% no-repeat; }
.chk.md { width: 20px; height: 20px; border-radius: 6px; }
.chk.sm { width: 16px; height: 16px; border-width: 1.5px; border-radius: 4px; font-size: 9px; }
.chk[disabled] { cursor: default; }
.chk[disabled]:not(.on):not(.missed) { background: var(--rule); border-color: var(--rule); }
.chk.missed { background: var(--late); border-color: var(--late); }

/* ---------- progress ---------- */
.bar { height: 8px; border-radius: 4px; overflow: hidden; background: var(--rule); }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--good); }
.bg-good { background: var(--good) !important; } .bg-soon { background: var(--soon) !important; } .bg-late { background: var(--late) !important; }
.bg-grey { background: var(--muted) !important; } .bg-accent { background: var(--accent) !important; }

/* ---------- KPI tiles: a label, a figure, and what it counts ---------- */
.kpis { display: flex; flex-wrap: wrap; gap: 12px; }
.kpi { flex: 1 1 112px; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 16px 20px 16px 28px; position: relative; min-width: 0; }
.kpi-label { font-size: 13px; font-weight: 500; color: var(--text2); }
.kpi-value { font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpis.even > .kpi { flex-basis: 152px; }   /* the tiles of a strip share it at equal widths */
a.kpi:hover { border-color: var(--line-2); box-shadow: var(--lift); }
/* the tone of a tile, ticket or panel: a short rounded bar inside its left edge */
.stripe { position: absolute; left: 12px; top: 16px; bottom: 16px; width: 4px; border-radius: 2px; background: var(--muted); }
.striped { position: relative; padding-left: 36px; }

/* ---------- cards ---------- */
.card { border: 0; border-radius: var(--r-card); padding: 12px 16px; display: flex; gap: 12px; background: var(--cream); min-width: 0; }
.card.late { background: var(--late-wash); }
.card.done { background: var(--sage-soft); }
.card.col { flex-direction: column; gap: 8px; padding: 16px; }
.card.selected { background: var(--ivory); }
a.card:hover { box-shadow: var(--lift); }
.icon-tile { flex: none; width: 28px; height: 28px; border-radius: var(--r-sm); color: var(--ivory); display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--muted); }
.icon-tile.bordered { min-width: 28px; width: auto; padding: 0 4px; font-size: 11px; color: var(--ink); background: var(--sage-soft); }
.kind { font-size: 12px; font-weight: 500; letter-spacing: .01em; }
.avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--ivory); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.big-num { font-size: 28px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); line-height: 1; }
.arrow { width: 28px; height: 28px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--ivory); font-size: 10px; line-height: 1; padding: 0; }
.arrow:hover { background: var(--warm); }
.mini { border: 0; background: rgba(32, 32, 30, .08); color: var(--ink); border-radius: var(--r-sm); font-size: 12px; font-weight: 500; min-height: 28px; padding: 0 12px; }
.mini:hover { background: var(--ink); color: var(--ivory); }
.dashed { padding: 12px 0; font-size: 13px; font-weight: 500; border-radius: var(--r-ctl); border: 1.5px dashed var(--soft); background: transparent; color: var(--text2); text-align: center; text-decoration: none; display: block; }
.dashed:hover { background: var(--warm); color: var(--ink); }
.sq { width: 12px; height: 12px; border-radius: 3px; background: var(--rule); flex: none; display: inline-block; box-shadow: inset 0 0 0 1px var(--line-2); }
.sq.r4 { border-radius: 3px; }
.sq.today { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--soft); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding-top: 8px; }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend .ibtn { justify-content: center; }

/* ---------- details (expandable prompt) ---------- */
details.prompt { flex: 1; min-width: 0; }
details.prompt > summary { list-style: none; cursor: pointer; font-size: 14px; font-weight: 500; min-height: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
details.prompt > summary::-webkit-details-marker { display: none; }
details.prompt > summary::after { content: "▸"; font-size: 11px; color: var(--muted); }
details.prompt[open] > summary::after { content: "▾"; }
.line.done details.prompt > summary { text-decoration: line-through; }
.prompt-body { margin: 8px 0 4px; padding: 12px 16px; border-radius: var(--r-card); background: var(--cream); font-size: 14px; line-height: 1.5; display: flex; flex-direction: column; gap: 8px; }
.prompt-body .hand { font-size: 14px; color: var(--text2); line-height: 1.5; }
.prompt-body .input { background: var(--ivory); }
.code { font-size: 12px; font-weight: 600; color: var(--muted); flex: none; width: 32px; font-variant-numeric: tabular-nums; }

/* ---------- week grid ---------- */
.week { display: grid; grid-template-columns: 44px repeat(5, 1fr); min-width: 520px; }
.week.seven { grid-template-columns: 44px repeat(7, 1fr); }
.week .dhead { text-align: center; font-size: 12px; font-weight: 500; color: var(--muted); border-radius: var(--r-sm); margin: 0 2px 8px; padding: 8px 0; }
.week .dhead.today { background: var(--ink); color: var(--ivory); }
.week .daycol { position: relative; border-left: 1px solid var(--rule); }
.week .daycol.today { background: var(--today-tint2); }
.week .hours { position: relative; }
.week .hours span { position: absolute; font-size: 11px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; transform: translateY(-7px); }
.week .slot { position: absolute; left: 0; right: 0; height: 20px; border: 0; border-top: 1px solid #f6f1e8; background: transparent; cursor: copy; padding: 0; display: block; }
.week .slot:hover { background: var(--warm-2); }
.week .meet { position: absolute; left: 4px; right: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; text-align: left;
  overflow: hidden; line-height: 1.3; z-index: 1; text-decoration: none; background: var(--sage-soft); color: var(--ink); display: block; }
.week .meet.oneone { background: var(--accent); color: var(--ivory); }
.week .meet:hover { filter: brightness(1.06); }
.week .meet.sel { box-shadow: 0 0 0 2px var(--ivory), 0 0 0 4px var(--ink); z-index: 2; }
.week .meet.held { opacity: .55; }

/* ---------- matrix grid (self-check history) ---------- */
.mx-head { display: flex; align-items: center; background: var(--warm); border-radius: var(--r-sm); padding: 8px 0 8px 12px; margin-bottom: 2px; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .01em; }
.mx-head .cells > div { flex: 1; text-align: center; line-height: 1.15; font-weight: 400; letter-spacing: 0; }
.mx-head .cells > div.today { font-weight: 600; color: var(--ink); text-decoration: underline; }
.mx-row { display: flex; align-items: center; min-height: 40px; border-bottom: 1px solid var(--rule); }
.mx-label { flex: none; display: flex; flex-direction: column; line-height: 1.25; padding: 0 8px 0 12px; min-width: 0; }
.mx-label b { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-label span { font-size: 12px; color: var(--muted); }
.cells { flex: 1; display: flex; min-width: 0; }
.mx-row .cells { height: 36px; }
.cell { flex: 1; margin: 4px 2px; border-radius: 6px; color: var(--ivory); font-size: 11px; font-weight: 600; display: grid; place-items: center; min-width: 0; }
.cell.today { outline: 1.5px solid var(--ink); outline-offset: 1px; }
.cell.none { background: transparent; } .cell.blank { background: var(--rule); }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { text-align: center; font-size: 12px; font-weight: 500; color: var(--muted); padding: 4px 0; }
.cal-day { min-height: 92px; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: stretch; text-align: left; padding: 8px; border: 1px solid var(--line);
  border-radius: var(--r-ctl); background: var(--ivory); color: var(--ink); overflow: hidden; text-decoration: none; }
.cal-day:hover { color: var(--ink); border-color: var(--soft); }
.cal-day.weekend { background: var(--weekend); }
.cal-day.past { opacity: .6; }
.cal-day.other { opacity: .35; }
.cal-day.today { border-color: transparent; background: var(--today-tint); opacity: 1; }
.cal-day.sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); opacity: 1; }
.cal-day b { font-size: 13px; font-weight: 600; }
.chip { font-size: 11px; font-weight: 500; line-height: 16px; padding: 0 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--sage-soft); color: var(--ink); }
.chip.oneone { background: var(--accent); color: var(--ivory); }
.chip.good { background: var(--good); color: var(--ivory); } .chip.soon { background: var(--soon); color: var(--ink); } .chip.late { background: var(--late); color: var(--ivory); }
.chip.note { background: var(--postit-note); }
.cal-day.today .chip.note { background: var(--ivory); }
.more { font-size: 11px; font-weight: 500; color: var(--text2); }

/* ---------- notes ---------- */
.postit { background: var(--postit-note); border-radius: var(--r-card); padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.postit.decision { background: var(--postit-decision); } .postit.reminder { background: var(--postit-reminder); }
.postit-type { font-size: 12px; font-weight: 500; color: var(--text2); }
.postit-type::first-letter { text-transform: uppercase; }
.postit-title { font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.postit-body { font-size: 13px; line-height: 1.45; color: var(--text2); overflow-wrap: anywhere; white-space: pre-line; }
.postit .pill.out { box-shadow: none; background: rgba(32, 32, 30, .08); color: var(--ink); }
.pinned { flex: 0 0 360px; padding: 20px; gap: 12px; }
/* the box a new note is written in */
.pinned > form { background: var(--amber-tint); border-radius: var(--r-card); padding: 12px; }
.pinned > form .input { background: var(--ivory); border-color: transparent; }
.pinned > form .input:focus { border-color: var(--ink); }
.pinned > form .btn, .pinned > form .btn:hover { background: var(--ink); color: var(--ivory); }
.pinned > form .pradio span { border-color: transparent; }
.pinned > form .pradio input:checked + span { border-color: var(--ink); }

/* ---------- dialog ---------- */
dialog { border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--ivory); color: var(--ink); padding: 24px; width: min(560px, calc(100vw - 32px)); box-shadow: var(--float); }
dialog::backdrop { background: rgba(32, 32, 30, .35); }
dialog form { display: flex; flex-direction: column; gap: 12px; }

/* ---------- sign-in ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(400px, 100%); gap: 16px; padding: 32px; box-shadow: var(--float); }
.login .brand { justify-content: center; }
.login .brand img { height: 80px; }
.login .app-title { font-size: 20px; }
.login .hand { text-align: center; }

/* ---------- keyboard and motion ---------- */
.skip { position: absolute; left: 16px; top: -72px; z-index: 20; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; background: var(--ink); color: var(--ivory); font-weight: 500;
  border-radius: var(--r-ctl); text-decoration: none; }
.skip:focus { top: 12px; color: var(--ivory); }
h1 { text-wrap: balance; }
.cv { content-visibility: auto; contain-intrinsic-size: auto 44px; }   /* long lists: only lay out what is on screen */
[id] { scroll-margin-top: 16px; }
/* a hover is a change of colour, of surface or of edge, and a press a small step inwards: nothing travels */
.btn, .btn-out, .btn-sm, .pbtn, .tab, .round, .mini, .dashed, .arrow, .chk, .ibtn, .x, .input, .pradio span, .tcard, .seg, .line, .cal-day, a.kpi, a.card, .menu-item, .week .slot {
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), filter var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease); }
.btn:active, .btn-out:active, .btn-sm:active, .pbtn:active, .mini:active, .arrow:active, .round:active { transform: scale(.97); }
.chk:active:not([disabled]) { transform: scale(.94); }
.chk:hover:not([disabled]):not(.on):not(.missed) { border-color: var(--accent); background-color: var(--sage-soft); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- task board: one list with a To do and a Done column ---------- */
.lane { gap: 16px; position: relative; }
/* the funnel: a small button in the corner of the panel. The labels it opens take a line of their own;
   closed, it takes no room at all, so its margin cancels the panel's gap. */
.lane > .panel-head { padding-right: 48px; min-height: 36px; }
.tfilter > summary { position: absolute; top: 20px; right: 24px; width: 36px; height: 36px; list-style: none; cursor: pointer; }
.tfilter > summary::-webkit-details-marker { display: none; }
.tfilter[open] > summary { background: var(--warm-2); }
.tfilter.on > summary, .tfilter.on > summary:hover { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.tfilter > summary .badge { border-color: var(--ivory); }
.tfilter:not([open]) { margin-top: -16px; }
.tfilter-body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 12px; border-radius: var(--r-card); background: var(--cream); border: 1px solid var(--line); }
.tfilter-body .label { margin: 0 4px 0 12px; }
.tfilter-body .label:first-child { margin-left: 0; }
.lane-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.lane-head .bar { flex: 1 1 140px; max-width: 260px; }
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }   /* columns share a height, so the whole of Done takes a drop */
.board-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.board-col .band { justify-content: space-between; background: transparent; padding: 0 4px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.cards:not(:empty) ~ .empty { display: none; }   /* a ticket has just been dropped here */

/* a ticket: the tick and the code, the title, a priority mark and an (i) for the prompt.
   It must not be given a transform: the pop-up has to rise above the tickets that follow it. */
.tcard { position: relative; border-radius: var(--r-card); background: var(--cream); padding: 8px 12px 8px 20px; display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 52px; }
.tcard > .stripe { left: 8px; top: 12px; bottom: 12px; }
.tcard:hover { background: var(--warm); }
.tcard[draggable="true"] { cursor: grab; }
.tcard[draggable="true"]:hover { box-shadow: var(--lift); }
.tcard.dragging { opacity: .45; }
.tcard.late, .tcard.late:hover { background: var(--late-wash); }
.tcard.done, .tcard.done:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.tcard .stub { flex: none; display: flex; align-items: center; gap: 8px; }
/* a ticket is moved by dragging, so its tick box is not shown. The form stays in the page: the drop submits it,
   and it is the keyboard's way to do the same, so it appears when it is tabbed to. */
.tcard .stub form { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tcard .stub form:focus-within { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
.tcard .stub .code { width: auto; min-width: 28px; }
.ttitle { font-size: 14px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.tcard.done .ttitle { text-decoration: line-through; color: var(--muted); }
/* the labels of a ticket: one quiet line under the title, never a pill */
.tcard .meta { display: flex; flex-wrap: wrap; gap: 0 6px; margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.tcard .meta span:not(:last-child)::after { content: "·"; margin-left: 6px; color: var(--soft); }   /* after, so a wrapped line never starts with the dot */
.tcard .meta .planned { color: var(--text2); font-weight: 500; }
.prio { flex: none; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1;
  display: inline-grid; place-items: center; cursor: default; }
.prio.late { background: var(--late); color: var(--ivory); }
.prio.soon { background: var(--amber); color: var(--amber-ink); }
.tinfo { flex: none; display: flex; }   /* not positioned, so the pop-up lines up with the whole ticket */
.ibtn { flex: none; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: var(--ivory); color: var(--text2);
  font-size: 13px; font-weight: 600; line-height: 1; display: inline-grid; place-items: center; }
button.ibtn:hover, .tinfo.open > .ibtn { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.pop { display: none; position: absolute; z-index: 6; top: 100%; left: 0; right: 0; padding-top: 4px; cursor: auto; }
.pop .prompt-body { margin: 0; background: var(--ivory); border: 1px solid var(--line-2); box-shadow: var(--float); }
.pop .prompt-body .input { background: var(--cream); }
.tinfo:hover > .pop, .tinfo.open > .pop { display: block; }
.tinfo:not(.open) .pin-only { display: none; }   /* hovering shows the prompt; clicking adds the note and the planned date */

/* dragging a ticket: the other column of the same list lights up */
.board.drag-on .board-col { min-height: 76px; border-radius: var(--r-card); }
.board-col.can-drop { outline: 2px dashed var(--soft); outline-offset: 4px; }
.board-col.over { background: var(--sage-soft); outline-color: var(--accent); }

/* ---------- compliance timeline: one row per frequency, one segment per period ---------- */
.tl { position: relative; min-width: 720px; padding-top: 24px; }
.tl-grid span { position: absolute; top: 24px; bottom: 24px; border-left: 1px solid var(--rule); }
.tl-today { position: absolute; top: 0; bottom: 24px; border-left: 1.5px dashed var(--ink); z-index: 3; pointer-events: none; }
.tl-today b { position: absolute; top: 0; left: 0; transform: translateX(-50%); font-size: 11px; font-weight: 500; line-height: 16px; background: var(--ink); color: var(--ivory); padding: 0 8px; border-radius: 6px; }
.tl-row { position: relative; padding: 8px 0 12px; }
.tl-label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 8px; position: relative; z-index: 2; }
.tl-label a, .tl-label .name { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; }
.tl-label a:hover { color: var(--link); text-decoration: underline; }
.tl-label a, .tl-label .name, .tl-label .sub2 { background: var(--ivory); }
.tl-track { position: relative; height: 20px; }
.tl-track.neutral { background: var(--rule); border-radius: 6px; }
.tl-task { margin-top: 8px; }
.tl-task .name { display: inline-block; max-width: 100%; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--ivory); position: relative; z-index: 2; padding-right: 8px; margin-bottom: 2px; }
.tl-task .tl-track { height: 12px; }
.tl-tasks { margin-top: 8px; padding: 8px 0 0; border-top: 1px dashed var(--soft); }
.seg { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: #ddd6c9; min-width: 2px; display: block; }
a.seg:hover, a.seg:focus-visible { filter: brightness(1.12); outline: 2px solid var(--ink); outline-offset: 1px; z-index: 2; }
.seg.done { background: var(--good); }
/* complete only after a late correction: the same green, dotted, so it never reads as done on time */
.seg.corrected, .key.corrected { background: var(--good) radial-gradient(circle, rgba(255, 255, 255, .8) 1.4px, transparent 1.9px) 0 0 / 6px 6px; }
.seg.missed { background: var(--late); background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(255, 255, 255, .38) 5px 7px); }
.seg.open { background: var(--amber-tint); box-shadow: inset 0 0 0 1.5px var(--ink); }
.seg.open.soon { background: var(--soon); }
.seg.open.late { background: var(--late); }
/* annual leave: a lavender of its own (the reminder notes' family), so it never reads as upcoming or as done */
.seg.off { background: var(--leave); box-shadow: inset 0 0 0 1.5px var(--leave-edge); }
/* annual leave that was entered after the day had passed: the same lavender, dotted like "recorded late" */
.seg.offlate, .key.offlate { background: var(--leave) radial-gradient(circle, rgba(60, 40, 90, .55) 1.3px, transparent 1.8px) 0 0 / 6px 6px; box-shadow: inset 0 0 0 1.5px var(--leave-edge); }
.tl-none { position: absolute; left: 12px; top: 1px; }
/* part of the list was not required because of time away: the period keeps its own colour and its lower half is the
   lavender of time away, dotted when the time away was entered afterwards, grey and striped for the site being unavailable.
   So a week that reads as complete with part of it not asked for never looks like a week done in full. */
/* a week that was worked, with nothing done and its last working day away: empty above, the time away below. Never a week of leave */
.seg.left, .key.left { background: var(--ivory); box-shadow: inset 0 0 0 1.5px var(--leave-edge); }
.seg[class*="part-"], .key[class*="part-"] { overflow: hidden; }
.seg[class*="part-"]::after, .key[class*="part-"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; background: var(--leave); box-shadow: inset 0 1.5px 0 var(--leave-edge); }
.seg.part-offlate::after, .key.part-offlate::after { background: var(--leave) radial-gradient(circle, rgba(60, 40, 90, .55) 1.3px, transparent 1.8px) 0 0 / 6px 6px; }
.seg.part-outage::after, .key.part-outage::after { background: var(--rule) repeating-linear-gradient(135deg, transparent 0 4px, rgba(60, 50, 40, .4) 4px 6px); }
/* the site was unavailable: the same grey, striped */
.seg.outage, .key.outage { background: var(--rule); background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(60, 50, 40, .4) 4px 6px); }
.seg.none { background: transparent; }
.seg.sel { outline: 2px solid var(--ink); outline-offset: 2px; z-index: 2; }
.tl-task .seg { border-radius: 4px; }
.tick { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; z-index: 1; }
.tl-task .tick { top: -2px; bottom: -2px; }
.tl-axis { position: relative; height: 20px; margin-top: 4px; }
.tl-axis span { position: absolute; top: 4px; font-size: 12px; font-weight: 500; color: var(--muted); padding-left: 4px; white-space: nowrap; }
.key { display: inline-block; width: 24px; height: 12px; border-radius: 4px; background: #ddd6c9; vertical-align: -1px; position: relative; flex: none; }
.key.done { background: var(--good); } .key.missed { background: var(--late); background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(255, 255, 255, .38) 5px 7px); }
.key.open { background: var(--amber-tint); box-shadow: inset 0 0 0 1.5px var(--ink); } .key.off { background: var(--leave); box-shadow: inset 0 0 0 1.5px var(--leave-edge); }
.key.mark { width: 2px; height: 16px; background: var(--ink); border-radius: 1px; vertical-align: -3px; margin: 0 6px; }

/* ---------- progress at a glance: Home for a read-only account, one line per list ---------- */
.prog { flex-wrap: wrap; gap: 8px 16px; padding: 12px 8px; }
.prog-cols { gap: 16px; padding: 8px; }
.prog-name { flex: 0 0 180px; gap: 2px; }
.prog-name b { font-size: 14px; font-weight: 600; }
.prog-now, .prog-past { flex: 1 1 230px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.prog-now .bar { flex: 1 1 90px; }
.prog-go { flex: 0 0 100px; text-align: right; }
/* "When tasks get ticked": one small column chart for each list. Thin columns from one baseline, rounded at the data end,
   a 2px gap between them, the number only on the tallest, the rest on hover. Built from the same tokens as the Timeline. */
.hists { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px 32px; }
.hist-fig { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hist { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 84px; margin: 16px 0 20px; border-bottom: 1px solid var(--soft); }
.hbar { flex: 1 1 0; min-width: 0; max-width: 24px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.hbar i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--good); }
.hbar b { position: absolute; left: 50%; transform: translateX(-50%); margin-bottom: 4px; font-size: 11px; font-weight: 600; line-height: 1; color: var(--ink); }
.hbar em { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.hbar:hover i { filter: brightness(1.15); }
.hbar.late { margin-left: 12px; }
.hbar.late i { background: var(--good) radial-gradient(circle, rgba(255, 255, 255, .8) 1.4px, transparent 1.9px) 0 0 / 6px 6px; }
/* the marks of the periods before: the segments of the Timeline, twelve to a line, with the same 2px between them */
.marks { display: flex; flex-wrap: wrap; gap: 2px; }
.marks .key { width: 16px; height: 12px; border-radius: 3px; vertical-align: 0; }
a.key:hover, a.key:focus-visible { filter: brightness(1.12); outline: 2px solid var(--ink); outline-offset: 1px; }
@media (max-width: 1000px) {
  .prog-cols { display: none; }   /* the lines wrap, so the column names no longer sit above them */
  .prog-name, .prog-go { flex-basis: 100%; text-align: left; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 1365px) {
  /* the name, the navigation and the buttons only share a line when all three are sure to fit, with a number on every tab.
     Below that the navigation takes a line of its own, centred under the other two. */
  .topbar::after { content: ""; order: 2; flex-basis: 100%; height: 0; margin-top: -12px; }
  .topbar > .tabs { order: 3; margin: 0 auto; }
}
@media (max-width: 1000px) {
  .grid-side { grid-template-columns: 1fr; }
  .pinned { flex: 1 1 100%; position: static; }
}
@media (max-width: 640px) {
  .shell { gap: 16px; }
  .tab { min-height: 36px; padding: 0 12px; }
  .topbar > .tabs svg.i { display: none; }   /* the names take less room without their icons */
  .panel { padding: 16px; border-radius: var(--r-tile); }
  .tfilter > summary { top: 16px; right: 16px; }
  .board { grid-template-columns: 1fr; }
  .card { flex-wrap: wrap; }   /* a flag: its words keep the line, and its button goes under them */
  .card > .grow { flex-basis: 60%; }
  .app-sub { display: none !important; }
  .cal { gap: 2px; }
  .cal-day { min-height: 56px; padding: 4px; border-radius: 6px; }
}
@media print {
  .topbar .title-actions, .tabs, form { display: none !important; }
  body { background: #fff; }
  * { box-shadow: none !important; }
}
