/* Page shell for the web app. Everything visual comes from ds/tokens.css + ds/bundle.css;
   this file only places things on the page and adds the few product classes the bundle
   does not ship (sheet host, print rules). */
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-arabic); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.shell { max-width: 680px; margin: 0 auto; padding: 0 var(--space-5) calc(var(--space-8) + 96px); }
.shell--wide { max-width: 1240px; padding-inline: var(--space-8); }
.app-head { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) 0 var(--space-2); }
.app-head .grow { flex: 1 1 auto; min-width: 0; }
.stack { display: grid; gap: var(--space-4); align-content: start; }
.stack--sm { gap: var(--space-2); }
.flex { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.flex--nowrap { flex-wrap: nowrap; }
.flex--nowrap > * { min-inline-size: 0; }
.spacer { flex: 1 1 auto; }
.lbl { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.note { font-size: 12px; line-height: 20px; color: var(--ink-faint); }
.hidden { display: none !important; }

/* sticky action bar at the bottom of a screen */
.actionbar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 20;
  border-block-start: var(--border-hair) solid var(--rule); background: var(--paper);
  padding: var(--space-3) var(--space-5) calc(var(--space-4) + env(safe-area-inset-bottom));
}
.actionbar__inner { max-width: 680px; margin: 0 auto; display: flex; gap: var(--space-2); align-items: center; }
.actionbar__inner > .grow { flex: 1 1 auto; min-width: 0; }

/* bottom sheet host */
.sheet-host { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-host .mh-scrim { position: absolute; inset: 0; }
.sheet-host .mh-bottomsheet { position: relative; max-height: 88vh; overflow: auto; max-width: 680px; width: 100%; margin: 0 auto; }
.menu-host { position: fixed; inset: 0; z-index: 40; }
.menu-host .mh-menu { position: absolute; }

/* live recording */
.live-area { position: relative; min-height: 40vh; max-height: 56vh; overflow: auto; padding-block: var(--space-2); }
.live-area .mh-live__fade { position: sticky; top: 0; height: 28px; pointer-events: none; background: linear-gradient(to bottom, var(--paper), transparent); }
.live-area .mh-live__flow > span.settled { animation: none; }
.speakerbar { display: flex; gap: var(--space-2); align-items: center; overflow-x: auto; padding-block: var(--space-2); scrollbar-width: none; }
.speakerbar::-webkit-scrollbar { display: none; }

/* editable minutes */
[contenteditable="true"] { outline: none; border-radius: 4px; }
[contenteditable="true"]:focus { box-shadow: 0 0 0 2px var(--focus); background: var(--paper-raised); }
.mh-mline__text[contenteditable] { flex: 1 1 auto; }

/* transcript */
.tx-para.is-active .mh-tx__text { background: var(--mark); border-radius: 4px; }
.tx-para { cursor: pointer; }

/* public page */
.pub-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-10); padding-block: var(--space-8); }
@media (max-width: 900px) { .pub-grid { grid-template-columns: 1fr; gap: var(--space-6); } .shell--wide { padding-inline: var(--space-5); } }

