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

:root {
  --brand:   #1e3a5f;
  --accent:  #8b6914;
  --bg:      #fdfcf8;
  --surface: #ffffff;
  --border:  #d8d0c6;
  --text:    #1a1109;
  --muted:   #6b5f52;
  --link:    #1e3a5f;
  --gold:    #b8972a;
}

html { direction: rtl; font-size: 17px; }

body {
  font-family: 'Frank Ruhl Libre', 'David Libre', 'David', Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* ── Header ── */
.site-header {
  background: var(--brand);
  color: #fff;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
  border-bottom: 3px solid var(--gold);
}
.site-header a {
  color: #fff;
  text-decoration: none;
}
.site-logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.site-logo::before {
  content: "◆";
  color: var(--gold);
  font-size: .8rem;
}
.site-header nav a {
  font-size: .88rem;
  font-weight: 400;
  opacity: .82;
  margin-right: 1.2rem;
  letter-spacing: .01em;
}
.site-header nav a:hover { opacity: 1; }

.search-bar {
  display: flex;
  gap: .4rem;
  flex: 1;
  max-width: 380px;
}
.search-bar input {
  flex: 1;
  padding: .32rem .7rem;
  border-radius: 3px;
  border: none;
  font-size: .88rem;
  direction: rtl;
  font-family: inherit;
}
.search-bar button {
  padding: .32rem .8rem;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: .83rem;
  font-family: inherit;
}
.search-bar button:hover { background: #9a7720; }

main { max-width: 900px; margin: 2.5rem auto; padding: 0 1.4rem; }

footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

/* ── Typography ── */
h1 { font-size: 1.9rem; margin-bottom: .5rem; color: var(--brand); font-weight: 700; }
h2 { font-size: 1.35rem; margin-bottom: .3rem; }
h3 { font-size: 1.1rem; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--muted); font-size: .88rem; }

/* ── Tags ── */
.tag {
  display: inline-block;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 8px;
  font-size: .77rem;
  margin: 2px 0;
  text-decoration: none;
}
.tag:hover { background: #f0ebe3; color: var(--text); text-decoration: none; border-color: #b8a898; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.3rem;
  margin-bottom: .7rem;
  border-right: 3px solid transparent;
  transition: border-right-color .15s;
}
.card:hover { border-right-color: var(--gold); }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--link); text-decoration: none; }

mark { background: #fef9e4; padding: 0 2px; border-radius: 2px; }

/* ── Issue grid ── */
.issue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .6rem;
  margin-top: 1.5rem;
}
.issue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .85rem 1.1rem;
  text-decoration: none;
  color: var(--text);
  display: block;
  border-right: 3px solid transparent;
  transition: border-right-color .15s, background .15s;
}
.issue-card:hover {
  border-right-color: var(--gold);
  background: #faf7f2;
  text-decoration: none;
  color: var(--text);
}
.issue-card .issue-num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand);
}
.issue-card .article-count { font-size: .82rem; color: var(--muted); margin-top: .2rem; }

/* ── Article full text ── */
.article-body {
  line-height: 2;
  font-size: 1.05rem;
  text-align: justify;
  margin-top: 1.2rem;
}

/* ── Breadcrumb ── */
.breadcrumb { font-size: .84rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--link); }

/* ── Stats bar ── */
.stats { font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem; }

/* ── Table of contents ── */
.toc {
  background: #f7f4ee;
  border: 1px solid var(--border);
  border-radius: 4px;
  border-right: 3px solid var(--gold);
  padding: 1rem 1.3rem;
  margin: 1rem 0 1.4rem;
  display: inline-block;
  min-width: 260px;
  max-width: 100%;
}
.toc-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: .5rem;
  letter-spacing: .02em;
}
.toc-list {
  margin: 0;
  padding-right: 1rem;
  list-style: none;
}
.toc-list li { margin: .25rem 0; font-size: .91rem; }
.toc-level-2 { padding-right: 1rem; font-size: .87rem; }
.toc-level-3 { padding-right: 2rem; font-size: .83rem; }
.toc-list a { color: var(--link); }
.toc-list a:hover { text-decoration: underline; }

/* ── Heading → TOC back-link ── */
.heading-toc-link {
  color: inherit;
  text-decoration: none;
}
.heading-toc-link:hover {
  text-decoration: none;
  opacity: .7;
}

