/* Beacon (Lighthouse Labs) — app styles.
   Style: achromatic ledger (tasteskill app sheet, seed 1012516949). The chrome holds no colour; the one hue (#1d5fbf)
   marks booked hours, the screen's main data. Face: a blue-grey ground from the lighthouse's sea and the ledger.
   Grid arithmetic (1440 viewport): sidebar 248 + canvas 1192; canvas padding 32 each side leaves 1128 of content;
   12 columns x 83 + 11 gutters x 12 = 996 + 132 = 1128. */

/* Geist, self-hosted (SIL Open Font License, see /fonts/OFL.txt) */
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
/* taste-skill-ignore: mono is only for the one-time password shown to admins */
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --ground: #f2f4f7;
  --surface: #ffffff;
  --raised: #f6f7f9;
  --active: #e4e7ec;
  --border: #e1e4e9;
  --rule: #eef0f3;
  --control: #cfd4dc;
  --text: #0a0a0a;
  --muted: #535a65;          /* 6.4:1 on white, 5.8:1 on the ground */
  --faint: #626a75;          /* meta and placeholders, 5.2:1 on white */
  --primary: #141414;
  --primary-ink: #ffffff;
  --hue: #1d5fbf;            /* booked hours: the one data hue */
  --hue-soft: #d9e5f6;
  --track: #e8ebf0;
  --positive: #2e7d32;
  --negative: #c4242a;
  --warning: #92400e;
  --pill-positive-bg: #dcfae5; --pill-positive-ink: #04250e;
  --pill-negative-bg: #ffedea; --pill-negative-ink: #831c1e;
  --pill-warning-bg: #fffbeb; --pill-warning-ink: #92400e;
  --pill-neutral-bg: #eceef2; --pill-neutral-ink: #3d434c;

  --chart-1: var(--hue); --chart-2: #8a8a8a; --chart-muted: #c9ced6;
  --grid: #e9ecf0; --axis-ink: var(--muted); --ink: var(--text);

  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono" /* taste-skill-ignore: one-time passwords only */, ui-monospace, "SF Mono", Menlo, monospace;
  --fs-title: 24px; --fs-section: 16px; --fs-kpi: 30px; --fs-lead: 30px; --fs-body: 14px; --fs-small: 12px;

  --sidebar-width: 248px;
  --pad: 32px;
  --gap: 12px;
  --card-pad: 20px;
  --radius-card: 8px;
  --radius-control: 6px;
  --control-height: 36px;
  --row-height: 44px;
  --nav-row: 32px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 120ms; --t-hover: 150ms; --t-ui: 200ms;
  --z-sticky: 10; --z-sheet: 30; --z-toast: 40;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: var(--fs-body)/20px var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--hue); outline-offset: 2px; border-radius: 4px; }
.num, table, .kpi-value, .lead-figure { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); line-height: 16px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.link { text-decoration: underline; text-decoration-color: var(--control); text-underline-offset: 3px; transition: text-decoration-color var(--t-hover) ease; }
.link:hover { text-decoration-color: currentColor; }
h1, h2, h3 { text-wrap: balance; }

/* ---------- shell: open plane ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 2px; padding: 20px 12px 16px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-mark { width: 28px; height: 28px; flex: none; color: var(--text); }
.brand-name { font-weight: 600; font-size: 15px; line-height: 18px; letter-spacing: -0.01em; }
.brand-scope { color: var(--muted); font-size: var(--fs-small); line-height: 16px; }
.group-label { margin: 22px 8px 6px; font-size: var(--fs-small); line-height: 16px; color: var(--faint); }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: var(--nav-row); padding: 0 10px; border-radius: 8px; color: var(--muted); transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.nav-item svg { flex: none; }
.nav-item:hover { background: var(--active); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--active); color: var(--text); }
.nav-item .count { margin-left: auto; font-size: var(--fs-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.sidebar .bottom { margin-top: auto; padding-top: 16px; display: grid; gap: 2px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 4px; }
.me .who { min-width: 0; }
.me .who b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { color: var(--muted); font-size: var(--fs-small); }
.nav-item.as-button { width: 100%; border: 0; background: none; cursor: pointer; text-align: left; }
.canvas { min-width: 0; padding: 32px var(--pad) 64px; max-width: 1440px; }
.phone-bar { display: none; }

/* avatar: a stable pale tint per person, an initial in ink */
.avatar { --h: 210; width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: hsl(var(--h) 45% 90%); color: hsl(var(--h) 40% 22%); }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }

