/* ══════════════════════════════════════════════════════════════════════
   IoNA Notes  --  blog.html and everything under blog/
   Set like a natural-history journal: EB Garamond for the masthead, titles
   and small-caps labels, Source Serif 4 for reading. Loaded after style.css.

   Two legacy globals in style.css reach into these pages and are neutralised
   below: `article, section { font-family: Arial !important }` (style.css,
   the --site-body-font block) and `figure { max-width: 250px; card }`.
   Generated by nothing: edit this file directly.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --n-paper: #fbf8f1;
  --n-ink: #2a2622;
  --n-ink-soft: #5b5248;
  --n-rule: #d8cdbb;
  --n-rule-strong: #2a2622;
  --n-accent: #9b3a2e;
  --n-wash: #f2ece0;
  --n-display: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --n-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --n-measure: 44rem;   /* the reading column */
  --n-wide: 56rem;      /* plates, records and the header rule */
}

[data-theme="dark"] {
  --n-paper: #1a1815;
  --n-ink: #e8e1d4;
  --n-ink-soft: #b3a998;
  --n-rule: #3d3830;
  --n-rule-strong: #e8e1d4;
  --n-accent: #e08b76;
  --n-wash: #23201c;
}

body.notes {
  background: var(--n-paper);
  color: var(--n-ink);
}

.notes-wrap section,
.notes-wrap article { font-family: var(--n-body) !important; }
.notes-wrap figure { max-width: none; box-shadow: none; border-radius: 0; background: none; margin: 0; padding: 0; }

body.notes ::selection { background: var(--n-accent); color: var(--n-paper); }

.notes-wrap {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  font-family: var(--n-body);
  color: var(--n-ink);
  text-align: left;
}

