/* ==========================================================================
   2dollar.us — single stylesheet
   Design system: an engraver's plate. Ink-green ground, bank-note paper
   panels, Treasury-seal green for the working accent, the 1928-1963 red
   seal reserved for star-note and "myth" callouts.
   Type: Bodoni Moda (display), Libre Franklin (body), IBM Plex Mono (data,
   serial-number eyebrows).
   ========================================================================== */

:root {
  /* Color: every value is pulled from the note itself */
  --ink: #14382a;          /* reverse-plate green, the site's ground */
  --ink-deep: #0d2a1f;     /* header/footer, a shade darker than the ground */
  --paper: #e7e3d5;        /* bank-note rag */
  --paper-bright: #f2efe6; /* a fresh, uncirculated sheet */
  --paper-dim: #d9d4c3;    /* handled paper, used for rules on panels */
  --seal: #1e7a4b;         /* Treasury seal green, the working accent */
  --seal-strong: #16613b;  /* hover/active state of the accent */
  --red-seal: #b5352b;     /* 1928-1963 red seal: stars and myth callouts */
  --blue-seal: #2f5aa8;    /* silver certificate / FRBN blue, timeline chips */
  --brown-seal: #7a4a2a;   /* 1890 treasury note brown, timeline chips */
  --text: #16211b;         /* FRB-seal black, softened toward green */
  --text-muted: #4d5b53;
  --text-on-ink: #e7e3d5;
  --text-on-ink-muted: #b9c2b6;

  /* Type */
  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --font-body: "Libre Franklin", "Franklin Gothic Medium", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* Scale: fluid, clamps between phone and desktop */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4: clamp(2.6rem, 1.8rem + 4vw, 5rem);
  --step-5: clamp(3.2rem, 2rem + 6.5vw, 7.5rem);

  /* Layout */
  --measure: 66ch;
  --wrap: 74rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --note-ratio: 2.353;     /* 6.14 in / 2.61 in, the bill's own proportion */
  --radius: 3px;           /* notes have corners, not pills */
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text-on-ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--red-seal);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
  /* Bodoni Moda is a variable font whose display optical size thins its
     hairlines to nothing on ordinary screens. Pinning the optical size to
     the text cut keeps the thin strokes visible at every size. */
  font-optical-sizing: none;
  font-variation-settings: "opsz" 18;
}

h1 em, h2 em {
  font-style: italic;
  font-weight: 800;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); font-weight: 600; }
h4 { font-size: var(--step-1); font-weight: 600; }

p, ul, ol, blockquote, figure, table { margin: 0 0 1.25em; }
p, li, dd { max-width: var(--measure); }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: 0.4em; }

/* Pull quote in the display italic, which is already loaded for the hero.
   Libre Franklin has no italic on the site, so a body-face italic here would
   be a synthesized slant. */
blockquote {
  border-left: 3px solid var(--seal);
  padding-left: 1em;
  font-family: var(--font-display);
  font-optical-sizing: none;
  font-variation-settings: "opsz" 18;
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-1);
  line-height: 1.35;
  color: var(--text);
}
blockquote cite {
  display: block;
  margin-top: 0.6em;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

blockquote cite { font-style: normal; font-size: var(--step--1); }

hr {
  border: 0;
  border-top: 1px solid var(--paper-dim);
  margin: 2rem 0;
}

small, .small { font-size: var(--step--1); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--paper-bright);
  color: var(--text);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus { left: 1rem; top: 1rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Serial-number eyebrow. Every section is "numbered" the way a note is:
   district letter, eight digits, suffix. It encodes page + section order.
   -------------------------------------------------------------------------- */

.serial {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--seal);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.75rem;
}

.serial::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
}

.on-ink .serial { color: #6fbf8e; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-head {
  background: var(--ink-deep);
  border-bottom: 1px solid rgba(231, 227, 213, 0.12);
  position: relative;
  z-index: 20;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.25rem;
}

