/* Eulogikon — Ancient Greek Texts · discovery landing site
   Styled to match the live eulogikon.org chrome: Source Sans 3 on a warm
   off-white ground, dark slate navbar/footer, gold accent, white content card. */

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/source-sans-3.woff2") format("woff2");
}

/* Theme resolution (auto + manual toggle), same four-block contract as
   eulogikon.org tokens.css:
     1. Base :root              — light values (default).
     2. @media dark             — dark values when OS prefers dark and the
                                  user has not forced light.
     3. [data-theme="light"]    — light values re-asserted to defeat the
                                  media query when the user forces light.
     4. [data-theme="dark"]     — dark values when the user forces dark.
   Navbar and footer slate gradients stay literal (not mode-dependent). */
:root {
  color-scheme: light;

  --bg:        #F7F7F5;  /* warm off-white page */
  --card:      #FFFFFF;
  --card-wash: #FAFAF8;
  --ink:       #2D3748;  /* body text / headings */
  --ink-2:     #4A5568;  /* secondary body text */
  --muted:     #718096;
  --dark:      #3D4852;  /* navbar + footer (chrome, stays) */
  --dark-2:    #4A5568;  /* slate controls */
  --dark-hover:#5A6A78;
  --light:     #E2E8F0;  /* text on dark chrome */
  --lighter:   #CBD5E0;
  --gold:      #9A8555;  /* signature accent */
  --gold-dark: #7A6A45;
  --hairline:  #EDF2F7;
  --hairline-2:#E2E8F0;
  --lang-bar:  #EFEFEC;
  --maxw: 1040px;

  /* Self-hosted Source Sans 3 covers Latin + Greek + Cyrillic. System Noto
     fallbacks carry CJK (zh/ja) and Devanagari (hi). */
  --sans: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont,
          "Segoe UI", Arial, "Noto Sans", "Noto Sans CJK SC", "Noto Sans CJK JP",
          "Hiragino Sans", "Microsoft YaHei", "Noto Sans Devanagari", sans-serif;
  --mono: 'Courier New', ui-monospace, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg:        #000000;
    --card:      #000000;
    --card-wash: #0B0C0E;
    --ink:       #E8EAED;
    --ink-2:     #B7BDC6;
    --muted:     #8B93A1;
    --lighter:   #3D4552;
    --gold:      #C4B07A;
    --gold-dark: #D4C08A;
    --hairline:  #171A1F;
    --hairline-2:#262B33;
    --lang-bar:  #0B0C0E;
  }
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg:        #F7F7F5;
  --card:      #FFFFFF;
  --card-wash: #FAFAF8;
  --ink:       #2D3748;
  --ink-2:     #4A5568;
  --muted:     #718096;
  --lighter:   #CBD5E0;
  --gold:      #9A8555;
  --gold-dark: #7A6A45;
  --hairline:  #EDF2F7;
  --hairline-2:#E2E8F0;
  --lang-bar:  #EFEFEC;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:        #000000;
  --card:      #000000;
  --card-wash: #0B0C0E;
  --ink:       #E8EAED;
  --ink-2:     #B7BDC6;
  --muted:     #8B93A1;
  --lighter:   #3D4552;
  --gold:      #C4B07A;
  --gold-dark: #D4C08A;
  --hairline:  #171A1F;
  --hairline-2:#262B33;
  --lang-bar:  #0B0C0E;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  line-height: 1.6;
  background-color: var(--bg);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 400;
}
.skip-link:focus { left: 0; }

