/* FinanceOS design system: one type family, one grid, one set of components for every page. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --border: #e3e8ee;
  --border-strong: #cfd7df;
  --text: #0f1a24;
  --text-2: #475466;
  --text-3: #8a96a3;
  --brand: #0f3d33;
  --brand-2: #16574a;
  --accent: #127a5b;
  --accent-soft: #e6f4ee;
  --pos: #0b7a4b;
  --neg: #c8372d;
  --neg-soft: #fcebe9;
  --warn: #9a5b00;
  --warn-soft: #fdf3e2;
  --info: #1d5fbf;
  --info-soft: #e8f0fc;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 26, 36, .05), 0 1px 1px rgba(15, 26, 36, .03);
  --shadow-lg: 0 12px 32px rgba(15, 26, 36, .12);
  --side: 248px;
  --top-bg: rgba(244, 246, 248, .92);
  --row-hover: #f6f9fb;
  --track: #edf1f4;
  --tabs-bg: #e9edf1;
  --line-ok: #bfe3d3;
  --line-warn: #f1d9a8;
  --line-bad: #f3c4bf;
  --dot-warn: #d08a12;
  --seg-other: #cfcfcf;
  --alert-info-text: #173e78; --alert-warn-text: #6e4300; --alert-bad-text: #8c231b; --alert-ok-text: #0b5a42;
  --empty: #c9d1d9; --prev-bar: #c3ccd5;
  color-scheme: light;
}
/* The dark theme: the viewer's choice (the button in the header), else the device's. */
:root[data-theme="dark"] {
  --bg: #0e1419; --surface: #151c22; --surface-2: #1a2229; --border: #25303a; --border-strong: #33414d;
  --text: #e5ecf1; --text-2: #a7b4bf; --text-3: #7a8995;
  --brand: #0b2c26; --brand-2: #12463c; --accent: #3dbb8c; --accent-soft: #13342a;
  --pos: #4cc38a; --neg: #ff7d70; --neg-soft: #3a1d1b; --warn: #e5ad5b; --warn-soft: #372913; --info: #80b1ff; --info-soft: #172a45;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  --top-bg: rgba(14, 20, 25, .9); --row-hover: #1c252c; --track: #24303a; --tabs-bg: #1c252c;
  --line-ok: #1f5a44; --line-warn: #5a4318; --line-bad: #5c2a26; --dot-warn: #e5ad5b; --seg-other: #56626c;
  --alert-info-text: #b9d2ff; --alert-warn-text: #f0c987; --alert-bad-text: #ffb1a8; --alert-ok-text: #8fe0bd; --empty: #4a5763; --prev-bar: #3d4a55;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1419; --surface: #151c22; --surface-2: #1a2229; --border: #25303a; --border-strong: #33414d;
    --text: #e5ecf1; --text-2: #a7b4bf; --text-3: #7a8995;
    --brand: #0b2c26; --brand-2: #12463c; --accent: #3dbb8c; --accent-soft: #13342a;
    --pos: #4cc38a; --neg: #ff7d70; --neg-soft: #3a1d1b; --warn: #e5ad5b; --warn-soft: #372913; --info: #80b1ff; --info-soft: #172a45;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    --top-bg: rgba(14, 20, 25, .9); --row-hover: #1c252c; --track: #24303a; --tabs-bg: #1c252c;
    --line-ok: #1f5a44; --line-warn: #5a4318; --line-bad: #5c2a26; --dot-warn: #e5ad5b; --seg-other: #56626c;
  --alert-info-text: #b9d2ff; --alert-warn-text: #f0c987; --alert-bad-text: #ffb1a8; --alert-ok-text: #8fe0bd; --empty: #4a5763; --prev-bar: #3d4a55;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0; }
small, .small { font-size: 13px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.neg { color: var(--neg); }
.pos { color: var(--pos); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.icon { width: 18px; height: 18px; flex: none; }

/* Shell: a fixed sidebar with every section, the page on the right. */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; background: var(--brand); color: #d6e4df; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #1f6b5a; color: #fff; font-size: 16px; font-weight: 800; }
.logo small { display: block; color: #9fbdb3; font-size: 12px; font-weight: 500; }
.side-nav { display: grid; gap: 2px; }
.side-group { margin: 10px 10px 4px; color: #86a79c; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: #d6e4df; font-size: 14px; font-weight: 500; }
.side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.side-link.is-active { background: #fff; color: var(--brand); font-weight: 600; }
.side-link .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(255, 255, 255, .1); color: #86a79c; font-size: 12px; line-height: 1.45; }
.side-foot .icon { width: 14px; height: 14px; vertical-align: -2px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 12px 32px; background: var(--top-bg); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
/* The title keeps its width; when the page's buttons do not fit beside it, they go on the next line. */
.top { flex-wrap: wrap; row-gap: 10px; }
.top-title { min-width: min(280px, 100%); flex: 1 1 280px; }
.top-title h1 { overflow-wrap: anywhere; }
.crumbs { color: var(--text-3); font-size: 13px; font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; max-width: 100%; }
.content { width: 100%; max-width: 1360px; padding: 24px 32px 48px; display: grid; gap: 20px; align-content: start; }
.menu-button { display: none; }
.scrim { display: none; }

/* Account menu and dropdowns without scripts. */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 220px; max-height: 70vh; overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); }
.dropdown-panel a, .dropdown-panel button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.dropdown-panel a:hover, .dropdown-panel button:hover { background: var(--surface-2); text-decoration: none; }
.dropdown-panel .is-current { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.dropdown-label { padding: 8px 10px 4px; color: var(--text-3); font-size: 12px; }

/* Buttons and chips. */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 550; white-space: nowrap; cursor: pointer; }
.btn:hover { border-color: var(--text-3); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #0e6a4f; border-color: #0e6a4f; }
.btn .caret { color: var(--text-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.chip-ok { background: var(--accent-soft); border-color: var(--line-ok); color: var(--accent); }
.chip-ok::before { background: var(--accent); }
.chip-warn { background: var(--warn-soft); border-color: var(--line-warn); color: var(--warn); }
.chip-warn::before { background: var(--dot-warn); }
.chip-bad { background: var(--neg-soft); border-color: var(--line-bad); color: var(--neg); }
.chip-bad::before { background: var(--neg); }
.chip-plain::before { display: none; }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: #e0463a; color: #fff; font-size: 12px; font-weight: 700; }
.badge-soft { background: rgba(255, 255, 255, .16); }

/* Cards, headers inside cards, tabs. */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head p { margin-top: 2px; color: var(--text-2); font-size: 13px; }
.card-body { padding: 16px 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 13px; }
.card > .table-wrap:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--tabs-bg); border-radius: 11px; width: fit-content; max-width: 100%; }
.tabs a { padding: 7px 14px; border-radius: 8px; color: var(--text-2); font-size: 14px; font-weight: 550; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* KPI cards. */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.kpi-label { color: var(--text-2); font-size: 13px; font-weight: 550; }
.kpi-value { margin-top: 6px; font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value small { margin-left: 4px; color: var(--text-3); font-size: 14px; font-weight: 550; letter-spacing: 0; }
.kpi-note { margin-top: 4px; color: var(--text-3); font-size: 12px; }
.kpi-delta { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; }
.kpi-accent { background: var(--brand); border-color: var(--brand); }
.kpi-accent .kpi-label, .kpi-accent .kpi-note { color: #a9c6bc; }
.kpi-accent .kpi-value, .kpi-accent .kpi-value small { color: #fff; }
.kpi-accent .kpi-value.neg { color: #ffb4a8; }

/* Tables: numbers right, first column sticky when the table scrolls. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th, .table td { padding: 9px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.table thead th.num { text-align: right; }
.table tbody tr:hover > * { background: var(--row-hover); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table .col-first { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 230px; max-width: 340px; }
.table thead .col-first { z-index: 3; background: var(--surface-2); }
.table tbody tr:hover > .col-first { background: var(--row-hover); }
.table .row-section > * { background: var(--surface-2); color: var(--text); font-weight: 650; }
.table .row-section > .col-first { background: var(--surface-2); }
.table .row-sub > th { padding-left: 28px; color: var(--text-2); font-weight: 400; }
.table .row-total > * { font-weight: 700; border-top: 1px solid var(--border-strong); }
.table .row-total > .col-first { color: var(--text); }
.table .row-grand > * { background: var(--accent-soft); font-weight: 700; }
.table .row-grand > .col-first { background: var(--accent-soft); }
.table .row-note > * { color: var(--text-3); font-size: 13px; }
/* A reference line of the P&L (pnl_build.INSIDE_COST): shown, never summed. */
.table .row-memo > * { color: var(--text-3); font-style: italic; }
.table .row-memo .cell-link, .table .row-memo .cell-link.neg { color: var(--text-3); }
.table th[scope="row"] { font-weight: 500; }
.table small { color: var(--text-3); font-size: 12px; }
.table .empty { color: var(--empty); }
.table-dense th, .table-dense td { padding: 7px 12px; }
/* A point's profit ladder (sad.html): the label column gives way on a phone, so the figures stay in view. */
.table.ladder .col-first { min-width: 0; }
.table.ladder details .table td { padding: 4px 6px; }
.cell-link { display: inline-block; padding: 1px 6px; margin: -1px -6px; border-radius: 6px; color: inherit; border-left: 3px solid transparent; }
.cell-link:hover { background: var(--accent-soft); text-decoration: none; }
.src-team { border-left-color: #c9d1d9; }
.src-dds, .src-billz, .src-billz_writeoff, .src-poster, .src-poster_cash { border-left-color: var(--accent); }
.src-cash { border-left-color: #d9a441; background: var(--warn-soft); }
.src-rate, .src-fixed { border-left-color: #d9a441; }
.src-timesheet { border-left-color: var(--text); }
.src-history { border-left-color: #9b8ac4; }
.src-differs { border-left-color: var(--neg); background: var(--neg-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-2); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.legend .l-team { background: #c9d1d9; }
.legend .l-cash, .legend .l-rate { background: #d9a441; }
.legend .l-timesheet { background: var(--text); }
.legend .l-history { background: #9b8ac4; }
.legend .l-differs { background: var(--neg); }

/* Notes, alerts and the list of checks. */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--info-soft); color: var(--alert-info-text); font-size: 14px; }
.alert strong { display: block; margin-bottom: 2px; }
.alert-warn { background: var(--warn-soft); color: var(--alert-warn-text); }
.alert-bad { background: var(--neg-soft); color: var(--alert-bad-text); }
.alert-ok { background: var(--accent-soft); color: var(--alert-ok-text); }
.alert .icon { margin-top: 1px; }
.alert a { color: inherit; text-decoration: underline; }
.issues { margin: 0; padding: 0; list-style: none; display: grid; }
.issues li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
.issues li:last-child { border-bottom: 0; }
.issues li::before { content: ""; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--text-3); }
.issues .is-bad::before { background: var(--neg); }
.issues .is-warn::before { background: var(--dot-warn); }
.issues li.issue-group { display: block; padding: 14px 20px 6px; border-bottom: 0; color: var(--text-2); font-size: 12px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; }
.issues li.issue-group::before { display: none; }
details.more { border-top: 1px solid var(--border); }
details.more > summary { display: flex; align-items: center; gap: 8px; padding: 12px 20px; color: var(--text-2); font-size: 14px; font-weight: 550; cursor: pointer; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "›"; display: inline-block; width: 12px; color: var(--text-3); font-size: 18px; line-height: 1; transition: transform .15s; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > .more-body { padding: 0 20px 16px; }
.note { color: var(--text-2); font-size: 13px; line-height: 1.55; }
.note + .note { margin-top: 8px; }
.prose { color: var(--text-2); font-size: 14px; line-height: 1.6; max-width: 880px; }
.prose p + p { margin-top: 8px; }
.stamp { color: var(--text-3); font-size: 12px; }

/* Simple charts drawn as SVG shapes with sizes in attributes: no scripts, no inline styles. */
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr) 80px; align-items: center; gap: 12px; font-size: 14px; }
.bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-svg { width: 100%; height: 10px; display: block; }
.bar-svg rect { fill: var(--accent); }
.bar-svg rect.track { fill: var(--track); }
.bar-svg rect.neg { fill: var(--neg); }
.bar-svg rect.mark, .stack-svg rect.mark { fill: var(--text); }
.bar-svg rect.prev { fill: var(--prev-bar); }
.bar-svg-tall { height: 14px; }
.bar-svg-pair { height: 18px; }
.legend i.l-prev { background: var(--prev-bar); }
.day-svg { width: 100%; height: 180px; display: block; }
.day-svg rect { fill: var(--accent); }
.day-svg rect.weekend { fill: #0b5a42; }
.day-svg rect.open { fill-opacity: .4; }
.day-svg rect.mark { fill: var(--text); }
.day-labels { display: flex; justify-content: space-between; gap: 2px; margin-top: 4px; }
.day-labels span { flex: 1; text-align: center; font-size: 10px; color: var(--text-3); min-width: 0; }
.day-labels span.is-weekend { color: var(--text); font-weight: 600; }
.forecast-svg { width: 100%; height: 200px; display: block; }
.forecast-svg .balance { fill: none; stroke: var(--accent); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.forecast-svg circle { fill: var(--accent); }
.forecast-svg circle.neg { fill: var(--neg); }
.forecast-svg .zero { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.forecast-svg rect.in { fill: var(--accent); }
.forecast-svg rect.out { fill: var(--neg); fill-opacity: .75; }
.stack-block { display: grid; gap: 8px; margin-bottom: 18px; }
.stack-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stack-svg { width: 100%; height: 22px; display: block; border-radius: 6px; overflow: hidden; background: var(--track); }
.stack-svg-thin { height: 12px; border-radius: 4px; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; }
.seg-cogs { fill: #8aa0b3; }
.stack-legend i.seg-cogs { background: #8aa0b3; }
.seg-variable { fill: #b9c6d1; }
.stack-legend i.seg-variable { background: #b9c6d1; }
.seg-staff { fill: #e0a458; }
.stack-legend i.seg-staff { background: #e0a458; }
.seg-premises { fill: #c77d4f; }
.stack-legend i.seg-premises { background: #c77d4f; }
.seg-marketing { fill: #9b7fd1; }
.stack-legend i.seg-marketing { background: #9b7fd1; }
.seg-overhead { fill: #6d8fb3; }
.stack-legend i.seg-overhead { background: #6d8fb3; }
.seg-other { fill: var(--seg-other); }
.stack-legend i.seg-other { background: var(--seg-other); }
.seg-profit { fill: var(--accent); }
.stack-legend i.seg-profit { background: var(--accent); }
.spark { display: flex; align-items: stretch; gap: 10px; height: 200px; }
.spark-col { flex: 1; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; gap: 6px; min-width: 0; color: inherit; }
.spark-col:hover { text-decoration: none; }
.spark-col:hover .spark-svg rect { fill-opacity: .8; }
.spark-svg { width: 100%; max-width: 56px; height: 100%; display: block; }
.spark-svg rect { fill: var(--accent); }
.spark-svg rect.neg { fill: var(--neg); }
.spark-svg rect.open { fill-opacity: .45; }
.spark-svg rect.current { stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-label { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.spark-label.is-current { color: var(--text); font-weight: 700; }

/* States. */
.state { padding: 28px; text-align: center; color: var(--text-2); }
.state strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 16px; }
.state .btn { margin-top: 14px; }
.list-plain { margin: 0; padding: 0; list-style: none; }
.list-plain li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.list-plain li:last-child { border-bottom: 0; }
.stack { display: grid; gap: 20px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spacer { flex: 1; }

/* Sign-in and public pages. */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--brand); }
.auth-card { width: min(420px, 100%); padding: 32px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); display: grid; gap: 18px; }
.auth-card .logo { color: var(--text); padding: 0; }
.auth-card .logo small { color: var(--text-3); }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 550; }
.field input { height: 42px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: inherit; font-size: 15px; }
.field input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.btn-block { width: 100%; justify-content: center; height: 42px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.page-simple { max-width: 760px; margin: 0 auto; padding: 40px 24px; display: grid; gap: 16px; }

/* Кассовые смены: a shift that did not add up, and one to look at. */
.table tr.row-bad > td { background: var(--neg-soft); }
.table tr.row-warn > td { background: var(--warn-soft); }

/* Разбор точек: the score and the advice. */
.score { display: grid; justify-items: end; gap: 2px; min-width: 74px; }
.score strong { font-size: 30px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; }
.score small { color: var(--text-3); font-size: 12px; }
.score-ok strong { color: var(--pos); }
.score-warn strong { color: var(--warn); }
.score-bad strong { color: var(--neg); }
ul.advice { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }

/* Тренды: a small bar in a table cell. */
.mini-bar { width: 10px; height: 34px; display: inline-block; vertical-align: bottom; }
.mini-bar rect { fill: var(--accent); }
.mini-bar rect.open { fill-opacity: .45; }
.mini-bar rect.neg { fill: var(--neg); }

/* Операции: the filters above the list. */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px 20px; }
.filters label { display: grid; gap: 4px; font-size: 12px; color: var(--text-2); min-width: 140px; }
.filters label.check { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; color: var(--text); }
.filters select, .filters input[type=search] { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); max-width: 260px; }

/* A chosen option among buttons (the sales page's periods). */
.btn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Home: liquidity ratios. */
.ratio-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.ratio-value { font-size: 26px; font-weight: 650; letter-spacing: -0.01em; }
.ratio-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 14px; }
.ratio small { display: block; margin-top: 4px; line-height: 1.4; }
h3.sub { margin: 4px 0 8px; font-size: 14px; font-weight: 650; }

/* «Продажи»: the weekday-by-hour grid and the menu lists. */
.heat-wrap { overflow-x: auto; }
.heat { border-collapse: separate; border-spacing: 2px; font-size: 11px; color: var(--text-3); }
.heat th { font-weight: 500; padding: 0 1px; text-align: center; min-width: 18px; }
.heat tbody th { text-align: left; padding-right: 6px; color: var(--text-2); }
.heat td { width: 20px; height: 20px; border-radius: 4px; background: var(--track); }
.heat td.heat-1 { background: rgba(18, 122, 91, .16); }
.heat td.heat-2 { background: rgba(18, 122, 91, .32); }
.heat td.heat-3 { background: rgba(18, 122, 91, .50); }
.heat td.heat-4 { background: rgba(18, 122, 91, .70); }
.heat td.heat-5 { background: rgba(18, 122, 91, .92); }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.menu-list h3 { margin: 4px 0 8px; font-size: 14px; font-weight: 650; }
.menu-list .table td:first-child { width: 22px; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .menu-state:checked ~ .shell .side { transform: none; }
  .menu-state:checked ~ .shell .scrim { display: block; }
  .scrim { position: fixed; inset: 0; z-index: 45; background: rgba(15, 26, 36, .35); }
  .menu-button { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
  .top { padding: 10px 16px; flex-wrap: wrap; }
  .content { padding: 16px 16px 40px; gap: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: 1fr; }
  .card-head, .card-body, .card-foot, .issues li, details.more > summary, details.more > .more-body { padding-left: 16px; padding-right: 16px; }
  .table th, .table td { padding: 8px 10px; }
  .table .col-first { min-width: 170px; }
  h1 { font-size: 20px; }
}
@media (max-width: 560px) {
  .ratio-row { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi-value { font-size: 20px; }
  .top-actions { width: 100%; justify-content: flex-start; }
  .bar-row { grid-template-columns: minmax(90px, 120px) minmax(0, 1fr) 70px; }
  .account-name { display: none; }
}
@media print {
  .side, .top-actions, .menu-button { display: none !important; }
  .shell { display: block; }
  .top { position: static; background: none; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* Wide tables of the older pages: the first column stays in view while the table scrolls. */
.table.sticky-first tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 200px; }
.table.sticky-first thead tr > :first-child { z-index: 3; background: var(--surface-2); }
.table.sticky-first .row-section > :first-child, .table.sticky-first .row-grand > :first-child { background: inherit; }
.table.sticky-first tbody tr:hover > :first-child { background: var(--row-hover); }
.card > .note, .card > .prose { padding: 12px 20px 0; }
.card > .note:last-child, .card > .prose:last-child { padding-bottom: 16px; }
details.more > :not(summary) { margin-left: 20px; margin-right: 20px; }
details.more > :last-child { margin-bottom: 16px; }
details.more > .more-body { margin: 0; }
.kpi-value.kpi-small { font-size: 16px; white-space: normal; }
.legend-line { padding: 0 20px 12px; }
.page-simple .logo { color: var(--text); padding: 0; }
.page-simple .logo small { color: var(--text-3); }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.field { color: var(--text); }
.table td.neg, .table .row-section > .neg, .table .row-total > .neg, .table .row-grand > .neg, .cell-link.neg { color: var(--neg); }
.partner-logo { color: var(--text); padding: 0 12px 0 0; }
.partner-logo small { color: var(--text-3); }
body > .main > .content { margin: 0 auto; }

/* The header's bell: what needs a look, on every page. */
.bell summary { position: relative; }
.bell summary .badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; font-size: 11px; }
.bell-panel { width: min(380px, calc(100vw - 32px)); display: grid; gap: 2px; }
.bell-item { display: block; padding: 8px 10px 8px 14px; border-radius: 8px; color: var(--text); font-size: 13.5px; line-height: 1.4; position: relative; }
.bell-item::before { content: ""; position: absolute; left: 4px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--info); }
.bell-item.bell-bad::before { background: var(--neg); }
.bell-item.bell-warn::before { background: var(--dot-warn); }
.bell-item:hover { background: var(--row-hover); text-decoration: none; }
.bell-all { display: block; padding: 8px 10px 4px; font-size: 13px; }
/* «Анализ»: the page's figures in a few sentences, one button in the corner of every page. */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; }
.fab-button { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; background: var(--brand);
  color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); cursor: pointer; }
.fab-button::-webkit-details-marker { display: none; }
.fab[open] .fab-button { background: var(--brand-2); }
.fab-panel { position: absolute; right: 0; bottom: calc(100% + 10px); width: min(420px, calc(100vw - 40px)); max-height: min(70vh, 560px); overflow-y: auto;
  padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.fab-head { display: grid; gap: 2px; margin-bottom: 10px; }
.fab-head small { color: var(--text-3); }
.fab-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.fab-list li { position: relative; padding-left: 16px; font-size: 14px; line-height: 1.45; color: var(--text); }
.fab-list li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--info); }
.fab-list li.fab-bad::before { background: var(--neg); }
.fab-list li.fab-warn::before { background: var(--dot-warn); }
.fab-list li.fab-good::before { background: var(--pos); }
@media (max-width: 720px) { .fab { right: 12px; bottom: 12px; } .fab-button span { display: none; } .fab-button { padding: 12px; } }
/* Partners' page: «Как читать» as a small round «?» so it never covers the right-hand figures; room left under the last card. */
.partner-page .fab-button span { display: none; }
.partner-page .fab-button { padding: 12px; }
.partner-page .main { padding-bottom: 72px; }
@media print { .fab, .bell, #theme-toggle { display: none; } }

.model-tabs { margin-bottom: 18px; }
/* The header's filter: a company as chips, a point from a menu (the demo's brand and branch filter). */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--tabs-bg); }
.seg-item { padding: 6px 11px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.seg-item:hover { color: var(--text); text-decoration: none; }
.seg-item.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.dropdown-link { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text); font-size: 14px; white-space: nowrap; }
.dropdown-link:hover { background: var(--row-hover); text-decoration: none; }
.dropdown-link.is-current { font-weight: 650; color: var(--accent); }

/* The points' review: the cabinet's recommendations and methodology. */
.advice-graded { display: grid; gap: 10px; padding-left: 0; list-style: none; }
.advice-graded li { line-height: 1.5; }
.method > summary { list-style: none; cursor: pointer; }
.method > summary::-webkit-details-marker { display: none; }
.principles { display: grid; gap: 8px; margin: 0 0 12px; padding-left: 20px; }

/* The owner's management dashboard (dashboard.iminov.uz), one click away. */
.side-external { margin-top: 6px; border: 1px dashed rgba(255, 255, 255, .18); }

/* KPI cards: the change as a pill in the corner (the way good dashboards show it). */
.kpi { position: relative; }
.kpi-pill { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); font-size: 12px; font-weight: 650; line-height: 1.5; font-variant-numeric: tabular-nums; }
.kpi-pill.pos { color: var(--pos); }
.kpi-pill.neg { color: var(--neg); }
.kpi-accent .kpi-pill { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); }
.kpi-accent .kpi-pill.pos { color: #9fe3c2; }
.kpi-accent .kpi-pill.neg { color: #ffb4a8; }
.kpi:has(.kpi-pill) .kpi-label { padding-right: 76px; }
/* The menu's groups: small headings, a little air between them. */
.side-group:not(:first-child) { margin-top: 16px; }
/* Area charts: a line over a soft fill. */
.area-svg { width: 100%; height: 180px; display: block; overflow: visible; color: var(--accent); }
.area-svg .area-fill { fill: url(#area-fade); }
.area-svg .area-line { fill: none; stroke: currentColor; stroke-width: 2; vector-effect: non-scaling-stroke; }
.area-svg .area-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.area-svg .area-dot { fill: var(--surface); stroke: currentColor; stroke-width: 2; vector-effect: non-scaling-stroke; }
.area-svg .area-hit { fill: transparent; }
.area-svg .area-hit:hover + .area-dot, .area-svg .area-hit:hover { fill: rgba(18, 122, 91, .08); }
/* «Кассы и заявки»: a point's days side by side */
.money-grid td { vertical-align: top; min-width: 92px; }
.money-grid td small { display: inline-block; line-height: 1.3; }
/* Partner portal: «Месяц / Итог с открытия» and the audit's cards */
.partner-tabs { margin: 0 0 16px; }
.card-body h3 { margin: 4px 0 10px; font-size: 15px; }
.card-body h3 + .table-wrap { margin-bottom: 18px; }
.audit-basis strong { color: var(--warn); font-weight: 600; }
/* Partner dashboard (gallery-audit.json version 5): the site's KPI cards and column charts, a calm colour for a loss. */
:root { --loss: #cdb48f; --flow-0: #127a5b; --flow-1: #e0a458; --flow-2: #6d8fb3; --flow-3: #9b7fd1; --flow-4: #8aa0b3; --flow-5: #c77d4f; }
:root[data-theme="dark"] { --loss: #7d6a4f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --loss: #7d6a4f; } }
.pd-spark { gap: 6px; height: 210px; }
.pd-spark .spark-label { font-size: 11px; line-height: 1.25; text-align: center; }
.pd-spark .spark-label small { color: var(--text-3); font-size: 10px; }
.pd-spark .pd-value { color: var(--text-2); font-variant-numeric: tabular-nums; }
.pd-spark .spark-svg rect { fill-opacity: .55; }
.pd-spark .spark-svg rect.current, .pd-spark .spark-svg rect.axis { fill-opacity: 1; stroke: none; }
.pd-spark .spark-svg rect.open { fill-opacity: .3; }
.pd-gross rect { fill: #3f9c7c; }
.pd-profit .spark-svg rect.loss { fill: var(--loss); fill-opacity: .85; }
.pd-profit .spark-svg rect.axis { fill: var(--border-strong); }
.pd-profit .spark-svg { max-width: 64px; }
.pd-trend { margin: 14px 0 0; color: var(--text-2); font-size: 14px; }
.pd-trend strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-legend { margin-top: 12px; }
.pd-costs .bar-row > .num small { color: var(--text-3); font-size: 11.5px; }
.pd-costs .bar-svg rect.seg-cogs { fill: #8aa0b3; }
.pd-costs .bar-svg rect.seg-staff { fill: #e0a458; }
.pd-costs .bar-svg rect.seg-premises { fill: #c77d4f; }
.pd-costs .bar-svg rect.seg-marketing { fill: #9b7fd1; }
.pd-costs .bar-svg rect.seg-variable { fill: #6d8fb3; }
.pd-costs .bar-svg rect.seg-other { fill: var(--seg-other); }
.pd-costs .bar-svg rect.track { fill: var(--track); }
.bar-svg rect.calm { fill: var(--loss); }
.pd-flow + .pd-flow { margin-top: 16px; }
.pd-flow > strong { display: block; margin-bottom: 8px; font-size: 14px; }
.pd-flow .legend { margin-top: 8px; font-size: 12.5px; }
.stack-svg rect.flow-0, .legend i.flow-0 { fill: var(--flow-0); background: var(--flow-0); }
.stack-svg rect.flow-1, .legend i.flow-1 { fill: var(--flow-1); background: var(--flow-1); }
.stack-svg rect.flow-2, .legend i.flow-2 { fill: var(--flow-2); background: var(--flow-2); }
.stack-svg rect.flow-3, .legend i.flow-3 { fill: var(--flow-3); background: var(--flow-3); }
.stack-svg rect.flow-4, .legend i.flow-4 { fill: var(--flow-4); background: var(--flow-4); }
.stack-svg rect.flow-5, .legend i.flow-5 { fill: var(--flow-5); background: var(--flow-5); }
.pd-more-note { padding: 0 20px 4px; }
/* The portal's tables: figures right-aligned under their right-aligned headings. */
.partner-page .table td.num { text-align: right; }
details.more > .more-body.grid-2 { padding-top: 4px; }
@media (max-width: 560px) {
  /* A phone: the cards one under another, the charts keep every month but only the chosen month's figure. */
  .pd-kpis { grid-template-columns: 1fr; }
  .pd-kpis .kpi-value { font-size: 24px; }
  .pd-spark { gap: 3px; height: 180px; }
  .pd-spark .pd-value { visibility: hidden; }
  .pd-spark .pd-value.is-current { visibility: visible; position: relative; z-index: 1; overflow: visible; }
  .pd-spark .spark-label { font-size: 10px; }
  .pd-more-note { padding: 0 16px 4px; }
  .pd-costs .bar-row > span:first-child { white-space: normal; overflow: visible; line-height: 1.25; }
}
/* Partner dashboard: what each figure means, in small type; the month in one line. */
.kpi-help { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); color: var(--text-3); font-size: 11.5px; line-height: 1.35; }
.kpi-accent .kpi-help { border-top-color: rgba(255, 255, 255, .16); color: #a9c6bc; }
.pd-kpis .kpi { cursor: default; }
.pd-summary { line-height: 1.5; }
.pd-summary strong { display: inline; margin-right: 4px; }
.pd-ratios .ratio-value small { display: inline; margin: 0; font-size: 14px; color: var(--text-3); font-weight: 550; }
.pd-even { margin-top: 18px; }
.pd-even .note { margin: 8px 0 0; }
/* Partner portal: «Как читать эту страницу» — the site's corner button, a closed list of answers instead of a chat. */
.pd-help-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .18); font-size: 13px; font-weight: 700; }
.pd-help .fab-panel { width: min(440px, calc(100vw - 24px)); }
.pd-help-item { border-top: 1px solid var(--border); }
.pd-help-item > summary { padding: 10px 0; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.pd-help-item > summary::-webkit-details-marker { display: none; }
.pd-help-item > summary::before { content: "›"; display: inline-block; width: 14px; color: var(--text-3); transition: transform .15s; }
.pd-help-item[open] > summary::before { transform: rotate(90deg); }
.pd-help-item p { margin: 0 0 12px 14px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.partner-page .content { padding-bottom: 88px; }
/* Partner dashboard: earned and invested side by side; the equipment chart stacks the partner's money and the turnover. */
:root { --investor: #6d8fb3; --turnover: #e0a458; }
.pd-pair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pd-pair-item { padding: 18px 20px; }
.pd-pair-item + .pd-pair-item { border-left: 1px solid var(--border); }
.pd-pair-value { margin-top: 6px; font-size: 30px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pd-pair-value small { color: var(--text-3); font-size: 15px; font-weight: 550; letter-spacing: 0; }
.pd-capex .spark-svg rect.investor { fill: var(--investor); }
.pd-capex .spark-svg rect.turnover { fill: var(--turnover); }
.pd-capex .spark-svg rect.current { fill-opacity: 1; }
.legend i.l-investor { background: var(--investor); }
.legend i.l-turnover { background: var(--turnover); }
.pd-capex-head { margin: 0 0 4px; color: var(--text-2); font-size: 13.5px; }
.pd-capex-rows .bar-svg rect:not(.track) { fill: var(--investor); }
@media (max-width: 560px) {
  .pd-pair-grid { grid-template-columns: 1fr; }
  .pd-pair-item + .pd-pair-item { border-left: 0; border-top: 1px solid var(--border); }
  .pd-pair-item { padding: 14px 16px; }
  .pd-pair-value { font-size: 26px; }
}
.pd-costs .bar-row, .pd-capex-rows .bar-row { grid-template-columns: minmax(150px, 270px) minmax(0, 1fr) 90px; }
@media (max-width: 560px) { .pd-costs .bar-row, .pd-capex-rows .bar-row { grid-template-columns: minmax(100px, 130px) minmax(0, 1fr) 76px; } .pd-capex-rows .bar-row > span:first-child { white-space: normal; line-height: 1.25; } }
/* Partner dashboard, version 6: «Как заработали и куда направили» — the cascade from the revenue to the result after the
   investments, large; the charts of the same; a loss in the calm colour, the turnover's equipment in slate, Aziz's in violet. */
:root { --capex: #7f93a8; --aziz: #9b7fd1; --result-line: #0f1a24; }
:root[data-theme="dark"] { --capex: #8ea3b8; --result-line: #e5ecf1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --capex: #8ea3b8; --result-line: #e5ecf1; } }
.pd6-steps { display: grid; gap: 0; font-variant-numeric: tabular-nums; }
.pd6-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 120px 64px; align-items: baseline; gap: 8px; padding: 9px 4px; border-top: 1px solid var(--border); }
.pd6-row:first-child { border-top: 0; }
.pd6-sign { color: var(--text-3); font-size: 18px; font-weight: 600; text-align: center; }
.pd6-label { font-size: 16px; font-weight: 600; }
.pd6-label small { display: block; margin-top: 2px; color: var(--text-3); font-size: 12.5px; font-weight: 450; }
.pd6-value { font-size: 20px; font-weight: 650; text-align: right; letter-spacing: -.01em; }
.pd6-share { color: var(--text-3); font-size: 13px; text-align: right; }
.pd6-head .pd6-label, .pd6-head .pd6-value { font-size: 22px; }
.pd6-sub { padding: 4px 4px; border-top: 0; }
.pd6-sub .pd6-label { padding-left: 14px; color: var(--text-2); font-size: 14px; font-weight: 450; }
.pd6-sub .pd6-value { color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.pd6-total { background: var(--surface-2, var(--row-hover)); border-radius: var(--radius-sm); }
.pd6-key { margin-top: 6px; border: 0; border-radius: var(--radius-sm); background: var(--accent-soft); }
.pd6-key .pd6-label, .pd6-key .pd6-value { font-size: 22px; }
.pd6-key .pd6-value { color: var(--accent); }
.pd6-key.is-loss { background: color-mix(in srgb, var(--loss) 28%, transparent); }
.pd6-key.is-loss .pd6-value { color: var(--text); }
.pd6-result { margin-bottom: 4px; }
.pd6-after { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.pd6-fact { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pd6-fact strong { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.pd6-fact small { color: var(--text-3); font-size: 12.5px; line-height: 1.35; }
.pd6-note { margin: 12px 0 0; }
.pd6-chart { display: block; width: 100%; height: 230px; overflow: visible; }
.pd6-chart .hit { fill: transparent; }
.pd6-chart .hit.current { fill: var(--accent-soft); }
.pd6-chart a:hover .hit { fill: var(--row-hover); }
.pd6-chart .op { fill: var(--accent); fill-opacity: .8; }
.pd6-chart .op.loss { fill: var(--loss); fill-opacity: 1; }
.pd6-chart .capex { fill: var(--capex); fill-opacity: .85; }
.pd6-chart .open { fill-opacity: .4; }
.pd6-chart .axis { fill: var(--border-strong); }
.pd6-chart .grid { fill: var(--border); }
.pd6-chart .result { fill: none; stroke: var(--result-line); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pd6-chart .result-mark { stroke: var(--result-line); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.pd6-cum polyline { fill: none; stroke-width: 2.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pd6-cum .cum-profit { stroke: var(--accent); }
.pd6-cum .cum-turnover { stroke: var(--capex); }
.pd6-cum .cum-investor { stroke: var(--aziz); stroke-dasharray: 5 4; }
.pd6-cum-top { color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.pd6-axis { display: flex; margin-top: 6px; }
.pd6-axis > * { flex: 1 1 0; min-width: 0; color: var(--text-3); font-size: 11px; line-height: 1.25; text-align: center; white-space: nowrap; }
.pd6-axis small { display: block; font-size: 10px; }
.pd6-axis .is-current { color: var(--text); font-weight: 700; }
.legend i.l-op { background: var(--accent); }
.legend i.l-loss { background: var(--loss); }
.legend i.l-capex { background: var(--capex); }
.legend i.l-investor { background: var(--aziz); }
.legend i.l-result { height: 3px; background: var(--result-line); }
.pd6-capex .spark-svg rect.turnover { fill: var(--capex); }
.pd6-capex .spark-svg rect.investor { fill: var(--aziz); }
@media (max-width: 760px) { .pd6-after { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .pd6-row { grid-template-columns: 16px minmax(0, 1fr) 84px 44px; gap: 6px; padding: 8px 0; }
  .pd6-label { font-size: 14.5px; }
  .pd6-value { font-size: 16px; }
  .pd6-head .pd6-label, .pd6-head .pd6-value, .pd6-key .pd6-label, .pd6-key .pd6-value { font-size: 17px; }
  .pd6-sub .pd6-label { padding-left: 6px; font-size: 13px; }
  .pd6-sub .pd6-value { font-size: 13px; }
  .pd6-share { font-size: 11.5px; }
  .pd6-chart { height: 190px; }
  .pd6-axis > * { font-size: 9.5px; }
  .pd6-axis small { font-size: 8.5px; }
}
/* «Итог с открытия»: four steps of the story, numbered, side by side on a wide screen. */
.pd-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pd-step { display: flex; flex-direction: column; }
.pd-step .kpi-help { margin-top: auto; }
.pd-step .kpi-note { margin-bottom: 10px; }
.pd-step-no { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-bottom: 10px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.kpi-accent .pd-step-no { background: rgba(255, 255, 255, .14); color: #fff; }
.pd-story { margin: 0 0 18px; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.pd-story strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
h3.sub { margin: 16px 0 8px; font-size: 14px; }
@media (max-width: 1180px) { .pd-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pd-steps { grid-template-columns: 1fr; gap: 10px; } .pd-story { font-size: 14px; } }