/* The engraved lathe band that runs under the header, like a note's border */
.site-head::after {
  content: "";
  display: block;
  height: 14px;
  background: url("../img/band-paper.svg") repeat-x center / auto 14px;
  border-top: 1px solid rgba(231, 227, 213, 0.18);
  opacity: 0.8;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.6rem);
  font-weight: 900;
  letter-spacing: 0.005em;
  line-height: 1;
  color: var(--paper-bright);
  font-optical-sizing: none;
  font-variation-settings: "opsz" 18;
}

.brand .mark {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 0.8rem + 0.6vw, 1.3rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #7fcf9e;
  border: 1px solid #7fcf9e;
  padding: 0.15em 0.25em;
  border-radius: var(--radius);
  transform: translateY(-0.15em);
}

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--paper-bright);
  border: 1px solid rgba(231, 227, 213, 0.35);
  border-radius: var(--radius);
  font: 500 0.85rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 1vw, 0.75rem);
}

.site-nav li + li { margin: 0; }

.site-nav a {
  display: block;
  padding: 0.55rem 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  color: var(--text-on-ink-muted);
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--paper-bright); }

.site-nav a[aria-current="page"] {
  color: var(--paper-bright);
  border-bottom-color: #6fbf8e;
}

/* Dropdown menus: a disclosure button per group. Desktop opens on hover,
   focus-within, or click; mobile shows the group as an indented list. */
.has-menu { position: relative; }

.has-menu > button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.55rem 0.6rem;
  font: 500 0.95rem/1.2 var(--font-body);
  color: var(--text-on-ink-muted);
  cursor: pointer;
  white-space: nowrap;
}

.has-menu > button::after {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.45em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg);
}

.has-menu > button:hover,
.has-menu > button[aria-expanded="true"] { color: var(--paper-bright); }

.has-menu.is-current > button {
  color: var(--paper-bright);
  border-bottom-color: #6fbf8e;
}

.site-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav .menu a { border-bottom: 0; }

@media (min-width: 56.01em) {
  /* Desktop dropdown. Hidden with visibility rather than display so the
     panel can wait 0.3s before closing: a diagonal mouse path or a brief
     slip off the button no longer snaps it shut. */
  .site-nav .menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 18rem;
    display: block;            /* overrides the nav's flex row */
    background: var(--paper-bright);
    border: 1px solid var(--paper-dim);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7), inset 0 0 0 3px var(--paper-bright), inset 0 0 0 4px var(--paper-dim);
    padding: 0.5rem 0;
    z-index: 30;
    visibility: hidden;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.3s;
  }

  /* Invisible bridge above the panel so the pointer never leaves the hover
     area while crossing from the button to the first item */
  .site-nav .menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1rem;
    height: 1rem;
  }

  .site-nav .has-menu:hover > .menu,
  .site-nav .has-menu:focus-within > .menu,
  .site-nav .has-menu.is-open > .menu {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }

  .site-nav .menu a {
    padding: 0.6rem 1.15rem;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.3;
  }

  .site-nav .menu a:hover { background: var(--paper); color: var(--seal-strong); }

  .site-nav .menu a[aria-current="page"] {
    color: var(--seal-strong);
    font-weight: 600;
    border-bottom: 0;
    box-shadow: inset 3px 0 0 var(--seal);
  }
}

@media (max-width: 56em) {
  .nav-toggle { display: inline-block; }

  .has-menu > button {
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid rgba(231, 227, 213, 0.08);
  }

  .has-menu > button::after { float: right; margin-top: 0.55em; }
  .has-menu > button[aria-expanded="true"]::after { transform: translateY(0.1em) rotate(-135deg); }

  .site-nav .menu { display: none; padding-left: 1rem; flex-direction: column; }
  .site-nav .has-menu.is-open > .menu { display: block; }
  .site-nav .menu a { font-size: 0.9rem; }

  .site-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--ink-deep);
    border-bottom: 1px solid rgba(231, 227, 213, 0.12);
    padding: 0.5rem var(--gutter) 1rem;
  }

  .site-nav.is-open { display: block; }

  .site-nav ul { flex-direction: column; gap: 0; }

  .site-nav a {
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid rgba(231, 227, 213, 0.08);
  }

  .site-nav a[aria-current="page"] { border-bottom-color: #6fbf8e; }
}

