/* MD Operating Rhythm.
   Visual system: "Focus flow". A warm paper page, white surfaces with a hairline edge and generous
   rounding, 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. */
@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 */
  --ink: #20201e;          /* text, and the fill of whatever is selected */
  --text2: #5a554c;        /* secondary text */
  --muted: #7a746a;        /* muted text, grey status */
  --label: #6e685e;        /* small capital labels */
  --rule: #efe9de;         /* row rule, bar track */
  --soft: #cfc7b8;         /* tick box edge, dashed edges */
  --line: rgba(32, 32, 30, .07);    /* 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 */
  --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-wash: #fdf1ee;
  --amber: #f7b267;        /* the primary button */
  --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;
  /* depth: surfaces lie flat on the page; only what is hovered or floating casts a shadow */
  --lift: 0 16px 30px -20px rgba(32, 32, 30, .45);     /* a hovered card */
  --float: 0 30px 60px -30px rgba(32, 32, 30, .55);    /* pop-ups, dialogs, the sign-in card */
  --dock: 0 10px 30px -18px rgba(32, 32, 30, .4);      /* the navigation */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --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); }
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: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; 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(--label); padding: 6px 2px; }
.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: 10px; text-decoration: none; color: var(--ink); }
.brand img { height: 36px; width: auto; display: block; }
.brand-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.app-title { font-size: 16px; font-weight: 800; letter-spacing: -.01em; 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: 12.5px; color: var(--text2); font-weight: 600; }
.title-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.label { font-size: 11.5px; font-weight: 700; color: var(--label); letter-spacing: .06em; text-transform: uppercase; }

/* the navigation: a glass dock of pills, the open one in ink */
.tabs { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .75); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(32, 32, 30, .08); box-shadow: var(--dock); }
.tab { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap;
  color: #4d4a44; text-decoration: none; }
.tab svg.i { width: 18px; height: 18px; }
.tab:hover { background: var(--warm-2); 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: 800; 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 pills inside the panel, one per list, each with the number still to do */
.tabs.inset { justify-content: flex-start; border-radius: 24px; background: var(--cream); border-color: var(--line); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.tabs.inset .tab { min-height: 40px; padding: 0 14px; border-radius: 18px; }
.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); }

/* round buttons in the top bar: reminders, the account */
.round { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid rgba(32, 32, 30, .1); background: var(--ivory); color: var(--ink);
  display: flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 800; }
.round:hover { transform: translateY(-2px); background: var(--warm); color: var(--ink); }
.round.me, .round.me:hover { background: var(--accent); color: var(--ivory); border: 0; }
.badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px; background: var(--late); color: var(--ivory);
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--cream); }
/* the account button opens a small menu: settings, the password, 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% + 10px); z-index: 40; min-width: 240px; padding: 8px; display: flex; flex-direction: column; gap: 2px;
  border-radius: 20px; background: var(--ivory); border: 1px solid var(--line-2); box-shadow: var(--float); }
.menu-who { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 700; 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 { width: 18px; height: 18px; color: var(--text2); }

/* the page heading: the date as a tag, the headline, one line of guidance */
.banner { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 860px; }
.banner h1 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.05; font-weight: 800; letter-spacing: -.035em; }
.banner .hand { font-size: 16px; color: var(--text2); }
.date-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--amber-tint); color: var(--soon-text); }
.content { flex: 1; display: flex; flex-direction: column; gap: 16px; }

.flash { padding: 12px 16px; border-radius: 16px; font-size: 14px; font-weight: 700; 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: 10px; 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: 24px; padding: 20px 22px; 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: 10px; flex-wrap: wrap; }
.panel-head.mid { align-items: center; }
.panel-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.panel-title.red { color: var(--late-text); }
.count-note { font-size: 13px; font-weight: 600; color: var(--text2); }

.band { display: flex; align-items: center; background: var(--warm); border-radius: 12px; padding: 8px 12px; font-size: 11.5px; font-weight: 700;
  color: var(--label); letter-spacing: .06em; text-transform: uppercase; }
.band.sub { margin-top: 4px; }
.line { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--rule); font-size: 14px; min-height: 46px; }
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: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.line.done .title { text-decoration: line-through; }
.sub2 { font-size: 12.5px; color: var(--text2); font-weight: 400; }
.two { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }

/* ---------- pills and buttons ---------- */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; vertical-align: middle;
  background: var(--warm-2); color: #4d4a44; }
