:root {
  --bg: #f3f2ee; --panel: #f7f6f3; --surface: #fdfcfa; --field: #ecebe7; --hover: #e9e8e3; --border: #e2e1dc;
  --text: #2a2a27; --muted: #6b6a65;
  --accent: #3fbf4f; --accent-ink: #0f2a12; --accent-soft: #dcf2df;
  /* event types; validated as a categorical set (CVD-safe) for light and dark separately */
  --t-event: #2a78d6; --t-occasion: #eb6834; --t-task: #1baf7a;
  color-scheme: light;
}
:root[data-theme=dark] {
  --bg: #121311; --panel: #171917; --surface: #1d201d; --field: #1b1d1b; --hover: #252825; --border: #2b2e2b;
  --text: #e9eae6; --muted: #9b9d97;
  --accent: #4ccb5c; --accent-ink: #0c1f0f; --accent-soft: #1c3320;
  --t-event: #3987e5; --t-occasion: #d95926; --t-task: #199e70;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Manrope, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
:root[data-theme=dark] .when-light, :root:not([data-theme=dark]) .when-dark { display: none; }

/* sign in */
.signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 55%), radial-gradient(var(--border) 1px, transparent 1px) 0 0 / 22px 22px, var(--bg); }
.signin-card { display: grid; justify-items: center; gap: 36px; width: min(380px, 100%); padding: 56px 32px 40px; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 24px 48px -24px rgb(0 0 0 / .18); }
.signin-card { gap: 20px; width: min(420px, 100%); }
.role-pick button { white-space: nowrap; }
.signin-card .brand { margin-bottom: 12px; }
.role-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; width: 100%; padding: 4px; background: var(--field); border: 1px solid var(--border); border-radius: 10px; }
.role-pick button { padding: 9px 6px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.role-pick button:hover { color: var(--text); }
.role-pick [aria-checked=true] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .1); }
.who-pick { display: grid; gap: 6px; width: 100%; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.who-pick[hidden] { display: none; }
.who-pick select { height: 44px; padding: 0 12px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.brand { display: block; width: min(260px, 100%); height: auto; }
/* the wordmark is black text on transparent, so give it a light plate in dark mode */
:root[data-theme=dark] .brand { padding: 14px 18px; border-radius: 12px; background: #f7f6f3; box-sizing: content-box; }
.rail .logo img { display: block; }
.google-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 48px; padding: 0 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 15px; font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / .05);
  transition: transform .4s cubic-bezier(.34, 1.8, .64, 1), box-shadow .2s, border-color .2s; }
.google-btn:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 10px 22px -12px rgb(0 0 0 / .35); }
.google-btn:active { transform: translateY(0); transition-duration: .1s; }
.google-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.google-btn.loading { cursor: progress; }
.google-btn.loading > * { visibility: hidden; }
.google-btn.loading::after { content: ''; position: absolute; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .google-btn { transition: none; } }

/* shell */
.app { display: grid; grid-template-columns: 60px 256px minmax(0, 1fr); grid-template-rows: 56px 1fr; gap: 0 8px; height: 100vh; height: 100dvh; padding: 0 8px 8px 0; }
.panel { min-height: 0; overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }

.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 0 0 12px; }
.ws-switch { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 15px; font-weight: 600; text-align: left; }
.ws-switch:hover { background: var(--hover); }
.ws-switch .av { width: 24px; height: 24px; color: var(--accent-ink); }
.ws-switch .i { width: 15px; color: var(--muted); }
.search { flex: 0 1 400px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 10px; background: var(--field); border: 1px solid var(--border); border-radius: 8px; color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--text); }
kbd { font: 500 11px/1 Manrope, ui-sans-serif, system-ui, sans-serif; padding: 4px 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--text); }
.icon-btn:hover { background: var(--hover); }
.icon-btn.sm { width: 22px; height: 22px; border-radius: 6px; color: var(--muted); }
.icon-btn.sm .i { width: 14px; height: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 9px; font-size: 14px; }

.rail { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 12px; }
.rail hr { width: 32px; margin: 8px 0; border: 0; border-top: 1px solid var(--border); }
.rail a:not(.logo) { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--muted); }
.rail a:not(.logo):hover { background: var(--hover); color: var(--text); }
.rail a.active { background: var(--accent-soft); color: var(--accent); }