@media print {
  body { background: #fff; }
  .app-head, .actionbar, .no-print, .mh-tabs { display: none !important; }
  .shell { max-width: none; padding: 0; }
  .mh-sheet { box-shadow: none; border: 0; }
}

.mh-item__title[data-placeholder]:empty::before { content: attr(data-placeholder); color: var(--ink-faint); }

.mh-mline__text[data-placeholder]:empty::before { content: attr(data-placeholder); color: var(--ink-faint); }


/* ============ dense shell: sidebar + main, shared by every page ============ */
body.is-dash { font-size: 13px; }
.dash { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.dash__side { position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; background: var(--paper-raised); border-inline-start: var(--border-hair) solid var(--rule); }
.dash__brand { text-decoration: none; padding: 2px 6px 8px; }
.dash__navs { display: grid; gap: 1px; margin-block-start: 4px; }
.dash__nav { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: var(--radius-md); text-decoration: none; color: var(--ink-muted); font-size: 13px; font-weight: 500; }
.dash__nav:hover { background: var(--paper-sunken); color: var(--ink); }
.dash__nav.is-active { background: var(--clay-soft); color: var(--clay-strong); font-weight: 600; }
.dash__nav--sub { padding-block: 5px; font-size: 12.5px; }
.dash__nav .grow { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash__folders { display: grid; gap: 1px; }
.dash__folders-lbl { margin-block-start: 10px; padding-inline: 10px; }
.dash__side-bottom { display: flex; align-items: center; gap: 6px; padding-block-start: 10px; border-block-start: var(--border-hair) solid var(--rule); }
.dash__main { padding: 12px 18px 40px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.page-head__title { font-size: 17px; font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-search { width: min(360px, 40vw); }
.head-search--wide { width: min(520px, 50vw); }
.head-search .mh-search, .head-search .mh-input { min-block-size: 34px; padding-block: 4px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar__sep { width: 1px; height: 18px; background: var(--rule); }
.toolbar__search .mh-search { min-block-size: 30px; padding-block: 2px; width: 200px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { display: block; text-decoration: none; color: inherit; background: var(--paper-raised); border: var(--border-hair) solid var(--rule); border-radius: var(--radius-lg); padding: 10px 14px; border-inline-start: 4px solid var(--rule-strong); }
.stat:hover { background: var(--paper-sunken); }
.stat--clay { border-inline-start-color: var(--clay); } .stat--teal { border-inline-start-color: var(--teal); } .stat--amber { border-inline-start-color: var(--amber); } .stat--danger { border-inline-start-color: var(--danger); }
.stat--danger .stat__num { color: var(--danger); }
.stat__num { font-size: 24px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat__label { font-size: 12.5px; font-weight: 600; color: var(--ink-muted); }
.dash__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.tbl--tasks td:nth-child(2) { min-width: 180px; }
.tbl .acts .mh-iconbtn { width: 24px; height: 24px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 12px; align-items: start; }
.panel { padding: 10px 12px; border-radius: var(--radius-lg); }
.panel--table { padding: 0 4px; }
.panel__head { display: flex; align-items: center; gap: 6px; margin-block-end: 8px; color: var(--ink); }
.panel__title { font-size: 13px; font-weight: 700; }
.panel__link { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--clay); text-decoration: none; }
.panel__link:hover { text-decoration: underline; }
.scroll { max-height: 64vh; overflow: auto; }
.tab-panel { padding-block: 8px; }
.people { display: grid; gap: 2px; }
.person { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--radius-sm); text-decoration: none; color: inherit; font-size: 13px; }
.person:hover { background: var(--paper-sunken); }
.person__n { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 12.5px; }
.kv dt { color: var(--ink-faint); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.marks { display: grid; gap: 2px; }
.mark { display: flex; gap: 8px; padding: 4px 6px; border-radius: var(--radius-sm); text-decoration: none; color: inherit; font-size: 12.5px; }
.mark:hover { background: var(--paper-sunken); }
.mark__t { font-family: var(--font-mono); font-size: 11px; color: var(--clay); direction: ltr; }
.only-mobile { display: none !important; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: start; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-faint); padding: 6px 8px; border-block-end: var(--border-hair) solid var(--rule); white-space: nowrap; position: sticky; top: 0; background: var(--paper-raised); z-index: 1; }
.tbl td { padding: 5px 8px; border-block-end: var(--border-hair) solid var(--rule); vertical-align: middle; line-height: 20px; }
.tbl tbody tr:last-child td { border-block-end: 0; }
.tbl tbody tr:hover td { background: var(--paper-sunken); }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.grp td { background: var(--paper-sunken); font-size: 11px; font-weight: 700; color: var(--ink-faint); padding: 3px 8px; }
.tbl tr.grp--late td { color: var(--danger); }
.tbl td.num { text-align: center; font-variant-numeric: tabular-nums; }
.tbl .title { font-weight: 600; color: var(--ink); outline: none; border-radius: 3px; }
.tbl--meetings td:first-child { max-width: 0; }
.tbl--meetings .title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl--meetings td:nth-child(2) { white-space: nowrap; }
.tbl--tasks .lnk { display: inline-block; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.tbl .title:focus { background: var(--paper-raised); box-shadow: 0 0 0 2px var(--focus); }
.tbl tr.done .title { text-decoration: line-through; color: var(--ink-faint); font-weight: 500; }
.tbl tr.late td.late-txt { color: var(--danger); font-weight: 600; }
.tbl .muted { color: var(--ink-faint); }
.tbl .sub { font-size: 12px; font-weight: 400; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
.tbl .sub mark { background: var(--mark); color: inherit; }
.tbl .cell-edit { cursor: text; }
.tbl .cell-edit:hover { box-shadow: inset 0 -1px 0 var(--rule-strong); }
.tbl input.inline { font: inherit; font-size: 13px; padding: 2px 6px; border: 1px solid var(--clay); border-radius: 6px; background: var(--paper-raised); color: var(--ink); width: 100%; min-width: 80px; outline: none; }
.tbl .check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--rule-strong); background: transparent; color: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tbl .check:hover { border-color: var(--teal); color: var(--teal); }
.tbl .check.is-done { background: var(--teal); border-color: var(--teal); color: var(--on-teal, #fff); }
.tbl .acts { white-space: nowrap; text-align: end; }
.tbl .acts .mh-iconbtn { width: 26px; height: 26px; opacity: 0.45; }
.tbl tr:hover .acts .mh-iconbtn, .tbl .acts .mh-iconbtn.is-on { opacity: 1; }
.tbl .acts .mh-iconbtn.is-on { color: var(--danger); }
.tbl .flag { color: var(--danger); margin-inline-end: 4px; vertical-align: -1px; }
.tbl .lnk { color: var(--clay); text-decoration: none; } .tbl .lnk:hover { text-decoration: underline; }
.tbl .mh-status { font-size: 11px; padding-block: 1px; }
.mh-iconbtn.is-on { color: var(--clay); }

/* component sizes on the dense shell */
body.is-dash .mh-btn { font-size: 13px; min-block-size: 34px; }
body.is-dash .mh-btn--lg { min-block-size: 42px; font-size: 14px; }
body.is-dash .mh-btn--sm { min-block-size: 30px; font-size: 12.5px; padding-inline: 12px; }
body.is-dash .mh-iconbtn { width: 32px; height: 32px; }
body.is-dash .mh-chip { font-size: 12px; min-block-size: 26px; padding-block: 2px; }
body.is-dash .mh-search input, body.is-dash .mh-input { font-size: 13px; }
body.is-dash .mh-input { min-block-size: 34px; padding-block: 4px; }
body.is-dash .mh-tabs { gap: 16px; } body.is-dash .mh-tab { font-size: 13px; padding-block: 8px; }
body.is-dash .mh-mline__text { font-size: 13.5px; line-height: 23px; }
body.is-dash .mh-mline { padding-block: 3px; }
body.is-dash .mh-tx__text { font-size: 14px; line-height: 26px; }
body.is-dash .mh-row__title { font-size: 14px; line-height: 22px; }
body.is-dash .mh-item__title { font-size: 13.5px; line-height: 21px; }
body.is-dash .mh-item { padding: 8px 10px; }
body.is-dash .mh-empty { padding: 18px 12px; } body.is-dash .mh-empty__title { font-size: 14px; } body.is-dash .mh-empty__body { font-size: 12.5px; line-height: 20px; }
body.is-dash .mh-empty__art { margin-block-end: 8px; } body.is-dash .mh-empty__art svg { width: 32px; height: 32px; }
body.is-dash .mh-status { font-size: 11px; }
body.is-dash .mh-callout__body { font-size: 13px; line-height: 20px; } body.is-dash .mh-callout__title { font-size: 13px; }
body.is-dash .mh-provider__title { font-size: 13.5px; } body.is-dash .mh-provider__desc { font-size: 12px; line-height: 18px; }
body.is-dash .mh-field__label { font-size: 12px; }
body.is-dash .t-title-lg, body.is-dash article.mh-sheet h1 { font-size: 20px; line-height: 28px; }
body.is-dash .t-body-lg { font-size: 14px; line-height: 24px; }
body.is-dash .mh-live { font-size: 20px; line-height: 36px; }
body.is-dash .mh-timer--md { font-size: 22px; line-height: 26px; }
body.is-dash .mh-bottomsheet__title { font-size: 16px; }
body.is-dash .mh-progress__step { font-size: 13px; }
body.is-dash .lbl { font-size: 10.5px; }
body.is-dash .note { font-size: 12px; line-height: 18px; }
body.is-dash .actionbar { inset-inline-start: 216px; padding: 8px 18px calc(10px + env(safe-area-inset-bottom)); }
body.is-dash .actionbar__inner { max-width: none; }
body.is-dash .live-area { min-height: 50vh; max-height: calc(100vh - 300px); }
body.is-dash .sheet-host .mh-bottomsheet { max-width: 560px; }

@media (max-width: 1000px) {
  .dash { grid-template-columns: 1fr; }
  .only-mobile { display: inline-flex !important; }
  .dash__side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 10px; border-inline-start: 0; border-block-end: var(--border-hair) solid var(--rule); }
  .dash__side > .mh-btn, .dash__folders-lbl, .dash__folders, .dash__side .spacer { display: none; }
  .dash__brand { padding: 0 4px; margin-inline-end: auto; }
  .dash__navs { display: flex; gap: 2px; margin: 0; }
  .dash__nav span { display: none; } .dash__nav { padding: 7px; }
  .dash__side-bottom { border: 0; padding: 0; }
  .dash__main { padding: 10px 12px 32px; }
  .page-head { flex-wrap: wrap; }
  .head-search, .head-search--wide { width: 100%; order: 9; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dash__grid, .two-col { grid-template-columns: 1fr; }
  .scroll { max-height: none; }
  .tbl--meetings th:nth-child(4), .tbl--meetings td:nth-child(4), .tbl--meetings th:nth-child(6), .tbl--meetings td:nth-child(6), .tbl--meetings th:nth-child(3), .tbl--meetings td:nth-child(3) { display: none; }
  .tbl--tasks th:nth-child(5), .tbl--tasks td:nth-child(5) { display: none; }
  body.is-dash .actionbar { inset-inline-start: 0; }
}
@media print { .dash__side, .page-head, .two-col__side, .mh-tabs, .toolbar { display: none !important; } .dash { display: block; } .dash__main { padding: 0; } }
