/* Proving Ground: the finds pass. The landing (#/finds), the whole-Earth search (#/search) and the back links.
   Regolith palette only: bone on neutral black; no amber here (nothing on these screens is an analogy that breaks). */

/* ------------------------------------------------------------------ back link, shared by every view */
.back { display: inline-flex; align-items: center; gap: 0.35em; min-height: var(--tap); font-size: var(--t-small); font-weight: var(--w-medium);
  color: var(--ash); text-decoration: none; letter-spacing: var(--tr-label); }
.back:hover, .back:focus-visible { color: var(--bone); }
.back .arrow { margin: 0; }

/* ------------------------------------------------------------------ the landing */
.finds { padding: clamp(1.25rem, 3.2vh, 2.5rem) var(--gutter) var(--s-6); max-width: 112rem; margin: 0 auto;
  display: flex; flex-direction: column; gap: clamp(1rem, 2.6vh, 2rem); }
.finds-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-2) var(--s-6); }
.finds-h { font-size: clamp(2.2rem, 3.4vw, var(--t-7)); margin: 0; }
.finds-sub { font-size: var(--t-lead); color: var(--ash); line-height: var(--lh-lead); margin: 0; }
.finds-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto 1fr auto; column-gap: clamp(1rem, 1.8vw, 2rem); }
.find { grid-row: span 5; display: grid; grid-template-rows: subgrid; row-gap: 0; background: var(--stage); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.find > :not(.find-pic) { padding-inline: var(--s-5); }
.find-pic { display: block; position: relative; height: clamp(12rem, 28.5vh, 21rem); background: var(--void); overflow: hidden; color: inherit; text-decoration: none; cursor: pointer; }
.find-photo, .find-photo img { display: block; width: 100%; height: 100%; }
.find-photo img { object-fit: cover; object-position: 50% 0%; filter: grayscale(1) contrast(1.04); }
.find-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 38%; background: linear-gradient(to top, rgb(5 5 5 / 0.85), rgb(5 5 5 / 0)); }
.find-cap { position: absolute; z-index: 1; left: var(--s-4); bottom: var(--s-3); right: var(--s-4); font-size: var(--t-small); font-weight: var(--w-medium); color: var(--bone); line-height: 1.25; }
.find-blocks { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: end; padding: var(--s-3); column-gap: var(--s-1); }
.find-block { display: grid; justify-items: center; gap: var(--s-2); min-width: 0; }
.find-block img { display: block; width: 106%; max-width: none; height: auto; margin: 0 -3%; }
.find-pole { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: var(--s-2); padding: var(--s-3) var(--s-5) var(--s-4); }
.pole-svg { width: 100%; height: 100%; min-height: 0; overflow: visible; }
.pole-horizon { fill: var(--bone-1); stroke: var(--line-strong); stroke-width: 2; }
.pole-cap { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 5 6; }
.pole-path { fill: none; stroke: var(--bone); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pole-path.is-back { stroke: var(--smoke); stroke-width: 1.5; opacity: 0.75; }
.pole-sun { fill: var(--bone); stroke: var(--void); stroke-width: 2.5; }
.pole-lab { font-family: var(--f-ui); font-size: 16px; fill: var(--ash); }
.pole-lanes { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; column-gap: var(--s-3); row-gap: var(--s-1); align-items: center;
  font-size: var(--t-small); line-height: 1.25; }
.pole-lane { display: contents; }
.pole-lane-name { color: var(--ash); }
.pole-lane-track { display: block; height: 0.55rem; background: var(--bone-2); border-radius: 1px; overflow: hidden; }
.pole-lane-bar { display: block; height: 100%; background: var(--bone); }
.pole-lane.is-moon .pole-lane-bar { background: var(--moon); }
.pole-lane-num { color: var(--bone); font-weight: var(--w-medium); font-variant-numeric: tabular-nums lining-nums; }
.find-title { font-family: var(--f-ui); font-size: var(--t-small); font-weight: var(--w-medium); text-transform: uppercase; letter-spacing: var(--track-caps);
  color: var(--ash); line-height: 1.25; margin: 0; padding-top: var(--s-4); padding-bottom: var(--s-2); align-self: end; }
.find-num { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: var(--s-3); row-gap: 0; line-height: 1; margin: 0; padding-bottom: var(--s-3); }
.find-num b { font-size: clamp(2.6rem, 4vw, var(--t-8)); font-weight: var(--w-strong); color: var(--bone); letter-spacing: -0.02em; font-variant-numeric: lining-nums; }
.find-unit { font-size: var(--t-lead); color: var(--ash); margin-left: -0.45rem; }
.find-says { flex-basis: 100%; font-size: var(--t-small); color: var(--ash); line-height: var(--lh-small); margin-top: var(--s-2); }
.find-line { font-size: var(--t-body); line-height: var(--lh-body); color: var(--bone); text-wrap: pretty; margin: 0; padding-bottom: var(--s-4); }
.find-act { margin: 0; padding-bottom: var(--s-5); }
.finds-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3) var(--s-6);
  border-top: 1px solid var(--line); padding-top: var(--s-4); }