/* --------------------------------------------------------------------------
   Hero (home). The note is the thesis; the headline sits under it like a
   caption on an auction lot.
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(2rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(30, 122, 75, 0.35), transparent 60%),
    url("../img/guilloche-paper.svg") no-repeat right -12rem top -10rem / 42rem,
    var(--ink);
}

.hero-note {
  margin: 0 auto 1.5rem;
  width: min(100%, 68rem);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 2px 0 rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.hero-copy {
  display: grid;
  gap: 1.5rem;
  align-items: end;
  position: relative;
}

/* A watermark "2" in the note's own numeral, faint, behind the headline */
.hero-copy::before {
  content: "2";
  position: absolute;
  right: -0.05em;
  bottom: -0.35em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(14rem, 30vw, 30rem);
  line-height: 1;
  color: var(--paper);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 18;
}

.hero-copy > * { position: relative; z-index: 1; }

@media (min-width: 64em) {
  .hero-copy { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 4rem; }
}

.hero h1 {
  font-size: clamp(2.6rem, 1.4rem + 4.2vw, 5.25rem);
  font-weight: 800;
  color: var(--paper-bright);
  margin-bottom: 0.25em;
}

.hero h1 em {
  font-style: italic;
  font-weight: 800;
  color: #7fcf9e;
}

.hero .lede {
  font-size: var(--step-1);
  color: var(--text-on-ink-muted);
  max-width: 40ch;
}

/* Three quick facts, set like the corners of a note: three framed boxes
   with room to breathe, numbers in display type, labels in mono. */
.facts-row {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.facts-row li {
  margin: 0;
  padding: 1.35rem 1.5rem 1.25rem;
  background: rgba(13, 42, 31, 0.55);
  border: 1px solid rgba(231, 227, 213, 0.22);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px rgba(231, 227, 213, 0.12);
  max-width: none;
  min-width: 0;
}

.facts-row .num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 1.6vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--paper-bright);
  display: block;
}

.facts-row .label {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fd4b4;
}

/* Three across from the smallest phones up; tighter padding below 40em */
.facts-row { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 40em) {
  .facts-row { gap: 0.5rem; }
  .facts-row li { padding: 1rem 0.8rem 0.9rem; }
  .facts-row .num { font-size: 1.7rem; }
  .facts-row .label { font-size: 0.62rem; letter-spacing: 0.06em; margin-top: 0.45rem; }
}

/* --------------------------------------------------------------------------
   Page header for inner pages
   -------------------------------------------------------------------------- */

.page-head {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  background:
    url("../img/guilloche-paper.svg") no-repeat right -14rem top -14rem / 40rem,
    var(--ink);
}

.page-head .wrap::after {
  content: "";
  display: block;
  height: 14px;
  margin-top: 2rem;
  background: url("../img/band-paper.svg") repeat-x left center / auto 14px;
  opacity: 0.7;
}

.page-head h1 { color: var(--paper-bright); max-width: 18ch; }
.page-head .lede { font-size: var(--step-1); color: var(--text-on-ink-muted); max-width: 48ch; }

/* --------------------------------------------------------------------------
   Sections and paper panels
   -------------------------------------------------------------------------- */

.section { padding-block: clamp(2rem, 5vw, 4rem); }
.section + .section { padding-top: 0; }

/* The paper panel: content sits on a sheet with the note's double rule. */
.panel {
  background: var(--paper);
  color: var(--text);
  padding: clamp(1.25rem, 4vw, 3rem);
  border-radius: var(--radius);
  border: 1px solid var(--paper-dim);
  box-shadow:
    inset 0 0 0 4px var(--paper),
    inset 0 0 0 5px var(--paper-dim),
    0 24px 50px -30px rgba(0, 0, 0, 0.7);
  position: relative;
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid var(--seal);
  opacity: 0.55;
  pointer-events: none;
}

.panel::before { top: 0.6rem; left: 0.6rem; border-right: 0; border-bottom: 0; }
.panel::after { bottom: 0.6rem; right: 0.6rem; border-left: 0; border-top: 0; }

