
  :root {
    --paper: #faf7f1;
    --paper-2: #f3efe6;
    --island: #f4f0e7;
    --card: #fffdf9;
    --dialog: #fffdf9; /* a pop-up's background */
    --dialog-shadow: 0 24px 60px -12px rgba(29,36,32,.45);
    --pop-edge: #1d2420; /* the hard edge and offset shadow that make a panel pop */
    --ink: #1d2420;
    --ink-soft: #55605a;
    --ink-faint: #8a938d;
    --rule: #e4ddcf;
    --rule-strong: #cfc6b2;
    --green: #0e5c48;
    --green-deep: #0a4637;
    --green-tint: #e3efe9;
    --amber: #c77c1e;
    --amber-tint: #f7ecd9;
    --red: #b3432f;
    --red-tint: #f6e4df;
    --blue: #2c5d8f;
    --blue-tint: #e2ebf4;
    --amber-deep: #7a4d0f;
    --amber-border: #e8cfa3;
    --accent: #b93a31;
    --accent-deep: #962f27;
    --accent-tint: #f8e9e7;
    --side-bg: #232426;
    --input-bg: #fff;
    --grad-a: #fffef9;
    --grad-b: #fbf8f0;
    --shadow: 0 1px 2px rgba(29,36,32,.05), 0 8px 24px -12px rgba(29,36,32,.18);
    --radius: 10px;
    font-size: 16px;
  }
  /* Dark palette — applied by explicit choice, or by system preference in auto */
  html[data-theme="dark"] {
    --paper: #1c1f21;
    --paper-2: #272b2d;
    --island: #1f2224;
    --card: #222527;
    --dialog: #2d3235; /* lighter than the page, so a pop-up stands out */
    --dialog-shadow: none; /* on the dimmed dark page a shadow shows as a dark halo */
    --pop-edge: #0a0c0d;
    --ink: #e4e2da;
    --ink-soft: #aeb3ad;
    --ink-faint: #868d87;
    --rule: #34393b;
    --rule-strong: #474d4f;
    --green: #449c80;
    --green-deep: #93cfb8;
    --green-tint: #27342f;
    --amber: #d39d55;
    --amber-tint: #35301f;
    --red: #d26e62;
    --red-tint: #3a2a27;
    --blue: #86aad2;
    --blue-tint: #27313b;
    --amber-deep: #e2bb86;
    --amber-border: #5b4b2f;
    --accent: #cf6b62;
    --accent-deep: #e7a8a1;
    --accent-tint: #3a2c2a;
    --side-bg: #181a1c;
    --input-bg: #2c3032;
    --grad-a: #282c2e;
    --grad-b: #222527;
    --shadow: 0 1px 2px rgba(0,0,0,.25), 0 8px 24px -12px rgba(0,0,0,.45);
  }
  @media (prefers-color-scheme: dark) {
    html[data-theme="auto"] {
      --paper: #1c1f21;
      --paper-2: #272b2d;
      --island: #1f2224;
      --card: #222527;
      --dialog: #2d3235;
      --dialog-shadow: none;
      --pop-edge: #0a0c0d;
      --ink: #e4e2da;
      --ink-soft: #aeb3ad;
      --ink-faint: #868d87;
      --rule: #34393b;
      --rule-strong: #474d4f;
      --green: #449c80;
      --green-deep: #93cfb8;
      --green-tint: #27342f;
      --amber: #d39d55;
      --amber-tint: #35301f;
      --red: #d26e62;
      --red-tint: #3a2a27;
      --blue: #86aad2;
      --blue-tint: #27313b;
      --amber-deep: #e2bb86;
      --amber-border: #5b4b2f;
      --accent: #cf6b62;
      --accent-deep: #e7a8a1;
      --accent-tint: #3a2c2a;
      --side-bg: #181a1c;
      --input-bg: #2c3032;
      --grad-a: #282c2e;
      --grad-b: #222527;
      --shadow: 0 1px 2px rgba(0,0,0,.25), 0 8px 24px -12px rgba(0,0,0,.45);
    }
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { height: 100%; } /* body must be allowed to grow, or the sticky sidebar detaches on long pages */
  body {
    font-family: "Public Sans", -apple-system, sans-serif;
    background:
      radial-gradient(1100px 500px at 85% -10%, rgba(185,58,49,.06), transparent 60%),
      var(--paper);
    color: var(--ink);
    display: flex;
    min-height: 100vh;
  }
  ::selection { background: var(--accent); color: #fff; }

  /* ---------- Sidebar ---------- */
  aside {
    width: 232px;
    flex-shrink: 0;
    background: var(--side-bg);
    color: #e8e5da;
    display: flex;
    flex-direction: column;
    padding: 28px 18px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
  }
  .logo {
    font-family: "Outfit", "Public Sans", sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: .01em;
    color: #f4f1e7;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 0 10px;
  }
  .logo .tick { color: #e2645a; font-size: 1.5rem; }
  .logo small {
    font-family: "Spline Sans Mono", monospace;
    font-size: .6rem;
    font-weight: 500;
    color: #f2a59e;
    letter-spacing: .18em;
    text-transform: uppercase;
  }
  .burger {
    display: none;
    background: none;
    border: none;
    color: #e8e5da;
    padding: 8px;
    margin-left: -6px;
    border-radius: 8px;
    cursor: pointer;
  }
  .burger svg { width: 22px; height: 22px; display: block; }
  .burger .icon-close { display: none; }
  body.nav-open .burger .icon-open { display: none; }
  body.nav-open .burger .icon-close { display: block; }
  nav { margin-top: 40px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; }
  .nav-settings { margin-top: auto; }
  .nav-label {
    font-size: .62rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #6f7a72;
    padding: 0 12px;
    margin: 14px 0 6px;
  }
  .nav-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: #b9c2ba;
    font: 500 .88rem "Public Sans", sans-serif;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, color .15s;
  }
  .nav-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
  .nav-btn:hover { background: rgba(255,255,255,.06); color: #f0ede2; }
  .nav-btn.active { background: rgba(226,100,90,.14); color: #f2a59e; }
  .nav-btn.disabled { opacity: .35; cursor: not-allowed; }
  .nav-btn .soon {
    margin-left: auto;
    font-size: .55rem;
    letter-spacing: .1em;
    border: 1px solid #566159;
    border-radius: 99px;
    padding: 2px 7px;
    color: #8b968e;
  }
  /* Settings view rows */
  .set-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rule);
  }
  .set-row:last-child { border-bottom: none; }
  /* notices, filters, report & misc additions */
  .notice {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    border-radius: 10px; padding: 11px 16px; margin-bottom: 18px;
    font-size: .84rem; font-weight: 500; border: 1px solid transparent;
  }
  .notice-warn { background: var(--amber-tint); border-color: var(--amber-border); color: var(--amber-deep); }
  .notice-info { background: var(--blue-tint); border-color: rgba(44,93,143,.3); color: var(--blue); }
  /* clickable week chip: date + "open" icon, used in the missing-timesheet banner and dashboard card */
  .wk-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--input-bg);
    border: 1px solid var(--rule-strong);
    color: var(--ink-soft);
    border-radius: 99px;
    padding: 4px 8px 4px 11px;
    font: 600 .74rem "Spline Sans Mono", monospace;
    cursor: pointer;
    transition: all .15s;
  }
  .wk-chip svg { width: 12px; height: 12px; opacity: .55; transition: opacity .15s; }
  .wk-chip:hover { border-color: var(--accent); color: var(--accent); }
  .wk-chip:hover svg { opacity: 1; }
  .notice .wk-chip { border-color: var(--amber-border); color: var(--amber-deep); }
  .notice .wk-chip:hover { border-color: var(--accent); color: var(--accent); }
  .miss-row .wk-chips { display: flex; gap: 6px; flex-wrap: wrap; }
  .miss-row .appr-name { min-width: 130px; }
  .notice .when { margin-left: auto; font-size: .72rem; opacity: .75; }
  .bh {
    display: block; margin: 3px auto 0; width: fit-content;
    font: 700 .52rem "Public Sans", sans-serif; letter-spacing: .1em;
    color: var(--amber); border: 1px solid var(--amber); border-radius: 4px; padding: 0 4px;
  }
  .decision-note { font-size: .72rem; color: var(--red); margin-top: 4px; max-width: 220px; white-space: normal; }
  .half-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .half-row .role-pill { font-size: .74rem; padding: 7px 12px; }
  .stat-sub { font: 500 .68rem "Public Sans", sans-serif; color: var(--ink-faint); margin-top: 2px; }
  .filter-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 16px 20px 18px; }
  .filter-bar .field { min-width: 150px; }
  .filter-bar .btn { margin-bottom: 1px; }
  .rp-num { font-family: "Spline Sans Mono", monospace; text-align: right !important; }
  .rp-total td { font-weight: 700; border-top: 2px solid var(--ink); }
  .miss-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 20px; border-top: 1px solid var(--rule); }
  .allow-row label.ameta { white-space: nowrap; }
  /* bell */
  .logo-row { display: flex; align-items: flex-start; justify-content: space-between; padding-right: 6px; }
  .bell {
    position: relative; background: none; border: none; cursor: pointer;
    color: #8b968e; padding: 6px; border-radius: 8px; margin-top: 2px;
  }
  .bell svg { width: 19px; height: 19px; }
  .bell:hover { color: #f0ede2; background: rgba(255,255,255,.07); }
  .bell-badge {
    position: absolute; top: 1px; right: 0;
    background: var(--accent); color: #fff;
    font: 700 .58rem "Public Sans", sans-serif;
    min-width: 16px; height: 16px; border-radius: 99px; padding: 0 4px;
    display: grid; place-items: center;
  }
  .notif { display: flex; gap: 10px; align-items: flex-start; padding: 11px 10px; border-radius: 8px; cursor: pointer; }
  .notif:hover { background: var(--accent-tint); }
  .notif.unread { background: var(--blue-tint); }
  .notif.unread:hover { background: var(--accent-tint); }
  .notif .n-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-top: 6px; flex-shrink: 0; visibility: hidden; }
  .notif.unread .n-dot { visibility: visible; }
  .notif .n-text { font-size: .85rem; }
  .notif .n-when { font-size: .7rem; color: var(--ink-faint); margin-top: 3px; }
  /* saved flash on hour cells */
  input.hrs.saved { box-shadow: 0 0 0 3px rgba(14,92,72,.25); border-color: var(--green) !important; transition: none; }
  .task-line { display: flex; align-items: center; gap: 6px; }
  /* project budget burn-down */
  .burn { padding: 0 0 12px; }
  .burn-meta { display: flex; justify-content: space-between; font: 500 .7rem "Spline Sans Mono", monospace; color: var(--ink-faint); margin-bottom: 5px; }
  .burn .cap-fill.warn { background: linear-gradient(90deg, var(--amber), #d9973f); }
  .tile-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 16px; margin-bottom: 26px; }
  /* team calendar */
  .cal-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 6px 20px 10px; font-size: .72rem; color: var(--ink-soft); }
  .cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .cal-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
  .cal-key.approved, .cal td.approved { background: var(--green); }
  .cal-key.pending, .cal td.pending { background: var(--amber); }
  .cal-key.bh, .cal td.bh { background: var(--rule-strong); }
  .cal-key.blocked, .cal td.blocked { background: var(--red-tint); box-shadow: inset 0 0 0 1px var(--red); }
  .cal { border-collapse: separate; border-spacing: 2px; margin: 0 14px 16px; }
  .cal th { font: 600 .6rem "Spline Sans Mono", monospace; color: var(--ink-faint); padding: 2px 0 4px; text-align: center; min-width: 22px; }
  .cal th.wkend, .cal td.wkend { opacity: .35; }
  .cal th.today { color: var(--accent); }
  .cal td { height: 22px; min-width: 22px; border-radius: 4px; background: var(--paper-2); }
  .cal td.name { background: none; text-align: left; font-size: .8rem; font-weight: 600; padding-right: 12px; white-space: nowrap; min-width: 130px; }
  .cal td.approved.half::after, .cal td.pending.half::after { content: "½"; font-size: .55rem; color: #fff; display: block; text-align: center; line-height: 22px; }
  /* ---------- page hierarchy: attention → overview → personal ---------- */
  .page-meta { font: 500 .8rem "Public Sans", sans-serif; color: var(--ink-faint); align-self: flex-start; padding-top: 10px; white-space: nowrap; }
  .section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
  .section-head h2 { font: 500 .88rem "Public Sans", sans-serif; color: var(--ink-soft); letter-spacing: .01em; }
  .section-head:first-child { margin-top: 0; }
  .section-meta { font: 500 .78rem "Public Sans", sans-serif; color: var(--ink-faint); }
  .dash-columns { display: grid; gap: 18px; }
  .island { background: var(--island); border: 1px solid var(--rule); border-radius: 16px; padding: 18px 20px 20px; min-width: 0; }
  .island > .section-head { margin: 0 0 12px; }
  .island > .section-head + .card, .island > .section-head + .timeoff-row { margin-top: 0; }
  .island > .card + .card, .island > .timeoff-row + .card { margin-top: 16px; }
  .dash-main > .card + .card, .dash-main > .card + #team-holiday { margin-top: 16px; }
  .dash-side-cards, .timeoff-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
  /* F53: Holiday's four summary cards: four across where they fit, two by two below that, one column
     on a phone; never three and one */
  .timeoff-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  @media (min-width: 1180px) { .timeoff-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  .timeoff-row { margin-bottom: 16px; }
  .card-head.padded { padding: 16px 20px; border-bottom: 1px solid var(--rule); }
  .card-meta { font: 500 .78rem "Public Sans", sans-serif; color: var(--ink-faint); }
  .card-note { font-size: .78rem; color: var(--ink-faint); }
  .kv-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: .82rem; color: var(--ink-soft); }
  .kv-row b { color: var(--ink); font-weight: 600; }
  .kv-row[role="button"] { cursor: pointer; }
  .kv-row[role="button"]:hover { color: var(--ink); }

  /* the one prominent area: exceptions on a card with a hard edge and offset shadow, so it pops */
  .attention {
    border: 1.5px solid var(--pop-edge);
    /* three shades, darkest at the top: the amber header, the row of tabs, then the open tab and its
       items (one colour) */
    --attn-bg: color-mix(in srgb, var(--amber-tint) 55%, var(--card));
    --attn-tabs: color-mix(in srgb, var(--amber) 28%, var(--attn-bg));
    --attn-tab-rule: color-mix(in srgb, var(--amber) 50%, var(--attn-bg));
    background: var(--attn-bg);
    border-radius: 14px;
    box-shadow: 6px 6px 0 var(--pop-edge);
    overflow: hidden; /* the header's amber stops at the rounded corners */
    margin: 0 6px 20px 0; /* room for the shadow */
  }
  /* the card's header: an amber bar across the top (dark text: white on this amber is too faint) */
  .attention-head {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    background: var(--amber); border-bottom: 1.5px solid var(--pop-edge); padding: 11px 20px;
  }
  .attention-title { font: 700 .84rem "Public Sans", sans-serif; color: #1d2420; }
  .attention-count { font: 600 .76rem "Public Sans", sans-serif; color: #1d2420; opacity: .85; }
  /* each tab is followed by its group (see renderAttentionGroups). Wide screens: square-cornered tabs
     in a row, the groups wrapped onto the line below (order: 1); the open tab joins the line under the
     row, like a folder tab. */
  .attention-items { display: flex; flex-wrap: wrap; align-items: flex-end; min-width: 0; padding: 0; }
  /* the row sits flush under the header bar and against the card's left edge */
  .attn-tab {
    position: relative; display: flex; align-items: baseline; gap: 7px; flex: 0 0 auto;
    border: 0 solid var(--attn-tab-rule); border-right-width: 1.5px; border-radius: 0;
    background: var(--attn-tabs); padding: 8px 14px; cursor: pointer;
    font: 600 .72rem "Public Sans", sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft);
  }
  /* the rest of the row is the tabs' shade too, so the three bands run the full width */
  .attention-items::after { content: ""; flex: 1 1 0; align-self: stretch; background: var(--attn-tabs); }
  .attn-tab:hover { color: var(--ink); }
  .attn-tab.active { z-index: 1; border-color: var(--pop-edge); background: var(--attn-bg); color: var(--ink); margin-bottom: -1.5px; padding-bottom: 9.5px; }
  .attn-tab.active:not(:first-child) { border-left-width: 1.5px; margin-left: -1.5px; }
  .attn-tab .attn-group-count { font: 500 .72rem "Spline Sans Mono", monospace; color: inherit; opacity: .8; }
  .attn-group { order: 1; flex: 0 0 100%; display: flex; flex-direction: column; min-width: 0; border-top: 1.5px solid var(--pop-edge); padding: 4px 20px 12px; }
  .attn-group[hidden] { display: none; }
  /* phones: an accordion, like an FAQ — each tab a full-width row with its items below when open */
  @media (max-width: 640px) {
    .attention-items { flex-direction: column; flex-wrap: nowrap; align-items: stretch; padding: 0; }
    .attn-tab, .attn-tab.active, .attn-tab.active:not(:first-child) {
      width: 100%; margin: 0; border: none; border-bottom: 1px solid var(--attn-tab-rule); background: var(--attn-tabs);
      padding: 15px 20px; text-align: left; color: var(--ink-soft);
    }
    .attn-tab::after { content: "+"; margin-left: auto; font: 500 1.1rem/1 "Public Sans", sans-serif; color: var(--amber-deep); }
    .attention-items::after { display: none; }
    .attention-items:not(.closed) .attn-tab.active { color: var(--ink); background: var(--attn-bg); border-bottom: none; }
    .attention-items:not(.closed) .attn-tab.active::after { content: "−"; }
    .attn-tab:last-of-type { border-bottom: none; }
    .attention-items:not(.closed) .attn-tab.active:last-of-type { border-bottom: none; }
    .attn-group { order: 0; border-top: none; border-bottom: 1px solid var(--attn-tab-rule); padding: 0 20px 6px; background: var(--attn-bg); }
    .attn-group:last-child { border-bottom: none; }
    .attention-items.closed .attn-group { display: none; }
  }
  /* one item per row: title · meta fill the line, value + actions sit at the right */
  .attn-item { display: grid; grid-template-columns: minmax(140px, auto) minmax(0, 1fr) auto auto; align-items: center; gap: 4px 18px; padding: 10px 0; min-width: 0; }
  .attn-item + .attn-item { border-top: 1px solid var(--rule); }
  .attn-item .attn-row { display: contents; }
  .attn-item .attn-title-text { grid-area: 1 / 1; }
  .attn-item .attn-meta { grid-area: 1 / 2; min-width: 0; }
  .attn-item .attn-value { grid-area: 1 / 3; text-align: right; }
  .attn-item .attn-actions { grid-area: 1 / 4; margin-top: 0; justify-content: flex-end; min-width: 120px; }
  @media (max-width: 760px) {
    .attn-item { grid-template-columns: minmax(0, 1fr) auto; }
    .attn-item .attn-title-text { grid-area: 1 / 1; }
    .attn-item .attn-value { grid-area: 1 / 2; }
    .attn-item .attn-meta { grid-area: 2 / 1 / 3 / -1; }
    .attn-item .attn-actions { grid-area: 3 / 1 / 4 / -1; justify-content: flex-start; }
  }
  .attn-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .attn-title-text { font: 600 .95rem "Public Sans", sans-serif; color: var(--ink); }
  .attn-value { font: 600 .88rem "Spline Sans Mono", monospace; color: var(--ink-soft); }
  .attn-value.warn { color: var(--amber); }
  .attn-value.danger { color: var(--red); }
  .attn-meta { font-size: .78rem; color: var(--ink-faint); }
  .attn-flag { color: var(--amber); font-weight: 600; }
  .attn-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
  .attn-link { background: none; border: none; padding: 0; cursor: pointer; font: 500 .78rem "Public Sans", sans-serif; color: var(--ink-soft); }
  .attn-link:hover { color: var(--accent); }
  .attn-actions .round-btn { width: 26px; height: 26px; font-size: .8rem; }
  /* F49: a person with two or more weeks: one row, a button, opening to their weeks indented beneath */
  .attn-item.attn-person { display: block; padding: 0; }
  .attn-person-btn { width: 100%; display: grid; grid-template-columns: minmax(140px, auto) minmax(0, 1fr); align-items: center; gap: 4px 18px; padding: 10px 0;
    background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
  .attn-person-btn .attn-title-text { display: inline-flex; align-items: center; gap: 8px; }
  .attn-person-btn:hover .attn-title-text { color: var(--accent); }
  .attn-person-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
  .attn-chev { flex: none; width: 0; height: 0; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .15s; }
  .attn-person-btn[aria-expanded="true"] .attn-chev { transform: rotate(90deg); }
  .attn-person-items { margin: 0 0 6px 13px; padding-left: 14px; border-left: 2px solid var(--rule); }
  .attn-person-items[hidden] { display: none; }
  .attn-item.attn-sub { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 0; }
  .attn-item.attn-sub .attn-meta { grid-area: 1 / 1; }
  .attn-item.attn-sub .attn-actions { grid-area: 1 / 2; }
  @media (max-width: 760px) {
    .attn-person-btn { grid-template-columns: minmax(0, 1fr); }
    .attn-person-btn .attn-meta { grid-area: 2 / 1; }
    .attn-item.attn-sub { grid-template-columns: minmax(0, 1fr); }
    .attn-item.attn-sub .attn-actions { grid-area: 2 / 1; justify-content: flex-start; }
  }

  /* all-clear states shrink into a quiet strip */
  .quiet-strip { display: flex; flex-wrap: wrap; gap: 6px 26px; padding: 8px 2px 4px; font-size: .8rem; color: var(--ink-faint); margin-bottom: 12px; }
  .quiet-strip b { color: var(--ink-soft); font-weight: 600; margin-left: 4px; }
  .quiet-strip .ok { color: var(--ink-soft); }

  /* project hours: expandable project rows, task rows without bars */
  .pg { border-top: 1px solid var(--rule); }
  .pg:first-of-type { border-top: none; }
  .pg-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; cursor: pointer; list-style: none; }
  .pg-head::-webkit-details-marker { display: none; }
  .pg-toggle { width: 12px; color: var(--ink-faint); font-size: .9rem; text-align: center; flex-shrink: 0; }
  .pg-toggle::before { content: "+"; }
  .pg[open] .pg-toggle::before { content: "–"; }
  .pg-title { flex: 1; min-width: 0; font: 500 .95rem "Public Sans", sans-serif; }
  .pg-client { display: block; font-size: .74rem; color: var(--ink-faint); margin-top: 2px; }
  .pg-total { font: 500 .9rem "Public Sans", sans-serif; color: var(--ink-soft); white-space: nowrap; }
  .pg-task { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 12px 20px 12px 42px; border-top: 1px solid var(--rule); background: color-mix(in srgb, var(--paper-2) 55%, var(--card)); }
  .pg-task .tk-people { margin-top: 6px; }
  .pg-figs .mini-btn { margin-left: 4px; }
  .pg-left { min-width: 0; }
  .pg-name { font-size: .88rem; font-weight: 500; }
  .pg-right { text-align: right; flex-shrink: 0; }
  .pg-figs { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; }
  .pg-hours { font: 500 .9rem "Public Sans", sans-serif; }
  .pg-over { font: 600 .78rem "Public Sans", sans-serif; color: var(--amber); }
  .pg-limit { font-size: .74rem; color: var(--ink-faint); margin-top: 3px; }

  /* budgets (F40): each project a row that opens it, its name and hours on the left and a ring on
     the right, filled clockwise from the top, with the percentage in the middle */
  .budget-list { padding: 4px 20px 8px; }
  .budget-row {
    display: flex; justify-content: space-between; align-items: center; gap: 20px; width: 100%;
    padding: 12px 0; border: none; border-top: 1px solid var(--rule); background: none; color: inherit;
    font: inherit; text-align: left; cursor: pointer; border-radius: 0;
  }
  .budget-row:first-child { border-top: none; }
  .budget-row:hover .b-name { color: var(--accent); }
  .budget-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
  .b-name { display: block; flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
  .b-sub { display: block; font-size: .74rem; color: var(--ink-faint); font-weight: 400; margin-top: 3px; }
  .b-ring { position: relative; flex: none; width: 56px; height: 56px; display: grid; place-items: center; }
  .b-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
  .b-ring circle { fill: none; stroke-width: 5; }
  .b-ring-track { stroke: var(--paper-2); }
  .b-ring-fill { stroke: var(--ink-soft); stroke-linecap: round; transition: stroke-dasharray .4s cubic-bezier(.2,.7,.3,1); }
  .b-ring.warn .b-ring-fill { stroke: var(--amber); }
  .b-ring.over .b-ring-fill { stroke: var(--red); stroke-linecap: butt; }
  .b-pct { position: relative; font: 600 .74rem "Spline Sans Mono", monospace; line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
  .b-pct.l { font-size: .66rem; }
  .b-pct.xl { font-size: .56rem; }
  .b-pct.xxl { font-size: .48rem; }
  .b-pct.warn { color: var(--amber-deep); }
  .b-pct.over { color: var(--red); }
  /* the project the Dashboard opened, highlighted briefly (F40) */
  .proj-card:focus { outline: none; }
  .proj-card.found { animation: proj-found 2.4s ease-out; }
  @keyframes proj-found {
    0%, 55% { box-shadow: 0 0 0 3px var(--accent); }
    100% { box-shadow: 0 0 0 3px transparent; }
  }

  /* every alert shares the Needs attention card's look: a hard dark edge and a solid offset shadow,
     on its own tint (notices on the timesheet, the acting-as banner; smaller in dialogs and toasts) */
  .notice, #acting-banner {
    border: 1.5px solid var(--pop-edge); border-radius: 14px; box-shadow: 6px 6px 0 var(--pop-edge);
    margin-right: 6px; margin-bottom: 20px; /* room for the shadow */
  }
  .notice-warn { background: color-mix(in srgb, var(--amber-tint) 55%, var(--card)); }
  .notice-info { background: color-mix(in srgb, var(--blue-tint) 55%, var(--card)); }
  .notice .wk-chip { background: var(--card); }

  @media (max-width: 1000px) {
    .pg-task { padding-left: 20px; }
  }
  @media (max-width: 640px) {
    .allow-row { flex-wrap: wrap; row-gap: 8px; }
    .allow-row .aname { flex-basis: 100%; }
    .timeoff-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .pg-task { flex-direction: column; gap: 8px; }
    .pg-right { text-align: left; width: 100%; }
    .pg-figs { justify-content: flex-start; flex-wrap: wrap; }
    .island > .section-head { flex-wrap: wrap; }
    .island > .section-head .dash-week-nav { width: 100%; justify-content: space-between; }
  }
  .set-name { font-weight: 600; font-size: .9rem; }
  .set-desc { font-size: .76rem; color: var(--ink-faint); margin-top: 3px; max-width: 460px; }
  .user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2645a, #b93a31);
    display: grid;
    place-items: center;
    font: 600 .8rem "Public Sans", sans-serif;
    color: #fff;
  }
  .user-card .name { font-size: .82rem; font-weight: 600; color: #eee9dc; }
  .user-card .role { font-size: .68rem; color: #8b968e; }

  /* ---------- Main ---------- */
  main { flex: 1; padding: 34px 44px 60px; min-width: 0; }
  .view { display: none; }
  .view.active { display: block; animation: rise .35s cubic-bezier(.2,.7,.3,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

  .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
  h1 {
    font-family: "Outfit", "Public Sans", sans-serif;
    font-weight: 600;
    font-size: 2rem;
    letter-spacing: -.01em;
  }
  .page-head .sub { color: var(--ink-soft); font-size: .88rem; margin-top: 5px; }

  /* Week switcher */
  .week-nav { display: flex; align-items: center; gap: 10px; }
  .icon-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 1px solid var(--rule-strong);
    background: var(--card);
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    transition: all .15s;
  }
  .icon-btn:hover { border-color: var(--accent); color: var(--accent); }
  .week-label {
    font-family: "Spline Sans Mono", monospace;
    font-size: .85rem;
    font-weight: 500;
    min-width: 210px;
    text-align: center;
  }
  .week-label .wk { color: var(--ink-faint); font-size: .7rem; display: block; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2px; }
  .btn {
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font: 600 .84rem "Public Sans", sans-serif;
    cursor: pointer;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .btn[hidden] { display: none; } /* display above would otherwise show a hidden button */
  .btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 10px -3px rgba(185,58,49,.5); }
  .btn-primary:hover { background: var(--accent-deep); }
  .btn-ghost { background: transparent; border: 1px solid var(--rule-strong); color: var(--ink-soft); }
  .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
  .btn-quiet { background: var(--paper-2); color: var(--ink-soft); }
  .btn-quiet:hover { color: var(--ink); }
  .btn:disabled { opacity: .45; cursor: not-allowed; }

  /* Status chip */
  .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 600 .68rem "Public Sans", sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 99px;
  }
  .chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .chip.draft { background: var(--paper-2); color: var(--ink-soft); }
  .chip.submitted { background: var(--blue-tint); color: var(--blue); }
  .chip.pending { background: var(--amber-tint); color: var(--amber); }
  .chip.approved { background: var(--green-tint); color: var(--green); }
  .chip.declined { background: var(--red-tint); color: var(--red); }
  .chip.completed { background: var(--paper-2); color: var(--ink-soft); margin-left: 10px; }

  /* ---------- Timesheet card ---------- */
  /* ---------- card system: every card in the app is built from these ---------- */
  .card, .stat, .proj-card {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 14px;
  }
  .card { overflow: hidden; }
  .card.pad, .stat, .proj-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
  .stat { gap: 10px; }
  .card-head, .attn-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .attn-head { padding: 18px 20px 12px; }
  .card-title, .attn-title, .panel-title, .stat .lbl { font: 600 .9rem "Outfit", "Public Sans", sans-serif; color: var(--ink); }
  .panel-title { padding: 18px 20px 0; }
  .stat .lbl { order: -1; }
  .card-num, .stat .num { font: 500 2rem "Outfit", "Public Sans", sans-serif; letter-spacing: -.01em; line-height: 1; }
  .card-unit, .stat .num small { font: 500 .85rem "Public Sans", sans-serif; color: var(--ink-faint); margin-left: 4px; }
  .stat .num .chip { vertical-align: middle; }
  .card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .78rem; color: var(--ink-faint); margin-top: auto; }
  .card-link { background: none; border: none; color: var(--ink-faint); font: 500 .78rem "Public Sans", sans-serif; cursor: pointer; padding: 0; }
  .card-link:hover { color: var(--accent); }
  /* status pill in a card header: neutral by default, coloured text/outline for a state */
  .pill, .attn-count { font: 600 .68rem "Public Sans", sans-serif; border: 1px solid var(--rule-strong); border-radius: 7px; padding: 3px 9px; color: var(--ink-soft); white-space: nowrap; background: none; }
  .pill.warn, .attn-card.has-items .attn-count { color: var(--amber); border-color: var(--amber); }
  .pill.danger, .attn-count.warn, .attn-card.overrun .attn-count { color: var(--red); border-color: var(--red); }
  .pill.quiet, .attn-count.clear { color: var(--ink-faint); border-color: var(--rule-strong); }
  /* thin progress meter used in cards */
  .meter { height: 5px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
  .meter-fill { height: 100%; background: var(--ink-soft); opacity: .7; border-radius: 99px; transition: width .4s cubic-bezier(.2,.7,.3,1); }
  .meter-fill.warn { background: var(--amber); opacity: .9; }
  .meter-fill.over { background: var(--red); opacity: 1; }
  .sheet-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--rule);
    background: var(--card);
  }
  .sheet-toolbar .left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; flex: 1; min-width: 0; }
  .sheet-toolbar > div:last-child { flex-shrink: 0; }
  .sheet-toolbar { gap: 14px; }
  .sheet-actions { display: flex; gap: 10px; }
  #entry-hint { white-space: normal; min-width: 0; line-height: 1.4; }
  #entry-hint.hint-warn { color: var(--amber-deep); }
  table { width: 100%; border-collapse: collapse; }
  thead th {
    font: 600 .66rem "Public Sans", sans-serif;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    padding: 12px 8px 10px;
    border-bottom: 1px solid var(--rule-strong);
    text-align: center;
  }
  thead th .dom { display: block; font-family: "Spline Sans Mono", monospace; font-size: .82rem; color: var(--ink-soft); margin-top: 3px; letter-spacing: 0; }
  thead th.today { color: var(--accent); }
  thead th.today .dom { color: var(--accent); font-weight: 600; }
  thead th:first-child { text-align: left; padding-left: 20px; }
  tbody td { border-bottom: 1px solid var(--rule); padding: 6px; text-align: center; }
  tbody tr:hover td { background: rgba(185,58,49,.025); }
  td.proj { text-align: left; padding: 12px 8px 12px 20px; min-width: 220px; }
  td.today-col, th.today { background: rgba(185,58,49,.045); }
  td.wkend { background: var(--paper-2); }
  .proj-name { font-weight: 600; font-size: .88rem; display: flex; align-items: center; gap: 9px; }
  .dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
  .proj-client { font-size: .72rem; color: var(--ink-faint); margin: 3px 0 0 18px; }
  input.hrs {
    width: 60px;
    padding: 8px 4px;
    text-align: center;
    font: 500 .88rem "Spline Sans Mono", monospace;
    color: var(--ink);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    transition: all .12s;
  }
  input.hrs:hover { border-color: var(--rule-strong); background: var(--input-bg); }
  input.hrs:focus { outline: none; border-color: var(--accent); background: var(--input-bg); box-shadow: 0 0 0 3px rgba(185,58,49,.13); }
  input.hrs:disabled { color: var(--ink-faint); cursor: not-allowed; }
  input.hrs.filled { color: var(--green-deep); font-weight: 600; }
  td.row-total, tfoot td {
    font: 600 .88rem "Spline Sans Mono", monospace;
  }
  td.row-total { color: var(--ink-soft); padding-right: 20px; }
  tfoot td {
    padding: 13px 6px;
    text-align: center; /* line up with the day columns above */
    border-top: 2px solid var(--ink);
    color: var(--ink);
    background: var(--paper-2);
  }
  tfoot td:first-child { text-align: left; padding-left: 20px; font-family: "Public Sans", sans-serif; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
  tfoot td:last-child { padding-right: 20px; }
  tfoot .grand { color: var(--accent); font-size: 1rem; }
  tfoot .empty-day { color: var(--ink-faint); font-weight: 400; }
  .del-proj {
    border: none; background: none; cursor: pointer;
    color: var(--ink-faint); font-size: .9rem; padding: 4px 8px; border-radius: 6px;
    opacity: 0; transition: all .15s;
  }
  tbody tr:hover .del-proj { opacity: 1; }
  .del-proj:hover { color: var(--red); background: var(--red-tint); }

  /* capacity strip */
  .capacity {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px;
    border-top: 1px solid var(--rule);
    background: var(--card);
  }
  .cap-track { flex: 1; height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
  .cap-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #2f8a6d, var(--green)); border-radius: 99px; transition: width .4s cubic-bezier(.2,.7,.3,1); }
  .cap-fill.over { background: linear-gradient(90deg, var(--amber), var(--red)); }
  .cap-text { font: 500 .76rem "Spline Sans Mono", monospace; color: var(--ink-soft); white-space: nowrap; }
  /* the expenses summary under the sheet, spaced like the other cards */
  #ts-expenses { margin-top: 20px; }

  /* add project row */
  .add-proj-bar { padding: 12px 20px; border-top: 1px dashed var(--rule-strong); }
  .expenses-card { margin-top: 20px; }
  #exp-claim-hint { white-space: normal; } /* a sentence, not a figure: it wraps on a phone */
  /* F23: a month's submitted claims below its draft; what a returned claim was sent back for */
  .exp-claim .card-title .chip { margin-left: 8px; vertical-align: middle; }
  .exp-claim-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 20px 10px; }
  .exp-claim-meta .cap-text { white-space: normal; }
  .exp-returned { margin: 0 20px 12px; }
  .exp-other-drafts { padding: 4px 20px 16px; margin: 0; }
  .exp-other-drafts .attn-link { padding: 0; }
  .exp-returned[hidden], .exp-other-drafts[hidden], #ts-expenses[hidden] { display: none; }
  /* F52: the expense being edited in the drawer */
  tr.exp-editing > td { background: var(--accent-tint); }
  tr.exp-editing > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
  .exp-amount { font-family: "Spline Sans Mono", monospace; font-weight: 600; text-align: right; white-space: nowrap; }
  .exp-sub { font-size: .72rem; color: var(--ink-faint); margin-top: 2px; }
  .exp-actions { text-align: right; white-space: nowrap; }
  .exp-receipt { font-size: .76rem; color: var(--ink-soft); text-decoration: none; margin-right: 8px; }
  .exp-receipt:hover { color: var(--accent); }
  .exp-total-row td { font-weight: 600; border-top: 1px solid var(--rule-strong); }
  .exp-hint { font-size: .74rem; color: var(--ink-faint); margin-top: 6px; }
  .add-proj-form { display: none; gap: 10px; align-items: center; }
  .add-proj-form.open { display: flex; }
  .add-proj-form input {
    padding: 9px 12px;
    border: 1px solid var(--rule-strong);
    border-radius: 8px;
    font: 400 .84rem "Public Sans", sans-serif;
    background: var(--input-bg);
  }
  .add-proj-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(185,58,49,.12); }

  /* ---------- Dashboard ---------- */
  .stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
  .dash-attn { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 26px; }
  .dash-week-nav { margin-left: auto; gap: 6px; }
  .dash-week-nav .icon-btn { width: 30px; height: 30px; }
  .dash-week-nav .week-label { min-width: 210px; font-size: .78rem; padding: 0 4px; }
  .dash-week-nav .btn { padding: 6px 11px; font-size: .74rem; }
  .appr-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--rule);
    cursor: pointer;
    transition: background .12s;
  }
  .appr-row:hover { background: rgba(185,58,49,.03); }
  .appr-name { font-weight: 600; font-size: .87rem; }
  .appr-meta { font: 500 .73rem "Spline Sans Mono", monospace; color: var(--ink-faint); margin-top: 3px; }
  .appr-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
  .round-btn {
    width: 33px; height: 33px;
    border-radius: 50%;
    background: var(--input-bg);
    display: grid; place-items: center;
    cursor: pointer;
    font-size: .95rem; line-height: 1;
    transition: all .15s;
  }
  .round-btn.ok { color: var(--green); border: 1px solid rgba(14,92,72,.35); }
  .round-btn.ok:hover { background: var(--green); border-color: var(--green); color: #fff; }
  .round-btn.no { color: var(--red); border: 1px solid rgba(179,67,47,.35); }
  .round-btn.no:hover { background: var(--red); border-color: var(--red); color: #fff; }
  .attn-empty {
    display: flex; align-items: center; gap: 9px;
    padding: 16px 20px 20px;
    color: var(--ink-faint); font-size: .84rem;
  }
  .attn-empty .ok-dot { color: var(--green); font-weight: 700; }
  .nav-badge {
    margin-left: auto;
    background: var(--amber); color: #fff;
    border-radius: 99px;
    font-size: .62rem; font-weight: 700;
    padding: 2px 8px;
  }
  .dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; }
  .dash-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--rule);
    cursor: pointer;
    transition: background .12s;
    font-size: .85rem;
  }
  .dash-row:hover { background: rgba(185,58,49,.03); }
  .dash-row .chip { margin-left: auto; }
  .tk-proj-head {
    display: flex; align-items: baseline; gap: 10px;
    padding: 9px 20px;
    background: var(--paper-2);
    border-top: 1px solid var(--rule);
    font-size: .78rem; font-weight: 700; color: var(--ink-soft);
  }
  .tk-proj-head .tk-proj-client { font-weight: 500; color: var(--ink-faint); font-size: .72rem; }
  .tk-proj-head .tk-proj-total {
    margin-left: auto;
    font: 600 .74rem "Spline Sans Mono", monospace;
    color: var(--ink-soft);
  }
  .tk-row {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 10px 20px 10px 32px;
    border-top: 1px solid var(--rule);
    font-size: .84rem;
  }
  .tk-mid { padding-top: 5px; }
  .tk-over { flex-shrink: 0; }
  .tk-name { width: 220px; flex-shrink: 0; font-weight: 500; }
  .tk-mid { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 160px; }
  .tk-mid .cap-track { flex: none; width: 100%; }
  .tk-people { display: flex; flex-wrap: wrap; gap: 5px; }
  .tk-person {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--rule-strong);
    background: var(--input-bg);
    border-radius: 99px;
    padding: 2px 9px;
    font: 600 .66rem "Public Sans", sans-serif;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all .15s;
  }
  .tk-person .tk-ph { font: 500 .62rem "Spline Sans Mono", monospace; color: var(--ink-faint); }
  .tk-person:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-tint); }
  .tk-person:hover .tk-ph { color: var(--accent); }
  .tk-person.overp { border-color: rgba(179,67,47,.45); color: var(--red); background: var(--red-tint); }
  .tk-person.overp .tk-ph { color: var(--red); }
  .tk-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; padding-top: 3px; }
  .tk-right .tk-hours { min-width: 0; }
  .rb-open { white-space: nowrap; }
  .rb-intro { padding: 12px 10px 6px; font-size: .8rem; color: var(--ink-soft); line-height: 1.5; }
  .rb-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 10px;
    border-top: 1px solid var(--rule);
    font-size: .86rem;
  }
  .rb-move { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .rb-move b { font: 600 .84rem "Spline Sans Mono", monospace; color: var(--accent-deep); }
  .rb-arrow { color: var(--ink-faint); }
  .rb-row .mini-btn, .rb-row .chip { margin-left: auto; flex-shrink: 0; }
  .rb-err { width: 100%; color: var(--red); font-size: .74rem; font-weight: 600; }
  .rb-note { padding: 9px 10px 0; font-size: .74rem; color: var(--ink-faint); line-height: 1.5; }
  .tk-person.still { cursor: default; }
  .tk-person.still:hover { border-color: var(--rule-strong); color: var(--ink-soft); background: var(--input-bg); }
  .tk-person.still:hover .tk-ph { color: var(--ink-faint); }
  .tk-hours {
    font: 500 .76rem "Spline Sans Mono", monospace;
    color: var(--ink-soft);
    min-width: 110px;
    text-align: right;
    white-space: nowrap;
  }
  .tk-over {
    font: 700 .66rem "Public Sans", sans-serif;
    letter-spacing: .05em; text-transform: uppercase;
    background: var(--red-tint); color: var(--red);
    border-radius: 99px; padding: 3px 9px;
    white-space: nowrap;
  }
  .task-cell .tk-over { margin-left: 9px; }
  button.tk-over { border: none; cursor: pointer; transition: box-shadow .15s, background .15s; }
  button.tk-over:hover, button.tk-over:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--red); }
  .stat.click { cursor: pointer; transition: border-color .15s; }
  .stat.click:hover { border-color: var(--accent); }
  .stat .num .chip { vertical-align: middle; }

  /* ---------- Holiday view ---------- */

  .holiday-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
  .holiday-grid.team-grid { grid-template-columns: 1fr; }
  .warn-note, .contend-note {
    font-size: .76rem;
    font-weight: 500;
    border-radius: 8px;
    padding: 9px 12px;
    margin-top: 2px;
  }
  .warn-note { background: var(--red-tint); color: var(--red); }
  .contend-note { background: var(--amber-tint); color: var(--amber-deep); }
  .warn-note, .contend-note { border: 1.5px solid var(--pop-edge); box-shadow: 3px 3px 0 var(--pop-edge); margin: 8px 3px 0 0; }
  .contend-inline { display: block; font-size: .68rem; color: var(--amber); font-weight: 600; margin-top: 3px; }
  .allow-row, .blocked-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
  }
  .allow-row:last-child, .blocked-row:last-child { border-bottom: none; }
  .allow-row .aname { flex: 1; font-size: .86rem; font-weight: 600; }
  .allow-row .ameta { font-size: .72rem; color: var(--ink-faint); font-weight: 400; margin-top: 2px; }
  .allow-row input {
    width: 74px;
    padding: 8px 10px;
    border: 1px solid var(--rule-strong);
    border-radius: 7px;
    font: 500 .84rem "Spline Sans Mono", monospace;
    text-align: center;
  }
  .allow-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(185,58,49,.12); }
  .blocked-row .brange { font: 500 .8rem "Spline Sans Mono", monospace; }
  .blocked-row .bnote { flex: 1; font-size: .78rem; color: var(--ink-faint); }
  .hol-form { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 13px; }
  .field label { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
  .field input, .field select, .field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--rule-strong);
    border-radius: 8px;
    font: 400 .86rem "Public Sans", sans-serif;
    background: var(--input-bg);
    color: var(--ink);
  }
  .field textarea { resize: vertical; min-height: 60px; }
  .field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(185,58,49,.12);
  }
  .field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .day-count {
    font: 500 .78rem "Spline Sans Mono", monospace;
    color: var(--ink-soft);
    background: var(--paper-2);
    border-radius: 8px;
    padding: 9px 12px;
    text-align: center;
  }
  .hol-table { width: 100%; }
  .hol-table thead th { text-align: left; padding: 12px 10px 10px; }
  .hol-table thead th:first-child { padding-left: 20px; }
  .hol-table tbody td { text-align: left; padding: 13px 10px; font-size: .85rem; vertical-align: middle; }
  .hol-table tbody td:first-child { padding-left: 20px; }
  .hol-table .dates { font-family: "Spline Sans Mono", monospace; font-size: .8rem; }
  .hol-table .note-txt { color: var(--ink-faint); font-size: .78rem; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hist-card .hol-table tbody tr { opacity: .68; }
  .hist-card .hol-table tbody tr:hover { opacity: 1; }
  .hol-actions { text-align: right; padding-right: 14px !important; white-space: nowrap; }
  .hol-actions .mini-btn { margin-left: 6px; }
  .mini-btn {
    border: 1px solid var(--rule-strong);
    background: var(--input-bg);
    border-radius: 7px;
    padding: 5px 10px;
    font: 600 .7rem "Public Sans", sans-serif;
    cursor: pointer;
    transition: all .15s;
    color: var(--ink-soft);
  }
  .mini-btn.ok:hover { border-color: var(--green); color: var(--green); background: var(--green-tint); }
  .mini-btn.no:hover { border-color: var(--red); color: var(--red); background: var(--red-tint); }
  .empty {
    text-align: center;
    color: var(--ink-faint);
    padding: 46px 20px !important;
    font-size: .86rem;
  }
  .empty .big { font-family: "Outfit", "Public Sans", sans-serif; font-size: 1.15rem; color: var(--ink-soft); display: block; margin-bottom: 6px; }

  /* ---------- Task rows on the timesheet ---------- */
  tr.proj-head td {
    background: var(--paper-2);
    text-align: left;
    padding: 9px 8px 9px 20px;
    border-bottom: 1px solid var(--rule);
    font-size: .78rem;
    font-weight: 700;
    color: var(--ink-soft);
  }
  tr.proj-head .proj-head-client { font-weight: 500; color: var(--ink-faint); margin-left: 8px; font-size: .72rem; }
  td.task-cell {
    text-align: left;
    padding: 10px 8px 10px 37px;
    min-width: 230px;
    font-size: .85rem;
    font-weight: 500;
  }
  .task-select {
    background: var(--input-bg);
    color: var(--ink);
    border: 1px solid var(--rule-strong);
    border-radius: 8px;
    padding: 9px 10px;
    font: 500 .84rem "Public Sans", sans-serif;
    cursor: pointer;
    min-width: 280px;
    max-width: 100%;
  }
  .task-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(185,58,49,.12); }

  /* ---------- Add-task row & picker modal ---------- */
  tr.add-row td { padding: 12px 20px; text-align: left; border-bottom: none; }
  .add-plus {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1.5px dashed var(--rule-strong);
    background: var(--input-bg);
    color: var(--accent);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    transition: all .15s;
  }
  .add-plus:hover { border-color: var(--accent); background: var(--accent-tint); transform: scale(1.06); }
  .add-plus-label {
    margin-left: 11px;
    color: var(--ink-soft);
    font-size: .84rem;
    font-weight: 500;
    cursor: pointer;
    vertical-align: middle;
  }
  tr.add-row:hover .add-plus-label { color: var(--accent); }
  /* a project group's own Add task, indented under its tasks */
  tr.add-task-row td { padding: 6px 20px 8px 37px; text-align: left; border-bottom: 1px solid var(--rule); }
  .add-plus.small { width: 26px; height: 26px; font-size: 1rem; }
  tr.add-task-row .add-plus-label { margin-left: 9px; font-size: .8rem; }
  tr.add-task-row:hover .add-plus-label { color: var(--accent); }
  .empty-group-hint { margin-left: 12px; font-size: .74rem; color: var(--ink-faint); vertical-align: middle; }
  /* a project picked without a task yet: its header has a ✕ to take it off the week */
  tr.proj-head .drop-empty {
    margin-left: 10px; border: none; background: none; color: var(--ink-faint); cursor: pointer;
    font-size: .8rem; padding: 2px 6px; border-radius: 6px; vertical-align: middle;
  }
  tr.proj-head .drop-empty:hover { color: var(--red); background: var(--red-tint); }

  .modal-wrap {
    position: fixed; inset: 0;
    /* the page behind a dialog is dimmed and softly blurred */
    background: rgba(29,36,32,.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: none;
    place-items: center;
    z-index: 60;
  }
  .modal-wrap.open { display: grid; }
  /* F52: a dialog the person reads the page beside (the expense form, View breakdown) is a drawer on
     a wide screen with a mouse: the same dialog, docked to the right at full height, the page behind
     dimmed but not blurred so it can be read (it still can't be used). Narrower screens and touch:
     unchanged. */
  .drawer-foot { display: contents; }
  /* F52-01: a drawer only where the page beside it keeps about 500px to be read: from 1280px for a
     460px drawer, from 1340px for a wide (520px) one (View breakdown, class drawer-wide). Below that,
     the centred dialog. The same rules for each, at its own width:
     - it slides out as smoothly as it slides in: display is kept until the slide out has finished
       (transition-behavior: allow-discrete), and @starting-style gives the slide in its start; the
       card moves and the dimming fades together. Closed, it's display: none as before, so nothing in
       it can be reached. (A browser without these just opens and closes it at once.)
     - the heading at the top and the buttons at the foot stay in view; the form scrolls between them
     - the page makes room, gliding with the drawer: its content moves out from under it */
  @media (min-width: 1280px) and (hover: hover) and (pointer: fine) {
    /* a drawer: from 1280px */
    .modal-wrap.as-drawer:not(.drawer-wide) { place-items: stretch end; background: rgba(29,36,32,0); -webkit-backdrop-filter: none; backdrop-filter: none;
      transition: background-color .3s ease, display .3s allow-discrete; }
    .modal-wrap.as-drawer:not(.drawer-wide).open { background: rgba(29,36,32,.22); }
    .modal-wrap.as-drawer:not(.drawer-wide) > .modal-card { width: min(460px, 100vw); height: 100dvh; max-height: none; border-radius: 0; border: none;
      border-left: 1px solid var(--rule-strong); animation: none; transform: translateX(100%);
      transition: transform .3s cubic-bezier(.32,.72,0,1); }
    .modal-wrap.as-drawer:not(.drawer-wide).open > .modal-card { transform: none; }
    @starting-style {
      .modal-wrap.as-drawer:not(.drawer-wide).open { background: rgba(29,36,32,0); }
      .modal-wrap.as-drawer:not(.drawer-wide).open > .modal-card { transform: translateX(100%); }
    }
    .modal-wrap.as-drawer:not(.drawer-wide) .hol-form, .modal-wrap.as-drawer:not(.drawer-wide) .modal-body { flex: 1; }
    .modal-wrap.as-drawer:not(.drawer-wide) .hol-form { padding-bottom: 0; }
    .modal-wrap.as-drawer:not(.drawer-wide) .drawer-foot { display: flex; flex-direction: column; gap: 10px; position: sticky; bottom: 0; margin: auto -20px 0;
      padding: 12px 20px 18px; background: var(--dialog); border-top: 1px solid var(--rule); }
    main { transition: padding-right .3s cubic-bezier(.32,.72,0,1); }
    body:has(.modal-wrap.as-drawer:not(.drawer-wide).open) main { padding-right: calc(460px + 24px); }
  }
  @media (min-width: 1280px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
    .modal-wrap.as-drawer:not(.drawer-wide), .modal-wrap.as-drawer:not(.drawer-wide) > .modal-card, main { transition: none; }
  }
  @media (min-width: 1340px) and (hover: hover) and (pointer: fine) {
    /* a wide drawer (View breakdown's moves need a little more room): from 1340px */
    .modal-wrap.as-drawer.drawer-wide { place-items: stretch end; background: rgba(29,36,32,0); -webkit-backdrop-filter: none; backdrop-filter: none;
      transition: background-color .3s ease, display .3s allow-discrete; }
    .modal-wrap.as-drawer.drawer-wide.open { background: rgba(29,36,32,.22); }
    .modal-wrap.as-drawer.drawer-wide > .modal-card { width: min(520px, 100vw); height: 100dvh; max-height: none; border-radius: 0; border: none;
      border-left: 1px solid var(--rule-strong); animation: none; transform: translateX(100%);
      transition: transform .3s cubic-bezier(.32,.72,0,1); }
    .modal-wrap.as-drawer.drawer-wide.open > .modal-card { transform: none; }
    @starting-style {
      .modal-wrap.as-drawer.drawer-wide.open { background: rgba(29,36,32,0); }
      .modal-wrap.as-drawer.drawer-wide.open > .modal-card { transform: translateX(100%); }
    }
    .modal-wrap.as-drawer.drawer-wide .hol-form, .modal-wrap.as-drawer.drawer-wide .modal-body { flex: 1; }
    .modal-wrap.as-drawer.drawer-wide .hol-form { padding-bottom: 0; }
    .modal-wrap.as-drawer.drawer-wide .drawer-foot { display: flex; flex-direction: column; gap: 10px; position: sticky; bottom: 0; margin: auto -20px 0;
      padding: 12px 20px 18px; background: var(--dialog); border-top: 1px solid var(--rule); }
    main { transition: padding-right .3s cubic-bezier(.32,.72,0,1); }
    body:has(.modal-wrap.as-drawer.drawer-wide.open) main { padding-right: calc(520px + 24px); }
  }
  @media (min-width: 1340px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
    .modal-wrap.as-drawer.drawer-wide, .modal-wrap.as-drawer.drawer-wide > .modal-card, main { transition: none; }
  }
  /* the questions asked over another dialog (a reason, a confirmation) always come out on top */
  #reason-modal, #confirm-modal { z-index: 70; }
  .modal-card {
    width: min(440px, calc(100vw - 40px));
    max-height: 72vh;
    background: var(--dialog);
    border: 1px solid var(--rule-strong); /* a subtle edge against the dimmed page */
    border-radius: 14px;
    box-shadow: var(--dialog-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: rise .3s cubic-bezier(.2,.7,.3,1) both;
  }
  .modal-head {
    display: flex; align-items: center; gap: 10px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--rule);
    background: var(--dialog);
  }
  .modal-title { font-family: "Outfit", "Public Sans", sans-serif; font-weight: 600; font-size: 1.05rem; flex: 1; }
  /* a dialog with a form and more below it: everything under the title scrolls together */
  .modal-scroll, .modal-card > .hol-form { overflow-y: auto; min-height: 0; } /* a form filling a dialog scrolls under its title */
  .modal-body {
    overflow-y: auto;
    padding: 10px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .tp-label {
    font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ink-faint); font-weight: 700;
    padding: 12px 10px 5px;
  }
  .tp-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: left;
    background: none; border: none; border-radius: 8px;
    padding: 11px 10px;
    font: 500 .87rem "Public Sans", sans-serif;
    color: var(--ink);
    cursor: pointer;
    transition: background .12s;
  }
  .tp-item:hover { background: var(--accent-tint); }
  .tp-item:disabled { opacity: .5; cursor: default; }
  .tp-item:disabled:hover { background: none; }
  .tp-client { color: var(--ink-faint); font-size: .74rem; margin-left: auto; }
  .tp-chev { color: var(--ink-faint); font-size: 1.05rem; }
  .tp-add { margin-left: auto; color: var(--accent); font-weight: 700; font-size: 1.05rem; }
  .tp-tag {
    margin-left: auto;
    font-size: .62rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ink-faint);
    border: 1px solid var(--rule-strong);
    padding: 2px 8px; border-radius: 99px;
  }
  .tp-empty { padding: 22px; color: var(--ink-faint); text-align: center; font-size: .85rem; }
  .tp-tag.hrs-tag { color: var(--accent); border-color: rgba(185,58,49,.3); background: var(--accent-tint); text-transform: none; letter-spacing: 0; }
  .role-toggles { display: flex; gap: 8px; flex-wrap: wrap; }
  .role-pill {
    display: inline-flex; align-items: center;
    border: 1px solid var(--rule-strong);
    border-radius: 99px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: .8rem; font-weight: 600;
    color: var(--ink-faint);
    user-select: none;
    transition: all .15s;
  }
  .role-pill input { display: none; }
  .role-pill:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-tint);
    color: var(--accent-deep);
  }
  .role-pill:hover { border-color: var(--accent); }
  .task-right { margin-left: auto; display: flex; align-items: center; gap: 7px; }
  .task-right .tp-tag { margin-left: 0; }

  /* ---------- Projects view ---------- */
  .seg-toggle {
    display: inline-flex;
    border: 1px solid var(--rule-strong);
    border-radius: 9px;
    overflow: hidden;
    background: var(--input-bg);
    align-self: flex-end;
  }
  .seg-toggle button {
    border: none;
    background: none;
    padding: 9px 13px;
    cursor: pointer;
    color: var(--ink-faint);
    display: grid;
    place-items: center;
    transition: all .15s;
  }
  .seg-toggle button svg { width: 17px; height: 17px; }
  .seg-toggle button:hover { color: var(--ink); }
  .seg-toggle button.on { background: var(--accent-tint); color: var(--accent-deep); }
  .seg-toggle button + button { border-left: 1px solid var(--rule); }
  .seg-toggle .seg-text { font: 600 .76rem "Public Sans", sans-serif; padding: 9px 14px; }

  /* F45: each client's projects in an area in the in-between tone, like System's and Reports'
     panels (F42), the heading inside it; the cards keep their own colour */
  .proj-group {
    background: var(--island); border: 1px solid var(--rule-strong); border-radius: 14px;
    padding: 18px; min-width: 0;
  }
  .proj-group + .proj-group { margin-top: 18px; }
  .client-head {
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: "Outfit", "Public Sans", sans-serif;
    font-weight: 600;
    font-size: 1.08rem;
    margin-bottom: 14px;
  }
  .client-head .logo-tile { width: 30px; height: 30px; border-radius: 7px; font-size: .68rem; }
  .client-head .count {
    font: 500 .7rem "Public Sans", sans-serif;
    color: var(--ink-faint);
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .proj-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
  }
  .proj-grid.list-view .proj-group-grid { grid-template-columns: 1fr; gap: 10px; }
  .proj-card.proj-add {
    background: transparent;
    border: 1.5px dashed var(--rule-strong);
    align-items: center; justify-content: center; gap: 12px;
    min-height: 150px; cursor: pointer; color: var(--ink-soft);
    transition: border-color .15s, color .15s, background .15s;
  }
  .proj-card.proj-add:hover, .proj-card.proj-add:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
  .proj-card.proj-add .add-plus {
    pointer-events: none; width: 44px; height: 44px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: inherit; transition: border-color .15s, color .15s;
  }
  .proj-card.proj-add .add-plus svg { width: 18px; height: 18px; display: block; }
  .proj-card.proj-add:hover .add-plus, .proj-card.proj-add:focus-visible .add-plus { border-color: var(--accent); }
  .proj-card.proj-add .proj-add-label { font: 500 .88rem "Public Sans", sans-serif; }
  .proj-card.proj-add.editing { cursor: default; border-style: solid; border-color: var(--accent); justify-content: flex-start; align-items: stretch; }
  /* the name box is a .field, as in a dialog (F50); the card's hover colour doesn't reach it */
  .proj-add form { display: flex; flex-direction: column; gap: 13px; width: 100%; color: var(--ink); }
  .proj-add .proj-add-actions { display: flex; gap: 8px; }
  .list-view .proj-card.proj-add { min-height: 0; flex-direction: row; padding: 12px 18px; justify-content: center; align-items: center; }
  .list-view .proj-card.proj-add .add-plus { width: 34px; height: 34px; }
  .list-view .proj-card.proj-add .add-plus svg { width: 14px; height: 14px; }
  /* F51, changed by F54: a project card is a short summary: a heading area in the app's own tone, one
     step darker than the card's body (the same for every client), then the budget, task count and
     weekly hours. The name is the button that opens the project; its click area spreads over the
     card, under the icon buttons. The client's colour is on the client's heading strip, and on the
     open project's edges only (--edge: the strip's colour where it shows against the card in this
     theme, else the strong rule colour; set per card and panel as --edge-light and --edge-dark). */
  .proj-card:not(.proj-add), .proj-panel { --edge: var(--edge-light, var(--rule-strong)); }
  html[data-theme="dark"] :is(.proj-card, .proj-panel) { --edge: var(--edge-dark, var(--rule-strong)); }
  @media (prefers-color-scheme: dark) { html[data-theme="auto"] :is(.proj-card, .proj-panel) { --edge: var(--edge-dark, var(--rule-strong)); } }
  .proj-card:not(.proj-add) { position: relative; padding: 0; gap: 0; overflow: hidden; }
  .proj-band { background: var(--paper-2); color: var(--ink); border-bottom: 1px solid var(--rule); display: flex; align-items: flex-start; gap: 8px; padding: 14px 14px 14px 18px; min-height: 66px; }
  .proj-open { flex: 1; min-width: 0; background: none; border: 0; padding: 2px 0 0; margin: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
  .proj-open::after { content: ""; position: absolute; inset: 0; z-index: 0; }
  .proj-open .proj-name { font: 600 .98rem/1.3 "Public Sans", sans-serif; display: block; overflow-wrap: anywhere; }
  .proj-open:focus { outline: none; }
  .proj-card:has(.proj-open:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
  .proj-band .head-actions, .proj-band .done-tag { position: relative; z-index: 1; }
  .proj-band .done-tag { margin: 3px 0 0; flex: none; }
  .proj-chev { display: none; }
  .proj-card-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 18px 14px; flex: 1; }
  .proj-card-body .burn { padding: 0; }
  .proj-card-body .burn-none .burn-meta { margin-bottom: 0; }
  .proj-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .8rem; color: var(--ink-soft); margin-top: auto; }
  .proj-card-meta .proj-week-chip { margin-left: 0; }
  .proj-card.selected { border-color: var(--edge); box-shadow: 0 0 0 1px var(--edge); }
  /* F54: the client's heading, a strip in its colour across the top of its area */
  .client-head.has-strip { background: var(--strip); color: var(--strip-fg); margin: -18px -18px 14px; padding: 12px 18px; border-radius: 13px 13px 0 0; flex-wrap: wrap; row-gap: 4px; }
  .client-head.has-strip .count { color: inherit; opacity: .85; }
  /* no colour chosen (or no client): a plain strip, a shade darker than the area, as the cards' headings */
  .client-head.has-strip.plain { --strip: color-mix(in srgb, var(--island), var(--ink) 6%); --strip-fg: var(--ink); }
  .client-head.has-strip.plain .count { color: var(--ink-faint); opacity: 1; }
  .ce-colour-row { display: flex; align-items: center; gap: 14px; }
  .ce-colour-row:has(#ce-no-colour:checked) .swatch { opacity: .35; }
  /* the open project: below its card's row, the full width, a pointer up to its card. F54: three
     layers, the grid item, a clip (with room above for the pointer) and the box. It grows and shrinks
     by its height, measured once and animated from or to nothing (projects.js growPanel and
     leaveGhost), the page below moving with it; .collapsed is its closed look (no gap, no pointer
     room, the box faded). Only a person's own open or close animates, never a redraw. */
  .proj-panel { grid-column: 1 / -1; min-width: 0; margin-top: -8px;
    transition: height .2s cubic-bezier(.2,.7,.3,1), margin-top .2s cubic-bezier(.2,.7,.3,1); }
  .proj-panel.animating { overflow: hidden; }
  .proj-panel-clip { padding-top: 8px; transition: padding-top .2s cubic-bezier(.2,.7,.3,1); }
  .proj-panel-box { position: relative; background: var(--card); border: 1px solid var(--edge); border-radius: 14px; padding: 18px 20px 20px; transition: opacity .2s ease-out; }
  .proj-panel-box::before { content: ""; position: absolute; top: -8px; left: calc(var(--pointer-x, 40px) - 8px); width: 14px; height: 14px;
    background: var(--card); border-top: 1px solid var(--edge); border-left: 1px solid var(--edge); transform: rotate(45deg); }
  .proj-panel.collapsed { margin-top: -16px; }
  .proj-panel.collapsed .proj-panel-clip { padding-top: 0; }
  .proj-panel.collapsed .proj-panel-box { opacity: 0; }
  @media (prefers-reduced-motion: reduce) { .proj-panel, .proj-panel-clip, .proj-panel-box { transition: none; } }
  .proj-panel-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .proj-panel-title { margin: 0; font: 600 1.15rem/1.3 "Outfit", "Public Sans", sans-serif; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .proj-panel-title:focus { outline: none; }
  .proj-panel-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
  .proj-panel-title .done-tag { margin-left: 0; }
  .proj-panel-client { font-size: .82rem; color: var(--ink-faint); margin-top: 2px; }
  .proj-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .proj-panel-actions .btn, .proj-add-task { padding: 7px 14px; font-size: .82rem; }
  .btn-danger-quiet:hover { border-color: var(--red); color: var(--red); }
  .proj-panel-sec { margin-top: 18px; }
  .proj-panel-label { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
  .proj-progress { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; margin: 6px 0 7px; }
  .proj-progress .over { color: var(--red); font-weight: 700; }
  .proj-progress .warn { color: var(--amber-deep); font-weight: 600; }
  .proj-panel-tasks-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
  .proj-panel .task-list .task-none { color: var(--ink-faint); }
  .proj-panel .task-list .task-none::before { content: none; }
  /* F51 list view: a row per project; the same panel opens below it, inside the row's border, as an
     accordion. F54: only the open row and its panel carry the client's colour, on their left edge */
  .list-view .proj-card:not(.proj-add) { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding: 10px 14px 10px 16px; }
  .list-view .proj-band, .list-view .proj-card-body { display: contents; }
  .list-view .proj-open { flex: 1 1 220px; order: 1; padding: 0; color: var(--ink); }
  .list-view .proj-band .done-tag { order: 2; margin: 0; }
  .list-view .proj-card-body .burn { order: 3; flex: 0 1 240px; min-width: 160px; }
  .list-view .proj-card-meta { order: 4; margin: 0; flex: none; }
  .list-view .proj-band .head-actions { order: 5; margin-left: 0; }
  .list-view .proj-chev { display: block; order: 6; width: 0; height: 0; border-left: 5px solid var(--ink-faint); border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .2s cubic-bezier(.2,.7,.3,1); }
  .list-view .proj-card.selected .proj-chev { transform: rotate(90deg); }
  .list-view .proj-card.selected { box-shadow: none; border-color: var(--rule); border-left: 6px solid var(--edge); border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-left: 11px; }
  .list-view .proj-panel { margin-top: -10px; }
  .list-view .proj-panel-clip { padding-top: 0; }
  .list-view .proj-panel-box { border: 1px solid var(--rule); border-left: 6px solid var(--edge); border-top: 1px dashed var(--rule); border-radius: 0 0 14px 14px; }
  .list-view .proj-panel-box::before { content: none; }
  .list-view .proj-panel.collapsed { margin-top: -10px; }
  .proj-card-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
  .logo-tile {
    width: 38px; height: 38px;
    border-radius: 9px;
    flex-shrink: 0;
    background: var(--paper-2);
    border: 1px solid var(--rule);
    display: grid;
    place-items: center;
    font: 600 .82rem "Outfit", "Public Sans", sans-serif;
    color: var(--ink-soft);
    letter-spacing: .02em;
  }
  /* A logo keeps its own shape: as tall as an initials tile and as wide as it needs, up to about
     2.5 times that, on a white plate so dark and transparent logos show in either theme */
  .logo-tile.has-logo {
    width: auto; min-width: 38px;
    padding: 0 6px;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
  }
  .logo-tile.has-logo img { height: 28px; width: auto; max-width: 84px; object-fit: contain; }
  .client-head .logo-tile.has-logo { min-width: 30px; padding: 0 5px; }
  .client-head .logo-tile.has-logo img { height: 22px; max-width: 66px; }
  /* The clients list keeps its names lined up: the logo column is as wide as the widest logo */
  #client-list { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 14px; }
  #client-list > .empty { grid-column: 1 / -1; }
  #client-list .client-row { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; }
  #client-list .client-row > .logo-tile { justify-self: start; }
  .client-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--rule);
  }
  .client-row:last-child { border-bottom: none; }
  .client-row .cname { font-weight: 600; font-size: .9rem; }
  .client-row .cmeta { font-size: .75rem; color: var(--ink-faint); margin-top: 2px; }
  .client-row .client-row-text { flex: 1; min-width: 0; }
  /* F51: each client's colour as a 3px line along the foot of its row, the full width */
  #client-list .client-row, #client-list .client-row:last-child { border-bottom: 3px solid var(--client-colour, var(--rule)); }
  /* F51: a colour picker dressed as the app's swatch: the browser's picker opens from it */
  input.swatch { -webkit-appearance: none; appearance: none; flex: none; width: 34px; height: 34px; padding: 3px; cursor: pointer;
    border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--input-bg); font: inherit; }
  input.swatch::-webkit-color-swatch-wrapper { padding: 0; }
  input.swatch::-webkit-color-swatch { border: none; border-radius: 5px; }
  input.swatch::-moz-color-swatch { border: none; border-radius: 5px; }
  input.swatch:hover { border-color: var(--ink-faint); }
  input.swatch:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(185,58,49,.12); }
  .field-colour input.swatch { width: 42px; height: 42px; display: block; }
  .proj-card.done { opacity: .55; filter: grayscale(.5); }
  .proj-card.done:hover { opacity: .8; }
  .done-tag { margin-left: 9px; }
  .head-actions { margin-left: auto; display: flex; gap: 4px; flex-shrink: 0; }
  .head-actions .del-card { margin-left: 0; }
  .proj-card-head .dot { margin-top: 6px; }
  .proj-card-head .proj-name { font-size: .95rem; }
  .del-card {
    margin-left: auto;
    border: 1px solid transparent; background: none; cursor: pointer;
    color: var(--ink-faint); border-radius: 7px; padding: 4px 9px; font-size: .85rem;
  }
  .del-card:hover { color: var(--red); background: var(--red-tint); }
  .head-actions .del-card.ok:hover { color: var(--accent); background: var(--accent-tint); }
  .head-actions .del-card.edit:hover { color: var(--blue); background: var(--blue-tint); }
  .task-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
  .task-list li {
    display: flex; align-items: center; gap: 9px;
    font-size: .84rem;
    padding: 8px 11px;
    background: var(--paper-2);
    border-radius: 7px;
  }
  .task-list li::before { content: "•"; color: var(--ink-faint); }
  .task-list .x {
    margin-left: auto; border: none; background: none;
    color: var(--ink-faint); cursor: pointer; border-radius: 5px; padding: 2px 7px;
  }
  .task-list .x:hover { color: var(--red); background: var(--red-tint); }
  .task-list .x.edit:hover { color: var(--accent); background: var(--accent-tint); }
  .task-add { display: flex; gap: 8px; margin-top: 14px; }
  .task-add input {
    flex: 1;
    padding: 8px 11px;
    border: 1px solid var(--rule-strong);
    border-radius: 7px;
    font: 400 .83rem "Public Sans", sans-serif;
    background: var(--input-bg);
  }
  .task-add input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(185,58,49,.12); }
  .new-proj-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 16px 20px 20px; }
  .new-proj-form .field { flex: 1; min-width: 200px; }

  /* ---------- Login ---------- */
  body.auth-out aside, body.auth-out main { display: none; }
  .login-wrap {
    position: fixed; inset: 0;
    display: none;
    place-items: center;
    background:
      radial-gradient(900px 480px at 80% -10%, rgba(185,58,49,.08), transparent 60%),
      var(--paper);
    z-index: 40;
  }
  body.auth-out .login-wrap { display: grid; }
  .login-card {
    width: min(380px, calc(100vw - 40px));
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 34px 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: rise .4s cubic-bezier(.2,.7,.3,1) both;
  }
  .login-logo {
    font-family: "Outfit", "Public Sans", sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    display: flex; align-items: baseline; gap: 8px;
  }
  .login-logo .tick { color: var(--accent); font-size: 1.5rem; }
  .login-sub { color: var(--ink-soft); font-size: .85rem; margin-top: -8px; }
  .login-err { color: var(--red); font-size: .8rem; font-weight: 600; min-height: 1em; }
  .login-hint {
    font-size: .7rem; color: var(--ink-faint); line-height: 1.6;
    border-top: 1px dashed var(--rule-strong); padding-top: 12px; margin-top: 4px;
  }
  .login-hint code { font-family: "Spline Sans Mono", monospace; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
  .login-hint span { white-space: nowrap; } /* keeps each demo username with its password */

  /* ---------- View-as / acting ---------- */
  .view-as-inline { display: none; align-items: center; gap: 9px; }
  .view-as-inline.on { display: inline-flex; }
  .view-as-inline label {
    font-size: .66rem; font-weight: 600; letter-spacing: .13em;
    text-transform: uppercase; color: var(--ink-faint); white-space: nowrap;
  }
  .view-as-inline select {
    background: var(--input-bg);
    color: var(--ink);
    border: 1px solid var(--rule-strong);
    border-radius: 8px;
    padding: 8px 10px;
    font: 500 .82rem "Public Sans", sans-serif;
    cursor: pointer;
    max-width: 220px;
  }
  .view-as-inline select:hover { border-color: var(--accent); }
  .view-as-inline select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(185,58,49,.12); }
  #acting-banner {
    display: none;
    align-items: center;
    gap: 12px;
    background: color-mix(in srgb, var(--amber-tint) 55%, var(--card));
    color: var(--amber-deep);
    padding: 11px 16px;
    font-size: .84rem;
    font-weight: 500;
    /* edge, shadow and margins: the shared alert look (see .notice) */
  }
  #acting-banner.on { display: flex; }
  #acting-banner .btn { margin-left: auto; padding: 6px 12px; font-size: .74rem; }
  .logout-btn {
    margin-left: auto;
    background: none; border: none; cursor: pointer;
    color: #8b968e; font-size: 1rem; padding: 6px; border-radius: 6px;
  }
  .logout-btn:hover { color: #f0ede2; background: rgba(255,255,255,.08); }

  :root[data-theme="dark"] { color-scheme: dark; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
  select:disabled, input:disabled { opacity: .55; cursor: not-allowed; }
  .confirm-text { white-space: pre-line; font-size: .88rem; line-height: 1.5; color: var(--ink-soft); padding: 4px 0 14px; }
  .confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
  .user-card .signout-link { background: none; border: none; padding: 0; margin-top: 2px; font: 500 .72rem "Public Sans", sans-serif; color: #8b968e; cursor: pointer; }
  .user-card .signout-link:hover { color: #f0ede2; text-decoration: underline; }
  /* toast */
  #toast {
    position: fixed;
    bottom: 26px; left: 50%;
    transform: translate(-50%, 80px);
    background: var(--side-bg);
    color: #f0ede2;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 500;
    border: 1.5px solid var(--pop-edge);
    box-shadow: 4px 4px 0 var(--pop-edge);
    transition: transform .35s cubic-bezier(.2,.7,.3,1);
    z-index: 50;
    display: flex; align-items: center; gap: 10px;
  }
  #toast { max-width: min(560px, calc(100vw - 32px)); line-height: 1.4; transform: translate(-50%, calc(100% + 60px)); }
  #toast.show { transform: translate(-50%, 0); }
  #toast .tick2 { color: #8fd3a8; font-weight: 700; }
  #toast.error { background: #5a2420; }
  #toast.error .tick2 { color: #ffb4a8; }

  .demo-note {
    margin-top: 22px;
    font-size: .75rem;
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .demo-note code { font-family: "Spline Sans Mono", monospace; background: var(--paper-2); padding: 2px 7px; border-radius: 5px; }
  /* F53: Users' note about links, just under the invite form it explains */
  .users-help-note { margin: -8px 4px 20px; line-height: 1.5; }

  /* ---------- Mobile ---------- */
  @media (max-width: 900px) {
    body { flex-direction: column; }

    /* sidebar becomes a sticky top bar */
    aside {
      width: 100%;
      height: auto;
      position: sticky;
      top: 0;
      z-index: 30;
      flex-direction: row;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      box-shadow: 0 2px 12px rgba(29,36,32,.25);
    }
    .logo { font-size: 1.05rem; }
    .logo .tick { font-size: 1.15rem; }
    .logo small { display: none; }

    /* burger on the left of the logo; nav slides in full-height from the left */
    .burger { display: block; }
    nav {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      width: min(78vw, 300px);
      margin-top: 0;
      flex-direction: column;
      gap: 4px;
      background: var(--side-bg);
      padding: 20px 14px 24px;
      box-shadow: 14px 0 34px rgba(29,36,32,.4);
      transform: translateX(-100%);
      visibility: hidden;
      transition: transform .28s cubic-bezier(.2,.7,.3,1), visibility .28s;
      overflow-y: auto;
      z-index: 40;
    }
    body.nav-open nav { transform: translateX(0); visibility: visible; }
    /* while the drawer is open the bar (and the drawer inside it) sits above the backdrop; otherwise
       the backdrop covered the drawer and a tap on a menu item only closed it */
    body.nav-open aside { z-index: 45; }
    /* dimmed backdrop behind the drawer */
    body.nav-open::before {
      content: "";
      position: fixed;
      inset: 0;
      background: rgba(29,36,32,.45);
      z-index: 35;
    }
    .user-card {
      margin-top: 0;
      margin-left: auto;
      border-top: none;
      padding: 0;
      gap: 8px;
    }
    .user-card .name, .user-card .role { display: none; }
    .avatar { width: 30px; height: 30px; font-size: .7rem; }
    .logout-btn { margin-left: 0; }

    main { padding: 16px 14px 48px; }
    h1 { font-size: 1.45rem; }
    .page-head { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 18px; }
    .week-nav { flex-wrap: wrap; }
    .week-label { min-width: 0; flex: 1; }
    .sheet-toolbar { flex-wrap: wrap; gap: 10px; }
    .sheet-toolbar .left { flex-wrap: wrap; row-gap: 8px; flex-basis: 100%; }
    #entry-hint { display: none; }
    #entry-hint.hint-warn { display: block; width: 100%; order: 3; }
    .sheet-toolbar > div:last-child { width: 100%; justify-content: flex-end; }
    #view-timesheets .sheet-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
    #view-timesheets .sheet-toolbar .left { display: contents; }
    #view-timesheets .sheet-toolbar .view-as-inline { grid-column: 1 / -1; min-width: 0; }
    #view-timesheets .sheet-toolbar .view-as-inline select { min-width: 0; max-width: 100%; flex: 1; }
    #view-timesheets #week-status { grid-column: 1; grid-row: 2; justify-self: start; }
    #view-timesheets #entry-hint { display: none; }
    #view-timesheets #entry-hint.hint-warn { display: block; grid-column: 1 / -1; grid-row: 3; }
    #view-timesheets .sheet-toolbar > .sheet-actions { grid-column: 2; grid-row: 2; width: auto; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
    #view-timesheets .sheet-actions .btn { max-width: 100%; min-height: 44px; white-space: normal; }
    #view-timesheets .sheet-toolbar:has(.view-as-inline:not(.on)) #week-status,
    #view-timesheets .sheet-toolbar:has(.view-as-inline:not(.on)) .sheet-actions { grid-row: 1; }
    #acting-banner { flex-wrap: wrap; }
    #acting-banner .btn { margin-left: 0; }

    /* tables scroll sideways inside the card instead of crushing */
    #sheet { min-width: 720px; }
    .hol-table { min-width: 560px; }

    .holiday-grid, .holiday-grid.team-grid { grid-template-columns: 1fr; }
    .dash-attn, .dash-grid { grid-template-columns: 1fr; }
    .tk-row { flex-wrap: wrap; row-gap: 6px; }
    .tk-name { width: 100%; }
    .tk-hours { min-width: 0; }
    .stat-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat { padding: 14px 16px; }
    .stat .num { font-size: 1.5rem; }
    .proj-group-grid { grid-template-columns: 1fr; }
    .proj-group { padding: 10px; }
    .client-head.has-strip { margin: -10px -10px 10px; padding: 10px 12px; }
    .client-head { margin: 4px 4px 10px; }
    .tile-grid { grid-template-columns: 1fr; }
    .budget-row { gap: 12px; }
    .b-ring { width: 50px; height: 50px; }
    .list-view .proj-card-body .burn { flex: 1 1 100%; order: 4; }
    .list-view .proj-card-meta { order: 3; }
    .proj-panel { padding: 16px; }
    .new-proj-form .field { min-width: 100%; }
    .modal-card { max-height: 82vh; }
  }

  /* very small screens */
  @media (max-width: 560px) {
    main { padding: 12px 10px 44px; }
    .btn { padding: 10px 13px; font-size: .78rem; }
    .week-nav .btn-ghost { display: none; }
  }

  /* F18 — touch screens keep the page at its own scale. iOS Safari zooms into any field whose text
     is under 16px when it's tapped, and leaves the page zoomed; so on touch screens every field's
     text is at least 16px (!important: a few fields set their font inline). Double-tap zoom is off
     (touch-action); pinch zoom is limited by the viewport tag, and on iOS by js/shell.js. Desktop
     (a fine pointer) is unchanged. */
  @media (pointer: coarse) {
    html { touch-action: manipulation; }
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { font-size: 16px !important; }
  }

/* Daily notes: a compact control below each hours input; full text opens in a dialog. */
.daily-cell { display: grid; grid-template-rows: auto 30px; justify-items: center; align-items: center; gap: 3px; }
.daily-cell:not(:has(.daily-note-btn)) { grid-template-rows: auto; }
.daily-note-btn { border: 1px solid var(--rule); border-radius: 6px; background: var(--card); color: var(--ink-faint); min-width: 36px; min-height: 30px; cursor: pointer; }
.daily-note-btn.has-note { color: var(--accent); border-color: var(--accent); }
.daily-note-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.retained-note { font-size: .75rem; color: var(--ink-faint); max-width: 260px; margin-top: 5px; white-space: normal; overflow-wrap: anywhere; }
.retained-note div, .rb-source-notes p { white-space: pre-wrap; overflow-wrap: anywhere; }
.retained-note summary { cursor: pointer; }
.rb-source-notes { width: 100%; font-size: .8rem; }
.rb-row:has(.rb-source-notes) { flex-wrap: wrap; }
#daily-note-text { white-space: pre-wrap; }
/* F43: common notes as a menu button, the menu dropping over the note below it */
.note-common { margin-bottom: 10px; position: relative; }
.note-common[hidden] { display: none; }
.note-common-label { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.note-common-btn { width: 100%; justify-content: space-between; }
.note-common-caret { font-size: .8em; }
.note-common-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5;
  max-height: 240px; overflow-y: auto; padding: 4px;
  background: var(--dialog); border: 1px solid var(--rule-strong); border-radius: 8px; box-shadow: var(--shadow);
}
.note-common-menu[hidden] { display: none; }
.note-common-menu [role="menuitem"] {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: none; border-radius: 6px;
  background: none; color: var(--ink); font: inherit; font-size: .86rem; cursor: pointer; overflow-wrap: anywhere;
}
.note-common-menu [role="menuitem"]:hover, .note-common-menu [role="menuitem"]:focus { background: var(--paper-2); outline: none; }
.note-common-menu [role="menuitem"]:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
/* wider than other dialogs, so three recent notes fit side by side */
#daily-note .modal-card { width: min(680px, calc(100vw - 40px)); }
/* the last three chosen: side by side, a third each, on wider screens; stacked on phones */
.note-recent { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.note-recent[hidden] { display: none; }
.note-recent-btn {
  padding: 7px 10px; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--paper-2); color: var(--ink);
  font: 500 .8rem "Public Sans", sans-serif; text-align: left; line-height: 1.3; cursor: pointer; overflow-wrap: anywhere;
}
.note-recent-plus { color: var(--ink-faint); margin-right: 5px; }
.note-recent-btn:hover { border-color: var(--accent); color: var(--accent); }
.note-recent-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 640px) {
  .note-recent { grid-template-columns: 1fr; }
}
@media (max-width: 640px), (pointer: coarse) {
  .note-common-menu [role="menuitem"], .note-recent-btn { min-height: 44px; }
}
/* F26: a note every entry with hours needs before the week is submitted. A border, a tint and the
   words "Note required", never the colour alone */
.notes-required { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 20px 14px; padding: 10px 14px;
  border: 1.5px solid var(--red); border-radius: 8px; background: var(--red-tint); color: var(--ink); font-size: .84rem; }
.notes-required[hidden] { display: none; }
.notes-required.done { border-color: var(--rule-strong); background: var(--paper-2); }
.notes-required .btn { margin-left: auto; }
.daily-note-btn.note-required { border: 2px solid var(--red); background: var(--red-tint); color: var(--red); }
.note-required-tag { color: var(--red); font-size: .62rem; font-weight: 700; line-height: 1.2; text-align: center; letter-spacing: .02em; }
td.note-needed { background: var(--red-tint); }
.note-required-msg { margin: 6px 0 0; color: var(--red); font-size: .8rem; font-weight: 600; }
.note-required-msg[hidden] { display: none; }
#daily-note-text[aria-invalid="true"] { border-color: var(--red); }
#daily-note-save[hidden], #daily-note-discard[hidden] { display: none; }
/* F43: twice the dialog's 2px gap between Save note and Discard changes */
#daily-note-save + #daily-note-discard { margin-top: 2px; }
/* F17: compact day-first timesheet at phone widths. The table remains the desktop editor. */
@media (max-width: 640px) {
  #mobile-entry[hidden], #mobile-review-launch[hidden], #mobile-week-review[hidden] { display: none !important; }
  #view-timesheets .sheet-actions #submit-btn { display: none !important; }
  #view-timesheets .capacity { flex-wrap: wrap; gap: 9px; }
  #view-timesheets .capacity .cap-track { flex-basis: 100%; order: 3; }
  #mobile-entry { display: block; padding: 12px; }
  .mobile-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
  .mobile-day { min-width: 0; min-height: 62px; padding: 5px 1px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 1px solid var(--rule); border-radius: 9px; background: var(--card); color: var(--ink-soft); cursor: pointer; }
  .mobile-day span { font-size: .68rem; }
  .mobile-day strong { font: 600 .93rem "Spline Sans Mono", monospace; }
  .mobile-day small { font: 500 .59rem "Spline Sans Mono", monospace; color: var(--ink-faint); }
  .mobile-day.selected { background: var(--accent); border-color: var(--accent); color: white; }
  .mobile-day.selected small { color: white; }
  .mobile-day.today:not(.selected) { border-color: var(--accent); color: var(--accent); }
  .mobile-selected-day { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 15px 2px 11px; }
  .mobile-selected-day > div { display: flex; flex-direction: column; gap: 2px; }
  .mobile-day-context { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
  .mobile-day-context .chip { margin: 0; font-size: .58rem; padding: 4px 7px; }
  .mobile-selected-day strong { font: 600 .94rem "Outfit", sans-serif; }
  .mobile-selected-day span { color: var(--ink-faint); font-size: .75rem; }
  .mobile-project { border: 1px solid var(--rule); border-radius: 11px; overflow: hidden; margin: 0 0 9px; background: var(--card); }
  .mobile-project h3 { margin: 0; }
  .mobile-project-toggle { width: 100%; min-height: 60px; display: grid; grid-template-columns: minmax(0, 1fr) auto 26px; align-items: center; gap: 10px; padding: 9px 12px; text-align: left; border: 0; background: var(--paper-2); color: var(--ink); cursor: pointer; }
  .mobile-project-toggle > span:first-child { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
  .mobile-project-toggle strong { font-size: .87rem; overflow-wrap: anywhere; }
  .mobile-project-toggle small { font-size: .7rem; font-weight: 400; color: var(--ink-faint); }
  .mobile-project-total { font: 600 .78rem "Spline Sans Mono", monospace; white-space: nowrap; }
  .mobile-project-chevron { font-size: 1.2rem; text-align: center; color: var(--ink-faint); }
  .mobile-project-panel { padding: 9px; }
  .mobile-task-card { position: relative; padding: 11px; margin: 0 0 8px; border: 1px solid var(--rule); border-radius: 9px; background: var(--card); }
  .mobile-task-card.note-needed { border: 1.5px solid var(--red); }
  .mobile-task-card .note-required-tag { margin: 6px 0 0; text-align: left; font-size: .72rem; }
  .mobile-day.note-needed { box-shadow: inset 0 0 0 2px var(--red); }
  .mobile-day-needed { display: block; color: var(--red); font-size: .58rem; font-style: normal; font-weight: 700; }
  .mobile-review-task .note-required-tag { display: block; text-align: left; }
  #mobile-review-no-notes p { margin: 0 0 6px; }
  .notes-required { margin: 0 0 12px; }
  .mobile-task-title { display: flex; align-items: flex-start; gap: 7px; min-height: 28px; padding-right: 32px; }
  .mobile-task-title strong { flex: 1; min-width: 0; font-size: .86rem; line-height: 1.35; overflow-wrap: anywhere; }
  .mobile-note-indicator { color: var(--accent); border: 1px solid currentColor; border-radius: 5px; padding: 2px 5px; font-size: .63rem; white-space: nowrap; }
  .mobile-remove-task { position: absolute; top: 5px; right: 5px; opacity: 1; min-width: 44px; min-height: 44px; }
  .mobile-task-card label { display: block; margin: 8px 0 4px; color: var(--ink-faint); font-size: .72rem; }
  .mobile-hours-line { display: flex; align-items: center; gap: 8px; }
  input.mobile-hrs { width: 100%; min-width: 0; height: 46px; padding: 8px 10px; text-align: left; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--input-bg); font: 500 16px "Spline Sans Mono", monospace; }
  .mobile-note-btn { flex: 0 0 46px; min-width: 46px; min-height: 46px; font-size: 1rem; }
  .mobile-save-error { margin-top: 7px; color: var(--red); font-size: .74rem; line-height: 1.4; overflow-wrap: anywhere; }
  .mobile-save-error button { min-height: 44px; margin-left: 6px; border: 0; background: none; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; }
  .mobile-save-pending { margin-top: 6px; color: var(--ink-faint); font-size: .72rem; }
  .mobile-add-task, .mobile-add-project { min-height: 44px; width: 100%; margin-top: 5px; }
  .mobile-add-project { margin-top: 8px; }
  .mobile-remove-empty { display: block; min-height: 44px; margin-top: 4px; border: 0; background: none; color: var(--red); text-decoration: underline; cursor: pointer; }
  .mobile-empty { padding: 16px 5px; color: var(--ink-soft); font-size: .85rem; line-height: 1.5; }
  .mobile-empty .btn { display: block; min-height: 44px; margin-top: 10px; }
  .mobile-review-launch { display: flex; padding: 0 12px 14px; }
  .mobile-review-launch .btn { width: 100%; min-height: 48px; }
  .mobile-week-review { padding: 14px; border-top: 1px solid var(--rule); background: var(--paper-2); }
  .mobile-review-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .mobile-review-head h2 { margin: 0; font: 600 1.05rem "Outfit", sans-serif; }
  .mobile-review-head p { margin: 3px 0 0; color: var(--ink-faint); font-size: .75rem; }
  .mobile-review-head .btn { min-height: 44px; }
  .mobile-review-total { display: flex; align-items: baseline; gap: 7px; margin: 14px 0 10px; padding: 12px; border-radius: 9px; background: var(--card); }
  .mobile-review-total strong { color: var(--accent); font: 600 1.2rem "Spline Sans Mono", monospace; }
  .mobile-review-total span { color: var(--ink-faint); font-size: .78rem; }
  .mobile-review-task .link-btn { border: none; background: none; padding: 0 2px; margin-left: 4px; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
  .mobile-review-save-state { margin: 0 0 9px; color: var(--ink-soft); font-size: .76rem; line-height: 1.4; }
  .mobile-review-save-state.failed { color: var(--red); }
  .mobile-review-day { margin: 0 0 7px; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); }
  .mobile-review-day summary { min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 11px; cursor: pointer; list-style-position: inside; }
  .mobile-review-day summary strong { font-size: .8rem; }
  .mobile-review-day summary span { font: 600 .76rem "Spline Sans Mono", monospace; }
  .mobile-review-detail { padding: 0 11px 10px; color: var(--ink-soft); font-size: .78rem; }
  .mobile-review-detail section { padding: 8px 0; border-top: 1px solid var(--rule); }
  .mobile-review-detail h4 { margin: 0 0 4px; font-size: .78rem; }
  .mobile-review-detail h4 small { display: block; margin-top: 2px; color: var(--ink-faint); font-weight: 400; }
  .mobile-review-task { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
  .mobile-review-task > span { min-width: 0; overflow-wrap: anywhere; }
  .mobile-review-task small { display: block; margin-top: 3px; color: var(--ink-faint); white-space: pre-wrap; overflow-wrap: anywhere; }
  .mobile-review-task > strong { flex: 0 0 auto; font-family: "Spline Sans Mono", monospace; }
  .mobile-review-detail > .btn { min-height: 44px; margin-top: 5px; }
  .mobile-submit { width: 100%; min-height: 48px; margin-top: 8px; }
  .mobile-review-locked { color: var(--ink-faint); font-size: .82rem; }
}
.hours-error { max-width: 100px; color: var(--red); font-size: .64rem; line-height: 1.25; overflow-wrap: anywhere; }
.hours-error button { display: block; min-height: 40px; border: 0; background: none; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; }
.hours-pending { color: var(--ink-faint); font-size: .62rem; }
@media (pointer: coarse) {
  .daily-cell { grid-template-rows: auto 44px; }
  .daily-note-btn { min-width: 44px; min-height: 44px; }
}

/* F14: the reporting rate section of Edit user (Admin/System Admin only) */
.ue-rates { margin: 4px 20px 20px; padding-top: 16px; border-top: 1px solid var(--rule); }
/* F53: the Edit user dialog's Account section, at its foot, apart from Save */
.ue-account { margin: 4px 20px 20px; padding-top: 16px; border-top: 1px solid var(--rule); }
.ue-account h3 { margin: 0 0 10px; font: 600 .9rem "Public Sans", sans-serif; color: var(--ink); }
.ue-account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ue-account-actions .btn-danger-quiet { margin-left: auto; }
.ue-rates h3 { margin: 0 0 8px; font: 600 .9rem "Public Sans", sans-serif; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.ue-rates > .set-desc { margin: 0 0 16px; line-height: 1.5; max-width: none; }
.ue-rates-tag { font: 600 .62rem "Public Sans", sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); border: 1px solid var(--rule-strong); border-radius: 99px; padding: 2px 7px; }
.ue-rate-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.ue-rate-form[hidden] { display: none; }
.ue-rate-form .field { margin: 0; flex: 1 1 120px; }
.ue-rate-form input, .ue-rate-form .btn { height: 42px; box-sizing: border-box; }
.ue-rate-form .btn { padding: 0 18px; justify-content: center; }
/* a project's rates: set for everyone when it's created (Admin/System Admin), read-only afterwards */
.proj-rates { margin-top: 4px; }
#np-rates { margin: -8px 20px 0; padding-bottom: 16px; } /* lines up with the new-project form above */
.proj-rates summary { cursor: pointer; font: 600 .78rem "Public Sans", sans-serif; color: var(--ink-soft); padding: 4px 0; }
.proj-rates .set-desc { margin: 4px 0 8px; }
.proj-rate-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; align-items: center; gap: 10px; padding: 5px 0; border-top: 1px solid var(--rule); font-size: .82rem; }
.proj-rate-row small { display: block; color: var(--ink-faint); font-size: .72rem; }
.proj-rate-row input { padding: 7px 9px; border: 1px solid var(--rule-strong); border-radius: 7px; background: var(--input-bg); color: var(--ink); font: 500 .82rem "Spline Sans Mono", monospace; text-align: right; width: 100%; }
.proj-rate-row .rate-fixed { font-family: "Spline Sans Mono", monospace; font-weight: 600; text-align: right; }
.proj-rate-row.with-action { grid-template-columns: minmax(0, 1fr) 90px auto; }
.proj-rates .link-btn { border: none; background: none; padding: 2px 4px; font: inherit; font-size: .78rem; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* F11: the job costs week report */
#jc-card .filter-bar { flex-wrap: wrap; }
.jc-range { align-self: center; font-size: .8rem; color: var(--ink-soft); margin-right: auto; }
.jc-downloads { display: flex; gap: 8px; align-self: flex-end; align-items: center; }
.jc-downloads[hidden] { display: none; }
.jc-note { margin: 0; padding: 10px 20px 16px; }
.jc-warning { margin: 0 20px 14px; }
.jc-warning[hidden] { display: none; }
td.jc-missing { color: var(--red); font-size: .74rem; }
#pc-card .filter-bar { flex-wrap: wrap; }
#pc-card .field[hidden], #ct-card .field[hidden] { display: none; }
#ct-card .filter-bar { flex-wrap: wrap; }
.ct-cover { padding-top: 0; }
.ct-cover .field { flex: 1 1 180px; }
td.ct-missing { color: var(--amber, #b26b00); }
.pc-subhead { padding: 14px 20px 6px; font-weight: 700; font-size: .8rem; color: var(--ink-soft); }
tr.pc-task td { background: var(--paper-2); font-weight: 700; font-size: .8rem; color: var(--ink-soft); }
tr.pc-sum td { font-weight: 600; }
/* F31: all projects, grouped client → project → task */
tr.pc-client td { background: var(--accent-tint); font-weight: 700; font-size: .86rem; color: var(--accent-deep); padding-top: 12px; }
tr.pc-project td { font-weight: 700; color: var(--ink); border-top: 1px solid var(--rule-strong); }
tr.pc-subtotal td { border-bottom: 1px solid var(--rule-strong); }

/* F16: the client timesheet cover's defaults on Settings */
#report-cover-card[hidden] { display: none; }
.rc-logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-logo-row .logo-tile[hidden], .rc-logo-row .btn[hidden], #rc-retry[hidden] { display: none; }
.rc-logo-row .logo-tile.rc-signature { height: 52px; }
.rc-logo-row .logo-tile.rc-signature img { height: 44px; max-width: 150px; }
#rc-err:not(:empty) { margin-top: 10px; }
/* F33: the System screen's controls */
.sys-select { padding: 9px 12px; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--input-bg); color: var(--ink); font: 500 .84rem 'Public Sans', sans-serif; }
#sys-hy-err, #sys-ns-err { padding: 0 20px 14px; }
#view-system .set-desc { max-width: none; } /* descriptions across the whole card */
#sys-hy-err:empty, #sys-ns-err:empty { display: none; }
#sys-mr-err { padding: 0 20px 14px; }
#sys-mail-result { padding: 0 20px 14px; max-width: none; }
#sys-mail-result:empty { display: none; }
#sys-mail-result.sys-mail-bad { color: var(--red); }
#sys-mail-result.sys-mail-unsure { color: var(--amber-deep); }
#sys-mr-err:empty { display: none; }
/* F34: the common timesheet notes on System */
.cn-list { list-style: none; margin: 12px 0 0; padding: 0 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.cn-row { display: flex; align-items: center; gap: 6px; }
.cn-num { flex: 0 0 22px; text-align: right; font: 500 .74rem "Spline Sans Mono", monospace; color: var(--ink-faint); }
.cn-row .cn-input { flex: 1 1 auto; min-width: 0; padding: 8px 10px; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--input-bg); color: var(--ink); font: 400 .84rem "Public Sans", sans-serif; }
.cn-row .cn-input[aria-invalid="true"] { border-color: var(--red); }
.cn-row .icon-btn { flex: 0 0 auto; width: 34px; height: 34px; font-size: .9rem; }
.cn-row .icon-btn:disabled { opacity: .35; cursor: default; border-color: var(--rule); color: var(--ink-faint); }
.cn-empty { padding: 10px 0; font-size: .84rem; color: var(--ink-soft); }
.cn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px 14px; }
.cn-spacer { flex: 1 1 auto; }
#sys-cn-status, #sys-cn-err { padding: 0 20px 14px; }
#sys-cn-status:empty, #sys-cn-err:empty { display: none; }

/* Reports and System: one panel at a time under a row of tabs. F42: the open panel is an area in the
   in-between tone (--island, between the page and the cards, as the Dashboard's sections), and the
   chosen tab is the same tone and border with no bottom edge, so tab and panel read as one surface,
   like a folder tab. The other tabs are outlined on the page in the lighter rule. On phones the tabs wrap two to a row
   as buttons above the area. */
.report-tabs { display: flex; flex-wrap: wrap; gap: 4px; position: relative; z-index: 1; }
.report-tab {
  flex: 0 0 auto; border: 1px solid var(--rule); border-bottom: none; border-radius: 5px 5px 0 0; margin-bottom: -1px;
  background: transparent; padding: 10px 16px 11px; cursor: pointer;
  font: 600 .72rem "Public Sans", sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft);
}
.report-tab:hover { color: var(--ink); border-color: var(--rule-strong); }
.report-tab.active { background: var(--island); border-color: var(--rule-strong); color: var(--ink); }
.report-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.report-tab[hidden] { display: none; }
.report-panel {
  background: var(--island); border: 1px solid var(--rule-strong); border-radius: 14px;
  padding: 18px; min-width: 0;
}
/* square under the first tab, chosen or not, so its sides always meet the area's edge */
.report-tabs ~ .report-panel { border-top-left-radius: 0; }
.report-panel > :last-child { margin-bottom: 0 !important; }
/* inside the area a setting's description wraps before its control drops below it */
.report-panel .set-row > div:first-child { flex: 1 1 260px; min-width: 0; }
.report-panel[hidden] { display: none; }
@media (max-width: 640px) {
  .report-tabs { gap: 6px; margin-bottom: 10px; }
  .report-tab { flex: 1 1 calc(50% - 6px); margin: 0; border: 1px solid var(--rule); border-radius: 5px; padding: 11px 10px; text-align: center; }
  .report-tab.active { border-color: var(--rule-strong); }
  .report-tabs ~ .report-panel { border-radius: 14px; }
  .report-panel { padding: 10px; }
}
/* F21: screens not available while only someone's timesheet is open */
.nav-btn[hidden] { display: none; }
/* F21: a Manager's two switches in Edit user */
.ue-manager-access { border: 1px solid var(--rule); border-radius: 8px; padding: 10px 14px 12px; margin: 0 0 14px; display: grid; gap: 8px; }
.ue-manager-access[hidden] { display: none; }
.ue-manager-access legend { font: 600 .74rem "Public Sans", sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding: 0 4px; }
/* F47: Paid with, two tick boxes of which one is always ticked */
.exp-paid { border: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.exp-paid[hidden] { display: none; }
.exp-paid legend { display: block; width: 100%; padding: 0; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; float: left; }
.exp-paid .set-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .84rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }
.exp-paid .set-desc { flex-basis: 100%; margin: 0; }
.exp-company-row td { color: var(--ink-soft); font-size: .82rem; }
.ue-switch { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink); text-transform: none; letter-spacing: 0; }
.ue-switch input { width: 16px; height: 16px; accent-color: var(--accent); }

/* F20: Managers' Reviewed marks. Each entry with hours gets a narrow column to the left of its
   hours-and-notes area; one green pill per reviewer (their initial), stacked top to bottom, the whole
   stack centred against that area's height. The reviewer's own toggle sits with the hours. */
.review-cell { display: flex; align-items: stretch; justify-content: center; gap: 4px; }
.review-pills { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; min-width: 18px; }
.review-pill {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 9px;
  background: var(--green); color: #fff; font: 700 .62rem/1 "Public Sans", sans-serif;
}
.review-toggle {
  border: 1px solid var(--rule); border-radius: 6px; background: var(--card); color: var(--ink-faint);
  min-width: 36px; min-height: 26px; cursor: pointer; font: 700 .8rem/1 "Public Sans", sans-serif;
}
.review-toggle.on { background: var(--green-tint); border-color: var(--green); color: var(--green-deep); }
.review-toggle:disabled { opacity: .5; cursor: progress; }
.review-toggle:focus-visible, .review-row-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.review-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; font-size: .72rem; }
.review-status { font-weight: 600; }
.review-status.full { color: var(--green-deep); }
.review-status.partial { color: var(--amber-deep); }
.review-status.none { color: var(--ink-faint); }
.review-row-btn { border: 1px solid var(--rule); border-radius: 6px; background: var(--card); color: var(--ink-soft); font: 600 .7rem "Public Sans", sans-serif; padding: 3px 7px; cursor: pointer; }
.review-row-btn:disabled { opacity: .5; cursor: progress; }
.review-task { display: inline-flex; align-items: center; gap: 6px; font: 600 .74rem "Public Sans", sans-serif; color: var(--ink-soft); cursor: pointer; }
.review-task input { width: 16px; height: 16px; accent-color: var(--green); margin: 0; cursor: pointer; }
.review-task:has(input:checked) { color: var(--green-deep); }
.review-task:has(input:disabled) { opacity: .5; cursor: progress; }
.review-cell .mobile-hours-line { flex: 1 1 auto; }
.rc2-list { display: grid; gap: 6px; }
@media (max-width: 640px) {
  .review-toggle { min-width: 44px; min-height: 44px; }
  .review-row-btn { padding: 8px 10px; }
  .review-task { min-height: 44px; }
  .review-task input { width: 22px; height: 22px; }
}
.rc2-list label { text-transform: none; letter-spacing: 0; font: 500 .86rem "Public Sans", sans-serif; color: var(--ink); }

/* ---------- F29: the Transfer hours dialog ---------- */
/* the Projects header's actions wrap on narrow screens */
.proj-actions { display: flex; gap: 10px; align-self: flex-end; flex-wrap: wrap; justify-content: flex-end; }
/* F53: above the first client: letter tabs filling the width, the find box on the right */
.proj-filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 14px; }
.letter-tabs { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.letter-tab { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 7px; background: none;
  font: 600 .8rem "Public Sans", sans-serif; color: var(--ink-soft); cursor: pointer; transition: background .15s, color .15s; }
.letter-tab:hover { background: var(--paper-2); color: var(--ink); }
.letter-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.letter-tab[aria-pressed="true"] { background: var(--accent); color: #fff; }
.proj-filter-bar .proj-find { margin-left: auto; }
/* the find box, the app's field style */
.proj-find { width: 240px; max-width: 100%; padding: 9px 12px; border: 1px solid var(--rule-strong); border-radius: 8px;
  font: 400 .86rem "Public Sans", sans-serif; background: var(--input-bg); color: var(--ink); }
.proj-find:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(185,58,49,.12); }
.proj-none { padding: 28px 20px; text-align: center; color: var(--ink-soft); background: var(--island); border: 1px solid var(--rule-strong); border-radius: 14px; }
.proj-none .btn { margin-left: 8px; }
@media (max-width: 640px) { .proj-find { width: 100%; } }
#transfer .modal-card { width: min(800px, calc(100vw - 40px)); max-height: 88vh; }
.tr-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.tr-steps[hidden] { display: none; }
.tr-steps li { display: flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--ink-faint); }
.tr-steps li.on { color: var(--ink); background: var(--paper-2); }
.tr-steps li.done { color: var(--ink-soft); }
.tr-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--rule-strong); font-size: .72rem; }
.tr-steps li.on .tr-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.tr-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tr-body { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; overflow-y: auto; min-height: 0; }
.tr-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--rule); background: var(--dialog); }
.tr-why { flex: 1 1 200px; font-size: .8rem; color: var(--ink-soft); }
.tr-group { margin: 0; padding: 10px 14px 12px; border: 1px solid var(--rule); border-radius: 10px; }
.tr-group legend { padding: 0 6px; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.tr-checks { display: flex; flex-wrap: wrap; gap: 2px 20px; }
.tr-checks[hidden] { display: none; }
.tr-opt { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: .88rem; cursor: pointer; }
.tr-meta { font-size: .78rem; font-weight: 400; color: var(--ink-faint); }
.tr-hint { margin: 4px 0 0; font-size: .82rem; color: var(--ink-soft); }
.tr-error { margin: 0; font-size: .84rem; color: var(--red); }
.tr-summary { padding: 10px 14px; border-radius: 10px; background: var(--paper-2); font-size: .9rem; }
.tr-lead { margin: 0; font-size: .92rem; line-height: 1.5; }
.tr-notice { margin: 0 4px 4px 0; border-radius: 10px; box-shadow: 3px 3px 0 var(--pop-edge); } /* the app's alert, smaller in a dialog */
.tr-map-head, .tr-map-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.tr-map-head { grid-template-columns: 1fr 1fr; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.tr-map-row { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.tr-map-row select { width: 100%; padding: 9px 12px; border: 1px solid var(--rule-strong); border-radius: 8px; font: 400 .86rem "Public Sans", sans-serif; background: var(--input-bg); color: var(--ink); }
.tr-arrow { color: var(--ink-faint); }
.tr-sec h3 { margin: 0 0 6px; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.tr-table-wrap { overflow-x: auto; }
.tr-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.tr-table th { text-align: left; font-size: .7rem; font-weight: 600; color: var(--ink-soft); padding: 6px 8px; border-bottom: 1px solid var(--rule-strong); }
.tr-table th, .tr-table td { text-align: left; }
.tr-table td { padding: 6px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tr-list { list-style: none; margin: 0; padding: 0; }
.tr-list li { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: .86rem; }
.tr-note { margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--rule-strong); font-size: .82rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.tr-note-need { margin-top: 4px; font-size: .82rem; font-weight: 600; color: var(--red); }
/* F29 stage 4: one note written in place of the notes that meet */
.tr-note-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 6px; }
.tr-note-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.tr-note-btns .btn { padding: 6px 12px; font-size: .8rem; }
.tr-note-edit { margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.tr-note-was { padding: 8px 10px; border-radius: 8px; background: var(--paper-2); font-size: .8rem; color: var(--ink-soft); }
.tr-note-was-head { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.tr-note-was ul { margin: 0; padding-left: 16px; }
.tr-note-was li { overflow-wrap: anywhere; padding: 2px 0; border: 0; font-size: inherit; }
.tr-note-edit .tr-note-foot { margin-top: -2px; }
.tr-recovered { margin: 0 0 12px; font-size: .86rem; color: var(--ink-soft); }
.tr-note-count.over { color: var(--red); font-weight: 600; }
.tr-reopen { flex-direction: column; align-items: stretch; }
.tr-tick { display: flex; align-items: flex-start; gap: 8px; font-weight: 600; cursor: pointer; }
.tr-tick input { margin-top: 3px; }
.tr-table .chip { padding: 3px 9px; } /* F29-06: the app's status chips, a little smaller in a table */
/* F29-05: the review's people, one line each, opening to their weeks; the tick and reason last, together */
.tr-people, .tr-weeks { list-style: none; margin: 0; padding: 0; }
.tr-person { border-bottom: 1px solid var(--rule); font-size: .86rem; }
.tr-person-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 8px 4px; }
.tr-person-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 4px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: 6px; }
.tr-person-btn:hover { background: var(--paper-2); }
.tr-person-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tr-caret { flex: none; width: 0; height: 0; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .15s; }
.tr-person-btn[aria-expanded="true"] .tr-caret { transform: rotate(90deg); }
.tr-weeks[hidden] { display: none; }
.tr-weeks li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 5px 4px 5px 22px; color: var(--ink-soft); }
.tr-more { align-self: flex-start; margin-top: 8px; }
.tr-confirm { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.tr-done { padding: 20px 10px; text-align: center; }
.tr-done p { margin: 8px 0 0; }
.tr-ref { font-family: "Outfit", "Public Sans", sans-serif; font-size: 1.4rem; font-weight: 600; }
@media (max-width: 640px) {
  /* on a phone the dialog fills the screen */
  #transfer .modal-card { width: 100vw; height: 100dvh; max-height: none; border: none; border-radius: 0; }
  .tr-body { padding: 14px 16px; }
  .tr-foot { padding: 10px 16px; }
  .tr-why { flex-basis: 100%; }
  .tr-map-head, .tr-arrow { display: none; }
  .tr-map-row { grid-template-columns: 1fr; gap: 6px; }
}

/* F53: the drawn icons on buttons (js/shared/icons.js), sized to the button's text */
svg.ico { width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -0.17em; flex-shrink: 0; pointer-events: none; }
.round-btn svg.ico, .del-card svg.ico, .mini-btn svg.ico, .icon-btn svg.ico, .x svg.ico, .del-proj svg.ico, .review-toggle svg.ico { width: 15px; height: 15px; vertical-align: middle; }
