/* Kynex Energies team workspace (server-rendered pages). Colours come only from the shared
   theme (/assets/theme.css, source shared/theme.css); these are local aliases of its --kx-*
   tokens. Arial only; no external assets. */
:root {
  --orange: var(--kx-accent);
  --cream: var(--kx-surface-muted);
  --cyan: var(--kx-selected);
  --black: var(--kx-ink);
  --white: var(--kx-surface);
  --navy: var(--kx-ink);
  --gray: var(--kx-ink-muted);
  --canvas: var(--kx-canvas);
  --line: var(--kx-line-soft);
  --line-strong: var(--kx-line);
  --muted: var(--kx-ink-muted);
  --shadow: 0 1px 2px color-mix(in srgb, var(--kx-ink) 5%, transparent), 0 2px 8px color-mix(in srgb, var(--kx-ink) 4%, transparent);
  --shadow-hover: 0 2px 4px color-mix(in srgb, var(--kx-ink) 6%, transparent), 0 8px 20px color-mix(in srgb, var(--kx-ink) 8%, transparent);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: 256px;
  --content: 1280px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--navy); font: 15px/1.55 Arial, Helvetica, sans-serif; }
body.public { display: grid; min-height: 100vh; place-items: start center; background: var(--canvas); }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Underline only links inside running text; components (nav, tabs, buttons, rows) stay clean. */
p a, dd a, td a, .summary li a, .body li a, .notice a, .more li a, .item li a { text-decoration: underline; text-decoration-color: var(--kx-line); text-underline-offset: 3px; }
p a:hover, dd a:hover, td a:hover { text-decoration-color: var(--navy); }
.btn, .btn:hover, .nav-item, .nav-item:hover, .tabs a, .segmented a, .tile, .tile:hover, .brand, .card-link, .link-list a, .account-name, .crumbs a { text-decoration: none; }
.link-list a:hover .ic, .tile:hover .tile-link { transform: translateX(2px); }
.card-link:hover, .link-list a:hover, .crumbs a:hover, .account-name:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--kx-focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: 1.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; margin-top: 1.4em; }
h3 { font-size: 1.02rem; margin-top: 1.1em; }
h4 { font-size: 0.95rem; margin-top: 1em; }
p, ul, ol { max-width: 76ch; }
p { color: var(--black); }
ul, ol { padding-left: 1.3em; color: var(--black); }
li { margin: 0.2em 0; }
code { font-family: Arial, Helvetica, sans-serif; background: var(--cream); padding: 0 0.3em; border-radius: 4px; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--white); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
details.small > summary { cursor: pointer; color: var(--muted); font-weight: bold; }
.hint { color: var(--muted); font-size: 0.86rem; margin: 4px 0 0; }
.ic { flex: none; width: 20px; height: 20px; }
.ic-sm { width: 16px; height: 16px; }

/* ---------- app shell ---------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--white); border-right: 1px solid var(--line); }
.sidebar-inner { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 20px 14px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; padding: 4px 8px; }
.brand:hover { text-decoration: none; }
.brand-mark { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1rem; }
.brand-text span { font-size: 0.76rem; color: var(--muted); }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-heading { margin: 14px 12px 6px; font-size: 0.72rem; font-weight: bold; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--gray); font-weight: bold; font-size: 0.94rem; }
.nav-item:hover { background: var(--cream); color: var(--navy); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--kx-selected); color: var(--kx-ink); box-shadow: inset 3px 0 0 var(--kx-selected-ink); font-weight: bold; }
.account-card { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--white); font-weight: bold; font-size: 0.86rem; }
.account-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.account-name { font-weight: bold; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-role { font-size: 0.78rem; color: var(--muted); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; color: var(--gray); cursor: pointer; }
.icon-btn:hover { background: var(--cream); color: var(--navy); }
.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 32px; background: color-mix(in srgb, var(--kx-canvas) 94%, transparent); border-bottom: 1px solid var(--line); }
.brand-mobile { display: none; }
.topsearch { position: relative; flex: 1; max-width: 520px; }
.topsearch .search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.topsearch input { padding-left: 40px; background: var(--white); border-radius: 999px; }
.menu { display: none; }
.content { width: 100%; max-width: calc(var(--content) + 64px); margin: 0 auto; padding: 28px 32px 64px; }
main.narrow { width: 100%; max-width: 440px; padding: 56px 16px; }

/* ---------- page header and tabs ---------- */
.page-head { margin-bottom: 22px; }
.page-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 4px; }
.lead { color: var(--gray); margin: 0; font-size: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumbs { margin: 0 0 6px; font-size: 0.88rem; }
.crumbs a { color: var(--muted); }
.crumbs a::before { content: "← "; }
.tabs { margin-top: 18px; border-bottom: 1px solid var(--line-strong); }
.tabs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; overflow-x: auto; max-width: none; }
.tabs li { margin: 0; flex: none; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 2px; color: var(--gray); font-weight: bold; font-size: 0.92rem; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--navy); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--orange); }
.tab-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--cream); color: var(--gray); font-size: 0.75rem; }
.section-title { font-size: 1rem; color: var(--gray); margin: 26px 0 12px; }
.section-note { color: var(--gray); margin: 0 0 8px; }