.panel.bright { background: var(--paper-bright); box-shadow: inset 0 0 0 4px var(--paper-bright), inset 0 0 0 5px var(--paper-dim), 0 24px 50px -30px rgba(0, 0, 0, 0.7); }

.panel + .panel { margin-top: clamp(1.5rem, 4vw, 3rem); }

.panel h2, .panel h3 { color: var(--text); }
.panel a { color: var(--seal-strong); }
.panel .serial { color: var(--seal); }

/* Two-column prose + figure inside a panel */
.split {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}

@media (min-width: 56em) {
  .split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .split.reverse > :first-child { order: 2; }
}

/* Prose block with a long measure */
.prose > * + * { margin-top: 0; }
.prose h2, .prose h3 { margin-top: 1.5em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }

/* Note figure: the scan with its frame and a caption in mono */
.note-fig { margin: 0; }

.note-fig img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 10px 25px -12px rgba(0, 0, 0, 0.55);
  background: #fff;
}

.note-fig figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  line-height: 1.5;
}

.note-fig figcaption strong { color: var(--text); font-weight: 500; }

.note-pair { display: grid; gap: 1rem; }
@media (min-width: 40em) { .note-pair { grid-template-columns: 1fr 1fr; } }

/* Specimen frame: a bill-proportioned placeholder for a series that has no
   free scan yet. Honest about the gap instead of reusing the wrong note. */
.specimen {
  aspect-ratio: var(--note-ratio);
  border: 1px dashed var(--seal);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--seal);
  background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(30, 122, 75, 0.05) 10px 11px);
}

.specimen span:first-child {
  font-family: var(--font-display);
  font-size: var(--step-1);
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  font-weight: 700;
}

/* Callout: a myth-buster or a warning, in red-seal ink */
.callout {
  border: 1px solid var(--red-seal);
  border-left-width: 6px;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: rgba(181, 53, 43, 0.05);
  margin-block: 1.5rem;
}

.callout.green {
  border-color: var(--seal);
  background: rgba(30, 122, 75, 0.06);
}

.callout > :last-child { margin-bottom: 0; }

.callout .serial { color: var(--red-seal); }
.callout.green .serial { color: var(--seal); }

/* Big number: the myth section leads with the count */
.big-number {
  font-family: var(--font-display);
  font-optical-sizing: none;
  font-variation-settings: "opsz" 18;
  font-size: var(--step-5);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

.big-number small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--seal);
  margin-top: 0.5rem;
}

/* Star: the replacement-note mark, used wherever star notes are named */
.star { color: var(--red-seal); font-weight: 700; }

/* Ornamental rule for headings that sit directly on the ink ground */
.on-ink .section > .wrap > h2::after,
.on-ink .strip-section > .wrap > h2::after {
  content: "";
  display: block;
  width: 9rem;
  height: 10px;
  margin-top: 0.6rem;
  background: url("../img/band-paper.svg") repeat-x left center / auto 10px;
  opacity: 0.6;
}

/* Scroll reveal: classes added by main.js; harmless if it never runs */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Horizontal strip (home): 160 years in one row of notes
   -------------------------------------------------------------------------- */

.strip-section { overflow: hidden; }

/* The strip's first card lines up with the heading above it; the row then
   runs off the right edge of the viewport. */
.strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem max(var(--gutter), calc((100% - var(--wrap)) / 2)) 1.25rem;
  scroll-padding-inline-start: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  scrollbar-width: thin;
  scrollbar-color: rgba(231, 227, 213, 0.35) transparent;
  list-style: none;
  margin: 0;
  cursor: grab;
}

.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.strip.is-dragging img { pointer-events: none; }