.notes-wrap a { color: inherit; text-decoration-color: var(--n-rule); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.notes-wrap a:hover { color: var(--n-accent); text-decoration-color: currentColor; }
.notes-wrap a:focus-visible,
.notes-wrap button:focus-visible { outline: 2px solid var(--n-accent); outline-offset: 3px; border-radius: 1px; }

.sc {
  font-family: var(--n-display);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
}

.tbd { color: var(--n-accent); font-style: italic; }

/* ── Masthead ──────────────────────────────────────────── */

.notes-masthead { text-align: center; padding: 56px 0 0; }

.notes-masthead .wordmark {
  font-family: var(--n-display);
  font-weight: 500;
  font-size: clamp(3rem, 8vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--n-ink);
}
.notes-masthead .wordmark a { text-decoration: none; }

.notes-masthead .tagline {
  font-family: var(--n-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--n-ink-soft);
  margin: 14px auto 26px;
  max-width: 34rem;
  line-height: 1.4;
  text-wrap: balance;
}

/* thick-thin rule, as under a journal's title */
.double-rule {
  border: 0;
  height: 5px;
  margin: 0;
  border-top: 2px solid var(--n-rule-strong);
  border-bottom: 1px solid var(--n-rule-strong);
}

.notes-sections {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 28px;
  list-style: none;
  margin: 0;
  padding: 12px 0 13px;
  border-bottom: 1px solid var(--n-rule);
  font-size: 1.12rem;
}
.notes-sections a { text-decoration: none; color: var(--n-ink-soft); }
.notes-sections a:hover { color: var(--n-accent); }
.notes-sections a[aria-current] { color: var(--n-ink); box-shadow: inset 0 -1px 0 var(--n-accent); }

/* ── Index and listing pages ───────────────────────────── */

.notes-index {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17.5rem;
  gap: 64px;
  padding: 48px 0 96px;
}

.lead-note { margin: 0 0 48px; }
.lead-note figure { margin: 0 0 22px; }
.lead-note img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.lead-note h2 {
  font-family: var(--n-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-align: left;
  color: var(--n-ink);
  margin: 0 0 12px;
  text-wrap: balance;
}
.lead-note h2 a { text-decoration: none; }

.dek {
  font-family: var(--n-display);
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.4;
  color: var(--n-ink-soft);
  margin: 0 0 14px;
}

.note-meta { font-size: 1.02rem; color: var(--n-ink-soft); margin: 0; }
.note-meta .topic { color: var(--n-accent); }
.note-meta .sep { margin: 0 0.5em; color: var(--n-rule); }
.note-meta .draft { color: var(--n-accent); border: 1px solid currentColor; padding: 0 6px; margin-left: 0.6em; }

.notes-list-head {
  font-size: 1.15rem;
  color: var(--n-ink);
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--n-rule-strong);
  font-weight: 500;
  text-align: left;
}
.notes-listing-title {
  font-family: var(--n-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.1;
  text-align: left;
  margin: 0 0 8px;
  color: var(--n-ink);
}
.notes-empty { font-style: italic; color: var(--n-ink-soft); padding: 22px 0; margin: 0; }

.note-entry {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--n-rule);
}
.note-entry time { font-size: 1.02rem; color: var(--n-ink-soft); padding-top: 5px; }
.note-entry h3 {
  font-family: var(--n-display);
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.15;
  margin: 0 0 6px;
  color: var(--n-ink);
  text-align: left;
  text-wrap: balance;
}
.note-entry h3 a { text-decoration: none; }
.note-entry p.summary { font-size: 1.02rem; line-height: 1.55; margin: 0 0 6px; color: var(--n-ink); }

/* ── Sidebar ───────────────────────────────────────────── */

.notes-aside { font-size: 0.98rem; line-height: 1.55; }
.notes-aside section { padding: 0 0 26px; margin: 0 0 22px; border-bottom: 1px solid var(--n-rule); }
.notes-aside section:last-child { border-bottom: 0; }
.notes-aside h2 { font-size: 1.12rem; font-weight: 500; color: var(--n-ink); text-align: left; margin: 0 0 12px; }
.notes-aside .portrait { float: left; width: 76px; height: 92px; object-fit: cover; margin: 4px 16px 6px 0; }
.notes-aside p { margin: 0 0 10px; }
.notes-aside ul { list-style: none; margin: 0; padding: 0; }
.notes-aside li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.notes-aside li a { text-decoration: none; }
.notes-aside .count { color: var(--n-ink-soft); font-variant-numeric: oldstyle-nums tabular-nums; }
.notes-aside .empty { font-style: italic; }

/* ── Most Wanted panel on the index ────────────────────── */

.wanted-band {
  margin: 0 0 48px;
  padding: 20px 24px 22px;
  background: var(--n-wash);
  border-top: 2px solid var(--n-rule-strong);
}
.wanted-band h2 { font-size: 1.15rem; font-weight: 500; text-align: left; color: var(--n-accent); margin: 0 0 10px; }
.wanted-band-body { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.wanted-band-body.no-thumb { grid-template-columns: minmax(0, 1fr) auto; }
.wanted-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.wanted-name { font-family: var(--n-display); font-size: 2rem; line-height: 1.1; margin: 0 0 6px; }
.wanted-name a { text-decoration: none; }
.auth { white-space: nowrap; font-style: normal; color: var(--n-ink-soft); font-size: 0.7em; }
.wanted-line { margin: 0; font-size: 1.02rem; line-height: 1.5; text-wrap: pretty; }
.wanted-facts { margin: 0; display: grid; gap: 8px; text-align: right; }
.wanted-facts dt { color: var(--n-ink-soft); font-size: 0.95rem; }
.wanted-facts dd { margin: 0; font-size: 1.25rem; font-variant-caps: normal; letter-spacing: 0; }

/* ── Post ──────────────────────────────────────────────── */

.notes-runninghead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 28px 0 10px;
  border-bottom: 1px solid var(--n-rule-strong);
  font-size: 1.1rem;
}
.notes-runninghead .home { font-family: var(--n-display); font-size: 1.6rem; font-variant-caps: normal; letter-spacing: 0; text-decoration: none; }
.notes-runninghead .where { color: var(--n-ink-soft); text-decoration: none; }

.note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--n-wide)) minmax(0, 1fr);
  column-gap: 40px;
  padding: 56px 0 96px;
}
.note > * { grid-column: 2; }

.note-header { text-align: center; margin-bottom: 34px; }
.note-header h1 {
  font-family: var(--n-display);
  font-weight: 500;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.012em;
  color: var(--n-ink);
  margin: 0 auto 16px;
  max-width: 48rem;
  text-wrap: balance;
}
.note-header .dek { font-size: 1.45rem; margin: 0 auto 20px; max-width: 38rem; text-wrap: balance; }
.note-header .byline { font-size: 1.12rem; margin: 0 0 4px; }
.note-header .note-meta { font-size: 1.02rem; }
.note-header + .double-rule { margin: 0 0 40px; }

