/* Sheaf landing: herbarium / biology-textbook plate */

:root {
  --bg: #f5f2eb;
  --bg-gradient: radial-gradient(ellipse 110% 75% at 8% 0%, #efeae0 0%, #f5f2eb 52%);
  --text: #181410;
  --body: #181410;
  --muted: #524c44;
  --accent: #3d5c4a;
  --accent-soft: rgba(61, 92, 74, 0.12);
  --hairline: rgba(31, 26, 20, 0.18);

  --signals: #b85c38;
  --remember: #3a5f73;
  --dream: #6b5478;
  --speak: #b0892e;
  --human: #4a6b3e;
  --gold: #9a7b2f;
  --stale: #a33a3a;

  --glass-bg: #faf8f3;
  --glass-border: rgba(24, 20, 16, 0.14);
  --glass-blur: none;
  --glass-shadow: 0 1px 0 rgba(24, 20, 16, 0.06);
  --plate-inset: #ebe7df;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

  --text-track: min(76rem, 100%);
  --page: min(1440px, calc(100vw - var(--gutter)));
  --gutter: clamp(28px, 4vw, 64px);
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--body);
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  max-width: var(--page);
  margin: 0;
  padding: 48px var(--gutter) 72px;
  -webkit-font-smoothing: antialiased;
}

main {
  width: 100%;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  z-index: 100;
}

.skip-link:focus {
  top: 20px;
}

h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
}

h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  color: var(--text);
  font-size: 1.02rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}

h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

/* Subtitle styling */
.subtitle {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 0;
  display: block;
}

p {
  max-width: var(--text-track);
  margin-bottom: 0.85rem;
}

.hero p,
.section > p,
.section > .fail-list,
footer p {
  max-width: 100%;
}

p:last-child {
  margin-bottom: 0;
}

/* Sections: phase-colored top rule, no kickers / eyebrows */

.section {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
  border-left: 3px solid var(--hairline);
  padding-left: 1.25rem;
  padding-right: 0.25rem;
  width: 100%;
  max-width: 100%;
}

.section--signals {
  border-left-color: var(--signals);
}

.section--remember {
  border-left-color: var(--remember);
}

.section--dream {
  border-left-color: var(--dream);
}

.section--speak {
  border-left-color: var(--speak);
}

.hero {
  margin-bottom: 0.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--hairline);
}

/* Editorial frontispiece spread */

.hero--spread {
  display: grid;
  grid-template-columns: minmax(16rem, 5fr) minmax(18rem, 7fr);
  column-gap: clamp(2rem, 5vw, 4rem);
  row-gap: 1.5rem;
  align-items: start;
  padding-top: 1rem;
  padding-bottom: 2.5rem;
}

.hero--spread .hero-masthead h1 {
  font-size: clamp(2.75rem, 5vw, 3.75rem);
  line-height: 1.05;
  margin-bottom: 0.65rem;
}

.hero-masthead {
  margin-bottom: 0;
}

.hero-masthead .subtitle {
  margin-bottom: 0.85rem;
}

.hero-masthead::after {
  content: "";
  display: block;
  width: 4rem;
  height: 1px;
  background: var(--hairline);
  margin-top: 0.85rem;
}

.hero-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--muted);
  margin: 0.75rem 0 0;
  line-height: 1.4;
}

.hero-lede {
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--text);
  max-width: none;
  margin-bottom: 1.25rem;
}

.hindsight-scroll {
  overflow-x: auto;
  margin: 0.85rem 0 0.45rem;
}

.hindsight-table {
  width: 100%;
  min-width: 22rem;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.4;
  border: 1px solid var(--hairline);
  background: var(--glass-bg);
}

.hindsight-table th,
.hindsight-table td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: baseline;
}

.hindsight-table thead th {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.78rem;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: transparent;
  border-bottom: 2px solid var(--text);
  white-space: nowrap;
}

.hindsight-table tbody td:first-child {
  font-weight: 600;
  color: var(--text);
}

.hindsight-table caption.hindsight-note,
.hindsight-note {
  caption-side: top;
  margin: 0 0 0.85rem;
  padding: 0 0 0.65rem;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.55;
  color: var(--body);
  text-align: left;
  max-width: none;
  background: none;
  border: none;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
}

.hero-bridge {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: none;
  margin-top: 1.25rem;
  margin-bottom: 0;
}

.hero-body {
  border-left: 1px solid var(--hairline);
  padding-left: clamp(1.25rem, 3vw, 2rem);
}

.hero-problem {
  padding-top: 0;
  padding-bottom: 0.85rem;
  border-top: none;
  border-bottom: 2px solid var(--hairline);
  margin-bottom: 2rem;
}

.hero-problem--temporal {
  border-bottom-color: var(--remember);
}

.hero-problem--session {
  border-bottom-color: var(--speak);
  margin-bottom: 0;
}