.strip-controls {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin: 0 auto 0.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.strip-btn {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(231, 227, 213, 0.4);
  background: transparent;
  color: var(--paper-bright);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* The arrow is an SVG so it centers geometrically; a text glyph never does */
.strip-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

.strip-btn:hover { background: rgba(231, 227, 213, 0.1); border-color: var(--paper-bright); }

.strip li {
  flex: 0 0 min(78vw, 24rem);
  scroll-snap-align: start;
  margin: 0;
  max-width: none;
}

.strip a {
  display: block;
  text-decoration: none;
  color: var(--text-on-ink);
}

.strip img {
  width: 100%;
  aspect-ratio: var(--note-ratio);
  object-fit: cover;
  background: var(--paper);
  border-radius: 2px;
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s ease;
}

.strip a:hover img { transform: translateY(-3px); }

.strip .year {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--paper-bright);
}

.strip .what {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-on-ink-muted);
}

/* --------------------------------------------------------------------------
   Timeline (vertical): a rail on the left, seal-colored markers, note scans.
   Marker color encodes note class, which is real information about the era.
   -------------------------------------------------------------------------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--paper-dim), var(--paper-dim));
}

.timeline > li {
  position: relative;
  padding-left: 2.25rem;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  max-width: none;
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--marker, var(--seal));
  box-shadow: 0 0 0 4px var(--paper);
}

.timeline .red { --marker: var(--red-seal); }
.timeline .blue { --marker: var(--blue-seal); }
.timeline .brown { --marker: var(--brown-seal); }
.timeline .green { --marker: var(--seal); }
.timeline .gap { --marker: var(--paper-dim); }

.timeline .when {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--seal);
  display: block;
  margin-bottom: 0.25rem;
}

.timeline h3 { margin-bottom: 0.35em; }

.timeline .body {
  display: grid;
  gap: 1rem 2rem;
  align-items: start;
}

@media (min-width: 56em) {
  .timeline .body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}

.timeline .chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15em 0.55em;
  border-radius: var(--radius);
  color: #fff;
  background: var(--marker, var(--seal));
  vertical-align: middle;
  margin-left: 0.4em;
}

.timeline .gap .chip { color: var(--text); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
  padding: 0;
  list-style: none;
}

.legend li { margin: 0; display: inline-flex; align-items: center; gap: 0.5em; }

.legend i {
  width: 0.85rem; height: 0.85rem; border-radius: 50%;
  background: var(--marker);
  display: inline-block;
}

/* --------------------------------------------------------------------------
   Data tables
   -------------------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0.75rem;
  border: 1px solid var(--paper-dim);
  border-radius: var(--radius);
  background: var(--paper-bright);
}

table.data {
  border-collapse: collapse;
  width: 100%;
  min-width: 40rem;
  font-size: var(--step--1);
  margin: 0;
}

table.data caption {
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
  padding: 1rem 1rem 0.5rem;
  color: var(--text);
}

table.data th, table.data td {
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--paper-dim);
  text-align: left;
  vertical-align: top;
}

table.data thead th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--seal);
  border-top: 0;
  border-bottom: 2px solid var(--seal);
  background: var(--paper);
}

table.data td.num, table.data th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.none { color: var(--text-muted); }
table.data tbody tr:nth-child(even) { background: rgba(20, 56, 42, 0.035); }
table.data tfoot td { font-weight: 600; background: var(--paper); }

.source {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 2rem;
}

.source a { color: var(--seal-strong); }

/* Bar comparison (home): notes in circulation by denomination */
.bars {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0.5rem;
  display: grid;
  gap: 0.45rem;
}

.bars li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) 4.5rem;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: var(--step--1);
}

.bars .den { font-weight: 500; }

.bars .bar {
  height: 1.1rem;
  background: var(--paper-dim);
  border-radius: 2px;
  overflow: hidden;
}

.bars .bar i {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--seal);
}

.bars .is-two .bar i { background: var(--red-seal); }
.bars .is-two .den { color: var(--red-seal); font-weight: 700; }
.bars .val { text-align: right; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Cards (home section index, fun facts)
   -------------------------------------------------------------------------- */

.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 40em) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .cards.four { grid-template-columns: repeat(4, 1fr); } .cards.three { grid-template-columns: repeat(3, 1fr); } }

.cards li { margin: 0; max-width: none; }

.card {
  display: block;
  height: 100%;
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--paper);
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--paper-dim);
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--paper-dim);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--seal); }