.finds-count { font-size: var(--t-body); color: var(--ash); font-variant-numeric: tabular-nums lining-nums; margin: 0; }
.finds-try { font-size: var(--t-body); }
.arrow { margin-left: 0.45em; }
@media (min-width: 901px) and (max-height: 820px) {
  .finds { padding-top: var(--s-4); padding-bottom: var(--s-4); gap: var(--s-4); }
  .finds-h { font-size: 2.4rem; }
  .find-pic { height: 24vh; }
  .find-title { padding-top: var(--s-3); }
  .find-num b { font-size: 2.75rem; }
  .find-num { padding-bottom: var(--s-2); }
  .find-line { padding-bottom: var(--s-3); }
  .find-act { padding-bottom: var(--s-4); }
  .finds-foot { padding-top: var(--s-3); }
}
@media (max-width: 900px) {
  .finds-grid { grid-template-columns: 1fr; grid-template-rows: none; row-gap: var(--s-5); }
  .find { grid-row: auto; grid-template-rows: auto; }
  .find-pic { height: 14rem; }
}

/* ------------------------------------------------------------------ the whole-Earth search */
.searchmap { padding: var(--s-2) var(--gutter) var(--s-6); max-width: 112rem; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s-4); }
.sm-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-3) clamp(1.5rem, 3vw, 3rem); align-items: center; }
.sm-head-l { display: grid; gap: var(--s-2); }
.sm-h { font-size: clamp(2rem, 3vw, var(--t-6)); margin: 0; }
.sm-lead { font-size: var(--t-lead); line-height: var(--lh-lead); color: var(--bone); max-width: 46rem; text-wrap: pretty; margin: 0; }
.sm-maps { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: clamp(1rem, 2vw, 2rem); align-items: start; }
.sm-world, .sm-inset { margin: 0; display: grid; gap: var(--s-2); }
.sm-world-svg, .sm-inset-svg { width: 100%; height: auto; display: block; background: var(--void); border: 1px solid var(--line); border-radius: var(--radius); }
.sm-world-svg { aspect-ratio: 1640 / 790; }
.sm-inset-svg { aspect-ratio: 62 / 66; }
.sm-inset-svg image { image-rendering: pixelated; }
.sm-box { fill: none; stroke: var(--bone); stroke-width: 2; vector-effect: non-scaling-stroke; }
.sm-boxlab { font-family: var(--f-ui); font-size: 30px; fill: var(--ash); }
.sm-ring { fill: none; stroke: var(--bone); stroke-width: 3; vector-effect: non-scaling-stroke; }
.sm-ring-cas { fill: none; stroke: var(--void); stroke-width: 7; vector-effect: non-scaling-stroke; }
.sm-rank { font-family: var(--f-ui); font-weight: var(--w-strong); font-size: 34px; fill: var(--bone); paint-order: stroke; stroke: var(--void); stroke-width: 6px; }
.sm-patch { fill: none; stroke: var(--bone); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.sm-patch-cas { fill: none; stroke: var(--void); stroke-width: 6; vector-effect: non-scaling-stroke; }
.sm-ground { fill: var(--bone); stroke: var(--void); stroke-width: 2; vector-effect: non-scaling-stroke; }
.sm-leader { stroke: var(--bone); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sm-lab { font-family: var(--f-ui); font-size: 17.4px; font-weight: var(--w-medium); fill: var(--bone); paint-order: stroke; stroke: var(--void); stroke-width: 4.2px; }
.sm-legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--t-small); color: var(--ash); line-height: 1.3; }
.sm-lg { display: inline-flex; align-items: center; gap: 0.5em; }
.sm-lg i { display: inline-block; flex: none; }
.sm-lg-ramp i { width: 3.2em; height: 0.7em; background: linear-gradient(90deg, #4e463f, #6e5f52, #8e7a65, #ae967b, #c9b699, #e1d6c0); border-radius: 1px; }
.sm-lg-ring i { width: 0.95em; height: 0.95em; border: 2.5px solid var(--bone); border-radius: 50%; }
.sm-lg-dot i { width: 0.7em; height: 0.7em; background: var(--bone); border-radius: 50%; }
.sm-side { display: grid; gap: var(--s-3); align-content: start; }
.sm-top6-h { font-family: var(--f-ui); font-size: var(--t-small); font-weight: var(--w-medium); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--ash); margin: 0; line-height: 1.25; }
.sm-top6 { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); font-size: var(--t-body); color: var(--bone); line-height: 1.3; }
.sm-top6 li { display: grid; grid-template-columns: 2.6em 1fr; }
.sm-top6 b { color: var(--ash); font-weight: var(--w-medium); }
.sm-country { color: var(--ash); }
.sm-proof { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1rem, 2vw, 2rem); align-items: start;
  border-top: 1px solid var(--line); padding-top: var(--s-5); }
