/* Cookbooks of the World — the look of an engraved atlas plate:
   laid paper, iron-gall ink, and one colour of red for the marks that matter. */

:root {
  --paper:      #efe7d6;
  --paper-deep: #e5dbc6;
  --ink:        #23201a;
  --ink-soft:   #5c5445;
  --ink-faint:  #5a5446; /* was #8d8474, then #6f6858; darkened 2026-11-12 for WCAG AA on paper-deep/land */
  --rule:       #b9ac93;
  --sea:        #e7dcc4;
  --land:       #dbcdb0;
  --red:        #a8261f;
  --red-soft:   #c8574e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans:  "Optima", "Gill Sans", "Gill Sans MT", Candara, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  /* laid-paper tooth, kept faint enough to read through */
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.014) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.5), transparent 60%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------- masthead */

.masthead {
  max-width: 46rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 2rem;
  text-align: center;
}

.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.6rem;
}

.masthead h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -.01em;
  margin: 0 0 1.1rem;
}

.standfirst {
  font-size: 1.06rem;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 34rem;
  text-wrap: pretty;
}

/* ---------------------------------------------------------- the map */

.mapwrap {
  max-width: 64rem;
  margin: 1rem auto 0;
  padding: 0 1.5rem 1rem;
}

.mapfig { margin: 0; }

/* The pins are positioned in percentages of the plate, so the frame must be
   exactly the image box — no padding, no extra height. */
.mapframe {
  position: relative;
  line-height: 0;
  border: 1px solid var(--rule);
  box-shadow: 3px 4px 0 rgba(35, 32, 26, .12);
  background: var(--paper-deep);
}

.mapimg { display: block; width: 100%; height: auto; }

/* The button is 30px even though the dot drawn inside it is 13px. With the
   labels gone the dot is the ONLY thing to aim at on the plate, and a 13px
   target is below every touch guideline going. The box is invisible; only the
   dot is painted. */
.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 30px; height: 30px;
  padding: 0; margin: 0; border: 0; background: none;
  cursor: pointer;
  line-height: 0;
}
.pin:focus-visible { outline: none; }

.pin-dot {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px rgba(35, 32, 26, .5);
  transition: transform .16s ease;
}
.pin:hover .pin-dot,
.pin:focus-visible .pin-dot { transform: translate(-50%, -50%) scale(1.35); }

/* the ring that draws the eye to a live shelf */
.pin-dot::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 13px; height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  border: 1.5px solid var(--red);
}
@media (prefers-reduced-motion: no-preference) {
  .pin-dot::after { animation: ping 3.4s ease-out infinite; }
  @keyframes ping {
    0%   { transform: scale(1);   opacity: .7; }
    70%  { transform: scale(3.2); opacity: 0; }
    100% { transform: scale(3.2); opacity: 0; }
  }
}

/* ⚠ HIDDEN UNTIL HOVER OR FOCUS. Printed permanently, these collided: Italy,
   Byzantium and Turkey are a few points apart on a Mercator plate and stacked
   into "IT BYZANTIUM TURKEY", with France running off the left edge. The roster
   under the map is what names the countries now; this is a tooltip. */
.pin-label {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(3px);
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(244, 239, 226, .95);
  padding: 4px 7px;
  border: 1px solid var(--rule);
  box-shadow: 1px 2px 0 rgba(35, 32, 26, .16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
  z-index: 3;
}
.pin:hover .pin-label,
.pin:focus-visible .pin-label,
.pin.is-lit .pin-label {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
/* a pin near the frame edge anchors its tooltip inward instead of centring,
   so the label cannot hang off the plate the way FRANCE did */
.pin--edgeL .pin-label { left: 0; transform: translateX(0) translateY(3px); }
.pin--edgeL:hover .pin-label,
.pin--edgeL:focus-visible .pin-label,
.pin--edgeL.is-lit .pin-label { transform: translateX(0) translateY(0); }
.pin--edgeR .pin-label { left: auto; right: 0; transform: translateX(0) translateY(3px); }
.pin--edgeR:hover .pin-label,
.pin--edgeR:focus-visible .pin-label,
.pin--edgeR.is-lit .pin-label { transform: translateX(0) translateY(0); }

/* lit from the roster below the map */
.pin.is-lit .pin-dot { transform: translate(-50%, -50%) scale(1.5); }

.mapcredit {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .04em;
  color: var(--ink-faint);
  margin: .9rem 0 0;
  text-align: center;
}

@media (max-width: 620px) {
  .pin-dot { width: 11px; height: 11px; }
  .pin-label { font-size: 10px; letter-spacing: .1em; padding: 3px 5px; bottom: 14px; }
}

/* ---------------------------------------------------------- the tally */

.tally {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2.6rem;
  list-style: none;
  margin: 2.4rem 0 .8rem;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--rule);
}

.tally-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 5.5rem;
}

