/* Veritone Services: shared stylesheet.
   Type scale (rem): 0.8125 / 0.9375 / 1.0625 / 1.375 / 1.75 / fluid display.
   Spacing scale (rem): 0.25 / 0.5 / 1 / 1.5 / 2.5 / 4 / 6.
   Radius: 3px everywhere. No shadows. Hairline rules for structure. */

:root {
  color-scheme: light dark;
  --bg: #f5f2eb;
  --surface: #fbf9f4;
  --ink: #1b1a17;
  --muted: #5c584f;
  --rule: #d8d2c4;
  --accent: #1f4d3a;
  --accent-strong: #163829;
  --on-accent: #ffffff;
  --focus: #1f4d3a;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 1rem;
  --s4: 1.5rem;
  --s5: 2.5rem;
  --s6: 4rem;
  --s7: 6rem;
  --radius: 3px;
  --page: 72rem;
  --read: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101411;
    --surface: #161b17;
    --ink: #ebe7dc;
    --muted: #a39e91;
    --rule: #2b322c;
    --accent: #8fc4a3;
    --accent-strong: #a9d6bb;
    --on-accent: #0d1a12;
    --focus: #8fc4a3;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
p, ul, ol, dl { margin: 0; }
p + p { margin-top: var(--s3); }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: var(--s3); top: -4rem;
  background: var(--ink); color: var(--bg);
  padding: var(--s2) var(--s3); border-radius: var(--radius); z-index: 10;
}
.skip:focus { top: var(--s3); }

.container {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .container {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: var(--s2) var(--s5);
  padding-block: var(--s4);
}
.wordmark {
  font-family: var(--serif); font-size: 1.375rem; font-weight: 600;
  letter-spacing: -0.005em; color: var(--ink); text-decoration: none;
}
.wordmark span { font-weight: 400; color: var(--muted); }
.wordmark:hover { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); list-style: none; padding: 0; font-size: 0.9375rem; }
.nav a { color: var(--muted); text-decoration: none; padding-block: var(--s1); border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Type */
h1, h2, h3 { margin: 0; font-weight: 500; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.8vw, 3.4rem); line-height: 1.1; max-width: 21em; }
h2 { font-size: 1.75rem; line-height: 1.2; }
h3 { font-family: var(--sans); font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
.eyebrow {
  font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.lead { font-size: 1.1875rem; color: var(--muted); max-width: 38rem; line-height: 1.6; }
.small { font-size: 0.9375rem; color: var(--muted); }

/* Hero */
.hero { padding-block: var(--s7) var(--s6); }
.hero .eyebrow { margin-bottom: var(--s4); }
.hero h1 { margin-bottom: var(--s4); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-top: var(--s5); }
.btn {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  padding: 0.6rem 1.15rem; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent);
  border: 1px solid var(--accent); font-weight: 600; font-size: 0.9375rem;
  text-decoration: none;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }

/* Sections: label column on the left, content on the right */
.block { border-top: 1px solid var(--rule); padding-block: var(--s6); }
.block .container { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: var(--s4) var(--s5); }
.block-label { padding-top: 0.5rem; }
.block h2 { margin-bottom: var(--s4); }
.content { max-width: 46rem; }
.content > p { max-width: var(--read); }

/* Definition-style rows */
.rows { list-style: none; padding: 0; margin-top: var(--s4); }
.rows li, .facts > div {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: var(--s1) var(--s4);
  padding-block: var(--s3); border-top: 1px solid var(--rule);
}
.rows li:last-child, .facts > div:last-child { border-bottom: 1px solid var(--rule); }
.rows p, .facts dd { color: var(--muted); margin: 0; }
.facts { margin-top: var(--s4); }
.facts dt { font-weight: 600; }
.facts dd { color: var(--ink); overflow-wrap: anywhere; }
address { font-style: normal; margin-top: var(--s3); }
.facts address, .prose address { margin-top: 0; }

.more { margin-top: var(--s4); font-weight: 600; }

/* Legal and long-form pages */
.page-head { padding-block: var(--s6) var(--s5); border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-block: var(--s3); }
.prose { max-width: var(--read); padding-block: var(--s5) var(--s7); }
.prose h2 { font-size: 1.375rem; margin: var(--s6) 0 var(--s3); }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.25rem; margin-top: var(--s3); }
.prose li + li { margin-top: var(--s2); }
.prose p, .prose li { overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding-block: var(--s5) var(--s6); margin-top: var(--s6); font-size: 0.9375rem; color: var(--muted); }
.site-footer .container { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s4) var(--s6); }
.site-footer strong { color: var(--ink); font-weight: 600; }
.footer-links { list-style: none; padding: 0; display: grid; gap: var(--s2); align-content: start; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }
.footer-note { grid-column: 1 / -1; padding-top: var(--s3); border-top: 1px solid var(--rule); font-size: 0.8125rem; }

/* Not-found page */
.notfound { padding-block: var(--s7); }
.notfound h1 { margin-block: var(--s3) var(--s4); }

@media (max-width: 52rem) {
  .block .container { grid-template-columns: 1fr; gap: var(--s2); }
  .block-label { padding-top: 0; }
  .hero { padding-block: var(--s6) var(--s5); }
  .site-footer .container { grid-template-columns: 1fr; }
}
@media (max-width: 34rem) {
  body { font-size: 1rem; }
  .rows li, .facts > div { grid-template-columns: 1fr; }
  .facts dt { color: var(--muted); font-size: 0.875rem; font-weight: 500; }
  .nav { gap: var(--s1) var(--s3); }
}
@media (prefers-reduced-motion: no-preference) {
  a, .btn { transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease; }
}