/* ---------- Navbar (dark slate, centered wordmark) ---------- */
.navbar {
  /* Stronger vertical wash + inset rim for visible depth */
  background:
    linear-gradient(180deg,
      #556170 0%,
      #3d4852 38%,
      #2c343c 100%);
  color: var(--light);
  padding: 28px 0 18px;
  border-bottom: 1px solid rgba(154, 133, 85, 0.55);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35);
}
.navbar-content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.home-link {
  color: #f7f4ec;
  text-decoration: none;
  font-weight: 300;
  font-size: 2.85em;
  line-height: 1.05;
  letter-spacing: 0.03em;
  /* Emboss: bright rim + deep cast — readable on slate */
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28),
    0 -1px 0 rgba(0, 0, 0, 0.55),
    0 2px 2px rgba(0, 0, 0, 0.45),
    0 6px 12px rgba(0, 0, 0, 0.4),
    0 14px 28px rgba(0, 0, 0, 0.32);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.home-link:hover {
  color: #fff;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.32),
    0 -1px 0 rgba(0, 0, 0, 0.5),
    0 2px 3px rgba(0, 0, 0, 0.5),
    0 8px 16px rgba(0, 0, 0, 0.42),
    0 16px 32px rgba(0, 0, 0, 0.35);
}
.navbar-subtitle {
  color: var(--lighter);
  font-size: 0.92em;
  margin-top: 6px;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.45);
  opacity: 0.95;
}
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 4px;
  margin-top: 14px;
}
.nav-tab {
  color: var(--lighter);
  text-decoration: none;
  font-size: 0.95em;
  padding: 6px 14px;
  border-bottom: 2px solid transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: color 0.2s, border-color 0.2s;
}
.nav-tab:hover { color: #fff; border-bottom-color: var(--gold); }

.theme-toggle {
  position: absolute;
  right: 20px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--gold);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  z-index: 120;
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: #fff;
  border-color: var(--gold);
  outline: none;
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- Language bar (slim strip under navbar) ---------- */
.lang-bar {
  background: var(--lang-bar);
  border-bottom: 1px solid var(--hairline-2);
}
.lang-switcher {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 20px;
}
.lang-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 4px;
  font-size: 0.88em;
}
.lang-list a {
  color: var(--muted);
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 4px;
}
.lang-list a:hover { color: var(--gold-dark); }
.lang-list [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- Content card ---------- */
.container {
  max-width: var(--maxw);
  margin: 30px auto;
  padding: 0 20px;
}
.content-wrapper {
  background-color: var(--card);
  padding: 48px 56px;
  border-radius: 8px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

main section { margin-top: 2.75rem; }
main section:first-child { margin-top: 0; }

/* Bare lists keep markers inside the text column */
main ul:not([class]) {
  list-style: disc;
  list-style-position: inside;
  padding-left: 0;
  margin: 0.45rem 0 1rem;
}
main ul:not([class]) li { margin-bottom: 0.35rem; }

/* ---------- Hero ---------- */
.hero { text-align: center; }
.hero h1 {
  color: var(--ink);
  border-bottom: 3px solid var(--gold);
  padding-bottom: 16px;
  margin: 0 auto 18px;
  font-size: 2.1em;
  font-weight: 400;
  display: inline-block;
}
.tagline {
  color: var(--muted);
  font-size: 1.12em;
  line-height: 1.55;
  min-height: calc(1.12em * 1.55);
  max-width: 38rem;
  margin: 0 auto 1.1rem;
}
.stats {
  font-size: 1.35em;
  color: var(--ink);
  font-weight: 300;
}
.stats strong { font-weight: 600; }
.stats .dot { color: var(--gold); margin: 0 0.55rem; }
.badge {
  display: inline-block;
  margin: 0.85rem 0 1.4rem;
  padding: 0.22rem 0.9rem;
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  border-radius: 999px;
  font-size: 0.78em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.lead { max-width: 42rem; margin: 0 auto; text-align: start; }

/* ---------- Headings & links ---------- */
h2 {
  color: var(--ink);
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--hairline-2);
}
h3 { color: var(--ink); font-size: 1.1em; font-weight: 600; margin: 1.5rem 0 0.5rem; }
p { margin-bottom: 0.9rem; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold-dark); text-decoration: underline; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; font-size: 0.97em; }
th, td { text-align: start; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
thead th {
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 2px solid var(--hairline-2);
}
td code, .naming code { white-space: nowrap; }
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: var(--ink-2);
}
.naming {
  background: var(--bg);
  border-left: 3px solid var(--gold);
  padding: 0.9rem 1.1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.97em;
}

/* ---------- Link cards ---------- */
.links { list-style: none; display: grid; gap: 0.75rem; }
@media (min-width: 34rem) { .links { grid-template-columns: 1fr 1fr; } }
.links a {
  display: block;
  height: 100%;
  padding: 0.95rem 1.15rem;
  border: 1px solid var(--hairline-2);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.links a:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transform: translateY(-1px);
  text-decoration: none;
}
.link-title { display: block; font-weight: 600; color: var(--ink); }
.link-desc { display: block; font-size: 0.9em; color: var(--muted); margin-top: 0.2rem; }

/* ---------- FAQ ---------- */
.faq { margin-top: 0.5rem; }
.faq dt {
  font-weight: 600;
  color: var(--ink);
  margin-top: 1.25rem;
}
.faq dt:first-child { margin-top: 0; }
.faq dd {
  margin: 0.35rem 0 0;
  color: var(--ink-2);
}

/* ---------- Citation ---------- */
.doi { font-size: 0.97em; }
.citation {
  font-family: var(--mono);
  font-size: 0.82em;
  line-height: 1.55;
  background: var(--bg);
  border: 1px solid var(--hairline-2);
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink-2);
}

