/* FluxCap's app shell: a full-window page around the figures in src/. The figures bring their own
 * styles (src/poser.css, src/mayfield/mayfield.css, src/anatomy/anatomy.css) and read the
 * knowledge base's --kb-* colours, so those are defined here with the same values as the
 * knowledge base's docs/assets/kb.css: its light scheme, body[data-md-color-scheme="default"].
 * The app is light only (Dr. Bari, 2026-10-21: "Dark mode should not be an option for this
 * app"); the figures keep their dark colours for the knowledge base's own dark scheme. */

:root {
  --kb-sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --kb-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --kb-accent: #f15534;
  --kb-accent-ink: #c2381a;
  /* the header: the figures' sticky views sit at calc(2.4rem + 2px), as below Material's header */
  --pp-head: calc(2.4rem + 2px);
  --pp-gap: 12px;
}
[data-md-color-scheme="default"] {
  --kb-paper: #efeee8;
  --kb-paper-2: #e7e6df;
  --kb-ink: #282828;
  --kb-ink-2: rgba(40, 40, 40, 0.74);
  --kb-ink-3: #85847e;
  --kb-rule: #b3b3af;
  --kb-rule-soft: #d4d3cc;
  color-scheme: light;
}

/* the base Material gives the figures on the knowledge base (its type scale and reset) */
html {
  font-size: 125%;
  box-sizing: border-box;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  background: #efeee8;
}
@media screen and (min-width: 100em) {
  html {
    font-size: 137.5%;
  }
}
@media screen and (min-width: 125em) {
  html {
    font-size: 150%;
  }
}
*,
::before,
::after {
  box-sizing: inherit;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--kb-paper);
  color: var(--kb-ink);
  font-family: var(--kb-sans);
  font-size: 0.8rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a,
button,
input,
label {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  background: transparent;
  border: 0;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
input,
select,
textarea {
  font-family: inherit;
}
table {
  border-collapse: separate;
  border-spacing: 0;
}

/* header: name, the two views, the scheme toggle */
.pp-head {
  position: sticky;
  top: 0;
  z-index: 20; /* below an expanded figure (30) */
  height: var(--pp-head);
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0 16px;
  border-bottom: 1px solid var(--kb-rule);
  background: var(--kb-paper);
  font-family: var(--kb-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pp-brand {
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--kb-ink);
}
.pp-brand::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.45rem;
  background: var(--kb-accent);
  vertical-align: 0.05rem;
}
.pp-tabs {
  display: flex;
  align-self: stretch;
  gap: 1rem;
}
.pp-tabs a {
  display: flex;
  align-items: center;
  padding-top: 2px;
  border-bottom: 2px solid transparent;
  color: var(--kb-ink-3);
  white-space: nowrap;
}
.pp-tabs a:hover {
  color: var(--kb-ink);
}
.pp-tabs a[aria-selected="true"] {
  color: var(--kb-ink);
  border-bottom-color: var(--kb-accent);
}
.pp-tabs a:focus-visible,
.pp-brand:focus-visible {
  outline: 1px solid var(--kb-accent);
  outline-offset: 2px;
}
.pp-short {
  display: none;
}
.pp-note {
  margin-left: auto;
  color: var(--kb-ink-3);
  white-space: nowrap;
}
@media screen and (max-width: 44em) {
  .pp-head {
    gap: 0.8rem;
  }
  .pp-full,
  .pp-note {
    display: none;
  }
  .pp-short {
    display: inline;
  }
}

/* the views */
.pp-main {
  flex: 1 0 auto;
}
.pp-pane {
  padding: var(--pp-gap) 16px 1.6rem;
}
.pp-pane[hidden] {
  display: none;
}
.pp-h {
  margin: 1.6rem 0 0.7rem;
  font-family: var(--kb-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kb-ink-3);
}
/* the first figure of a view starts at the top (the figures' own top margin is for a page) */
.pp-pane > :is(kb-poser, kb-mayfield):first-child {
  margin-top: 0;
}
/* the pose text under the library figure: a readable measure */
.pp-pane .kbp-info {
  max-width: 52rem;
}

/* wide screens: the view and its panel fill the window below the header (the figures' own rule
   caps them at 48rem / 52rem tall, to leave room for a page around them) */
@media screen and (min-width: 60em) {
  .pp-pane kb-poser:not(.kbp-compact):not(.kbp-bench):not(.kbp-expanded) .kbp-shell {
    height: calc(100vh - var(--pp-head) - 2 * var(--pp-gap));
    height: calc(100dvh - var(--pp-head) - 2 * var(--pp-gap));
    min-height: 26rem;
  }
  .pp-pane kb-mayfield:not(.kbm-expanded) .kbm-shell {
    height: calc(100vh - var(--pp-head) - 2 * var(--pp-gap));
    height: calc(100dvh - var(--pp-head) - 2 * var(--pp-gap));
    min-height: 28rem;
  }
}

/* the copyright line on every page (Dr. Bari, 2026-10-21) */
.pp-copy {
  margin: 0.4rem 0 0;
  color: var(--kb-ink-2);
}
.pp-foot {
  padding: 0.8rem 16px 1.2rem;
  border-top: 1px solid var(--kb-rule);
  color: var(--kb-ink-3);
  font-size: 0.64rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------ the neuro rain and the OR clock
   (Dr. Bari, 2026-10-21, knowledge base sources/2026-10-21-chat-animations.md) */

/* the rain (rain.js) falls behind the page: the body lets the page's paper (html) show, and each
   block of a view covers it, the figures included (Dr. Bari, 2026-10-21: "no rainfall in the body
   views", after trying it behind them), so it shows in the margins, around the headings and under
   the footer, never behind a figure, a panel, text or the header (solid, so what scrolls under it
   never shows through) */
body {
  background: transparent;
}
/* (below the page's own content, above the paper; no new stacking context, so an expanded figure
   still covers the header) */
.pp-rain {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.pp-pane > :not(.pp-h) {
  background: var(--kb-paper);
}

/* the clock (clock.js): before the header's note, at its right */
.pp-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  color: var(--kb-ink-3);
  font-variant-numeric: tabular-nums;
}
.pp-clock ~ .pp-note {
  margin-left: 0;
}
.pp-clock__face {
  width: 1.15rem;
  height: 1.15rem;
  overflow: visible;
}
.pp-clock__rim {
  fill: none;
  stroke: var(--kb-ink-3);
  stroke-width: 1;
}
.pp-clock__ticks line {
  stroke: var(--kb-ink-3);
  stroke-width: 0.9;
}
.pp-clock__face :is(.pp-clock__h, .pp-clock__m, .pp-clock__s) {
  transform-origin: 0 0;
  stroke-linecap: round;
}
.pp-clock__h,
.pp-clock__m {
  stroke: var(--kb-ink);
}
.pp-clock__h {
  stroke-width: 1.8;
}
.pp-clock__m {
  stroke-width: 1.2;
}
.pp-clock__s {
  stroke: var(--kb-accent);
  stroke-width: 0.7;
  animation: pp-sweep 60s linear infinite;
}
.pp-clock__c {
  fill: var(--kb-accent);
}
.pp-clock__d {
  color: var(--kb-ink);
  letter-spacing: 0.08em;
}
@keyframes pp-sweep {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pp-clock__s {
    display: none;
  }
}
/* phones: the dial alone */
@media screen and (max-width: 44em) {
  .pp-clock__d {
    display: none;
  }
}
