@layer ks-base {
  /* Preflight reset (from Tailwind) */
  *, ::after, ::before, ::backdrop, ::file-selector-button {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid;
  }

  html, :host {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    -webkit-tap-highlight-color: transparent;
  }

  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }

  abbr:where([title]) {
    text-decoration: underline dotted;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }

  a {
    color: inherit;
    text-decoration: inherit;
  }

  b, strong {
    font-weight: bolder;
  }

  code, kbd, samp, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1em;
  }

  small {
    font-size: 80%;
  }

  sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }

  sub {
    bottom: -0.25em;
  }

  sup {
    top: -0.5em;
  }

  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }

  :-moz-focusring {
    outline: auto;
  }

  progress {
    vertical-align: baseline;
  }

  summary {
    display: list-item;
  }

  ol, ul, menu {
    list-style: none;
  }

  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
  }

  img, video {
    max-width: 100%;
    height: auto;
  }

  button, input, select, optgroup, textarea, ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    border-radius: 0;
    background-color: transparent;
    opacity: 1;
  }

  ::placeholder {
    opacity: 1;
  }

  textarea {
    resize: vertical;
  }

  button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
    appearance: button;
  }

  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }

  /* End preflight reset */

  body {
    font-family: var(--ks-font-body);
    font-weight: var(--ks-font-weight-body);
    line-height: 1.5;
    color: var(--ks-color-text-default);
    background-color: var(--ks-color-surface-page);
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: var(--ks-font-heading);
  }

  .ks-base {
    background-color: var(--ks-color-surface-page);
    color: var(--ks-color-text-default);
    font-family: var(--ks-font-body);
    font-weight: var(--ks-font-weight-body);
    line-height: 1.5;
  }

  .ks-base :where(h1, h2, h3, h4, h5, h6) {
    margin: 0;
    color: var(--ks-color-text-strong);
    font-family: var(--ks-font-heading);
    line-height: 1.1;
    text-wrap: balance;
  }

  .ks-base :where(p, ul, ol, blockquote, figure) {
    margin: 0;
  }

  .ks-base :where(a) {
    color: inherit;
    text-underline-offset: 0.15em;
    transition:
      color var(--ks-duration-base) var(--ks-ease-standard),
      background-color var(--ks-duration-base) var(--ks-ease-standard),
      border-color var(--ks-duration-base) var(--ks-ease-standard);
  }

  .ks-base :where(img, picture, svg, video, canvas) {
    display: block;
    max-inline-size: 100%;
  }

  .ks-base :where(input, select, textarea, button) {
    font: inherit;
  }
}