.card h3 { font-size: var(--step-1); margin-bottom: 0.35em; }
.card p { margin: 0; color: var(--text-muted); font-size: var(--step--1); }
.card .serial { margin-bottom: 0.5rem; }

/* Fact block: a numbered-by-serial paragraph on paper */
.fact {
  padding: 1.5rem 0;
  border-top: 1px solid var(--paper-dim);
}

.fact:first-of-type { border-top: 0; padding-top: 0; }
.fact h3 { margin-bottom: 0.3em; }
.fact p:last-child { margin-bottom: 0; }

/* Definition list for specs */
dl.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1.5rem;
}

dl.specs dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--seal);
  padding-top: 0.2em;
}

dl.specs dd { margin: 0; }

@media (max-width: 40em) {
  dl.specs { grid-template-columns: 1fr; gap: 0.15rem 0; }
  dl.specs dd { margin-bottom: 0.9rem; }
}

/* Steps (Get Your Own) */
ol.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1rem;
}

ol.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  max-width: none;
  margin: 0;
}

ol.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 800;
  line-height: 1;
  color: var(--seal);
}

ol.steps h3 { margin-bottom: 0.25em; }
ol.steps p { margin-bottom: 0.5em; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius);
  background: var(--seal);
  color: #fff;
  border: 1px solid var(--seal);
}

.btn:hover { background: var(--seal-strong); }

.btn.ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-foot {
  background: var(--ink-deep);
  border-top: 1px solid rgba(231, 227, 213, 0.12);
  padding-block: 0 3rem;
  color: var(--text-on-ink-muted);
  font-size: var(--step--1);
  overflow: hidden;
}

.site-foot::before {
  content: "";
  display: block;
  height: 14px;
  background: url("../img/band-paper.svg") repeat-x center / auto 14px;
  opacity: 0.7;
  margin-bottom: 2.5rem;
}

/* Outlined wordmark, engraved-looking, purely decorative */
.foot-mark {
  margin: 0 0 1.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 1rem + 9vw, 8rem);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(231, 227, 213, 0.28);
  font-optical-sizing: none;
  font-variation-settings: "opsz" 18;
  max-width: none;
  white-space: nowrap;
}

.site-foot .wrap {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 56em) {
  .site-foot .wrap { grid-template-columns: 1.2fr 1fr 1fr; }
}

.site-foot h2 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6fbf8e;
  margin-bottom: 0.75rem;
}

.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 0 0 0.35rem; }
.site-foot a { color: var(--text-on-ink); }
.site-foot p { max-width: 48ch; }

/* --------------------------------------------------------------------------
   Lightbox: every note scan opens large. Built by main.js; these rules only
   apply once the viewer exists. Face/Back switches within a note pair.
   -------------------------------------------------------------------------- */

.note-fig img { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  background: var(--ink-deep);
  color: var(--paper-bright);
}

.lightbox.is-open { display: flex; }

.lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--gutter);
  border-bottom: 1px solid rgba(231, 227, 213, 0.15);
}

.lightbox-title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem var(--gutter);
  overflow: hidden;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  cursor: zoom-in;
  background: #fff;
}

/* Zoomed: the image runs at up to twice the viewport width and the stage scrolls */
.lightbox.is-zoomed .lightbox-stage { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.lightbox.is-zoomed .lightbox-stage img { max-width: none; max-height: none; width: 190vw; cursor: grab; user-select: none; }
.lightbox.is-zoomed.is-panning .lightbox-stage img { cursor: grabbing; }
.lightbox.is-zoomed .lightbox-stage { scrollbar-width: thin; scrollbar-color: rgba(231, 227, 213, 0.35) transparent; }

.lightbox-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem var(--gutter) 1.1rem;
  border-top: 1px solid rgba(231, 227, 213, 0.15);
}

.lightbox-caption {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-on-ink-muted);
  max-width: 60ch;
}

.lightbox-controls { display: flex; align-items: center; gap: 0.5rem; }