/* ── Article headings ── */
.article-body h2.article-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand);
  border-bottom: 1px solid var(--border);
  padding-bottom: .3rem;
  margin: 2rem 0 .6rem;
}
.article-body h3.article-heading {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--brand);
  border-right: 3px solid var(--gold);
  padding-right: .6rem;
  margin: 1.6rem 0 .5rem;
}
.article-body h4.article-heading,
.article-body h5.article-heading,
.article-body h6.article-heading {
  font-size: 1.03rem;
  font-weight: 700;
  color: var(--muted);
  margin: 1.2rem 0 .4rem;
}

/* ── Footnote refs in body ── */
.fn-ref {
  color: var(--accent);
  text-decoration: none;
  font-size: .8em;
  vertical-align: super;
}
.fn-ref:hover { text-decoration: underline; }

/* ── Footnotes section ── */
.footnotes { margin-top: 1.5rem; }
.footnotes-title {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: .6rem;
}
.footnotes-list {
  padding-right: 1.4rem;
  font-size: .88rem;
  line-height: 1.7;
  color: var(--muted);
}
.fn-item { margin-bottom: .4rem; }
.fn-back {
  color: var(--accent);
  text-decoration: none;
  margin-left: .4rem;
  font-size: .9em;
}
.fn-back:hover { text-decoration: underline; }

/* ── Authors grid ── */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .6rem;
  margin-top: 1rem;
}
.author-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .65rem 1rem;
  text-decoration: none;
  color: var(--text);
  border-right: 3px solid transparent;
  transition: border-right-color .15s;
}
.author-card:hover { border-right-color: var(--gold); color: var(--text); text-decoration: none; }
.author-name { font-size: .93rem; }
.author-count { font-size: .78rem; color: var(--muted); white-space: nowrap; margin-right: .5rem; }

/* ── About page ── */
.about-hero {
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  background: linear-gradient(160deg, #f2ece0 0%, #fdfcf8 100%);
  border: 1px solid var(--border);
  border-radius: 4px;
  border-top: 3px solid var(--gold);
  margin-bottom: 2.5rem;
}
.about-hero h1 {
  font-size: 2.2rem;
  color: var(--brand);
  margin-bottom: .5rem;
}
.about-hero .subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  font-style: italic;
}
.about-divider {
  text-align: center;
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: .5rem;
  margin: 2.2rem 0;
  opacity: .75;
}
.about-section {
  margin-bottom: 2.5rem;
}
.about-section h2 {
  font-size: 1.3rem;
  color: var(--brand);
  border-right: 3px solid var(--gold);
  padding-right: .8rem;
  margin-bottom: 1rem;
}
.about-section p { margin-bottom: .8rem; line-height: 1.85; }

/* Issue 100 image */
.issue-100-wrap {
  text-align: center;
  margin: .5rem 0 1.5rem;
}
.issue-100-frame {
  display: inline-block;
  background: linear-gradient(145deg, #1a2e4a 0%, #1e3a5f 100%);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.28);
}
.issue-100-img {
  display: block;
  max-width: 300px;
  width: 100%;
  border-radius: 4px;
}
.issue-100-caption {
  margin-top: .7rem;
  font-size: .88rem;
  color: var(--muted);
  max-width: 420px;
  display: inline-block;
}

/* Departments grid */
.departments-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin-top: .8rem;
}
.dept-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: 3px solid var(--gold);
  border-radius: 4px;
  padding: .9rem 1.1rem;
}
.dept-card strong {
  display: block;
  color: var(--brand);
  font-size: .95rem;
  margin-bottom: .3rem;
}
.dept-card p {
  font-size: .87rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* Editorial list */
.editorial-list {
  list-style: none;
  padding: 0;
  margin-top: .8rem;
}
.editorial-list li {
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: .4rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.editorial-list li:last-child { border-bottom: none; }
.editorial-name  { font-weight: bold; color: var(--brand); }
.editorial-role  { font-size: .9rem; color: var(--muted); }

/* Closing quote */
.about-quote {
  text-align: center;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--brand);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 1.4rem 2rem;
  margin: 2.5rem 0 1rem;
  background: linear-gradient(135deg, #fffdf4 0%, #faf5e4 100%);
}
.about-nav-links {
  text-align: center;
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.about-nav-links a {
  display: inline-block;
  padding: .5rem 1.4rem;
  border: 1px solid var(--brand);
  border-radius: 3px;
  font-size: .9rem;
  color: var(--brand);
  text-decoration: none;
}
.about-nav-links a:hover {
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  html { font-size: 15px; }
  .search-bar { max-width: 100%; }
  .site-header { flex-wrap: wrap; height: auto; padding: .6rem 1rem; gap: .5rem; }
  .departments-grid { grid-template-columns: 1fr; }
  .about-hero h1 { font-size: 1.7rem; }
}
