/*
 * The portal shell's layout on the UI kit (ui.md §5.3, as built in rewrite step 8f): the kit's
 * page grid without the sidebar, the navigation as a horizontal tab row under the header, the logo's
 * size, the footer, and what the app shows or hides. Layout and spacing only: every colour comes
 * from the kit's --ui-* tokens (UI-004), and the brand's two colours arrive through the token block
 * the server puts in <head>. The kit's own rules stay in kit/ui.css (UI-001).
 */
/* minmax(0, 1fr): the column never grows past the viewport, so the tab row scrolls inside itself
   and a phone never scrolls the page sideways (ui.md §5.3, found at 375 px in 8f's smoke run). */
body.ui-page.ui-portal {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "header" "nav" "main" "footer";
  grid-template-rows: var(--ui-header-h) auto 1fr auto;
}
.ui-portal .ui-tabs { grid-area: nav; background: var(--ui-surface); padding: 0 16px; }
.ui-portal .ui-main { grid-area: main; max-width: 1200px; width: 100%; margin: 0 auto; }
.ui-portal-footer { grid-area: footer; padding: 12px 24px; border-top: 1px solid var(--ui-border); white-space: pre-line; }
.ui-portal-logo { max-height: 44px; max-width: 220px; vertical-align: middle; }
.ui-portal-noscript { margin: 16px; }
.ui-portal [hidden] { display: none !important; }
[hidden] { display: none !important; }
.ui-auth .ui-portal-logo { max-height: 64px; display: block; margin: 0 auto 12px; }
.ui-auth .ui-header-brand { display: block; text-align: center; margin: 0 0 12px; }
.ui-auth .js-authmark { position: absolute; top: 24px; left: 0; right: 0; text-align: center; margin: 0; }
.ui-auth .ui-authcard { margin-top: 72px; }
.ui-auth .ui-stack > * + * { margin-top: var(--ui-gap); }
.ui-auth .ui-small { color: var(--ui-text-muted); }
.ui-portal .ui-header .ui-input { height: 32px; width: auto; }
.ui-portal .ui-header, .ui-portal .ui-tabs { min-width: 0; }
.ui-portal .ui-header .js-user { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-portal .ui-pagehead h1 { font-size: 1.4rem; }
.ui-portal textarea.ui-input { min-height: 120px; }
.ui-portal .ui-table a { color: inherit; }
.ui-portal pre.ui-mono { white-space: pre-wrap; word-break: break-all; }
.ui-portal td.ui-mono, .ui-portal dd.ui-mono { white-space: nowrap; }
pre.ui-mono { background: var(--ui-surface-2); padding: 10px 12px; border-radius: var(--ui-radius); margin: 0; }
.ui-portal .ui-formactions form { display: inline; }
.ui-portal .ui-stat-value a { color: inherit; text-decoration: none; }
@media (max-width: 900px) {
  body.ui-page.ui-portal { grid-template-rows: var(--ui-header-h) auto 1fr auto; }
  .ui-portal .ui-header label { display: none; }
  .ui-portal .ui-tabs { padding: 0 8px; }
}
@media (max-width: 600px) {
  .ui-portal .ui-header .js-user { display: none; }
}
