:root {
  --accent: #3E6B4F; --accent-ink: #FFFFFF; --accent-soft: #EAF2EC; --accent-strong: #2C503A;
  --spice: #B4561B; --spice-soft: #FBEFE6;
  --bg: #F5F5F4; --panel: #FFFFFF; --ink: #1B1B1F; --ink-2: #44444C; --ink-3: #6E6E78; --line: #E3E2DF; --line-2: #EFEEEB;
  --hover: #F2F1EE; --sel: #E6EFE9; --warn: #A15C07; --warn-soft: #FDF3E1; --bad: #B42318; --bad-soft: #FDECEA; --ok: #1F7A4D; --ok-soft: #E6F4EC;
  --info: #1F5FA8; --info-soft: #E8F0FA; --hl: #FFF4C2;
  --row: 34px; --font: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --shadow: none;
  --shadow-lg: 0 6.4px 14.4px rgba(0,0,0,.12), 0 1.2px 3.6px rgba(0,0,0,.1);
  color-scheme: light;
}
:root[data-density="compact"] { --row: 28px; }
:root[data-theme="dark"] {
  --bg: #161618; --panel: #1F1F22; --ink: #EDEDEF; --ink-2: #C6C6CC; --ink-3: #94949C; --line: #34343A; --line-2: #2A2A2F; --hover: #29292E;
  --sel: #24352B; --accent-soft: #22342A; --spice-soft: #3A2618; --warn-soft: #3A2C14; --bad-soft: #3D1D1A; --ok-soft: #1B3326; --info-soft: #1A2A3D; --hl: #4A4220;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { height: 100%; }
body { min-height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.suite { height: 52px; display: flex; align-items: center; gap: 16px; padding: 0 16px 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand img { height: 42px; display: block; }
:root[data-theme="dark"] .brand img { filter: brightness(1.7) saturate(.8); }
.suite-search { flex: 1; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.suite-search:focus-within { border-color: var(--accent); background: var(--panel); }
.suite-search input { flex: 1; border: 0; outline: 0; background: transparent; min-width: 0; }
.me { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 12px; font-weight: 600; }

.shell { display: flex; min-height: calc(100vh - 52px); }
.rail { width: 76px; flex: none; background: var(--panel); border-right: 1px solid var(--line); padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y: auto; }
.rail a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: 11px; text-align: center; line-height: 1.15; }
.rail a svg { width: 20px; height: 20px; }
.rail a:hover { background: var(--hover); }
.rail a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
:root[data-theme="dark"] .rail a[aria-current="page"] { color: #BFE0CB; }
.rail a[aria-current="page"]::before { content: ""; position: absolute; left: -6px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.rail .badge { position: absolute; top: 3px; right: 8px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--spice); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.rail hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 8px; width: auto; }
main { flex: 1; min-width: 0; outline: none; }

/* Home */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: calc(100vh - 52px); }
.ask-col { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 32px; gap: 20px; }
.ask-col.chatting { justify-content: flex-start; }
.ask-col h1 { margin: 0; font-size: 32px; font-weight: 600; letter-spacing: -.02em; text-align: center; }
.composer { width: 100%; max-width: 760px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.composer:focus-within { border-color: var(--accent); }
.composer textarea { border: 0; outline: 0; resize: none; background: transparent; font-size: 16px; min-height: 52px; }
.composer .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn:hover { background: var(--hover); }
a.btn { text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 760px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); font-size: 14px; }
.pill:hover { border-color: var(--accent); color: var(--ink); }
.side { border-left: 1px solid var(--line); background: var(--panel); padding: 20px 18px; display: flex; flex-direction: column; gap: 22px; overflow-y: auto; max-height: calc(100vh - 52px); position: sticky; top: 52px; }
.side h2, .section-h { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.todo { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line-2); }
.todo input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.todo .t { font-size: 13.5px; line-height: 1.35; }
.todo.done .t { text-decoration: line-through; color: var(--ink-3); }
.todo a { font-size: 12.5px; font-weight: 600; text-decoration: none; }
.mini { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); text-decoration: none; color: inherit; align-items: center; }
.mini:hover { background: var(--hover); }
.mini .who { font-weight: 600; font-size: 13px; }
.mini .what { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; }
.src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }

/* Chat */
.thread-log { width: 100%; max-width: 820px; display: flex; flex-direction: column; gap: 14px; }
.q-bubble { align-self: flex-end; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 14px 14px 4px 14px; max-width: 80%; white-space: pre-wrap; }
.a-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); line-height: 1.5; overflow-x: auto; }
.a-card h3 { font-size: 15px; margin: 10px 0 6px; }
.a-card p { margin: 6px 0; }
.a-card ul, .a-card ol { margin: 6px 0; padding-left: 20px; }
.a-card table { border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.a-card th, .a-card td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }
.a-card code { background: var(--hover); padding: 1px 4px; border-radius: 4px; font-size: 12.5px; }
.steps { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.step { display: flex; align-items: center; gap: 8px; }
.step .ic { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.step.done .ic { border-color: var(--ok); background: var(--ok); box-shadow: inset 0 0 0 2px var(--panel); }
.step.run .ic { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.step.wait { color: var(--ink-3); }
@keyframes spin { to { transform: rotate(360deg); } }
.applied { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.draft-card { border: 1px dashed var(--accent); border-radius: 10px; padding: 10px 12px; margin-top: 10px; background: var(--accent-soft); }
.draft-card pre { white-space: pre-wrap; font-family: inherit; margin: 6px 0; font-size: 13px; }

/* Page chrome */
.page { padding: 18px 22px 40px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-h h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.field { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.field input { border: 0; outline: 0; background: transparent; width: 220px; }
.field:focus-within { border-color: var(--accent); }
select.sel { height: 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 0 8px; }
.fchip { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 12.5px; color: var(--ink-2); }
.fchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kpis { display: flex; flex-wrap: wrap; gap: 8px 40px; padding: 2px 0 4px; }
.kpi { display: flex; flex-direction: column-reverse; gap: 2px; }
.kpi .v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--ink-3); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); min-width: 0; }
.card > .hd { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; flex-wrap: wrap; }
.card > .bd { padding: 12px 14px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }

/* Tables */
.tbl-wrap { overflow: auto; max-height: calc(100vh - 230px); }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th { position: sticky; top: 0; background: var(--panel); z-index: 1; text-align: left; font-weight: 600; color: var(--ink-2); padding: 0 10px; height: 34px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th button { border: 0; background: none; padding: 0; font-weight: 600; color: inherit; display: inline-flex; gap: 4px; align-items: center; }
.tbl td { padding: 0 10px; height: var(--row); border-bottom: 1px solid var(--line-2); white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl tr.hl td { background: var(--hl) !important; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.wrap { white-space: normal; min-width: 240px; }
.foot { padding: 8px 14px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); opacity: .5; flex: none; }
.tag.ok::before { background: var(--ok); opacity: 1; }
.tag.warn::before { background: var(--warn); opacity: 1; }
.tag.bad::before { background: var(--bad); opacity: 1; }
.tag.bad { color: var(--ink); }
.tag.info::before { background: var(--info); opacity: 1; }
.tag.spice { color: var(--ink-3); font-weight: 400; }
.tag.spice::before { display: none; }

/* Outlook-style inbox */
.mail { display: grid; grid-template-columns: 200px 380px minmax(0, 1fr); height: calc(100vh - 52px); }
.folders { border-right: 1px solid var(--line); background: var(--panel); padding: 12px 8px; overflow-y: auto; }
.folders h2 { font-size: 12px; text-transform: none; color: var(--ink-3); margin: 10px 8px 4px; font-weight: 600; }
.folders button { width: 100%; display: flex; gap: 10px; justify-content: space-between; align-items: center; border: 0; background: none; padding: 7px 10px; border-radius: 6px; text-align: left; font-size: 13.5px; color: var(--ink); }
.folders button:hover { background: var(--hover); }
.folders button[aria-pressed="true"] { background: var(--sel); font-weight: 600; }
.folders .n { font-size: 12px; color: var(--accent); font-weight: 700; }
.digest { margin: 14px 4px 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.mlist { border-right: 1px solid var(--line); background: var(--panel); overflow-y: auto; }
.mlist .hd { position: sticky; top: 0; background: var(--panel); padding: 12px 14px 8px; border-bottom: 1px solid var(--line); z-index: 1; }
.mlist .hd h1 { font-size: 18px; margin: 0 0 8px; }
.mitem { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line-2); background: none; padding: 9px 14px 9px 16px; position: relative; }
.mitem:hover { background: var(--hover); }
.mitem[aria-current="true"] { background: var(--sel); }
.mitem.unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.mitem .l1 { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.mitem .from { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mitem .when { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.mitem .subj { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.mitem .l3 { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.reader { overflow-y: auto; padding: 18px 24px 40px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.reader h1 { font-size: 20px; margin: 0; font-weight: 600; }
.brief { padding: 0 0 12px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; font-size: 13.5px; }
.brief .k { color: var(--ink-3); font-size: 12px; }
.msg { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.msg .mh { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.msg pre { white-space: pre-wrap; font-family: inherit; margin: 0; font-size: 14px; line-height: 1.5; }
.reply { background: var(--panel); border: 1px solid var(--accent); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.reply textarea { width: 100%; min-height: 170px; border: 1px solid var(--line); border-radius: 6px; padding: 10px; resize: vertical; background: var(--panel); line-height: 1.5; }
.empty { color: var(--ink-3); padding: 40px; text-align: center; }

/* Detail panel: Linear-style record page. Wide side panel over the list, or full page. */
.drawer { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; background: rgba(0,0,0,.12); }
.drawer[hidden] { display: none; }
.drawer .panel { width: min(1000px, 100%); height: 100%; background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; font-size: 13.5px; }
.drawer.full .panel { width: 100%; box-shadow: none; }
.drawer .ph { height: 44px; padding: 0 12px 0 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex: none; }
.crumb { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-3); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.crumb span:last-child { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.drawer .acts { display: flex; gap: 2px; }
.ib { border: 0; background: none; width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; color: var(--ink-3); }
.ib:hover, .ib[aria-pressed="true"] { background: var(--hover); color: var(--ink); }
.drawer .pb { overflow-y: auto; flex: 1; }
.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; grid-template-areas: "head side" "body side"; }
.drawer.full .dgrid { max-width: 1240px; margin: 0 auto; }
.dhead { grid-area: head; padding: 24px 28px 4px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dbody { grid-area: body; padding: 4px 28px 40px; min-width: 0; }
.dside { grid-area: side; border-left: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 18px; align-self: stretch; }
.dhead h2 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.dhead .sub { color: var(--ink-3); margin-top: -8px; }
.metrics { display: flex; flex-wrap: wrap; gap: 8px 36px; padding: 4px 0; }
.metrics > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.metrics .l { font-size: 12px; color: var(--ink-3); }
.metrics .v { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metrics .s { font-size: 12px; color: var(--ink-3); }
.blk { padding: 20px 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.blk:first-child { border-top: 0; }
.blk h3 { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.blk h4, .sheet h4 { margin: 8px 0 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.drawer .k { color: var(--ink-3); font-size: 12px; }
.lede { margin: 0; color: var(--ink-2); line-height: 1.5; }
.flag { margin: 0; color: var(--bad); font-size: 13px; }
.muted { color: var(--ink-3); }
/* Properties sidebar */
.props { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.props > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.props dt { color: var(--ink-3); font-size: 12.5px; }
.props dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); }
.props a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.props a:hover { border-color: var(--ink-3); }
select.sel.quiet { justify-self: start; width: auto; height: 26px; border-color: transparent; padding: 0 4px; margin-left: -5px; background: transparent; }
select.sel.quiet:hover, select.sel.quiet:focus { border-color: var(--line); }
.suggest { display: flex; flex-direction: column; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.suggest p { margin: 0; line-height: 1.4; }
.suggest .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.suggest details, .why { font-size: 12.5px; color: var(--ink-2); }
.suggest summary, .why summary { cursor: pointer; color: var(--ink-3); font-size: 12px; }
.suggest pre { white-space: pre-wrap; font-family: inherit; font-size: 12.5px; margin: 6px 0 0; line-height: 1.5; padding-left: 10px; border-left: 2px solid var(--line); }
.why ul { margin: 6px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; line-height: 1.45; }
/* Activity log */
.activity { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.activity li { position: relative; display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; color: var(--ink-2); line-height: 1.45; }
.activity li::before { content: ""; position: absolute; left: -18px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--panel); border: 1px solid var(--ink-3); }
.activity li.bad::before { border-color: var(--bad); background: var(--bad); }
.activity li.note .what { color: var(--ink); }
.activity time { color: var(--ink-3); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.activity a { color: var(--ink); }
.comment { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; }
.comment textarea { flex: 1; min-height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: var(--panel); resize: vertical; }
/* Artifacts */
.sheet { display: flex; flex-direction: column; gap: 8px; }
.sheet-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.sheet-h span { color: var(--ink-3); }
.sheet .tbl td, .sheet .tbl th, .docprev .tbl td, .docprev .tbl th { height: 30px; }
.tbl tr.sum td { font-weight: 600; border-top: 1px solid var(--ink-3); }
.bad-t { color: var(--bad); }
.note-line { margin: 0; font-size: 13px; color: var(--warn); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 16px; margin: 0; }
.facts dt { color: var(--ink-3); font-size: 12px; }
.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.cols { display: flex; align-items: stretch; gap: 6px; height: 140px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; font-size: 11px; }
.col b { font-weight: 500; font-size: 10.5px; color: var(--ink-3); white-space: nowrap; height: 14px; font-variant-numeric: tabular-nums; }
.col .track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--line); }
.col i { width: 100%; max-width: 22px; background: var(--ink-3); opacity: .55; border-radius: 2px 2px 0 0; }
.col.cur i { background: var(--accent); opacity: 1; }
.col.bad i { background: var(--bad); opacity: .8; }
.col.muted i { opacity: .25; }
.col.future i { opacity: .25; }
.col span { color: var(--ink-3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.stages li { border-top: 2px solid var(--line); padding-top: 6px; font-size: 12px; display: flex; flex-direction: column; color: var(--ink-3); }
.stages li b { font-weight: 500; }
.stages li.done { border-color: var(--ink-3); color: var(--ink-2); }
.stages li.cur { border-color: var(--accent); color: var(--ink); }
.stages li.cur b { font-weight: 600; }
.stages li.cur.bad { border-color: var(--bad); color: var(--bad); }
.rec { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.rec a { font-weight: 600; color: var(--ink); }
.rec span { color: var(--ink-3); font-size: 12.5px; }
.rel h4 { font-size: 12.5px; margin: 10px 0 4px; color: var(--ink-2); font-weight: 600; }
.rel h4 span { color: var(--ink-3); font-weight: 400; }
.rel .tbl-wrap { max-height: 320px; }
.rel tr[data-go], .blk tr[data-go] { cursor: pointer; }
.rel .foot { font-size: 12px; color: var(--ink-3); padding-top: 4px; }
.gauge { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-3); }
.gauge .bar { height: 6px; position: relative; overflow: visible; }
.gauge .bar b { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--ink); }
.docprev { background: #fff; color: #1b1b1f; border: 1px solid var(--line); border-radius: 2px; padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; position: relative; font-size: 13px; }
.docprev .tbl, .docprev .tbl th { background: #fff; color: #1b1b1f; }
.docprev h4 { font-size: 16px; margin: 0; color: #1b1b1f; }
.docprev p { margin: 0; line-height: 1.5; }
.docprev .k { color: #6e6e78; }
.docprev a { color: #3E6B4F; }
.docprev.draft::after { content: "DRAFT"; position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font-size: 64px; font-weight: 800; color: rgba(180, 35, 24, .10); pointer-events: none; }
.lh { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #1b1b1f; padding-bottom: 10px; font-size: 11.5px; color: #44444c; }
.lh img { height: 36px; }
@media (max-width: 760px) {
  .dgrid { grid-template-columns: 1fr; grid-template-areas: "head" "side" "body"; }
  .dhead { padding: 18px 16px 4px; }
  .dbody { padding: 4px 16px 32px; }
  .dside { border-left: 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 16px; margin-top: 12px; }
  .drawer .ph { padding-left: 16px; }
  .drawer .acts #dfull { display: none; }
  .metrics { gap: 8px 24px; }
  .stages { grid-template-columns: repeat(3, 1fr); row-gap: 10px; }
  .cols { height: 120px; gap: 3px; }
  .col b { display: none; }
}
.x { border: 0; background: none; width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; }
.x:hover { background: var(--hover); }

/* Line planner */
.seq { display: flex; flex-direction: column; }
.seq .run { display: grid; grid-template-columns: 28px 150px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.seq .no { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.bar { height: 8px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--spice); }
.barrow { display: grid; grid-template-columns: 120px 1fr 70px; gap: 10px; align-items: center; font-size: 12.5px; padding: 4px 0; }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--panel); padding: 9px 16px; border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; }
.toast.on { opacity: 1; }
.offline { background: var(--warn-soft); color: var(--warn); padding: 8px 14px; border-radius: 8px; font-size: 13px; }

@media (max-width: 1100px) {
  .home { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); }
  .mail { grid-template-columns: 1fr; height: auto; }
  .folders { display: flex; flex-wrap: wrap; gap: 4px; }
  .folders button { width: auto; }
  .folders h2, .digest { display: none; }
  .mlist { max-height: 46vh; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .suite-search { display: none; }
  .shell { flex-direction: column; }
  .rail { width: 100%; height: auto; position: static; flex-direction: row; overflow-x: auto; padding: 4px; }
  .rail a { min-width: 64px; }
  .rail hr { display: none; }
  .rail a[aria-current="page"]::before { display: none; }
  .page { padding: 14px 16px 30px; }
  .ask-col { padding: 28px 16px; }
  .ask-col h1 { font-size: 24px; }
  .field input { width: 140px; }
  .seq .run { grid-template-columns: 28px 1fr; }
}
.reader { scroll-margin-top: 60px; }
.reader.loading { opacity: .4; transition: opacity .1s; }