.hero-problem h2 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.65rem;
  color: var(--accent);
}

.hero-roman {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-right: 0.45rem;
}

.hero-problem p {
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 0;
  max-width: none;
}

.hero-notation {
  font-family: var(--mono);
  font-size: 0.92em;
  font-weight: 500;
  color: var(--text);
  background: none;
  padding: 0;
}

.hero-abstract {
  margin-top: 1rem;
}

.hero-abstract__label {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-variant: small-caps;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text);
}

.hero-abstract__grid {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hero-abstract__row {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: baseline;
}

.hero-abstract__row dt {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-variant: small-caps;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--text);
}

.hero-abstract__row dd {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--body);
}

.hero-purpose {
  margin-top: 0.65rem;
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--body);
  max-width: none;
}

.hero-purpose em {
  font-style: italic;
  color: var(--text);
}

@media (max-width: 899px) {
  .hero--spread {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 0.5rem;
    padding-bottom: 2rem;
  }

  .hero-rail {
    margin-bottom: 1.5rem;
  }

  .hero-abstract__row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .hero-body {
    border-left: none;
    padding-left: 0;
  }

  .hero-lede {
    margin-bottom: 1.5rem;
  }

  .hero-bridge {
    margin-top: 1.25rem;
  }

  .hero-meta {
    letter-spacing: 0.04em;
  }
}

/* Specimen plates (class name .glass kept) */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0;
  box-shadow: var(--glass-shadow);
}

/* Three-column layout for Fig. 1 */
.three-column {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.three-column .specimen h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

#fig5 .specimen h3 {
  color: var(--accent);
}

.three-column .specimen p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.join {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}

.join-cell {
  padding: 1.1rem 1.15rem;
}

.join-cell h3 {
  color: var(--text);
}

.join-cell p {
  font-size: 0.95rem;
  color: var(--body);
  max-width: none;
  margin: 0;
  line-height: 1.5;
}

.fail-list {
  list-style: none;
  margin: 1rem 0 0;
  max-width: 100%;
}

.fail-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--body);
}

.fail-list li:last-child {
  border-bottom: none;
}

.fail-list code {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-right: 0.35rem;
}

/* Lithograph plate (Fig. 1) */

.plate {
  margin-top: 1.35rem;
  padding: 1.1rem 1.15rem 1.25rem;
  background: var(--glass-bg);
  border: 1px solid var(--text);
  box-shadow: inset 0 0 0 1px var(--glass-border), inset 0 0 0 4px var(--glass-bg),
    inset 0 0 0 5px color-mix(in srgb, var(--text) 25%, transparent);
  max-width: 100%;
}

.plate-caption {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-serif);
  color: var(--text);
}

.plate-num {
  font-size: 0.72rem;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.plate-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.plate-sub {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--body);
}

.plate-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.specimen {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.specimen-epithet {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--body);
  max-width: none;
  margin: 0;
}

.specimen-letter {
  font-variant: small-caps;
  font-weight: 600;
  color: var(--text);
  margin-right: 0.25rem;
}

.specimen-drawing {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--hairline);
  background: var(--plate-inset);
}

.specimen-verdict {
  font-size: 0.9rem;
  color: var(--body);
  margin: 0;
  max-width: none;
}

.specimen-verdict strong {
  font-weight: 600;
  color: var(--text);
}

.specimen-verdict .stale {
  font-style: italic;
  color: var(--stale);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.plate-gold {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  font-size: 0.95rem;
  color: var(--body);
  max-width: none;
}

.plate-gold em {
  font-style: italic;
  color: var(--gold);
}

.plate-note {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.95rem;
  color: var(--body);
  max-width: none;
}

/* Botanical Methods colophon */

.methods--botanical {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--hairline);
  width: 100%;
}

/* One hairline after Fig. 5; Probe no longer double-bars with footer */
#references.methods--botanical,
#terms.methods--botanical {
  border-top: 1px solid var(--hairline);
  padding-top: 1.75rem;
}

#probe.methods--botanical {
  border-bottom: none;
  padding-bottom: 0;
}

.methods-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--muted);
  margin: 0 0 0.85rem;
  line-height: 1.4;
}

.methods-masthead {
  margin-bottom: 1.35rem;
}

.methods-masthead h2 {
  margin-bottom: 0;
}

.methods-masthead::after {
  content: "";
  display: block;
  width: 4rem;
  height: 1px;
  background: var(--hairline);
  margin-top: 0.75rem;
}

.methods-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .methods-body {
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
    row-gap: 1.75rem;
  }
}

.methods-item {
  padding-top: 0;
  border-top: none;
}

.methods-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.65rem;
  color: var(--accent);
}

.methods-item p {
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 0;
  max-width: none;
}

.references-lead {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: none;
}

.probe-copy {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 1.25rem;
  max-width: none;
}

