/* Self-hosted faces (src/mkt/app/web/static/vendor/VENDORED.md). */
@font-face { font-family: "Bricolage Grotesque"; src: url("/static/vendor/fonts/BricolageGrotesque-Variable.ttf") format("truetype"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/static/vendor/fonts/Figtree-Variable.ttf") format("truetype"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/static/vendor/fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/static/vendor/fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* Portal-wide rules the design system's bundle does not cover. Values come from design/system/project/tokens.css. */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.page-header p { color: var(--muted); }
.brand { display: inline-flex; align-items: center; gap: var(--s1); color: var(--fg); text-decoration: none; }
.brand-mark { height: 22px; width: auto; }
.brand-mark .ink { fill: currentColor; }
.brand-mark .dot { fill: var(--accent-fill); }
.panel .empty { display: grid; gap: var(--s1); justify-items: start; padding: var(--s3); }
/* The shell (AppShell board): the sidebar's background runs the full height of the window. */
.shell { min-height: 100vh; }
.sidebar { min-height: 100vh; }

/* The top bar's pop-overs: company switcher, Search and the account menu (details/summary, no script). */
.topbar-pop { position: relative; }
.topbar-pop > summary { list-style: none; cursor: pointer; }
.topbar-pop > summary::-webkit-details-marker { display: none; }
.topbar-pop > .menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; }
.company-switcher > .menu { right: auto; left: 0; }
.account-panel { width: 300px; }
.menu-header .menu-header-note { margin-top: 6px; }
.search-panel { width: 320px; padding: var(--s15); gap: var(--s1); }
.search-panel .input { max-width: none; }
.search-note { margin: 0; color: var(--muted); }
.account-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 767px) {
  /* The phone board: no company switcher, the account menu is the avatar alone. */
  .company-switcher { display: none; }
  .account-menu > .switcher { padding: 0; border-color: transparent; background: transparent; width: var(--control-h); justify-content: center; }
  .account-menu .account-name { display: none; }
  .account-panel { width: min(300px, calc(100vw - 32px)); }
  .search-panel { width: min(320px, calc(100vw - 32px)); }
}

/* htmx indicators: the rules htmx would inject as a <style> (blocked by the CSP: style-src 'self'). The meta tag in
   base.html turns the injection off (htmx.config.includeIndicatorStyles). */
.htmx-indicator { opacity: 0; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; transition: opacity 200ms ease-in; }

/* The design system's `.cell-primary` is a grid meant for a `div` inside a cell. On a `td` itself it stops being a table
   cell, keeps the fixed row height (48px) and its two lines overflow the row: the scroll box of `.table-wrap` then
   cuts the table. Keep the cell a cell and stack its lines. */
.table td.cell-primary { display: table-cell; }
.table td.cell-primary > strong, .table td.cell-primary > small { display: block; }
.table td.cell-primary > small { margin-top: 2px; }
