/* Camera School: the course's pages (the syllabus, the readings, fieldwork, the final, the teacher's guide).
   A book's page in light mode, the GlassMeter dark room at night; the 3D bench (/camera) keeps the site's own look. */
:root {
  --paper: #F5F1E8;
  --paper-2: #ECE6D8;
  --card: #FBF8F1;
  --ink: #1D1A16;
  --ink-2: #4A443B;
  --ink-3: #7A7265;
  --rule: rgba(29, 26, 22, 0.14);
  --accent: #8A6A12;          /* brass: the site's gold, dark enough to read on paper */
  --accent-soft: rgba(138, 106, 18, 0.12);
  --ok: #2F6B3A;
  --no: #9B3A3A;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, "SF Pro Text", Inter, "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --measure: 40rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F0D0B; --paper-2: #171411; --card: #1B1815;
    --ink: #EFEBE3; --ink-2: #BDB5A8; --ink-3: #847C70;
    --rule: rgba(255, 255, 255, 0.11);
    --accent: #E2BC4A; --accent-soft: rgba(226, 188, 74, 0.13);
    --ok: #7FC48B; --no: #E08A8A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F0D0B; --paper-2: #171411; --card: #1B1815;
  --ink: #EFEBE3; --ink-2: #BDB5A8; --ink-3: #847C70;
  --rule: rgba(255, 255, 255, 0.11);
  --accent: #E2BC4A; --accent-soft: rgba(226, 188, 74, 0.13);
  --ok: #7FC48B; --no: #E08A8A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 19px/1.62 var(--serif); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ── the bar */
.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.bar-in { max-width: 72rem; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 20px; font: 500 14px/1 var(--sans); }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 12px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; }
.mark svg { width: 22px; height: 22px; color: var(--accent); }
.bar nav { display: flex; gap: 18px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.bar nav::-webkit-scrollbar { display: none; }
.bar nav a { text-decoration: none; color: var(--ink-2); white-space: nowrap; padding: 6px 0; }
.bar nav a[aria-current="page"], .bar nav a:hover { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 640px) { .bar-in { gap: 12px; } .mark span { display: none; } .bar nav { gap: 14px; } }

/* ── page furniture */
main { padding: 0 16px 96px; }
.wrap { max-width: var(--measure); margin: 0 auto; }
.wide { max-width: 64rem; margin: 0 auto; }
.eyebrow { font: 600 12px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0.35em 0 0.3em; }
h2 { font-size: 1.65rem; margin: 2.2em 0 0.5em; }
h3 { font-size: 1.2rem; margin: 1.8em 0 0.4em; }
p { margin: 0 0 1em; }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--ink-2); }
.meta { font: 13px/1.5 var(--sans); color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0.8em 0 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 3em 0; }
blockquote { margin: 1.5em 0; padding: 0 0 0 1.1em; border-left: 3px solid var(--accent); color: var(--ink-2); font-style: italic; }
small, .small { font: 13px/1.5 var(--sans); color: var(--ink-3); }
kbd { font: 600 0.8em var(--mono); padding: 1px 5px; border: 1px solid var(--rule); border-radius: 4px; background: var(--card); }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin: 0.25em 0; }
dfn { font-style: normal; font-weight: 600; }

header.page { padding: 56px 0 8px; }
header.page .wrap > :last-child { margin-bottom: 0; }

/* figures: our renders and NASA's public-domain photographs (credit in the caption) */
figure { margin: 2em 0; }
figure.bleed { margin-left: calc(50% - min(32rem, 50vw - 16px)); margin-right: calc(50% - min(32rem, 50vw - 16px)); }
figure img { width: 100%; border-radius: 4px; background: var(--paper-2); }
figcaption { font: 14px/1.5 var(--sans); color: var(--ink-3); margin-top: 0.6em; }
figcaption b { color: var(--ink-2); font-weight: 600; }

/* a note set off from the text: a story, a myth, a tip */
.aside { margin: 2em 0; padding: 1.1em 1.25em; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; font-size: 0.95em; }
.aside > :last-child { margin-bottom: 0; }
.aside .eyebrow { display: block; margin-bottom: 0.4em; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--accent); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.4em 0 0; }