.tally-n {
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--red);
}

.tally-l {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: .5rem;
}

.tally-note {
  text-align: center;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ink-faint);
  margin: 0;
}

/* ---------------------------------------------------------- shelves */

.shelves {
  max-width: 62rem;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
}

.shelf { margin: 0 0 3.5rem; }

.shelf-head {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: .4rem;
  margin-bottom: 1.6rem;
}

.shelf-head h2 {
  font-size: 1.55rem;
  font-weight: 400;
  margin: 0;
  letter-spacing: -.005em;
}

.shelf-lang {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}


.empty {
  color: var(--ink-soft);
  max-width: 40rem;
  margin: 0;
  font-size: .98rem;
}

/* ---------------------------------------------------------- book cards */

.book {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1.8rem;
  align-items: start;
  padding: 0 0 1.8rem;
}

.plate {
  display: block;
  text-decoration: none;
  color: inherit;
  aspect-ratio: 3 / 4.4;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  box-shadow: 2px 3px 0 rgba(35,32,26,.13);
  padding: .8rem;
  transition: transform .16s ease, box-shadow .16s ease;
}
.book .plate:hover {
  transform: translate(-1px, -2px);
  box-shadow: 4px 6px 0 rgba(35,32,26,.16);
}

.plate-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  border: 1px solid var(--rule);
  padding: 1rem .7rem;
  text-align: center;
  gap: .55rem;
}

.plate-rule { width: 42%; height: 1px; background: var(--rule); }
.plate-title { font-size: .96rem; line-height: 1.25; }
.plate-sub {
  font-family: var(--sans);
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.plate-year {
  font-size: .82rem;
  color: var(--ink-soft);
  font-variant-numeric: lining-nums;
}

.info h3 {
  font-size: 1.28rem;
  font-weight: 400;
  margin: 0 0 .3rem;
  line-height: 1.25;
}
.info h3 a { color: inherit; text-decoration: none; }
.info h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.year { color: var(--ink-faint); font-size: .92rem; }

.orig {
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 .7rem;
  font-size: .95rem;
}

.blurb { margin: 0 0 1rem; max-width: 38rem; text-wrap: pretty; }

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .9rem;
  margin: 0;
}

.chip {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .5rem .95rem;
  border: 1px solid currentColor;
}
.chip.go { color: var(--red); text-decoration: none; }
.chip.go:hover { background: var(--red); color: var(--paper); }

.vols {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--ink-faint);
}


/* ---------------------------------------------------------- footer */

.foot {
  max-width: 46rem;
  margin: 2rem auto 0;
  padding: 1.6rem 1.5rem 4rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: .88rem;
  text-align: center;
}
.foot p { margin: 0; text-wrap: pretty; }

/* ---------------------------------------------------------- narrow */

@media (max-width: 620px) {
  body { font-size: 17px; }
  .masthead { padding-top: 3rem; }
  .book { grid-template-columns: 1fr; gap: 1.1rem; }
  .plate { max-width: 190px; }
  .tally { gap: 1.2rem 1.8rem; }
  .pin-label { font-size: 15px; }
}


/* ------------------- site legal footer (added 2026-08-18, session b90f0a0c:
   GA4 + terms/privacy/accessibility pass; also darkened --ink-faint below) */
.site-legal {
  max-width: 46rem;
  margin: 3rem auto 0;
  padding: 1.2rem 1.5rem 2.5rem;
  text-align: center;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
}
.site-legal a { color: var(--ink); }

/* legal / informational pages */
.legal {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}
.legal h2 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; }
.legal p { margin: 0 0 .8rem; }

/* ------------------------------------------------- the roster of countries */
/* The map lost its printed labels (see worldmap.py). This is the index that
   replaced them, and it carries more than a label could: language, how many
   books, how many recipes. It is also the accessible reading of the figure. */

.roster {
  max-width: 52rem;
  margin: 1.6rem auto 0;
}
.roster-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.roster-link {
  display: block;
  padding: .7rem .85rem;
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: background .14s ease;
}
.roster-link:hover,
.roster-link:focus-visible,
.roster-link.is-lit { background: var(--paper-deep); }
.roster-link:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }

.roster-country {
  display: block;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
}
.roster-country::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: .5rem;
  border-radius: 50%;
  background: var(--red);
  vertical-align: .08em;
}
.roster-meta {
  display: block;
  margin-top: .22rem;
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .03em;
  color: var(--ink-faint);
}

@media (max-width: 620px) {
  /* no padding here: .mapwrap already pads, and doubling it made the list
     48px narrower than the map it belongs to */
  .roster-list { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
  .roster-link { padding: .6rem .7rem; }
}