.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: #4d4a44; } .t-accent { background: var(--ink); color: var(--ivory); }
.pill.out { height: 20px; padding: 0 8px; font-size: 11px; background: transparent; color: #4d4a44; box-shadow: inset 0 0 0 1px var(--line-2); }
.pill.count { background: rgba(32, 32, 30, .08); color: var(--ink); }
.tag-carried { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; color: var(--soon-text); background: var(--amber-tint); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; font-size: 14.5px; font-weight: 800; border-radius: 999px; border: 0;
  background: var(--amber); color: var(--amber-ink); text-decoration: none; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); color: var(--amber-ink); }
.btn.wide { width: 100%; }
.btn-out { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; font-size: 14.5px; font-weight: 700; border-radius: 999px;
  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 14px; font-size: 13px; font-weight: 700; border-radius: 999px; border: 0;
  background: var(--warm-2); color: var(--ink); text-decoration: none; white-space: nowrap; }
.btn-sm:hover { background: #e8e0d2; color: var(--ink); }
.btn-sm.danger { background: var(--late-tint); color: var(--late-text); }
.btn-sm.danger:hover { background: #f6d3cc; color: var(--late-text); }
.btn-sm.quiet { background: transparent; color: #4d4a44; 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 14px; font-size: 13.5px; font-weight: 700; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--ivory); color: #4d4a44; 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; padding: 0 12px; font-size: 13px; }
.pgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* radio buttons drawn as a pill group */
.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 14px; font-size: 13.5px; font-weight: 700; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--ivory); color: #4d4a44; 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: 13.5px; font-weight: 700; color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--soon-text); }
.link.grey { color: var(--label); font-size: 13px; }
.link.grey:hover { color: var(--ink); }
.x { border: 0; background: none; padding: 0; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 13px; font-weight: 800; 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: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 14px; 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: 48px; font-size: 15px; padding: 0 16px; }
.input.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 12px; }
.input[readonly], fieldset[disabled] .input { background: var(--warm); border-color: transparent; color: var(--text2); }
textarea.input { min-height: 84px; padding: 12px 14px; 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: 11.5px; font-weight: 700; color: var(--label); letter-spacing: .06em; text-transform: uppercase; }
.bare { flex: 1; border: 0; background: transparent; font-size: 14px; padding: 6px 0; min-width: 0; }
.plus-box { width: 22px; height: 22px; border-radius: 8px; border: 1.5px dashed var(--soft); color: var(--muted); font-weight: 800; display: grid; place-items: center; font-size: 14px; flex: none; }
.saved { font-size: 12.5px; font-weight: 700; color: var(--good-text); opacity: 0; transition: opacity .3s; }
.saved.show { opacity: 1; }

/* ---------- tick box ---------- */
.chk { position: relative; width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--soft); background: var(--ivory); color: var(--ivory); font-size: 14px; font-weight: 800;
  line-height: 1; padding: 0; flex: none; display: grid; place-items: center; }
