/* Base — global-safe parts of the prototype reset. Aggressive resets are scoped to the shell chrome. */

body.rd-body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-text-primary);
  background: var(--color-bg-canvas);
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--duration-base) var(--ease-standard),
              color var(--duration-base) var(--ease-standard);
}

.rd-body button, .rd-body input, .rd-body select, .rd-body textarea { font-family: inherit; }

:where(.rd-chrome) :where(h1, h2, h3, h4, h5, h6, p) { margin: 0; }
:where(.rd-chrome) :where(ul, ol) { margin: 0; padding: 0; list-style: none; }
:where(.rd-chrome) a { color: inherit; text-decoration: none; }
:where(.rd-chrome) button { cursor: pointer; background: none; border: none; color: inherit; padding: 0; }

.rd-body :focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.rd-body * { scrollbar-width: thin; scrollbar-color: var(--color-border-strong) transparent; }
.rd-body *::-webkit-scrollbar { width: 8px; height: 8px; }
.rd-body *::-webkit-scrollbar-track { background: transparent; }
.rd-body *::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: var(--radius-full); }
.rd-body *::-webkit-scrollbar-thumb:hover { background: var(--color-text-tertiary); }

/* Typography */
.text-page-title {
  font-size: var(--fs-page-title);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}
.text-section-title { font-size: var(--fs-section-title); font-weight: var(--fw-semibold); line-height: var(--lh-tight); }
.text-card-title { font-size: var(--fs-card-title); font-weight: var(--fw-semibold); line-height: var(--lh-tight); }
.text-body { font-size: var(--fs-body); font-weight: var(--fw-regular); }
.text-label { font-size: var(--fs-label); font-weight: var(--fw-medium); color: var(--color-text-secondary); }
.text-caption { font-size: var(--fs-caption); color: var(--color-text-tertiary); }
.text-tertiary { color: var(--color-text-tertiary); }
a.link { color: var(--color-primary); font-weight: var(--fw-medium); text-decoration: none; }
a.link:hover { text-decoration: underline; }

/* Icons (Lucide sprite) */
svg.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg.icon-sm { width: 15px; height: 15px; }
svg.icon-lg { width: 22px; height: 22px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  z-index: var(--z-toast);
  border-radius: var(--radius-md);
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); color: #fff; }
