/* ==========================================================================
   Base — reset, elements, typography defaults
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--sm-paper);
  color: var(--sm-body);
  font-family: var(--sm-font-body);
  font-size: var(--sm-fs-body);
  line-height: var(--sm-lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .6em;
  color: var(--sm-ink);
  font-family: var(--sm-font-display);
  font-weight: 700;
  letter-spacing: var(--sm-track-display);
}
h1 { font-size: var(--sm-h1); line-height: var(--sm-lh-tight); letter-spacing: var(--sm-track-h1); }
h2 { font-size: var(--sm-h2); line-height: var(--sm-lh-snug); }
h3 { font-size: var(--sm-h3); line-height: 1.35; font-weight: 650; }
h4 { font-size: var(--sm-h4); font-weight: 650; }

p, ul, ol, dl, table, pre, blockquote, figure { margin: 0 0 1.25rem; }
ul, ol { padding-left: 1.35rem; }
li { margin-bottom: .45rem; }
li > ul, li > ol { margin-top: .45rem; margin-bottom: 0; }

a { color: var(--sm-accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--sm-accent-ink); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--sm-accent);
  outline-offset: 2px;
  border-radius: 3px;
}

img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
figure img { border-radius: var(--sm-radius); }
figcaption { margin-top: .6rem; font-size: var(--sm-fs-small); color: var(--sm-muted); }

strong, b { font-weight: 650; color: var(--sm-ink); }
small { font-size: var(--sm-fs-small); }
hr { height: 1px; border: 0; background: var(--sm-line); margin: var(--sm-section) 0; }

blockquote {
  margin-inline: 0;
  padding: .25rem 0 .25rem 1.25rem;
  border-left: 3px solid var(--sm-accent);
  color: var(--sm-ink);
  font-size: var(--sm-fs-lead);
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite { display: block; margin-top: .6rem; font-size: var(--sm-fs-small); font-style: normal; color: var(--sm-muted); }

code, kbd, samp { font-family: var(--sm-font-mono); font-size: .9em; background: var(--sm-subtle); padding: .15em .38em; border-radius: 4px; }
pre { background: var(--sm-ink); color: #E2E8F0; padding: 1.15rem 1.25rem; border-radius: var(--sm-radius); overflow-x: auto; font-size: .9rem; line-height: 1.6; }
pre code { background: none; padding: 0; color: inherit; }

table { width: 100%; border-collapse: collapse; font-size: var(--sm-fs-small); }
th, td { padding: .75rem .9rem; text-align: left; border-bottom: 1px solid var(--sm-line); vertical-align: top; }
th { color: var(--sm-ink); font-weight: 650; background: var(--sm-subtle); }
tbody tr:last-child td { border-bottom: 0; }

input, select, textarea, button { font: inherit; color: inherit; }
input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="tel"], textarea, select {
  width: 100%;
  padding: .65rem .85rem;
  background: var(--sm-paper);
  border: 1px solid var(--sm-line);
  border-radius: var(--sm-radius-sm);
}
input::placeholder, textarea::placeholder { color: var(--sm-muted); }

/* Accessibility helpers */
.screen-reader-text {
  position: absolute !important; 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; z-index: 999;
  background: var(--sm-ink); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 var(--sm-radius-sm) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }

/* WordPress core */
.alignleft  { float: left;  margin: .35rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .35rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.sticky, .gallery-caption, .bypostauthor { display: block; }
.wp-caption { max-width: 100%; }