/* the narrator: a reading's sections, spoken (school.js) */
.listen { display: flex; align-items: center; gap: 12px; margin: 1.6em 0 0; padding: 10px 14px 10px 10px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); font: 14px/1.3 var(--sans); width: fit-content; max-width: 100%; }
.listen button { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; display: grid; place-items: center; }
.listen button svg { width: 14px; height: 14px; }
.listen .now { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listen[hidden] { display: none; }
section.speaking > h2 { color: var(--accent); }

/* the syllabus: modules as rows */
.modules { list-style: none; padding: 0; margin: 1.5em 0; counter-reset: mod; }
.module { display: grid; grid-template-columns: 3.2rem 1fr; gap: 4px 16px; padding: 22px 0; border-top: 1px solid var(--rule); }
.module:last-child { border-bottom: 1px solid var(--rule); }
.module .num { font: 600 13px/1.9 var(--mono); color: var(--accent); }
.module h3 { margin: 0; font-size: 1.3rem; }
.module h3 a { text-decoration: none; }
.module p { margin: 0.3em 0 0.6em; color: var(--ink-2); font-size: 0.98rem; }
.parts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.parts a, .parts span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--paper-2); font: 500 13px/1.3 var(--sans); text-decoration: none; color: var(--ink-2); }
.parts a:hover { color: var(--ink); background: var(--accent-soft); }
.parts i { font-style: normal; color: var(--ink-3); }
.parts .done { color: var(--ok); }
.parts .done::before { content: "✓"; }

/* three ways in */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 2em 0; }
.way { padding: 18px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); }
.way b { display: block; font: 600 15px/1.3 var(--sans); margin-bottom: 6px; }
.way p { margin: 0; font-size: 0.92rem; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 720px) { .ways { grid-template-columns: 1fr; } }

.progress { height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; margin: 1em 0 0.4em; max-width: 22rem; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.4s; }

/* a reading's end: sources, and the way on */
.sources { font: 14px/1.55 var(--sans); color: var(--ink-3); }
.sources ol { padding-left: 1.4em; }
.sources a { word-break: break-word; }
.next { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 3em 0 0; padding: 20px 22px; border-radius: 10px; background: var(--ink); color: var(--paper); text-decoration: none; }
.next:hover { color: var(--paper); background: var(--accent); }
.next small { color: inherit; opacity: 0.75; display: block; }
.next b { font: 600 1.2rem/1.3 var(--serif); }
.done-mark { display: inline-flex; align-items: center; gap: 8px; font: 500 14px/1 var(--sans); color: var(--ink-3); }
.done-mark input { width: 18px; height: 18px; accent-color: var(--accent); }

/* a picture with its facts beside it (the masters) */
.work { display: grid; grid-template-columns: 15rem 1fr; gap: 20px; margin: 2em 0; padding-top: 2em; border-top: 1px solid var(--rule); }
.work figure { margin: 0; }
.work h3 { margin-top: 0; }
.work .facts { font: 14px/1.5 var(--sans); color: var(--ink-3); margin: 0 0 0.8em; }
.work .facts b { color: var(--ink-2); font-weight: 600; }
.work .nopic { aspect-ratio: 1; border-radius: 4px; background: var(--paper-2); display: grid; place-items: center; text-align: center; padding: 16px; font: 13px/1.4 var(--sans); color: var(--ink-3); }
@media (max-width: 640px) { .work { grid-template-columns: 1fr; } .work figure, .work .nopic { max-width: 20rem; } }

/* tables (the lineage, the checklist) */
.table { width: 100%; border-collapse: collapse; font: 15px/1.45 var(--sans); margin: 1.5em 0; }
.table th, .table td { text-align: left; vertical-align: top; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); }
.table th { font-weight: 600; color: var(--ink-3); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.table td:first-child { white-space: nowrap; font-weight: 600; }
.scroll { overflow-x: auto; }

/* a checklist you tick (owning: the inspection) */
.check { list-style: none; padding: 0; }
.check li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 0.97rem; }
.check input { margin-top: 0.35em; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.check label b { font-weight: 600; }

/* questions (module checks, the final) */
.q { margin: 1.6em 0; padding: 1.2em 1.25em; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); }
.q p { font-weight: 600; margin-bottom: 0.7em; }
.q button { display: block; width: 100%; text-align: left; margin: 6px 0; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font: 15px/1.4 var(--sans); cursor: pointer; }
.q button:hover:not(:disabled) { border-color: var(--accent); }
.q button.ok { border-color: var(--ok); color: var(--ok); }
.q button.no { border-color: var(--no); color: var(--no); }
.q .why { font: 14px/1.5 var(--sans); color: var(--ink-2); margin: 0.6em 0 0; }

footer.site { border-top: 1px solid var(--rule); padding: 28px 16px 48px; font: 13px/1.6 var(--sans); color: var(--ink-3); }
footer.site .wide { display: grid; gap: 8px; }

@media print {
  .bar, .listen, .next, .actions, footer.site { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  main { padding: 0; }
}
