/* DadCam Guide public site. Values come from Crisp v2 tokens.css (copied into the build);
   sizes from the type scale, space from the 8 px scale. Started from docs/wiki-mockup. */
:root {
  --font: 'Crisp', 'Helvetica Neue', Arial, sans-serif;
  --radius: 4px;
  --control-h: 44px;
  --t-xs: 12px; --t-sm: 14px; --t-base: 16px; --t-lg: 21px; --t-xl: 28px; --t-2xl: 38px; --t-3xl: 56px;
  --wide: 1160px;
  --reading: 928px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
html[data-mode="dark"] { color-scheme: dark; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius); }
.icon { width: 16px; height: 16px; flex: none; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 32px; }

/* Mockup banner */
.mockup-bar { background: var(--band); color: var(--secondary); font-size: var(--t-xs); padding: 8px 0; }
.mockup-bar .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }

/* Header */
.site-head { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-head .wrap { display: flex; align-items: center; gap: 32px; min-height: 64px; flex-wrap: wrap; }
.mark { display: block; margin-right: auto; padding: 8px 0; }
.mark img { height: 24px; width: auto; }
.mark .dark { display: none; }
[data-mode="dark"] .mark .light { display: none; }
[data-mode="dark"] .mark .dark { display: block; }
.site-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-nav a { color: var(--secondary); text-decoration: none; font-size: var(--t-sm); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.site-nav a:hover { color: var(--ink); }

/* Search */
.search { display: flex; max-width: 640px; }
.search label { position: absolute; left: -9999px; }
.search input {
  flex: 1; min-width: 0; height: var(--control-h); padding: 0 16px;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--control-border); border-radius: var(--radius) 0 0 var(--radius);
}
.search input::placeholder { color: var(--muted); }
.search button {
  height: var(--control-h); padding: 0 24px; display: flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 500; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  border: 0; border-radius: 0 var(--radius) var(--radius) 0;
  transition: background-color 150ms ease-out;
}
.search button:hover { background: var(--accent-hover); }
.search button:active { background: var(--accent-pressed); }
.search.small input { height: 36px; font-size: var(--t-sm); border-radius: var(--radius); }

/* Type */
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: var(--t-3xl); line-height: 1.0; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: var(--t-xl); line-height: 1.2; letter-spacing: -0.01em; font-weight: 500; }
h3 { font-size: var(--t-lg); line-height: 1.2; font-weight: 500; }
p { margin: 0 0 16px; max-width: 64ch; }
.lead { font-size: var(--t-lg); color: var(--secondary); max-width: 52ch; }
.small { font-size: var(--t-sm); color: var(--secondary); }
.meta { font-size: var(--t-xs); color: var(--secondary); }

section { padding: 64px 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }

/* Home hero */
.hero { padding: 64px 0; display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: center; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--border); border-radius: var(--radius); }
.hero-photo figcaption { font-size: var(--t-xs); color: var(--secondary); margin-top: 8px; }
.hero h1 { max-width: 14ch; margin-bottom: 24px; }
.hero .lead { margin-bottom: 32px; }
.hero .try { margin-top: 16px; font-size: var(--t-sm); color: var(--secondary); }

/* Camera shelf */
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; list-style: none; margin: 0; padding: 0; }
.cam { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 150ms ease-out; }
.cam:hover { border-color: var(--control-border); }
.cam .photo { background: var(--image-ground); border-bottom: 1px solid var(--border); overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.cam .photo img { aspect-ratio: 1; object-fit: contain; width: 100%; }
.cam .body { padding: 16px 24px 24px; }
.cam .code { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.01em; }
.cam .what { font-size: var(--t-sm); color: var(--secondary); }

/* Format timeline */
.timeline { display: grid; grid-template-columns: 160px repeat(20, 1fr); row-gap: 8px; align-items: center; }
.timeline .axis { font-size: var(--t-xs); color: var(--secondary); padding-bottom: 8px; border-bottom: 1px solid var(--control-border); }
.timeline .label { grid-column: 1; font-size: var(--t-sm); padding-right: 16px; }
.timeline .label a { text-decoration: none; }
.timeline .label a:hover { text-decoration: underline; }
.timeline .bar { height: 32px; background: var(--band); border: 1px solid var(--control-border); border-radius: var(--radius); display: flex; align-items: center; padding: 0 8px; font-size: var(--t-xs); color: var(--ink); white-space: nowrap; overflow: hidden; }

/* Two-column lists */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-top: 1px solid var(--border); padding: 16px 0; display: flex; justify-content: space-between; gap: 16px; }
.link-list li:last-child { border-bottom: 1px solid var(--border); }
.link-list a { text-decoration: none; font-weight: 500; }
.link-list a:hover { text-decoration: underline; }

/* Footer */
.site-foot { border-top: 1px solid var(--border); background: var(--surface); padding: 48px 0; font-size: var(--t-sm); color: var(--secondary); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-foot p { margin: 0; }

/* Model page */
.crumbs { font-size: var(--t-sm); color: var(--secondary); padding: 24px 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--muted); }
.crumbs a { color: var(--secondary); }