.sm-patchfig, .sm-photo { margin: 0; display: grid; gap: var(--s-2); }
.sm-patchwrap { position: relative; display: block; aspect-ratio: 1; }
.sm-patchwrap img, .sm-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.sm-photo img { filter: grayscale(1); }
.sm-ink { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sm-cap { display: block; font-size: var(--t-small); color: var(--ash); line-height: 1.3; margin-top: 2px; }
.sm-nine { display: grid; gap: 0; align-content: center; }
.sm-nine-h { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: var(--s-2); line-height: 1; margin: 0; }
.sm-nine-h b { font-size: var(--t-8); font-weight: var(--w-strong); letter-spacing: -0.02em; }
.sm-nine-h .unit { font-size: var(--t-lead); color: var(--ash); margin-right: var(--s-3); }
.sm-nine-say { flex: 1 1 14rem; font-size: var(--t-body); color: var(--bone); line-height: var(--lh-body); }
.sm-dots { width: 100%; max-width: 34rem; height: auto; overflow: visible; }
.dl-axis { stroke: var(--line-strong); stroke-width: 3; }
.dl-chance { stroke: var(--smoke); stroke-width: 2; stroke-dasharray: 6 6; }
.dl-dot { fill: var(--bone); stroke: var(--void); stroke-width: 2.5; }
.dl-tick { stroke: var(--bone); stroke-width: 3; }
.dl-avg { font-family: var(--f-ui); font-size: 26px; font-weight: var(--w-strong); fill: var(--bone); }
.dl-q { font-family: var(--f-ui); font-size: 16px; fill: var(--smoke); }
.sm-go { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-3); }
.sm-credit { max-width: none; }
.sm-ink path { vector-effect: non-scaling-stroke; stroke-width: 3px; }
.sm-ink .ink-casing path { stroke-width: 7px; }
@media (max-width: 900px) {
  .sm-head, .sm-maps, .sm-proof { grid-template-columns: 1fr; }
}
.sm-patch-lab { position: absolute; font-size: var(--t-body); font-weight: var(--w-medium); color: var(--bone); line-height: 1.2; white-space: nowrap;
  text-shadow: 0 0 4px var(--void), 0 0 2px var(--void), 0 0 1px var(--void); }

