/* pages.css — small, single-page-only rules, one page's worth per
   block below. Bundled together rather than split into five separate
   files since each block is tiny; every page listed only loads the
   block(s) it actually uses, the rest just sit unused in the same
   file. Depends on tokens defined in base.css. */

/* index.html: headline findings list + summary stats strip */
.findings-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0;
}
.findings-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.4rem;
  color: var(--ink-soft);
}
.findings-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 1.6rem 0;
}
.stats-strip .stat strong { color: var(--accent); }
.latest-col { margin-bottom: 1.2rem; }
.latest-col-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.1rem 1.3rem 0.4rem;
}
.latest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1rem;
  margin: 1.2rem 0 1.6rem;
}
.latest-grid .latest-col { margin-bottom: 0; }
.latest-col h3 {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.latest-pubs {
  list-style: none;
  margin: 1rem 0 0.4rem;
  padding: 0;
}
.latest-pub-item {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-decoration: none;
  color: inherit;
  margin: 0;
}
/* Rows with a description (Documentation/SQL, not Publications) get
   a fixed minimum height so the Documentation and SQL walkthroughs
   columns line up row-for-row instead of raggedly matching each
   entry's own text length. */
.latest-pub-item:has(.latest-pub-text) { min-height: 5.5rem; align-items: flex-start; }
.latest-pubs li:last-child .latest-pub-item { border-bottom: none; }
.latest-pub-tag {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.latest-pub-date {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
}
.latest-pub-title { font-size: 0.95rem; transition: color 0.15s ease; }
.latest-pub-item:hover .latest-pub-title { color: var(--accent); }
.latest-pub-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.latest-pub-desc {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.latest-pubs-link {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  margin: 0 0 1.6rem;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.1rem;
  margin: 1.6rem 0;
}
.explore-card {
  display: block;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1.3rem 1.4rem;
  margin: 0;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background 0.18s ease, border-color 0.18s ease;
}
.explore-card:hover,
.explore-card:focus-visible {
  transform: translateY(-4px);
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(20, 30, 24, 0.12);
}
.explore-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--ink);
  transition: color 0.18s ease;
}
.explore-card:hover h3,
.explore-card:focus-visible h3 { color: var(--accent); }
.explore-card p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
@media (prefers-color-scheme: dark) {
  .explore-card:hover,
  .explore-card:focus-visible {
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  }
}

/* approach.html: the two numbered commitment blocks */
.pillar {
  margin: 1.2rem 0 2.6rem;
}
.pillar h2 { margin-top: 0; }

/* about.html: the MERIT-acronym box and the definition-list-style meta */
.name-origin { background: var(--paper); border: 1px solid var(--line); padding: 1.4rem 1.6rem; border-radius: 6px; margin-top: 1.2rem; }
.name-origin-head { display: flex; align-items: center; gap: 1rem; }
.name-origin-emblem { flex-shrink: 0; width: 56px; height: 56px; }
.name-origin .acronym { font-size: 1.3rem; font-weight: 700; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 0.3rem; }
@media (max-width: 480px) {
  .name-origin-head { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}
.name-origin .ipa { font-size: 0.85rem; font-weight: 400; letter-spacing: normal; color: var(--ink-soft); }
.name-origin .philosophy-callout {
  margin: 0.8rem 0;
  padding: 0.9rem 1.1rem;
  background: var(--accent-soft);
  border-radius: 4px;
  color: var(--ink);
}

/* about.html: the journey timeline, the 0.5/0.9 stat contrast, the
   pull-quote, and the boxed DOI citation */
.journey-timeline {
  position: relative;
  margin: 1.5rem 0 2rem;
  padding-left: 1.6rem;
  border-left: 2px solid var(--line);
}
.journey-milestone { position: relative; padding-bottom: 1.5rem; }
.journey-milestone:last-child { padding-bottom: 0; }
.journey-milestone::before {
  content: "";
  position: absolute;
  left: -1.94rem;
  top: 0.3rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--paper);
}
.journey-milestone-title {
  display: block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.journey-milestone p { margin: 0; font-size: 0.86rem; }

.pull-quote {
  margin: 1.4rem 0;
  padding: 1rem 1.4rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink);
  background: var(--paper-alt);
}

/* Named sub-heading under an h3, one level down -- used where a
   prose section needs a labeled entry point without promoting it
   to a full h3 of its own. */
.section-subhead {
  display: block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin: 1.6rem 0 0.6rem;
}

.doi-citation-box {
  margin: 1.2rem 0 1.6rem;
  padding: 1rem 1.4rem;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--ink);
}
.doi-citation-box .doi-tag {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
/* The actual DOI URL, shown as its own small line -- the title link
   above doesn't display the identifier itself, and a permanent
   identifier like a DOI should be visible, not just clickable. */
.doi-citation-box .doi-citation-url {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.doi-citation-box .doi-citation-url a {
  color: var(--ink-soft);
}
/* Boxed card, matching the white/bordered language used elsewhere on
   the site (.docs-sidebar-inner, .jump-links) -- was previously bare
   text with no visual boundary. Grid instead of the dl's normal block
   flow so label/value read as a two-column table without touching
   the markup. */
.org-meta {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.2rem 1.4rem;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1.4rem;
  row-gap: 0.7rem;
  align-items: baseline;
}
.org-meta dt { color: var(--ink); font-weight: 700; margin: 0; white-space: nowrap; }
.org-meta dd { color: var(--ink-soft); margin: 0; }

@media (max-width: 480px) {
  .org-meta { grid-template-columns: 1fr; row-gap: 0.2rem; }
  .org-meta dt { margin-top: 0.6rem; }
  .org-meta dt:first-child { margin-top: 0; }
}

/* contact.html: the field list */
.contact-box { font-family: var(--font-sans); font-size: 0.9rem; }
.contact-box .field { margin-bottom: 0.6rem; }
.contact-box .field-label { color: var(--accent); font-weight: 700; margin-right: 0.5rem; }

/* ssim.html: the L*C*S formula display, three-term card grid, and the
   windowed-computation diagram */
.formula-block {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.2rem 1.4rem;
  margin: 1rem 0 1.8rem;
  text-align: center;
}
.formula-block .formula-main {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.formula-block .formula-range {
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.lcs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 1.2rem;
  margin: 1.2rem 0 1.8rem;
}
.lcs-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
}
.lcs-card .lcs-letter {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}
.lcs-card h3 { margin: 0 0 0.4rem; font-size: 1rem; border-bottom: none; padding-bottom: 0; }
.lcs-card p { margin: 0; font-size: 0.88rem; }

.window-diagram-wrap {
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.4rem;
  margin: 1.2rem auto 1.8rem;
  overflow-x: auto;
}
.window-diagram-wrap svg { display: block; width: 100%; height: auto; }
/* Below ~480px the diagram's own text (set in SVG user units) would
   shrink along with the width and become unreadable. Instead of
   scaling it down further, pin it to a legible pixel width and let
   the wrap above scroll horizontally. */
@media (max-width: 480px) {
  .window-diagram-wrap svg { width: 600px; min-width: 600px; }
}
/* This diagram ships two versions: a wide side-by-side layout for
   normal widths, and a taller stacked layout (larger text, blocks
   full-width) purpose-built for narrow screens, swapped at the same
   ~480px breakpoint used above -- simply shrinking the wide version
   to fit a phone's width shrinks its text past legibility, and a
   stacked layout uses the screen's own extra vertical room instead
   of fighting for horizontal space. */
.flatblock-diagram-wrap svg { width: 100%; min-width: 0; }
.flatblock-diagram-wrap .diagram-mobile { display: none; }
@media (max-width: 480px) {
  .flatblock-diagram-wrap .diagram-wide { display: none; }
  .flatblock-diagram-wrap .diagram-mobile { display: block; }
}
/* Birthday-paradox diagram: all 15 lines drawn at once read as a
   dense, uncountable tangle. Under JS, birthday_animation.js reveals
   them one at a time with a running count instead -- hidden here
   only under html.js (added by the inline script in <head>, so it's
   present only when JS actually runs) so a no-JS visitor still gets
   today's fully-drawn diagram with no counter, unchanged. */
html.js .birthday-lines line {
  opacity: 0;
  transition: opacity 0.15s ease;
}
.birthday-counter-text { display: none; }
html.js .birthday-counter-text { display: block; }

/* Replay button for the same diagram -- pointless without JS (the
   diagram is just the finished static image then), so hidden unless
   html.js confirms the script that makes it do anything actually
   ran. */
.diagram-replay-btn {
  display: none;
  margin: 0.7rem auto 0;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
}
.diagram-replay-btn:hover { border-color: var(--accent); color: var(--accent); }
html.js .diagram-replay-btn { display: block; }

/* Ghost-duplication diagram: points A and B start merged (two
   identical-radius circles sitting exactly on top of each other
   read as a single, normal-sized dot) and separate smoothly over
   the entire reveal, with the gap label fading in near the end.
   Positions and opacity are set directly via JS (setAttribute /
   inline style) in ghost_zoom_animation.js, not CSS transitions --
   Safari doesn't reliably treat cx/x/x1/x2 as CSS-animatable SVG
   geometry properties, so a CSS-only version silently never
   animated there. Nothing needed here for that part; a no-JS
   visitor just sees the plain HTML's already-separated final
   state, since the script that would change it never runs. */

/* While the reveal above is actually playing (is-animating, a
   transient class JS adds only for that duration), swap the static
   captions for a single, larger, bolder, pulsing live counter
   ticking through the zoom exponent in sync with the visual reveal
   -- big and animated enough that "still zooming in" vs. "finished"
   is unambiguous even at a glance, unlike the small static text it
   replaces. .ghost-zoom-counter is hidden unconditionally so a
   no-JS visitor only ever sees the ordinary static captions. */
.ghost-zoom-counter { display: none; }
html.js .ghost-diagram.is-animating .ghost-zoom-static { display: none; }
html.js .ghost-diagram.is-animating .ghost-zoom-counter {
  display: block;
  animation: ghost-zoom-counter-pulse 0.9s ease-in-out infinite;
}
@keyframes ghost-zoom-counter-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.window-diagram-caption {
  width: 100%;
  max-width: 100%;
  margin: 0.9rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
}

/* Modifier for a .hero-image column holding a text-heavy diagram
   (rather than a screenshot) -- .hero-image's default 420px cap
   shrinks a wide diagram's SVG-unit text below legibility. */
.hero-image-wide { max-width: 540px; }

/* approach.html: the "two cores" summary box, and the
   free-use/commercial-use comparison cards */
.core-summary {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 1.2rem 1.4rem;
  margin: 1rem 0 1.8rem;
}
.core-summary p.core-summary-lede { margin: 0 0 0.6rem; color: var(--ink); font-weight: 700; }
.core-summary ol { margin: 0; padding-left: 1.3rem; }
.core-summary li { margin-bottom: 0.3rem; color: var(--ink); }

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1rem;
  margin: 1.2rem 0 1.6rem;
}
.compare-card { border-radius: 6px; padding: 1rem 1.2rem; border: 1px solid var(--line); }
.compare-card.is-free { background: var(--accent-soft); border-color: var(--accent); }
.compare-card.is-restricted { background: var(--paper-alt); border-color: var(--line); }
.compare-card .compare-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.compare-card.is-free .compare-label { color: var(--accent); }
.compare-card.is-restricted .compare-label { color: var(--ink-soft); }
.compare-card p { margin: 0; color: var(--ink); font-size: 0.92rem; }

/* about.html: a boxed aside for background/context info that isn't
   part of the main narrative thread (e.g. CERN/Zenodo history) */
.info-column {
  margin: 1.4rem 0 1.8rem;
  padding: 1.2rem 1.4rem;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.info-column-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}
.info-column h4 {
  margin: 1rem 0 0.4rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}
.info-column h4:first-of-type { margin-top: 0; }
.info-column p { font-size: 0.88rem; margin: 0 0 0.8rem; }
.info-column p:last-child { margin-bottom: 0; }

/* sitemap.html: the nested page tree */
.sitemap-tree, .sitemap-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sitemap-tree {
  margin: 1rem 0 2rem;
}
.sitemap-tree > li {
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px dashed var(--line);
}
.sitemap-tree > li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sitemap-tree > li > a {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
}
.sitemap-tree h3 {
  margin: 0.9rem 0 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.sitemap-tree ul {
  margin: 0.3rem 0 0.7rem 1.3rem;
}
.sitemap-tree ul li {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  padding: 0.2rem 0;
}
.sitemap-footer-list {
  list-style: none;
  margin: 1rem 0 2rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
}
.sitemap-footer-list li {
  font-family: var(--font-sans);
  font-size: 0.95rem;
}
.sitemap-count {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

@media (prefers-color-scheme: dark) {
  .name-origin { background: #24281f; }
}
