/* OKCapture Workspace — base styles copied from portal/app/static/css/app.css (same design language), then workspace components. Values from tokens.css. */
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.shell { min-height: 100vh; padding: var(--page-pad); }
.topbar, .page { max-width: var(--content-max); margin: 0 auto; }
.subnav { max-width: var(--content-max); margin: 20px auto 0; }
.subnav[hidden] { display: none; }
.tabs a { color: var(--ink-2); }
.tabs a:hover:not([aria-current]) { color: var(--ink); background: var(--surface-sunken); }
.tabs a[aria-current] { color: #fff; }
.page { display: flex; flex-direction: column; gap: var(--section-gap); margin-top: 24px; }

/* ---- top bar ---- */
.topbar { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font: 600 19px/1 var(--font-display); letter-spacing: -0.02em; color: var(--accent); }
.brand { padding: 0 14px 0 0; border-radius: 22px; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a { display: flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 20px; border: 1px solid transparent; background: var(--surface-muted); }
.nav a:hover { background: var(--surface); }
.nav a[aria-current] { background: var(--surface); border-color: var(--accent); color: var(--accent); font-weight: 500; }
.ask-btn { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px 0 20px; border-radius: 22px; background: var(--accent); color: #fff; font-weight: 500; }
.ask-btn[aria-current] { background: var(--ink); }
.badge-arrow { display: flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--accent); }
.ask-btn[aria-current] .badge-arrow { color: var(--ink); }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px 48px; align-items: end; padding-top: 20px; border-top: var(--rule-hero); }
.page > .hero { margin-bottom: 26px; } /* with the page gap: 50px between the header text and the content below */
.hero-right { display: flex; flex-direction: column; gap: 14px; padding-bottom: 4px; }
.hero-right > p { margin: 0; max-width: 460px; color: var(--ink-2); }
.eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow a:hover { text-decoration: underline; }
.page-title { margin-top: 8px; }
.dim { color: var(--ink-display-grey); }
.ink-2 { color: var(--ink-2); } .ink-3 { color: var(--ink-3); }
.small { font-size: 13px; } .xsmall { font-size: 12px; }
.lead { font-size: 15px; color: var(--ink-2); margin: 0; }

/* ---- cards ---- */
.card { background: var(--surface); border-radius: var(--radius-card); padding: var(--card-pad); display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card-head .section-title { margin-top: 6px; }
.section-title.lg { font-size: 26px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); background: var(--surface); border-radius: var(--radius-card); overflow: hidden; }
.split-main { grid-column: span 2; padding: 26px 30px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.split-hl { background: var(--accent); color: #fff; padding: 14px 30px 22px; border-bottom-left-radius: var(--radius-panel-corner); display: flex; flex-direction: column; }
.split-hl .eyebrow { color: rgba(255,255,255,0.85); padding: 14px 0 4px; }
.hl-row { display: block; padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.35); }
.hl-row b { display: block; font: 400 34px/1 var(--font-display); letter-spacing: -0.03em; }
.hl-row span { display: block; margin-top: 4px; font-size: 13px; }
@media (max-width: 760px) { .split-main { grid-column: auto; } .split-hl { border-bottom-left-radius: 0; } }
.kpi-xl .of { color: var(--rule); }
.kpi-l { font: 300 56px/0.9 var(--font-display); letter-spacing: -0.04em; }
.num-panel { font: 400 30px/1 var(--font-display); letter-spacing: -0.03em; }
.card-title { font: 600 17px/1.2 var(--font-display); letter-spacing: -0.01em; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; align-items: stretch; }
.row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.between { justify-content: space-between; }
.push-right { margin-left: auto; }
.stack { display: flex; flex-direction: column; }
.rule-row { border-top: var(--rule-row); }
.scroll-x { overflow-x: auto; }

/* ---- marks ---- */
.hex { display: block; flex: none; clip-path: var(--hex-clip); }
.meter { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; flex: none; }
.meter i { display: block; width: 3px; border-radius: 1px; background: var(--meter-off); }
.meter i:nth-child(1) { height: 4px; } .meter i:nth-child(2) { height: 7px; } .meter i:nth-child(3) { height: 10px; } .meter i:nth-child(4) { height: 13px; }
.meter i.on { background: var(--ink); }
.meter.on-dark i { background: rgba(255,255,255,0.35); } .meter.on-dark i.on { background: #fff; }
.squares { display: flex; flex-wrap: wrap; gap: 4px; }
.sq { display: block; width: 14px; height: 14px; border-radius: 3px; flex: none; }
.sq.lg { width: 18px; height: 18px; border-radius: 4px; }
.sq.planned { background: transparent !important; border: 1.5px dashed var(--depth-advanced); }
.lv-4 { background: var(--depth-expert); } .lv-3 { background: var(--depth-advanced); } .lv-2 { background: var(--depth-working); } .lv-1 { background: var(--depth-aware); }
.lv-0 { background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--border); }
.dot { display: block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.disc { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.disc.lg { width: 36px; height: 36px; font-size: 13px; }
.risk-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 11px; font-size: 12px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.risk-pill.high { background: var(--risk-high); } .risk-pill.medium { background: var(--risk-medium); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 12px; border-radius: var(--radius-chip); background: var(--surface-sunken); font-size: 13px; }
a.chip:hover { background: var(--border); }
.level { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* ---- controls ---- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 22px; background: var(--surface); }
.seg.on-card { background: var(--surface-sunken); }
.seg button, .seg a { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border: 0; border-radius: 18px; background: transparent; cursor: pointer; }
.seg [aria-pressed="true"], .seg a[aria-current] { background: var(--accent); color: #fff; font-weight: 500; }
.seg.on-card [aria-pressed="true"] { background: var(--surface); color: var(--ink); }
.select { height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--border); background: var(--surface); max-width: 100%; }
.btn[hidden] { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: 22px; border: 1px solid var(--ink); background: transparent; font-weight: 500; cursor: pointer; }
.btn:hover { background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.on-blue { background: #fff; border-color: #fff; color: var(--accent); padding: 0 8px 0 20px; }
.btn.on-blue .badge-arrow { background: var(--accent); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: default; }
.link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--accent); font-weight: 500; align-self: flex-start; }
.link:hover { text-decoration: underline; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 28px; padding: 6px 6px 6px 20px; }
.search input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; font-size: 15px; outline: none; }
.search:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; } /* the focus ring goes round the whole pill, not the bare input inside it */
.search.on-card { background: var(--surface-sunken); }
/* My knowledge: search full width, the filter dropdowns below it on the right, 10px extra before the results */
.mine-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.mine-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.mine-filters #tagf:empty { display: none; }
button.link { border: 0; background: transparent; padding: 0; cursor: pointer; }
.search button { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; }

/* ---- numbered cards ---- */
.ncard { display: flex; flex-direction: column; gap: 12px; min-height: 230px; padding: 18px 20px; border: 1px solid var(--ink); border-radius: var(--radius-tile-l); transition: transform .15s ease; }
a.ncard:hover { transform: translateY(-3px); }
.ncard .top { display: flex; justify-content: space-between; align-items: flex-start; }
.ncard .no { font: 500 20px/1 var(--font-display); letter-spacing: -0.02em; }
.ncard .circle { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; }
.ncard .sub { color: var(--ink-2); font-size: 13px; }
.ncard .type { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.ncard.hot { background: var(--accent); border-color: var(--accent); color: #fff; }
.ncard.hot .circle { background: #fff; color: var(--accent); }
.ncard.hot .sub, .ncard.hot .type { color: rgba(255,255,255,0.88); }
.ncard .foot { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.ncard.hot .lv-4 { background: #fff; } .ncard.hot .lv-3 { background: rgba(255,255,255,0.7); } .ncard.hot .lv-2 { background: rgba(255,255,255,0.42); } .ncard.hot .lv-1 { background: rgba(255,255,255,0.2); }

/* ---- risk callout, notes, states ---- */
.risk-soft { background: var(--risk-soft-bg); color: var(--risk-soft-text); border-radius: var(--radius-tile-l); padding: 18px 20px; }
.risk-soft .eyebrow { color: var(--risk-soft-label); }
.note { font-size: 12px; color: var(--ink-3); margin: 0; }
.empty { padding: 40px 0; text-align: center; color: var(--ink-3); }
.error { background: var(--risk-soft-bg); color: var(--risk-soft-text); border-radius: var(--radius-tile); padding: 14px 18px; }

/* ================= workspace ================= */
.row.tight { gap: 6px 8px; } .row.end { justify-content: flex-end; } .row.nowrap, .nowrap { flex-wrap: nowrap; white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.stack.gap { gap: 14px; } .stack.gap-s { gap: 8px; } .stack.gap-l { gap: var(--section-gap); }
.page-title .muted { color: var(--ink-display-grey); }
.u { text-decoration: underline; text-underline-offset: 2px; }
.link.small { min-height: 32px; font-size: 13px; }
.me-chip { border-radius: 50%; } /* round focus ring for the round avatar */
.me-chip .disc, .disc { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }
.me-chip[aria-current="page"] .disc { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.disc.sm { width: 28px; height: 28px; font-size: 11px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-sunken); cursor: pointer; font-size: 18px; line-height: 1; }
.icon-btn:hover { background: var(--border); }
.icon-btn.sm { width: 26px; height: 26px; font-size: 15px; }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn.danger { border-color: var(--risk-high); color: #A1300A; }
.btn.danger:hover { background: var(--risk-soft-bg); }
.btn.danger-fill { background: var(--risk-high); border-color: var(--risk-high); }
.select.sm { height: 36px; padding: 0 12px; }
.select.no-arrow { appearance: none; -webkit-appearance: none; padding: 0 18px; cursor: pointer; }
.work-more { align-self: flex-start; }
.work-more[hidden] { display: none; }
.work-rows { display: flex; flex-direction: column; }
.work-rows .work-type { margin: 14px 0 8px; }
.work-rows .work-type:first-child { margin-top: 0; }
.input, .title-input, textarea { width: 100%; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 10px 14px; min-height: 44px; }
.input.sm { min-height: 34px; padding: 6px 10px; width: auto; }
.input.grow { width: auto; }
.input.date-in { width: 150px; flex: none; padding: 10px 10px; }
#new-task { flex: 1 1 240px; }
#tag-in { width: auto; flex: 1; min-width: 200px; }
textarea { resize: vertical; line-height: 1.55; font-family: var(--font-text); }
.title-input { font: 500 26px/1.2 var(--font-display); letter-spacing: -0.02em; border: 0; border-bottom: var(--rule-row); border-radius: 0; padding: 6px 0; }
.title-input:focus { outline: none; border-bottom: 2px solid var(--accent); }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 0; border-top: var(--rule-row); }
a.list-row:hover b, a.entry-row:hover .title, a.share-row:hover b { color: var(--accent); }
.entry-row, .share-row { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: var(--rule-row); }
.entry-row p, .share-row p { margin: 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip.sm { min-height: 22px; padding: 1px 9px; font-size: 12px; }
.chip.tag { background: var(--depth-aware); color: var(--accent-deep); }
.chip.label { background: var(--surface-sunken); color: var(--ink-2); }
.type-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; background: var(--surface-sunken); color: var(--ink-2); white-space: nowrap; flex: none; }
.t-howto, .t-process { background: var(--depth-aware); color: var(--accent-deep); }
.t-decision { background: var(--unit-firmware-tint); color: var(--unit-firmware-ink); }
.t-lesson { background: var(--unit-fleet-software-tint); color: var(--unit-fleet-software-ink); }
.t-document { background: var(--unit-operations-tint); color: var(--unit-operations-ink); }
.t-project { background: var(--unit-engineering-tint); color: var(--unit-engineering-ink); }
.t-system { background: var(--unit-finance-it-tint); color: var(--unit-finance-it-ink); }
.t-person { background: var(--unit-sales-tint); color: var(--unit-sales-ink); }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; white-space: nowrap; }
.badge.private { background: var(--surface-sunken); color: var(--ink-3); }
.badge.shared { background: var(--accent); color: #fff; }
.badge.pending { background: var(--depth-working); color: var(--accent-deep); }
.badge.changed, .badge.gap { background: var(--risk-soft-bg); color: var(--risk-soft-label); }
.warn-text, .gap-text { color: var(--risk-soft-label); } .ok-text { color: var(--unit-fleet-software-ink); display: flex; gap: 6px; align-items: center; }
.overdue { color: #A1300A; font-weight: 500; }
.empty { padding: 24px 0; }
.empty p { margin: 0 0 8px; }
.empty .link { align-self: center; }

/* login */
.people-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 10px; }
.person-btn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-tile); background: var(--surface); cursor: pointer; text-align: left; }
.person-btn:hover { border-color: var(--accent); }
.person-btn > span:last-child { display: flex; flex-direction: column; }

/* today */
.capture textarea { border: 0; background: var(--surface-muted); font-size: 15px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-stats a { display: flex; flex-direction: column; padding: 12px 14px; border-radius: var(--radius-tile); background: var(--surface-muted); }
.mini-stats b { font: 400 30px/1 var(--font-display); letter-spacing: -0.03em; }
.mini-stats span { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--meter-off); }
.status-dot.s-doing { background: var(--accent); }

/* editor */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .editor-grid { grid-template-columns: 1fr; } }
.editor { gap: 14px; }
.editor .seg { background: var(--surface-sunken); }
.editor .seg button { height: 32px; padding: 0 12px; font-size: 13px; }
.preview-box { min-height: 200px; padding: 6px 2px; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.steps li { display: list-item; } .steps li > input { width: calc(100% - 34px); display: inline-block; } .steps li > button { margin-left: 6px; vertical-align: middle; }
.side { position: sticky; top: 16px; }
.side .card { gap: 12px; padding: 20px 22px; }
.share-card.is-shared { box-shadow: inset 0 0 0 2px var(--accent); }

/* markdown */
.md { line-height: 1.6; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md h3, .md h4, .md h5, .md h6 { font-family: var(--font-display); margin: 18px 0 6px; letter-spacing: -0.01em; }
.md code { background: var(--surface-sunken); padding: 1px 5px; border-radius: 5px; font-size: 0.92em; }
.md pre { background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 12px; overflow-x: auto; }
.md pre code { background: none; padding: 0; color: inherit; }
.md blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--depth-working); color: var(--ink-2); }
.md a { color: var(--accent); text-decoration: underline; }

/* modal + share dialog */
.modal-wrap { position: fixed; inset: 0; background: rgba(17,18,22,0.45); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: var(--surface); border-radius: var(--radius-card); padding: 24px 28px; width: min(520px, 100%); display: flex; flex-direction: column; gap: 16px; }
.modal.wide { width: min(1040px, 100%); }
.modal-body p { margin: 0 0 12px; }
.share-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 860px) { .share-grid { grid-template-columns: 1fr; } }
.shared-preview { border: 1px solid var(--ink); border-radius: var(--radius-tile-l); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; }
.shared-preview h3 { margin: 0; font: 500 21px/1.2 var(--font-display); letter-spacing: -0.02em; }
.payload { max-height: 240px; overflow: auto; background: var(--surface-sunken); padding: 10px; border-radius: 10px; font-size: 11px; }
.opt { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.opt legend { margin-bottom: 8px; padding: 0; }
.radio { display: flex; gap: 8px; align-items: baseline; font-size: 14px; cursor: pointer; }
.radio input { flex: none; accent-color: var(--accent); }
.finding { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; font-size: 13px; }
.finding.block { background: var(--risk-soft-bg); color: var(--risk-soft-text); }
.finding.warn { background: var(--surface-sunken); }
.finding code { font-size: 12px; }
.notice { background: var(--depth-aware); padding: 14px 16px; border-radius: var(--radius-tile); }
.notice p { margin: 0; color: var(--accent-deep); }

/* tasks */
/* find field (same look as the portal's focus bar, js/focus.js there) */
.fb-solo { width: min(400px, 100%); align-self: flex-end; display: flex; flex-direction: column; gap: 10px; }
.fb-field { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 14px 8px 18px; border-radius: 28px;
  background: var(--surface-column); border: 1px solid transparent; cursor: text; transition: background-color .12s, border-color .12s, box-shadow .12s; }
.fb-field:focus-within { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.fb-icon { flex: none; color: var(--ink-3); }
.fb-field:focus-within .fb-icon { color: var(--accent); }
.fb-input { flex: 1 1 140px; min-width: 100px; height: 38px; padding: 0 4px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.fb-input::placeholder { color: var(--ink-3); }
/* Tasks: the hero uses the board's three columns, so the find field is exactly as wide as the Done column */
.hero.hero-board { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; }
.hero.hero-board > :first-child { grid-column: span 2; }
.hero.hero-board .fb-solo { width: 100%; }
@media (max-width: 860px) { .hero.hero-board { grid-template-columns: 1fr; } .hero.hero-board > :first-child { grid-column: auto; } }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 860px) { .board { grid-template-columns: 1fr; } }
.col { background: var(--surface-column); border-radius: var(--radius-card); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.task { background: var(--surface); border-radius: var(--radius-tile); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.task.open { box-shadow: inset 0 0 0 2px var(--accent); }
.task[draggable="true"] { cursor: grab; }
.task.dragging { opacity: .4; }
.col.over { box-shadow: inset 0 0 0 2px var(--accent); }
.task-title { border: 0; background: none; padding: 0; text-align: left; font-weight: 500; cursor: pointer; }
.task-title:hover { color: var(--accent); }
.task-edit { padding-top: 8px; border-top: var(--rule-row); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.strike { text-decoration: line-through; }
.progress { display: inline-block; width: 60px; height: 5px; border-radius: 3px; background: var(--meter-off); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); }

/* company */
.item-row { padding: 12px 0; border-top: var(--rule-row); }
.item-row summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.item-row summary::-webkit-details-marker { display: none; }
.item-row[open] summary { margin-bottom: 10px; }

/* my data */
.explain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.table-wrap { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 10px 6px 0; }
.ledger td { padding: 8px 10px 8px 0; border-top: var(--rule-row); vertical-align: top; }
.danger-zone { box-shadow: inset 0 0 0 1px var(--risk-medium); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 22px; z-index: 60; font-size: 14px; transition: opacity .4s ease; max-width: calc(100% - 32px); }
.toast.bad { background: #A1300A; }
.toast.out { opacity: 0; }

/* AI answer on Company knowledge search */
.ai-matches { border-top: var(--rule-row); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.ask-body .md { font-size: 15px; line-height: 1.6; }
.ask-ent { color: var(--accent-deep); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.ask-ent:hover { text-decoration-style: solid; }
.ask-sources { border-top: var(--rule-row); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.ask-sources ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.ask-meta { border-top: var(--rule-row); padding-top: 10px; }
.ask-wait { display: flex; gap: 14px; align-items: flex-start; }
.ask-pulse { display: inline-flex; gap: 4px; padding-top: 6px; flex: none; }
.ask-pulse i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: ask-pulse 1.2s ease-in-out infinite; }
.ask-pulse i:nth-child(2) { animation-delay: .15s; } .ask-pulse i:nth-child(3) { animation-delay: .3s; }
@keyframes ask-pulse { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.ask-skel { display: flex; flex-direction: column; gap: 10px; }
.ask-skel i { display: block; height: 12px; border-radius: 6px; background: var(--surface-sunken); }
.ask-skel i:nth-child(2) { width: 85%; } .ask-skel i:nth-child(3) { width: 60%; }
@media (prefers-reduced-motion: reduce) { .ask-pulse i { animation: none; opacity: .7; } }

/* topic summary (employee summary from the portal; same look as the portal's topic page, td- classes copied) */
.td-sum { gap: 10px; }
.td-sum[hidden] { display: none; }
.td-sum-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.td-sum-head h2.eyebrow { margin: 0; font-weight: 500; }
.td-sum-meta { font-size: 12px; color: var(--ink-3); }
.td-sum-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
@media (max-width: 900px) { .td-sum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .td-sum-grid { grid-template-columns: 1fr; } }
.td-sum-grid div { padding: 12px 0 4px; border-top: var(--rule-row); min-width: 0; }
.td-sum-grid dt { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.td-sum-grid dd { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.td-sum-grid dd.none { color: var(--ink-3); }
.td-sum-wait { display: grid; gap: 10px; padding: 8px 0 4px; }
.td-sum-wait span { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-sunken) 0%, var(--border) 50%, var(--surface-sunken) 100%); background-size: 200% 100%; animation: td-sum-shimmer 1.4s linear infinite; }
.td-sum-wait span:nth-child(2) { width: 86%; } .td-sum-wait span:nth-child(3) { width: 62%; }
@keyframes td-sum-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .td-sum-wait span { animation: none; } }

/* timeline under the summary: one line, one word per point */
.td-tl { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding-top: 18px; border-top: var(--rule-row); }
.td-tl[hidden] { display: none; }
.td-tl h3.eyebrow { margin: 0; font-weight: 500; }
.td-tl-key { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); }
.td-tl-key span { display: inline-flex; align-items: center; gap: 5px; }
.td-tl-key i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink-2); background: var(--surface); }
.td-tl-key i.fact { background: var(--ink-2); }
.td-tl-scroll { overflow-x: auto; overflow-y: hidden; margin: 0 -8px; padding: 0 8px; }
/* all text sits above the line on one row (label over date); today is a short blue tick. Positions are set in JS. */
.td-tl-track { position: relative; height: 66px; }
.td-tl-line { position: absolute; top: 52px; height: 2px; }
.td-tl-line.past { background: var(--ink-2); }
.td-tl-line.future { background: repeating-linear-gradient(90deg, var(--ink-faint) 0 6px, transparent 6px 11px); }
.td-tl-now { position: absolute; top: 43px; height: 20px; border-left: 2px solid var(--accent); }
.td-tl-pts { list-style: none; margin: 0; padding: 0; }
.td-tl-pt { position: absolute; top: 0; height: 100%; width: 0; }
.td-tl-txt { position: absolute; top: 12px; left: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; white-space: nowrap; line-height: 1.25; padding: 0 3px; background: var(--surface); z-index: 1; }
.td-tl-label { font-weight: 600; font-size: 12px; }
.td-tl-date { font-size: 11px; color: var(--ink-3); }
.td-tl-dot { position: absolute; top: 48px; left: -5px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink-2); background: var(--surface); }
.td-tl-pt.fact .td-tl-dot { background: var(--ink-2); }
.td-tl-pt.start .td-tl-dot, .td-tl-pt.end .td-tl-dot { top: 46px; left: -7px; width: 14px; height: 14px; border-color: var(--accent); border-width: 3px; }
.td-tl-pt.start.fact .td-tl-dot, .td-tl-pt.end.fact .td-tl-dot { background: var(--accent); }
.td-tl-pt.start .td-tl-label, .td-tl-pt.end .td-tl-label { color: var(--accent); }

.td-empty { margin: 0; padding: 12px 0 4px; color: var(--ink-3); }