/* Year label in front of the title, timeline notes only */
.lightbox-year {
  font: 500 1.05rem var(--font-mono);
  letter-spacing: 0.12em;
  color: #6fbf8e; /* same as the .serial eyebrows on ink */
  margin-right: 0.9rem;
  vertical-align: 0.2em;
}

.lightbox-btn {
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.9rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(231, 227, 213, 0.4);
  background: transparent;
  color: var(--paper-bright);
  font: 500 0.8rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.lightbox-btn svg { width: 1rem; height: 1rem; display: block; }
.lightbox-btn:hover { background: rgba(231, 227, 213, 0.1); border-color: var(--paper-bright); }
.lightbox-btn[aria-pressed="true"] { background: var(--seal); border-color: var(--seal); color: #fff; }
.lightbox-btn[hidden] { display: none; }

/* Face / Back segmented switch */
.lightbox-sides { display: inline-flex; border: 1px solid rgba(231, 227, 213, 0.4); border-radius: 1.4rem; overflow: hidden; }
.lightbox-sides .lightbox-btn { border: 0; border-radius: 0; }
.lightbox-sides .lightbox-btn + .lightbox-btn { border-left: 1px solid rgba(231, 227, 213, 0.4); }

/* Loupe: a lens over the note. The stage is the positioning context. */
.lightbox-stage { position: relative; }

.loupe {
  display: none;
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 2px solid var(--paper-bright);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 20px 50px -10px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  background: #fff;
  pointer-events: none;
  z-index: 2;
}

.loupe img {
  position: absolute;
  max-width: none;
  max-height: none;
  display: block;
}

.lightbox.has-loupe .lightbox-stage img { cursor: none; }
.lightbox.has-loupe.is-zoomed .lightbox-stage img { cursor: grab; }

body.lightbox-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   Breadcrumbs: a mono trail above the page title, in the eyebrow's voice
   -------------------------------------------------------------------------- */

.crumbs { margin-bottom: 1.25rem; }
.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-on-ink-muted);
}
.crumbs li { margin: 0; max-width: none; }
.crumbs li + li::before {
  content: "/";
  margin-inline: 0.7em;
  color: var(--seal);
  opacity: 0.8;
}
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--paper-bright); text-decoration: underline; }
.crumbs [aria-current="page"] { color: #9fd4b4; }

/* --------------------------------------------------------------------------
   Value lookup: three questions on paper, answered from the table below it
   -------------------------------------------------------------------------- */

.lookup-form {
  display: grid;
  gap: 1rem 1.25rem;
  margin: 1.5rem 0;
}
@media (min-width: 48em) { .lookup-form { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lookup-form .field { display: grid; gap: 0.4rem; }
.lookup-form .field.check {
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.6rem;
}
.lookup-form label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--seal);
}
.lookup-form .check label {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  padding-top: 0.1em;
}
.lookup-form select {
  font: inherit;
  font-size: var(--step-0);
  color: var(--text);
  background: var(--paper-bright);
  border: 1px solid var(--text-muted);
  border-radius: var(--radius);
  padding: 0.6rem 2.2rem 0.6rem 0.8rem;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--seal) 50%),
    linear-gradient(135deg, var(--seal) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) 50%, calc(100% - 0.75rem) 50%;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
}
.lookup-form select:focus-visible { outline: 3px solid var(--red-seal); outline-offset: 2px; }
.lookup-form input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.15rem 0 0;
  accent-color: var(--seal);
}
.lookup-result {
  border-top: 2px solid var(--seal);
  padding-top: 1.25rem;
}
.lookup-result .big-number { font-size: var(--step-3); line-height: 1.1; margin-bottom: 0.5rem; }
.lookup-result .big-number small { margin-top: 0.35rem; }
.lookup-result .lookup-note { max-width: var(--measure); }
.lookup-result .lookup-star {
  padding: 0.75rem 1rem;
  border: 1px solid var(--red-seal);
  border-left-width: 6px;
  border-radius: var(--radius);
  background: rgba(181, 53, 43, 0.05);
  max-width: var(--measure);
}
.lookup-result .lookup-star .star { color: var(--red-seal); }
.lookup-result .source { margin-bottom: 0; }