.note-body { font-size: 1.08rem; line-height: 1.65; hyphens: auto; }
/* text keeps to the reading measure; plates and records use the full width */
.note-body > * { max-width: var(--n-measure); margin-left: auto; margin-right: auto; }
.note-body > figure,
.note-body > .wanted-file { max-width: none; }
.note-body p { margin-top: 0; margin-bottom: 1.1em; font-family: var(--n-body); }
.note-body ul, .note-body ol { padding-left: 1.4em; margin-top: 0; margin-bottom: 1.1em; box-sizing: border-box; }
.note-body li { margin-bottom: 0.4em; }
.note-body blockquote { border-left: 1px solid var(--n-rule-strong); padding-left: 1.2em; font-style: italic; color: var(--n-ink-soft); }

/* opening: drop cap and small-caps first line */
.note-body > p:first-of-type::first-letter {
  float: left;
  font-family: var(--n-display);
  font-size: 4.6em;
  line-height: 0.82;
  padding: 0.07em 0.08em 0 0;
  color: var(--n-accent);
}
.note-body > p:first-of-type::first-line { font-variant-caps: small-caps; letter-spacing: 0.03em; }

.note-body h2 {
  font-family: var(--n-display);
  font-weight: 500;
  font-size: 1.45rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  text-align: center;
  color: var(--n-ink);
  margin-top: 2.4em;
  margin-bottom: 0.9em;
}
.note-body h3 {
  font-family: var(--n-display);
  font-weight: 500;
  font-size: 1.35rem;
  font-style: italic;
  text-align: left;
  color: var(--n-ink);
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}

/* run-in taxon heads: a paragraph that opens with an italic name */
.note-body p.entry > em:first-child { font-weight: 600; }

.note-body figure { margin-top: 2.2em; margin-bottom: 2.4em; }
.note-body figure img { display: block; width: 100%; height: auto; }
.note-body figcaption,
.type-caption {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--n-ink-soft);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--n-rule);
  text-align: left;
  hyphens: none;
}
.fig { font-family: var(--n-display); font-variant-caps: all-small-caps; letter-spacing: 0.08em; color: var(--n-ink); margin-right: 0.35em; }

/* margin contents, wide screens only */
.note-contents {
  grid-column: 1;
  grid-row: 3 / span 2;
  justify-self: end;
  align-self: start;
  position: sticky;
  top: 32px;
  width: 10rem;
  font-size: 0.98rem;
  line-height: 1.5;
  padding-top: 6px;
  border-top: 1px solid var(--n-rule-strong);
}
.note-contents h2 { font-size: 1.02rem; font-weight: 500; text-align: left; margin: 6px 0 8px; color: var(--n-ink-soft); }
.note-contents ol { list-style: none; margin: 0; padding: 0; }
.note-contents li { padding: 2px 0; }
.note-contents a { text-decoration: none; }

.note-end { margin-top: 40px; font-size: 1rem; line-height: 1.6; width: 100%; max-width: var(--n-measure); justify-self: center; }

.cite { margin: 28px 0; padding: 18px 22px; background: var(--n-wash); }
.cite h2,
.about-author h2,
.share h2 { font-size: 1.05rem; font-weight: 500; color: var(--n-ink-soft); text-align: left; margin: 0 0 6px; }
.cite p { margin: 0; font-size: 0.98rem; overflow-wrap: anywhere; }

.about-author { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 18px; padding: 8px 0 28px; border-bottom: 1px solid var(--n-rule); }
.about-author img { width: 72px; height: 88px; object-fit: cover; }
.about-author p { margin: 0; }

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 24px 0 0; }
.prevnext a { text-decoration: none; display: block; }
.prevnext .dir { display: block; color: var(--n-ink-soft); font-size: 1rem; margin-bottom: 4px; }
.prevnext .t { font-family: var(--n-display); font-variant-caps: normal; letter-spacing: 0; font-size: 1.3rem; line-height: 1.2; }
.prevnext .next { text-align: right; grid-column: 2; }

/* ── Share ─────────────────────────────────────────────── */

