/* design: v2 */
/* cardformycamera.com, design v2: a camera shop counter. Viewfinder green for the hero, page heads and footer, a pale
   green reading surface, cameras in dark body colours with ink outlines, and tangerine for one thing only: the memory
   card (every card drawn, every printed mark, the button that finds one). Gabarito for headings, Golos Text for text,
   Spline Sans Mono for marks and codes (all OFL, self-hosted). Light surfaces in dark mode too (color-scheme: light), so
   every pair is checked once, by tests/design.test.ts. */

@font-face { font-family: "Gabarito"; src: url("/fonts/gabarito.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Golos Text"; src: url("/fonts/golos-text.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Spline Sans Mono"; src: url("/fonts/spline-sans-mono.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
  --brand: #0b6b3f;        /* viewfinder green: the hero, page heads and footer */
  --brand-deep: #08502f;
  --bg: #d9ecdf;           /* pale green, the reading surface */
  --card: #ffffff;
  --band: #c4e2cd;
  --text: #0f2318;         /* ink, near-black green */
  --muted: #3a5244;
  --line: #a3c9b0;
  --rule: #0f2318;
  --link: #08562f;
  --on-brand: #ffffff;
  --on-brand-muted: #d6f0df;
  --tan: #ff8a3d;          /* the card, and only the card */
  --tan-text: #0f2318;
  --btn: #ff8a3d;
  --btn-hover: #ff9d5c;
  --btn-text: #0f2318;
  --yes: #0a5732; --yes-bg: #d1efdb;
  --no: #8f2d06; --no-bg: #fde4d4;
  --ask: #594300; --ask-bg: #f7edc6;
  --display: "Gabarito", "Trebuchet MS", system-ui, sans-serif;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 14px;
  color-scheme: light;
}

/* ---------- type ---------- */
body { font-family: var(--sans); font-size: 18px; line-height: 1.6; background: var(--bg); color: var(--text); }
main { overflow-x: clip; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.02; margin: 0.1em 0 0.3em; font-weight: 900; }
h2 { font-size: clamp(1.45rem, 2.8vw, 1.95rem); line-height: 1.15; margin: 1.6em 0 0.5em; }
h3 { font-size: 1.18rem; line-height: 1.25; margin: 0 0 0.3em; }
a { color: var(--link); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; text-decoration-color: var(--tan); }
.code { font-family: var(--mono); font-weight: 600; }
.wrap { max-width: 1180px; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 17px; } }
::selection { background: var(--tan); color: var(--tan-text); }
.label, .small { font-size: 0.94rem; line-height: 1.5; color: var(--muted); }
.label { margin: 10px 0 0; }
.note { border-left: 6px solid var(--tan); padding: 4px 0 4px 12px; }
.section-sub { color: var(--muted); margin-top: -0.2em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
q.maker { font-style: italic; }
q.maker::before { content: "\201C"; } q.maker::after { content: "\201D"; }
.src { font-size: 0.92rem; }

/* ---------- a printed mark: a little tangerine card, corner clipped like an SD card ---------- */
.mark { display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 0.92rem; line-height: 1.2; background: var(--tan); color: var(--tan-text); padding: 3px 12px 3px 8px; margin: 1px 2px; border-radius: 4px; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%); max-width: 100%; overflow-wrap: anywhere; }
.words { font-style: italic; }
.or-word, .and { font-size: 0.88rem; color: var(--muted); margin: 0 4px; }
.none { color: var(--muted); font-size: 0.92rem; }

/* ---------- header ---------- */
.site-header { background: var(--bg); border-bottom: 0; }
.header-row { padding-top: 10px; padding-bottom: 10px; max-width: none; padding-left: clamp(16px, 3.6vw, 56px); padding-right: clamp(16px, 3.6vw, 56px); }
.brand { gap: 10px; }
.brand svg.logo-mark { width: 44px; height: 44px; }
.wordmark { font-family: var(--display); font-weight: 900; font-size: 1.45rem; line-height: 1; color: var(--text); letter-spacing: -0.02em; }
.main-nav { gap: 4px 24px; }
.main-nav a { font-family: var(--display); font-weight: 700; font-size: 1.04rem; color: var(--text); }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--link); text-decoration-color: var(--tan); text-decoration-thickness: 4px; }
.menu-btn { font-family: var(--display); font-weight: 800; color: var(--text); border: 2.5px solid var(--text); border-radius: 10px; background: var(--card); }
@media (max-width: 760px) { .wordmark { font-size: 1.15rem; } .brand svg.logo-mark { width: 36px; height: 36px; } }

