/* Every page is one column, at most --size-container-xl wide and centred beside the sidebar, so moving between pages
   keeps the content in place on a wide screen (WI-12421): past that width, the page's side gutter grows, in
   `.wi-app-shell__page` below (100cqi is `.wi-app-shell__main`'s width). A form's card or the Academy keeps its own
   width inside it, on its left edge (views.md, "CSS"). */
.wi-app-shell{grid-template-columns:var(--wi-app-sidebar-width,var(--layout-sidebar)) minmax(0, 1fr);background-color:var(--background-page);min-height:100svh;color:var(--text-primary);font-family:var(--font-family-sans);display:grid}.wi-app-shell__skip:focus{top:var(--space-2);left:var(--space-2);z-index:3;width:auto;height:auto;padding:var(--space-2) var(--space-4);clip:auto;border-radius:var(--radius-md);background-color:var(--background-surface);color:var(--text-primary);font-size:var(--font-size-sm);line-height:var(--font-line-height-sm);font-weight:var(--font-weight-semibold);box-shadow:var(--focus-ring);outline:none;margin:0;text-decoration:none;position:fixed;overflow:visible}.wi-app-shell__sidebar{gap:var(--space-6);box-sizing:border-box;height:100svh;padding:var(--space-5) var(--space-3);border-right:var(--border-1) solid var(--wi-app-canvas-edge,var(--border-default));background-color:var(--wi-app-canvas,var(--background-surface));flex-direction:column;align-self:start;display:flex;position:sticky;top:0;overflow-y:auto}.wi-app-shell__sidebar-footer{padding-top:var(--space-3);border-top:var(--border-1) solid var(--wi-app-canvas-edge,var(--border-subtle));margin-top:auto}.wi-app-shell__column{background-color:var(--wi-app-canvas,var(--background-sunken));flex-direction:column;display:flex}.wi-app-shell__main{flex:1;grid-template:"context""page"1fr/minmax(0,1fr);display:grid;container-type:inline-size}.wi-app-shell__main:focus{outline:none}.wi-app-shell__context{grid-area:context}.wi-app-shell__page{padding:var(--space-8) max(var(--space-10), (100cqi - var(--size-container-xl)) / 2);grid-area:page}@media (width<=767.98px){.wi-app-shell{grid-template-columns:minmax(0,1fr)}.wi-app-shell__sidebar{display:none}.wi-app-shell__page{--wi-app-shell-gutter:var(--space-4);padding:var(--wi-app-shell-gutter)}}


/* The page behind the shell is the shell's canvas, not white: what shows when the page is pulled past its ends, and under
   a phone browser's see-through toolbar (Safari's), below a page shorter than the screen. */
html:has(.wi-app-shell),
body:has(.wi-app-shell) {
  background-color: var(--wi-app-canvas, var(--background-sunken));
}

/* A scrollbar that takes room (Windows, Linux) keeps its room on every page, long or short, so the page column doesn't
   move between them (WI-12421). */
html:has(.wi-app-shell) {
  scrollbar-gutter: stable;
}

/* The bottom bar's strip shows on a phone only, where the sidebar is gone. It is see-through: only the floating tab bar
   inside it shows, held close to the screen's edges and above the home indicator. It is pinned to the screen, as an
   app's tab bar is: pulling the page past its ends moves the page, not the bar. The page keeps the strip's height free
   under its last line (the tab bar's: a 52px icon tab and its padding and borders), and the strip lets taps through to the
   page around the bar. The page starts below the status bar (the viewport covers the whole screen: layouts/application). */
.wi-app-shell {
  /* A tab of the phone's bar: 52px high (BottomTabBar.css), the scale of an app's 49pt tab bar and its home inset. */
  --wi-bottom-tab-height: calc(var(--space-12) + var(--space-1));
  /* The tab bar's card (BottomTabBar.css), which a lesson's dock takes up while someone writes (LessonText.css): its
     height (a tab, its padding and its borders), its look, and its gutter from the screen's sides and bottom. */
  --wi-bottom-tab-bar-card-height: calc(var(--wi-bottom-tab-height) + 2 * var(--space-0-5) + 2 * var(--border-1));
  --wi-bottom-tab-bar-card-border: var(--border-1) solid var(--wi-app-canvas-edge, var(--border-default));
  --wi-bottom-tab-bar-card-radius: var(--radius-3xl);
  --wi-bottom-tab-bar-card-background: var(--background-surface);
  --wi-bottom-tab-bar-card-shadow: var(--shadow-md);
  --wi-bottom-tab-bar-gutter: var(--space-2);
  --wi-bottom-bar-height: calc(var(--space-1) + var(--wi-bottom-tab-bar-card-height) + max(var(--wi-bottom-tab-bar-gutter), env(safe-area-inset-bottom)));
}
.wi-app-shell__bottom-bar {
  display: none;
}
@media (width <= 767.98px) {
  .wi-app-shell__column {
    padding-top: env(safe-area-inset-top);
    padding-bottom: var(--wi-bottom-bar-height);
  }

  .wi-app-shell__bottom-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    padding: var(--space-1) var(--wi-bottom-tab-bar-gutter) max(var(--wi-bottom-tab-bar-gutter), env(safe-area-inset-bottom));
    pointer-events: none;
  }
}

/* The context banner above the page (WIRE looking at a country) runs the column's whole width, its text and its action
   on the page column's edges once the column is capped (100cqi is `.wi-app-shell__main`'s width). */
.wi-app-shell__context > .wi-context-banner {
  padding-inline: max(var(--space-6), (100cqi - var(--size-container-xl)) / 2);
}