/* ---------- title row ---------- */
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.title-row h1 { font-size: var(--fs-title); line-height: 30px; font-weight: 600; letter-spacing: -0.015em; }
.title-row .sub { margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 22px; max-width: 72ch; }
.title-row .sub b { color: var(--text); font-weight: 500; }
.crumbs { display: flex; gap: 6px; align-items: center; color: var(--muted); margin-bottom: 6px; font-size: 13px; }
.crumbs a:hover { color: var(--text); }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.title-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--muted); align-items: center; }

/* ---------- panels and grid ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.grid.top { align-items: start; }
.canvas > :is(.grid, .panel, .kpis) + :is(.grid, .panel, .kpis) { margin-top: var(--gap); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: 1 / -1; }
.stack { display: grid; gap: var(--gap); align-content: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--card-pad); min-width: 0; }
.panel.flush { padding: 0; }
.panel.flush > header { padding: 16px var(--card-pad) 0; margin-bottom: 8px; }
.panel > header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 14px; }
.panel h2 { font-size: var(--fs-section); line-height: 22px; font-weight: 600; letter-spacing: -0.005em; }
.panel h2 .n { color: var(--muted); font-weight: 400; margin-left: 4px; }
.panel .meta { color: var(--faint); font-size: var(--fs-small); }
.panel-foot { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel.flush .panel-foot { padding: 0 var(--card-pad) 16px; }

.card-link { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none; color: var(--text); font-weight: 500; cursor: pointer; text-underline-offset: 3px; white-space: nowrap; }
.card-link svg { width: 12px; height: 12px; }
.card-link:hover { text-decoration: underline; }

/* ---------- KPIs: one divided strip ---------- */
.kpis { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.kpi { padding: 16px var(--card-pad) 18px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--border); }
.kpi-label { color: var(--muted); }
.kpi-value { margin-top: 6px; font-size: 24px; line-height: 30px; font-weight: 500; letter-spacing: -0.01em; }
.kpi-value small { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 3px; letter-spacing: 0; }
.kpi-note { margin-top: 2px; font-size: var(--fs-small); line-height: 16px; color: var(--muted); }
.kpi-note .neg { color: var(--negative); }
.kpi-note .warn { color: var(--warning); }

/* the answer figure of a detail screen */
.lead-figure { font-size: var(--fs-lead); line-height: 36px; font-weight: 500; letter-spacing: -0.02em; }
.kpis.inline { margin-top: 20px; border: 0; border-top: 1px solid var(--rule); border-radius: 0; grid-auto-flow: column !important; grid-template-columns: none !important; }
.kpis.inline .kpi { padding: 14px 16px 0; border-top: 0 !important; grid-column: auto !important; }
.kpis.inline .kpi:first-child { padding-left: 0; }
.kpis.inline .kpi + .kpi { border-left: 1px solid var(--rule) !important; }
.kpis.inline .kpi-value { font-size: 20px; line-height: 26px; }
.kpis.inline .kpi-value.neg { color: var(--negative); }
.show-phone { display: none !important; }
.lead-figure small { font-size: 16px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 4px; }

