@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: block; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-400.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-500.woff2") format("woff2"); font-weight: 500; font-display: block; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-600.woff2") format("woff2"); font-weight: 600; font-display: block; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-700.woff2") format("woff2"); font-weight: 700; font-display: block; }

:root {
  --bg: #f5efe6;
  --surface: #fffdf9;
  --surface-2: #faf5ed;
  --ink: #2a2017;
  --ink-2: #66574a;
  --ink-3: #9a8a7b;
  --line: #ece2d4;
  --line-2: #ddd0bd;
  --crust: #b5562b;
  --crust-2: #964420;
  --crust-bg: #f8e7db;
  --sage: #2f7a4d;
  --sage-bg: #e2f0e6;
  --amber: #8f5a00;
  --amber-2: #c98a12;
  --amber-bg: #fcefd2;
  --side: #2b2119;
  --side-2: #3a2e24;
  --side-ink: #f3e9dc;
  --side-ink-2: #bba996;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
  --r: 14px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 18px -8px rgba(60, 40, 20, .14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; }
svg { flex: none; }
h1, h2, h3 { font-weight: 600; font-style: normal; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--crust); outline-offset: 2px; border-radius: 6px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--side) 236px, transparent 236px); }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 22px 16px 18px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px 22px; }
.logo { width: 38px; height: 38px; border-radius: 11px; background: var(--crust); display: grid; place-items: center; }
.logo svg { width: 26px; height: 26px; fill: none; stroke: #fff6ea; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.logo.sm { width: 28px; height: 28px; border-radius: 8px; }
.logo.sm svg { width: 20px; height: 20px; }
.bt { display: flex; flex-direction: column; line-height: 1.15; }
.bt b { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.bt small { font-size: 12px; color: var(--side-ink-2); }
.snav { display: flex; flex-direction: column; gap: 2px; }
.snav a { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--side-ink-2); font-weight: 500; font-size: 14.5px; }
.snav a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.snav a:hover { color: var(--side-ink); background: rgba(255, 255, 255, .05); }
.snav a.on { color: #fff; background: var(--side-2); }
.snav a.on svg { stroke: #f0a37c; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--side-2); }
.me img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.me span { display: flex; flex-direction: column; line-height: 1.2; }
.me b { font-size: 13.5px; font-weight: 600; }
.me small { font-size: 12px; color: var(--side-ink-2); }
.built { display: flex; align-items: center; gap: 8px; padding: 0 6px; font-size: 11.5px; line-height: 1.25; color: var(--side-ink-2); }
.built img { width: 40px; height: 40px; object-fit: contain; }

.main { padding: 30px 36px 48px; min-width: 0; max-width: 1360px; }

/* ---------- buttons, pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 13.5px; white-space: nowrap; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); transition: background .15s, border-color .15s; }
.btn svg { width: 15px; height: 15px; fill: currentColor; }
.btn:hover { border-color: var(--ink-3); }
.btn-run { background: var(--ink); color: #fff8ef; border-color: var(--ink); }
.btn-run:hover { background: #45362a; border-color: #45362a; }
.btn-amber { background: var(--amber-2); border-color: var(--amber-2); color: #241500; }
.btn-ok { background: var(--sage); border-color: var(--sage); color: #fff; }
.btn-ok:hover { background: #276841; }
.btn[disabled], .btn.busy { opacity: .5; cursor: default; pointer-events: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.p-on { background: var(--sage-bg); color: var(--sage); }
.p-wait { background: var(--amber-bg); color: var(--amber); }
.p-paused { background: #ede6dc; color: var(--ink-2); }
.p-paused::before { border-radius: 1px; width: 6px; height: 8px; background: none; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.chip svg { width: 15px; height: 15px; fill: none; stroke: var(--crust); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- index ---------- */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.eyebrow { font-size: 12.5px; font-weight: 600; color: var(--crust-2); letter-spacing: .04em; text-transform: uppercase; }
.top h1 { font-family: var(--serif); font-size: 40px; line-height: 1.1; letter-spacing: -.02em; margin: 4px 0 6px; }
.sub { color: var(--ink-2); font-size: 15px; }
.sub b { color: var(--ink); font-weight: 600; }
.kpis { display: flex; gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 16px; min-width: 150px; display: flex; flex-direction: column; line-height: 1.2; }
.kpi small { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.kpi b { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 3px 0 2px; }
.kpi span { font-size: 12px; color: var(--ink-2); }

.waiting { display: flex; align-items: center; gap: 14px; padding: 13px 14px 13px 16px; border-radius: var(--r); background: var(--amber-bg); border: 1px solid #f0d79e; margin-bottom: 26px; }
.waiting:hover { border-color: var(--amber-2); }
.w-ic { width: 36px; height: 36px; border-radius: 50%; background: #fff6df; display: grid; place-items: center; }
.w-ic svg { width: 20px; height: 20px; fill: none; stroke: var(--amber); stroke-width: 1.9; stroke-linecap: round; }
.w-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.w-tx b { font-weight: 600; font-size: 14.5px; }
.w-tx small { color: #7a5a22; font-size: 13px; }
.waiting.gone { display: none; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 28px; align-items: start; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sec-h h2 { font-family: var(--serif); font-size: 19px; letter-spacing: -.01em; }
.sec-h .muted { font-size: 13px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.row { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px 118px auto; gap: 14px; align-items: center; padding: 15px 18px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row:first-child:hover { border-radius: var(--r) var(--r) 0 0; }
.row:last-child:hover { border-radius: 0 0 var(--r) var(--r); }
.r-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--crust-bg); }
.r-ic svg { width: 22px; height: 22px; fill: none; stroke: var(--crust-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.row.paused .r-ic { background: #efe8de; }
.row.paused .r-ic svg { stroke: var(--ink-3); }
.r-main { min-width: 0; }
.r-name { font-weight: 600; font-size: 15px; display: block; }
.r-name::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.r-does { color: var(--ink-2); font-size: 13px; max-width: 520px; margin: 1px 0 5px; }
.r-last { display: flex; flex-direction: column; font-size: 12.5px; line-height: 1.3; }
.r-last b { font-weight: 600; font-size: 13px; }
.r-last .ok { color: var(--sage); }
.r-last .wait { color: var(--amber); }
.r-last small { color: var(--ink-3); font-size: 12px; }
.row .btn { position: relative; z-index: 1; }
.feed { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 8px; }
.feed .sec-h { margin-bottom: 6px; }
.feed-l { list-style: none; }
.feed-l li { border-top: 1px solid var(--line); }
.feed-l li:first-child { border-top: 0; }
.feed-l a { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; padding: 10px 0; min-height: 44px; }
.feed-l a:hover .f-t { color: var(--crust-2); }
.f-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; background: var(--sage); }
.f-dot.wait { background: var(--amber-2); }
.f-dot.retry { background: #c97a2e; box-shadow: 0 0 0 2px #f6dcc0; }
.f-t, .f-m { display: block; }
.f-t { font-weight: 500; font-size: 13.5px; line-height: 1.3; }
.f-m { font-size: 12px; color: var(--ink-3); }

/* ---------- run page ---------- */
.crumbs { margin-bottom: 14px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; margin: -12px 0 -6px -6px; padding: 0 6px; }
.crumbs svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.crumbs a:hover { color: var(--ink); }
.a-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.a-head .r-ic { width: 52px; height: 52px; border-radius: 14px; }
.a-head .r-ic svg { width: 26px; height: 26px; }
.ah-t { flex: 1; min-width: 0; }
.ah-t h1 { font-family: var(--serif); font-size: 32px; line-height: 1.1; letter-spacing: -.02em; }
.ah-t p { color: var(--ink-2); font-size: 15px; margin: 4px 0 8px; max-width: 640px; }
.ah-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.a-head .btn { min-height: 44px; padding: 0 20px; font-size: 14px; }

.run-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.run { min-width: 0; }
.run-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.rb-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rb-l b { font-weight: 600; font-size: 15px; display: block; }
.rb-l small { color: var(--ink-3); font-size: 12.5px; }
.rb-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--crust); box-shadow: 0 0 0 4px var(--crust-bg); animation: pulse 1.2s ease-in-out infinite; }
.run-bar.wait .rb-dot { background: var(--amber-2); box-shadow: 0 0 0 4px var(--amber-bg); }
.run-bar.done .rb-dot { background: var(--sage); box-shadow: 0 0 0 4px var(--sage-bg); animation: none; }
.run-bar.stopped .rb-dot { background: var(--ink-3); box-shadow: 0 0 0 4px #ede6dc; animation: none; }
@keyframes pulse { 50% { transform: scale(.7); } }
.elapsed { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.rb-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); }
.rb-prog i { display: block; height: 100%; width: 0; background: var(--crust); transition: width .3s linear; }
.run-bar.wait .rb-prog i { background: var(--amber-2); }
.run-bar.done .rb-prog i { background: var(--sage); }

.tl { list-style: none; position: relative; }
.st { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding-bottom: 16px; animation: rise .35s ease-out both; }
.st::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 2px; width: 2px; background: var(--line-2); border-radius: 2px; }
.st:last-child::before { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.st-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-2); position: relative; z-index: 1; }
.st-ic svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; display: none; }
.st.running .st-ic { border-color: var(--crust); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.st.done .st-ic { background: var(--sage); border-color: var(--sage); }
.st.done .st-ic svg { display: block; }
.st.wait .st-ic { background: var(--amber-bg); border-color: var(--amber-2); }
.st.skip .st-ic { background: #ede6dc; border-color: var(--line-2); }
.st-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.st.wait .st-card { border-color: #eccf8c; background: #fffaf0; box-shadow: 0 0 0 4px rgba(201, 138, 18, .1); }
.st-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.st-t { font-weight: 600; font-size: 15px; line-height: 1.3; }
.st.running .st-t { color: var(--ink-2); }
.st-time { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.st-s { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.st-pv { margin-top: 12px; }
.st-pv:empty { display: none; }

/* previews */
.pv { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); overflow: hidden; animation: rise .35s ease-out both; }
.pv-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-3); font-weight: 500; }
.pv-h a { color: var(--crust-2); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; min-height: 32px; }
.pv-h a:hover { text-decoration: underline; }
.mini { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; padding: 14px; background: var(--surface); }
.mini-k small { display: block; font-size: 11.5px; color: var(--ink-3); }
.mini-k b { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -.01em; display: block; line-height: 1.15; }
.up { color: var(--sage); font-weight: 600; font-size: 12.5px; }
.mini-k p { font-size: 12px; color: var(--ink-2); margin-top: 8px; line-height: 1.4; }
.mini-bars { display: flex; align-items: flex-end; gap: 8px; height: 104px; padding-top: 6px; }
.mini-bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.mini-bars i { display: block; width: 100%; max-width: 30px; background: var(--crust); border-radius: 4px 4px 0 0; height: 0; transition: height .7s cubic-bezier(.2, .8, .2, 1); }
.mini-bars span { font-size: 11px; color: var(--ink-3); }
.mail { background: var(--surface); }
.mail-h { padding: 12px 14px 10px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 2px 8px; font-size: 13px; }
.mail-h dt { color: var(--ink-3); }
.mail-h dd { min-width: 0; overflow-wrap: anywhere; }
.mail-h .subj { font-weight: 600; }
.mail-b { padding: 12px 14px 14px; font-size: 13.5px; line-height: 1.55; white-space: pre-line; min-height: 3em; }
.mail-b .caret { display: inline-block; width: 2px; height: 1em; background: var(--crust); vertical-align: -2px; margin-left: 1px; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.attach { display: inline-flex; align-items: center; gap: 10px; margin: 0 14px 14px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 13px; min-height: 44px; }
.attach:hover { border-color: var(--crust); }
.attach i { width: 28px; height: 32px; border-radius: 5px; background: var(--crust-bg); display: grid; place-items: center; font-style: normal; color: var(--crust-2); font-weight: 700; font-size: 10px; }
.attach b { font-weight: 600; display: block; }
.attach small { color: var(--ink-3); font-size: 11.5px; }
.req { background: var(--surface); padding: 12px 14px; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.req img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.req b { font-weight: 600; }
.req p { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }
.req dl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.req dd { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 12px; background: var(--surface); }
.cal div { border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px 7px; text-align: center; font-size: 11.5px; color: var(--ink-3); }
.cal b { display: block; font-size: 15px; color: var(--ink); font-weight: 600; }
.cal .dots { display: flex; justify-content: center; gap: 2px; margin-top: 4px; flex-wrap: wrap; }
.cal .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.cal .dots i.f { background: var(--crust); }
.cal .pick { border-color: var(--crust); background: var(--crust-bg); color: var(--crust-2); }
.cal .closed { background: var(--surface-2); }
.sms { background: var(--surface); padding: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sms small { font-size: 11.5px; color: var(--ink-3); }
.bubble { max-width: 420px; background: #e9eef6; color: #1d2733; padding: 10px 13px; border-radius: 16px 16px 16px 4px; font-size: 13.5px; line-height: 1.45; }
.ptable { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 13px; }
.ptable th, .ptable td { padding: 8px 12px; text-align: left; border-top: 1px solid var(--line); }
.ptable thead th { border-top: 0; font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.ptable td.n, .ptable th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ptable tfoot td { font-weight: 700; }
.ptable tr.dl-row td { color: var(--ink-2); font-weight: 500; }
.approve { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.approve .btn { min-height: 44px; padding: 0 20px; font-size: 14px; }
.approve .hint { font-size: 12.5px; color: var(--ink-3); flex-basis: 100%; }

.summary { margin: 4px 0 0 44px; padding: 16px 18px; border-radius: var(--r); background: var(--sage-bg); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; animation: rise .4s ease-out both; }
.summary.stopped { background: #efe8de; border-color: var(--line-2); }
.sum-big { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; }
.summary ul { list-style: none; font-size: 13.5px; color: #24563a; }
.summary.stopped ul { color: var(--ink-2); }
.summary li::before { content: "\2713"; margin-right: 7px; font-weight: 700; }
.summary.stopped li::before { content: "\2013"; }
.sum-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.run-side { display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card h2 { font-family: var(--serif); font-size: 17px; margin-bottom: 8px; }
.hist { list-style: none; }
.hist li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); align-items: baseline; }
.hist li:first-child { border-top: 0; }
.hist li.new { animation: flash 2.4s ease-out; border-radius: 8px; }
@keyframes flash { 0%, 40% { background: var(--sage-bg); } }
.hist .f-dot { margin-top: 0; align-self: center; }
.hist .f-dot.skip { background: var(--ink-3); }
.h-w { font-size: 13px; font-weight: 500; }
.h-w .new-tag { font-size: 11px; font-weight: 700; color: var(--sage); margin-left: 6px; }
.h-n { font-size: 12px; color: var(--ink-3); display: block; }
.h-d { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.howto { padding-left: 20px; font-size: 13.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.howto li::marker { color: var(--crust); font-weight: 700; }
.facts { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; font-size: 13px; }
.facts dt { color: var(--ink-3); }

/* ---------- report ---------- */
.main-doc { max-width: 1100px; }
.doc { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 40px 44px 30px; max-width: 920px; }
.doc-h { border-bottom: 2px solid var(--ink); padding-bottom: 18px; margin-bottom: 22px; }
.doc-brand { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--crust-2); }
.doc-h h1 { font-family: var(--serif); font-size: 42px; letter-spacing: -.02em; line-height: 1.05; margin: 14px 0 6px; }
.doc-range { font-size: 16px; font-weight: 500; }
.doc-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.doc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 30px; }
.dk { border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; }
.dk small { font-size: 12px; color: var(--ink-3); font-weight: 500; display: block; }
.dk b { font-family: var(--serif); font-size: 27px; font-weight: 600; letter-spacing: -.01em; display: block; line-height: 1.2; margin: 2px 0; }
.dk span { font-size: 12px; color: var(--ink-2); }
.dk .up { font-size: 12px; }
.dk.lead { background: var(--crust-bg); border-color: #efcdb6; }
.doc-sec { margin-bottom: 28px; min-width: 0; }
.ds-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ds-h h2 { font-family: var(--serif); font-size: 19px; letter-spacing: -.01em; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar { width: 12px; height: 12px; border-radius: 3px; background: var(--crust); display: inline-block; }
.lg-tick { width: 16px; height: 0; border-top: 2.5px solid var(--ink); display: inline-block; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .ax { font-size: 12px; fill: var(--ink-3); font-family: var(--sans); }
.chart .axd { font-size: 13px; fill: var(--ink); font-weight: 600; font-family: var(--sans); }
.chart .bar { fill: var(--crust); }
.chart .prev { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.chart .lbl { font-size: 12.5px; font-weight: 700; fill: var(--ink); font-family: var(--sans); }
.chart .hit { fill: transparent; cursor: default; }
.chart g.d:hover .bar, .chart g.d.on .bar { fill: var(--crust-2); }
.chart g.d:focus { outline: none; }
.chart g.d:focus-visible .hit { stroke: var(--crust); stroke-width: 2; }
.tip { position: fixed; z-index: 10; pointer-events: none; background: var(--ink); color: #fff8ef; border-radius: 10px; padding: 9px 12px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); min-width: 170px; }
.tip b { display: block; font-size: 13px; margin-bottom: 2px; }
.tip .tr { display: flex; justify-content: space-between; gap: 14px; }
.tip .tr span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; }
.tbl th, .tbl td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.tbl thead th { font-size: 12px; color: var(--ink-3); font-weight: 500; border-bottom: 1px solid var(--line-2); }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink); }
.tbl .up, .tbl .down { font-size: 12.5px; }
.down { color: #a3402a; font-weight: 600; }
.doc-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.cat { display: grid; grid-template-columns: 118px minmax(0, 1fr) 128px; gap: 10px; align-items: center; padding: 7px 0; font-size: 13.5px; }
.cat-b { height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.cat-b i { display: block; height: 100%; background: var(--crust); border-radius: 0 4px 4px 0; }
.cat .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat .n small { color: var(--ink-3); margin-left: 4px; }
.cat-tot { display: flex; justify-content: space-between; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.notes ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.notes li { padding-left: 16px; position: relative; }
.notes li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--crust); }
.notes b { color: var(--ink); font-weight: 600; }
.doc-f { border-top: 1px solid var(--line); padding-top: 14px; font-size: 12px; color: var(--ink-3); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .run-cols { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: 44px minmax(0, 1fr) 170px auto; }
  .row .pill-cell { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { position: sticky; top: 0; z-index: 5; height: auto; flex-direction: row; align-items: center; padding: 8px 12px 8px 14px; gap: 6px; }
  .brand { padding: 0; margin-right: auto; gap: 9px; }
  .logo { width: 34px; height: 34px; }
  .bt b { font-size: 17px; }
  .bt small { display: none; }
  .snav { flex-direction: row; gap: 2px; }
  .snav a { padding: 0 11px; gap: 7px; font-size: 14px; }
  .side-foot { display: none; }
  .main { padding: 20px 16px 40px; }
  .top { flex-direction: column; align-items: stretch; gap: 14px; }
  .top h1 { font-size: 32px; }
  .kpis .kpi { flex: 1; min-width: 0; }
  .waiting { align-items: flex-start; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 22px; }
  .waiting .w-tx { flex-basis: calc(100% - 50px); }
  .waiting .btn { margin-left: 48px; min-height: 44px; }
  .row { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; padding: 14px; align-items: start; }
  .r-ic { width: 40px; height: 40px; }
  .r-last { grid-column: 2; flex-direction: row; flex-wrap: wrap; gap: 0 6px; margin-top: 2px; }
  .r-last small::before { content: "· "; }
  .row .pill-cell { display: none; }
  .row .btn { grid-column: 2; justify-self: start; min-height: 44px; margin-top: 8px; }
  .a-head { flex-wrap: wrap; gap: 12px 14px; }
  .a-head .r-ic { width: 44px; height: 44px; }
  .ah-t { flex-basis: calc(100% - 60px); }
  .ah-t h1 { font-size: 26px; }
  .a-head .btn { width: 100%; }
  .run-bar { padding: 12px 14px 14px; }
  .st { grid-template-columns: 26px minmax(0, 1fr); gap: 10px; }
  .st::before { left: 12px; top: 26px; }
  .st-ic { width: 26px; height: 26px; }
  .st-top { flex-direction: column; gap: 0; }
  .mini { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mini-bars { height: 84px; }
  .summary { margin-left: 0; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sum-act { justify-content: flex-start; }
  .sum-act .btn { min-height: 44px; }
  .doc { padding: 24px 18px 20px; border-radius: 12px; }
  .doc-h h1 { font-size: 34px; }
  .doc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dk b { font-size: 23px; }
  .doc-2 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cat { grid-template-columns: 96px minmax(0, 1fr) 112px; gap: 8px; font-size: 13px; }
  .tbl { font-size: 13px; }
  .tbl th, .tbl td { padding: 8px 6px; }
  .tbl .hide-s { display: none; }
}
@media (max-width: 400px) {
  .snav a span { font-size: 13.5px; }
  .snav a { padding: 0 9px; }
  .cal { gap: 3px; padding: 10px 8px; }
  .cal div { padding: 5px 1px 6px; font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* mr-bill inside: "Running on its own", changes it made, a row running in place */
.mb-chat { --mb-accent: #b5562b; }
.feedc { padding: 12px 14px; margin-bottom: 22px; }
.run-side .feedc, .main-doc .feedc { margin-bottom: 16px; }
.main-doc .feedc { max-width: 920px; }
.feedc .mb-feed-list li { background: var(--surface-2); }
.feedc .mb-ico { background: var(--crust-bg); color: var(--crust-2); }
@media (min-width: 1181px) { .main > .feedc .mb-feed-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chip.added { background: var(--sage-bg); color: var(--sage); padding: 2px 9px; border-radius: 999px; white-space: normal; margin-left: 6px; }
.r-main .chip.added { margin: 6px 0 0; }
.row.running { border-color: var(--amber-2); box-shadow: 0 0 0 3px var(--amber-bg); }
.row.running .r-last b.wait { color: var(--amber); }
.tbl tr.flag td { background: var(--crust-bg); }
.notes li.added b { color: var(--crust-2); }
@media (max-width: 380px) { .snav a svg { display: none; } .snav a { padding: 0 8px; } }