/* ---------- Footer (dark slate, full-bleed) ---------- */
.site-footer {
  background:
    linear-gradient(180deg,
      #556170 0%,
      #3d4852 38%,
      #2c343c 100%);
  color: var(--light);
  text-align: center;
  padding: 34px 20px 40px;
  margin-top: 0;
  border-top: 1px solid rgba(154, 133, 85, 0.55);
  box-shadow:
    0 -8px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35);
}
.footer-tagline {
  font-size: 1.05em;
  margin-bottom: 0.85rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.footer-tagline strong { font-weight: 600; }
.footer-meta { font-size: 0.9em; opacity: 0.8; margin-bottom: 1rem; }
.footer-langs { font-size: 0.9em; }
.footer-langs-label { opacity: 0.7; }
.footer-langs .lang-list { display: inline-flex; }
.footer-langs .lang-list a { color: var(--light); opacity: 0.85; }
.footer-langs .lang-list a:hover { opacity: 1; text-decoration: underline; }
.footer-langs .lang-list [aria-current="page"] { color: #fff; opacity: 1; }
.footer-links {
  font-size: 0.9em;
  margin-top: 0.35rem;
  opacity: 0.9;
}
.footer-links a { color: var(--light); text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3); }
.footer-links a:hover { opacity: 1; text-decoration: underline; }

/* ---------- Agent / for-agents page ---------- */
table.agent-urls {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}
table.agent-urls th,
table.agent-urls td {
  border: 1px solid var(--hairline-2);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
table.agent-urls th { background: var(--bg); }
pre code { font-size: 0.9em; }

/* ---------- Catalog browse cards (pilot landing pages) ---------- */
.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.browse-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--hairline-2);
  border-radius: 8px;
  padding: 1.25rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.browse-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.browse-card strong {
  display: block;
  font-size: 1.1em;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- HTML sitemap ---------- */
.sitemap-section {
  margin-top: 2rem;
}
.sitemap-section:first-of-type {
  margin-top: 0.5rem;
}
.sitemap-intro {
  color: var(--muted);
  max-width: 40rem;
  margin-bottom: 0.85rem;
}
.sitemap-subsection {
  margin-top: 1.25rem;
}
.sitemap-subsection h3 {
  margin-top: 0;
  margin-bottom: 0.55rem;
  padding-bottom: 0;
  border-bottom: none;
  font-size: 1.05em;
  color: var(--ink-2);
}
.sitemap-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.75rem;
  padding: 0;
  margin: 0 0 0.25rem;
}
.sitemap-list li {
  margin: 0;
  flex: 1 1 18rem;
  max-width: 100%;
}
.sitemap-list a {
  display: inline-block;
  padding: 0.15rem 0;
  line-height: 1.35;
}

/* ---------- Hero call-to-action ---------- */
/* Equal peer widths in every language: 2-button hubs (de/fr/…) and
   3-button catalog langs (el/es) share one row. flex-basis 0 forces
   equal columns; avoid auto-fit grid (spurious 0px tracks). */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.25rem auto 0;
  max-width: 40rem;
  width: 100%;
}
.hero-cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: min(11rem, 100%);
  min-height: 3rem;
  padding: 0.75rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  background: var(--dark-2);
  color: var(--light);
  border: 1px solid var(--dark-2);
  transition: background 0.3s;
}
.hero-cta .btn:hover {
  background: var(--dark-hover);
  border-color: var(--dark-hover);
  text-decoration: none;
  color: var(--light);
}