/* ------------------------------------------------------------------ How it works (#/checks) */
.checks { max-width: 120rem; margin: 0 auto; gap: var(--s-6); }
.hw-counts { font-size: var(--t-body); color: var(--ash); margin: 0; font-variant-numeric: tabular-nums lining-nums; }
.arch { margin: 0; display: grid; gap: var(--s-3); }
.arch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
@media (min-width: 1800px) { .arch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .arch-grid { grid-template-columns: 1fr; } }
.arch-panel { display: block; width: 100%; height: auto; border-radius: var(--radius); background: var(--stage); }
.arch-cap { font-size: var(--t-body); line-height: var(--lh-body); color: var(--ash); max-width: 72rem; text-wrap: pretty; }
.arch-cap b { color: var(--bone); }
.hw-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: auto; column-gap: clamp(1rem, 1.8vw, 2rem); row-gap: clamp(1rem, 1.8vw, 2rem); }
@media (max-width: 1500px) { .hw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .hw-cards { grid-template-columns: 1fr; } .hw-card { grid-row: auto; grid-template-rows: none; } }
.hw-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: var(--s-2); align-content: start; background: var(--stage); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-4) var(--s-4) var(--s-5); min-width: 0; scroll-margin-top: calc(var(--bar-h) + var(--s-4)); }
.hw-pic { height: 13rem; display: grid; align-items: center; justify-items: center; overflow: hidden; }
.hw-pic > * { width: 100%; }
.hw-pair { height: 100%; }
.hw-fig { min-height: 0; grid-template-rows: minmax(0, 1fr) auto; }
.hw-fig img { height: 100%; width: auto; max-width: 100%; justify-self: center; }
.hw-patch { height: 100%; width: auto !important; aspect-ratio: 1; }
.hw-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.hw-fig { margin: 0; display: grid; gap: var(--s-1); }
.hw-fig img { display: block; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }

.hw-patch img { border-radius: var(--radius); }
.hw-rows { display: grid; gap: var(--s-2); }
.hw-row { display: grid; gap: 0; }
.hw-row-name { font-size: var(--t-small); color: var(--bone); font-weight: var(--w-medium); }
.hw-row.is-other .hw-row-name { color: var(--ash); }
.sm-dots.is-other .dl-dot { fill: var(--smoke); }
.sm-dots.is-other .dl-avg { fill: var(--ash); }
.hw-num { display: flex; align-items: baseline; gap: var(--s-1); margin: var(--s-2) 0 0; line-height: 1; }
.hw-num b { font-size: var(--t-7); font-weight: var(--w-strong); letter-spacing: -0.02em; color: var(--bone); }
.hw-unit { font-size: var(--t-lead); color: var(--ash); }
.hw-title { font-family: var(--f-ui); font-size: var(--t-body); font-weight: var(--w-strong); line-height: 1.3; color: var(--bone); margin: 0; }
.hw-says { font-size: var(--t-small); color: var(--ash); line-height: var(--lh-small); margin: 0; }
.hw-plain { font-size: var(--t-small); color: var(--ash); line-height: var(--lh-small); margin: var(--s-2) 0 0; text-wrap: pretty; }
.chk-words > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.5em; min-height: var(--tap); }
.chk-words > summary::-webkit-details-marker { display: none; }
.chk-words > summary::before { content: "+"; color: var(--ink); font-weight: var(--w-strong); font-size: var(--t-3); width: 0.8em; }
.chk-words[open] > summary::before { content: "\2212"; }