/* ---------- controls ---------- */
input, select, textarea { font: inherit; color: var(--black); background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 12px; min-height: 42px; width: 100%; }
input:hover, select:hover, textarea:hover { border-color: var(--kx-input); }
textarea { min-height: 80px; resize: vertical; }
input[readonly] { background: var(--cream); }
label { font-weight: bold; font-size: 0.88rem; color: var(--navy); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.field.grow { flex: 1 1 260px; }
.actions-field { flex-direction: row; align-items: end; gap: 8px; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--white); color: var(--navy); font: inherit; font-weight: bold; font-size: 0.92rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--cream); text-decoration: none; }
.btn .ic { width: 18px; height: 18px; }
.btn.primary, .btn-primary { background: var(--orange); border-color: var(--orange); color: var(--black); }
.btn.primary:hover, .btn-primary:hover { background: color-mix(in srgb, var(--kx-accent) 88%, var(--kx-surface)); }
.btn-secondary { border-color: var(--navy); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--cream); }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: 0.85rem; }
.btn.wide { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; font: inherit; cursor: pointer; }
.inline { display: inline; }
.stack { display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin: 12px 0 16px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 8px; }
.toolbar-note { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--gray); font-size: 0.88rem; }
.segmented { display: inline-flex; padding: 3px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; }
.segmented a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; color: var(--gray); font-weight: bold; font-size: 0.9rem; }
.segmented a:hover { text-decoration: none; color: var(--navy); }
.segmented a[aria-current="page"] { background: var(--navy); color: var(--white); }
.segmented a[aria-current="page"] .tab-count { background: color-mix(in srgb, var(--kx-surface) 18%, transparent); color: var(--white); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.caption { color: var(--muted); font-size: 0.86rem; margin: 8px 0; }

/* ---------- cards ---------- */
.card, .panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin: 0 0 20px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-title, .panel h2:first-child { font-size: 1rem; margin: 0 0 12px; }
.card-link { font-size: 0.86rem; font-weight: bold; }
.list-card { padding: 18px 20px 8px; }
details.card > summary, details.more > summary, details.terms > summary, details.attach > summary { cursor: pointer; font-weight: bold; color: var(--navy); }
details.card { padding: 16px 22px; }
details.card[open] > summary { margin-bottom: 12px; }
details.more:not(.card) { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px; margin: 10px 0; background: var(--white); }
details.more:not(.card) > summary { padding: 10px 0; }
details.terms { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px; margin: 10px 0; background: var(--cream); }
details.terms > summary { padding: 10px 0; }
details.terms dl { margin: 0 0 10px; }
details.terms dt { font-weight: bold; }
details.terms dd { margin: 0 0 8px; max-width: 72ch; color: var(--black); }
details.attach { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 10px; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; margin: 0 0 20px; background: var(--cyan); border-radius: var(--radius); color: var(--navy); }
.callout p { margin: 0; color: var(--navy); font-size: 0.92rem; }

/* tiles (overview) */
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 20px; }
.tile { display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--navy); transition: box-shadow 0.15s, transform 0.15s; }
.tile:hover { text-decoration: none; box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.tile-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; margin-bottom: 6px; }
.tile-quotes .tile-icon { background: var(--cyan); color: var(--navy); }
.tile-funding .tile-icon { background: var(--navy); color: var(--white); }
.tile-documents .tile-icon { background: var(--cream); color: var(--orange); border: 1px solid var(--kx-accent-soft-strong); }
.tile-title { font-size: 1.1rem; font-weight: bold; }
.tile-text { color: var(--gray); font-size: 0.92rem; }
.tile-link { display: inline-flex; align-items: center; gap: 6px; font-weight: bold; font-size: 0.9rem; color: var(--navy); margin-top: 8px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-areas: "updates next" "updates docs"; gap: 0 20px; align-items: start; }
.dash-updates { grid-area: updates; }
.dash-next { grid-area: next; }
.dash-docs { grid-area: docs; }

