/* Appointment desk console. Light by default (an office desk in daylight), dark on request or by system setting. */
:root {
  --bg: #fbfbfa;
  --panel: #ffffff;
  --sunk: #f4f4f2;
  --line: #e6e5e1;
  --line-2: #d4d2cc;
  --ink: #161614;
  --ink-2: #57554f;
  --ink-3: #75726b;
  --hot: #c2410c;          /* attention: handed off, failed, retried */
  --hot-fill: #f26b2a;
  --hot-wash: #fdf0e8;
  --ok: #161614;           /* done states are ink, not green: colour is reserved for attention */
  --wash: #f0efec;
  --focus: #2b59c3;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --nav-w: 248px;
  --top-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211; --panel: #181816; --sunk: #1e1e1c; --line: #2b2a27; --line-2: #3a3935;
    --ink: #edece8; --ink-2: #b0aea6; --ink-3: #8f8c84; --hot: #ff8a4c; --hot-fill: #f26b2a; --hot-wash: #2c1d14;
    --ok: #edece8; --wash: #232320; --focus: #8fb0ff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --panel: #181816; --sunk: #1e1e1c; --line: #2b2a27; --line-2: #3a3935;
  --ink: #edece8; --ink-2: #b0aea6; --ink-3: #8f8c84; --hot: #ff8a4c; --hot-fill: #f26b2a; --hot-wash: #2c1d14;
  --ok: #edece8; --wash: #232320; --focus: #8fb0ff; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--sans); font-feature-settings: "ss01"; -webkit-font-smoothing: antialiased; }
::selection { background: var(--ink); color: var(--bg); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--panel); padding: 8px 12px; border: 1px solid var(--line-2); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }
.nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); padding: 0 12px 12px; overflow-y: auto; }
.nav__brand { height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 6px; font: 600 16px/1 var(--sans); letter-spacing: -0.01em; border-bottom: 1px solid var(--line); margin: 0 -12px 12px; padding-left: 18px; }
.mark { width: 26px; height: 26px; stroke: none; }
.mark__bg { fill: var(--ink); }
.mark__line { fill: none; stroke: var(--bg); stroke-width: 2; stroke-linejoin: round; }
.mark__flame { fill: var(--hot-fill); }
.nav .nav__close { display: none; margin-left: auto; }
.nav__links { display: flex; flex-direction: column; gap: 2px; }
.nav__links a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 500; position: relative; }
.nav__links a:hover { background: var(--wash); color: var(--ink); }
.nav__links a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgb(0 0 0 / .04); }
.nav__links svg { width: 17px; height: 17px; }
.count { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.count--hot { color: var(--hot); }
.nav__section { margin-top: 22px; padding: 16px 10px 0; border-top: 1px solid var(--line); }
.nav__label { margin: 0 0 6px; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.nav__note { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.nav__note a { font-size: 12px; }
.nav__ext { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); text-decoration: none; padding: 3px 0; }
.nav__ext:hover { color: var(--ink); }
.nav__ext svg { width: 13px; height: 13px; }
.status { margin-top: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 12px; display: grid; gap: 8px; font-size: 12.5px; }
.status__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.status__k { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.status__model { font-weight: 500; }
.status__spend { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--ink-2); }
.meter { height: 4px; background: var(--wash); border-radius: 4px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 4px; transition: width .6s cubic-bezier(.16,1,.3,1); }
.meter.is-high span { background: var(--hot-fill); }

.scrim { display: none; }
.frame { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 10; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); }
.top .top__menu { display: none; }
.ws { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 500; }
.ws__avatar { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: var(--wash); border: 1px solid var(--line); font-size: 11px; color: var(--ink-2); }
.ws__sep { color: var(--line-2); font-weight: 400; }
.ws__sub { color: var(--ink-2); white-space: nowrap; }
.ws__name { white-space: nowrap; }
.top__end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
main { padding: 36px 28px 80px; max-width: 1360px; width: 100%; margin: 0 auto; }
main:focus { outline: none; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 500; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn--ink { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--ink:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); border-color: transparent; }
.btn[disabled] { opacity: .55; cursor: progress; }
.iconbtn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: var(--wash); color: var(--ink); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.seg button { border: 0; background: none; height: 28px; padding: 0 12px; border-radius: 999px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink-3); }
.search input { border: 0; background: none; outline: none; width: 100%; min-width: 0; color: var(--ink); font-size: 13px; }
.search:focus-within { border-color: var(--ink-3); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font: 500 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; border: 1px solid var(--line-2); color: var(--ink-2); }
.pill--done { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill--hot { background: var(--hot-wash); color: var(--hot); border-color: color-mix(in srgb, var(--hot) 35%, transparent); }
.pill--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--live { color: var(--ink); }

/* ---------- page heads ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.head h1 { margin: 0; font: 400 clamp(40px, 4.4vw, 60px)/1 var(--serif); letter-spacing: -0.02em; }
.head p { margin: 10px 0 0; color: var(--ink-2); max-width: 66ch; font-size: 14.5px; }
.head__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- metric strip: one bordered grid, cells share their lines ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.metric { padding: 20px 22px 22px; border-left: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; gap: 14px; text-decoration: none; }
.metric:first-child { border-left: 0; }
a.metric:hover { background: var(--sunk); }
.metric__k { font: 500 12px/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; }
.metric__v { font: 400 64px/.9 var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; }
.metric__v small { font-size: 26px; color: var(--ink-3); letter-spacing: 0; margin-left: 4px; }
.metric__d { font-size: 12.5px; color: var(--ink-2); margin-top: auto; }
.metric--hot .metric__v { color: var(--hot); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 28px; padding: 14px 4px 0; font-size: 13px; color: var(--ink-2); }
.facts b { font: 500 13px var(--mono); color: var(--ink); margin-right: 6px; font-variant-numeric: tabular-nums; }

/* ---------- panels ---------- */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); min-width: 0; display: flex; flex-direction: column; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel__head h2 { margin: 0; font: 500 12px/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.panel__more { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.panel__more:hover { color: var(--ink); }
.panel__more svg { width: 14px; height: 14px; }
.panel__body { padding: 18px 20px 20px; }
.panel__empty { padding: 28px 20px; color: var(--ink-2); font-size: 13.5px; }
.panel--wide { margin-top: 20px; }

/* ranked bars */
.bars { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
.bars .lbl { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .val { font: 500 12.5px var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.bars .val .hot { color: var(--hot); }
.bars .track { grid-column: 1 / -1; height: 6px; background: var(--wash); border-radius: 3px; display: flex; overflow: hidden; }
.bars .fill { background: var(--ink); height: 100%; }
.bars .fill--hot { background: var(--hot-fill); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--ink); display: inline-block; }
.legend i.hot { background: var(--hot-fill); }
.legend i.open { background: var(--wash); border: 1px solid var(--line-2); }
.legend i.taken { background: repeating-linear-gradient(135deg, var(--ink-3) 0 2px, transparent 2px 5px); border: 1px solid var(--ink-3); }

/* rows (queues and lists inside panels) */
.rows { margin: 0; padding: 0; list-style: none; }
.rows li + li { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 20px; text-decoration: none; align-items: center; }
a.row:hover { background: var(--sunk); }
.row__t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__s { grid-column: 1; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__end { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 10px; }

/* day chart (live) */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 150px; }
.days div { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.days .b { width: 100%; max-width: 44px; background: var(--ink); border-radius: 3px 3px 0 0; min-height: 1px; }
.days .b.zero { background: var(--line); }
.days span { font: 500 12px var(--mono); color: var(--ink-3); }
.days b { font: 500 12px var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- inbox ---------- */
.inbox { display: grid; grid-template-columns: 360px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); min-height: calc(100vh - var(--top-h) - 150px); overflow: clip; }
.list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; max-height: calc(100vh - var(--top-h) - 150px); position: sticky; top: calc(var(--top-h) + 16px); }
.list__tools { padding: 12px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.list__tools .seg { width: 100%; justify-content: space-between; }
.list__tools .seg button { flex: 1; padding: 0 6px; }
.list__scroll { overflow-y: auto; flex: 1; }
.list__group { padding: 14px 16px 6px; font: 500 12px var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }
.thr { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 2px 10px; padding: 11px 16px; text-decoration: none; border-top: 1px solid var(--line); }
.thr:hover { background: var(--sunk); }
.thr[aria-current="true"] { background: var(--wash); }
.thr__dot { grid-row: 1 / span 2; margin-top: 4px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.thr__dot.done { background: var(--ink); border-color: var(--ink); }
.thr__dot.hot { background: var(--hot-fill); border-color: var(--hot-fill); }
.thr__from { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.thr__time { font: 400 12px var(--mono); color: var(--ink-3); white-space: nowrap; }
.thr__t { grid-column: 2 / -1; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr__meta { grid-column: 2 / -1; display: flex; gap: 8px; font: 400 12px var(--mono); color: var(--ink-3); margin-top: 2px; }
.thr__meta .hot { color: var(--hot); }
.list__none { padding: 24px 16px; color: var(--ink-2); font-size: 13px; }

.detail { min-width: 0; display: flex; flex-direction: column; }
.detail__head { padding: 20px 24px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.detail__back { display: none; }
.detail__head h2 { margin: 0; font: 400 30px/1.1 var(--serif); letter-spacing: -0.01em; }
.detail__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12.5px; color: var(--ink-2); }
.detail__meta .mono { font-size: 12px; }
.detail__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); flex: 1; }
.mails { padding: 20px 24px 28px; display: grid; gap: 16px; align-content: start; min-width: 0; }
.mail { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.mail__head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.mail__head b { color: var(--ink); font-weight: 500; }
.mail__body { padding: 14px 16px 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; max-width: 72ch; }
.mail--out { background: var(--sunk); }
.mail--out .mail__head b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--ink); margin-right: 8px; vertical-align: 1px; }
.mail--sys { border-style: dashed; background: none; }
.mail__body strong { font-weight: 600; }
.reply { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.reply textarea { width: 100%; border: 0; resize: vertical; min-height: 80px; background: none; outline: none; font-size: 14px; line-height: 1.55; }
.reply__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }

.work { border-left: 1px solid var(--line); background: var(--sunk); padding: 20px 20px 28px; display: grid; gap: 20px; align-content: start; min-width: 0; }
.work h3 { margin: 0 0 10px; font: 500 12px var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.outcome { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 14px 16px; display: grid; gap: 12px; }
.outcome__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.outcome__big { font: 400 26px/1.1 var(--serif); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.note { font-size: 13px; line-height: 1.55; color: var(--ink); padding: 10px 12px; border-radius: 8px; background: var(--hot-wash); border: 1px solid color-mix(in srgb, var(--hot) 25%, transparent); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; position: relative; }
.step { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding-bottom: 14px; position: relative; }
.step::before { content: ""; position: absolute; left: 10.5px; top: 22px; bottom: 0; width: 1px; background: var(--line-2); }
.step:last-child { padding-bottom: 0; }
.step:last-child::before { display: none; }
.step__icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line-2); color: var(--ink-2); }
.step__icon svg { width: 12px; height: 12px; stroke-width: 2.2; }
.step--hot .step__icon { border-color: var(--hot-fill); color: var(--hot); background: var(--hot-wash); }
.step--done .step__icon { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.step__t { font-size: 13.5px; font-weight: 500; display: flex; justify-content: space-between; gap: 8px; }
.step__t .mono { font-size: 12px; font-weight: 400; color: var(--ink-3); white-space: nowrap; }
.step__d { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.step--hot .step__d { color: var(--hot); }
.step details { margin-top: 4px; }
.step summary { font: 400 12px var(--mono); color: var(--ink-3); cursor: pointer; }
.step pre { margin: 6px 0 0; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font: 400 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; }
.runs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.runs button { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 10px; text-align: left; cursor: pointer; display: grid; gap: 2px; }
.runs button:hover { border-color: var(--ink-3); }
.runs button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.runs b { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.runs span { font: 400 12px var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.runs .hot { color: var(--hot); }
.checks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; font-size: 12.5px; align-items: start; }
.checks .mono { font-size: 12px; color: var(--ink-3); padding-top: 1px; }
.checks svg { width: 14px; height: 14px; margin-top: 2px; }
.checks .fail { color: var(--hot); }
.detail__empty { display: grid; place-items: center; text-align: center; color: var(--ink-2); padding: 60px 24px; gap: 8px; }
.detail__empty b { font: 400 30px var(--serif); color: var(--ink); }

/* ---------- dock calendar ---------- */
.cal { --label: 92px; }
.cal__hours { display: grid; grid-template-columns: var(--label) minmax(0, 1fr); font: 400 12px var(--mono); color: var(--ink-3); margin-bottom: 6px; }
.cal__ticks { position: relative; height: 14px; }
.cal__ticks span { position: absolute; transform: translateX(-50%); }
.cal__row { display: grid; grid-template-columns: var(--label) minmax(0, 1fr); align-items: center; min-height: 40px; border-top: 1px solid var(--line); }
.cal__day { font-size: 12.5px; display: grid; line-height: 1.25; }
.cal__day small { font: 400 12px var(--mono); color: var(--ink-3); }
.cal__track { position: relative; height: 26px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 24 - 1px), var(--line) calc(100% / 24 - 1px) calc(100% / 24)); }
.cal__open { position: absolute; top: 3px; bottom: 3px; background: var(--wash); border: 1px solid var(--line-2); border-radius: 4px; }
.cal__closed { position: absolute; inset: 7px 0; display: flex; align-items: center; padding-left: 8px; font: 400 12px var(--mono); color: var(--ink-3); }
.cal__taken { position: absolute; top: 6px; bottom: 6px; border: 1px solid var(--ink-3); border-radius: 3px; background: repeating-linear-gradient(135deg, var(--ink-3) 0 1.5px, transparent 1.5px 5px); }
.cal__appt { position: absolute; top: 2px; bottom: 2px; min-width: 10px; background: var(--ink); border-radius: 4px; text-decoration: none; display: block; }
.cal__appt:hover, .cal__appt:focus-visible { background: var(--hot-fill); }
.cal__appt--me { background: var(--hot-fill); }
.cal--mini .cal__row { min-height: 30px; }
.cal--mini { --label: 64px; }

.docks { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.fac { list-style: none; margin: 0; padding: 0; }
.fac a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 16px; text-decoration: none; border-top: 1px solid var(--line); }
.fac li:first-child a { border-top: 0; }
.fac a:hover { background: var(--sunk); }
.fac a[aria-current="true"] { background: var(--wash); }
.fac b { font-weight: 500; font-size: 13.5px; }
.fac span { font-size: 12px; color: var(--ink-2); grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fac em { font: normal 400 12px var(--mono); color: var(--ink-3); grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.fac__facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--ink-2); margin-bottom: 18px; }
.fac__facts b { color: var(--ink); font-weight: 500; }

/* ---------- releases ---------- */
.pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pipe__stage { padding: 18px 20px 20px; border-left: 1px solid var(--line); display: grid; gap: 8px; align-content: start; justify-items: start; position: relative; }
.pipe__stage:first-child { border-left: 0; }
.pipe__pct { font: 400 44px/1 var(--serif); font-variant-numeric: tabular-nums; }
.pipe__k { font: 500 12px var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.pipe__d { font-size: 12.5px; color: var(--ink-2); }
.pipe__stage.is-off { opacity: .5; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font: 500 12px var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); padding: 10px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 20px; border-top: 1px solid var(--line); vertical-align: top; }
.table tr:first-child td { border-top: 0; }
.table .mono { font-size: 12px; }
.table a { color: var(--ink-2); }
.tablewrap { overflow-x: auto; }
.gate { display: grid; gap: 0; }
.gate__row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) auto; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); align-items: center; }
.gate__row:first-child { border-top: 0; }
.gate__name b { display: block; font-weight: 500; }
.gate__name span { font-size: 12px; color: var(--ink-2); }
.gate__runs { display: flex; gap: 14px; flex-wrap: wrap; font: 400 12.5px var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.gate__runs .hot { color: var(--hot); }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 40; }
.drawer[hidden] { display: none; }
.drawer__scrim { position: absolute; inset: 0; background: rgb(10 10 9 / .32); animation: fade .2s ease-out; }
.drawer__panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(480px, 100%); background: var(--panel); border-left: 1px solid var(--line); padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; box-shadow: -12px 0 40px rgb(0 0 0 / .12); animation: slide .32s cubic-bezier(.16,1,.3,1); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; }
.drawer__head h2 { margin: 0; font: 400 32px/1 var(--serif); }
.drawer__lead { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.drawer__lead a { font-size: 12.5px; }
.field { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.field select, .field textarea { border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); padding: 9px 11px; font-size: 14px; color: var(--ink); font-weight: 400; }
.field textarea { resize: vertical; line-height: 1.55; }
.field select:focus, .field textarea:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.drawer__examples { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer__examples button { border: 1px solid var(--line); background: var(--sunk); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.drawer__examples button:hover { color: var(--ink); border-color: var(--line-2); }
.drawer__error { margin: 0; color: var(--hot); font-size: 13px; }
.drawer__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.drawer__hint { font-size: 12px; color: var(--ink-3); }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.view { animation: rise .35s cubic-bezier(.16,1,.3,1); }
@keyframes rise { from { opacity: .4; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .detail__body { grid-template-columns: minmax(0, 1fr); }
  .work { border-left: 0; border-top: 1px solid var(--line); }
  .metric__v { font-size: 52px; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .nav { position: fixed; z-index: 30; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .3s cubic-bezier(.16,1,.3,1); }
  .nav.is-open { transform: none; box-shadow: 12px 0 40px rgb(0 0 0 / .12); }
  .nav .nav__close { display: inline-grid; }
  .scrim { position: fixed; inset: 0; z-index: 25; background: rgb(10 10 9 / .32); display: none; }
  .nav.is-open + .scrim { display: block; }
  .top .top__menu { display: inline-grid; margin-left: -8px; }
  .top { padding: 0 16px; }
  main { padding: 24px 16px 64px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid2, .docks { grid-template-columns: minmax(0, 1fr); }
  .inbox { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .list { position: static; max-height: none; border-right: 0; }
  .inbox.has-detail .list { display: none; }
  .inbox:not(.has-detail) .detail { display: none; }
  .detail__back { display: inline-flex; justify-self: start; }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe__stage:nth-child(3) { border-left: 0; }
  .pipe__stage:nth-child(n+3) { border-top: 1px solid var(--line); }
  .gate__row { grid-template-columns: minmax(0, 1fr) auto; }
  .gate__runs { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 560px) {
  .ws__name, .ws__sep { display: none; }
  #compose-open span { display: none; }
  #compose-open { padding: 0 10px; }
  .metric { padding: 16px; }
  .metric__v { font-size: 44px; }
  .head h1 { font-size: 40px; }
  .mails, .work { padding: 16px; }
  .detail__head { padding: 16px; }
  .cal { --label: 60px; }
}

/* hand-off queue */
.queue { list-style: none; margin: 0; padding: 0; }
.queue li + li { border-top: 1px solid var(--line); }
.queue a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px 28px; padding: 16px 20px; text-decoration: none; }
.queue a:hover { background: var(--sunk); }
.queue__t { font-weight: 500; }
.queue__s { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.queue__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.queue__note { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.cal__appt b { position: absolute; inset: 0; display: grid; place-items: center; font: 500 10.5px var(--mono); color: var(--bg); }
.more-rows { padding: 12px 20px; border-top: 1px solid var(--line); }
@media (max-width: 960px) { .queue a { grid-template-columns: minmax(0, 1fr); } }
.drawer__panel > * { min-width: 0; }
.field select, .field textarea { width: 100%; min-width: 0; }
.mail__head > span { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 961px) and (max-width: 1360px) {
  .inbox { grid-template-columns: 300px minmax(0, 1fr); }
  .detail__body { grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); }
}
