:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #5d646d;
  --line: #e3e5e8;
  --soft: #f6f7f2;
  --accent: #4f6400;      /* olive, readable on white */
  --accent-bg: #c9da2b;   /* cover lime */
  --accent-fg: #1f2328;
  --logo-filter: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a;
    --fg: #e6e8eb;
    --muted: #9aa1a9;
    --line: #2c3036;
    --soft: #1d2024;
    --accent: #c9da2b;
    --accent-bg: #c9da2b;
    --accent-fg: #15171a;
    --logo-filter: invert(1);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; font-family: Georgia, "Times New Roman", serif; font-weight: 600; }
h1 { font-size: 1.85rem; margin: 1.2rem 0 .6rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
h3 { font-size: 1.1rem; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.muted, small { color: var(--muted); }

/* header */
.site-header { border-bottom: 4px solid var(--accent-bg); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--fg); font-family: Georgia, serif; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand img { height: 46px; width: auto; filter: var(--logo-filter); }
.nav { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .95rem; }
.nav a { color: var(--fg); padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { text-decoration: none; border-bottom-color: var(--line); }
.nav a[aria-current] { border-bottom-color: var(--accent); }

main { padding-bottom: 48px; min-height: 60vh; }

/* home */
.hero { display: flex; gap: 28px; align-items: flex-start; margin: 28px 0 8px; padding: 24px; background: var(--soft); border-radius: 8px; }
.hero h1 { margin-top: 0; }
.cover { flex: none; border: 1px solid var(--line); border-radius: 2px; }
.facts { color: var(--muted); font-size: .92rem; }
.issue-heading { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.button { display: inline-block; padding: 8px 16px; border-radius: 6px; background: var(--accent-bg); color: var(--accent-fg); font-weight: 600; border: 1px solid var(--accent-bg); }
.button:hover { text-decoration: none; filter: brightness(.95); }
.button.ghost { background: transparent; color: var(--fg); border-color: var(--line); }

/* tables of contents */
.section-title { font-size: 1.05rem; color: var(--muted); font-family: inherit; text-transform: none; margin-top: 1.8rem; }
.toc { list-style: none; padding: 0; margin: 0; }
.toc li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.toc .t { font-weight: 600; color: var(--fg); }
.toc .t:hover { color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .92rem; color: var(--muted); margin-top: 2px; }
.meta .pdf { font-weight: 600; }
.crumbs { margin: 20px 0 0; font-size: .9rem; color: var(--muted); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; font-size: .95rem; }

/* archive */
.archive { list-style: none; padding: 0; }
.archive li { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.archive .vol { min-width: 140px; font-weight: 600; }
.archive .nos { display: flex; flex-wrap: wrap; gap: 4px 24px; }

/* article */
.section-label { margin: 20px 0 0; font-size: .9rem; color: var(--muted); }
.article h1 { margin-top: .3rem; }
.authors { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.authors .name { font-weight: 600; }
.authors .aff, .board .aff { display: block; font-size: .88rem; color: var(--muted); }
.where { color: var(--muted); }
.actions { margin: 16px 0; }
.abstract p { margin: 0 0 .8em; }
.kw { display: flex; flex-wrap: wrap; gap: 6px; }
.kw span { background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; font-size: .88rem; }
.cite { background: var(--soft); padding: 12px 16px; border-radius: 6px; }
details { margin-top: 8px; }
summary { cursor: pointer; color: var(--accent); }
pre { background: var(--soft); padding: 12px 16px; border-radius: 6px; overflow-x: auto; font-size: .85rem; }

/* fixed pages */
ul.columns { columns: 2 280px; }
.board { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 24px; }
.board .name { font-weight: 600; }
.search { width: 100%; max-width: 560px; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }

/* footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; padding: 16px 0 24px; }
.site-footer p { margin: 4px 0; }

@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  .hero { flex-direction: column; padding: 16px; }
  .cover { width: 110px; height: auto; }
  .brand span { font-size: .9rem; }
}