.chk::after { content: ""; position: absolute; inset: -9px; }   /* 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); transform: rotate(-8deg); 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.2' 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: 24px; height: 24px; font-size: 13px; }
.chk.sm { width: 16px; height: 16px; border-width: 1.5px; border-radius: 5px; 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: 8px; overflow: hidden; background: var(--rule); }
.bar > i { display: block; height: 100%; border-radius: 8px; background: var(--good); transition: width .7s var(--ease); }
.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 ---------- */
.kpis { display: flex; flex-wrap: wrap; gap: 12px; }
.kpi { flex: 1 1 110px; background: var(--ivory); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px 16px 30px; position: relative; min-width: 0; }
.kpi-label { font-size: 13px; font-weight: 700; color: var(--text2); }
.kpi-value { font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.kpi .hand { font-size: 12.5px; }
.kpis.even > .kpi { flex-basis: 150px; }   /* the tiles of a strip share it at equal widths */
a.kpi:hover { transform: translateY(-3px); 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: 18px; bottom: 18px; width: 4px; border-radius: 4px; background: var(--muted); }
.striped { position: relative; padding-left: 34px; }

/* ---------- cards ---------- */
.card { border: 0; border-radius: 18px; padding: 12px 14px; 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; border-radius: 20px; padding: 16px; }
.card.selected { background: var(--ivory); }
a.card:hover { transform: translateY(-2px); box-shadow: var(--lift); }
.icon-tile { flex: none; width: 28px; height: 28px; border-radius: 9px; color: var(--ivory); display: grid; place-items: center; font-size: 12.5px; font-weight: 800; background: var(--muted); }
.icon-tile.bordered { min-width: 28px; width: auto; padding: 0 5px; font-size: 10px; color: var(--ink); background: var(--sage-soft); }
.kind { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--ivory); display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.avatar.lg { width: 44px; height: 44px; font-size: 13.5px; }
.big-num { font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.arrow { width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 50%; 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: 999px; font-size: 12px; font-weight: 700; min-height: 28px; padding: 0 12px; }
.mini:hover { background: var(--ink); color: var(--ivory); }
.dashed { padding: 12px 0; font-size: 13.5px; font-weight: 700; border-radius: 16px; border: 1.5px dashed var(--soft); background: transparent; color: #4d4a44; text-align: center; text-decoration: none; display: block; }
.dashed:hover { background: var(--warm); color: var(--ink); }
.sq { width: 12px; height: 12px; border-radius: 4px; background: var(--rule); flex: none; display: inline-block; box-shadow: inset 0 0 0 1px var(--line-2); }
.sq.r4 { border-radius: 4px; }
.sq.today { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--soft); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding-top: 8px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.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: 14.5px; font-weight: 600; min-height: 26px; 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: 14px 16px; border-radius: 16px; background: var(--cream); font-size: 14px; line-height: 1.5; display: flex; flex-direction: column; gap: 8px; }
.prompt-body .hand { font-size: 14.5px; color: #4d4a44; line-height: 1.5; }
.prompt-body .input { background: var(--ivory); }
.code { font-size: 12px; font-weight: 800; color: var(--muted); flex: none; width: 34px; }

/* ---------- 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: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--label); border-radius: 12px; margin: 0 2px 6px; 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: 11.5px; font-weight: 700; color: var(--label); 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: 3px; right: 3px; padding: 3px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; text-align: left;
  overflow: hidden; line-height: 1.25; 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: 12px; padding: 8px 0 8px 12px; margin-bottom: 2px; font-size: 11.5px; font-weight: 700; color: var(--label); letter-spacing: .06em; }
.mx-head .cells > div { flex: 1; text-align: center; line-height: 1.15; font-weight: 600; letter-spacing: 0; }
.mx-head .cells > div.today { font-weight: 800; color: var(--ink); text-decoration: underline; }
.mx-row { display: flex; align-items: center; min-height: 38px; border-bottom: 1px solid var(--rule); }
.mx-label { flex: none; display: flex; flex-direction: column; line-height: 1.2; padding: 0 8px 0 12px; min-width: 0; }
.mx-label b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-label span { font-size: 11.5px; color: var(--text2); }
.cells { flex: 1; display: flex; min-width: 0; }
.mx-row .cells { height: 36px; }
.cell { flex: 1; margin: 4px 2px; border-radius: 8px; color: var(--ivory); font-size: 11px; font-weight: 800; 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: 6px; }
.cal-head { text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--label); padding: 4px 0; }
.cal-day { min-height: 92px; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: stretch; text-align: left; padding: 8px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--ivory); color: var(--ink); overflow: hidden; text-decoration: none; }
.cal-day:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--lift); }
.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: 14px; font-weight: 800; }
.chip { font-size: 11px; font-weight: 700; line-height: 1.5; padding: 0 6px; border-radius: 6px; 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: 700; color: var(--text2); }

/* ---------- notes ---------- */
.postit { background: var(--postit-note); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.postit.decision { background: var(--postit-decision); } .postit.reminder { background: var(--postit-reminder); }
.postit-type { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #4d4a44; }
.postit-title { font-size: 14.5px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.postit-body { font-size: 13.5px; line-height: 1.45; color: #4d4a44; 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: 22px; gap: 14px; }
/* the box a new note is written in */
.pinned > form { background: var(--amber-tint); border-radius: 20px; padding: 16px; }
.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: 24px; background: var(--ivory); color: var(--ink); padding: 22px; 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: 10px; }

/* ---------- sign-in ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(400px, 100%); gap: 14px; padding: 32px; border-radius: 28px; box-shadow: var(--float); }
.login .brand { justify-content: center; }
.login .brand img { height: 84px; }
.login .app-title { font-size: 22px; letter-spacing: -.02em; }
.login .hand { text-align: center; }

/* ---------- keyboard and motion ---------- */
.skip { position: absolute; left: 16px; top: -70px; z-index: 20; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; background: var(--ink); color: var(--ivory); font-weight: 700;
  border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; color: var(--ivory); }
h1 { text-wrap: balance; }
.cv { content-visibility: auto; contain-intrinsic-size: auto 46px; }   /* long lists: only lay out what is on screen */
[id] { scroll-margin-top: 14px; }
.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, .week .slot {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, filter .2s ease, box-shadow .3s ease, transform .25s var(--ease); }
.chk { transition: background-color .25s ease, border-color .25s ease, transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.btn:active, .btn-out:active, .btn-sm:active, .pbtn:active, .mini:active, .arrow:active, .round:active { transform: translateY(0) scale(.97); }
.chk:active:not([disabled]) { transform: scale(.9); }
.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: 14px; position: relative; }
/* the funnel: a small round 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: 46px; min-height: 36px; }
.tfilter > summary { position: absolute; top: 20px; right: 22px; width: 36px; height: 36px; list-style: none; cursor: pointer; }
.tfilter > summary::-webkit-details-marker { display: none; }
.tfilter > summary svg.i { width: 17px; height: 17px; }
.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: -14px; }
.tfilter-body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 14px; border-radius: 18px; background: var(--cream); border: 1px solid var(--line); }
.tfilter-body .label { margin-left: 10px; }
.tfilter-body .label:first-child { margin-left: 0; }
.lane-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 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: 2px 6px; }
.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: 16px; background: var(--cream); padding: 10px 12px 10px 20px; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 52px; }
.tcard > .stripe { left: 8px; top: 13px; bottom: 13px; }
.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: 10px; }
/* 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: 14.5px; font-weight: 600; 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: 600; }
.prio { flex: none; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 800; 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: 800; 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: 6px; cursor: auto; }
.pop .prompt-body { margin: 0; background: var(--ivory); border: 1px solid var(--line); border-radius: 20px; 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: 18px; }
.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: 22px; }
.tl-grid span { position: absolute; top: 22px; bottom: 22px; border-left: 1px solid var(--rule); }
.tl-today { position: absolute; top: 0; bottom: 22px; 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: 10px; font-weight: 800; letter-spacing: .08em; background: var(--ink); color: var(--ivory); padding: 2px 8px; border-radius: 999px; }
.tl-row { position: relative; padding: 8px 0 12px; }
.tl-label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 6px; position: relative; z-index: 2; }
.tl-label a, .tl-label .name { color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.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: 7px; }
.tl-task .name { display: inline-block; max-width: 100%; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--ivory); position: relative; z-index: 2; padding-right: 6px; margin-bottom: 2px; }
.tl-task .tl-track { height: 12px; }
.tl-tasks { margin-top: 8px; padding: 8px 0 2px; 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: 10px; top: 2px; }
/* 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: 2px; }
.tl-axis span { position: absolute; top: 4px; font-size: 11.5px; font-weight: 700; color: var(--label); padding-left: 4px; white-space: nowrap; }
.key { display: inline-block; width: 26px; height: 12px; border-radius: 4px; background: #ddd6c9; vertical-align: -1px; position: relative; }
.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 18px; padding: 14px 8px; }
.prog-cols { gap: 18px; padding: 8px; }
.prog-name { flex: 0 0 180px; gap: 2px; }
.prog-name b { font-size: 15px; font-weight: 800; }
.prog-now, .prog-past { flex: 1 1 230px; display: flex; flex-direction: column; gap: 6px; 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: 22px 28px; }
.hist-fig { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hist { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 84px; margin: 16px 0 18px; 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: 4px 4px 0 0; background: var(--good); }
.hbar b { position: absolute; left: 50%; transform: translateX(-50%); margin-bottom: 3px; font-size: 11px; font-weight: 800; line-height: 1; color: var(--ink); }
.hbar em { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--text2); white-space: nowrap; }
.hbar:hover i { filter: brightness(1.15); }
.hbar.late { margin-left: 10px; }
.hbar.late i { background: var(--good) radial-gradient(circle, rgba(255, 255, 255, .8) 1.4px, transparent 1.9px) 0 0 / 6px 6px; }
.marks { display: flex; flex-wrap: wrap; gap: 3px; }
.marks .key { width: 17px; height: 14px; 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 round buttons only share a line when all three are sure to fit, with a number on every tab
     (1252px in all, measured). 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: 18px; }
  .topbar > .tabs, .tabs.inset { border-radius: 26px; }
  .tab { min-height: 40px; padding: 0 12px; }
  .topbar > .tabs svg.i { display: none; }   /* the names take less room without their icons */
  .panel { padding: 16px; border-radius: 20px; }
  .tfilter > summary { top: 16px; right: 16px; }
  .board { grid-template-columns: 1fr; }
  .app-sub { display: none !important; }
  .cal { gap: 3px; }
  .cal-day { min-height: 56px; padding: 4px; border-radius: 10px; }
}
@media print {
  .topbar .title-actions, .tabs, form { display: none !important; }
  body { background: #fff; }
  * { box-shadow: none !important; }
}
