/* core/_base.css */
/* Minimal reset and global base layout */
@import './fonts.css';

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  /* Allow body to grow beyond the viewport instead of fixing its height */
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Naoko', 'Satoshi', 'Inter', 'Manrope', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--body-bg);
  color: var(--main-text-color);
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* Ensure the page behind is frozen when modal is open */
body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

/* Richtext fields are stored as <p> paragraphs (the RichtextNormalizer
   contract — §18.10). Render them flush to their container with even spacing
   BETWEEN paragraphs: a single-paragraph field sits tight, multi-paragraph
   content breathes. Deliberately low specificity (bare element selector) so
   any component- or class-scoped paragraph rule still wins. */
p {
  margin: 0;
}
p + p {
  margin-block-start: 0.75em;
}

/* Richtext font-size run classes (§18.10). Emitted on a <span> by the toolbar's
   A-/A+ buttons and preserved by both contract layers. em-relative so a sized
   run scales with whatever context renders it — the small editor, a content
   view, or the projection's clamp()-sized question container. */
.rt-size-sm {
  font-size: 0.82em;
}
.rt-size-lg {
  font-size: 1.35em;
}