/* ------------------------------------------------------------------ the Low Sun switch (3D view): its state is written on it */
.btn.switch { gap: 0.55em; }
.sw-track { position: relative; display: inline-block; width: 2.1em; height: 1.15em; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--void); flex: none; }
.sw-knob { position: absolute; top: 50%; left: 0.15em; width: 0.75em; height: 0.75em; border-radius: 50%; background: var(--smoke); transform: translateY(-50%); transition: left var(--fast, 0.15s) ease, background var(--fast, 0.15s) ease; }
.switch[aria-checked="true"] .sw-track { background: var(--bone); border-color: var(--bone); }
.switch[aria-checked="true"] .sw-knob { left: 1.1em; background: var(--void); }
.sw-state { color: var(--ash); font-weight: var(--w-regular); min-width: 1.6em; }
.switch[aria-checked="true"] .sw-state { color: var(--bone); }
.twins-top .back, .twins .back { margin-right: var(--s-2); }

/* ------------------------------------------------------------------ lists and the 3D view: measures and tags (finds pass) */
.dims { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr)); }
.dim { overflow-wrap: anywhere; }
.dim-head { flex-wrap: wrap; row-gap: 0.2rem; }
.dim-flag { margin-left: 0; }
.dim-side { white-space: normal; }
.dim-pair { display: flex; flex-wrap: wrap; column-gap: 0.3em; }
.chip { border: 0; border-radius: 0; padding: 0; background: none; color: var(--ash); font-weight: var(--w-regular); }
.chip::before { content: ""; display: inline-block; width: 0.42em; height: 0.42em; border-radius: 50%; background: var(--smoke); margin-right: 0.15em; vertical-align: 0.1em; }
.chip.is-ink { color: var(--bone); }
.chip.is-ink::before { background: var(--bone); }

/* the place line under a block's name (finds pass: "near Pairique Chico") */
.find-block .bodytag { margin-top: var(--s-1); }
.find-near { margin-top: calc(-1 * var(--s-1)); font-size: var(--t-small); color: var(--ash); line-height: var(--lh-tight); text-align: center; }

/* round 6: balanced card titles (no lone last word); "breaks here" is a label, not a button */
.find-title, .hw-title { text-wrap: balance; }
.dim-flag { border: 0; padding: 0; border-radius: 0; }
.dim-flag::before { content: ""; display: inline-block; width: 0.42em; height: 0.42em; border-radius: 50%; background: currentColor; margin-right: 0.3em; vertical-align: 0.1em; }

/* round 7: the list tabs stay one line each; "For scientists" opens like "Words we use" (a + that turns to a minus);
   the sources' names get room */
.srcswitch button { white-space: nowrap; padding-inline: var(--s-2); }
.chk-sci > summary { list-style: none; gap: 0.5em; }
.chk-sci > summary::-webkit-details-marker { display: none; }
.chk-sci > summary::before { content: "+"; color: var(--ink); font-weight: var(--w-strong); font-size: var(--t-3); width: 0.8em; }
.chk-sci[open] > summary::before { content: "\2212"; }
@media (min-width: 901px) { .sources th { width: 19rem; } }
@media (max-width: 600px) { .srcswitch button { white-space: normal; } }
.chk-sci > summary::before, .chk-words > summary::before { line-height: 1; }

/* round 9: on tall wide screens (1920 x 1080) the pictures take the room that was left empty under the cards */
@media (min-width: 1600px) and (min-height: 1000px) {
  .find-pic { height: clamp(12rem, 37vh, 26rem); }
}

/* phone pass: both block names on one line (no capitals there), and no "enlarged →" when the inset sits below */
@media (max-width: 600px) {
  .find-block .bodytag { text-transform: none; letter-spacing: normal; white-space: nowrap; }
}
@media (max-width: 900px) {
  .sm-world-svg .sm-boxlab { display: none; }
}