.references {
  list-style: decimal;
  padding-left: 1.35rem;
  margin: 0;
  max-width: none;
}

.references li {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--body);
  margin-bottom: 1rem;
  padding-left: 0.35rem;
}

.references li:last-child {
  margin-bottom: 0;
}

.references a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

.references a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
}

footer p {
  font-size: 0.95rem;
  color: var(--body);
  margin-bottom: 1rem;
}

.footer-app {
  margin: 1rem 0 1.25rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--body);
}

.footer-app--pair {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.35rem;
}

.footer-app a {
  display: inline;
  padding: 0;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  background: none;
}

.footer-app a:hover {
  color: var(--text);
  background: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

.footer-links a {
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

.footer-links a:hover {
  border-bottom-color: var(--accent);
  color: var(--text);
}

/* Catalog links in the hero rail (with purpose copy) */
.catalog-nav {
  position: static;
  width: 100%;
  margin-top: 1rem;
}

.catalog-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.1rem;
  padding: 0;
  margin: 0;
  border: none;
}

.catalog-nav li {
  padding: 0;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  border: none;
  margin: 0;
}

.catalog-nav li.active {
  font-weight: 600;
}

.catalog-nav li.star::after {
  content: " ★";
  color: var(--gold);
  font-size: 11px;
  margin-left: 4px;
}

.catalog-nav a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.catalog-nav a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  body {
    padding: 32px 20px 56px;
    font-size: 17px;
  }

  h1 {
    font-size: 2rem;
  }

  .join,
  .plate-figures {
    grid-template-columns: 1fr;
  }

  .three-column {
    grid-template-columns: 1fr;
  }

  .catalog-nav ul {
    gap: 0.25rem 1rem;
  }
}
/* ========================================
   UI/CHROME IMPROVEMENTS - Visual Hierarchy
   ======================================== */

/* Section backgrounds for key areas */
#example {
  background: linear-gradient(135deg, rgba(61, 92, 74, 0.04) 0%, transparent 60%);
  padding: 2rem 2rem 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

#why {
  background: linear-gradient(135deg, rgba(176, 137, 46, 0.04) 0%, transparent 60%);
  padding: 2rem 2rem 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

#framework {
  background: linear-gradient(135deg, rgba(107, 84, 120, 0.04) 0%, transparent 60%);
  padding: 2rem 2rem 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

#probe {
  background: linear-gradient(135deg, rgba(61, 95, 115, 0.06) 0%, transparent 60%);
  padding: 2rem 2rem 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid rgba(61, 95, 115, 0.12);
}

/* Enhanced code/failure mode styling */
.probe-copy code,
.fail-list code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: rgba(61, 92, 74, 0.1);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  color: var(--accent);
  font-weight: 500;
  border: 1px solid rgba(61, 92, 74, 0.15);
}

/* Section headers with decorative elements */
.methods-masthead {
  position: relative;
}

.methods-masthead h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 0.5rem;
}

.methods-masthead::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--accent);
  margin-top: 0.75rem;
  border-radius: 2px;
}

/* Figure/Plate number badge styling */
.plate-num {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.plate-title {
  font-size: 1.15rem;
}

/* Navigation enhancement */
.catalog-nav {
  background: var(--glass-bg);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  margin-top: 1.25rem;
}

.catalog-nav ul {
  gap: 0.5rem 1.25rem;
}

.catalog-nav li {
  font-size: 0.88rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.catalog-nav li:hover {
  background: var(--accent-soft);
}

.catalog-nav a {
  text-decoration: none;
}

.catalog-nav a:hover {
  text-decoration: none;
}

.hero-masthead h1 {
  font-size: clamp(2.75rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}

.hero-lede {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--text);
  font-weight: 500;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1rem 0;
}

/* Subtitle enhancement */
.subtitle {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 1rem;
  font-weight: 400;
}

.hero-bridge {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  font-style: italic;
}

/* Failure list styling */
.fail-list {
  background: var(--glass-bg);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  border: 1px solid var(--glass-border);
}

.fail-list li {
  padding: 0.6rem 0;
  font-size: 0.92rem;
}

/* Probe copy enhancement */
.probe-copy {
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.probe-copy strong {
  color: var(--text);
  font-weight: 600;
}

/* Mobile refinements */
@media (max-width: 720px) {
  #example,
  #why,
  #framework,
  #probe {
    padding: 1.25rem 1rem 1rem;
    margin: 1rem 0;
  }
  
  .catalog-nav {
    padding: 0.6rem 0.8rem;
  }
  
  .catalog-nav ul {
    gap: 0.4rem 0.75rem;
  }
  
  .footer-app--pair {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .hindsight-table caption.hindsight-note {
    font-size: 0.88rem;
  }
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Smooth scroll continuation */
html {
  scroll-padding-top: 2rem;
}