:root {
  --blue: #4863be;
  --blue-dark: #344a96;
  --accent: #4db2ec;
  --yellow: #eee700;
  --dark: #222222;
  --bg: #ffffff;
  --surface: #fafafa;
  --surface-2: #eef2fb;
  --line: #eaeaea;
  --line-strong: #e1e1e1;
  --text: #111111;
  --muted: #5f6672;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --max: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue-dark);
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
}

.site-header {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 10px;
}

.header-inner {
  max-width: var(--max);
  min-height: 78px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  color: #ffffff;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand a {
  color: inherit;
  text-decoration: none;
}

.brand-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.brand-arrow {
  color: inherit;
  font-size: 1em;
  text-decoration: none;
}

.brand-arrow:hover {
  opacity: 0.7;
}

.brand-arrow-unavailable {
  cursor: not-allowed;
  opacity: 0.35;
}

.header-logo-link {
  display: block;
  line-height: 0;
}

.header-logo {
  display: block;
  width: auto;
  max-height: 50px;
}

.brand:hover {
  color: #ffffff;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 30px;
  background: #ffffff;
}

.header-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 12px 18px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue-dark);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
}

.header-actions a:hover {
  background: var(--blue);
  color: #ffffff;
}

main {
  flex: 1 0 auto;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px 30px;
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  background: #ffffff;
}

.cover-card {
  background: #ffffff;
  border: 1px solid var(--blue);
  border-radius: 0;
  overflow: hidden;
  transition: border-color 160ms ease, border-width 160ms ease;
}

.cover-frame {
  position: relative;
  display: block;
  aspect-ratio: 200 / 283;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.cover-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 160ms ease;
}

.cover-card:hover {
  border-color: var(--yellow);
  border-width: 3px;
}

.cover-card:hover .cover-frame img {
  opacity: 0.75;
}

.issue-badge {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 50%;
  min-width: 34px;
  transform: translate(-50%, 50%);
  padding: 8px 14px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.card-body {
  padding: 0 6px 0 16px;
}

.card-body h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.card-body h3 a {
  text-decoration: none;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-meta .year {
  font-size: 1.625rem;
  line-height: 1;
}

.card-body > .meta {
  margin-bottom: 8px;
}

.card-body .meta {
  text-align: center;
}

.card-actions {
  display: flex;
  gap: 0;
}

.card-actions a,
.card-actions .pdf-unavailable {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
}

.card-actions a:hover {
  opacity: 0.7;
}

.card-actions .pdf-unavailable {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.35;
}

.issue-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 208px;
  gap: 36px;
}

.issue-sidebar {
  align-self: start;
  position: sticky;
  top: 20px;
  text-align: center;
}

.sidebar-cover {
  width: 100%;
  margin: 0 auto 16px;
}

.cover-pdf {
  margin: 0 0 10px;
  text-align: center;
}

.cover-pdf span {
  display: inline-block;
  color: var(--blue-dark);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.cover-pdf a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 18px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue-dark);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.cover-pdf a:hover {
  background: var(--blue);
  color: #ffffff;
}

.cover-pdf .pdf-unavailable {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.65;
}

.sidebar-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 200 / 283;
  object-fit: cover;
}

.cover-year {
  margin: 10px 0 10px;
  color: var(--blue-dark);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.go-to ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.go-to li {
  padding: 2px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1rem;
}

.front {
  margin-bottom: 32px;
}

.issue-sidebar .front {
  margin: 10px 0 16px;
}

.issue-sidebar .front h2 {
  font-size: 1rem;
}

.front h2 {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 1.375rem;
}

.front p {
  margin: 4px 0;
}

.location,
.authors {
  color: var(--muted);
  font-size: 0.875rem;
}

.article-list {
  margin: 0;
}

.article {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.page-badge {
  display: inline-block;
  margin-right: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--blue-dark);
  font-size: 0.75rem;
  font-weight: 700;
}

.article-title {
  display: inline;
  margin: 0;
  font-weight: 600;
}

.article .authors {
  margin: 6px 0 0;
}

.article-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  text-decoration: none;
  vertical-align: middle;
}

.article-pdf:hover {
  border-color: var(--blue);
}

.site-footer {
  flex-shrink: 0;
  background: var(--blue);
  color: rgba(255, 255, 255, 0.9);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 1.21875rem;
}

.site-footer a {
  color: #ffffff;
}

@media (max-width: 800px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .cover-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
  }

  .issue-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .issue-sidebar {
    position: static;
  }

  .sidebar-cover {
    max-width: 260px;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cover-card,
  .cover-frame img {
    transition: none;
  }
}
