/* Silver Vista — base.css
   Reset, custom properties, both themes, typography, landmarks, skip-link, print.
   Self-hosted font drop-point: place Newsreader + Public Sans .woff2 files in
   /static/type/ and uncomment the @font-face blocks below. Until then the site
   uses a system stack with matching metrics. */

/* ---------------------------------------------------------------- fonts --
@font-face {
  font-family: "Newsreader";
  src: url("/static/type/newsreader-variable.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/static/type/newsreader-italic-variable.woff2") format("woff2");
  font-weight: 300 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/static/type/publicsans-variable.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/static/type/publicsans-italic-variable.woff2") format("woff2");
  font-weight: 300 700; font-style: italic; font-display: swap;
}
------------------------------------------------------------------------- */

/* ------------------------------------------------------------ variables -- */
:root {
  --sv-ink: #12202b;          /* deep blue-black */
  --sv-page: #eaf2f8;         /* pale sky */
  --sv-panel: #d8e7f2;        /* tinted panel */
  --sv-rule: #b9cede;         /* hairline divider */
  --sv-accent: #0f5c8a;       /* azure: links and primary accent */
  --sv-accent-deep: #0a4064;  /* hover and emphasis */
  --sv-second: #8c4a2f;       /* clay: soil labels, kept warm so tags stay distinguishable */
  --sv-warn: #6f6212;         /* ochre: seasonal and caution labels */
  --sv-muted: #4f6070;
  --sv-edge: #6b8296;         /* borders of interactive controls: >=3:1 on page and panel */

  --sv-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino,
              "Book Antiqua", Georgia, "Times New Roman", serif;
  --sv-sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
             Roboto, "Helvetica Neue", Arial, sans-serif;

  --sv-shell: 1240px;
  --sv-measure: 62ch;
  --sv-rail: 26ch;
  --sv-gap: 2.5rem;
  --sv-step: 1.5rem;
  --sv-radius: 2px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sv-ink: #e0eaf2;
    --sv-page: #0b151e;
    --sv-panel: #13202c;
    --sv-rule: #2b3d4d;
    --sv-accent: #7cc0ea;
    --sv-accent-deep: #aedaf5;
    --sv-second: #e09a70;
    --sv-warn: #cdb75e;
    --sv-muted: #93a6b5;
    --sv-edge: #71889b;
  }
}

/* ---------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0; padding: 0;
}
ul[class], ol[class] { list-style: none; }
img, svg { max-width: 100%; height: auto; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
:where(a) { color: var(--sv-accent); }

/* ----------------------------------------------------------- typography -- */
html { font-size: 100%; }
body {
  background: var(--sv-page);
  color: var(--sv-ink);
  font-family: var(--sv-sans);
  font-size: 1rem;
  line-height: 1.62;
  font-weight: 400;
  min-height: 100%;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--sv-serif);
  font-weight: 600;
  line-height: 1.18;
  color: var(--sv-ink);
  text-wrap: balance;
}
h1 { font-size: clamp(1.85rem, 1.35rem + 1.9vw, 2.7rem); letter-spacing: -0.012em; }
h2 { font-size: clamp(1.4rem, 1.15rem + 0.95vw, 1.85rem); margin-top: 2.4rem; }
h3 { font-size: clamp(1.12rem, 1.02rem + 0.4vw, 1.3rem); margin-top: 1.7rem; }
h4 { font-size: 1.02rem; margin-top: 1.3rem; }

p, ul:not([class]), ol:not([class]), dl:not([class]) { margin-top: 1rem; }
li + li { margin-top: .35rem; }
ul:not([class]), ol:not([class]) { padding-left: 1.25rem; }
strong { font-weight: 650; }
i, em, cite { font-style: italic; }
small { font-size: .84rem; }

a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--sv-accent-deep); }

hr {
  border: 0; height: 1px; background: var(--sv-rule);
  margin: 2rem 0;
}

/* botanical names appear everywhere; one shared rule */
.sv-botanical { font-style: italic; font-size: .93em; color: var(--sv-muted); }

/* ------------------------------------------------------------ landmarks -- */
.sv-shell {
  width: 100%;
  max-width: var(--sv-shell);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.25rem);
}

main { display: block; padding-bottom: 4rem; }

.sv-spread {
  display: grid;
  grid-template-columns: minmax(0, var(--sv-measure)) var(--sv-rail);
  gap: var(--sv-gap);
  align-items: start;
  margin-top: 2rem;
}
.sv-spread > aside { min-width: 0; }
.sv-spread > .sv-column { min-width: 0; }

@media (max-width: 900px) {
  .sv-spread { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}

/* ----------------------------------------------------------- skip link -- */
.sv-skip {
  position: absolute;
  left: .5rem; top: -100%;
  z-index: 100;
  background: var(--sv-page);
  color: var(--sv-ink);
  border: 1px solid var(--sv-ink);
  padding: .6rem 1rem;
  font-size: .9rem;
}
.sv-skip:focus { top: .5rem; }

/* --------------------------------------------------------------- focus -- */
:focus-visible {
  outline: 3px solid var(--sv-warn);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* ------------------------------------------------------ reduced motion -- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------- print -- */
@media print {
  :root {
    --sv-ink: #000; --sv-page: #fff; --sv-panel: #fff;
    --sv-rule: #999; --sv-accent: #000; --sv-muted: #333; --sv-edge: #666;
  }
  body { font-size: 11pt; }
  .sv-masthead nav, .sv-compare, .sv-finder-controls, .sv-skip { display: none !important; }
  .sv-spread { display: block; }
  a[href^="/"]::after { content: " (silvervistapro.com" attr(href) ")"; font-size: 9pt; }
  h2, h3 { break-after: avoid; }
  .sv-specimen { break-inside: avoid; }
}
