/* The shell: sidebar footer, top bar, content column, the loading scaffold and the first paint.
   Loaded after ds/css/tokens.css and ds/css/app.css; only what fasset-ds
   does not already say lives here. */

body {
  overflow-x: hidden;
}
/* The name: a link to Settings with one business, the switch-business
   control with several. ds draws it; this only strips button chrome and
   keeps the ds focus ring (ink), not a green one. */
.workspace {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  font: inherit;
}
.workspace:hover,
.workspace[aria-expanded="true"] { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.workspace-row {
  position: relative;
}
.topbar {
  padding-inline: max(var(--content-pad), calc((100% - var(--content-max)) / 2));
}
.content {
  padding: 0 var(--content-pad) var(--space-40);
}
/* Wraps, because it holds two buttons and a timestamp and at 375 it had no way
   to break: the timestamp took three lines and the row grew to 56px to hold a
   12px string. The row-gap is the same 8 the row already uses across. */
.page-actions {
  flex-wrap: wrap;
}
/* The gear is its own button (ds .ws-gear: 34px, the ds hover, a paper
   rect while Settings is open), beside the name rather than inside it. */
/* On Settings the name and the gear are one card: the row carries the paper surface and shadow the nav's current
   item has, and the gear's own paper rect gives way to it so there is one surface, not two. */
.workspace-row { border-radius: var(--r-card); }
.shell:not(.collapsed) .workspace-row { padding-right: var(--space-4); }
.workspace-row.active { background: var(--surface); box-shadow: var(--elev-1); }
/* One interactive unit, one hover: the name and the gear are one row, so the row takes the hover and neither part draws its own
   (they highlighted separately, two surfaces for one place to go). */
.workspace-row:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.workspace-row.active:hover { background: var(--surface); }
.workspace-row .workspace:hover,
.workspace-row .ws-gear:hover { background: transparent; }
.workspace-row:hover .ws-gear { color: var(--text-default); }
.workspace-row.active .ws-gear.active { background: transparent; box-shadow: none; }
.ws-gear:focus-visible { outline-offset: 0; }
.shell.collapsed .ws-gear { display: none; }
.shell.collapsed .workspace { flex: none; }
/* Switch business (two or more businesses): ds Popover .ov-choices rows,
   the open one ticked; only the avatar's size is ours. */
.ws-switch-avatar { width: 22px; height: 22px; font-size: 10px; }
/* ————— data-source bar —————
   Says whether the numbers on screen came from business-banking-service or
   from js/data.js's prototype data. Deliberately not dismissible: a demo
   that forgets which one it is showing is how invented figures get quoted. */
.data-source-bar strong { color: var(--text-default); font-weight: 500; }
.data-source-bar[data-mode="service"] strong { color: var(--accent); }
.data-source-bar[data-mode="prototype"] { background: var(--warning-tint); }
.data-source-bar[data-mode="prototype"] strong { color: var(--warning); }
/* ————— verified-account loading scaffold —————
   This reserves the exact two-column product shape without rendering a
   business name, amount, capability or usable control before verification. */
.loading-shell {
  position: relative;
  display: flex;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at -4% -12%, color-mix(in oklab, var(--accent) 7%, transparent), transparent 60%),
    var(--bg-sunken);
}
.loading-rail {
  width: 240px;
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  padding: var(--space-20) var(--space-16);
}
.loading-brand { display: flex; align-items: center; gap: var(--space-10); height: 24px; }
.loading-mark,
.loading-line,
.loading-workspace,
.loading-toolbar,
.loading-wordmark {
  display: block;
  background: color-mix(in oklab, var(--text-faint) 18%, var(--surface));
  background-image: linear-gradient(100deg, transparent 20%, color-mix(in oklab, var(--surface) 82%, transparent) 46%, transparent 72%);
  background-size: 220% 100%;
  animation: loading-shimmer 1.8s var(--ease) infinite;
}
.loading-mark { width: 18px; height: 18px; border-radius: var(--r-tag); }
.loading-wordmark { width: 118px; height: 12px; border-radius: var(--r-tag); }
.loading-nav { display: grid; gap: var(--space-16); margin-top: 52px; padding: 0 var(--space-10); }
.loading-line { width: 100%; height: 10px; border-radius: var(--r-tag); }
.loading-line-short { width: 40%; }
.loading-line-medium { width: 68%; }
.loading-workspace { width: 72%; height: 34px; border-radius: var(--r-card); margin-top: auto; }
.loading-paper {
  min-width: 0;
  flex: 1;
  margin: var(--space-8) var(--space-8) var(--space-8) 0;
  border-radius: var(--r-surface);
  background: var(--bg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.loading-toolbar { width: 180px; height: 30px; border-radius: 999px; margin: var(--space-12) var(--space-24) var(--space-10) auto; }
.loading-content { max-width: 1040px; margin: 0 auto; padding: 34px var(--space-40) var(--space-40); }
.loading-title { width: 184px; height: 30px; }
.loading-subtitle { width: 260px; height: 14px; margin-top: var(--space-12); }
.loading-body { display: grid; gap: var(--space-20); margin-top: 76px; }
.loading-body .loading-line { height: 48px; border-radius: var(--r-card); }
.loading-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.loading-retry {
  position: fixed;
  bottom: var(--space-24);
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-13);
  color: var(--text-subtle);
}
@keyframes loading-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
@media (max-width: 640px) {
  .loading-rail { width: 64px; flex-basis: 64px; padding: var(--space-20) var(--space-12); }
  .loading-wordmark, .loading-nav .loading-line, .loading-workspace { display: none; }
  .loading-brand { justify-content: center; }
  .loading-paper { margin-left: 0; }
  .loading-content { padding-inline: var(--space-20); }
}
@media (prefers-reduced-motion: reduce) {
  .loading-mark,
    .loading-line,
    .loading-workspace,
    .loading-toolbar,
    .loading-wordmark { animation: none; background-image: none; }
  /* D13: the boot sequence keeps opacity, drops movement. The veil's own
       animation is already opacity-only, so it is untouched; the sidebar
       content's rise-in carries a translateY, which this replaces with a
       plain fade at the same duration/delay/fill-mode. */
  .shell.boot .sidebar-head,
    .shell.boot .nav-group,
    .shell.boot .workspace-row { animation-name: fade-in-only; }
}
@keyframes fade-in-only { from { opacity: 0; } to { opacity: 1; } }
/* The phone drawer's button exists only where the sidebar does not. */
.nav-open { display: none; margin-inline-end: auto; }
.nav-scrim { display: none; }
@media (max-width: 640px) {
  .shell { min-height: 100dvh; height: 100dvh; }
  .nav-open { display: inline-flex; }
  /* Under 640px the sidebar is a drawer from the left: off screen until the
     menu button opens it, over a scrim, on the drawer curve. */
  .shell .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: var(--z-panel);
    width: min(280px, 84vw);
    background: var(--bg-sunken);
    box-shadow: var(--elev-3);
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform var(--dur-exit) var(--ease), visibility 0s var(--ease) var(--dur-exit);
  }
  .shell.nav-drawer .sidebar {
    transform: none;
    visibility: visible;
    transition: transform var(--dur-enter) var(--ease-drawer), visibility 0s;
  }
  .shell.collapsed .sidebar { width: min(280px, 84vw); }
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: var(--z-scrim);
    background: var(--scrim);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-exit) var(--ease);
  }
  .shell.nav-drawer .nav-scrim { opacity: 1; pointer-events: auto; transition-duration: var(--dur-enter); }
  .sidebar-toggle { display: none; }
  .main { margin: 0; border-radius: 0; }
  .topbar { padding-inline: var(--space-14); }
  .search-affordance { min-width: 36px; width: 36px; padding: var(--space-8); justify-content: center; }
  .search-affordance span, .search-affordance kbd { display: none; }
  .content { padding: 0 var(--space-14) var(--space-24); }
  .page-head { padding: var(--space-24) 0 var(--space-32); flex-wrap: wrap; }
  .page-head h1 { font-size: var(--text-24); }
  .page-actions { width: 100%; }
}
.notif-pref { justify-content: space-between; }

