/* Shared inner-page layout: a full-width top bar over one centered page column.
   Only the column scrolls; sizes and colors come from ui-tokens.css. */
.inner-page {
  --page-width: var(--content-width);
  overflow: hidden;
}
.inner-layout {
  position: relative;
  display: grid;
  /* The column takes up to --page-width; the gutters keep at least their minimum
     and absorb the rest, so nothing here is wider than the window. */
  grid-template-columns: minmax(var(--content-gutter), 1fr) minmax(0, var(--page-width)) minmax(var(--content-gutter), 1fr);
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  width: 100%;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding: calc(env(safe-area-inset-top, 0px) + var(--topbar-top)) 0 var(--content-bottom);
}

/* Top bar: menu, brand, then language and home on the right; no background or rule. */
.site-topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--topbar-gap);
  height: var(--topbar-height);
  padding: 0 var(--topbar-padding);
  color: var(--color-ink);
}
.topbar-button {
  appearance: none;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--hit-size);
  height: var(--hit-size);
  padding: 0;
  border: 0;
  border-radius: var(--radius-round);
  background: transparent;
  color: var(--color-ink);
  cursor: pointer;
}
.topbar-button img { display: block; width: var(--icon-size); height: var(--icon-size); }
.inner-page .topbar-button:focus-visible { outline: 1px solid var(--color-ink); outline-offset: -3px; }
.page-brand {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: var(--brand-gap);
  min-width: 0;
  margin-left: calc(4 * var(--u));
  margin-right: auto;
}
/* Raised so the lotus body, not the image with the dot above it, sits on the bar's middle line
   with the wordmark and the icons. */
.page-brand-logo { display: block; flex: none; width: auto; height: var(--brand-logo-height); transform: translateY(calc(var(--brand-logo-height) * -.095)); }
/* The wordmark is outlined Quicksand (an image), so no web font is needed. When the bar is too
   narrow (zoomed phones, large default font) it shrinks to the space left instead of running under
   the home icon; object-fit keeps its proportions, pinned left beside the lotus. */
.page-brand-name { display: block; flex: 0 1 auto; min-width: 0; width: auto; height: var(--brand-text-height); object-fit: contain; object-position: left center; }

/* Language menu (hidden until multilingual pages exist). */
.language-switch { position: relative; flex: none; }
.language-switch[hidden], .language-menu[hidden] { display: none; }
.language-toggle[aria-expanded="true"] { background: var(--color-pressed); }
.language-menu {
  position: absolute;
  z-index: 3;
  top: calc(100% + 4 * var(--u));
  right: calc(-4 * var(--u));
  width: var(--menu-width);
  margin: 0;
  padding: calc(6 * var(--u)) 0;
  list-style: none;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-menu);
  background: var(--color-paper);
  box-shadow: var(--shadow-menu);
}
.language-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--hit-size);
  padding: 0 calc(18 * var(--u));
  color: var(--color-ink);
  font-size: var(--menu-item-size);
  text-decoration: none;
}
.language-item[aria-disabled="true"] { color: var(--color-disabled); }
.language-item span { font-size: var(--size-label); }

/* The page column; its top padding is the gap between the top bar and the page. */
.inner-content {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: var(--content-top) 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  /* Long links or Latin strings break instead of widening the page. */
  overflow-wrap: anywhere;
}
.inner-content h1 { margin-top: 0; }

/* Breadcrumb replaces the former English label above h1 (same place and size). */
.breadcrumb {
  margin: 0 0 var(--crumb-gap);
  color: var(--color-label);
  font-size: var(--crumb-size);
  line-height: 1.6;
  letter-spacing: var(--label-tracking);
}
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--color-ink); }
.breadcrumb-sep { margin: 0 .6em; }
.inner-page .breadcrumb a:focus-visible { outline: 1px solid var(--color-ink); outline-offset: 3px; }
/* Touch screens: an invisible hit area of at least 44×44 around small links; the look stays. */
@media (any-pointer: coarse) {
  .breadcrumb a { position: relative; }
  .breadcrumb a::after {
    content: ""; position: absolute; top: 50%; left: 50%;
    width: max(100%, var(--touch-target)); height: max(100%, var(--touch-target)); transform: translate(-50%, -50%);
  }
}
