/* Shared chrome for the collection pages (gallery, champions, print): one
   warm ivory page, one masthead with the logo and the same navigation, one
   set of buttons, fields and focus rings. The race stage (/) keeps its own
   dark theme — this file is for the pages around it. */
:root {
  --bg: #f6f1ea; --text: #1e1a16; --muted: #7b7168; --line: rgba(60, 45, 30, 0.14);
  --field: #eeeae3; --paper: #fbf8f2; --accent: #f3c14b; --accent-ink: #2a1f0a; --hot: #e5522c;
  --oak: #b58c5e; --oak-dark: #8e6a44; --ink-wood: #3a2817;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --skin-zoom: 1.34; /* artwork margin → sphere fills the circle (keep in sync with viewer.css) */
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 0.9375rem/1.5 var(--sans); }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- masthead: logo left, the same links on every page ---- */
.site-top { padding: 18px 24px 0; }
.site-top-inner { max-width: 1240px; margin: 0 auto; }
.site-bar { display: flex; align-items: center; gap: 18px; row-gap: 6px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--muted); }
.brand { display: flex; align-items: center; flex: none; text-decoration: none; color: var(--text); min-height: 40px; }
.brand-logo { height: 36px; width: auto; display: block; }
.wordmark { display: none; font: 800 0.875rem/1 var(--sans); letter-spacing: 0.18em; color: var(--text); text-decoration: none; }
.brand-logo[hidden] { display: none; }
.brand-logo[hidden] + .wordmark { display: inline; }
.site-nav { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; min-width: 0; }
.site-nav a { text-decoration: none; color: var(--muted); font-family: var(--serif); font-size: 0.9375rem; white-space: nowrap; padding: 6px 2px; min-height: 40px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }
.site-nav .sep { width: 1px; height: 18px; background: var(--line); }
.site-tagline { margin-left: auto; font-family: var(--serif); white-space: nowrap; }
.site-hero { text-align: center; padding: 26px 0 18px; }
.site-hero h1 { margin: 0; font: 700 clamp(2.25rem, 6vw, 4.25rem)/1.02 var(--serif); letter-spacing: -0.035em; }
.site-hero .sub { margin: 8px 0 0; font: 400 clamp(1rem, 2vw, 1.375rem)/1.3 var(--serif); color: #4f463d; }
.site-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px 70px; }
.site-h2 { display: flex; align-items: baseline; gap: 14px; margin: 34px 0 12px; font: 700 1.375rem/1.2 var(--serif); letter-spacing: -0.01em; }
.site-h2 small { font: 400 0.9375rem var(--serif); color: var(--muted); }
.site-h2::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--oak), rgba(181, 140, 94, 0)); opacity: 0.6; }

/* ---- buttons + fields ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--text); font: 700 0.9375rem var(--serif); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: rgba(0, 0, 0, 0.06); }
.btn.primary:hover { filter: brightness(1.04); border-color: rgba(0, 0, 0, 0.06); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn.quiet:hover { color: var(--text); background: var(--field); border-color: transparent; }
.btn.sm { min-height: 36px; padding: 4px 12px; font-size: 0.875rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.field { min-height: 46px; padding: 10px 16px; border: 1px solid transparent; border-radius: 12px; background: var(--field); font-size: 1rem; color: var(--text); }
.field::placeholder { color: #9a9086; }
.field:focus { outline: none; border-color: var(--text); background: #fff; }
select.field { appearance: none; -webkit-appearance: none; padding-right: 40px; font: 700 0.9375rem var(--serif); cursor: pointer;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e1a16' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.notice { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--field); color: var(--muted); font-size: 0.875rem; }
.notice[hidden] { display: none; }
.foot { margin-top: 40px; text-align: center; color: var(--muted); font-family: var(--serif); font-size: 0.9375rem; }
.foot a { color: var(--text); font-weight: 700; }

@media (max-width: 760px) {
  .site-top { padding: 10px 16px 0; }
  .site-tagline { display: none; }
  .site-hero { padding: 10px 0 6px; }
  .site-hero h1 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); letter-spacing: -0.03em; }
  .site-hero .sub { margin-top: 4px; font-size: 1rem; }
  .site-wrap { padding: 0 16px 50px; }
  .site-nav a { font-size: 0.875rem; }
  .field { min-height: 44px; }
}
.site-nav .short { display: none; }
@media (max-width: 360px) { .site-hero { padding: 6px 0 4px; } }
@media (max-width: 480px) {
  .site-bar { gap: 10px; }
  .site-nav { gap: 2px 10px; }
  .site-nav .sep { display: none; }
  .site-nav a { font-size: 0.875rem; padding: 4px 0; min-height: 36px; }
  .site-bar { row-gap: 0; }
  .site-nav .long { display: none; }
  .site-nav .short { display: inline; }
  .brand-logo { height: 28px; }
}