/* Keep the title and funding actions inside the content column at medium widths. */
@media (max-width: 900px) {
  .page-head { flex-wrap: wrap; }
  .page-actions { max-width: 100%; }
}

/* Mid widths: the sidebar folds to icons so tables keep their columns (Pilgrim comparison, 2026-10-20). The
   same fold as the sidebar's own collapse button, drawn by width instead. The labels are clipped rather than
   removed, so each item keeps its name for a screen reader. Above the small breakpoint and below the large one
   (641 to 1099px); at 640px and under the phone drawer takes over. */
@media (min-width: 641px) and (max-width: 1099px) {
  .shell .sidebar { width: 64px; }
  .shell .nav-item { justify-content: center; padding: var(--space-6) 0; }
  .shell .nav-item span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .shell .wordmark, .shell .ws-meta, .shell .ws-gear { display: none; }
  .shell .sidebar-head { justify-content: center; padding-left: var(--space-16); }
  .shell .nav-group-label { visibility: hidden; height: var(--space-8); padding: 0; }
  .shell .workspace { flex: none; }
  .shell .workspace-row { flex-direction: column; gap: var(--space-2); }
}

/* A dot at the end of a nav entry: something there is waiting for this person. It never stands alone, since the entry's
   name and its aria-label say what. */
.nav-dot {
  flex: none; margin-left: auto;
  width: var(--space-8); height: var(--space-8);
  border-radius: 50%; background: var(--st-warning);
}

/* The note a pending invitation draws above the page head (js/invitation-banner.js): the design root's callout, set in from the top
   edge since the content area has no top padding of its own. */
[data-invitation-banners]:not(:empty) { padding-top: var(--space-16); }

/* Due's terms notice: the design root's callout, with its sentence, its link and the one button laid out in a column. */

/* The shared SVG symbol sheet (js/app.js BRAND_DEFS): present for <use>, takes no room. */
.brand-defs { position: absolute; }
/* The hidden frame recovery codes are printed from (js/recovery-codes.js): no size, no border, out of the way. */
.print-frame { position: fixed; right: 0; bottom: 0; width: 0; height: 0; border: 0; }

/* Held for one frame while a screen is drawn, so the title and controls play their entrance again. */
.entrance-restart { animation: none; }