.model-head { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; padding: 32px 0 64px; align-items: start; }
.gallery .main { margin: 0; }
.gallery .main img { border: 1px solid var(--border); border-radius: var(--radius); }
.gallery .main img { aspect-ratio: 1; object-fit: contain; width: 100%; max-height: 520px; margin: 0 auto; }
.gallery .main figcaption { font-size: var(--t-xs); color: var(--secondary); margin-top: 16px; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.thumbs button { width: 100%; padding: 4px; background: var(--image-ground); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color 150ms ease-out; }
.thumbs button:hover { border-color: var(--control-border); }
.thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.thumbs img { aspect-ratio: 1; object-fit: contain; width: 100%; }
.thumbs span { display: block; font-size: var(--t-xs); color: var(--secondary); margin-top: 4px; }

.summary .maker { font-size: var(--t-sm); color: var(--secondary); margin-bottom: 8px; }
.summary h1 { margin-bottom: 24px; overflow-wrap: anywhere; }
.summary .lead { margin-bottom: 24px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.chip { font-size: var(--t-xs); font-weight: 500; background: var(--band); color: var(--ink); padding: 4px 8px; border-radius: var(--radius); text-decoration: none; }
.chip:hover { text-decoration: underline; }
.facts { margin: 0 0 32px; border-top: 1px solid var(--border); }
.facts div { display: grid; grid-template-columns: 128px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.facts dt { font-size: var(--t-sm); color: var(--secondary); }
.facts dd { margin: 0; }
.actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: var(--control-h); padding: 0 24px;
  font: inherit; font-weight: 500; text-decoration: none; border-radius: var(--radius);
  transition: background-color 150ms ease-out;
}
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { border: 1px solid var(--control-border); color: var(--ink); }
.btn.secondary:hover { background: var(--band); }

.wiki { display: grid; grid-template-columns: 208px 1fr; gap: 64px; padding-bottom: 96px; }
.toc { position: sticky; top: 24px; align-self: start; font-size: var(--t-sm); }
.toc p { color: var(--secondary); margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 4px 0 4px 16px; color: var(--secondary); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); font-weight: 500; }
.article { max-width: var(--reading); min-width: 0; }
.article section { padding: 48px 0; }
.article section:first-child { padding-top: 0; }
.article h2 { margin-bottom: 24px; }
.article h3 { margin: 32px 0 8px; }

/* Spec table with sources */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--t-base); }
caption { text-align: left; font-size: var(--t-sm); color: var(--secondary); padding-bottom: 12px; }
th, td { text-align: left; padding: 12px 16px 12px 0; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th { font-weight: 500; font-size: var(--t-sm); color: var(--secondary); border-bottom: 1px solid var(--control-border); }
tbody th { font-weight: 500; width: 30%; }
td.src { font-size: var(--t-sm); color: var(--secondary); width: 30%; }
tbody tr:hover { background: var(--band); }

.note { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 24px; margin: 24px 0; }
.note .who { font-size: var(--t-sm); color: var(--secondary); margin: 0; }
.note.caution { display: grid; grid-template-columns: 16px 1fr; gap: 12px; }
.note.caution .icon { color: var(--warning); margin-top: 4px; }
.note.caution strong { color: var(--ink); }

.bench { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.bench img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--image-ground); border: 1px solid var(--border); border-radius: var(--radius); }

.sisters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none; margin: 0; padding: 0; }
.sisters .cam .body { padding: 12px 16px 16px; }

.manuals { list-style: none; margin: 0; padding: 0; }
.manuals li { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; padding: 16px 0; border-top: 1px solid var(--border); }
.manuals li:last-child { border-bottom: 1px solid var(--border); }
.manuals .icon { margin-top: 4px; color: var(--secondary); }
.manuals a { font-weight: 500; }

.sources { font-size: var(--t-sm); color: var(--secondary); padding-left: 24px; }
.sources li { margin-bottom: 8px; }

@media (max-width: 960px) {
  .model-head, .wiki, .cols, .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo { max-width: 320px; }
  .toc { position: static; }
  .shelf, .sisters { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 112px repeat(20, 1fr); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 48px 0 32px; }
  h1 { font-size: var(--t-2xl); }
  .shelf, .sisters, .bench { grid-template-columns: 1fr 1fr; gap: 16px; }
  .cam .body { padding: 12px; }
  .cam .code { font-size: var(--t-base); }
  .thumbs { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .thumbs span { display: none; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .timeline .axis.mid { visibility: hidden; }
  .search button { padding: 0 16px; }
  .hero-photo { display: none; }
  .site-head .wrap { gap: 16px; padding-top: 8px; padding-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.mode-toggle { font: inherit; font-size: var(--t-xs); color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* Site additions */
.directory { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.directory li { border-bottom: 1px solid var(--border); }
.directory a { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 16px 0; text-decoration: none; }
.directory a:hover .code { text-decoration: underline; }
.directory .code { font-weight: 500; }
.directory .what { font-size: var(--t-sm); color: var(--secondary); text-align: right; }
.maker-group { padding: 0; border-top: 0; }
.maker-head { margin: 48px 0 16px; }
.placeholder { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--image-ground); border: 1px solid var(--border); border-radius: var(--radius); font-size: var(--t-xl); font-weight: 700; color: var(--secondary); }
.prose { max-width: 64ch; }
.prose h2 { margin: 32px 0 12px; }
[hidden] { display: none !important; }

/* The blank image: where we have no photo yet, the same tile, empty. */
.blank { aspect-ratio: 1; width: 100%; background: var(--image-ground); }
.gallery > .blank { border: 1px solid var(--border); border-radius: var(--radius); }
.cam .photo img, .cam .photo .blank { display: block; aspect-ratio: 1; width: 100%; object-fit: contain; }
.shelf li[hidden] { display: none; }
