/*
 * Minimal shared shadow-root reset, prepended once to the bundled
 * `ds.css` every component links to (see `scripts/build-ds-css.mjs` in
 * src). The design-system skill requires a single global reset
 * (`global.css`), but that is light-DOM only and cannot reach into a
 * shadow root. This is the shadow-DOM equivalent: box-sizing plus a
 * token-driven focus ring.
 *
 * Focus-ring color on inverse surfaces is not handled with `:host-context`
 * here: `ds-section[data-surface="inverse"]` re-points the
 * `--elvaio-color-focus` custom property for its whole subtree, and every
 * component (light or shadow DOM) that reads that token for its focus ring
 * inherits the override automatically, because custom properties inherit
 * through shadow boundaries.
 */
:host {
  box-sizing: border-box;
}

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

:host(:focus-visible) {
  outline: var(--elvaio-focus-width) solid var(--elvaio-color-focus);
  outline-offset: 2px;
  border-radius: var(--elvaio-radius-field);
}


:host {
  display: block;
}

:host([data-surface='inverse']) {
  --elvaio-color-focus: var(--elvaio-color-focus-on-inverse);
}

.section {
  padding-block: var(--elvaio-space-section);
}

:host([flush-top]) .section {
  padding-top: 0;
}

/* Reference `.el-pagehead`: every hero's own bottom padding is already
   noticeably smaller than the generic section-to-section gap (its gap to
   whatever follows is the only space it owns) - some pages pair this with
   `flush-top` on the section right after the hero too, so the two gaps
   don't stack into "mostly below the fold". */
:host([flush-bottom]) .section {
  padding-bottom: var(--elvaio-space-pagehead-bottom);
}

:host([rounded-top]) .section {
  border-radius: var(--elvaio-radius-band-top) var(--elvaio-radius-band-top) 0 0;
}

.canvas {
  background: var(--elvaio-color-page);
  color: var(--elvaio-color-text);
}

.inset {
  background: var(--elvaio-color-band);
  color: var(--elvaio-color-text);
}

.inverse {
  background: var(--elvaio-color-band-inverse);
  color: var(--elvaio-color-text-inverse);
}
