/* `hidden` always hides — also on SVG and on elements whose markup (from the design) sets an inline display. */
[hidden] {
  display: none !important;
}

/* Page frame: the nav rail beside the screen, as every design board lays it out. */
body {
  margin: 0;
  background: var(--color-bg-app);
  color: var(--color-text);
  font-family: var(--font-sans);
}

.app-frame {
  display: flex;
  min-height: 100vh;
  container: app / inline-size;
}

/* The boards are one viewport tall: each screen scrolls inside its own panes (table, drawer, form). */
.app-main {
  flex-grow: 1;
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative; /* a dialog over the main column only (P16b) */
}

/* The rail stays in view and scrolls on its own (Handoff › Global). */
.app-nav {
  position: sticky;
  top: 0;
  height: 100vh;
}

.app-nav-items {
  overflow-y: auto;
}

.app-auth {
  min-height: 100vh;
}

.app-preview {
  background: var(--color-bg-app);
}

/* Education bodies as the patient app renders them (P8 preview): Markdown headings and paragraphs, sanitised. */
.app-markdown {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-base);
  line-height: 1.5;
}

.app-markdown > * {
  margin: 0;
}

.app-markdown h1,
.app-markdown h2,
.app-markdown h3 {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.3;
  margin-top: var(--space-1);
}

.app-markdown ul,
.app-markdown ol {
  padding-left: var(--space-5);
}

.app-markdown a {
  color: var(--color-accent-text);
}