/* ---------- buttons ---------- */
.btn { background: var(--btn); color: var(--btn-text); border: 3px solid var(--rule); border-radius: 10px; font-family: var(--display); font-weight: 800; font-size: 1.1rem; padding: 12px 24px; cursor: pointer; }
.btn:hover { background: var(--btn-hover); color: var(--btn-text); }
.btn:focus-visible, input:focus, select:focus { outline: 3px solid var(--tan); outline-offset: 2px; }

/* ---------- home: the hero is the tool ---------- */
.hero { background: var(--brand); color: var(--on-brand); }
.hero-in { padding: 0 clamp(16px, 3.6vw, 56px); display: grid; grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); gap: 20px 40px; align-items: stretch; }
.hero-text { padding: 30px 0 40px; align-self: center; }
.hero h1 { color: var(--on-brand); font-size: clamp(2.3rem, 4.6vw, 3.9rem); margin: 0 0 14px; }
.hero-sub { font-size: 1.16rem; line-height: 1.5; margin: 0 0 22px; max-width: 32em; color: var(--on-brand); }
/* the scene's board runs off its top edge and its counter sits on the hero's bottom edge; drawn 640 x 600, so at the
   widths where the text column is taller the art grows with it instead of leaving a gap */
.hero-art { line-height: 0; justify-self: end; width: 100%; max-width: 620px; display: flex; align-items: flex-end; }
.hero-art .hero-scene { display: block; width: 100%; height: auto; }
@media (max-width: 980px) { .hero-in { grid-template-columns: 1fr; } .hero-text { padding-bottom: 6px; } .hero-art { justify-self: center; } }
@media (max-width: 600px) { .camera-box input { font-size: 1.1rem; padding: 12px 12px; } }
@media (max-width: 600px) { .hero h1 { font-size: 2.2rem; } .hero-sub { font-size: 1.05rem; } }

