:root {
  --ink: #171513;
  --ink-soft: #3f3933;
  --muted: #6b6259;
  --red: #7f171d;
  --red-dark: #5d1015;
  --line: #d9cfc2;
  --line-strong: #bdb0a0;
  --canvas: #f8f2e8;
  --paper: #f1e6d5;
  --card: rgba(255, 252, 247, .6);
  --content: 1440px;
  --reading: 66ch;
  --serif: Baskerville, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .35vw + .92rem, 1.125rem);
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--red); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #bb772f; outline-offset: 3px; }
.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; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--ink); color: white; padding: .75rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }
.shell { width: min(calc(100% - 64px), var(--content)); margin-inline: auto; }

.site-header { background: rgba(248, 242, 232, .96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand, .footer-brand { font: 400 clamp(1.55rem, 2vw, 2rem)/1 var(--serif); letter-spacing: -.035em; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.15rem); font-size: .82rem; letter-spacing: .025em; }
.site-nav a { text-decoration: none; }
.nav-contact { border-bottom: 2px solid var(--red); }
.menu-button { display: none; padding: .5rem .75rem; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font-size: .8rem; }

.eyebrow { margin: 0 0 .8rem; color: var(--red); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--serif); font-weight: 400; letter-spacing: -.037em; line-height: 1.07; text-wrap: balance; }
h1 { font-size: clamp(3.1rem, 5.4vw, 6rem); }
h2 { font-size: clamp(2.15rem, 3.3vw, 3.85rem); }
h3 { font-size: clamp(1.48rem, 1.9vw, 2rem); }
p { margin: 0 0 1.28rem; }
.lede { max-width: 59ch; color: var(--ink-soft); font-size: clamp(1.1rem, 1.15vw, 1.3rem); line-height: 1.68; }
.meta-line { margin-top: 1.75rem; color: var(--muted); font-size: .78rem; letter-spacing: .035em; }
.section { border-bottom: 1px solid var(--line); padding: clamp(4.25rem, 7vw, 7rem) 0; }
.section-heading { display: grid; grid-template-columns: minmax(220px, .65fr) 1.35fr; gap: clamp(2.5rem, 7vw, 8rem); align-items: start; margin-bottom: clamp(2.75rem, 5vw, 4.5rem); }
.section-heading .intro { max-width: 58ch; color: var(--muted); }
.rule-title::after { content: ""; display: block; width: 48px; height: 2px; background: var(--red); margin-top: .95rem; }
.button-row { display: flex; gap: .85rem; flex-wrap: wrap; margin-top: 2rem; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: .75rem; padding: .72rem 1rem; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-size: .8rem; letter-spacing: .02em; transition: background .18s ease, color .18s ease; }
.button::after { content: "→"; font-size: 1.15em; }
.button:hover { background: var(--ink); color: var(--canvas); }
.button-primary { background: var(--red); border-color: var(--red); color: white; }
.button-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: white; }

.hero { border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; min-height: min(720px, calc(100vh - 76px)); }
.hero-copy { padding: clamp(4.5rem, 7vw, 7.75rem) clamp(2.5rem, 5vw, 6.75rem) clamp(4rem, 6vw, 6.25rem) max(32px, calc((100vw - var(--content))/2)); display: flex; flex-direction: column; justify-content: center; }
.hero-copy h1 { max-width: 13ch; }
.hero-copy .lede { margin-top: 1.65rem; }
.hero-media { min-height: 580px; margin: 0; overflow: hidden; background: var(--paper); border-left: 1px solid var(--line); position: relative; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; filter: sepia(.2) saturate(.72) contrast(1.04); }
.image-caption { position: absolute; inset: auto 0 0; padding: .85rem 1rem; background: rgba(248,242,232,.94); border-top: 1px solid var(--line); color: var(--muted); font-size: .71rem; line-height: 1.5; }

.source-intro-grid, .method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.source-note, .method-step { border: 1px solid var(--line); background: var(--card); padding: clamp(1.75rem, 3.2vw, 3.25rem); }
.source-note .number, .method-step strong { display: block; color: var(--red); font: 400 clamp(2.5rem, 4vw, 3.65rem)/1 var(--serif); }
.source-note h3 { margin: 1rem 0 .8rem; }
.source-note p, .method-step p { color: var(--muted); font-size: .9rem; }
.method-grid { grid-template-columns: repeat(3, 1fr); }
.method-step h3 { margin-top: 1.1rem; }

