/* GOAT Cam website. Plain CSS, no JavaScript, no external requests. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f3f5f8;
  --text: #16181d;
  --muted: #4a4f5a;
  --line: #d6dae1;
  --accent: #0b5cab;
  --on-accent: #ffffff;
  --focus: #b8360f;
  --radius: 10px;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --surface: #191c22;
    --text: #eef0f4;
    --muted: #b6bcc7;
    --line: #333944;
    --accent: #6fb2ff;
    --on-accent: #0a0c10;
    --focus: #ffc16b;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* Focus is always visible, in both themes. */
a:focus-visible,
a:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

a { color: var(--accent); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

main:focus { outline: none; }

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header and navigation */

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

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.mark {
  width: 32px;
  height: 32px;
  display: block;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.25rem 0.125rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

nav a:hover { text-decoration: underline; }

nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* Below 480px the four main links sit in two columns instead of one long row. */
@media (max-width: 479px) {
  .site-header nav { width: 100%; }
  .site-header nav ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
  }
}

/* Content */

main { padding: 1.5rem 0 2.5rem; }

h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2rem 0 0.5rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.35rem;
}

p, ul, ol { margin: 0 0 1rem; }

ul, ol { padding-left: 1.25rem; }

li { margin-bottom: 0.35rem; }

.lede {
  font-size: 1.1rem;
  color: var(--text);
}

.muted { color: var(--muted); }

.effective {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0 0 1.5rem;
}

.card > :last-child { margin-bottom: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.button:hover { text-decoration: underline; }

dl.facts { margin: 0 0 1rem; }

dl.facts dt {
  font-weight: 600;
  margin-top: 0.75rem;
}

dl.facts dd {
  margin: 0;
  color: var(--text);
}

/* A SHA-256 is 64 characters and must never push the page sideways. */
code, .sha256 {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
}

.sha256 {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-all;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  margin: 0.35rem 0 1rem;
  line-height: 1.5;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.25rem 0 2rem;
}

.site-footer nav ul {
  gap: 0.25rem 1.25rem;
}

.site-footer nav a { min-height: 44px; }

.colophon {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.925rem;
}

@media (min-width: 40rem) {
  h1 { font-size: 2.1rem; }
  main { padding: 2rem 0 3rem; }
}