/* ---------- Link cards ---------- */
.links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 34rem) {
  .links { grid-template-columns: 1fr 1fr; }
}
.links a {
  display: block;
  height: 100%;
  padding: 0.95rem 1.15rem;
  border: 1px solid var(--hairline-2);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, var(--card) 0%, var(--card-wash) 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.links a:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}
.link-title {
  display: block;
  font-weight: 600;
  color: var(--ink);
}
.link-desc {
  display: block;
  font-size: 0.9em;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ---------- Catalog browse: taxonomy rows and author lists ---------- */
.taxonomy-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.taxonomy-row {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--hairline-2);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.taxonomy-row:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
  text-decoration: none;
}

.taxonomy-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}

.taxonomy-row-title {
  font-size: 1.08em;
  font-weight: 600;
  color: var(--ink);
}

.taxonomy-row-date {
  font-size: 0.88em;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.taxonomy-row-blurb {
  font-size: 0.95em;
  line-height: 1.5;
  color: var(--ink-2);
}

.taxonomy-row-meta {
  font-size: 0.88em;
  color: var(--muted);
}

.taxonomy-list--compact .taxonomy-row {
  padding: 0.85rem 1rem;
}

.hero-taxonomy .hero-date {
  font-size: 1.05em;
  color: var(--muted);
  margin: -0.35rem auto 0.75rem;
  letter-spacing: 0.03em;
}

.hero-taxonomy .hero-stats {
  font-size: 1.05em;
  margin-bottom: 1rem;
}

.taxonomy-blurb {
  max-width: 42rem;
  margin: 0 auto;
  text-align: start;
  line-height: 1.6;
  color: var(--ink-2);
}

.alpha-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.alpha-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 2.75rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--hairline-2);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.alpha-chip:hover {
  border-color: var(--gold);
  background: var(--card);
  text-decoration: none;
}

.alpha-chip-letter {
  font-weight: 600;
  color: var(--gold-dark);
}

.alpha-chip-count {
  font-size: 0.82em;
  color: var(--muted);
}

.section-cta {
  margin-top: 0.85rem;
  font-size: 0.95em;
}
.section-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0.32rem 0.85rem;
  border: 1px solid var(--hairline-2);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.section-cta a:hover {
  border-color: var(--gold);
  background: var(--card);
  color: var(--gold-dark);
  text-decoration: none;
}

.author-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  border-top: 1px solid var(--hairline-2);
}

.author-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--hairline);
}

.author-row-link {
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.author-row-link:hover {
  text-decoration: none;
}

.author-row-link:hover .author-row-name {
  color: var(--gold-dark);
}

.author-row-name {
  font-weight: 600;
  color: var(--ink);
  transition: color 0.15s ease;
}

.author-row-alt {
  display: block;
  font-size: 0.9em;
  color: var(--muted);
  margin-top: 0.1rem;
}

.author-row-count {
  font-size: 0.88em;
  color: var(--muted);
  white-space: nowrap;
}

.author-header {
  margin-bottom: 2rem;
}

.author-header h1 {
  margin: 0 0 0.35rem;
  display: inline-block;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 0.4rem;
}

.author-greek {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 0.55rem 0 0.85rem;
}

.author-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.author-blurb {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.works-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.works-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hairline);
}

