/* Design tokens, reset and shared chrome for trustmeonit.com */

:root {
  color-scheme: light dark;

  --bg: #f6f5f1;
  --surface: #ffffff;
  --text: #1b1e22;
  --muted: #565d65;
  --border: #dcd8ce;
  --rail: #c7c2b5;
  --accent: #0d6b4c;
  --accent-ink: #ffffff;
  --accent-weak: #e2efe8;
  --mark: #fdeeb5;
  --focus: #0b57d0;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;

  --radius: 4px;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101316;
    --surface: #161a1e;
    --text: #e6e8ea;
    --muted: #a0a8b0;
    --border: #2b3138;
    --rail: #3a424b;
    --accent: #5fd09b;
    --accent-ink: #0b1a13;
    --accent-weak: #16302a;
    --mark: #4d4214;
    --focus: #8ab4f8;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.6 var(--font-sans);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -4rem;
  z-index: 10;
  padding: var(--s2) var(--s4);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--s4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 3.5rem;
}

@media (max-width: 30rem) {
  .site-header .wrap {
    flex-wrap: wrap;
    padding-block: var(--s3);
  }
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text);
  font: 600 1rem/1 var(--font-mono);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.wordmark-it {
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s5);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (pointer: coarse) {
  .site-nav a {
    display: inline-block;
    padding-block: var(--s2);
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  padding-block: var(--s5);
}

.site-footer p {
  margin: 0;
}

/* Controls */

.button {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 0.9375rem/1.5 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  filter: brightness(1.08);
}

.button-quiet {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.button-quiet:hover {
  border-color: var(--accent);
  color: var(--accent);
  filter: none;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.link-button:hover {
  text-decoration-thickness: 2px;
}

/* 404 */

.notfound {
  padding-block: var(--s8);
}

.notfound h1 {
  margin: 0 0 var(--s4);
  font: 600 clamp(2rem, 5vw, 3rem) / 1.1 var(--font-serif);
}

.notfound p {
  margin: 0 0 var(--s4);
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