.share { padding: 18px 0 4px; border-top: 1px solid var(--n-rule-strong); }
.share h2 { margin-bottom: 10px; }
.share-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.share-list a,
.share-list button {
  display: inline-block;
  font: inherit;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--n-ink);
  background: none;
  border: 1px solid var(--n-rule);
  border-radius: 0;
  padding: 5px 13px 7px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease-out, color 160ms ease-out;
}
.share-list a:hover,
.share-list button:hover { border-color: var(--n-accent); color: var(--n-accent); }
.share .native-only { display: none; }
.share.has-native .native-only { display: list-item; }
.share.has-native [data-share-native] { background: var(--n-ink); color: var(--n-paper); border-color: var(--n-ink); }

/* ── Most Wanted page ──────────────────────────────────── */

.wanted .note-header h1 .auth { display: block; font-size: 0.42em; margin-top: 10px; letter-spacing: 0; }

/* plates on the left, the record beside them */
.wanted-file {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 12px 28px;
  margin-bottom: 2.6em;
  align-items: start;
}
.wanted-file .type-caption { grid-column: 1 / -1; margin-top: 0; }

.type-plates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-plates figure { margin: 0; }
.type-plates img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.type-plates .type-main { grid-column: 1 / -1; }
.type-plates .type-main img { aspect-ratio: auto; }
.type-plates .view-head img { object-position: center 30%; }

.plate-wanted {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 15rem;
  padding: 20px;
  border: 1px dashed var(--n-ink-soft);
  background: repeating-linear-gradient(135deg, transparent 0 9px, var(--n-wash) 9px 10px);
}
.plate-wanted p { margin: 0; font-size: 0.95rem; line-height: 1.45; color: var(--n-ink-soft); }
.plate-wanted p.sc { font-size: 1.15rem; color: var(--n-ink); margin-bottom: 6px; }

/* set like a museum determination label */
.specimen-label {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.4;
  border: 3px double var(--n-rule-strong);
  background: var(--n-paper);
  hyphens: none;
}
.specimen-label caption { text-align: left; font-size: 1.05rem; color: var(--n-ink-soft); padding: 0 0 8px; caption-side: top; }
.specimen-label th,
.specimen-label td { padding: 6px 10px; vertical-align: top; border-bottom: 1px solid var(--n-rule); text-align: left; }
.specimen-label th { font-family: var(--n-display); font-weight: 500; font-variant-caps: all-small-caps; letter-spacing: 0.06em; font-size: 1.05rem; line-height: 1.2; color: var(--n-ink-soft); width: 34%; }
.specimen-label tr:last-child th,
.specimen-label tr:last-child td { border-bottom: 0; }
.specimen-label tr.key { background: var(--n-wash); }
.specimen-label tr.key th { color: var(--n-accent); }

.wanted .note-body > p:first-of-type::first-letter { float: none; font-size: inherit; color: inherit; padding: 0; font-family: inherit; line-height: inherit; }
.wanted .note-body > p:first-of-type::first-line { font-variant-caps: normal; letter-spacing: 0; }

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 1320px) {
  .note { column-gap: 0; }
  .note-contents { display: none; }
}

@media (max-width: 950px) {
  .notes-index { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .notes-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; border-top: 1px solid var(--n-rule-strong); padding-top: 28px; }
  .notes-aside section:first-child { grid-column: 1 / -1; }
  .wanted-file { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 750px) {
  .notes-wrap { padding: 0 16px; }
  .notes-masthead { padding-top: 36px; }
  .notes-masthead .tagline { font-size: 1.12rem; }
  .notes-sections { gap: 2px 18px; font-size: 1.02rem; }
  .note-entry { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .note-entry time { padding-top: 0; }
  .notes-aside { grid-template-columns: minmax(0, 1fr); }
  .note { padding-top: 36px; }
  .note-body { font-size: 1.02rem; }
  .prevnext { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .prevnext .next { text-align: left; grid-column: 1; }
  .notes-runninghead .where { display: none; }
  .wanted-band-body,
  .wanted-band-body.no-thumb { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .wanted-thumb { max-width: 14rem; }
  .wanted-facts { grid-template-columns: 1fr 1fr; text-align: left; }
  .plate-wanted { min-height: 9rem; }
}