/* row lists */
.row-list { list-style: none; padding: 0; margin: 0; max-width: none; }
.row-list > .row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); margin: 0; }
.row-list > .row:first-child { border-top: 0; }
.row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-main > a { font-weight: bold; color: var(--navy); text-decoration: none; }
.row-main > a:hover { text-decoration: underline; }
.row-sub { color: var(--muted); font-size: 0.86rem; margin-top: 2px; }
.row-amount { font-weight: bold; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-muted .row-main > a, .row-muted .row-amount { color: var(--gray); }
.row-selected { background: var(--kx-accent-soft); margin: 0 -12px !important; padding-left: 12px !important; padding-right: 12px !important; border-radius: var(--radius-sm); }
.row-update { align-items: flex-start; }
.date-chip { flex: none; min-width: 92px; font-size: 0.8rem; font-weight: bold; color: var(--gray); padding-top: 2px; }
.file-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--cream); color: var(--orange); }
.link-list { list-style: none; padding: 0; margin: 0 0 8px; max-width: none; }
.link-list li { border-top: 1px solid var(--line); margin: 0; }
.link-list li:first-child { border-top: 0; }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; font-weight: bold; text-decoration: none; }

/* offers (quotes) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-bottom: 20px; }
.offer-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.offer-card:hover { box-shadow: var(--shadow-hover); }
.offer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.offer-meta { margin: 6px 0 4px; color: var(--muted); font-size: 0.86rem; }
.offer-id { flex: 1; min-width: 0; }
.offer-id h3 { margin: 0; font-size: 1.05rem; }
.offer-id h3 a { color: var(--navy); }
.offer-id { display: flex; align-items: center; gap: 12px; }
.offer-amount { margin: 4px 0 0; font-size: 1.6rem; font-weight: bold; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.offer-tax { margin: 0; font-size: 0.86rem; font-weight: bold; color: var(--gray); }
.offer-scope { margin: 4px 0 8px; font-size: 0.92rem; color: var(--black); flex: 1; }
.offer-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.mono { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; font-weight: bold; font-size: 1.05rem; }
.mono-navy { background: var(--navy); color: var(--white); }
.mono-orange { background: var(--orange); color: var(--black); }
.mono-cyan { background: var(--cyan); color: var(--navy); }
.mono-gray { background: var(--cream); color: var(--gray); border: 1px solid var(--line-strong); }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.summary-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.stat-card .mono { margin-bottom: 6px; }
.stat-label { margin: 0; font-size: 0.84rem; color: var(--muted); font-weight: bold; }
.stat-value { margin: 0; font-size: 1.55rem; font-weight: bold; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat-text { margin: 0; font-size: 1.02rem; font-weight: bold; color: var(--navy); }
.stat-sub { margin: 0; font-size: 0.84rem; color: var(--muted); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 12px 0; }
.facts div { display: contents; }
.facts dt { color: var(--muted); font-weight: bold; font-size: 0.88rem; }
.facts dd { margin: 0; color: var(--black); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.group-name { font-weight: bold; }
.row-notes { margin-top: 4px; font-weight: normal; }
.row-notes summary { font-size: 0.8rem; color: var(--muted); cursor: pointer; }
.row-notes p { font-size: 0.86rem; margin: 6px 0; max-width: 60ch; }

/* items (answers) */
.item { padding: 4px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; scroll-margin-top: 80px; }
.item:last-of-type { border-bottom: 0; }
.item.compact h2, .item.compact h3 { margin-top: 1.1em; }
.summary p:first-child { margin-top: 0; }
.question { color: var(--gray); font-style: italic; }
.meta, .claim-meta { color: var(--muted); font-size: 0.86rem; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.src-inline a { overflow-wrap: anywhere; }
.page-ref { white-space: nowrap; }
.source-block h4 { margin-bottom: 4px; }
.sources { margin: 0; font-size: 0.92rem; }
.toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 20px; margin: 12px 0 8px; }
.toc-title { font-size: 1rem; margin: 0 0 6px; }
.toc ol { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 3px solid var(--cyan); padding: 2px 0 12px 14px; margin: 0; }
.actions, .quick { padding-left: 1.1em; }
.two-col { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); border-left: 4px solid var(--navy); background: var(--cyan); margin: 12px 0; max-width: 84ch; color: var(--navy); }
.notice ul { margin: 6px 0 0; }
.notice-warn { border-left-color: var(--orange); background: var(--cream); }
.notice-error { border: 1px solid var(--orange); border-left-width: 4px; background: var(--white); }
.notice-ok { border-left-color: var(--navy); background: var(--cyan); }
.preview-banner { position: sticky; top: 64px; z-index: 10; background: var(--cream); border: 2px dashed var(--orange); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }
.preview-banner p { margin: 0 0 6px; }
.preview-banner .cta-row { margin: 0; }
.checks { background: var(--cream); padding: 10px 16px; border-radius: var(--radius-sm); margin: 12px 0; }
.hash { font-size: 0.8rem; color: var(--muted); }
.pending-change { margin-top: 6px; padding: 6px 8px; border-left: 3px solid var(--orange); background: var(--cream); font-size: 0.85rem; }
.invite-link { display: block; padding: 8px; background: var(--white); user-select: all; }