.sidebar { padding: 20px 14px; }
.sidebar .ws-switch { width: 100%; margin-bottom: 4px; }
.sidebar .ws-name { flex: 1; }
.label { display: flex; align-items: center; justify-content: space-between; margin: 20px 10px 6px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; font-size: 15px; color: var(--muted); }
.nav:hover, .nav.active { background: var(--hover); color: var(--text); }
.av { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 6px; background: var(--c); color: #fff; font-size: 11px; font-weight: 700; }
.ws-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* main */
.content { max-width: 1080px; margin: 0 auto; padding: 20px 32px 48px; }
h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
h2 { margin: 0; font-size: 15px; font-weight: 600; }
.date { margin: 2px 0 0; font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; background: var(--accent); color: var(--accent-ink); border-radius: 7px 0 0 7px; font-weight: 600; }
.btn-primary .i { width: 16px; }
.btn-primary:hover { filter: brightness(1.05); }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 180px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
.menu-pop button { display: block; width: 100%; padding: 7px 10px; border-radius: 6px; text-align: left; }
.menu-pop button:hover { background: var(--hover); }
.who { display: grid; padding: 6px 10px 8px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.who span { font-size: 12px; color: var(--muted); }
.who .role-tag { margin-top: 4px; font-weight: 700; color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); }
.chip:hover { color: var(--text); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.chip .av { width: 18px; height: 18px; border-radius: 5px; font-size: 10px; }

section { margin-bottom: 28px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.card-head { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.link { color: var(--accent); font-size: 13px; font-weight: 600; white-space: nowrap; }

.work { list-style: none; margin: 0; padding: 0; }
.work li + li { border-top: 1px solid var(--border); }
.work a { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.work a:hover { background: var(--hover); }
.work .t { flex: 1; min-width: 0; }
.work .t b { display: block; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.work .t span { font-size: 12.5px; color: var(--muted); }
.work .arrow { color: var(--muted); }
.status { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.empty-row { padding: 20px 18px; color: var(--muted); }

.ev { margin-bottom: 6px; padding: 5px 7px; border-left: 3px solid var(--c); border-radius: 6px; background: color-mix(in srgb, var(--c) 10%, transparent); font-size: 12px; overflow-wrap: anywhere; }
.empty { display: grid; justify-items: center; gap: 12px; padding: 48px 24px; border: 1px dashed var(--border); border-radius: 10px; text-align: center; color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--hover); color: var(--text); }

/* calendar */
.cal-page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 100%; }
.cal { padding: 20px 24px; }
.cal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.cal-title { min-width: 190px; }
.cal-title p { margin: 0; font-size: 12px; }
.cal-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.round { display: grid; place-items: center; width: 32px; height: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; }
.round:hover, .btn:hover { background: var(--hover); }
.btn { height: 34px; padding: 0 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; font-weight: 500; }
.btn-primary.solo { border-radius: 7px; }
.seg { display: flex; padding: 3px; background: var(--field); border: 1px solid var(--border); border-radius: 8px; }
.seg button { display: flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.seg i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.dow { display: grid; grid-template-columns: repeat(7, 1fr); padding: 10px 0; border-bottom: 1px solid var(--border); text-align: center; font-size: 13px; color: var(--muted); }
.dow .on { color: var(--accent); font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.cell { display: flex; flex-direction: column; gap: 3px; min-height: 108px; padding: 6px; background: var(--surface); cursor: pointer; }
.cell.wk { background: repeating-linear-gradient(135deg, var(--surface) 0 7px, var(--panel) 7px 9px); }
.cell:hover { background: var(--hover); }
.cell .ev { display: block; width: 100%; margin: 0; padding: 2px 6px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 4px; }
.cell .ev b { font-weight: 600; }
.ev.done { color: var(--muted); text-decoration: line-through; }
.num { margin-top: auto; align-self: flex-end; padding: 0 4px; font-size: 12px; font-weight: 600; }
.ad { padding: 0 2px; font-size: 11px; font-weight: 500; color: var(--muted); }
.num.np { font-size: 18px; line-height: 1.2; }
.num.red { color: #dc2626; }
.cell-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 16px; }
.cell-top .num { margin: 0; }
.cell > .ad { margin-top: auto; align-self: flex-end; }
.moon { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; color: var(--muted); }
.moon::before { content: ''; width: 9px; height: 9px; border-radius: 50%; }
.moon.purnima::before { background: #f5c542; box-shadow: 0 0 4px #f5c542; }
.moon.aunsi::before { background: var(--text); }
.fest { padding: 0 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; font-weight: 600; color: var(--muted); }
.fest.hol { color: #dc2626; }
.fest.astro { font-weight: 500; color: #b7791f; }
.cell.out .num, .cell.out .ad { color: var(--muted); opacity: .6; }
/* month card can't clip, or the lifted today cell gets cut off; round the grid's bottom corners instead */
.card.month { overflow: visible; }
.month .grid { border-radius: 0 0 9px 9px; }
.month .grid > :nth-last-child(7) { border-bottom-left-radius: 9px; }
.month .grid > :last-child { border-bottom-right-radius: 9px; }
/* hover: lift with a slight overshoot so it bounces into place */
.cell { transition: transform .4s cubic-bezier(.34, 1.8, .64, 1), box-shadow .2s; }
.cell:hover { position: relative; z-index: 2; transform: translateY(-4px); border-radius: 8px; box-shadow: 0 10px 20px -10px rgb(0 0 0 / .3); }
.cell.today:hover { transform: translateY(-9px); }
@media (prefers-reduced-motion: reduce) { .cell { transition: none; } }
.cell.today { position: relative; z-index: 1; transform: translateY(-5px); border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1.5px var(--accent), 0 12px 24px -8px rgb(0 0 0 / .3); }
.cell.today .num { padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }

.upcoming { display: flex; flex-direction: column; gap: 8px; padding: 20px 16px; border-left: 1px solid var(--border); }
.upcoming h2 { margin-bottom: 6px; }
.up { position: relative; display: grid; gap: 6px; width: 100%; margin-bottom: 8px; padding: 10px 12px 10px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; text-align: left; }
.up::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--c); }
.up:hover { background: var(--hover); }
.up b { font-weight: 600; }
.up.done b { color: var(--muted); text-decoration: line-through; }
.up-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.up-meta .av { width: 16px; height: 16px; border-radius: 4px; font-size: 9px; }
.progress { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; color: var(--muted); }
.bar { flex: 1; height: 5px; overflow: hidden; border-radius: 999px; background: var(--hover); }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--c); }

.dialog { width: min(440px, calc(100vw - 32px)); padding: 0; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 20px 50px rgb(0 0 0 / .18); }
.dialog::backdrop { background: rgb(0 0 0 / .3); }
.dialog form { display: grid; gap: 14px; padding: 20px; }
.dialog label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.dialog input:not([type=range], [type=checkbox]), .dialog select { height: 36px; padding: 0 10px; background: var(--field); color: var(--text); border: 1px solid var(--border); border-radius: 7px; font: inherit; }
.dialog input:focus, .dialog select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.dialog input[type=range] { accent-color: var(--accent); }
.dialog input[type=color] { width: 64px; padding: 3px; cursor: pointer; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dialog input, .dialog select { min-width: 0; }
.dlg-actions { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.btn-ghost { height: 34px; padding: 0 12px; border-radius: 7px; font-weight: 600; }
.btn-ghost:hover { background: var(--hover); }
.danger { color: #dc2626; }

/* event dialog: title + properties on top, tasks left, people right */
.dialog.event-dlg { width: min(960px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: hidden; border-radius: 14px; }
.dialog.event-dlg form { display: flex; flex-direction: column; gap: 0; max-height: calc(100dvh - 48px); padding: 0; }
.ev-head { display: grid; gap: 16px; padding: 24px 28px 20px; border-bottom: 1px solid var(--border); }
.ev-eyebrow, .ev-sec-head h3, .dialog.event-dlg .ev-props label, .ev-progress > span:first-child {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ev-eyebrow { display: flex; align-items: center; gap: 10px; }
.type-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 4px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.type-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.dialog.event-dlg .ev-title { height: auto; margin-top: -6px; padding: 2px 0 6px; background: none; border: 0; border-bottom: 1px solid transparent; border-radius: 0; font-size: 26px; font-weight: 700; letter-spacing: -.015em; color: var(--text); }
.dialog.event-dlg .ev-title:hover { border-bottom-color: var(--border); }
.dialog.event-dlg .ev-title:focus { outline: 0; border-bottom-color: var(--accent); }
.dialog.event-dlg .ev-desc { field-sizing: content; min-height: 46px; max-height: 160px; margin-top: -8px; padding: 4px 0 6px; resize: none; background: none; color: var(--text); border: 0; border-bottom: 1px solid transparent; font-family: inherit; font-size: 14px; line-height: 1.55; }
.dialog.event-dlg .ev-desc:hover { border-bottom-color: var(--border); }
.dialog.event-dlg .ev-desc:focus { outline: 0; border-bottom-color: var(--accent); }
.ev-props { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.dialog.event-dlg .ev-props label { gap: 6px; align-content: start; }
.ev-props small { font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.ev-progress { display: flex; align-items: center; gap: 14px; }
.ev-progress .bar { height: 6px; background: var(--hover); }
.ev-progress .bar span { background: var(--accent); }
.ev-progress input { flex: 1; accent-color: var(--accent); }
.ev-progress output { min-width: 112px; text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

.ev-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; flex: 1; min-height: 0; overflow: auto; }
.ev-tasks, .ev-people { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 20px 28px 24px; }
.ev-people { padding: 20px 24px 24px; background: var(--panel); border-left: 1px solid var(--border); }
.ev-sec-head { display: flex; align-items: baseline; justify-content: space-between; }
.ev-sec-head h3 { margin: 0; }
.ev-sec-head span { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-list { margin: 0; padding: 0; overflow: hidden; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.ev-list > li + li { border-top: 1px solid var(--border); }
.ev-empty { padding: 18px 14px; font-size: 13px; color: var(--muted); }
.task { display: grid; grid-template-columns: 16px minmax(0, 1fr) 270px 28px; align-items: center; gap: 12px; padding: 9px 10px 9px 14px; }
.task input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.task-title { display: grid; gap: 2px; min-width: 0; padding: 2px 0; text-align: left; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.task-title:hover span { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.task-title small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.task.done .task-title span { font-weight: 500; color: var(--muted); text-decoration: line-through; }
.task.open { background: var(--panel); }
.task-review { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; background: color-mix(in srgb, #d97706 9%, var(--surface)); border: 1px solid color-mix(in srgb, #d97706 25%, var(--border)); font-size: 12.5px; font-weight: 600; }
.task-review > span { display: inline-flex; flex: 1; align-items: center; gap: 6px; min-width: 160px; color: #b45309; }
.task-review .i { width: 15px; height: 15px; }
.task-review.changes { background: color-mix(in srgb, #dc2626 7%, var(--surface)); border-color: color-mix(in srgb, #dc2626 22%, var(--border)); }
.task-review.changes > span { color: #dc2626; }
.task-review .btn-ghost, .task-review .btn-primary { height: 30px; font-size: 12.5px; }
.task-desc { grid-column: 2 / -1; min-height: 76px; padding: 8px 10px; resize: vertical; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 7px; font-family: inherit; font-size: 13px; line-height: 1.5; }
.task-desc:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.assignee { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dialog.event-dlg .assignee select { flex: 1; height: 30px; padding: 0 6px; background: transparent; border-color: transparent; font-size: 12.5px; font-weight: 500; }
.dialog.event-dlg .assignee select:hover { border-color: var(--border); }
.person { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; }
.person div { display: grid; flex: 1; min-width: 0; }
.person b { font-size: 13.5px; font-weight: 600; }
.person small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--muted); }
.pav { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.pav.sm { width: 22px; height: 22px; font-size: 9px; }
.pav.xs { width: 20px; height: 20px; font-size: 8px; box-shadow: 0 0 0 2px var(--surface); }
.pav.none { background: var(--hover); color: var(--muted); }
.row-del { width: 28px; height: 28px; border-radius: 6px; font-size: 17px; line-height: 1; color: var(--muted); opacity: 0; }
li:hover > .row-del, .row-del:focus-visible { opacity: 1; }
.row-del:hover { background: var(--hover); color: #dc2626; }
@media (hover: none) { .row-del { opacity: 1; } }
.ev-add { display: flex; gap: 8px; }
.ev-add input { flex: 1; }
.ev-add.task-add select { flex: 0 1 210px; }
.ev-add.person-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.ev-add.person-add #person-input { grid-column: 1 / -1; }
.person .role { color: var(--text); font-weight: 500; }
.ev-add .btn { height: 36px; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.ev-hint { margin: 0; font-size: 12px; color: var(--muted); }
.ev-foot { display: flex; align-items: center; gap: 8px; padding: 14px 28px; background: var(--surface); border-top: 1px solid var(--border); }

.up-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.up-task { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 500; }
.up-people { display: flex; }
.up-people .pav + .pav { margin-left: -6px; }

@media (max-width: 760px) {
  .ev-props { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ev-body { grid-template-columns: minmax(0, 1fr); }
  .ev-people { border-left: 0; border-top: 1px solid var(--border); }
  .ev-head, .ev-tasks, .ev-people, .ev-foot { padding-left: 18px; padding-right: 18px; }
  .dialog.event-dlg .ev-title { font-size: 21px; }
  .task { grid-template-columns: 16px minmax(0, 1fr) 28px; }
  .task .assignee { grid-column: 2 / 4; }
  .ev-add.task-add { flex-wrap: wrap; }
  .ev-add.task-add input { flex-basis: 100%; }
  .ev-add.task-add select { flex: 1; }
}

/* dashboard */
.btn { display: inline-flex; align-items: center; gap: 6px; }
.btn .i { width: 16px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { display: grid; align-content: start; gap: 2px; min-width: 0; padding: 16px 18px; border-radius: 12px;
  background: color-mix(in srgb, var(--c) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 20%, var(--border)); }
.tile-icon { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 14px; border-radius: 8px; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.tile-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.tile b { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile.text b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 20px; line-height: 1.6; }
.tile small { font-size: 12.5px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.dash-grid > .card, .stack-col > .card { margin: 0; }
/* left cards fill the row height; the chart grows to use it */
.dash-grid > .card { display: flex; flex-direction: column; }
.stack-col { display: grid; gap: 16px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-head small { font-size: 13px; font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--muted); }
.legend span, .tip span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .tip i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }

.chart { position: relative; display: flex; flex: 1; flex-direction: column; padding: 22px 18px 12px 44px; }
.plot { position: relative; display: grid; flex: 1; grid-template-columns: repeat(7, minmax(0, 1fr)); min-height: 190px; }
.gridline { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--border); }
.gridline em { position: absolute; right: calc(100% + 10px); top: -8px; font-size: 11px; font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.col { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; border-radius: 6px; cursor: default; }
.col:hover, .col:focus-visible { background: color-mix(in srgb, var(--hover) 70%, transparent); outline: 0; }
.stack { display: flex; flex-direction: column-reverse; gap: 2px; width: min(38px, 60%); }
.bar-seg { min-height: 3px; background: var(--c); }
.stack > .bar-seg:last-child { border-radius: 4px 4px 0 0; }
.total { position: absolute; left: 0; right: 0; margin-bottom: 4px; text-align: center; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.xlabels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 8px; text-align: center; font-size: 11.5px; color: var(--muted); }
.xlabels span { display: grid; }
.xlabels b { font-size: 12px; font-weight: 600; color: var(--text); }
.xlabels .on b { color: var(--accent); }
.tip { position: absolute; top: 8px; z-index: 5; display: grid; gap: 4px; min-width: 180px; max-width: 240px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 24px -10px rgb(0 0 0 / .3); font-size: 12.5px; pointer-events: none; }
.tip[hidden] { display: none; }
.tip em { margin-left: auto; padding-left: 16px; font-style: normal; font-weight: 700; }
.tip small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.chart-empty { position: absolute; inset: 40% 0 auto; margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.table-view { padding: 0 18px 14px; font-size: 12.5px; }
.table-view summary { color: var(--muted); font-weight: 600; }
.table-view table { width: 100%; margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { padding: 5px 8px; border-bottom: 1px solid var(--border); text-align: right; }
.table-view th:first-child, .table-view td:first-child { text-align: left; }

.side-list { display: grid; gap: 8px; padding: 14px; }
.side-list .up, .revisit .up { margin: 0; }
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 28px 12px; text-align: center; }
.empty-state p { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.work .pav { flex: none; }
.team, .hols { margin: 0; padding: 6px 0; list-style: none; }
.team li, .hols li { display: flex; align-items: center; gap: 10px; padding: 8px 18px; }
.team-name { display: grid; flex: 0 0 132px; min-width: 0; }
.team-name b, .hols b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 600; }
.team-name small, .hols small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11.5px; color: var(--muted); }
.team-bar { flex: 1; height: 6px; overflow: hidden; border-radius: 999px; background: var(--hover); }
.team-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.team-n { width: 20px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.hols li > span:last-child { display: grid; min-width: 0; }
.hol-date { display: grid; place-items: center; flex: none; width: 40px; height: 42px; border-radius: 8px; background: var(--hover); font-size: 10.5px; font-weight: 600; color: var(--muted); line-height: 1.1; }
.hol-date b { font-size: 16px; color: var(--text); }
.hols b.red { color: #dc2626; }
.revisit { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

/* my work (staff portal) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.me-head { display: flex; align-items: center; gap: 14px; }
.me-head .pav { width: 46px; height: 46px; font-size: 16px; }
.viewas { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.viewas select { height: 34px; padding: 0 8px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 7px; font: inherit; font-weight: 600; }
.btn-primary.sm, .btn-ghost.sm { height: 30px; padding: 0 10px; font-size: 12.5px; white-space: nowrap; }
.btn-primary.sm .i { width: 14px; }
.mini-nav { display: flex; align-items: center; gap: 6px; }
.mini-nav .btn { height: 32px; }
.mini-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 12px 14px 4px; }
.mc-dow { padding-bottom: 4px; text-align: center; font-size: 12px; color: var(--muted); }
.mc-day { display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 74px; padding: 5px 6px; border-radius: 8px; background: var(--panel); border: 1px solid transparent; }
.mc-day.out { opacity: .45; }
.mc-day.today { background: var(--surface); border-color: var(--accent); box-shadow: 0 6px 16px -10px rgb(0 0 0 / .4); }
.mc-top { display: flex; align-items: baseline; justify-content: space-between; }
.mc-top b { font-size: 15px; font-weight: 700; }
.mc-top b.red { color: #dc2626; }
.mc-top small { font-size: 10.5px; color: var(--muted); }
.mc-task { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 1px 5px; border-left: 3px solid var(--c); border-radius: 4px; background: color-mix(in srgb, var(--c) 12%, transparent); font-size: 11px; font-weight: 500; }
.mc-more { font-size: 10.5px; color: var(--muted); }
.mini-legend { padding: 8px 18px 14px; }
.task-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; }
.task-row .t { flex: 1; min-width: 0; }
.task-row .t b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.task-row .t span { font-size: 12.5px; color: var(--muted); }
.due.late { color: #dc2626; font-weight: 600; }
.due.soon { color: #d97706; font-weight: 600; }
.review-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.review-cols > div + div { border-left: 1px solid var(--border); }
.review-cols h3 { margin: 0; padding: 14px 18px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.review-cols .task-row { padding: 10px 18px; }

.task-filter { width: fit-content; max-width: 100%; margin-bottom: 14px; overflow-x: auto; }
.task-filter button { white-space: nowrap; }
.task-filter em { margin-left: 4px; font-style: normal; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.task-table { width: 100%; border-collapse: collapse; }
.task-table th { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.task-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 13.5px; }
.task-table tr:last-child td { border-bottom: 0; }
.task-table td small { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.task-table td small .av { width: 16px; height: 16px; font-size: 9px; border-radius: 4px; }
.task-name { padding: 0; text-align: left; font-weight: 700; }
.task-name:hover { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.task-snip { display: block !important; overflow: hidden; max-width: 320px; white-space: nowrap; text-overflow: ellipsis; }
.task-note { max-width: 420px; margin: 6px 0 0; padding: 8px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 7px; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; }
.proj { position: relative; padding-left: 10px; font-weight: 600; }
.proj::before { content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--c); }
a.proj:hover { text-decoration: underline; text-underline-offset: 3px; }

/* tasks + reviews */
.nav-badge { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: #d97706; color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.filters .task-filter { margin: 0; }
.filters select { height: 34px; padding: 0 8px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 13px; font-weight: 500; }
.assign { display: flex; align-items: center; gap: 6px; }
.assign select { max-width: 220px; height: 30px; padding: 0 4px; background: transparent; color: var(--text); border: 1px solid transparent; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 500; }
.assign select:hover, .assign select:focus { border-color: var(--border); }
.dialog textarea { min-height: 72px; padding: 8px 10px; resize: vertical; background: var(--field); color: var(--text); border: 1px solid var(--border); border-radius: 7px; font-family: inherit; font-size: 14px; font-weight: 400; line-height: 1.5; }
.dialog textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.rv-inline { max-width: 420px; margin: 6px 0 0; padding: 6px 10px; border-left: 3px solid #dc2626; border-radius: 4px; background: color-mix(in srgb, #dc2626 7%, transparent); font-size: 12.5px; line-height: 1.45; }

.rv-list { margin: 0; padding: 0; list-style: none; }
.rv { display: flex; gap: 10px; padding: 12px 18px; }
.rv-list > .rv + .rv { border-top: 1px solid var(--border); }
.rv-body { display: grid; gap: 4px; min-width: 0; flex: 1; }
.rv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rv-head b { font-size: 13.5px; }
.rv-role { padding: 1px 6px; border-radius: 4px; background: var(--hover); font-size: 11px; font-weight: 700; color: var(--muted); }
.rv-head small { margin-left: auto; font-size: 12px; color: var(--muted); }
.rv-ctx { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.rv-body p { margin: 0; padding: 8px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 7px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.rv-list.compact .rv { padding: 8px 0; }
.rv-queue { display: grid; gap: 12px; padding: 14px; }
.rv-card { display: grid; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.rv-card-head { display: flex; align-items: center; gap: 12px; }
.rv-card-head > div { display: grid; flex: 1; min-width: 0; }
.rv-card-head b { font-size: 15px; }
.rv-card-head small { font-size: 12.5px; color: var(--muted); }
.rv-meta { font-size: 12.5px; color: var(--muted); }
.rv-meta .proj { color: var(--text); }
.rv-desc { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.rv-note { width: 100%; min-height: 60px; padding: 8px 10px; resize: vertical; background: var(--field); color: var(--text); border: 1px solid var(--border); border-radius: 7px; font-family: inherit; font-size: 13.5px; line-height: 1.5; }
.rv-note:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.rv-actions { display: flex; justify-content: flex-end; gap: 8px; }

.ct-proj { margin-bottom: 16px; }
.ct-head { display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: center; gap: 16px; border-left: 3px solid var(--c); }
.ct-head h2 { font-size: 16px; }
.ct-steps { margin: 0; padding: 4px 0; list-style: none; }
.ct-steps li { display: grid; grid-template-columns: 12px minmax(0, 1fr) 200px 140px; align-items: center; gap: 14px; padding: 10px 18px; }
.ct-steps li + li { border-top: 1px solid var(--border); }
.ct-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); }
.ct-main { display: grid; min-width: 0; }
.ct-main b { font-size: 14px; font-weight: 600; }
.ct-main small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; color: var(--muted); }
.ct-steps li.done .ct-main b { color: var(--muted); text-decoration: line-through; }
.ct-who { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 500; }
.ct-who > span:last-child { display: grid; min-width: 0; }
.ct-who small { font-size: 11.5px; color: var(--muted); }
.ct-steps .status { justify-self: end; }
.ct-empty { margin: 0; padding: 16px 18px; font-size: 13px; color: var(--muted); }

/* task brief + hand-ins */
.brief-dlg { width: min(720px, calc(100vw - 32px)); }
.brief { display: grid; gap: 18px; padding: 24px 26px; }
.brief h2 { margin: -6px 0 0; font-size: 22px; letter-spacing: -.01em; }
.brief h3 { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.brief section { min-width: 0; }
.brief .ev-eyebrow .av { width: 18px; height: 18px; font-size: 10px; border-radius: 5px; }
.brief-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: -8px; font-size: 13px; color: var(--muted); }
.brief-you { margin: 0 0 10px; font-size: 14px; line-height: 1.6; }
.brief-text { padding: 10px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.brief-text a, .sub-links a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.brief-steps { margin: 0; padding: 0; overflow: hidden; list-style: none; border: 1px solid var(--border); border-radius: 8px; counter-reset: step; }
.brief-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr) 200px 130px; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13px; counter-increment: step; }
.brief-steps li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--hover); font-size: 11px; font-weight: 700; }
.brief-steps li + li { border-top: 1px solid var(--border); }
.brief-steps li.me { background: var(--accent-soft); }
.brief-steps li.me::before { background: var(--accent); color: var(--accent-ink); }
.brief-steps .status { justify-self: end; }
.brief-who { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; }
.brief-who small { margin-left: 2px; font-weight: 500; color: var(--muted); }
.brief-who em { font-style: normal; font-weight: 500; color: #d97706; }
.submit-box { display: grid; gap: 12px; padding: 16px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); border-radius: 10px; }
.submit-box h3 { margin: 0; color: var(--text); }
.submit-box p { margin: -6px 0 0; font-size: 13px; }
.submit-box label small { font-weight: 500; text-transform: none; letter-spacing: 0; }
.drop { display: flex !important; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px dashed var(--border); border-radius: 8px; cursor: pointer; color: var(--text) !important; }
.drop:hover { border-color: var(--accent); }
.drop small { display: block; font-weight: 500; color: var(--muted); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs:empty { display: none; }
.thumbs img { width: 96px; height: 72px; object-fit: cover; border: 1px solid var(--border); border-radius: 6px; cursor: zoom-in; }
.thumb { position: relative; }
.thumb button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); color: var(--surface); font-size: 14px; line-height: 1; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.file-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.file-tiles:empty { display: none; }
.pick { display: grid; gap: 8px; }
.file-tile { position: relative; display: grid; margin: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.file-tile img, .file-tile video, .file-ph { display: block; width: 100%; height: 96px; object-fit: cover; background: #000; }
.file-tile img { cursor: zoom-in; }
.file-ph { display: grid; place-items: center; background: var(--hover); color: var(--muted); }
.file-ph .i { width: 28px; height: 28px; }
.file-tile figcaption { display: grid; padding: 6px 8px; min-width: 0; }
.file-tile figcaption span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 600; }
.file-tile figcaption small { font-size: 11px; color: var(--muted); }
.file-tile button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgb(0 0 0 / .65); color: #fff; font-size: 14px; line-height: 1; }
.brief-sub { margin: 12px 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.sub-error { margin: 0; padding: 8px 10px; border-radius: 7px; background: color-mix(in srgb, #dc2626 9%, transparent); color: #dc2626; font-size: 13px; font-weight: 600; }
.sub { display: grid; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.sub + .sub { margin-top: 8px; }
.sub-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sub-head small { margin-left: auto; color: var(--muted); }
.sub-v { padding: 1px 7px; border-radius: 4px; background: var(--text); color: var(--surface); font-size: 11px; font-weight: 700; }
.sub-links { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.sub-links li { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.sub-links .i { width: 14px; flex: none; color: var(--muted); }
.sub-missing { margin: 0; font-size: 12.5px; color: var(--muted); font-style: italic; }
.sub-count { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.sub-count .i { width: 12px; }
.task-sub { grid-column: 2 / -1; }
.t-link { padding: 0; text-align: left; font-weight: 600; }
.t-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.task-row .t .t-link { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
button.mc-task { width: 100%; text-align: left; }
.zoom-dlg { max-width: 92vw; max-height: 92vh; padding: 0; background: none; border: 0; }
.zoom-dlg::backdrop { background: rgb(0 0 0 / .75); }
.zoom-dlg img { display: block; max-width: 92vw; max-height: 92vh; border-radius: 8px; cursor: zoom-out; }

/* content requests */
.cell .ev.req { background: color-mix(in srgb, var(--c) 6%, var(--surface)); border: 1px dashed var(--c); border-left-width: 3px; border-left-style: solid; }
.cell .ev.req.declined { color: var(--muted); text-decoration: line-through; }
.cell.past { cursor: default; }
.cell.past:hover { transform: none; box-shadow: none; }
.cal-hint { margin: -8px 0 12px; font-size: 13px; }
.cal-legend { margin-top: 12px; }
.legend i.dashed { background: transparent; border: 1.5px dashed var(--muted); }
.req-why { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.req-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.req-section { display: grid; gap: 8px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.req-section h2 { display: flex; align-items: center; gap: 8px; }
.req-section .nav-badge { margin-left: 0; }
.req-card { border-style: dashed; }
.rq-dlg { width: min(600px, calc(100vw - 32px)); }
.rq-body h3 small { font-weight: 500; letter-spacing: 0; text-transform: none; }
.req-dlg { width: min(560px, calc(100vw - 32px)); }
.field { display: grid; gap: 8px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field-label small { font-weight: 500; }
.date-chips { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.date-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: 999px; font-weight: 600; }
.rq-body .date-chip { padding-right: 10px; }
.date-chip button { width: 20px; height: 20px; border-radius: 50%; font-size: 14px; line-height: 1; color: var(--muted); }
.date-chip button:hover { background: var(--surface); color: #dc2626; }
.date-add { display: flex; gap: 8px; }
.date-add input { flex: 1; }
.date-add .btn { height: 36px; }
.inspo { display: grid; gap: 8px; }
.inspo p { margin: 0; font-size: 13px; }
.rq-body { display: grid; gap: 12px; padding: 22px 24px; }
.rq-body h2 { margin: 0; font-size: 21px; }
.rq-body h3 { margin: 6px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rq-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.rq-meta a { color: var(--accent); word-break: break-all; }
.rq-brief { margin: 0; padding: 10px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.rq-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; counter-reset: step; }
.rq-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr) 130px 170px; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13px; counter-increment: step; }
.rq-steps li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--hover); font-size: 11px; font-weight: 700; }
.rq-steps li + li { border-top: 1px solid var(--border); }
.rq-who { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.rq-who.none { font-weight: 500; color: #d97706; }

/* client portal */
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.av.big { width: 46px; height: 46px; border-radius: 12px; font-size: 18px; }
.client-projects { margin: 0; padding: 0; list-style: none; }
.client-projects > li:not(.empty-row) { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: center; gap: 20px; padding: 16px 18px 16px 24px; }
.client-projects > li + li { border-top: 1px solid var(--border); }
.client-projects > li:not(.empty-row)::before { content: ''; position: absolute; left: 10px; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: var(--c); }
.cp-main { display: grid; gap: 4px; min-width: 0; }
.cp-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cp-title b { font-size: 15px; font-weight: 700; }
.cp-main p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cp-main small { font-size: 12px; color: var(--muted); }
.cp-side { display: grid; justify-items: end; gap: 8px; }
.cp-side .progress { width: 100%; }
.team-name.wide { flex: 1; }
.by { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.task-table b.late { color: #dc2626; }
.task-table b.soon { color: #d97706; }
.task-table .act { text-align: right; white-space: nowrap; }
.task-table tr.is-done .task-name { color: var(--muted); text-decoration: line-through; }

/* staff */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { display: grid; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.stat span, .staff-head, .staff-detail h3 { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.staff-cols { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px 96px 210px; align-items: center; gap: 12px; padding: 12px 18px; }
.staff-head { padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.staff-head span:not(:first-child), .count { text-align: center; }
#staff-list { margin: 0; padding: 0; list-style: none; }
.staff-row + .staff-row { border-top: 1px solid var(--border); }
.staff-row.open { background: var(--panel); }
.staff-person { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; }
.staff-person > span { display: grid; min-width: 0; }
.staff-person b { font-size: 14px; font-weight: 600; }
.staff-person:hover b { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.staff-person small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; color: var(--muted); }
.count { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.count.warn { color: #d97706; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.row-actions .btn-ghost { height: 30px; padding: 0 10px; font-size: 13px; }
.staff-detail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 4px 18px 20px 60px; }
.staff-detail h3 { margin: 0 0 8px; }
.staff-detail ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.staff-detail a { position: relative; display: grid; gap: 2px; padding: 8px 10px 8px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.staff-detail a:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.staff-detail a[style]::before { content: ''; position: absolute; left: 5px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--c); }
.staff-detail b { font-size: 13px; font-weight: 600; }
.staff-detail small { font-size: 12px; color: var(--muted); }
.staff-detail .done b { color: var(--muted); text-decoration: line-through; }
.staff-detail .progress { margin-top: 4px; }
.staff-detail p { margin: 0; font-size: 13px; }

@media (max-width: 1180px) {
  .dash-grid, .review-cols { grid-template-columns: minmax(0, 1fr); }
  .review-cols > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-page { grid-template-columns: minmax(0, 1fr); }
  .upcoming { border-left: 0; border-top: 1px solid var(--border); }
}
/* hamburger + drawer (only below 960px) */
.menu-btn, .nav-backdrop { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 60px minmax(0, 1fr); }
  .menu-btn { display: grid; flex: none; }
  .sidebar { position: fixed; z-index: 60; top: 8px; bottom: 8px; left: 8px; width: min(300px, calc(100vw - 48px)); overflow-y: auto;
    visibility: hidden; transform: translateX(calc(-100% - 16px)); transition: transform .25s ease, visibility .25s;
    box-shadow: 0 20px 50px rgb(0 0 0 / .25); }
  .nav-open .sidebar { visibility: visible; transform: none; }
  .nav-backdrop { position: fixed; inset: 0; z-index: 55; background: rgb(0 0 0 / .35); }
  .nav-open .nav-backdrop { display: block; }
  .nav-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
/* touch screens keep :hover after a tap, so don't leave calendar days lifted */
@media (hover: none) {
  .cell:hover { transform: none; box-shadow: none; }
  .cell.today:hover { transform: translateY(-5px); }
}
@media (max-width: 640px) {
  .app { grid-template-columns: minmax(0, 1fr); padding: 0 8px 8px; }
  .seg { max-width: 100%; overflow-x: auto; }
  .cal-tools { min-width: 0; max-width: 100%; margin-left: 0; }
  .rail, .topbar .ws-name, kbd { display: none; }
  .topbar { gap: 8px; padding: 0; }
  .search { flex: 1; }
  .top-actions { gap: 0; }
  .content { padding: 20px 16px 48px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-head { display: none; }
  .staff-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 14px; }
  .staff-person, .row-actions { grid-column: 1 / -1; }
  .row-actions { justify-content: flex-start; }
  .count::before { content: attr(data-label) ' '; font-size: 11px; font-weight: 600; color: var(--muted); }
  .staff-detail { grid-template-columns: minmax(0, 1fr); padding: 4px 14px 16px; }
  .tiles.three { grid-template-columns: minmax(0, 1fr); }
  .ct-head { grid-template-columns: minmax(0, 1fr); }
  .ct-steps li { grid-template-columns: 12px minmax(0, 1fr); }
  .ct-who, .ct-steps .status { grid-column: 2; justify-self: start; }
  .rv-actions { flex-wrap: wrap; }
  .rq-steps li, .brief-steps li { grid-template-columns: 24px minmax(0, 1fr); }
  .brief-steps li > :nth-child(n+2) { grid-column: 2; justify-self: start; }
  .brief { padding: 18px 16px; }
  .rq-steps li > :nth-child(n+2) { grid-column: 2; }
  .client-projects > li:not(.empty-row) { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cp-side { justify-items: start; }
  /* task table becomes stacked cards */
  .task-table thead { display: none; }
  .task-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px 4px; border-bottom: 1px solid var(--border); }
  .task-table td { padding: 6px 10px; border: 0; }
  .task-table td:first-child, .task-table td.act { grid-column: 1 / -1; }
  .task-table td.act { text-align: left; }
  .task-table td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .mc-day { min-height: 54px; padding: 3px; }
  .mc-task { font-size: 9.5px; padding: 0 3px; }
  .cal { padding: 16px 12px; }
  .cell { min-height: 64px; padding: 3px; }
  .cell .ev { padding: 1px 3px; font-size: 10px; }
  .cell .ev b, .moon { display: none; }
  .fest { font-size: 9px; }
  .num.np { font-size: 15px; }
  .dow { font-size: 11px; }
}