.works-list .work-title {
  display: block;
  font-weight: 600;
}

.works-list .work-greek {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.15rem 0 0.45rem;
}

/* Landing format labels — same chip geometry as download peers */
.format-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 0.75rem 0 0;
  max-width: 36rem;
}
.format-chips li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 6.75rem;
  min-height: 2.1rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--hairline-2);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.88em;
  text-align: center;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.45rem;
  align-items: stretch;
  max-width: 36rem;
}

/* Equal peer widths in the row: flex-basis 0 so PDF matches
   Markdown / Plain text / プレーンテキスト / Απλό κείμενο. */
.downloads a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 6.75rem;
  min-height: 2.1rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--hairline-2);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.88em;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.downloads a:hover {
  border-color: var(--gold);
  background: var(--card);
  color: var(--gold-dark);
  text-decoration: none;
}

/* Primary per-work action: same chip geometry, parent slate fill. */
.downloads a.work-read {
  font-weight: 600;
  background: var(--dark-2);
  color: var(--light);
  border-color: var(--dark-2);
}
.downloads a.work-read:hover {
  background: var(--dark-hover);
  border-color: var(--dark-hover);
  color: var(--light);
}

.author-cta-wrap {
  margin: 0.35rem 0 0;
}
.author-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  background: var(--dark-2);
  color: var(--light);
  border: 1px solid var(--dark-2);
  transition: background 0.3s;
}
.author-cta:hover {
  background: var(--dark-hover);
  border-color: var(--dark-hover);
  color: var(--light);
  text-decoration: none;
}

/* ---------- Corpus scale comparison ---------- */
.corpus-compare .compare-intro {
  max-width: 42rem;
  color: var(--ink-2);
}

.compare-metrics {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 1.15rem;
}

.compare-metric {
  padding: 1rem 1.15rem;
  border: 1px solid var(--hairline-2);
  border-radius: 8px;
  background: var(--card);
}

.compare-metric-label {
  margin: 0 0 0.7rem;
  font-size: 0.95em;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.compare-bars {
  display: grid;
  gap: 0.5rem;
}

.compare-row {
  display: grid;
  grid-template-columns: minmax(7rem, 14rem) 1fr auto;
  align-items: center;
  gap: 0.5rem 0.9rem;
}

.compare-row-name {
  font-size: 0.9em;
  color: var(--muted);
  line-height: 1.35;
}

.compare-row--ours .compare-row-name {
  color: var(--ink);
  font-weight: 600;
}

.compare-track {
  display: block;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--hairline);
  overflow: hidden;
}

.compare-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--lighter);
}

.compare-row--ours .compare-fill {
  background: var(--gold);
}

.compare-row-value {
  font-size: 0.95em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.compare-row--ours .compare-row-value { font-weight: 600; }

.compare-note {
  margin-top: 1rem;
  font-size: 0.88em;
  line-height: 1.5;
  color: var(--muted);
  max-width: 42rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .home-link { font-size: 2.25em; }
  .content-wrapper { padding: 28px 22px; }
  .container { margin: 16px auto; padding: 0 12px; }
  .hero h1 { font-size: 1.7em; }
  .lang-list { font-size: 0.82em; gap: 1px 2px; }
  .lang-list a { padding: 2px 6px; }
  .theme-toggle {
    right: 12px;
    top: 10px;
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 768px) {
  .compare-row {
    grid-template-columns: 1fr auto;
  }
  .compare-row-name {
    grid-column: 1 / -1;
    margin-bottom: -0.2rem;
  }
}

@media print {
  .navbar,
  .lang-bar,
  .theme-toggle,
  .site-footer {
    display: none !important;
  }
}