/* ---------- badges ---------- */
.badge, .pill { display: inline-flex; align-items: center; font-size: 0.75rem; line-height: 1.3; padding: 3px 10px; border-radius: 999px; border: 1px solid transparent; background: var(--cream); color: var(--gray); white-space: nowrap; font-weight: bold; }
.badge-official_rule { background: var(--navy); color: var(--white); }
.badge-published_terms { background: var(--cyan); color: var(--navy); }
.badge-supplier_quote { background: var(--cream); color: var(--gray); border-color: var(--line-strong); }
.badge-team_decision { background: var(--white); border-color: var(--navy); color: var(--navy); }
.badge-working_scenario { background: var(--white); border-color: var(--orange); color: var(--black); }
.badge-our_calculation { background: var(--cyan); color: var(--navy); }
.badge-pending { background: var(--white); border: 1px dashed var(--gray); color: var(--gray); }
.verif { font-size: 0.82rem; }
.pill-current { background: var(--cyan); color: var(--navy); }
.pill-old { background: var(--cream); color: var(--gray); }
.pill-draft { background: var(--white); border: 1px dashed var(--orange); }
.pill-alt { background: var(--white); border-color: var(--line-strong); color: var(--navy); }
.pill-separate { background: var(--white); border-color: var(--navy); color: var(--navy); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 10px 0; max-width: 100%; background: var(--white); }
.table-wrap.tall { max-height: 75vh; overflow-y: auto; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.92rem; color: var(--black); }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
thead th { position: sticky; top: 0; z-index: 2; background: var(--cream); color: var(--gray); font-size: 0.8rem; font-weight: bold; text-transform: uppercase; letter-spacing: 0.03em; }
tbody th { font-weight: bold; color: var(--navy); }
tbody tr:hover > * { background-color: var(--kx-surface-muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-note { display: block; font-weight: normal; font-size: 0.8rem; color: var(--muted); margin-top: 3px; white-space: normal; }
td.num .cell-note { text-align: right; }
tr.superseded th, tr.superseded td { color: var(--gray); }
tr.selected > * { background: var(--cyan); }
tr.cat th { background: var(--cyan); color: var(--navy); font-size: 0.86rem; }
.equipment { min-width: 1250px; }
.equipment .sticky-col { position: sticky; left: 0; z-index: 1; background: var(--white); min-width: 200px; max-width: 230px; }
.equipment thead .sticky-col { z-index: 3; background: var(--cream); }
.groups { min-width: 520px; }
.versions, .terms-table, .docs, .plan-table { min-width: 720px; }
.terms-table td { min-width: 200px; }

/* ---------- documents ---------- */
.version-head { padding: 14px 18px; border-left: 4px solid var(--navy); background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow); margin: 12px 0; }
.version-head.superseded { border-left-color: var(--gray); }
.version-head.draft { border-left-color: var(--orange); }
.version-head h2 { margin: 0 0 4px; font-size: 1.05rem; }
.viewer { margin: 14px 0; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.pdf-frame { width: 100%; height: 78vh; min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--cream); }

/* ---------- search ---------- */
.results { list-style: none; padding: 0; max-width: none; }
.results li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.results h2 { margin: 2px 0; font-size: 1.05rem; }
.results .kind { margin: 0; font-size: 0.76rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: bold; }
.snippet { margin: 4px 0 0; color: var(--gray); }
.broadened { background: var(--cream); border-left: 4px solid var(--orange); padding: 8px 12px; max-width: 72ch; border-radius: var(--radius-sm); }
mark { background: var(--cyan); color: var(--black); padding: 0 1px; }

/* ---------- auth ---------- */
.auth-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 32px; }
.auth-card form { display: grid; gap: 14px; margin-top: 12px; }
.brand-plain { display: flex; align-items: center; gap: 10px; color: var(--navy); font-weight: bold; margin: 0 0 18px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; grid-template-areas: "updates" "next" "docs"; }
  .two-col { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .brand-mobile { display: flex; padding: 0; }
  .brand-mobile .brand-mark { width: 28px; height: 28px; }
  .topsearch { order: 3; flex-basis: 100%; max-width: none; }
  .menu { display: block; margin-left: auto; position: relative; }
  .menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--white); color: var(--navy); }
  .menu > summary::-webkit-details-marker { display: none; }
  .menu[open] > summary { background: var(--cyan); }
  .menu nav { position: absolute; right: 0; top: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); display: grid; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-hover); }
  .menu .account-card { margin-top: 4px; }
  .content { padding: 20px 16px 48px; }
  h1 { font-size: 1.5rem; }
  .tile-grid { grid-template-columns: 1fr; gap: 10px; }
  .tile { grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 2px; padding: 14px 16px; align-items: center; }
  .tile-icon { grid-row: 1 / span 2; margin: 0; }
  .tile-text { grid-column: 2; }
  .tile-link { display: none; }
  .row-action { display: none; }
  .summary-grid, .summary-grid.two { grid-template-columns: 1fr; }
  .field { min-width: 0; flex: 1 1 100%; }
  .actions-field { flex-basis: 100%; }
  .pdf-frame { height: 70vh; min-height: 360px; }
  .btn { white-space: normal; text-align: center; max-width: 100%; }
  .page-ref { white-space: normal; }
  .preview-banner { top: 112px; }
  .toolbar { flex-direction: column; align-items: flex-start; }
  .date-chip { min-width: 0; }
  .row-update { flex-wrap: wrap; }
  .row-update .date-chip { flex-basis: 100%; }
  .card, .panel { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  .topbar, .sidebar, .filters, .viewer-actions, .preview-banner, .tabs, .toolbar { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; }
  .table-wrap { overflow: visible; border: 0; }
  .card { box-shadow: none; }
}