.camera-box label { display: block; font-family: var(--display); font-weight: 800; font-size: 1.2rem; margin-bottom: 8px; }
.camera-row { display: flex; gap: 10px; flex-wrap: wrap; }
.camera-box input { flex: 1 1 16rem; min-width: 0; font: inherit; font-size: 1.25rem; padding: 14px 16px; border: 3px solid var(--rule); border-radius: 12px; background: #ffffff; color: var(--text); }
.camera-box input::placeholder { color: var(--muted); opacity: 1; }
.camera-box-hero { background: var(--brand-deep); border-radius: var(--radius); padding: 16px; border: 3px solid var(--rule); }
.camera-box-hero label { color: var(--on-brand); }
.camera-box-page { background: var(--card); border: 3px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; max-width: 680px; }
@media (max-width: 520px) { .camera-row .btn { width: 100%; } }

/* ---------- home: the shelf of cameras, by maker ---------- */
.counter { padding-top: 10px; }
/* columns, so the short makers stack up beside the long ones */
.shelf { columns: 3 17rem; column-gap: 28px; margin: 1em 0; }
.shelf-row { border-bottom: 8px solid var(--line); padding: 12px 0 10px; break-inside: avoid; }
.shelf-row h3 { font-size: 1.05rem; margin: 0 0 6px; color: var(--brand); }
.shelf-row ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.shelf-row a { display: inline-block; background: var(--card); border: 2px solid var(--rule); border-radius: 8px 8px 3px 3px; padding: 3px 10px; font-weight: 600; text-decoration: none; color: var(--text); }
.shelf-row a:hover { background: var(--tan); color: var(--tan-text); }
.two-up { display: grid; grid-template-columns: 1fr 1.15fr; gap: 26px; margin: 2em auto 1em; }
.tile { background: var(--card); border: 3px solid var(--rule); border-radius: var(--radius); padding: 18px 22px; }
.tile:nth-child(2) { background: var(--band); }
.tile .spot { width: 100%; max-width: 340px; height: auto; display: block; }
.tile h2 { margin-top: 0.6em; }
@media (max-width: 820px) { .two-up { grid-template-columns: 1fr; } }

/* ---------- article pages: a green head band with its spot ---------- */
.crumbs { margin: 0; padding: 4px 0 12px; font-size: 0.92rem; color: var(--muted); }
.page-head, .page-head.has-art { background: var(--brand); color: var(--on-brand); border-radius: 18px; padding: 22px clamp(18px, 3vw, 36px) 18px; margin-bottom: 26px; max-width: none; align-items: center; border: 3px solid var(--rule); }
.page-head h1 { color: var(--on-brand); margin-top: 0; font-size: clamp(1.9rem, 4.2vw, 3rem); overflow-wrap: anywhere; }
.page-head .lede, .page-head .byline, .page-head .disclosure { color: var(--on-brand); }
.page-head .lede { font-size: 1.12rem; }
.page-head .byline { font-size: 0.9rem; color: var(--on-brand-muted); }
.page-head .byline a, .page-head .disclosure a { color: var(--on-brand-muted); }
.page-head-art { width: clamp(90px, 15vw, 170px); flex-shrink: 0; }
.page-head-art .spot { width: 100%; height: auto; }
@media (max-width: 560px) { .page-head.has-art { flex-direction: column-reverse; align-items: flex-start; gap: 6px; } .page-head-art { width: 92px; } .page-head h1 { font-size: 1.75rem; } }
/* the head band and the content under it share one width on every page type: the article sets it, both fill it */
.page { max-width: 1040px; }
.page-body { max-width: none; min-width: 0; }
@media (min-width: 1100px) { .page.has-toc { grid-template-columns: minmax(0, 1fr) 250px; } }
.toc { border: 2.5px solid var(--rule); background: var(--card); border-radius: var(--radius); }
.toc-title { font-family: var(--display); font-weight: 800; }
.figure { margin: 0 0 1em; } .figure .spot { width: 100%; max-width: 420px; height: auto; } figcaption { color: var(--muted); font-size: 0.94rem; }

/* ---------- the check ---------- */
.checker { background: var(--card); border: 3px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 14px; max-width: 760px; }
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step legend { font-family: var(--display); font-weight: 800; font-size: 1.12rem; padding: 0; margin-bottom: 8px; }
.step-n { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 0.9rem; margin-right: 6px; }
.hint { font-family: var(--sans); font-weight: 400; color: var(--muted); font-size: 0.92rem; margin-left: 4px; }
.checker input[type="text"], .checker select { font: inherit; font-size: 1.02rem; padding: 9px 10px; border: 2.5px solid var(--rule); border-radius: 9px; background: #ffffff; color: var(--text); min-width: 0; max-width: 100%; }
.checker input[type="text"] { width: 100%; }
.checker input::placeholder { color: var(--muted); opacity: 1; }
.mode-picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 22rem; overflow-y: auto; border: 2px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.mode-picks label { display: flex; gap: 8px; align-items: baseline; overflow-wrap: anywhere; }
.mode-picks input { width: 1.1em; height: 1.1em; flex-shrink: 0; accent-color: var(--brand); }
.card-row, .marks-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.card-row select#card-check { flex: 1 1 16rem; width: 100%; }
.marks-row label { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.or { margin: 10px 0 6px; color: var(--muted); font-size: 0.95rem; }
.checker-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.checker-foot label { font-weight: 700; }
.checker-foot .btn { margin-left: auto; }
@media (max-width: 520px) { .checker { padding: 14px 12px; } .checker-foot .btn { margin-left: 0; width: 100%; } }

/* ---------- the answer ---------- */
.answer-head { border-bottom: 3px solid var(--rule); margin-bottom: 1em; }
.answer-camera { font-family: var(--display); font-weight: 800; font-size: 1.4rem; margin: 0; }
.answer-sum { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.35; margin: 0.4em 0 0.2em; }
.answer-group { font-size: 1.3rem; margin: 1.1em 0 0.4em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.answer-yes { color: var(--yes); } .answer-no { color: var(--no); } .answer-open { color: var(--ask); }
.group-n { font-family: var(--sans); font-size: 0.94rem; font-weight: 600; color: var(--muted); }
/* one mode, one row: name and verdict word, then the marks; everything else folded */
.mode-answers { list-style: none; padding: 0; margin: 0; border: 2.5px solid var(--rule); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.mode-row { padding: 8px 14px; border-top: 1.5px solid var(--line); overflow-wrap: anywhere; }
.mode-row:first-child { border-top: 0; }
.row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.row-name { font-family: var(--sans); font-size: 1rem; font-weight: 700; line-height: 1.35; margin: 0; }
.row-word { flex-shrink: 0; font-family: var(--display); font-weight: 800; font-size: 0.94rem; border-radius: 6px; padding: 1px 8px; }
.row-word.v-yes { background: var(--yes-bg); color: var(--yes); } .row-word.v-no { background: var(--no-bg); color: var(--no); }
.row-word.v-ask, .row-word.v-words { background: var(--ask-bg); color: var(--ask); }
.row-needs { margin: 2px 0; }
.row-more summary { font-size: 0.92rem; color: var(--link); font-weight: 600; }
.row-more p { margin: 4px 0; }
/* card lists by requirement */
.card-blocks { display: grid; gap: 14px; margin: 1em 0; }
.card-block { border: 2.5px solid var(--rule); border-radius: var(--radius); padding: 10px 14px; background: var(--band); }
.card-block .picks { margin: 8px 0 0; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); }
.card-block .pick-text { flex-direction: row; flex-wrap: wrap; gap: 0 10px; align-items: baseline; }
.card-block .pick-name { flex-basis: 100%; }
.card-block .pick:nth-child(even) { background: var(--card); }.block-head { font-size: 1.12rem; margin: 0; }
.block-for { margin: 2px 0 0; font-size: 0.9rem; font-weight: 700; color: var(--muted); }
.block-modes { list-style: none; padding: 0; margin: 0; font-size: 0.88rem; color: var(--muted); line-height: 1.4; }
.block-modes li { display: inline; } .block-modes li + li::before { content: " · "; }
.more-picks { margin-top: 6px; } .more-picks summary { font-size: 0.94rem; color: var(--link); }
.more-picks .picks { margin-top: 6px; }
.slot-cards { columns: 2 18rem; column-gap: 28px; padding-left: 1.1em; } .slot-cards li { break-inside: avoid; margin: 2px 0; }
.needs { list-style: none; padding: 0; margin: 6px 0; }
.needs li { margin: 4px 0; }
.form-name { font-weight: 700; margin-right: 6px; }
.verdict { border: 2.5px solid var(--rule); border-radius: 12px; padding: 10px 14px; margin: 10px 0 4px; }
.verdict p { margin: 0.2em 0; }
.verdict-head { font-family: var(--display); font-weight: 800; font-size: 1.12rem; }
.v-yes { background: var(--yes-bg); } .v-yes .verdict-head { color: var(--yes); }
.v-no { background: var(--no-bg); } .v-no .verdict-head { color: var(--no); }
.v-ask, .v-words { background: var(--ask-bg); } .v-ask .verdict-head, .v-words .verdict-head { color: var(--ask); }
.which { columns: 2 14rem; }

/* ---------- card lists: price tags on the counter ---------- */
.picks { list-style: none; padding: 0; margin: 1em 0; display: grid; gap: 10px; }
.pick { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; background: var(--card); border: 2px solid var(--rule); border-left-width: 2px; border-radius: 10px; padding: 6px 10px; }
.shop-line { font-size: 0.9rem; color: var(--muted); }
.pick:nth-child(even) { background: var(--band); }
.pick-card { width: 22px; height: 30px; background: var(--tan); border: 2.5px solid var(--rule); border-radius: 4px; clip-path: polygon(0 0, 70% 0, 100% 22%, 100% 100%, 0 100%); }
.pick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-name { font-weight: 700; overflow-wrap: anywhere; }
.pick-marks { font-size: 0.95rem; }
.pick-note { font-size: 0.92rem; color: var(--muted); }
.shop { align-self: flex-start; font-weight: 700; }
.maker-cards { columns: 2 16rem; column-gap: 28px; }
.maker-cards li { break-inside: avoid; }
.shops { list-style: none; padding: 0; } .shops li { margin: 6px 0; } .shops a { font-weight: 700; } .for { color: var(--muted); font-size: 0.94rem; }

/* ---------- a camera's modes: a ladder of card classes ---------- */
.cam-facts { background: var(--card); border: 2.5px solid var(--rule); border-radius: var(--radius); padding: 12px 18px; }
.slot-words { margin: 0; padding-left: 1.1em; font-size: 0.95rem; }
/* one tbody per mode (a rung): the marks on the first row, the maker's words full width under it */
.ladder-wrap { margin: 1em 0; }
table.ladder { width: 100%; border-collapse: collapse; }
.ladder caption { text-align: left; white-space: nowrap; font-weight: 700; color: var(--muted); padding-bottom: 4px; }
.ladder thead th { text-align: left; font-family: var(--display); font-size: 0.98rem; padding: 4px 10px; }
.ladder tbody.rung { border: 2.5px solid var(--rule); border-left: 10px solid var(--brand); }
.ladder tbody th, .ladder tbody td { background: var(--card); padding: 10px; vertical-align: top; text-align: left; overflow-wrap: anywhere; }
.ladder tbody th { font-weight: 600; width: 34%; }
.ladder tr.rung-words td { background: var(--band); font-size: 0.92rem; padding: 6px 10px 8px; border-top: 1.5px dashed var(--line); }
.say { font-weight: 700; margin-right: 4px; }
.group { display: inline-block; font-size: 0.8rem; font-weight: 700; background: var(--band); border-radius: 6px; padding: 1px 7px; margin-right: 4px; }
.mode-detail { display: block; font-size: 0.9rem; color: var(--muted); font-weight: 400; margin-top: 2px; }
.cond { color: var(--muted); margin: 0 0 4px; }
@media (max-width: 760px) {
  table.ladder, .ladder tbody, .ladder tr, .ladder tbody th, .ladder tbody td { display: block; width: auto; }
  .ladder thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ladder tbody.rung { margin: 0 0 12px; border-left-width: 8px; border-radius: 10px; overflow: hidden; }
  .ladder tbody th, .ladder tbody td { border-bottom: 0; padding: 6px 10px; }
  .ladder td[data-form] { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  .ladder tr.rung-words td { border-bottom: 0; }
  .ladder td[data-form]::before { content: attr(data-form); font-weight: 700; font-size: 0.88rem; color: var(--muted); min-width: 8.2em; }
}

/* ---------- card pages ---------- */
.card-index { list-style: none; padding: 0; } .card-index li { padding: 8px 0; border-bottom: 2px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.card-index a { font-weight: 700; }
.card-hero { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; align-items: start; }
.big-card { width: 104px; height: 138px; background: var(--tan); border: 3px solid var(--rule); border-radius: 8px; clip-path: polygon(0 0, 76% 0, 100% 18%, 100% 100%, 0 100%); display: grid; place-items: center; }
.big-card span { background: #ffffff; color: var(--text); font-family: var(--mono); font-weight: 700; font-size: 0.9rem; padding: 6px; border-radius: 4px; width: 78%; text-align: center; line-height: 1.25; }
@media (max-width: 480px) { .card-hero { grid-template-columns: 1fr; } }
table.specs { border-collapse: collapse; margin: 1em 0; background: var(--card); border: 2.5px solid var(--rule); max-width: 100%; }
.specs caption { text-align: left; font-weight: 700; padding-bottom: 4px; }
.specs th, .specs td { padding: 6px 12px; border-bottom: 1.5px solid var(--line); text-align: left; overflow-wrap: anywhere; }
details summary { cursor: pointer; font-weight: 700; }
details ul { margin: 6px 0 0; padding-left: 1.1em; font-size: 0.94rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--brand-deep); color: var(--on-brand); border-top: 8px solid var(--tan); }
.site-footer a, .footer-note, .footer-publisher, .footer-col h2, .footer-brand { color: var(--on-brand); }
.footer-note, .footer-publisher { color: var(--on-brand-muted); }
.footer-col h2 { font-family: var(--display); }
/* the logo on the dark green: a light wordmark, and the mark on a pale tile so its green slot and ink outline show */
.site-footer .wordmark { color: var(--on-brand); }
.site-footer svg.logo-mark { background: var(--bg); border: 2px solid var(--on-brand); border-radius: 10px; padding: 3px; width: 50px; height: 50px; }
