/* Cascade Ridge Finance hub — content styles.
   Statement tables follow the MW financial-package Statements-page standard:
   statement/section headers, indented detail rows, bold top-bordered subtotals,
   tabular numerals, negatives in parentheses, zeros as em-dash. */

table.fs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 4px 0 20px; }
.fs-table th {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: #615D5A; font-weight: 500; text-align: right; padding: 6px 10px 7px;
  border-bottom: 1px solid #E7E1DF; white-space: nowrap;
}
.fs-table th:first-child { text-align: left; }
.fs-table td {
  padding: 4.5px 10px; text-align: right; font-variant-numeric: tabular-nums;
  color: #33302E; white-space: nowrap;
}
.fs-table td:first-child { text-align: left; white-space: normal; }
.fs-stmt td { font-weight: 500; font-size: 13.5px; color: #171412; padding-top: 16px; }
.fs-sec td {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: #615D5A; padding-top: 10px;
}
.fs-ind td:first-child { padding-left: 26px; }
.fs-sub td { font-weight: 500; border-top: 1px solid #C9C2BE; color: #171412; }
.fs-pct td { color: #615D5A; font-size: 11.5px; }
.fs-memo td { color: #615D5A; font-size: 11.5px; }
.fs-check td { color: #52B26E; font-size: 11px; border-top: 1px solid #E7E1DF; }
.fs-scroll { overflow-x: auto; }

/* Period toggle (Month / Quarter / Annual) */
.fs-toolbar { display: flex; align-items: center; gap: 14px; margin: 10px 0 6px; }
.fs-toggle { display: inline-flex; border: 1px solid #E7E1DF; border-radius: 8px; overflow: hidden; }
.fs-toggle button {
  font-family: inherit; font-size: 12px; font-weight: 400; color: #615D5A;
  background: transparent; border: none; padding: 5px 14px; cursor: pointer;
}
.fs-toggle button + button { border-left: 1px solid #E7E1DF; }
.fs-toggle button.active { background: #1F3B2C; color: #FFFCFA; font-weight: 500; }
.fs-toolbar-note { font-size: 11px; color: #A09792; font-style: italic; }
.fs-period { display: none; }
.fs-period.active { display: block; }
/* wide tables: keep the line-item column readable while scrolling */
.fs-period-quarter .fs-table td:first-child, .fs-period-quarter .fs-table th:first-child,
.fs-period-month .fs-table td:first-child, .fs-period-month .fs-table th:first-child {
  position: sticky; left: 0; background: #FDFCFA; min-width: 220px;
}

/* Metric rows (MW Metrics-page pattern: title · description · value · sparkline) */
.mr { padding: 14px 16px; border: 1px solid #E7E1DF; border-radius: 8px; margin-bottom: 10px; }
.mr-title { font-size: 13.5px; font-weight: 500; color: #171412; margin-bottom: 5px; }
.mr-body { display: flex; align-items: center; gap: 20px; }
.mr-desc { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 300; color: #615D5A; line-height: 1.5; }
.mr-right { flex-shrink: 0; text-align: right; display: flex; align-items: center; gap: 14px; }
.mr-nums { text-align: right; }
.mr-val { font-size: 16px; font-weight: 500; color: #171412; font-variant-numeric: tabular-nums; }
.mr-share { font-size: 11.5px; font-weight: 400; color: #615D5A; margin-top: 1px; }
.mr-spark { flex-shrink: 0; }
.mr-tag { display: inline-block; font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 4px; background: rgba(38,24,17,0.05); color: #615D5A; }
.mr-tag.churned { background: rgba(208,74,63,0.10); color: #D04A3F; }
.mr-tag.ramp { background: rgba(82,178,110,0.12); color: #3E8E56; }

/* Budget variance table (MW Budget-page flag shading) */
.bv-alert td { background: rgba(208,74,63,0.07); }
.bv-warn td { background: rgba(226,133,82,0.08); }
.fs-fav { color: #3E8E56; }
.fs-unfav { color: #D04A3F; }

/* Control tab — up-to-date agent state + zero-count */
.cc-uptodate { font-size: 12px; color: #3E8E56; font-weight: 400; }
.cc-upd-count.zero { background: transparent; color: #A09792; }

/* Control tab — agent review accordion (replaces the source-updates drawer) */
.cc-review-btn.sm .cc-acc-chev { width: 13px; height: 13px; vertical-align: -2px; margin-left: 3px; transition: transform 0.15s ease; }
.cc-review-btn.sm.open .cc-acc-chev { transform: rotate(180deg); }
tr.cc-detail > td { padding: 0 0 14px; background: transparent; }
.cc-acc { border: 1px solid #E7E1DF; border-radius: 10px; background: #FDFCFA; padding: 14px 16px; margin: 2px 4px 0; }
.cc-acc-summary { font-size: 12.5px; color: #33302E; font-weight: 300; line-height: 1.5; margin: 0 0 10px; }
.cc-acc-file { display: flex; align-items: center; font-size: 12px; color: #615D5A; font-weight: 500; margin-bottom: 8px; }
.cc-acc-count { margin-left: 8px; background: rgba(38,24,17,0.06); color: #615D5A; font-size: 11px; border-radius: 999px; padding: 0 7px; }
.cc-acc-rows { display: flex; flex-direction: column; gap: 2px; }
.cc-acc-row { display: flex; align-items: center; gap: 14px; padding: 7px 8px; border-radius: 8px; }
.cc-acc-row:hover { background: rgba(38,24,17,0.02); }
.cc-acc-row.accepted { background: rgba(82,178,110,0.08); }
.cc-acc-row.declined { opacity: 0.5; }
.cc-acc-name { flex: 1; font-size: 12.5px; color: #171412; }
.cc-acc-vals { display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.cc-acc-lbl { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: #A09792; }
.cc-acc-from { font-size: 12.5px; color: #615D5A; }
.cc-acc-arrow { color: #A09792; margin: 0 2px; }
.cc-acc-to { font-size: 13px; font-weight: 500; color: #1F3B2C; }
.cc-acc-acts { display: flex; gap: 4px; }
.cc-acc-btn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid #E7E1DF; background: #fff; cursor: pointer; font-size: 12px; line-height: 1; color: #615D5A; }
.cc-acc-btn.ok:hover { border-color: #52B26E; color: #3E8E56; }
.cc-acc-btn.x:hover { border-color: #D04A3F; color: #D04A3F; }
.cc-acc-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #EFEBE7; }
.cc-acc-all { font-family: inherit; font-size: 12px; font-weight: 400; padding: 5px 12px; border-radius: 7px; border: 1px solid #E7E1DF; background: #fff; color: #615D5A; cursor: pointer; }
.cc-acc-all.ok { background: #1F3B2C; color: #FFFCFA; border-color: #1F3B2C; }

/* ── FIN-00 Executive Summary — editable context artifact ── */
.fin-card-summary { border-color: #D8E2D0; background: linear-gradient(180deg, rgba(82,178,110,0.05), rgba(82,178,110,0) 42%); }
.fin-card-summary .card-num { color: #3E8E56; }
.fin-sum-bar { display: flex; align-items: center; gap: 16px; padding: 12px 14px; margin-bottom: 18px;
  border: 1px solid #D8E2D0; background: rgba(82,178,110,0.06); border-radius: 10px; }
.fin-sum-bar.is-editing { border-color: #52B26E; background: rgba(82,178,110,0.12); }
.fin-sum-bar__text { flex: 1; font-size: 12.5px; line-height: 1.5; color: #4A4642; }
.fin-sum-bar__text strong { color: #171412; }
.fin-sum-editbtn { flex: none; font-family: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
  padding: 7px 15px; border-radius: 8px; border: 1px solid #1F3B2C; background: #1F3B2C; color: #FFFCFA; white-space: nowrap; }
.fin-sum-editbtn:hover { background: #274A38; }
.fin-sum-doc.is-editing { outline: 2px dashed #8FCB9F; outline-offset: 10px; border-radius: 6px; }
.fin-sum-doc.is-editing p:hover { background: rgba(82,178,110,0.06); }

/* ── FIN-06 Assumptions — scenario tabs + dials ── */
.scn-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.scn-tab { font-family: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; border: 1px solid #E7E1DF; background: #fff; color: #615D5A; }
.scn-tab:hover { border-color: #C9C2BD; }
.scn-tab.active { background: #1F3B2C; border-color: #1F3B2C; color: #FFFCFA; }
.dials-grid { border: 1px solid #EFEBE7; border-radius: 10px; overflow: hidden; margin: 18px 0 4px; }
.dial-group { display: flex; align-items: baseline; gap: 8px; padding: 9px 14px; background: #F7F5F2;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #7A736B;
  border-top: 1px solid #EFEBE7; }
.dials-grid .dial-group:first-child { border-top: none; }
.dg-meta { text-transform: none; letter-spacing: 0; font-weight: 400; color: #A09792; }
.dial-row { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 14px; border-top: 1px solid #F2EEEA; }
.dial-k { font-size: 12.5px; color: #4A4642; }
.dial-val { font-size: 12.5px; font-weight: 500; color: #2F6BD6; font-variant-numeric: tabular-nums;
  white-space: nowrap; padding: 1px 6px; border-radius: 5px; }
.dial-val.dial-changed { color: #B4531F; background: rgba(180,83,31,0.09); font-weight: 600; }
.dials-grid.is-editing .dial-val { outline: 1px solid #8FCB9F; background: rgba(82,178,110,0.07); cursor: text; }
.dials-grid.is-editing .dial-val:focus { outline: 2px solid #52B26E; background: #fff; }

/* ── FIN-07 Insights — sensitivity bars ── */
.sens { border: 1px solid #EFEBE7; border-radius: 10px; overflow: hidden; margin: 16px 0 6px; }
.sens-row { display: grid; grid-template-columns: 1.7fr 0.7fr 2.2fr 1fr; align-items: center; gap: 14px;
  padding: 9px 14px; border-top: 1px solid #F2EEEA; }
.sens-row:first-child { border-top: none; }
.sens-head { background: #F7F5F2; font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: #7A736B; }
.sens-k { font-size: 12.5px; color: #4A4642; }
.sens-shock { font-size: 11.5px; color: #7A736B; font-variant-numeric: tabular-nums; }
.sens-cash { font-size: 12.5px; font-weight: 500; color: #171412; text-align: right; font-variant-numeric: tabular-nums; }
.sens-head .sens-cash { font-weight: 600; color: #7A736B; }
.sens-bar { position: relative; display: flex; align-items: center; gap: 8px; height: 18px; }
.sens-fill { height: 14px; border-radius: 3px; background: #C6533F; min-width: 2px; }
.sens-fill--nil { background: transparent; }
.sens-num { font-size: 12px; font-weight: 600; color: #171412; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sens-num--nil { font-weight: 400; color: #A09792; font-style: italic; }

/* ── Model tile — quick-open buttons ── */
.model-open-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.model-open-btn { font-family: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
  padding: 7px 14px; border-radius: 8px; border: 1px solid #E7E1DF; background: #fff; color: #1F3B2C; }
.model-open-btn:hover { border-color: #1F3B2C; background: rgba(31,59,44,0.05); }

/* ── Model tab — workbook canvas (left menu + Data grid) ── */
.mdl { display: flex; flex-direction: column; gap: 14px; }
.mdl__topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 2px 2px 14px; border-bottom: 1px solid #EFEBE7; }
.mdl__src { display: flex; align-items: center; gap: 10px; color: #171412; min-width: 0; }
.mdl__model-titles { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mdl__model-t { font-size: 16px; font-weight: 500; color: #171412; }
.mdl__model-sub { font-size: 12px; color: #A09792; }
.mdl__sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #3E8E56; flex: none; }
.mdl__sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #52B26E; }
.mdl__body { display: flex; gap: 16px; align-items: flex-start; }
.mdl__menu { flex: 0 0 210px; min-width: 0; display: flex; flex-direction: column; gap: 10px;
  background: transparent; overflow: hidden; }
/* Minimal, flat groups — no cards. */
.mdl__sec { display: flex; flex-direction: column; gap: 1px; min-width: 0;
  border: none; border-radius: 0; padding: 0; background: transparent; }
.mdl__sec--modeled .mdl__filechip { color: #4A3F63; }
.mdl__sec--modeled .mdl__filechip svg { color: #7A6BA0; }
.mdl__filechip { display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0; background: transparent;
  border: none; cursor: pointer; padding: 4px 4px 5px; color: #171412; font-family: inherit;
  font-size: 12.5px; font-weight: 500; }
.mdl__filechip:hover { color: #000; }
.mdl__filechip:hover .mdl__filechip-chev { color: #8A827C; }
.mdl__filechip svg { flex: none; color: #6E6A66; }
.mdl__filechip-name { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdl__filechip .mdl__sync-dot { flex: none; }
/* Accordion caret on the right, muted. */
.mdl__filechip-chev { flex: none; display: grid; place-items: center; color: #C4BDB6; margin-left: 2px; }
.mdl__tab { display: block; width: 100%; max-width: 100%; font-family: inherit; font-size: 12.5px; text-align: left; cursor: pointer;
  padding: 3px 8px 3px 24px; border-radius: 6px; border: none; background: transparent; color: #4A4642;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mdl__tab:hover { background: rgba(38,24,17,0.05); }
/* Selected tab — subtle, not a filled slab (may be ~100 tabs on a page). */
.mdl__tab.is-active { background: rgba(31,59,44,0.09); color: #1F3B2C; font-weight: 600; }
/* Single-sheet source: the file row itself is the selectable tab. */
.mdl__filechip--lone { border-radius: 6px; }
.mdl__filechip--lone:hover { background: rgba(38,24,17,0.05); }
.mdl__filechip--lone.is-active { background: rgba(31,59,44,0.09); color: #1F3B2C; }
.mdl__filechip--lone.is-active svg { color: #1F3B2C; }
.mdl__canvas { flex: 1; min-width: 0; border: 1px solid #EFEBE7; border-radius: 12px; overflow: hidden; background: #fff;
  container-type: inline-size; container-name: mdl-canvas; }
/* Collections: no card chrome on desktop; mobile drawer forces a white panel. */
.mdl__canvas--flat { border: none; background: transparent; box-shadow: none; overflow: visible; }
/* Drawer chrome — only shown on mobile (see @media below). */
.mdl__drawer-head, .mdl__scrim { display: none; }
.mdl__canvas-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 14px; border-bottom: 1px solid #EFEBE7; }
.mdl__eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: #A09792; font-weight: 600; margin-bottom: 3px; }
.mdl__sheet-name { font-size: 15px; font-weight: 500; color: #171412; }
.mdl__faces { display: inline-flex; border: 1px solid #E7E1DF; border-radius: 7px; padding: 2px; background: #fff; flex: none; }
.mdl__faces button { background: transparent; border: none; padding: 5px 11px; font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: #615D5A; cursor: pointer; border-radius: 5px; font-family: inherit; }
.mdl__faces button.active { background: #171412; color: #FFFCFA; }
.mdl__faces button:not(.active):hover { color: #171412; }
.mdl__data-meta { padding: 8px 14px; font-size: 11.5px; color: #A09792; font-variant-numeric: tabular-nums; border-bottom: 1px solid #F2EEEA; }
.mdl__grid-wrap { overflow-x: auto; }
/* Model DP faces — Context / Control / Artifact */
.mdl-face { padding: 6px 20px 24px; max-width: 720px; }
.mdl-face__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: #7A736B; font-weight: 600; margin: 16px 0 5px; }
.mdl-face__p { font-size: 13px; line-height: 1.6; color: #4A4642; margin: 0; }
.mdl-face__p strong { color: #171412; font-weight: 500; }
.mdl-pill { display: inline-block; font-size: 10px; font-weight: 600; color: #854F0B; background: rgba(239,159,39,0.16); border-radius: 999px; padding: 1px 8px; margin-right: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.mdl-kind { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 1px 9px; }
.mdl-kind--a { color: #26215C; background: rgba(83,74,183,0.12); }
.mdl-kind--o { color: #0F6E56; background: rgba(29,158,117,0.12); }
.mdl-artifact { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 60px 24px; }
.mdl-artifact__ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #F5F3EF; color: #7A736B; }
.mdl-artifact__t { font-size: 15px; font-weight: 500; color: #171412; }
.mdl-artifact__s { font-size: 13px; line-height: 1.6; color: #7A736B; max-width: 380px; margin: 0 0 6px; }
.mdl__grid { border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.mdl-cell { border-right: 1px solid #F2EEEA; border-bottom: 1px solid #F2EEEA; padding: 4px 10px;
  font-size: 12px; color: #2B2724; white-space: nowrap; max-width: 220px; overflow: hidden;
  text-overflow: ellipsis; background: #fff; }
.mdl-cell--num { text-align: right; }
.mdl-cell--label { position: sticky; left: 0; z-index: 2; background: #FCFAF8; color: #171412;
  font-weight: 500; border-right: 1px solid #E7E1DF; min-width: 150px; }
.mdl-row--head .mdl-cell { position: sticky; top: 0; z-index: 3; background: #F7F5F2; color: #615D5A;
  font-weight: 600; border-bottom: 1px solid #E7E1DF; }
.mdl-row--head .mdl-cell--label { z-index: 4; }

/* Model Artifact face — atomic formatted statement */
.mdl-stmt-wrap { padding: 14px 16px 20px; }
.mdl-stmt-wrap .fs-toolbar { margin-bottom: 12px; }

/* Model menu — accordion sections (Excel model / Proxa model) */
.mdl__sec-head { display: flex; align-items: center; gap: 6px; width: 100%; background: transparent;
  border: none; cursor: pointer; padding: 6px 8px 7px; font-family: inherit; color: #7A736B;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.mdl__sec-head:hover { color: #171412; }
.mdl__sec-label { flex: 1; text-align: left; }
.mdl__sec-count { font-weight: 500; color: #A09792; }
.mdl__sec-note { font-size: 10.5px; line-height: 1.5; color: #A09792; padding: 5px 10px 3px; }

/* Tool data products (Calendar / Lists) — reuse the model DP shell. */
.tooldp__canvas { overflow: visible; }
.tooldp__body { min-width: 0; }
.tooldp__artifact { padding: 0; }

/* ── Worksheet document shell for tool data products (Calendar / Lists) ── */
.dps { display: flex; flex-direction: column; min-width: 0; margin: -2px; }
/* Header */
.dps__head { display: flex; align-items: center; gap: 12px; padding: 4px 2px 14px; }
.dps__back { display: grid; place-items: center; width: 30px; height: 30px; border: none; background: transparent; color: #615D5A; border-radius: 7px; cursor: pointer; }
.dps__back:hover { background: rgba(38,24,17,0.05); }
.dps__docico { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #E7E1DF; border-radius: 8px; color: #615D5A; background: #fff; }
.dps__titles { min-width: 0; flex: 1; }
.dps__crumb { font-size: 11.5px; color: #A09792; margin-bottom: 1px; }
.dps__title { font-size: 17px; font-weight: 600; color: #171412; letter-spacing: -0.01em; }
.dps__headright { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.dps__author { font-size: 12px; color: #A09792; white-space: nowrap; }
.dps__gov { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #615D5A; }
.dps__more { border: none; background: transparent; color: #615D5A; cursor: pointer; font-size: 14px; letter-spacing: 1px; padding: 4px 6px; border-radius: 6px; }
.dps__more:hover { background: rgba(38,24,17,0.05); }
/* Toolbar. The formatting controls are decorative — on narrow panes they
   clip behind the (functional) face toggle instead of wrapping into a
   multi-row mess. */
.dps__toolbar { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-top: 1px solid #EFEBE7; border-bottom: 1px solid #EFEBE7; min-width: 0; }
.dps__tb-left { display: flex; align-items: center; gap: 2px; color: #615D5A; flex-wrap: nowrap; overflow: hidden; flex: 1 1 auto; min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.dps__tb-btn { display: inline-flex; align-items: center; gap: 3px; min-width: 26px; height: 28px; justify-content: center; padding: 0 7px; border-radius: 6px; font-size: 13px; color: #4A4642; cursor: default; user-select: none; flex: none; white-space: nowrap; }
.dps__tb-btn:hover { background: rgba(38,24,17,0.04); }
.dps__tb-txt { font-size: 13px; color: #4A4642; }
.dps__cx { display: inline-block; width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 4px solid currentColor; opacity: 0.6; margin-left: 2px; }
.dps__tb-sep { width: 1px; height: 18px; background: #E7E1DF; margin: 0 5px; }
/* Face toggle — the one functional control, styled to match the toolbar's flat
   text buttons; the active view is marked by a quiet underline, not a filled pill. */
.dps__facetoggle { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; flex: none; }
/* Same style as Comments / Details / Version History (the .dps__tb-btn text buttons). */
.dps__face { position: relative; border: none; background: transparent; padding: 0 7px; height: 28px;
  display: inline-flex; align-items: center; font-family: inherit; font-size: 13px; font-weight: 400;
  color: #4A4642; cursor: pointer; border-radius: 6px; }
.dps__face:hover { background: rgba(38,24,17,0.04); }
.dps__face.is-active { color: #171412; font-weight: 500; background: rgba(38,24,17,0.04); }
/* Body */
.dps__body { padding: 16px 2px 4px; min-width: 0; }
.dps__section { font-size: 11px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: #A09792; margin-bottom: 10px; }
.dps__artifact { }
/* Spreadsheet grid */
/* Scrolls like Google Sheets when the table is bigger than the pane, but the
   table itself is bounded to the data + 1 extra row/column. */
.ws-grid-wrap { display: inline-block; vertical-align: top; max-width: 100%; max-height: 62vh;
  overflow: auto; border: 1px solid #E3DED9; border-radius: 8px; }
.ws-grid { border-collapse: separate; border-spacing: 0; font-size: 12.5px; table-layout: fixed; }
.ws-grid th, .ws-grid td { border-right: 1px solid #ECE7E2; border-bottom: 1px solid #ECE7E2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* sticky column-letter header + row-number gutter */
.ws-colh { position: sticky; top: 0; z-index: 2; height: 26px; padding: 0 8px; background: #F5F2EF;
  color: #8A827C; font-weight: 500; font-size: 11.5px; text-align: center; }
.ws-rowh { position: sticky; left: 0; z-index: 2; background: #F5F2EF; color: #A09792; font-size: 11px; text-align: center; }
.ws-corner { position: sticky; top: 0; left: 0; z-index: 3; background: #F5F2EF; }
.ws-cell { height: 26px; padding: 3px 8px; color: #33302E; background: #fff; }
.ws-cell--head { font-weight: 600; color: #171412; }

/* Worksheet shell inside the Model canvas card */
.mdl__canvas .dps { margin: 0; padding: 8px 14px 14px; }

/* Google-Sheets-style sticky sheet-tab footer */
.dps__footer { display: flex; align-items: center; gap: 4px; margin-top: 10px; padding: 8px 2px 0;
  border-top: 1px solid #EFEBE7; overflow-x: auto; }
.dps__foot-btn { display: grid; place-items: center; width: 26px; height: 26px; border: none;
  background: transparent; color: #615D5A; border-radius: 6px; cursor: pointer; flex: none; }
.dps__foot-btn:hover { background: rgba(38,24,17,0.05); }
.dps__foot-sep { width: 1px; height: 18px; background: #E7E1DF; margin: 0 4px; flex: none; }
.dps__foot-tabs { display: flex; align-items: flex-end; gap: 2px; min-width: 0; }
.dps__stab { flex: none; border: none; background: transparent; padding: 6px 14px; font-family: inherit;
  font-size: 12.5px; color: #615D5A; cursor: pointer; border-radius: 8px 8px 0 0; white-space: nowrap; }
.dps__stab:hover { background: rgba(38,24,17,0.04); }
.dps__stab.is-active { background: #fff; color: #171412; font-weight: 500;
  border: 1px solid #E7E1DF; border-bottom: 2px solid #1F3B2C; }

/* Model DP: the grid hugs its content so the card hugs the grid (bottom padding
   matches the right). Tall sheets scroll internally rather than growing the page
   or leaving an empty band below the last row. */
.mdl__canvas .ws-grid-wrap { max-height: calc(100vh - 220px); }

/* Narrow DP canvas (tablet two-pane layouts): the author byline gives its
   space back to the document title. */
@container mdl-canvas (max-width: 560px) {
  .dps__author { display: none; }
}

/* ── Mobile (≤1024px) — menu is the page; canvas opens as a right drawer ── */
@media (max-width: 1024px) {
  .mdl__body { flex-direction: column; gap: 12px; }
  .mdl__menu { flex: none; width: 100%; overflow-y: visible;
    border-bottom: none; padding-bottom: 0; }

  /* Right-side canvas drawer */
  .mdl__scrim {
    display: block; position: fixed; inset: 0; z-index: 40;
    background: rgba(23, 20, 18, 0.36); opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease; }
  .mdl__scrim.is-open { opacity: 1; pointer-events: auto; }

  .mdl__canvas {
    position: fixed; top: 0; right: 0; height: 100dvh; width: 100%;
    z-index: 41; margin: 0; border-radius: 0; border: none;
    background: #fff !important; box-shadow: none;
    overflow-x: hidden; overflow-y: auto;
    visibility: hidden; pointer-events: none;
    transform: translateX(100%);
    transition: transform 0.25s ease, box-shadow 0.25s ease, visibility 0s linear 0.25s;
    container-type: inline-size; container-name: mdl-canvas; }
  .mdl__canvas.is-open {
    visibility: visible; pointer-events: auto;
    transform: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, visibility 0s;
    box-shadow: -12px 0 40px rgba(23, 20, 18, 0.18); }
  .mdl__canvas--flat { overflow-y: auto; }

  .mdl__drawer-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 2; padding: 14px 16px;
    background: #fff; border-bottom: 1px solid #EFEBE7; }
  .mdl__drawer-title {
    flex: 1; min-width: 0; font-size: 15px; font-weight: 550; color: #171412;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mdl__drawer-close {
    flex: none; width: 32px; height: 32px; display: grid; place-items: center;
    border: none; border-radius: 8px; background: transparent; color: #615D5A;
    font-size: 22px; line-height: 1; cursor: pointer; font-family: inherit; padding: 0; }
  .mdl__drawer-close:hover { background: rgba(38, 24, 17, 0.06); color: #171412; }

  .mdl__tab { padding: 6px 8px 6px 24px; }

  .mdl__topbar { flex-wrap: wrap; }
  .mdl__canvas-head { flex-wrap: wrap; gap: 10px; }
  .mdl-face { padding: 6px 14px 20px; }

  /* Document-shell header: truncate the title instead of wrapping mid-word;
     the author byline goes — the owner still shows in Details. */
  .dps__head { gap: 10px; }
  .dps__titles { flex: 1; }
  .dps__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dps__author { display: none; }
  .dps__headright { gap: 8px; }

  /* Toolbar: the decorative formatting controls don't fit on a phone — keep
     only the functional face toggle (Data / Artifact / Control / Context). */
  .dps__tb-left { display: none; }
  .dps__facetoggle { margin-left: 0; flex-wrap: wrap; }
  .dps__toolbar { overflow-x: auto; }

  /* Spreadsheet grid: full-width block that scrolls both ways internally. */
  .ws-grid-wrap { display: block; }
  .mdl__canvas .ws-grid-wrap { max-height: calc(100dvh - 180px); }

  /* Statement tables already scroll via .fs-scroll; keep the sticky label
     column narrower so numbers stay visible next to it. */
  .fs-period-quarter .fs-table td:first-child, .fs-period-quarter .fs-table th:first-child,
  .fs-period-month .fs-table td:first-child, .fs-period-month .fs-table th:first-child {
    min-width: 150px;
  }
}
