/* BICHEZ: one small stylesheet, no framework, no JavaScript. See DESIGN_DIRECTION.md. */

:root {
  --ink: #1c2024;
  --muted: #5b6570;
  --paper: #ffffff;
  --surface: #f5f7f4;
  --line: #dde3df;
  --rule: rgba(29, 107, 90, 0.28);  /* thin green lines (same hue as the accent) */
  --leaf: #3f7f66;          /* article numbers */
  --sage: #f2f6f2;          /* soft natural tint */
  --sage-deep: #e4eee7;
  --ochre: #c99a3e;         /* sparing warm accent (cover) */
  --cover: #17483c;         /* typographic cover */
  --accent: #1d6b5a;
  --accent-strong: #155446;
  --accent-soft: #e7f1ee;
  --focus: #1d6b5a;
  --radius: 6px;
  --measure: 68ch;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, "Noto Serif", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.55 var(--sans);
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: 0.5rem 0.75rem; background: var(--ink); color: #fff; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------------------------------------------------------------- header */

.site-header { border-top: 3px solid var(--accent); border-bottom: 1px solid var(--rule); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; padding-top: 1.25rem; padding-bottom: 1.25rem;
}
.brand { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-name { font: 600 1.5rem/1.2 var(--serif); letter-spacing: -0.005em; }
.brand-tagline { margin-top: 0.15rem; color: var(--muted); font-size: 0.875rem; }

.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: inline-block; padding: 0.25rem 0; color: var(--ink); font-size: 0.975rem; text-decoration: none; }
.site-nav a:hover { color: var(--accent); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; }
.site-nav .lang-switch { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.site-nav .lang-switch a { color: var(--muted); }

/* ---------------------------------------------------------------- main */

main.wrap { padding-top: 2.25rem; padding-bottom: 4rem; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; color: var(--muted); font-size: 0.875rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

.meta { display: flex; flex-wrap: wrap; gap: 0 0.5rem; margin: 0 0 0.5rem; color: var(--muted); font-size: 0.9375rem; }
.meta span:not(:last-child)::after { content: "·"; margin-left: 0.5rem; }

.button {
  display: inline-block; padding: 0.7rem 1.15rem; border-radius: var(--radius);
  background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; line-height: 1.2;
}
.button:hover { background: var(--accent-strong); color: #fff; }
.button-note { font-weight: 400; opacity: 0.85; }

.notice { margin: 0; padding: 0.75rem 1rem; border-left: 3px solid var(--line); background: var(--surface); color: var(--muted); }

.prose { max-width: var(--measure); font: 1.125rem/1.65 var(--serif); }
.prose p { margin: 0 0 0.9em; }

/* ---------------------------------------------------------------- article */

.article { max-width: 52rem; }
.article-title {
  max-width: 34em; margin-bottom: 0.75rem;
  font: 600 clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem)/1.2 var(--serif); letter-spacing: -0.01em;
}
.article-authors { margin: 0 0 0.6rem; font-size: 1.125rem; font-weight: 500; }
.doi { margin: 0.25rem 0 0; font-size: 0.9375rem; overflow-wrap: anywhere; }
.doi-label {
  display: inline-block; margin-right: 0.35rem; padding: 0.05rem 0.4rem; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em;
}

.fulltext {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem;
  margin: 1.75rem 0 0.5rem; padding: 1.1rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}

.article-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.article-section h2 {
  margin-bottom: 0.85rem; color: var(--muted);
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.article-section h2 .count { font-weight: 400; letter-spacing: 0; }

.keywords { margin: 0; }
.citation { max-width: var(--measure); margin: 0; font: 1rem/1.6 var(--serif); overflow-wrap: anywhere; }

.references { max-width: var(--measure); margin: 0; padding-left: 1.75rem; font: 0.975rem/1.55 var(--serif); }
.references li { margin-bottom: 0.55rem; padding-left: 0.25rem; overflow-wrap: anywhere; }
.references li::marker { color: var(--muted); font-family: var(--sans); font-size: 0.8125rem; }

.licence p { margin: 0; font-size: 0.9375rem; }

/* ---------------------------------------------------------------- messages (404, 405, admin) */

.message { max-width: 36rem; padding: 2rem 0 1rem; }
.message h1 { margin-bottom: 0.75rem; font: 600 2rem/1.2 var(--serif); }
.message-code { margin: 0 0 0.25rem; color: var(--muted); font: 600 1rem/1 var(--sans); letter-spacing: 0.1em; }
.message-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--rule); background: var(--sage); color: var(--muted); font-size: 0.875rem; }
.footer-inner { padding-top: 2rem; padding-bottom: 2.5rem; }
.footer-inner p { margin: 0 0 0.35rem; }
.footer-name { color: var(--ink); font: 600 1.05rem/1.4 var(--serif); }
.footer-note { margin-top: 0.6rem !important; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- shared page parts */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.page-title { margin-bottom: 0.6rem; font: 600 clamp(1.6rem, 1.25rem + 1.4vw, 2.2rem)/1.2 var(--serif); letter-spacing: -0.01em; }
.page-title a { color: inherit; text-decoration: none; }
.page-title a:hover { color: var(--accent); }
.eyebrow, .section-label {
  margin: 0 0 0.6rem; color: var(--muted);
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.small { color: var(--muted); font-size: 0.875rem; }
.more { margin-top: 1.25rem; font-weight: 600; }

/* HTML written by the editors (web_texts) */
.prose-html { margin-bottom: 1.25rem; }
.prose-html h3 { margin: 1.75rem 0 0.6rem; font: 600 1.35rem/1.3 var(--serif); }
.prose-html h4 { margin: 1.5rem 0 0.4rem; font: 700 1rem/1.4 var(--sans); }
.prose-html > :first-child { margin-top: 0; }
.prose-html ul, .prose-html ol { margin: 0 0 1em; padding-left: 1.4rem; }
.prose-html li { margin-bottom: 0.3rem; }
.prose-html blockquote { margin: 0 0 1em; padding: 0.25rem 0 0.25rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); }
.prose-html p[style] { font-size: inherit !important; }

/* ---------------------------------------------------------------- ornamental dividers */

/* Main sections only: a thin green line that turns into one small open spiral at its right end. */
.ornament {
  height: 20px; margin: 1.75rem 0 0.75rem;
  background:
    url("ornament-end.svg") right top / 40px 20px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left 0 top 12.4px / calc(100% - 29.6px) 1.2px no-repeat;
}
.section-title { margin-bottom: 0.25rem; font: 600 clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem)/1.25 var(--serif); }

/* ---------------------------------------------------------------- article lists (home, issue, volume) */

.article-list { margin: 0.6rem 0 0; padding: 0; list-style: none; }
.article-list > li {
  display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 0 1rem;
  padding: 1.35rem 0; border-top: 1px solid var(--rule);
}
.article-list > li:last-child { border-bottom: 1px solid var(--rule); }
.article-no { padding-top: 0.1rem; color: var(--leaf); font: 600 1.5rem/1.2 var(--serif); font-variant-numeric: lining-nums tabular-nums; text-align: right; }
.article-body { min-width: 0; }
.article-card-authors { margin: 0 0 0.25rem; color: var(--muted); font-size: 0.9375rem; }
.article-card-title { margin: 0 0 0.45rem; font: 600 1.3rem/1.3 var(--serif); }
.article-card-title a { color: var(--ink); text-decoration: none; }
.article-card-title a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.article-card-abstract { max-width: var(--measure); margin: 0 0 0.6rem; color: #3c454d; font: 1rem/1.55 var(--serif); }
.article-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; margin: 0; color: var(--muted); font-size: 0.875rem; }
.chip {
  display: inline-block; padding: 0.15rem 0.6rem; border: 1px solid var(--accent); border-radius: 999px;
  color: var(--accent); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.03em; text-decoration: none;
}
.chip:hover { background: var(--accent); color: #fff; }
.chip-quiet { border-color: var(--rule); color: var(--accent-strong); font-weight: 600; }
.article-list--compact > li { grid-template-columns: 2rem minmax(0, 1fr); padding: 0.9rem 0; }
.article-list--compact .article-no { font-size: 1.15rem; }
.article-list--compact .article-card-title { font-size: 1.1rem; margin-bottom: 0.3rem; }

/* ---------------------------------------------------------------- home: current issue */

.hero {
  display: grid; gap: 2rem; align-items: center;
  padding: clamp(1.5rem, 1rem + 3vw, 3rem); border-radius: 14px;
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-deep) 100%);
  border: 1px solid #dbe8df;
}
.hero-title { margin: 0 0 0.6rem; font: 600 clamp(2rem, 1.35rem + 2.6vw, 3.1rem)/1.1 var(--serif); letter-spacing: -0.015em; }
.hero-title a { color: var(--ink); text-decoration: none; }
.hero-title a:hover { color: var(--accent-strong); }
.hero .eyebrow { color: var(--accent-strong); }
.hero-meta { font-size: 1rem; }
.hero-lead { max-width: 34rem; margin: 1rem 0 1.5rem; color: #3c454d; font: 1.15rem/1.5 var(--serif); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin: 0; }
.hero-link { font-weight: 600; }

/* Typographic cover (or the editors' uploaded cover image) */
.cover { display: block; width: 100%; max-width: 13.5rem; justify-self: center; color: inherit; text-decoration: none; }
.cover-card, .cover-image {
  display: block; width: 100%; aspect-ratio: 210 / 297; border-radius: 6px;
  box-shadow: 0 22px 40px -22px rgba(16, 50, 41, 0.6), 0 2px 6px rgba(16, 50, 41, 0.18);
  transition: transform 0.2s ease;
}
.cover-image { height: auto; object-fit: cover; background: #fff; }
.cover:hover .cover-card, .cover:hover .cover-image { transform: translateY(-3px); }
.cover-card {
  position: relative; display: flex; flex-direction: column; padding: 1.25rem 1.2rem 1.1rem;
  background: var(--cover) url("contours.svg") right bottom / 115% auto no-repeat; color: #f3eee1;
}
.cover-journal { font: 600 1.05rem/1.2 var(--serif); letter-spacing: 0.02em; }
.cover-rule { display: block; width: 2.25rem; height: 2px; margin: 0.8rem 0 0; background: var(--ochre); }
.cover-issue { display: flex; align-items: baseline; gap: 0.5rem; margin-top: auto; }
.cover-number { font: 600 4.25rem/0.9 var(--serif); }
.cover-year { color: #d9cfae; font: 600 1rem/1 var(--sans); letter-spacing: 0.18em; }
.cover-volume { margin-top: 0.45rem; color: #c9d8cf; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }

/* About the journal: deliberately smaller than the issue */
.about-compact { margin-top: 2.5rem; padding: 1.5rem 1.75rem; border-radius: 12px; background: var(--sage); }
.about-columns { column-width: 22rem; column-gap: 2.75rem; }
.about-columns .prose { max-width: none; font-size: 0.975rem; line-height: 1.6; }
.about-columns .prose-html h3 { font-size: 1.15rem; break-after: avoid; }
.about-columns .prose-html p, .about-columns .prose-html li { break-inside: avoid; }

/* ---------------------------------------------------------------- archive, volume, issue */

.volumes { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.volume-card { padding: 1.1rem 1.25rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.volume-card h2 { margin-bottom: 0.6rem; font: 600 1.2rem/1.3 var(--serif); }
.volume-card h2 a { color: var(--ink); text-decoration: none; }
.volume-card h2 a:hover { color: var(--accent); text-decoration: underline; }
.issue-list { margin: 0; padding: 0; list-style: none; }
.issue-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 0.75rem; padding: 0.35rem 0; border-top: 1px solid var(--line); }
.issue-list a { font-weight: 600; }
.issue-meta { color: var(--muted); font-size: 0.875rem; }

.legacy { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.legacy-list { margin: 0; padding: 0; list-style: none; }
.legacy-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; padding: 0.4rem 0; }
.legacy-volume { min-width: 11rem; color: var(--ink); font-weight: 600; }

.issue-block { margin-top: 2.5rem; }
.issue-heading { margin-bottom: 0.25rem; font: 600 1.35rem/1.3 var(--serif); }

.issue-head { display: grid; gap: 1.75rem 3rem; align-items: center; }
.issue-head .page-title { margin-bottom: 1.25rem; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
.issue-head .cover { max-width: 10rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.9rem 2.25rem; margin: 0; }
.facts div { min-width: 5rem; }
.facts dt { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.facts dd { margin: 0.15rem 0 0; font: 600 1.2rem/1.3 var(--serif); }

.pdf-preview { margin: 0.75rem 0 0; }
.pdf-preview summary { display: inline-block; color: var(--accent); font-weight: 600; cursor: pointer; }
.pdf-preview summary:hover { text-decoration: underline; }
.pdf-preview iframe { display: block; width: 100%; height: min(82vh, 60rem); margin-top: 0.75rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }

.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; }
.pager a { display: flex; flex-direction: column; font-weight: 600; text-decoration: none; }
.pager a:hover .pager-name { text-decoration: underline; }
.pager-newer { margin-left: auto; text-align: right; }
.pager-name { color: var(--muted); font-size: 0.875rem; font-weight: 400; }

/* ---------------------------------------------------------------- text pages, contact */

.page { max-width: 52rem; }
.page-contact { max-width: none; }
.thanks { margin-top: 2rem; color: var(--muted); font-style: italic; }
.contact { display: grid; gap: 2.5rem 3.5rem; margin-top: 1.5rem; }
.contact address { margin-bottom: 1rem; font-style: normal; line-height: 1.6; }
.issn { color: var(--muted); font-size: 0.9375rem; }
.board { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.board li { display: grid; gap: 0.05rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.board-name { font-weight: 600; }
.board-role { color: var(--accent-strong); font-size: 0.9375rem; }
.board-affiliation { color: var(--muted); font-size: 0.875rem; }

@media (min-width: 60rem) {
  .contact { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
}

/* ---------------------------------------------------------------- forms (sign-in, editorial area) */

.form { display: grid; gap: 1rem; max-width: 26rem; }
.field label { display: block; margin-bottom: 0.3rem; font-weight: 600; }
.field input {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid #b8bec4; border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font: inherit;
}
.field input:focus-visible { border-color: var(--focus); }
.hint { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.875rem; }
.form-error { margin: 0 0 1rem; padding: 0.7rem 1rem; border-left: 3px solid #a4262c; background: #fdecec; color: #7a1c21; }
.form-error ul { margin: 0; padding-left: 1.1rem; }
.flash { margin: 0 0 1.25rem; padding: 0.7rem 1rem; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; max-width: none; margin-top: 1.5rem; }
button.button { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.button-secondary { background: var(--paper); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.button-secondary:hover { background: var(--accent-soft); color: var(--accent-strong); }
.inline-form { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0; }
.link-button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.admin-login { max-width: 30rem; }
code { padding: 0.05rem 0.3rem; border-radius: 4px; background: var(--surface); font-size: 0.9em; }

/* ---------------------------------------------------------------- editorial area */

.admin-header { background: var(--surface); }
.admin-user span { color: var(--muted); }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.admin-table th, .admin-table td { padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table thead th { color: var(--muted); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.admin-table tbody th { font-weight: 600; }
.admin-table .num { text-align: right; }
.admin-table td.changed { color: var(--accent-strong); font-weight: 700; }
.compare { max-width: 40rem; }
.cell-note { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.8125rem; }
.checklist td:nth-child(2) { min-width: 16rem; }
.checklist td:nth-child(3), .checklist td:nth-child(4) { white-space: nowrap; }
.form > .button { justify-self: start; }

.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.badge-published { background: var(--accent-soft); color: var(--accent-strong); }
.badge-metadata { background: #e8eef7; color: #24477a; }
.badge-planned { background: #fff4e0; color: #8a5a00; }
.badge-pending { background: #fbe9e7; color: #8f2d1f; }
.notice.pending { border-left: 3px solid #8f2d1f; }
.ok { color: var(--accent-strong); }
.bad { color: #a4262c; font-weight: 600; }
.muted { color: var(--muted); }

.warnings { margin: 0 0 1.5rem; }
.warnings p { margin: 0 0 0.35rem; color: var(--ink); }
.warnings ul { margin: 0; padding-left: 1.2rem; }

.admin-columns { display: grid; gap: 1.5rem; margin-bottom: 2rem; }
.admin-panel { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-panel p:last-child { margin-bottom: 0; }
.admin-section { margin-top: 1rem; }

@media (min-width: 48rem) {
  .hero { grid-template-columns: minmax(0, 1fr) 13.5rem; gap: 3rem; }
  .issue-head { grid-template-columns: minmax(0, 1fr) 10rem; }
}

@media (min-width: 60rem) {
  .admin-columns { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
}

/* ---------------------------------------------------------------- small screens */

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav ul { gap: 0.15rem 1rem; }
  .site-nav .lang-switch { padding-left: 0; border-left: 0; }
  main.wrap { padding-top: 1.5rem; }
  .prose { font-size: 1.0625rem; hyphens: auto; }
  .fulltext { padding: 1rem; }
  .article-list > li { grid-template-columns: 2rem minmax(0, 1fr); gap: 0 0.75rem; }
  .article-no { font-size: 1.2rem; }
  .article-card-title { font-size: 1.15rem; }
  .hero .cover { display: none; } /* on phones the articles come first */
  .issue-head .cover { display: none; }
  .pdf-preview { display: none; }
  .about-compact { padding: 1.25rem; }
}

/* ---------------------------------------------------------------- print */

@media print {
  .site-nav, .skip-link, .fulltext, .breadcrumb, .site-footer, .ornament, .cover, .pdf-preview, .chip { display: none; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; text-decoration: none; }
  .doi a::after { content: ""; }
  .article-section { break-inside: avoid; }
}