/* ---------- the budget burn: a track as long as the plan, overrun past its end in red ---------- */
.burn { display: grid; gap: 7px; }
.burn-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-width: 0; }
.burn-top .label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.burn-top .label a { font-weight: 500; }
.burn-top .label .of { color: var(--muted); }
.burn-top .fig { white-space: nowrap; font-variant-numeric: tabular-nums; }
.burn-top .fig b { font-weight: 500; }
.burn-top .fig .of { color: var(--muted); }
.burn-top .fig .neg { color: var(--negative); }
.burn-top .fig .warn { color: var(--warning); }
.track { position: relative; height: 8px; border-radius: 999px; background: var(--track); }
.track > .used { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--hue); }
.track > .tick { position: absolute; top: -3px; bottom: -3px; width: 1.5px; background: var(--text); }
.track > .over { position: absolute; top: 0; bottom: 0; border-radius: 0 999px 999px 0; background: var(--negative); }
.track.thin { height: 4px; }
.track.thin > .tick { top: -2px; bottom: -2px; }
.track.lg { height: 12px; }
.track.lg > .tick { top: -4px; bottom: -4px; }
.burn-list { display: grid; gap: 18px; }
.burn-sub { color: var(--muted); font-size: var(--fs-small); line-height: 16px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 36px; padding: 0 12px; text-align: left; font-weight: 400; font-size: var(--fs-small); color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: var(--card-pad); }
th:last-child, td:last-child { padding-right: var(--card-pad); }
th.n, td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .sub { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
td.name a { font-weight: 500; }
td.name a:hover { text-decoration: underline; text-underline-offset: 3px; }
tfoot td { border-top: 1px solid var(--border); border-bottom: 0; font-weight: 500; }
td.dash, .dash { color: var(--faint); }
td.burn-cell { width: 220px; min-width: 160px; }
td.burn-cell .burn { gap: 5px; }
td.burn-cell .burn-top { font-size: 13px; line-height: 18px; }
tr.row-link { cursor: pointer; }
.table-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* pills: a pale tint with dark ink of the same hue, one per row */
.pill { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-small); font-weight: 500; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); white-space: nowrap; }
.pill.pos { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill.neg { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.pill.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--control); color: var(--muted); } /* taste-skill-ignore: an inset outline or focus ring, not a shadow */
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- lists ---------- */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; }
.row + .row { border-top: 1px solid var(--rule); }
.row .grow { flex: 1; min-width: 0; }
.row .grow b { font-weight: 500; }
.row .grow .sub { display: block; color: var(--muted); font-size: var(--fs-small); line-height: 16px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .fig { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row .fig .sub { display: block; color: var(--muted); font-size: var(--fs-small); line-height: 16px; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { min-width: 0; overflow-wrap: anywhere; }
.prose { white-space: pre-line; max-width: 70ch; line-height: 22px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-height); padding: 0 14px; border-radius: var(--radius-control); border: 1px solid var(--control); background: var(--surface); font-weight: 500; cursor: pointer; white-space: nowrap; transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.btn:hover { background: var(--raised); border-color: #b9c0ca; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn.primary:hover { background: #2b2b2b; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--active); }
.btn.danger { color: var(--negative); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.icon { width: var(--control-height); padding: 0; }
.btn.sm.icon { width: 30px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 1; color: var(--faint); background: var(--raised); cursor: not-allowed; transform: none; }
form.inline { display: inline; }

.form { display: grid; gap: 16px; max-width: 720px; }
.form .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; align-content: start; min-width: 0; }
.field > label, .field > .label { font-weight: 500; }
.field .hint { color: var(--muted); font-size: var(--fs-small); line-height: 16px; }
.field .error { color: var(--negative); font-size: var(--fs-small); line-height: 16px; }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); transition: border-color var(--t-hover) ease, box-shadow var(--t-hover) ease; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; line-height: 20px; resize: vertical; }
select.input { appearance: none; padding-right: 34px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23535a65' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
.input:hover { border-color: #b9c0ca; }
.input:focus { outline: none; border-color: var(--hue); box-shadow: 0 0 0 3px rgba(29, 95, 191, 0.16); } /* taste-skill-ignore: an inset outline or focus ring, not a shadow */
.input[aria-invalid="true"] { border-color: var(--negative); }
.input::placeholder { color: var(--faint); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 40px; }
.check input { width: 16px; height: 16px; accent-color: var(--text); margin: 0; }
.form-actions { display: flex; gap: 8px; align-items: center; padding-top: 4px; }
.form-actions .spacer { flex: 1; }

/* settings-style form sections: a label column beside its panel */
.section { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 32px; padding: 28px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section:first-of-type { padding-top: 0; }
.section > .about h2 { font-size: var(--fs-section); font-weight: 600; line-height: 22px; }
.section > .about p { margin-top: 4px; color: var(--muted); max-width: 40ch; }

/* tabs on a full-width rule */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: var(--gap); overflow-x: auto; scrollbar-width: none; }
.tabs a { position: relative; padding: 10px 0; color: var(--muted); white-space: nowrap; transition: color var(--t-hover) ease; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); }
.tabs .n { margin-left: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }

.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: var(--gap); flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.toolbar .input { height: var(--control-height); width: auto; }
.search { position: relative; }
.search .input { padding-left: 12px; width: 280px; }

.week-nav { display: inline-flex; align-items: center; gap: 4px; }
.week-nav .label { min-width: 190px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }

/* empty states keep their frame */
.empty { display: grid; place-items: center; gap: 10px; min-height: 96px; padding: 20px; border: 1px dashed var(--control); border-radius: var(--radius-control); color: var(--muted); text-align: center; }
.empty .btn { margin-top: 2px; }
.rows .empty, .grid > .empty { grid-column: 1 / -1; }

/* notices: flash messages and the locked-week strip */
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-control); margin-bottom: 16px; border: 1px solid var(--border); background: var(--surface); }
.notice.ok { border-color: #bfe6cb; background: #f3fbf5; color: #14532d; }
.notice.error { border-color: #f5c2bf; background: #fff6f5; color: #831c1e; }
.notice.warn { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.notice .grow { flex: 1; }
.notice.toast { animation: notice-in var(--t-ui) var(--ease-out); }
@keyframes notice-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- timesheet ---------- */
.log-form { display: grid; grid-template-columns: 150px minmax(220px, 2.2fr) minmax(130px, 1fr) 96px minmax(160px, 1.6fr) auto auto; gap: 10px; align-items: end; }
.log-form .field > label { font-size: 13px; }
.log-form .check { min-height: 40px; }
.week-grid th.day, .week-grid td.day { text-align: right; width: 76px; }
.week-grid th.day.today { color: var(--text); font-weight: 500; }
.week-grid td.day.zero { color: var(--faint); }
.week-grid tfoot td { color: var(--text); }
.day-block + .day-block { border-top: 1px solid var(--border); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px var(--card-pad) 6px; }
.day-head h3 { font-size: 14px; font-weight: 600; }
.day-head .fig { font-variant-numeric: tabular-nums; color: var(--muted); }
.day-head .fig b { color: var(--text); font-weight: 500; }
.day-head.today h3::after { content: "Today"; margin-left: 8px; font-weight: 400; color: var(--muted); font-size: var(--fs-small); }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto 80px auto; gap: 16px; align-items: center; padding: 8px var(--card-pad); min-height: 48px; }
.entry + .entry { border-top: 1px solid var(--rule); }
.entry .what { min-width: 0; }
.entry .what b { font-weight: 500; }
.entry .what .sub { display: block; color: var(--muted); font-size: var(--fs-small); line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry .hrs { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.entry .tools { display: flex; gap: 2px; opacity: 0.55; transition: opacity var(--t-hover) ease; }
.entry:hover .tools, .entry:focus-within .tools { opacity: 1; }
.day-empty { padding: 4px var(--card-pad) 14px; color: var(--faint); }

/* my-week strip: seven days as columns, the bar is the day's booked hours */
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; flex: 1; min-height: 150px; }
.week-strip .d { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; }
.week-strip .bar { min-height: 120px; border-radius: 4px; background: var(--raised); position: relative; overflow: hidden; }
.week-strip .bar span { position: absolute; left: 0; right: 0; bottom: 0; background: var(--hue); border-radius: 4px 4px 0 0; }
.week-strip .bar .eight { position: absolute; left: 0; right: 0; height: 1px; border-top: 1px dashed var(--control); }
.week-strip .lbl { display: flex; justify-content: space-between; font-size: var(--fs-small); line-height: 16px; color: var(--muted); }
.week-strip .lbl b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.week-strip .d.today .lbl span { color: var(--text); font-weight: 500; }
.week-strip .d.future .bar { background: transparent; box-shadow: inset 0 0 0 1px var(--rule); } /* taste-skill-ignore: an inset outline or focus ring, not a shadow */

/* weekly columns chart (server-drawn): square bars, the current week in the hue, the rest in grey */
.cols-chart { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
.cols-chart .y { position: relative; height: 160px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cols-chart .y span { position: absolute; right: 0; transform: translateY(50%); }
.cols-chart .plot { position: relative; height: 160px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; align-items: end; }
.cols-chart .gl { position: absolute; left: 0; right: 0; height: 1px; background: var(--grid); }
.cols-chart .gl.base { background: var(--control); }
.cols-chart .col { position: relative; z-index: 1; height: 100%; display: flex; align-items: flex-end; }
.cols-chart .col span { display: block; width: 100%; background: var(--chart-muted); transition: opacity var(--t-hover) ease; }
.cols-chart .col.now span { background: var(--hue); }
.cols-chart .col:hover span { opacity: 0.8; }
.cols-chart .x { grid-column: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; font-size: 11px; color: var(--muted); }
.cols-chart .x span { display: flex; justify-content: center; white-space: nowrap; min-width: 0; }
.cols-chart .x span.now { color: var(--text); font-weight: 500; }
.cols-chart .x span:last-child { justify-content: flex-end; }
.cols-chart .x span:first-child { justify-content: flex-start; }

/* ranked list where a thin grey bar sits under each label; the top item in ink */
.bar-list { display: grid; gap: 12px; }
.bar-list li { display: grid; gap: 5px; }
.bar-list .top { display: flex; justify-content: space-between; gap: 12px; }
.bar-list .top b { font-weight: 400; font-variant-numeric: tabular-nums; }
.bar-list .bar { height: 3px; background: var(--rule); border-radius: 2px; }
.bar-list .bar span { display: block; height: 100%; background: var(--chart-muted); border-radius: 2px; }
.bar-list li:first-child .bar span { background: var(--text); }

/* pipeline as stage columns */
.stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.stages > div { padding: 2px 0 12px; }
.stages > div:nth-child(n + 3) { border-top: 1px solid var(--rule); padding-top: 12px; }
.stages .v { font-size: 22px; line-height: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.stages .l { color: var(--text); }
.stages .s { color: var(--muted); font-size: var(--fs-small); line-height: 16px; margin-top: 2px; }
.stages > div:nth-child(2n) { padding-left: 16px; border-left: 1px solid var(--rule); }

/* auth screens */
.auth { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--primary); color: #e9edf3; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side .brand { padding: 0; }
.auth-side .brand-mark { color: #fff; }
.auth-side .brand-scope { color: #aeb6c2; }
.auth-side .beam { position: absolute; right: -10%; top: 18%; width: 90%; opacity: 0.9; }
.auth-side .line { font-size: 22px; line-height: 30px; font-weight: 500; letter-spacing: -0.01em; max-width: 26ch; color: #fff; position: relative; }
.auth-side .line + p { margin-top: 10px; color: #aeb6c2; max-width: 44ch; position: relative; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-main .box { width: 100%; max-width: 380px; display: grid; gap: 20px; }
.auth-main h1 { font-size: var(--fs-title); line-height: 30px; font-weight: 600; letter-spacing: -0.015em; }
.auth-main .sub { color: var(--muted); margin-top: 4px; }
.auth-main .btn.primary { height: 42px; width: 100%; }

.issued { display: grid; gap: 4px; }
.issued code { font-family: var(--mono); font-size: 14px; padding: 2px 6px; background: var(--surface); border: 1px solid #fde68a; border-radius: 4px; }

/* ---------- tablet and phone ---------- */
@media (max-width: 1180px) {
  .log-form { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .log-form .f-date { grid-column: span 2; } .log-form .f-item { grid-column: span 4; }
  .log-form .f-type { grid-column: span 2; } .log-form .f-hours { grid-column: span 1; } .log-form .f-note { grid-column: span 3; }
  .log-form .f-bill { grid-column: span 3; } .log-form .f-go { grid-column: span 3; justify-self: end; }
  .span-3 { grid-column: span 6; }
}
@media (max-width: 1100px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: 1 / -1; }
  .section { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .phone-bar { display: flex; position: sticky; top: 0; z-index: var(--z-sticky); align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 16px; background: var(--ground); border-bottom: 1px solid var(--border); }
  .phone-bar .brand-mark { width: 24px; height: 24px; }
  .phone-bar .t { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar { position: fixed; inset: 0; width: 100%; height: 100%; z-index: var(--z-sheet); background: var(--ground); transform: translateX(-100%); transition: transform var(--t-ui) var(--ease-out); visibility: hidden; }
  .sidebar.open { transform: none; visibility: visible; }
  .sidebar .close { position: absolute; top: 14px; right: 12px; }
  .nav-item { min-height: 44px; }
  .canvas { padding: 20px 16px 48px; }
  .grid > * { grid-column: 1 / -1 !important; }
  .kpis { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi + .kpi { border-left: 0; }
  .kpi:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .kpi:nth-child(2n) { border-left: 1px solid var(--border); }
  .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .title-row { flex-wrap: wrap; align-items: flex-start; }
  .title-row h1 { font-size: 22px; line-height: 28px; }
  .form .cols { grid-template-columns: minmax(0, 1fr); }
  .log-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-form > * { grid-column: 1 / -1 !important; }
  .log-form .f-type, .log-form .f-hours { grid-column: span 1 !important; }
  .log-form .f-go { justify-self: stretch; }
  .log-form .f-go .btn { width: 100%; height: 44px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .search .input { width: 100%; }
  .search { flex: 1; }
  .entry { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding-right: 8px; }
  .entry .bill { display: none; }
  .entry .tools { opacity: 1; }
  /* tables keep their columns and scroll inside their own frame, the first column fixed */
  .table-wrap table:not(.fit) { min-width: 640px; }
  .show-phone { display: block !important; }
  .table-wrap td:first-child, .table-wrap th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
  .week-nav .label { min-width: 0; }
  .hide-phone { display: none; }
  .btn, .input, select.input { min-height: 44px; }
  .btn.sm { min-height: 36px; }
}
@media (max-width: 600px) {
  .cols-chart .x span.alt { visibility: hidden; }
  .burn-top { flex-wrap: wrap; row-gap: 2px; }
  .burn-top .label { flex: 1 1 100%; }
  td.burn-cell .burn-top .label { flex: initial; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; } }

/* ---------- additions ---------- */
.panel.col { display: flex; flex-direction: column; }
.panel.col > .panel-foot { margin-top: auto; padding-top: 18px; }
.sidebar .close { display: none; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary.btn { background: var(--active); }
.report-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 12px; align-items: end; }
.report-filters .r-go { align-self: end; }
.report-filters .r-go .btn { width: 100%; height: 40px; }
.report-filters [data-custom][hidden] { display: none; }
@media (max-width: 860px) {
  .sidebar .close { display: inline-flex; }
  .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.share { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 10px; align-items: center; min-width: 140px; }
.share .bar { height: 4px; background: var(--rule); border-radius: 2px; }
.share .bar span { display: block; height: 100%; background: var(--chart-muted); border-radius: 2px; }
.share b { font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; }
.role-list { display: grid; gap: 12px; }
.role-list.across { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 860px) { .role-list.across { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.role-list dt { font-weight: 500; }
.role-list dd { color: var(--muted); margin-top: 2px; }