.heraldry-intro { display: grid; grid-template-columns: minmax(260px, .75fr) 1fr; gap: clamp(2.5rem, 7vw, 8rem); margin-bottom: 3.25rem; }
.heraldry-intro > div > p:not(.eyebrow) { max-width: 37ch; color: var(--ink-soft); margin-top: 1.4rem; }
.heraldry-intro aside { align-self: end; max-width: 45ch; padding: 1.35rem 0 1.35rem 1.35rem; border-left: 2px solid var(--red); color: var(--muted); font-size: .91rem; }
.herb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.45rem; }
.herb-card { min-height: 286px; border: 1px solid var(--line); background: var(--card); text-decoration: none; display: grid; grid-template-columns: minmax(170px, .9fr) 1.1fr; overflow: hidden; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.herb-card:hover { color: var(--ink); background: #fffaf2; border-color: #bfae9a; transform: translateY(-2px); }
.herb-card-image { display: flex; min-width: 0; min-height: 100%; align-items: center; justify-content: center; padding: 1.3rem; background: #f1e7d9; border-right: 1px solid var(--line); overflow: hidden; }
.herb-card-image img { width: 100%; height: 100%; max-height: 320px; object-fit: contain; filter: sepia(.38) saturate(.68) contrast(1.04); mix-blend-mode: multiply; }
.herb-card-copy { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.35rem, 2.5vw, 2.25rem); }
.herb-card .tag { color: var(--red); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.herb-card h3 { margin-top: auto; }
.herb-card p { margin: .8rem 0 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.herb-credit { margin-top: 1rem; color: var(--muted); font-size: .64rem; line-height: 1.35; }
.herb-grid-featured .herb-card { min-height: 330px; }

.feature-grid { display: grid; grid-template-columns: .9fr 1.1fr; border: 1px solid var(--line); background: var(--card); }
.feature-copy { padding: clamp(2.25rem, 5vw, 5rem); display: flex; flex-direction: column; justify-content: center; }
.feature-copy h2 { margin-bottom: 1.25rem; }
.feature-copy .citation { border-left: 2px solid var(--red); padding-left: 1.15rem; color: var(--muted); font-size: .9rem; }
.feature-image { background: var(--paper); min-height: 530px; overflow: hidden; }
.feature-image img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: sepia(.14) saturate(.8); }

.facts-ledger { border-top: 1px solid var(--line-strong); }
.fact-record { display: grid; grid-template-columns: minmax(160px, .55fr) minmax(260px, 1.4fr) minmax(230px, .95fr); gap: 1.5rem; padding: 1.7rem 0; border-bottom: 1px solid var(--line); }
.fact-record-head { display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; }
.fact-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--red); font-size: .7rem; letter-spacing: -.02em; }
.status { display: inline-block; border: 1px solid currentColor; padding: .17rem .48rem; font-size: .63rem; font-weight: 700; letter-spacing: .11em; line-height: 1.2; text-transform: uppercase; }
.status-fact { color: #335e3c; }
.status-hypothesis { color: #7d5b1f; }
.status-legend { color: #715077; }
.fact-statement { margin: 0; color: var(--ink-soft); font-size: .94rem; line-height: 1.65; }
.fact-meta { margin: 0; display: grid; grid-template-columns: 1fr; gap: .65rem; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.fact-meta div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .65rem; }
.fact-meta dt { color: var(--ink); font-weight: 700; }
.fact-meta dd { margin: 0; }

.entity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.1rem; }
.entity-column { border-top: 2px solid var(--ink); padding-top: 1.1rem; }
.entity-column ul { list-style: none; margin: 1.3rem 0 0; padding: 0; }
.entity-column li { padding: .9rem 0; border-top: 1px solid var(--line); }
.entity-column li:first-child { border-top: 0; }
.entity-column a { text-decoration: none; }
.entity-column small { color: var(--muted); font-size: .77rem; line-height: 1.45; }

.source-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.source-figure { margin: 0; border: 1px solid var(--line); background: var(--paper); }
.source-figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: top center; filter: sepia(.12) saturate(.85); }
.source-figure figcaption { padding: 1rem; color: var(--muted); font-size: .76rem; line-height: 1.5; border-top: 1px solid var(--line); background: var(--card); }
.herb-reference { max-width: 480px; }
.herb-reference img { aspect-ratio: 4 / 5; object-fit: contain; padding: 1.5rem; background: #f1e7d9; filter: sepia(.35) saturate(.72) contrast(1.04); }

.page-hero { border-bottom: 1px solid var(--line); padding: clamp(4.6rem, 8vw, 8.5rem) 0 clamp(3.5rem, 5vw, 5.25rem); }
.page-hero h1 { max-width: 16ch; }
.page-hero .lede { margin-top: 1.55rem; }
.breadcrumbs { margin-bottom: 2rem; color: var(--muted); font-size: .72rem; }
.breadcrumbs a { text-decoration: none; }
.article-layout { display: grid; grid-template-columns: minmax(180px, .38fr) minmax(0, 1fr); gap: clamp(2.5rem, 8vw, 9rem); align-items: start; }
.article-aside { min-width: 0; position: sticky; top: 106px; color: var(--muted); font-size: .76rem; overflow-wrap: anywhere; }
.article-aside dt { margin-top: 1.1rem; color: var(--ink); font-weight: 700; }
.article-aside dd { margin: .25rem 0 0; }
.article-body { width: 100%; min-width: 0; max-width: var(--reading); }
.article-body h2 { font-size: clamp(2rem, 3vw, 3rem); margin: 3.8rem 0 1.15rem; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { margin: 2.5rem 0 .9rem; }
.article-body p, .article-body li { font-size: 1rem; }
.article-body p + p { margin-top: 1.4rem; }
.article-body blockquote { margin: 2.25rem 0; padding: 1rem 0 1rem 1.4rem; border-left: 2px solid var(--red); color: var(--ink-soft); font: 400 1.36rem/1.5 var(--serif); }
.article-body cite { display: block; color: var(--muted); font: normal .74rem/1.5 var(--sans); margin-top: .7rem; }
.article-body .fact-box { margin: 2.35rem 0; padding: 1.3rem; background: rgba(255,252,247,.48); border: 1px solid var(--line); border-left: 2px solid var(--red); }
.article-body .fact-box p { margin: .85rem 0 0; }
.citation-list { list-style: none; padding: 0; margin: 0; max-width: var(--reading); }
.citation-list li { padding: 1.3rem 0; border-top: 1px solid var(--line); }
.citation-list li:first-child { border-top: 0; }
.citation-list small { display: block; color: var(--muted); }
.directory-list { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); max-width: 1120px; }
.directory-item { padding: 1.7rem 1.7rem 1.7rem 0; border-bottom: 1px solid var(--line); }
.directory-item:nth-child(even) { border-left: 1px solid var(--line); padding-left: 1.7rem; }
.directory-item p { color: var(--muted); margin: .65rem 0 0; font-size: .91rem; }
.directory-item a { text-decoration: none; }

.atlas-heading { display: grid; grid-template-columns: minmax(260px, .78fr) 1.22fr; gap: clamp(2.5rem, 7vw, 8rem); align-items: end; margin-bottom: 2.75rem; }
.atlas-heading > p { max-width: 54ch; margin: 0; color: var(--muted); }
.places-atlas { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .78fr); gap: clamp(1.3rem, 3vw, 2.4rem); align-items: stretch; }
.atlas-map-column { min-width: 0; }
.atlas-map { aspect-ratio: 1.04 / 1; position: relative; overflow: hidden; border: 1px solid var(--line-strong); background: var(--paper); isolation: isolate; }
.atlas-map > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 51%; filter: saturate(.46) sepia(.18) brightness(1.08) contrast(.9); }
.atlas-map-shade { position: absolute; inset: 0; z-index: 1; background: rgba(248, 242, 232, .23); pointer-events: none; }
.map-marker { position: absolute; left: var(--x); top: var(--y); z-index: 3; transform: translate(-50%, -50%); width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border: 2px solid #fff7ec; border-radius: 999px; background: var(--red); color: white; box-shadow: 0 1px 0 rgba(48, 15, 7, .35); font: 400 1rem/1 var(--serif); transition: transform .18s ease, background .18s ease; }
.map-marker:hover, .map-marker[aria-pressed="true"] { background: var(--red-dark); transform: translate(-50%, -50%) scale(1.13); }
.map-landmark { position: absolute; z-index: 2; color: #4d4037; font: 600 .57rem/1.15 var(--sans); letter-spacing: .13em; text-transform: uppercase; text-shadow: 0 1px 1px var(--canvas); pointer-events: none; }
.map-landmark-vilnius { left: 59%; top: 18%; }
.map-landmark-lithuania { left: 57%; top: 30%; max-width: 12ch; }
.map-source { margin: .75rem 0 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.map-key { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .9rem; padding: .85rem 0 0; margin: 1rem 0 0; border-top: 1px solid var(--line); list-style: none; }
.map-key li { min-width: 0; }
.map-key button { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .35rem 0; border: 0; background: transparent; color: var(--ink-soft); text-align: left; font: .72rem/1.35 var(--serif); }
.map-key button:hover { color: var(--red); }
.map-key button span { flex: 0 0 auto; display: grid; width: 1.45rem; height: 1.45rem; place-items: center; border-radius: 50%; background: var(--red); color: white; font: 400 .67rem/1 var(--sans); }
.map-key button[aria-pressed="true"] { color: var(--red); font-weight: 700; }
.atlas-panel { min-width: 0; border: 1px solid var(--line-strong); background: rgba(255,252,247,.57); }
.place-panel-card { height: 100%; min-height: 100%; padding: clamp(2rem, 4vw, 3.4rem); display: flex; flex-direction: column; }
.place-panel-card h2 { max-width: 11ch; margin-bottom: 1.5rem; font-size: clamp(2.3rem, 3vw, 3.65rem); }
.place-panel-card > p:not(.eyebrow) { color: var(--ink-soft); font-size: .98rem; line-height: 1.67; }
.place-panel-card dl { display: grid; gap: 1rem; margin: auto 0 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line-strong); }
.place-panel-card dl div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .8rem; font-size: .77rem; line-height: 1.45; }
.place-panel-card dt { color: var(--red); font-weight: 700; }
.place-panel-card dd { margin: 0; color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(3rem, 8vw, 8rem); }
.contact-address { font: 400 clamp(1.7rem, 3vw, 2.8rem)/1.2 var(--serif); color: var(--red); word-break: break-word; }
.contact-notes { border-top: 1px solid var(--line); }
.contact-notes p { padding: 1rem 0; margin: 0; border-bottom: 1px solid var(--line); }

.site-footer { padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.1fr .7fr .7fr; gap: 3rem; }
.footer-links { list-style: none; padding: 0; margin: 0; font-size: .8rem; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 2rem; margin-top: 2.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .71rem; }

@media (max-width: 1020px) {
  .shell { width: min(calc(100% - 40px), var(--content)); }
  .menu-button { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; padding: 1.35rem 20px 1.7rem; background: var(--canvas); border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; gap: 1rem; }
  .site-nav[data-open="true"] { display: flex; }
  .hero-grid, .feature-grid, .article-layout, .contact-grid, .places-atlas { grid-template-columns: 1fr; }
  .hero-grid { min-height: 0; }
  .hero-copy { padding: 5rem 20px; }
  .hero-media { min-height: 62vw; border-left: 0; border-top: 1px solid var(--line); }
  .article-aside { position: static; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 1.6rem; }
  .article-aside dt { margin-top: 0; }
  .atlas-map { aspect-ratio: 1.35 / 1; }
  .atlas-panel { min-height: 420px; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .shell { width: min(calc(100% - 32px), var(--content)); }
  .header-inner { min-height: 68px; }
  .site-nav { top: 68px; }
  .brand { font-size: 1.5rem; }
  h1 { font-size: clamp(2.65rem, 12vw, 4.1rem); }
  h2 { font-size: clamp(2.05rem, 9vw, 3rem); }
  .hero-copy { padding: 4rem 16px; }
  .hero-media { min-height: 105vw; }
  .section { padding: 3.6rem 0; }
  .section-heading, .heraldry-intro, .atlas-heading { grid-template-columns: 1fr; gap: 1.2rem; margin-bottom: 2.4rem; }
  .source-intro-grid, .source-gallery, .herb-grid, .entity-grid, .method-grid, .directory-list, .footer-grid { grid-template-columns: 1fr; }
  .herb-card { min-height: 0; grid-template-columns: minmax(130px, .78fr) 1.22fr; }
  .herb-card-image { min-height: 210px; padding: .8rem; }
  .herb-card-copy { padding: 1.25rem; }
  .herb-card h3 { margin-top: .9rem; }
  .directory-item:nth-child(even) { border-left: 0; padding-left: 0; }
  .article-aside { grid-template-columns: 1fr; }
  .fact-record { display: block; padding: 1.45rem 0; }
  .fact-record-head { flex-direction: row; align-items: center; justify-content: space-between; }
  .fact-statement { margin: .9rem 0 1.1rem; font-size: .94rem; }
  .fact-meta { gap: .5rem; }
  .fact-meta div { grid-template-columns: 5.9rem minmax(0, 1fr); }
  .atlas-map { aspect-ratio: 1 / 1.04; }
  .map-key { grid-template-columns: 1fr; }
  .atlas-panel { min-height: 0; }
  .place-panel-card { padding: 1.6rem; }
  .place-panel-card dl div { grid-template-columns: 1fr; gap: .22rem; }
  .footer-bottom { flex-direction: column; gap: .45rem; }
}

@media print {
  .site-header, .button-row, .site-footer, .menu-button, .map-key, .map-marker { display: none; }
  .page-hero, .section { padding: 2rem 0; }
  body { color: #000; background: white; }
  a { text-decoration: none; }
}
