@font-face {
  font-family: "Harding Text Web Regular";
  src: url("assets/fonts/HardingTextWebRegular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Super-admin software rail: four compact launchers on one line. */
.software-section { border-top: 1px solid var(--line); }
.section.software-section { padding-bottom: clamp(20px, 1.8vw, 24px); }
.software-home-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.software-home-card { display: flex; gap: 12px; align-items: center; min-width: 0; padding: 12px 14px; border-right: 1px solid var(--line); color: var(--text); text-decoration: none; }
.software-home-card:last-child { border-right: 0; }
.software-card h2, .software-detail h1 { font-family: var(--nature-serif); }
.software-home-card:hover .software-home-name, .software-home-card:focus-visible .software-home-name { text-decoration-thickness: 2px; }
.software-home-icon, .software-card-icon { display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; background: #f4f4f4; border: 1px solid var(--line); }
.software-home-icon { flex: 0 0 48px; width: 48px; }
.software-home-name { min-width: 0; overflow: hidden; font-family: var(--nature-serif); font-size: 1.02rem; font-weight: 700; line-height: 1.1; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-overflow: ellipsis; white-space: nowrap; }
.software-home-note { max-width: 620px; margin: 12px 0 0 auto; color: var(--muted); font-family: var(--detail-body-font-family); font-size: 0.82rem; font-weight: 400; line-height: 1.3; text-align: right; }
.software-home-icon img, .software-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.software-version { margin: 0 0 5px; color: var(--muted); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.software-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.software-heading h1 { margin: 6px 0 10px; }
.software-filters { margin-top: 22px; }
.software-list { border-top: 1px solid var(--line); }
.software-index-row { display: grid; grid-template-columns: minmax(104px, 132px) minmax(0, 1fr) minmax(150px, 190px); gap: 28px; align-items: start; padding: 24px 0; border-bottom: 1px solid var(--line); }
.software-index-row .software-index-icon { width: 100%; aspect-ratio: 1; margin: 0; }
.software-index-icon img { object-fit: cover; }
.software-index-copy h2 { margin: 0 0 8px; font-family: var(--nature-serif); font-size: clamp(1.55rem, 2.4vw, 2.15rem); line-height: 1.06; }
.software-index-copy > p { max-width: 760px; color: var(--muted); line-height: 1.5; }
.software-index-meta { min-width: 0; padding-left: 18px; border-left: 1px solid var(--line); }
.software-index-meta .entry-meta { margin-bottom: 18px; }
.software-tagline, .software-detail-tagline { font-size: 1.08rem; font-weight: 700; }
.software-detail-hero { display: grid; grid-template-columns: minmax(132px, 188px) minmax(0, 1fr); gap: 34px; align-items: start; padding: 24px 0 32px; border-bottom: 1px solid var(--line); }
.software-detail-hero > img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f4f4f4; border: 1px solid var(--line); }
.software-detail-hero h1 { margin: 5px 0 12px; font-size: clamp(2.4rem, 5vw, 4.8rem); line-height: 0.96; }
.software-detail-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.7fr); gap: 42px; align-items: start; padding-top: 28px; }
.software-download-panel { padding: 22px; border-top: 4px solid #c51a4a; background: #f4f4f4; }
.software-download-panel > h2 { margin-top: 0; }
.software-detail-package { display: grid; gap: 7px; padding: 14px 0; border-top: 1px solid var(--line); }
.software-feature-list { padding-left: 1.2rem; }
.software-access-note { color: var(--muted); font-size: 0.86rem; }

@media (max-width: 760px) {
  .software-heading, .software-index-row, .software-detail-hero, .software-detail-layout { grid-template-columns: 1fr; }
  .software-home-grid { grid-template-columns: none; grid-auto-columns: minmax(180px, 68vw); grid-auto-flow: column; overflow-x: auto; overscroll-behavior-inline: contain; }
  .software-home-card { padding: 10px 12px; }
  .software-home-note { max-width: none; margin-top: 12px; font-size: 0.8rem; text-align: left; }
  .software-index-row .software-index-icon { width: min(132px, 42vw); }
  .software-index-meta { padding: 16px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .software-card-icon, .software-detail-hero > img { max-width: 148px; }
}

/* Keep compact desktop widths usable without forcing a two-line primary nav. */
@media (min-width: 761px) and (max-width: 960px) {
  .nav { display: none !important; }
  .site-header.mobile-nav-ready .mobile-nav-toggle { display: inline-flex !important; }
}

@font-face {
  font-family: "Harding Text Web Bold";
  src: url("assets/fonts/HardingTextWebBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

.knowledge-modal-open {
  overflow: hidden;
}

.knowledge-section {
  padding-bottom: 12px;
}

.knowledge-teaser-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 20px 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.knowledge-teaser-image {
  margin: 0;
  min-width: 0;
}

.knowledge-teaser-image a {
  display: block;
}

.knowledge-teaser-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f4f4f4;
}

.knowledge-teaser-copy h3 {
  margin: 8px 0 8px;
  font-family: var(--nature-serif);
  font-size: 1.85rem;
  line-height: 1.05;
}

.knowledge-teaser-copy p {
  max-width: 70ch;
}

.knowledge-teaser-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.knowledge-teaser-stats span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 24px;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.knowledge-header-copy {
  min-width: 0;
}

.knowledge-header-copy h1 {
  margin: 8px 0 14px;
  font-family: var(--nature-serif);
  font-size: clamp(2.2rem, 3vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.knowledge-header-aside {
  display: grid;
  gap: 12px;
  align-content: start;
}

.knowledge-summary {
  margin: 0 0 12px;
  max-width: 78ch;
  font-size: 1.05rem;
  line-height: 1.6;
}

.knowledge-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin: 18px 0 18px;
}

.knowledge-tree-classification {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #d8dee6;
  background: #f6f7f8;
}

.knowledge-tree-classification > span {
  color: #536275;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.knowledge-tree-classification > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.knowledge-tree-classification button {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid #aeb8c4;
  border-radius: 999px;
  background: #fff;
  color: #315b8c;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 780;
  cursor: pointer;
}

.knowledge-tree-classification button:hover { border-color: #315b8c; }
.knowledge-tree-classification button[aria-pressed="true"] { border-color: #0d2e55; background: #0d2e55; color: #ffd681; }
.knowledge-tree-classification output { color: #657183; font-size: 0.84rem; white-space: nowrap; }

.knowledge-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(100%, 360px);
}

.knowledge-sort {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  margin-left: auto;
}

.knowledge-sort span,
.knowledge-search span {
  color: #536275;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.knowledge-sort select {
  min-height: 38px;
  padding: 7px 34px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.knowledge-search input {
  width: 100%;
}

.knowledge-tree-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.knowledge-tree {
  position: relative;
  min-height: 420px;
  overflow: visible;
  padding: 18px 0 24px;
}

.knowledge-tree-shell {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
  border: 1px solid rgba(18, 23, 31, 0.08);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(196, 59, 29, 0.05), transparent 28%),
    radial-gradient(circle at top right, rgba(0, 119, 163, 0.06), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 251, 0.98));
  box-shadow: 0 24px 56px rgba(17, 24, 39, 0.08);
}

.knowledge-view-controls {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.knowledge-control {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
}

.knowledge-control:hover,
.knowledge-control:focus-visible {
  border-color: rgba(196, 59, 29, 0.45);
  color: var(--accent);
}

.knowledge-tree-stage {
  position: relative;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  min-width: 100%;
  padding: 16px 14px 18px;
}

.knowledge-tree-canvas {
  position: relative;
  min-width: 100%;
  min-height: 100%;
}

.knowledge-tree-floating-controls {
  display: none;
}

body.knowledge-tree-fullscreen {
  overflow: hidden;
}

.knowledge-tree.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100vw;
  height: 100dvh;
  padding: 0;
  background: #fff;
}

.knowledge-tree.is-fullscreen .knowledge-tree-shell {
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}

.knowledge-tree.is-fullscreen .knowledge-tree-floating-controls {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 2;
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
}

.knowledge-tree-lines {
  position: absolute;
  inset: 16px 14px 18px;
  pointer-events: none;
  overflow: visible;
}

.knowledge-tree-lines path {
  stroke: rgba(52, 62, 72, 0.18);
  stroke-width: 1.15;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.knowledge-tree-lines line {
  stroke: rgba(0, 0, 0, 0.18);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.knowledge-tree-trunk {
  stroke: rgba(0, 0, 0, 0.92);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.knowledge-tree-node {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: translate(-12px, -50%);
  min-height: 42px;
  padding: 8px 14px 8px 10px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, calc(var(--tree-card-alpha, 0.95)));
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(8px);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.knowledge-tree-node.is-root {
  transform: translate(-12px, -50%);
  border-color: rgba(17, 24, 39, 0.18);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.1);
}

.knowledge-tree-node.is-folder {
  background: rgba(248, 252, 255, calc(var(--tree-card-alpha, 0.95)));
}

.knowledge-tree-node.is-paper {
  background: rgba(255, 249, 246, calc(var(--tree-card-alpha, 0.95)));
}

.knowledge-tree-node.is-root.is-folder {
  background: rgba(242, 248, 255, 0.98);
}

.knowledge-tree-node.is-root.is-paper {
  background: rgba(255, 247, 244, 0.98);
}

.knowledge-tree-node.is-folder .knowledge-tree-label span {
  color: rgba(41, 78, 117, 0.76);
}

.knowledge-tree-node.is-paper .knowledge-tree-label span {
  color: rgba(96, 74, 62, 0.76);
}

.knowledge-tree-dot {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--tree-accent, var(--accent));
  border: 2px solid var(--tree-accent, var(--accent));
  font-size: 0.58rem;
  line-height: 1;
  box-shadow: 0 0 0 4px var(--tree-accent-soft, rgba(196, 59, 29, 0.08));
}

.knowledge-tree-node.is-folder .knowledge-tree-dot {
  background: #fff;
  color: var(--blue);
  border: 2px solid var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 119, 163, 0.08);
}

.knowledge-tree-node.is-expanded .knowledge-tree-dot {
  background: #fff;
  color: var(--accent);
}

.knowledge-tree-node.is-paper .knowledge-tree-dot {
  background: #fff;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.knowledge-tree-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: 260px;
}

.knowledge-tree-label strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 600;
  color: #30343b;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.knowledge-tree-label span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(67, 74, 82, 0.84);
  font-size: 0.72rem;
  line-height: 1.15;
}

.knowledge-tree-node.is-folder .knowledge-tree-label strong {
  color: #304a73;
}

.knowledge-tree-node.is-paper .knowledge-tree-label strong {
  color: #4c4c4c;
}

.knowledge-tree-node:hover .knowledge-tree-label strong,
.knowledge-tree-node:focus-visible .knowledge-tree-label strong {
  color: var(--accent);
}

.knowledge-tree-node:hover,
.knowledge-tree-node:focus-visible {
  transform: translate(-12px, calc(-50% - 2px));
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.12);
  border-color: rgba(196, 59, 29, 0.18);
}

.knowledge-tree-node:focus-visible {
  outline: none;
}

.knowledge-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
}

.knowledge-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 19, 35, 0.72);
  backdrop-filter: blur(7px);
}

.knowledge-modal-panel {
  position: relative;
  width: min(1480px, calc(100vw - 36px));
  height: min(900px, calc(100vh - 36px));
  overflow: hidden;
  background: #fffdf9;
  border: 1px solid rgba(23, 50, 84, 0.18);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(5, 18, 35, 0.28);
}

.knowledge-modal-topbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid rgba(23, 50, 84, 0.12);
  background: rgba(255, 253, 249, 0.96);
  color: #536275;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.knowledge-modal-close {
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: #17365d;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.knowledge-modal-workspace {
  position: relative;
  height: calc(100% - 48px);
  display: grid;
  grid-template-columns: minmax(360px, 42%) minmax(0, 1fr);
  overflow-anchor: none;
  transition: grid-template-columns 220ms ease;
}

.knowledge-modal-workspace.is-preview-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.knowledge-modal-preview-pane {
  min-width: 0;
  padding: 22px;
  border-right: 1px solid rgba(23, 50, 84, 0.14);
  background: #f7f7f4;
  overflow: hidden;
  transition: padding 220ms ease, opacity 160ms ease;
}

.knowledge-modal-workspace.is-preview-collapsed .knowledge-modal-preview-pane {
  padding-inline: 0;
  border-right: 0;
  opacity: 0;
  pointer-events: none;
}

.knowledge-preview-toggle {
  position: absolute;
  z-index: 6;
  top: auto;
  bottom: 24px;
  left: calc(42% - 1px);
  width: 42px;
  height: 64px;
  transform: translate(-100%, 0);
  border: 1px solid rgba(23, 50, 84, 0.2);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: #0d2e55;
  color: #ffd681;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(13, 46, 85, 0.18);
  transition: left 220ms ease, transform 220ms ease, background 160ms ease;
}

.knowledge-preview-toggle:hover,
.knowledge-preview-toggle:focus-visible {
  background: #174b7a;
}

.knowledge-modal-workspace.is-preview-collapsed .knowledge-preview-toggle {
  left: 0;
  transform: translate(0, 0);
  border-right: 1px solid rgba(23, 50, 84, 0.2);
  border-left: 0;
  border-radius: 0 12px 12px 0;
}

.knowledge-modal-reading-pane {
  min-width: 0;
  overflow: auto;
  overflow-anchor: none;
  scrollbar-gutter: stable;
}

.knowledge-summary-link {
  display: inline-block;
  margin-top: 12px;
  color: #0d2e55;
  font-weight: 750;
}

.knowledge-summary-document {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--page-gutter) 80px;
}

.knowledge-summary-hero {
  padding: 34px 0 36px;
  border-bottom: 1px solid var(--line);
}

.knowledge-summary-hero h1 {
  max-width: 22ch;
  margin: 8px 0 16px;
  color: #0d2e55;
  font-family: var(--nature-serif);
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 0.98;
}

.knowledge-summary-hero > p:last-of-type {
  max-width: 72ch;
  color: #485568;
  font-family: var(--detail-body-font-family);
  font-size: 1.12rem;
  line-height: 1.7;
}

.knowledge-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 30px;
  background: var(--line);
  border: 1px solid var(--line);
}

.knowledge-summary-stats div {
  display: grid;
  gap: 5px;
  padding: 18px 20px;
  background: #fff;
}

.knowledge-summary-stats strong {
  color: #0d2e55;
  font-family: var(--nature-serif);
  font-size: 1.55rem;
}

.knowledge-summary-stats span { color: #657183; }

.knowledge-summary-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: start;
  padding-top: 34px;
}

.knowledge-summary-toc {
  position: sticky;
  top: 150px;
  display: grid;
  gap: 12px;
  padding: 18px 18px 20px;
  border-left: 4px solid #0d2e55;
  background: #f6f7f8;
}

.knowledge-summary-toc a { color: #315b8c; font-weight: 650; }

.knowledge-summary-body { min-width: 0; }

.knowledge-summary-body > section {
  padding: 8px 0 42px;
  border-bottom: 1px solid var(--line);
}

.knowledge-summary-body h2 {
  margin: 0 0 18px;
  color: #0d2e55;
  font-family: var(--nature-serif);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
}

.knowledge-summary-body > section > p {
  max-width: 80ch;
  font-family: var(--detail-body-font-family);
  font-size: 1.05rem;
  line-height: 1.78;
}

.knowledge-review-abstract {
  padding: 28px !important;
  border: 1px solid #cfd6df;
  background: #f7f8fa;
}
.knowledge-review-abstract h2 { margin-bottom: 14px; }
.knowledge-review-abstract > p:not(.eyebrow) { max-width: none; margin: 0 0 14px; text-align: justify; }
.knowledge-review-keywords { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid #d6dce4; }
.knowledge-review-keywords strong { margin-right: 5px; color: #0d2e55; }
.knowledge-review-keywords span { padding: 4px 9px; border: 1px solid #c1cad5; background: #fff; color: #536275; font-size: 0.84rem; }
.knowledge-review-comparison {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  border: 1px solid #d4dae2;
  background: #d4dae2;
}
.knowledge-review-comparison article { padding: 18px; background: #fff; }
.knowledge-review-comparison strong { color: #a06a18; font-size: 0.92rem; }
.knowledge-review-comparison p { margin: 9px 0 0; color: #4b5868; line-height: 1.58; }
.knowledge-review-consensus { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.knowledge-review-consensus article { padding: 21px; border-top: 4px solid #315b8c; background: #f5f7f9; }
.knowledge-review-consensus h3 { margin: 0 0 9px; color: #17365d; font-size: 1.05rem; }
.knowledge-review-consensus p { margin: 0; color: #4b5868; line-height: 1.63; }
.knowledge-review-outlook { display: grid; gap: 1px; border: 1px solid #d6dce4; background: #d6dce4; }
.knowledge-review-outlook article { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: 22px; background: #fff; }
.knowledge-review-outlook article > span { color: #a06a18; font-family: var(--nature-serif); font-size: 1.4rem; }
.knowledge-review-outlook h3 { margin: 0 0 7px; color: #17365d; font-size: 1.08rem; }
.knowledge-review-outlook p { margin: 0; color: #4b5868; line-height: 1.65; }

.knowledge-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.knowledge-theme-grid article {
  padding: 22px;
  border: 1px solid #d8dee6;
  background: #fbfbfa;
}

.knowledge-theme-grid article:first-child { grid-column: 1 / -1; }
.knowledge-theme-grid span { color: #a06a18; font-weight: 750; }
.knowledge-theme-grid h3 { margin: 9px 0; color: #17365d; font-size: 1.2rem; }
.knowledge-theme-grid p { margin: 0; color: #4b5868; line-height: 1.65; }

.knowledge-classification-heading {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(320px, 1.25fr);
  gap: 40px;
  align-items: end;
}
.knowledge-classification-heading h2 { margin-bottom: 0; }
.knowledge-classification-heading > p { margin: 0 0 4px; color: #4b5868; line-height: 1.7; }
.knowledge-classification-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ccd3dc;
}
.knowledge-classification-controls button {
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid #9fabb9;
  background: #fff;
  color: #315b8c;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.knowledge-classification-controls button:hover { border-color: #0d2e55; }
.knowledge-classification-controls button[aria-pressed="true"] { border-color: #0d2e55; background: #0d2e55; color: #ffd681; }
.knowledge-classification-overview {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(320px, 1.45fr);
  gap: 12px 32px;
  padding: 24px;
  background: #edf2f7;
  border-left: 5px solid #0d2e55;
}
.knowledge-classification-overview h3 { margin: 0; color: #0d2e55; font-family: var(--nature-serif); font-size: 1.55rem; }
.knowledge-classification-overview > p { margin: 0; color: #3f4b5b; line-height: 1.72; }
.knowledge-classification-overview > div { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; padding-top: 5px; }
.knowledge-classification-overview strong { color: #a06a18; font-family: var(--nature-serif); font-size: 1.35rem; }
.knowledge-classification-overview span { color: #596779; }
.knowledge-classification-tree { margin-top: 18px; border-top: 1px solid #aeb8c4; }
.knowledge-reading-guide { margin: 28px 0; border-top: 1px solid var(--line); padding-top: 20px; }
.knowledge-reading-guide-intro { color: var(--muted); }
.knowledge-reading-guide-columns { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 36px; }
.knowledge-reading-guide-columns h3 { font-family: var(--nature-serif); font-size: 1.15rem; }
.knowledge-reading-guide-columns ul { margin: 0; padding: 0; list-style: none; }
.knowledge-reading-guide-topics li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.knowledge-reading-guide-topics li .entry-meta { flex-shrink: 0; margin: 0; }
.knowledge-reading-guide-year { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 14px; }
.knowledge-reading-guide-year h4 { margin: 10px 0; color: var(--muted); font-size: 0.9rem; }
.knowledge-reading-guide-papers li { padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.knowledge-reading-guide-papers li p { margin: 0 0 4px; }
.knowledge-reading-guide .entry-meta { font-family: var(--font-sans); font-size: 0.82rem; line-height: 1.5; color: var(--muted); }
@media (max-width: 760px) { .knowledge-reading-guide-columns { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.knowledge-classification-node { border-bottom: 1px solid #cbd2da; background: #fff; }
.knowledge-classification-node > summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 18px 10px;
  color: #17365d;
  cursor: pointer;
  list-style: none;
}
.knowledge-classification-node > summary::-webkit-details-marker { display: none; }
.knowledge-classification-node > summary::before { content: "+"; flex: 0 0 24px; color: #a06a18; font-size: 1.3rem; font-weight: 800; }
.knowledge-classification-node[open] > summary::before { content: "−"; }
.knowledge-classification-node > summary > span { display: flex; gap: 12px; align-items: center; flex: 1; font-size: 1.08rem; font-weight: 850; }
.knowledge-classification-node > summary i { padding: 3px 7px; background: #e9eef4; color: #536b87; font-size: 0.7rem; font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; }
.knowledge-classification-node > summary strong { color: #657183; font-size: 0.9rem; white-space: nowrap; }
.knowledge-classification-node-body { padding: 0 12px 20px 46px; }
.knowledge-classification-node-body > p { max-width: 80ch; margin: 0 0 8px; color: #3f4b5b; line-height: 1.68; }
.knowledge-classification-node-meta { color: #7b6850; font-size: 0.84rem; font-weight: 700; }
.knowledge-classification-children { margin-top: 17px; border-top: 1px solid #d8dee6; border-left: 3px solid #dfe5ec; }
.knowledge-classification-node.depth-1 { margin-left: 14px; background: #fbfbfa; }
.knowledge-classification-node.depth-1 > summary { padding-block: 15px; }
.knowledge-classification-paper-host {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  border: 1px solid #dce1e7;
  background: #dce1e7;
}
.knowledge-classification-load { grid-column: 1 / -1; margin: 0; padding: 18px; background: #f7f8f9; color: #657183; }
.knowledge-classification-paper { min-width: 0; padding: 20px; background: #fff; }
.knowledge-classification-paper h5 { margin: 0 0 8px; color: #17365d; font-family: var(--nature-serif); font-size: 1.05rem; line-height: 1.35; }
.knowledge-classification-paper > p:not(.entry-meta) { margin: 11px 0; color: #3f4b5b; line-height: 1.6; }

.knowledge-timeline-bars { display: grid; gap: 11px; max-width: 760px; }
.knowledge-timeline-row { display: grid; grid-template-columns: 64px 1fr 38px; gap: 12px; align-items: center; }
.knowledge-timeline-row > div { height: 12px; background: #edf0f3; }
.knowledge-timeline-row i { display: block; height: 100%; background: #315b8c; }
.knowledge-timeline-row strong { text-align: right; }

.knowledge-catalogue-heading {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
}

.knowledge-catalogue-heading label { display: grid; gap: 6px; min-width: min(320px, 100%); color: #536275; font-weight: 700; }
.knowledge-catalogue-heading input { min-height: 42px; padding: 9px 12px; border: 1px solid #aeb8c4; font: inherit; }
.knowledge-summary-paper-heading { display: flex; align-items: flex-start; gap: 12px; }
.knowledge-summary-paper-heading h4 { flex: 1; min-width: 0; }
.knowledge-bookmark-button { flex: 0 0 auto; border: 1px solid #8b98a8; background: #fff; color: #263444; padding: 5px 9px; font: inherit; font-size: 13px; cursor: pointer; }
.knowledge-bookmark-button[aria-pressed="true"] { border-color: #a62d18; color: #a62d18; background: #fff5f2; }
.knowledge-summary-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 24px; }
.knowledge-summary-pagination button { border: 1px solid #8b98a8; background: #fff; min-height: 36px; padding: 6px 12px; font: inherit; cursor: pointer; }
.knowledge-summary-pagination button:disabled { opacity: .45; cursor: default; }
.knowledge-assistant form { display: grid; gap: 8px; }
.knowledge-assistant form > label { color: #536275; font-weight: 700; }
.knowledge-assistant-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.knowledge-assistant-input textarea { width: 100%; min-height: 94px; resize: vertical; border: 1px solid #aeb8c4; padding: 10px 12px; font: inherit; }
.knowledge-assistant-input button { min-height: 44px; }
.knowledge-assistant-answer { margin-top: 18px; }
.knowledge-assistant-answer p { white-space: pre-wrap; }
.knowledge-assistant-sources { margin: 14px 0 0; padding-left: 22px; }
@media (max-width: 680px) { .knowledge-assistant-input { grid-template-columns: 1fr; } }
.knowledge-summary-sort {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 22px 0 10px;
  padding: 14px;
  border: 1px solid #d8dee6;
  background: #f6f7f8;
}
.knowledge-summary-sort > span { color: #536275; font-weight: 800; white-space: nowrap; }
.knowledge-summary-sort > div { display: flex; flex-wrap: wrap; gap: 7px; }
.knowledge-summary-sort button {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid #aeb8c4;
  border-radius: 999px;
  background: #fff;
  color: #315b8c;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.knowledge-summary-sort button:hover { border-color: #315b8c; }
.knowledge-summary-sort button[aria-pressed="true"] { border-color: #0d2e55; background: #0d2e55; color: #ffd681; }
.knowledge-summary-sort output { color: #657183; font-size: 0.86rem; white-space: nowrap; }
.knowledge-summary-help { color: #657183; }

.knowledge-summary-folder { border-top: 1px solid #bfc7d0; }
.knowledge-summary-folder:last-child { border-bottom: 1px solid #bfc7d0; }
.knowledge-summary-folder > summary { display: flex; justify-content: space-between; gap: 20px; padding: 18px 4px; color: #17365d; font-size: 1.08rem; font-weight: 800; cursor: pointer; }
.knowledge-summary-folder > summary strong { color: #7a8390; font-size: 0.9rem; }
.knowledge-summary-paper-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #dce1e7; border-top: 1px solid #dce1e7; }
.knowledge-summary-paper { padding: 20px; background: #fff; }
.knowledge-summary-paper h4 { margin: 0 0 8px; color: #17365d; font-family: var(--nature-serif); font-size: 1.08rem; line-height: 1.3; }
.knowledge-summary-paper p:not(.entry-meta) { margin: 11px 0; color: #3f4b5b; line-height: 1.58; }
.knowledge-tree-jump { color: #315b8c; font-size: 0.88rem; font-weight: 750; }
.knowledge-summary-empty { padding: 30px; background: #f6f7f8; color: #657183; }

@media (max-width: 900px) {
  .knowledge-summary-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-summary-layout { grid-template-columns: 1fr; }
  .knowledge-summary-toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-summary-sort { grid-template-columns: 1fr; }
  .knowledge-summary-sort output { white-space: normal; }
  .knowledge-classification-heading, .knowledge-classification-overview { grid-template-columns: 1fr; }
  .knowledge-classification-overview > div { grid-column: auto; }
  .knowledge-review-comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-review-consensus { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .knowledge-summary-document { padding-inline: 18px; }
  .knowledge-summary-stats, .knowledge-theme-grid, .knowledge-summary-paper-list { grid-template-columns: 1fr; }
  .knowledge-theme-grid article:first-child { grid-column: auto; }
  .knowledge-catalogue-heading { display: grid; align-items: stretch; }
  .knowledge-classification-paper-host { grid-template-columns: 1fr; }
  .knowledge-classification-node-body { padding-left: 20px; }
  .knowledge-classification-node.depth-1 { margin-left: 4px; }
  .knowledge-review-abstract { padding: 20px !important; }
  .knowledge-review-comparison { grid-template-columns: 1fr; }
  .knowledge-review-outlook article { grid-template-columns: 38px 1fr; gap: 10px; padding: 18px; }
}

.knowledge-modal-paper-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 28px 34px 22px;
  border-bottom: 1px solid rgba(23, 50, 84, 0.14);
  background: rgba(255, 253, 249, 0.96);
  backdrop-filter: blur(12px);
  transition: padding 180ms ease, box-shadow 180ms ease;
}

.knowledge-modal-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: start;
}

.knowledge-modal-paper-header .eyebrow {
  margin-bottom: 10px;
  color: #a06a18;
}

.knowledge-modal-paper-header h2 {
  max-width: 28ch;
  margin: 0 0 10px;
  color: #0d2e55;
  font-family: var(--nature-serif);
  font-size: clamp(1.75rem, 2.4vw, 2.75rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.knowledge-modal-authors {
  margin: 0 0 7px;
  color: #17365d;
  font-size: 0.98rem;
  line-height: 1.45;
}

.knowledge-modal-paper-header .entry-meta {
  max-width: 78ch;
  margin: 0;
  overflow-wrap: anywhere;
  color: #657183;
  line-height: 1.45;
}

.knowledge-modal-paper-header.is-compact {
  padding: 10px 24px;
  box-shadow: 0 8px 24px rgba(13, 46, 85, 0.08);
}

.knowledge-modal-paper-header.is-compact .eyebrow,
.knowledge-modal-paper-header.is-compact .knowledge-modal-authors,
.knowledge-modal-paper-header.is-compact .entry-meta {
  display: none;
}

.knowledge-modal-paper-header.is-compact .knowledge-modal-title-row {
  align-items: center;
  gap: 18px;
}

.knowledge-modal-paper-header.is-compact h2 {
  max-width: none;
  margin: 0;
  overflow: hidden;
  font-family: var(--nature-sans);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-modal-paper-header.is-compact .knowledge-modal-actions .button {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.86rem;
}

.knowledge-modal-reading-pane:has(.knowledge-modal-paper-header.is-compact) .knowledge-modal-index {
  top: 60px;
}

.knowledge-modal-reading-pane:has(.knowledge-modal-paper-header.is-compact) .knowledge-modal-section {
  scroll-margin-top: 72px;
}

.knowledge-modal-reading-layout {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  align-items: start;
}

.knowledge-modal-index {
  position: sticky;
  top: 188px;
  display: grid;
  padding: 24px 16px 28px 24px;
  border-right: 1px solid rgba(23, 50, 84, 0.12);
}

.knowledge-modal-index a {
  padding: 9px 10px;
  border-left: 2px solid transparent;
  color: #315b89;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.knowledge-modal-index a:hover,
.knowledge-modal-index a:focus-visible {
  border-left-color: #c6943b;
  background: rgba(198, 148, 59, 0.07);
  color: #0d2e55;
}

.knowledge-modal-content {
  min-width: 0;
  padding: 12px 34px 48px;
  scroll-behavior: smooth;
}

.knowledge-modal-section {
  scroll-margin-top: 190px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(23, 50, 84, 0.13);
}

.knowledge-modal-section:last-child {
  border-bottom: 0;
}

.knowledge-modal-section h3 {
  margin: 0 0 10px;
  color: #17365d;
  font-family: var(--nature-serif);
  font-size: 1.15rem;
  line-height: 1.2;
}

.knowledge-modal-section p {
  margin: 0;
  max-width: 76ch;
  color: #303b49;
  font-family: var(--detail-body-font-family);
  font-size: 0.94rem;
  line-height: 1.72;
  font-weight: 400;
  white-space: pre-line;
}

.knowledge-modal-summary-section {
  margin-top: 12px;
  padding: 22px 24px;
  border: 0;
  border-left: 3px solid #c6943b;
  background: rgba(198, 148, 59, 0.065);
}

.knowledge-modal-section ul {
  margin: 0;
  padding-left: 20px;
  color: #303b49;
  line-height: 1.65;
}

.knowledge-modal-info-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.knowledge-modal-info-list li {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 16px 11px 0;
  border-bottom: 1px dashed rgba(23, 50, 84, 0.14);
}

.knowledge-modal-info-list li span {
  color: #7a8490;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.knowledge-modal-info-list li strong {
  color: #26374a;
  font-size: 0.88rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.knowledge-modal-preview-section iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.knowledge-modal-preview-section {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.knowledge-modal-preview-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: #17365d;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.knowledge-modal-preview-heading small {
  color: #7b8794;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.knowledge-modal-preview-placeholder {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  min-height: 0;
  padding: 36px;
  border: 1px solid rgba(23, 50, 84, 0.16);
  border-radius: 8px;
  background: #fff;
  color: #657183;
  text-align: center;
}

.knowledge-modal-preview-placeholder strong {
  color: #17365d;
  font-family: var(--nature-serif);
  font-size: 1.35rem;
}

.knowledge-modal-preview-placeholder p {
  margin: 0;
  max-width: 34ch;
  font-family: var(--detail-body-font-family);
  line-height: 1.55;
  font-weight: 400;
}

.knowledge-modal-preview-button {
  min-width: 180px;
  margin-top: 8px;
  background: #0d2e55 !important;
  border-color: #0d2e55 !important;
  color: #f5d58c !important;
}

.knowledge-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.knowledge-modal-actions .button {
  white-space: nowrap;
  background: #0d2e55 !important;
  border-color: #0d2e55 !important;
  color: #f5d58c !important;
}

.knowledge-modal-access-note {
  margin: 16px 0 0;
  padding: 14px;
  border-left: 3px solid #c6943b;
  background: rgba(255, 255, 255, 0.75);
}

.knowledge-modal.is-folder .knowledge-modal-workspace {
  grid-template-columns: 1fr;
}

.knowledge-modal.is-folder .knowledge-modal-preview-pane,
.knowledge-modal.is-folder .knowledge-modal-actions,
.knowledge-modal.is-folder .knowledge-modal-index {
  display: none;
}

.content-knowledge-editor .content-knowledge-list {
  display: grid;
  gap: 12px;
}

.content-editor-knowledge-item {
  border: 1px solid var(--line);
  padding: 16px;
  background: #fbfbfb;
}

.content-editor-knowledge-item label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.content-editor-knowledge-item input,
.content-editor-knowledge-item textarea {
  width: 100%;
}

.content-knowledge-upload {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.knowledge-preview-link {
  display: inline-flex;
  width: fit-content;
}

.content-knowledge-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .knowledge-header,
  .knowledge-teaser-row,
  .knowledge-toolbar {
    grid-template-columns: 1fr;
  }

  .knowledge-teaser-stats {
    padding-left: 0;
    border-left: 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .knowledge-toolbar {
    display: grid;
    gap: 12px;
  }

  .knowledge-tree-classification {
    grid-template-columns: 1fr;
  }

  .knowledge-tree-classification output { white-space: normal; }

  .knowledge-search {
    min-width: 0;
  }

  .knowledge-sort {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .knowledge-tree {
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  .knowledge-tree-shell {
    width: 100%;
    height: min(74dvh, 760px);
    min-height: 480px;
    box-sizing: border-box;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }

  .knowledge-tree-label {
    max-width: 130px;
  }

  .content-knowledge-top {
    grid-template-columns: 1fr;
  }

  .knowledge-modal {
    place-items: stretch;
    padding: 0;
  }

  .knowledge-modal-panel {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .knowledge-modal-topbar {
    height: 46px;
    padding: 0 16px;
  }

  .knowledge-modal-workspace {
    height: calc(100% - 46px);
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .knowledge-modal-workspace.is-preview-collapsed {
    grid-template-columns: 1fr;
  }

  .knowledge-preview-toggle {
    position: fixed;
    top: auto;
    bottom: 14px;
    left: 8px;
    width: 46px;
    height: 40px;
    transform: none;
    grid-column: 1;
    margin: 0;
    border: 1px solid rgba(23, 50, 84, 0.2);
    border-radius: 10px;
  }

  .knowledge-modal-workspace.is-preview-collapsed .knowledge-preview-toggle {
    left: 8px;
    transform: none;
    border: 1px solid rgba(23, 50, 84, 0.2);
    border-radius: 10px;
  }

  .knowledge-modal-workspace.is-preview-collapsed .knowledge-modal-preview-pane {
    display: none;
  }

  .knowledge-modal-preview-pane {
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(23, 50, 84, 0.14);
  }

  .knowledge-modal-preview-section {
    height: auto;
    min-height: 46dvh;
  }

  .knowledge-modal-preview-section iframe,
  .knowledge-modal-preview-placeholder {
    min-height: 40dvh;
  }

  .knowledge-modal-reading-pane {
    overflow: visible;
  }

  .knowledge-modal-paper-header {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 22px 18px 18px;
  }

  .knowledge-modal-paper-header.is-compact {
    padding: 9px 14px;
  }

  .knowledge-modal-paper-header.is-compact .knowledge-modal-title-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .knowledge-modal-title-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .knowledge-modal-paper-header h2 {
    max-width: none;
    font-size: clamp(1.75rem, 8vw, 2.35rem);
  }

  .knowledge-modal-actions {
    justify-content: flex-start;
  }

  .knowledge-modal-reading-layout {
    grid-template-columns: 1fr;
  }

  .knowledge-modal-index {
    position: relative;
    top: auto;
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(23, 50, 84, 0.12);
    scrollbar-width: none;
  }

  .knowledge-modal-index::-webkit-scrollbar {
    display: none;
  }

  .knowledge-modal-index a {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }

  .knowledge-modal-index a:hover,
  .knowledge-modal-index a:focus-visible {
    border-left-color: transparent;
    border-bottom-color: #c6943b;
  }

  .knowledge-modal-content {
    padding: 0 18px calc(32px + env(safe-area-inset-bottom));
  }

  .knowledge-modal-section {
    scroll-margin-top: 20px;
  }

  .knowledge-modal-summary-section {
    margin-top: 16px;
    padding: 18px;
  }

  .knowledge-modal-info-list {
    grid-template-columns: 1fr;
  }
}

[hidden] {
  display: none !important;
}

:root {
  --bg: var(--peiran-bg, #ffffff);
  --text: var(--peiran-text, #222222);
  --muted: var(--peiran-muted, #555555);
  --line: var(--peiran-line, #d6d6d6);
  --rule: var(--peiran-rule, #000000);
  --dark: var(--peiran-dark, #29303b);
  --accent: var(--peiran-accent, #c43b1d);
  --blue: var(--peiran-blue, #0077a3);
  --max: var(--peiran-max, 1360px);
  --page-gutter: var(--peiran-page-gutter, clamp(24px, 5vw, 72px));
  --anchor-offset: var(--peiran-anchor-offset, 144px);
  --nature-serif: var(--peiran-serif-font, "Harding Text Web Bold", "Harding Text Web Regular", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif);
  --detail-body-font-family: var(--peiran-detail-body-font-family, "Harding Text Web Regular", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif);
  --nature-sans: var(--peiran-sans-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif);
  --font-serif: var(--peiran-heading-font-family, "Harding Text Web Bold", "Harding Text Web Regular", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif);
  --font-sans: var(--peiran-body-font-family, Arial, Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif);
  --font-size-base: var(--peiran-body-font-size, 14.5px);
  --font-size-mobile: var(--peiran-body-font-size-mobile, 14px);
  --heading-weight: var(--peiran-heading-font-weight, 700);
  --heading-letter-spacing: var(--peiran-heading-letter-spacing, -0.02em);
  --h1-size: var(--peiran-h1-size, clamp(1.75rem, 2.65vw, 2.55rem));
  --h2-size: var(--peiran-h2-size, clamp(1.38rem, 2.1vw, 2rem));
  --h3-size: var(--peiran-h3-size, 1.12rem);
  --section-padding: var(--peiran-section-padding, 24px var(--page-gutter) 52px);
  --section-heading-top: var(--peiran-section-heading-top, 4px);
  --section-heading-bottom: var(--peiran-section-heading-bottom, 1px);
  --compact-heading-bottom: var(--peiran-compact-heading-bottom, 1px);
  --button-min-height: var(--peiran-button-min-height, 34px);
  --button-padding-x: var(--peiran-button-padding-x, 13px);
  --glass-surface: rgba(255, 255, 255, 0.72);
  --glass-surface-strong: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 16px 38px rgba(11, 18, 32, 0.09);
  --glass-shine: rgba(255, 255, 255, 0.82);
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: var(--anchor-offset);
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

code {
  padding: 0.08rem 0.28rem;
  border: 1px solid #d0d0d0;
  background: #f1f1f1;
  font-size: 0.86em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: white;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

/* The rule belongs to the full-width header, not the centered nav container. */
.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 4px;
  background: var(--rule);
  pointer-events: none;
}

.site-header.is-glass {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(30, 41, 59, 0.08);
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.055);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  isolation: isolate;
}

.site-header.is-glass::after {
  display: none;
}

.site-header.is-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.26), transparent 42%, rgba(220, 233, 247, 0.1));
  pointer-events: none;
  mix-blend-mode: normal;
}

.site-header.is-glass .masthead::after {
  background: rgba(30, 41, 59, 0.1);
}

.top-strip {
  display: none;
}

.masthead {
  position: relative;
  max-width: var(--max);
  height: var(--peiran-masthead-height, 64px);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.masthead::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 1px;
  transform: translateX(-50%);
  background: #eeeeee;
}

@media (max-width: 960px) {
  .nav { display: none; }
  .site-header.mobile-nav-ready .mobile-nav-toggle { display: inline-flex; }
  .masthead { min-height: 64px; }
}

@media (min-width: 961px) {
  .mobile-nav-toggle, .mobile-nav-panel { display: none !important; }
}

.journal-logo {
  min-height: var(--peiran-masthead-height, 64px);
  display: flex;
  align-items: center;
  font-family: var(--peiran-journal-logo-font-family, "Times New Roman", Georgia, serif);
  font-size: var(--peiran-journal-logo-size, clamp(1.78rem, 3.2vw, 2.3rem));
  font-weight: var(--peiran-journal-logo-weight, 900);
  line-height: 1;
  letter-spacing: var(--peiran-journal-logo-letter-spacing, -0.025em);
  text-decoration: none;
}

.masthead-links {
  display: flex;
  align-items: stretch;
  font-size: var(--peiran-masthead-links-font-size, 0.95rem);
  font-weight: var(--peiran-masthead-links-font-weight, 400);
}

.masthead-links a {
  min-height: var(--peiran-masthead-link-min-height, 64px);
  display: flex;
  align-items: center;
  padding: 0 var(--peiran-masthead-link-padding-x, 16px);
  border-left: var(--peiran-masthead-link-border-width, 2px) solid #eeeeee;
  text-decoration-thickness: 1px;
}

.masthead-links a[href*="search.html"] {
  gap: var(--peiran-masthead-search-icon-gap, 10px);
}

.masthead-links a[href*="search.html"]::before {
  content: "";
  flex: 0 0 auto;
  width: var(--peiran-masthead-search-icon-size, 1.42rem);
  height: var(--peiran-masthead-search-icon-size, 1.42rem);
  background: center / contain no-repeat url("assets/icons/search.svg");
}

.super-admin-badge {
  min-height: var(--peiran-masthead-link-min-height, 64px);
  padding: 0 var(--peiran-masthead-link-padding-x, 16px);
  border-left: var(--peiran-masthead-link-border-width, 2px) solid #eeeeee;
  background: transparent;
  color: #b8860b;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  text-decoration: none;
}

.super-admin-badge:hover,
.super-admin-badge:focus-visible {
  background: transparent;
  color: #8a6500;
}

.nav {
  position: relative;
  max-width: var(--max);
  min-height: var(--peiran-nav-height, 58px);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  transition: background-color 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.nav::after {
  content: none;
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 4px;
  transform: translateX(-50%);
  background: var(--rule);
}

.site-header.is-glass .nav {
  background: transparent;
  box-shadow: none;
}

.site-header.is-glass .nav::after {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(30, 41, 59, 0.16), transparent);
}

.site-header.is-glass .nav > * {
  position: relative;
  z-index: 1;
}

.nav-links {
  display: flex;
  align-items: stretch;
  gap: var(--peiran-nav-gap, 24px);
  font-size: var(--peiran-nav-font-size, 0.94rem);
  font-weight: var(--peiran-nav-font-weight, 800);
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--peiran-nav-height, 58px);
  padding: 0 var(--peiran-nav-link-padding-x, 0);
  margin-right: 0;
  font-weight: var(--peiran-nav-font-weight, 900);
  text-decoration-thickness: 1px;
}

.nav-menu-item {
  position: relative;
  display: flex;
  align-items: stretch;
  margin-right: 0;
  padding-right: var(--peiran-nav-menu-padding-right, 24px);
  border-right: 0;
}

.nav-menu-item::after {
  content: "";
  position: absolute;
  top: var(--peiran-nav-divider-inset-y, 12px);
  right: 0;
  bottom: var(--peiran-nav-divider-inset-y, 12px);
  width: var(--peiran-nav-divider-width, 2px);
  background: #eeeeee;
}

.nav-menu-trigger {
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.nav-menu-trigger[aria-expanded="true"] {
  background: #eeeeee;
  color: var(--blue);
}

.nav-menu-trigger::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.nav-menu-trigger[aria-expanded="true"]::after {
  border-top: 0;
  border-bottom: 5px solid currentColor;
}

.nav-dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 30;
  width: 230px;
  display: none;
}

.nav-menu-item.is-open .nav-dropdown {
  display: block;
}

.nav-dropdown-inner {
  padding: 20px 22px 22px;
  border-top: 6px solid var(--rule);
  background: #000000;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.site-header.is-glass .nav-dropdown-inner {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(246, 249, 255, 0.68)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 40px rgba(11, 18, 32, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px) saturate(155%);
  -webkit-backdrop-filter: blur(20px) saturate(155%);
}

.site-header.is-glass .nav-dropdown-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.74), transparent 30%),
    radial-gradient(circle at 92% 0%, rgba(111, 178, 255, 0.16), transparent 28%),
    linear-gradient(130deg, transparent 22%, rgba(255, 255, 255, 0.32) 46%, transparent 70%);
  background-size: 100% 100%, 100% 100%, 220% 220%;
  background-position: center, center, 0% 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: nav-glass-drift 14s linear infinite;
}

.site-header.is-glass .nav-dropdown-links {
  position: relative;
  z-index: 1;
}

.site-header.is-glass .nav-dropdown-links a {
  color: var(--text);
}

.nav-dropdown-title {
  display: none;
}

.nav-dropdown-links {
  display: grid;
  gap: 16px;
}

.nav-dropdown-links a {
  min-height: 0;
  margin: 0;
  padding: 0;
  align-items: flex-start;
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.18;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.nav-dropdown-links .nav-dropdown-contact {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid #d8d8d8;
}

.nav-links a:hover,
.masthead-links a:hover {
  color: var(--accent);
}

.journals-page { min-height: 60vh; }
.journals-index { padding-top: 34px; }
.journals-index h1 { margin: 34px 0 12px; }
.journals-intro { max-width: 760px; margin: 0 0 34px; color: #536275; }
.journal-letters { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.journal-letters a { min-width: 38px; padding: 12px 10px; text-align: center; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.journal-groups { max-width: 900px; }
.journal-group { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 26px; padding: 24px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 120px; }
.journal-group h2 { margin: 0; font-size: 2rem; }
.journal-group > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 36px; }
.journal-group a { color: var(--blue); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.journals-link { white-space: nowrap; }
.site-header.is-glass .nav-links a {
  transition: color 180ms ease;
}

.site-header.is-glass .nav-menu-trigger[aria-expanded="true"] {
  background: transparent;
  box-shadow: none;
}

@keyframes nav-glass-drift {
  0% {
    background-position: center, center, 0% 50%;
  }
  50% {
    background-position: center, center, 100% 50%;
  }
  100% {
    background-position: center, center, 0% 50%;
  }
}

.nav-secondary {
  margin-left: auto;
  position: relative;
}

.nav-secondary a {
  position: relative;
  min-height: var(--peiran-nav-height, 58px);
  margin-right: 0;
  padding: 0 var(--peiran-nav-secondary-padding-x, 24px);
  border-left: 0;
  font-weight: var(--peiran-nav-secondary-weight, 900);
}

.nav-secondary a::before {
  content: "";
  position: absolute;
  top: var(--peiran-nav-divider-inset-y, 12px);
  left: 0;
  bottom: var(--peiran-nav-divider-inset-y, 12px);
  width: var(--peiran-nav-divider-width, 2px);
  background: #eeeeee;
}

.nav-secondary a:first-child::after {
  content: "";
  width: 18px;
  height: 18px;
  margin-left: 8px;
  background: currentColor;
  -webkit-mask: url("assets/icons/bell.svg") center / contain no-repeat;
  mask: url("assets/icons/bell.svg") center / contain no-repeat;
}

.mobile-nav-toggle,
.mobile-nav-panel {
  display: none;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-padding);
}

#news,
#articles,
#figures,
#codes,
#issues,
#funding,
#institutions,
#about {
  content-visibility: auto;
  contain-intrinsic-size: 1px 1100px;
}

#news,
#articles,
#figures,
#codes,
#issues,
#input-files,
#funding,
#institutions {
  padding-top: var(--peiran-content-section-padding-top, 18px);
  padding-bottom: var(--peiran-content-section-padding-bottom, 16px);
}

#news {
  position: relative;
}

.hero {
  display: grid;
  grid-template-columns: var(--peiran-hero-grid-left-min, minmax(300px, 0.68fr)) var(--peiran-hero-grid-right-min, minmax(430px, 1fr));
  min-height: 0;
  align-items: stretch;
  gap: 0;
  padding-bottom: 12px;
}

.hero-content {
  min-width: 0;
  padding: var(--peiran-hero-content-padding, 48px 34px 30px);
  background: var(--dark);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
}

.hero-content h1 {
  font-size: var(--peiran-hero-title-size, var(--h1-size));
}

.eyebrow {
  margin: 0 0 11px;
  color: inherit;
  font-size: 0.84rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero-card.gorilla-hero { background: #b9e0ee; position: relative; }
.gorilla-hero > img { position: absolute; inset: 0; visibility: hidden; }
.gorilla-hero.is-fallback > img { visibility: visible; }
#gorillaCanvas { width: 100%; height: 100%; display: block; position: absolute; inset: 0; cursor: grab; touch-action: none; }
#gorillaCanvas:active { cursor: grabbing; }
#gorillaCanvas:focus-visible { outline: 3px solid #257b77; outline-offset: -3px; }
.scene-zoom-controls { position: absolute; right: 14px; bottom: 14px; z-index: 2; display: flex; gap: 6px; }
.gorilla-hero:not(.is-ready) .scene-zoom-controls { visibility: hidden; }
.scene-zoom-controls button { width: 34px; height: 34px; padding: 0; border: 1px solid rgba(24,38,39,.28); border-radius: 6px; background: rgba(255,255,255,.86); color: #182627; font: 700 1.15rem/1 system-ui, sans-serif; cursor: pointer; }
.scene-zoom-controls button:hover, .scene-zoom-controls button:focus-visible { background: #fff; border-color: #257b77; }

h1,
h2,
h3,
.card-title {
  font-family: var(--font-serif);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-letter-spacing);
}

h1 {
  max-width: 520px;
  margin-bottom: 18px;
  font-size: var(--h1-size);
  line-height: 1.02;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

h2 {
  margin-bottom: 10px;
  font-size: var(--h2-size);
  line-height: 1.05;
}

h3 {
  margin-bottom: 8px;
  font-size: var(--h3-size);
  line-height: 1.08;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.section-title-link {
  text-decoration-thickness: 1.5px;
}

body.home-page .section-title-link::after {
  content: "›";
  display: inline-block;
  margin-left: 8px;
  font-family: var(--nature-sans);
  font-size: 1.1em;
  line-height: 0;
  text-decoration: none;
}

body.home-page .section-title-link {
  text-decoration: none;
}

body.home-page .section-title-text {
  display: inline;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.hero-text {
  max-width: 460px;
  margin-bottom: 0;
  color: white;
  font-size: var(--peiran-hero-text-size, 0.92rem);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--button-min-height);
  padding: 0 var(--button-padding-x);
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.primary {
  background: white;
  color: var(--dark);
}

.secondary {
  color: white;
}

.hero-card {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #070c16;
  border: 0;
}

.hero-card > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.card-title {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.card-subtitle,
.muted {
  color: var(--muted);
}

.avatar {
  display: none;
}

.featured-strip-section {
  padding-top: 0;
  padding-bottom: 16px;
}

.featured-strip {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(190px, 0.95fr);
  gap: var(--peiran-home-layout-gap, 18px);
  align-items: start;
}

.featured-strip-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--peiran-home-grid-gap-x, 18px);
}

.featured-strip-card {
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.featured-strip-link {
  min-height: 100%;
  padding-bottom: 18px;
  display: flex;
  flex-direction: column;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.featured-strip-link:hover h3,
.featured-strip-link:focus-visible h3 {
  color: var(--accent);
}

.featured-strip-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.featured-strip-card .entry-image {
  aspect-ratio: 16 / 8.8;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: #eeeeee;
}

.featured-strip-card .entry-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.featured-issue {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.featured-issue-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4.05;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #eeeeee;
}

.featured-issue-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.featured-issue-button {
  min-width: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-size: 0.9rem;
  line-height: 1;
  text-decoration: none;
}

.featured-issue-button.primary {
  background: var(--blue);
  color: white;
}

.featured-issue-button:hover,
.featured-issue-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.featured-issue-button.primary:hover,
.featured-issue-button.primary:focus-visible {
  background: var(--accent);
  color: white;
}

.featured-issue-summary {
  flex: 1;
  margin-top: 12px;
  padding: 12px;
  border-top: 3px solid var(--rule);
  background: #f3f4f2;
}

.featured-issue-summary .featured-issue-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.featured-issue-summary h3 {
  margin: 0 0 6px;
  font-size: clamp(0.98rem, 1.05vw, 1.12rem);
  line-height: 1.08;
}

.featured-issue-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.featured-issue-stats a {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.featured-issue-stats strong,
.featured-issue-stats span {
  display: block;
}

.featured-issue-stats strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  line-height: 1;
}

.featured-issue-stats span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.1;
}

.featured-issue-stats a:hover,
.featured-issue-stats a:focus-visible {
  color: var(--accent);
}

.featured-strip-card h3 {
  margin-bottom: 10px;
  font-size: clamp(0.95rem, 1.08vw, 1.14rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.featured-strip-card p {
  margin-bottom: 22px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.42;
}

.featured-strip-meta {
  margin-top: auto;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.featured-strip-meta strong {
  color: var(--text);
}

.featured-strip-meta .access {
  color: var(--accent);
  font-weight: 700;
}

.visit-stats {
  width: 100%;
  margin: 0 0 16px;
  padding: 10px 0;
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  z-index: 2;
  background: white;
  border: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.25;
}

.visit-stats .current-time-stat {
  margin-right: auto;
}

.visit-stats span + span {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.visit-stats strong {
  color: var(--text);
}

@media (min-width: 761px) {
  #news .visit-stats {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin: 0 0 18px;
    padding: 10px 0;
    gap: 18px;
    background: white;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 0.84rem;
  }

  #news .visit-stats span + span {
    padding-left: 18px;
  }
}

.split-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.2fr) minmax(0, 1fr);
  gap: 38px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.glass-panel {
  min-width: 0;
  padding-top: 2px;
  border-top: 3px solid var(--rule);
  color: #222222;
  font-size: 0.96rem;
  line-height: 1.65;
}

.profile-page {
  padding-top: 34px;
}

.profile-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--peiran-profile-masthead-gap, 34px);
  padding: 18px 0 34px;
  border-bottom: 1px solid var(--line);
}

.profile-identity h1 {
  max-width: 780px;
  margin-bottom: 18px;
}

.profile-dek {
  max-width: 820px;
  color: var(--muted);
  font-size: var(--peiran-profile-body-size, 1.13rem);
  line-height: 1.58;
}

.profile-snapshot {
  align-self: start;
  padding: 0;
}

.profile-photo {
  position: relative;
  width: min(100%, 260px);
  aspect-ratio: 4 / 5;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  background: #f2f2f2;
  border: 1px solid var(--line);
  overflow: hidden;
  font-family: var(--nature-serif);
  font-size: clamp(2.15rem, 4vw, 2.35rem);
  font-weight: 800;
}

.profile-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-photo img[hidden] {
  display: none;
}

.profile-email,
.profile-links {
  color: var(--muted);
  line-height: 1.55;
}

.profile-email a,
.profile-links a {
  color: var(--blue);
  font-weight: 700;
}

.profile-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(300px, 0.38fr);
  gap: 42px;
  padding-top: 34px;
}

.profile-narrative h2,
.profile-list-block h2 {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.profile-narrative p {
  max-width: 760px;
  color: var(--text);
  font-family: var(--nature-serif);
  font-size: 1.13rem;
  line-height: 1.68;
}

.profile-highlight-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.profile-highlight {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-highlight p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--peiran-profile-highlight-label-size, 0.8rem);
  font-weight: 700;
}

.profile-highlight strong {
  display: block;
  font-size: var(--peiran-profile-highlight-value-size, 1rem);
  line-height: 1.25;
}

.profile-list-block {
  margin-bottom: 30px;
}

.profile-list-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.profile-list-block li {
  margin-bottom: 8px;
}

.profile-wide-block {
  margin-top: 34px;
}

.profile-timeline {
  display: grid;
  gap: 18px;
}

.profile-timeline-item {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.profile-timeline-item p:first-child {
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--nature-sans);
  font-size: 0.86rem;
  font-weight: 700;
}

.profile-timeline-item h3 {
  margin-bottom: 8px;
  font-size: var(--peiran-profile-timeline-title-size, clamp(1.08rem, 1.4vw, 1.32rem));
}

.profile-timeline-item strong,
.profile-timeline-item span {
  display: block;
  margin-bottom: 6px;
  line-height: 1.45;
}

.profile-timeline-item span,
.profile-timeline-item p:last-child {
  color: var(--muted);
}

.profile-publications {
  margin: 0;
  padding-left: 24px;
  color: var(--text);
}

.profile-publications li {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.profile-publications strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--nature-serif);
  font-size: var(--peiran-profile-publication-title-size, 1.03rem);
  line-height: 1.35;
}

.profile-publications span {
  display: block;
  color: var(--muted);
  font-size: var(--peiran-profile-publication-body-size, 0.92rem);
  line-height: 1.45;
}

.section-heading {
  margin-bottom: 12px;
  padding-top: calc(var(--section-heading-top) + 2px);
  border-top: 4px solid var(--rule);
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.18rem, 1.7vw, 1.65rem);
}

.compact-heading {
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: var(--compact-heading-bottom) solid var(--rule);
}

.section-heading p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
}

.search-page {
  padding-top: 34px;
}

.site-search-form {
  margin-bottom: 20px;
  padding: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--peiran-search-form-bg, #eeeeee);
}

.site-search-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.site-search-form div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.site-search-form input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--text);
  background: white;
  color: var(--text);
  font: inherit;
}

.site-search-form button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--text);
  background: var(--text);
  color: white;
  font: inherit;
  font-weight: 700;
}

.search-status {
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 700;
}

.site-search-results {
  border-top: 1px solid var(--line);
}

.site-search-result {
  display: grid;
  grid-template-columns: var(--peiran-search-result-image-width, 180px) minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.site-search-result > div,
.site-search-result h2,
.site-search-result h2 a,
.site-search-result p {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content-not-found {
  min-height: min(62vh, 560px);
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
}

.content-not-found h1,
.content-not-found p {
  margin: 0;
}

.content-not-found p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
}

.site-search-image {
  display: block;
  color: inherit;
  text-decoration: none;
}

.site-search-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  background: white;
}

.site-search-result h2 {
  margin-bottom: 10px;
  font-size: var(--peiran-search-result-title-size, clamp(1.25rem, 1.8vw, 1.65rem));
  line-height: 1.08;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.site-search-result p {
  max-width: 780px;
  color: var(--muted);
  font-size: var(--peiran-search-result-body-size, 0.9rem);
  line-height: 1.5;
}

.input-files-section {
  padding-bottom: 26px;
}

.input-files-teaser {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: inherit;
}

.input-files-metric {
  min-height: 104px;
  display: grid;
  place-items: center;
  align-content: center;
  border-right: 1px solid var(--line);
  background: #eeeeee;
  color: var(--text);
}

.input-files-metric strong {
  display: block;
  font-family: var(--nature-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.95;
}

.input-files-metric span {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.input-files-copy {
  min-width: 0;
  padding: 18px 0;
  display: grid;
  align-content: center;
}

.input-files-copy strong {
  margin-bottom: 8px;
  color: var(--text);
  font-family: var(--nature-serif);
  font-size: clamp(1.08rem, 1.28vw, 1.24rem);
  line-height: 1.08;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.input-files-copy strong a {
  color: inherit;
}

.input-files-copy span {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.funding-home-list,
.funding-index-list {
  display: grid;
  gap: 16px;
}

.funding-card,
.funding-index-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.funding-card-image,
.funding-index-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg);
}

.funding-card-image img,
.funding-index-image img,
.funding-detail-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.funding-card-copy,
.funding-index-copy {
  display: grid;
  align-content: start;
  gap: 8px;
}

.funding-card h3,
.funding-index-row h2 {
  margin: 0;
  font-family: var(--nature-serif);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.15;
}

.funding-card p,
.funding-index-row p {
  margin: 0;
}

.funding-meta-list,
.funding-sidebar-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.funding-meta-list div,
.funding-sidebar-list div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
}

.funding-meta-list dt,
.funding-sidebar-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.funding-meta-list dd,
.funding-sidebar-list dd {
  margin: 0;
  color: var(--text);
}

.section.curve-strip-section {
  padding-top: 0;
  padding-bottom: 0;
}

.function-curve-strip {
  position: relative;
  height: clamp(86px, 11vw, 132px);
  overflow: hidden;
  border-top: 4px solid var(--rule);
  border-bottom: 1px solid var(--line);
  background: #f4f4f4;
}

.function-curve-strip[hidden] {
  display: none;
}

.function-curve-strip canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.code-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-bottom: 28px;
}

.issues-section {
  padding-bottom: 36px;
}

.issue-board-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--peiran-issues-board-gap, 24px);
  align-items: center;
  margin-top: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.issue-board-teaser h3 {
  margin-bottom: 8px;
  font-size: var(--peiran-issues-card-title-size, clamp(1.18rem, 1.75vw, 1.55rem));
}

.issue-board-teaser p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.issue-board-button {
  color: var(--blue);
}

.issue-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.issue-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, max-content);
  gap: var(--peiran-issues-board-gap, 28px);
  min-width: 0;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.issue-card h3 {
  margin-bottom: 10px;
  font-size: var(--peiran-issues-card-title-size, clamp(1.05rem, 1.45vw, 1.34rem));
  line-height: 1.06;
}

.issue-card p {
  color: var(--text);
  font-size: var(--peiran-issues-card-body-size, 0.92rem);
  line-height: 1.45;
  white-space: pre-wrap;
}

.issue-card-meta {
  min-width: 0;
  padding-top: 2px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.issue-card-meta p {
  color: inherit;
}

.issue-card-meta .entry-meta {
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 700;
}

.issue-board-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  gap: 34px;
  align-items: start;
}

.issue-form {
  position: sticky;
  top: calc(var(--anchor-offset) + 12px);
  display: grid;
  gap: 14px;
  padding: 22px;
  border-top: 4px solid var(--rule);
  border-bottom: 1px solid var(--line);
  background: var(--peiran-issues-form-bg, #eeeeee);
}

.issue-form-heading h2,
.issue-list-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(1.18rem, 1.7vw, 1.55rem);
}

.issue-form-heading p,
.issue-list-heading p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.issue-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.issue-form input,
.issue-form select,
.issue-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--text);
  background: white;
  color: var(--text);
  font: inherit;
  line-height: 1.45;
}

.issue-form select {
  min-height: 42px;
}

.issue-form textarea {
  resize: vertical;
}

.issue-honeypot {
  position: absolute;
  left: -9999px;
}

.issue-submit {
  justify-self: start;
  border-color: var(--text);
  background: var(--text);
  color: white;
  cursor: pointer;
}

.issue-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.issue-form-status {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.issue-list-panel {
  min-width: 0;
}

.issue-list-heading {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.issue-index-list {
  border-top: 1px solid var(--line);
}

.issue-index-row {
  display: block;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.issue-index-row h2 {
  margin-bottom: 10px;
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  line-height: 1.08;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.issue-status-line {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 800;
}

.issue-thread-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.issue-thread-label {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.issue-thread-block p:not(.issue-thread-label) {
  white-space: pre-wrap;
}

.issue-answer-block {
  margin-top: 18px;
  background: #f7f7f7;
  padding: 14px;
  border: 1px solid var(--line);
}

.issue-answer-meta {
  display: grid;
  justify-content: end;
  gap: 4px;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.3;
  text-align: right;
}

.issue-answer-meta p {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.issue-answer-form {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.issue-answer-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.issue-answer-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--text);
  background: white;
  color: var(--text);
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.issue-admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.issue-answer-button,
.issue-delete-button {
  min-height: var(--peiran-issues-button-min-height, 34px);
  padding: 0 12px;
  border: 1px solid var(--text);
  background: var(--text);
  color: white;
  font: inherit;
  font-size: var(--peiran-issues-button-font-size, 0.86rem);
  font-weight: 800;
  cursor: pointer;
}

.issue-delete-button {
  border: 1px solid var(--accent);
  background: white;
  color: var(--accent);
}

.issue-answer-button:hover,
.issue-answer-button:focus-visible,
.issue-delete-button:hover,
.issue-delete-button:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.issue-answer-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.admin-settings-panel {
  max-width: 620px;
}

.homepage-cover-form { max-width: 1100px; }

.admin-dashboard {
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.admin-dashboard.is-hidden {
  display: none !important;
}

.admin-dashboard-card {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-dashboard-card span,
.admin-dashboard-card strong {
  display: block;
}

.admin-dashboard-card span {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-dashboard-card strong {
  max-width: 360px;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.25;
}

.admin-dashboard-card:hover,
.admin-dashboard-card:focus-visible {
  border-color: var(--text);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.admin-detail-panel {
  display: none !important;
  margin-top: 18px;
}

.admin-detail-panel.is-active {
  display: block !important;
}

.admin-back-button {
  margin-bottom: 18px;
}

.admin-order-panel {
  max-width: 860px;
}

.admin-news-panel {
  max-width: 960px;
}

.admin-settings-form {
  position: static;
  margin-top: 18px;
}

.curve-settings-form {
  max-width: 760px;
}

.curve-toggle-label {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px;
}

.curve-toggle-label input {
  width: auto;
}

.curve-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.curve-settings-grid input[type="color"] {
  min-height: 42px;
  padding: 4px;
}

.curve-custom-expression {
  margin-top: 2px;
}

.curve-custom-expression textarea {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.admin-curve-preview {
  height: 96px;
  margin-top: 2px;
}

.homepage-cover-block {
  display: grid;
  gap: 12px;
}

.homepage-cover-spec {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.homepage-cover-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: white;
  overflow: hidden;
}

.homepage-cover-preview img {
  width: 100%;
  display: block;
  object-fit: cover;
  background: #f4f4f4;
  user-select: none;
  transform-origin: center center;
}

.homepage-cover-block[data-cover-slot="hero"] .homepage-cover-preview img {
  aspect-ratio: 16 / 9;
}

.homepage-cover-block[data-cover-slot="featured"] .homepage-cover-preview img {
  aspect-ratio: 3 / 4.05;
}

.homepage-cover-preview img.is-dragging,
.homepage-cover-preview img:active {
  cursor: grabbing;
}

.homepage-cover-preview figcaption {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.homepage-cover-preview strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.visitor-account-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.visitor-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.visitor-account-row strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.order-module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 12px;
}

.order-module-tab {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.order-module-tab.is-active,
.order-module-tab:hover,
.order-module-tab:focus-visible {
  border-color: var(--text);
  background: var(--text);
  color: white;
}

.order-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.order-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  background: white;
}

.order-row.is-dragging {
  opacity: 0.45;
}

.order-row.is-drop-target {
  border-top-color: var(--accent);
  box-shadow: inset 0 2px 0 var(--accent);
}

.order-row-handle {
  width: 24px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  text-align: center;
  cursor: grab;
}

.order-row-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.order-row-copy strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.25;
}

.order-row-copy span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.order-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.order-row-actions button {
  min-width: 58px;
}

.admin-news-form {
  max-width: 900px;
}

.content-admin-actions {
  margin: 0 0 20px;
}

.news-compose-form {
  margin-top: 10px;
  overflow-anchor: none;
}

.content-compose-form {
  overflow-anchor: none;
}

.news-compose-form label {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--text);
  font-weight: 800;
}

.news-compose-form input,
.news-compose-form textarea {
  width: 100%;
  border: 1px solid var(--text);
  background: white;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  line-height: 1.35;
  padding: 10px 12px;
  overflow: hidden;
  overflow-anchor: none;
  resize: none;
}

.news-compose-form .article-main > label {
  margin-bottom: 12px;
}

.news-compose-kicker {
  max-width: 260px;
}

.news-compose-kicker span,
.news-compose-title span,
.news-compose-author span,
.news-compose-date span,
.news-compose-figure label span,
.news-sidebar-field span {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.news-compose-kicker input,
.news-compose-author input,
.news-compose-date input,
.news-sidebar-field input {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 4px 0 6px;
}

.news-sidebar-field textarea {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 4px 0 6px;
  resize: none;
}

.content-extra-fields {
  display: grid;
  gap: 14px;
}

.content-body-preview {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: #fafafa;
  color: var(--text);
  font-family: var(--nature-serif);
  font-size: 0.96rem;
  line-height: 1.65;
}

.content-body-preview p {
  margin: 0 0 14px;
}

.content-body-preview p:last-child {
  margin-bottom: 0;
}

.content-body-marker {
  color: var(--accent);
  font-weight: 700;
}

.content-extra-fields h2 {
  margin-bottom: 2px;
}

.content-editor-field {
  display: grid;
  gap: 7px;
  margin-bottom: 0;
  color: var(--text);
  font-weight: 800;
}

.content-editor-field span {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
}

.content-editor-field textarea {
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--text);
  background: white;
  color: var(--text);
  font: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.45;
  padding: 10px 12px;
  resize: none;
  overflow: hidden;
  overflow-anchor: none;
}

.content-editor-field textarea[data-editor-scroll] {
  overflow-y: auto;
  resize: vertical;
}

.section-highlight-editor {
  position: relative;
  display: grid;
}

.section-highlight-editor > * {
  grid-area: 1 / 1;
}

.section-highlight-backdrop,
.section-highlight-editor textarea {
  width: 100%;
  min-height: inherit;
  margin: 0;
  border: 1px solid var(--text);
  padding: 10px 12px;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  box-sizing: border-box;
  overflow-anchor: none;
}

.section-highlight-backdrop {
  background: #ffffff;
  color: var(--text);
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.section-highlight-backdrop .section-highlight-line {
  color: #b42318;
  font-weight: inherit;
}

.section-highlight-backdrop sub,
.section-highlight-backdrop sup,
.body-highlight-backdrop sub,
.body-highlight-backdrop sup {
  font-size: inherit;
  line-height: inherit;
  vertical-align: baseline;
}

.section-highlight-editor textarea {
  position: relative;
  z-index: 2;
  background: transparent;
  color: transparent !important;
  caret-color: var(--text) !important;
  text-shadow: none !important;
  -webkit-text-fill-color: transparent !important;
  background-color: transparent !important;
}

.section-highlight-editor textarea::selection {
  color: transparent;
  background: rgba(40, 118, 255, 0.22);
}

.section-highlight-editor textarea::placeholder {
  color: transparent;
}

.body-highlight-editor {
  position: relative;
  display: grid;
}

.body-highlight-editor > * {
  grid-area: 1 / 1;
}

.body-highlight-backdrop,
.body-highlight-editor textarea {
  width: 100%;
  min-height: inherit;
  margin: 0;
  border: 1px solid var(--text);
  padding: 10px 12px;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  box-sizing: border-box;
  overflow-anchor: none;
}

.body-highlight-backdrop {
  background: #ffffff;
  color: var(--text);
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.body-highlight-editor textarea {
  position: relative;
  z-index: 2;
  background: transparent;
  color: transparent !important;
  caret-color: var(--text) !important;
  text-shadow: none !important;
  -webkit-text-fill-color: transparent !important;
  background-color: transparent !important;
}

.body-highlight-editor textarea::selection {
  color: transparent;
  background: rgba(40, 118, 255, 0.22);
}

.body-highlight-editor textarea::placeholder {
  color: transparent;
}

.body-highlight-backdrop .content-body-marker {
  color: #b42318;
  font-weight: inherit;
}

.body-highlight-backdrop .content-math-marker {
  color: #b42318;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
}

.content-editor-field.is-large .body-highlight-backdrop,
.content-editor-field.is-large .body-highlight-editor textarea {
  min-height: 420px;
  font-family: var(--font-serif);
  font-size: 1.04rem;
  font-weight: 500;
  line-height: 1.62;
}

.content-editor-field.is-large textarea {
  min-height: 420px;
  font-family: var(--font-serif);
  font-size: 1.04rem;
  font-weight: 500;
  line-height: 1.62;
}

.content-editor-field.is-large .section-highlight-backdrop,
.content-editor-field.is-large .section-highlight-editor textarea {
  min-height: 420px;
  font-family: var(--font-serif);
  font-size: 1.04rem;
  font-weight: 500;
  line-height: 1.62;
}

.content-media-editor {
  gap: 14px;
}

.content-media-list {
  display: grid;
  gap: 18px;
}

.content-media-item {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.content-media-item-top {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1.4fr);
  gap: 14px;
}

.content-media-item label {
  display: grid;
  gap: 7px;
}

.content-media-item input,
.content-media-item textarea {
  width: 100%;
  border: 1px solid var(--text);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.45;
  padding: 10px 12px;
}

.content-media-item textarea {
  min-height: 140px;
  resize: vertical;
}

.content-media-upload {
  display: grid;
  grid-template-columns: minmax(160px, 260px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.content-media-upload img {
  width: 100%;
  max-height: 180px;
  display: block;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #f7f7f7;
}

.news-compose-title input,
.news-compose-title textarea {
  border: 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  padding: 0 0 10px;
  resize: none;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.news-compose-title input::placeholder,
.news-compose-title textarea::placeholder {
  color: #9a9a9a;
}

.news-compose-author input,
.news-compose-date input {
  color: var(--link);
  font-weight: 700;
}

.news-compose-figure {
  margin-top: 16px;
}

.news-compose-empty-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: #f4f4f4;
  color: var(--muted);
  font-weight: 800;
}

.news-compose-figure figcaption {
  display: grid;
  gap: 10px;
}

.news-compose-figure textarea {
  min-height: 82px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}

.news-compose-file {
  max-width: 420px;
}

.image-delete-button {
  justify-self: start;
}

.news-sidebar-field {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.news-compose-actions {
  margin-top: 18px;
}

.news-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.news-image-upload {
  display: grid !important;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px 16px;
  align-items: start;
}

.news-image-upload input {
  min-width: 0;
}

.news-image-upload img {
  grid-column: 2;
  width: min(100%, 320px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f4f4f4;
}

.news-editor-section-heading,
.news-editor-section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.news-editor-section-heading {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.news-editor-section-heading h3,
.news-editor-section-top h4 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.2;
}

.news-section-list {
  display: grid;
  gap: 14px;
}

.news-editor-section {
  display: grid;
  gap: 12px;
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
}

.news-edit-page .news-editor-section {
  padding-top: 24px;
}

.news-edit-page .news-editor-section-top h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.news-edit-page .news-editor-section > label:first-of-type input {
  border: 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.1;
  padding: 0 0 8px;
}

.news-edit-page .news-editor-section > label:nth-of-type(2) textarea {
  min-height: 180px;
  border: 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: 1.14rem;
  font-weight: 500;
  line-height: 1.65;
  padding: 8px 0;
}

.news-section-image-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 12px;
  align-items: start;
}

.code-banner-feature {
  display: grid;
  grid-template-columns: minmax(280px, 0.96fr) minmax(360px, 1.04fr);
  gap: var(--peiran-code-feature-gap, 18px);
  padding-top: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.code-banner-copy {
  min-width: 0;
  padding-bottom: 12px;
}

.code-banner-copy h3,
.code-banner-side h3 {
  margin-bottom: 8px;
  font-size: var(--peiran-code-banner-title-size, clamp(1.12rem, 1.7vw, 1.55rem));
  line-height: 1.04;
}

.code-banner-copy p {
  max-width: 620px;
  color: var(--text);
  font-size: var(--peiran-code-banner-body-size, 0.94rem);
  line-height: 1.45;
}

.code-banner-image {
  min-width: 0;
  width: min(100%, 860px);
  justify-self: end;
  display: block;
  color: inherit;
  text-decoration: none;
}

.code-banner-image img {
  width: 100%;
  aspect-ratio: 16 / 8.8;
  display: block;
  object-fit: contain;
  border: 1px solid var(--line);
  background: white;
}

.code-banner-grid {
  display: grid;
  grid-template-columns: var(--peiran-code-index-cols, repeat(3, minmax(0, 1fr)));
  gap: 14px var(--peiran-code-index-gap, 18px);
}

.code-banner-card {
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.code-banner-card-image {
  display: block;
  margin-bottom: 8px;
  color: inherit;
  text-decoration: none;
}

.code-banner-card-image img {
  width: 100%;
  aspect-ratio: 16 / 8.8;
  display: block;
  object-fit: contain;
  border: 1px solid var(--line);
  background: white;
}

.code-banner-card h3 {
  margin-bottom: 7px;
  font-size: var(--peiran-code-banner-card-title-size, clamp(1rem, 1.35vw, 1.28rem));
  line-height: 1.06;
}

.code-banner-card p {
  color: var(--text);
  font-size: var(--peiran-code-banner-card-body-size, 0.9rem);
  line-height: 1.38;
}

.code-banner-card .entry-meta,
.code-banner-copy .entry-meta {
  margin-top: 8px;
  color: var(--text);
}

.article-card,
.issue-card,
.review-card,
.collection-card,
.code-banner-feature,
.code-banner-card {
  cursor: pointer;
}

.article-card:hover h3,
.article-card:focus-within h3,
.issue-card:hover h3,
.issue-card:focus-within h3,
.review-card:hover h3,
.review-card:focus-within h3,
.collection-card:hover h3,
.collection-card:focus-within h3,
.code-banner-feature:hover h3,
.code-banner-feature:focus-within h3,
.code-banner-card:hover h3,
.code-banner-card:focus-within h3 {
  color: var(--accent);
}

.article-card:hover h3 a,
.article-card:focus-within h3 a,
.issue-card:hover h3 a,
.issue-card:focus-within h3 a,
.review-card:hover h3 a,
.review-card:focus-within h3 a,
.collection-card:hover h3 a,
.collection-card:focus-within h3 a,
.code-banner-feature:hover h3 a,
.code-banner-feature:focus-within h3 a,
.code-banner-card:hover h3 a,
.code-banner-card:focus-within h3 a {
  color: var(--accent);
}

.news-layout {
  display: grid;
  grid-template-columns: var(--peiran-news-layout-columns, minmax(340px, 1.18fr) repeat(3, minmax(0, 0.56fr)));
  gap: 10px 14px;
  padding-bottom: 6px;
}

.article-list {
  display: block;
  border-top: 1px solid var(--line);
}

.news-card,
.article-card,
.review-card,
.collection-card {
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.news-card,
.review-card,
.collection-card {
  display: flex;
  flex-direction: column;
}

.featured-news {
  position: relative;
  grid-row: span 2;
  display: grid;
  grid-template-rows: auto 1fr;
  padding-bottom: 0;
  border-bottom: 0;
  background: var(--dark);
  color: white;
}

.featured-news .entry-image {
  aspect-ratio: 16 / 8.7;
  margin-bottom: 0;
  border: 0;
}

.featured-news .news-card-link {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.featured-news .entry-copy {
  min-height: 138px;
  padding: var(--peiran-news-featured-copy-padding, 12px 18px 30px);
}

.news-card .entry-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.featured-news h3 {
  max-width: 680px;
  margin-bottom: 6px;
  color: white;
  font-family: var(--nature-serif);
  font-size: var(--peiran-news-featured-title-size, clamp(1.08rem, 1.45vw, 1.36rem));
  font-weight: 900;
  line-height: 1.05;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.featured-news p {
  color: white;
}

.featured-news .entry-copy p {
  color: white;
}

.featured-news .news-meta-block {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 6px;
  margin-top: 0;
}

.featured-news .entry-meta,
.featured-news .news-author {
  color: white;
}

.news-card:not(.featured-news) .entry-image {
  aspect-ratio: 16 / 8.6;
  margin-bottom: 8px;
}

.news-card:not(.featured-news) h3 {
  margin-bottom: 6px;
  font-family: var(--nature-serif);
  font-size: var(--peiran-news-card-title-size, clamp(1rem, 1.12vw, 1.12rem));
  font-weight: 900;
  line-height: 1.08;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.news-meta-block {
  margin-top: auto;
  padding-top: 4px;
}

.news-author {
  margin-bottom: 3px;
  color: var(--text);
}

.news-card-link {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.news-card-link h3 {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.news-card-link:hover h3,
.news-card-link:focus-visible h3 {
  color: var(--accent);
}

.institutions-section {
  padding-top: 34px;
}

.institution-list {
  max-width: min(1180px, 100%);
}

.institution-row {
  min-height: 152px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 34px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.institution-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.institution-copy strong {
  color: var(--text);
  font-family: var(--nature-serif);
  font-size: var(--peiran-profile-title-size, clamp(1.12rem, 1.55vw, 1.42rem));
  line-height: 1.15;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.institution-copy span {
  max-width: 760px;
  color: var(--text);
  font-size: var(--peiran-profile-body-size, 1rem);
  line-height: 1.45;
}

.institution-copy em {
  color: var(--text);
  font-size: var(--peiran-profile-body-size, 0.96rem);
  font-style: normal;
  line-height: 1.35;
}

.institution-logo {
  width: 210px;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
}

.institution-logo.is-dark {
  box-sizing: border-box;
  min-height: 88px;
  padding: 16px 22px;
  background: #0f2340;
}

.institution-logo img {
  width: auto;
  max-width: 100%;
  max-height: 68px;
  object-fit: contain;
}

.institution-logo.logo-njust img {
  max-width: 226px;
  max-height: 54px;
}

.institution-logo.logo-nudt img {
  max-width: 198px;
  max-height: 62px;
}

.institution-logo.logo-zju img {
  max-width: 210px;
  max-height: 58px;
}

.institution-logo.logo-xtu img {
  max-width: 190px;
  max-height: 64px;
}

.institution-row:hover .institution-copy strong,
.institution-row:focus-visible .institution-copy strong {
  color: var(--accent);
}

.article-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 210px;
  gap: 26px;
  padding: 20px 0;
  align-items: start;
}

.articles-index {
  padding-top: 28px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  font-size: 0.96rem;
}

.breadcrumb a {
  color: var(--muted);
}

.articles-index h1 {
  margin-bottom: 20px;
  color: var(--text);
  text-decoration: none;
}

.article-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 290px));
  gap: 14px;
  margin-bottom: 16px;
  padding: 22px;
  background: var(--peiran-search-form-bg, #eeeeee);
}

.article-filters label {
  display: grid;
  gap: 9px;
  font-weight: 700;
}

.article-filters select,
.article-filters input {
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--text);
  background: white;
  color: var(--text);
  font: inherit;
}

.code-index-list {
  display: grid;
  grid-template-columns: var(--peiran-code-index-cols, repeat(3, minmax(0, 1fr)));
  gap: var(--peiran-code-index-gap, 22px);
  border-top: 1px solid var(--line);
}

.code-index-row {
  min-width: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.code-index-row .entry-image {
  margin-bottom: 14px;
  aspect-ratio: 16 / 10;
  background: transparent;
  border: 0;
}

.code-index-row .entry-image img {
  object-fit: contain;
}

.code-index-row h2 {
  margin-bottom: 10px;
  font-size: var(--peiran-code-banner-card-title-size, clamp(1.25rem, 1.8vw, 1.65rem));
  line-height: 1.08;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.article-index-list {
  border-top: 1px solid var(--line);
}

.article-index-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 210px;
  gap: 26px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.article-index-row h2 {
  margin-bottom: 9px;
  font-family: var(--nature-serif);
  font-size: var(--peiran-article-list-row-title-size, clamp(1.08rem, 1.45vw, 1.36rem));
  font-weight: 900;
  line-height: 1.08;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.article-detail {
  padding-top: 24px;
}

.article-detail .breadcrumb,
.review-detail .breadcrumb,
.download-detail .breadcrumb {
  gap: 8px;
  margin-bottom: 32px;
  color: #666666;
  font-family: var(--nature-sans);
  font-size: clamp(0.82rem, 0.9vw, 0.9rem);
  line-height: 1.2;
}

.article-detail .breadcrumb a,
.review-detail .breadcrumb a,
.download-detail .breadcrumb a {
  color: #666666;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-detail .breadcrumb span,
.review-detail .breadcrumb span,
.download-detail .breadcrumb span {
  color: var(--text);
}

.article-detail .breadcrumb span:not(:last-child),
.review-detail .breadcrumb span:not(:last-child),
.download-detail .breadcrumb span:not(:last-child) {
  color: #666666;
  font-size: 1.18em;
  font-weight: 800;
  line-height: 1;
}

.article-detail-page .breadcrumb {
  margin-bottom: 32px;
}

.article-detail-page .breadcrumb a {
  color: #666666;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.article-detail-page .breadcrumb span {
  color: var(--text);
}

.article-detail-page .breadcrumb span:not(:last-child) {
  color: #666666;
  font-size: 1.18em;
  font-weight: 800;
  line-height: 1;
}

.article-detail-grid,
.nature-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--peiran-article-sidebar-width, 330px);
  gap: var(--peiran-article-detail-gap, 70px);
}

.article-detail-page .article-detail {
  overflow: visible;
}

.article-detail-page .nature-article-layout {
  align-items: start;
}

.article-main {
  min-width: 0;
}

.article-detail-page .article-main {
  width: 100%;
}

.article-kicker {
  margin-bottom: 8px;
  color: var(--text);
}

.article-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  color: var(--text);
  font-family: var(--nature-sans);
  font-size: var(--peiran-article-meta-size, clamp(0.92rem, 0.98vw, 1.02rem));
  line-height: 1.25;
}

.article-meta-line li {
  position: relative;
}

.article-meta-line li:nth-child(2) {
  color: #a64213;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-meta-line li + li::before {
  content: "";
  position: absolute;
  left: -14px;
  top: -0.12em;
  bottom: -0.12em;
  border-left: 3px solid #b8d8f0;
}

.article-detail h1 {
  max-width: 1120px;
  margin-bottom: 22px;
  color: var(--text);
  font-family: var(--nature-serif);
  font-size: var(--peiran-article-title-size, clamp(1.55rem, 2vw, 2rem));
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
}

.news-detail h1 {
  font-size: var(--peiran-news-detail-title-size, var(--peiran-article-title-size, clamp(1.55rem, 2vw, 2rem)));
}

.detail-authors {
  max-width: 1040px;
  margin-bottom: 24px;
  color: var(--blue);
  font-family: var(--nature-sans);
  font-size: var(--peiran-article-meta-size, clamp(0.94rem, 1vw, 1.04rem));
  line-height: 1.6;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.article-author-info {
  max-width: 860px;
  margin: 0 0 24px;
  color: var(--text);
}

.author-detail-line {
  margin: 0 0 16px;
  color: var(--blue);
  font-family: var(--nature-sans);
  font-size: var(--peiran-article-meta-size, clamp(0.94rem, 1vw, 1.04rem));
  line-height: 1.6;
}

.author-detail-name {
  display: inline;
}

.author-name-text {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.author-detail-name sup {
  margin-left: 1px;
  color: var(--muted);
  font-size: 0.62em;
  line-height: 0;
  text-decoration: none;
}

.author-affiliations {
  display: grid;
  gap: 7px;
  margin: 0 0 12px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--muted);
  font-family: var(--nature-sans);
  font-size: 0.92rem;
  line-height: 1.45;
}

.author-affiliations li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
}

.affiliation-marker {
  color: var(--text);
  font-weight: 800;
}

.corresponding-authors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  color: var(--muted);
  font-family: var(--nature-sans);
  font-size: 0.92rem;
  line-height: 1.45;
}

.corresponding-authors strong {
  color: var(--text);
}

.corresponding-authors a {
  color: var(--blue);
  text-decoration-thickness: 1px;
}

.detail-citation {
  margin: 0;
  color: var(--text);
  font-family: var(--nature-sans);
  font-size: clamp(0.86rem, 0.92vw, 0.96rem);
  line-height: 1.4;
}

.detail-citation em {
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.detail-citation strong {
  font-weight: 900;
}

.article-journal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: baseline;
  margin-bottom: 18px;
}

.cite-link {
  position: relative;
  color: var(--blue);
  font-family: var(--nature-sans);
  font-size: clamp(0.86rem, 0.92vw, 0.96rem);
  font-weight: 400;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.cite-link::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 0.05em;
  bottom: 0.05em;
  border-left: 2px solid #9c9c9c;
}

.article-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 22px;
  color: var(--muted);
  font-family: var(--nature-sans);
  font-size: 0.92rem;
}

.article-metrics span + span {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.article-main > .subjects-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 34px;
  padding-top: 18px;
  background: transparent;
}

.article-main > .subjects-panel h2 {
  flex-basis: 100%;
  margin: 0 0 8px;
  font-family: var(--nature-sans);
  font-size: 1rem;
  letter-spacing: 0;
}

.article-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  max-width: 860px;
  margin: 8px 0 52px;
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  background: #ffffff;
}

.article-facts div {
  min-height: 106px;
  padding: 18px 22px 20px;
  border-bottom: 1px solid #d6d6d6;
  background: #ffffff;
}

.article-facts div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.article-facts div:nth-child(odd):last-child {
  grid-column: 1 / -1;
  border-right: 0;
}

.article-facts dt {
  margin-bottom: 9px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: var(--peiran-article-facts-label-size, 0.82rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-facts dd {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--peiran-article-facts-value-size, 1.05rem);
  line-height: 1.48;
}

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

.detail-section {
  margin-bottom: 32px;
}

.detail-section h2 {
  margin-bottom: 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-family: var(--nature-serif);
  font-size: clamp(1.12rem, 1.28vw, 1.32rem);
  font-weight: 800;
  line-height: 1.14;
}

.detail-section p,
.article-body-section p {
  max-width: 800px;
  color: var(--text);
  font-family: var(--detail-body-font-family);
  font-size: var(--peiran-article-body-size, 1.05rem);
  line-height: var(--peiran-article-body-line-height, 1.68);
  font-weight: 400;
}

.article-body-section {
  margin-bottom: 36px;
}

.article-body-section h3 {
  max-width: 900px;
  margin: 42px 0 18px;
  padding: 0 0 10px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--nature-serif);
  font-size: clamp(1.08rem, 1.2vw, 1.24rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}

.article-media-section > h3 {
  margin-top: 40px;
}

.article-figure,
.article-table {
  max-width: 900px;
  margin: 34px 0 48px;
  padding: var(--peiran-article-figure-padding, 22px);
  border: 1px solid var(--line);
  background: #fff;
}

.article-table {
  max-width: 980px;
}

.article-figure h3,
.article-table h3 {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  font-family: var(--nature-serif);
  font-size: clamp(1rem, 1.08vw, 1.14rem);
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}

.article-figure img,
.article-table img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  object-fit: contain;
}

.article-figure figcaption,
.article-table figcaption {
  margin-top: 18px;
  font-family: var(--nature-serif);
  font-size: var(--peiran-article-figure-caption-size, 0.98rem);
  line-height: 1.58;
}

.full-size-image {
  display: inline-flex;
  margin: 18px 0 0;
  padding: 10px 22px;
  border: 4px solid #c6dde6;
  border-radius: 999px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.key-findings {
  display: grid;
  gap: 10px;
  max-width: 800px;
  margin: 0;
  padding-left: 22px;
  font-family: var(--detail-body-font-family);
  font-size: 1.03rem;
  line-height: 1.62;
  font-weight: 400;
}

.review-detail {
  padding-top: 28px;
}

.news-detail-figure {
  margin: 0 0 38px;
}

.news-detail-figure img {
  width: 100%;
  max-height: 520px;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
}

.news-detail-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.code-detail-figure img {
  max-height: 460px;
  object-fit: contain;
  border: 0;
  background: white;
}

#newsSections p {
  max-width: 800px;
  color: var(--text);
  font-family: var(--detail-body-font-family);
  font-size: 1rem;
  line-height: 1.66;
  font-weight: 400;
}

#newsSections .detail-section > figure {
  max-width: 900px;
  margin: 22px 0 0;
}

#newsSections .detail-section > figure img {
  width: 100%;
  max-height: 520px;
  display: block;
  object-fit: cover;
}

#newsSections .detail-section > figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.news-award {
  max-width: 900px;
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.news-award img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.news-award h3 {
  margin-bottom: 10px;
  font-size: clamp(1.08rem, 1.25vw, 1.3rem);
}

.news-award p {
  color: var(--text);
  font-family: var(--detail-body-font-family);
  font-size: 0.98rem;
  line-height: 1.55;
  font-weight: 400;
}

.news-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 900px;
}

.news-gallery figure {
  margin: 0;
}

.news-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
}

.news-gallery figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.review-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--peiran-review-sidebar-width, 300px);
  gap: var(--peiran-review-detail-grid-gap, 66px);
}

.review-main {
  min-width: 0;
}

.review-main h1 {
  max-width: 840px;
  margin-bottom: 18px;
  color: var(--text);
  font-size: var(--peiran-review-title-size, clamp(1.45rem, 1.85vw, 1.9rem));
  line-height: 1.12;
  text-decoration: none;
}

.review-standfirst {
  max-width: 820px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: var(--peiran-review-standfirst-size, 1rem);
  line-height: 1.55;
}

.review-figure {
  margin: 0 0 38px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.review-figure img {
  width: 100%;
  height: var(--peiran-review-figure-image-height, min(500px, 68vh));
  display: block;
  object-fit: contain;
  background: #f5f5f5;
  border: 1px solid var(--line);
}

.review-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

#reviewBody p {
  max-width: 800px;
  color: var(--text);
  font-family: var(--detail-body-font-family);
  font-size: 1rem;
  line-height: 1.66;
  font-weight: 400;
}

.review-body-section {
  max-width: 800px;
  margin-bottom: var(--peiran-review-body-section-gap, 30px);
}

.review-section-figure {
  max-width: var(--peiran-review-figure-max-width, 900px);
  margin: var(--peiran-review-figure-margin, 28px 0 42px);
  padding: var(--peiran-review-figure-padding, 18px);
  border: 1px solid var(--line);
  background: #fff;
}

.review-section-figure h3 {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  font-family: var(--nature-serif);
  font-size: var(--peiran-review-figure-heading-size, clamp(1rem, 1.08vw, 1.14rem));
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}

.review-section-figure img {
  width: 100%;
  height: var(--peiran-review-figure-image-height, min(500px, 68vh));
  display: block;
  border: 1px solid var(--line);
  object-fit: contain;
}

.review-section-figure figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--nature-serif);
  font-size: var(--peiran-review-figure-caption-size, 0.96rem);
  line-height: 1.55;
}

.review-body-section h3 {
  margin: 24px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-family: var(--nature-sans);
  font-size: var(--peiran-review-body-heading-size, 1.08rem);
  line-height: 1.25;
  letter-spacing: 0;
  text-decoration: none;
}

.review-figure-marker,
.review-figure-marker-missing {
  color: var(--accent);
  font-weight: 700;
}

.review-body-section:first-child h3 {
  margin-top: 0;
}

.reference-list {
  max-width: 800px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.reference-list li {
  margin-bottom: 10px;
}

.review-sidebar {
  position: relative;
  overflow: visible;
  padding-bottom: 24px;
  align-self: stretch;
}

.review-sidebar-sticky {
  position: sticky;
  top: var(--peiran-review-sidebar-sticky-top, 126px);
  max-height: calc(100vh - var(--peiran-review-sidebar-sticky-top, 126px));
  overflow: visible;
}

.review-detail-page .article-tabs {
  position: relative;
}

.review-detail-page .article-tabs button {
  min-height: var(--peiran-review-tab-height, 42px);
  font-size: var(--peiran-review-tab-font-size, 0.86rem);
  line-height: 1.1;
}

.review-detail-page .article-tab-panel[data-review-panel="sections"],
.review-detail-page .article-tab-panel[data-review-panel="references"] {
  padding: 16px 16px 20px;
  border-left: 0;
}

.review-detail-page .article-tab-panel[data-review-panel="sections"] {
  max-height: var(--peiran-review-sidebar-panel-max-height, clamp(220px, calc(100vh - 430px), 360px));
  min-height: 220px;
  overflow-y: scroll;
  padding-bottom: 22px;
  scrollbar-color: #bdbdbd #f3f3f3;
  scrollbar-width: thin;
}

.review-detail-page .article-tab-panel[data-review-panel="sections"]::-webkit-scrollbar {
  width: 12px;
}

.review-detail-page .article-tab-panel[data-review-panel="sections"]::-webkit-scrollbar-track {
  background: #f3f3f3;
  border-left: 1px solid #e1e1e1;
}

.review-detail-page .article-tab-panel[data-review-panel="sections"]::-webkit-scrollbar-thumb {
  border: 3px solid #f3f3f3;
  border-radius: 999px;
  background: #bdbdbd;
}

.review-detail-page .section-nav {
  gap: 9px;
}

.review-detail-page .section-nav a,
.review-detail-page .section-nav div {
  min-height: 24px;
  padding-left: 16px;
  padding-top: 1px;
  padding-bottom: 1px;
}

.review-detail-page .section-nav a::before,
.review-detail-page .section-nav div::before {
  top: 50%;
  bottom: auto;
  height: 40px;
  transform: translateY(-50%);
}

.access-panel,
.share-panel,
.subjects-panel {
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
}

.review-sidebar > .access-panel:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.access-panel p,
.share-panel p,
.subjects-panel p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.access-panel strong {
  display: block;
  font-size: 0.94rem;
}

.share-panel a,
.subjects-panel a {
  color: var(--blue);
  font-weight: 700;
}

.subjects-panel div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subjects-panel a {
  padding: 5px 8px;
  background: #eeeeee;
  font-size: 0.86rem;
  text-decoration: none;
}

.article-sidebar {
  position: relative;
  overflow: visible;
  padding-bottom: 24px;
  align-self: stretch;
  width: var(--peiran-article-sidebar-width, auto);
}

.article-sidebar-toggle,
.article-sidebar-close,
.article-sidebar-backdrop {
  display: none;
}

.pdf-button {
  display: flex;
  min-height: 50px;
  margin-bottom: 42px;
  padding: 0 22px;
  align-items: center;
  justify-content: space-between;
  background: var(--blue);
  color: white;
  font-family: var(--nature-sans);
  font-size: 1rem;
  text-decoration: none;
}

.pdf-button::after {
  content: "↓";
  font-weight: 700;
}

.article-detail-page .pdf-button {
  margin-top: 0;
  margin-bottom: 34px;
}

.article-detail-page .article-sidebar-summary {
  margin-bottom: 26px;
}

.article-detail-page .article-sidebar-summary h2 {
  margin: 0 0 13px;
  padding-bottom: 11px;
  border-bottom: 4px solid #d2d2d2;
  color: var(--text);
  font-family: var(--nature-serif);
  font-size: var(--peiran-article-sidebar-title-size, clamp(1rem, 0.96vw, 1.08rem));
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.article-sidebar-title {
  display: block;
  margin-bottom: 13px;
  color: var(--text);
  font-family: var(--nature-serif);
  font-size: var(--peiran-article-sidebar-title-size, clamp(0.86rem, 0.88vw, 0.94rem));
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-sidebar-author {
  margin: 0 0 8px;
  color: #666666;
  font-family: var(--font-sans);
  font-size: var(--peiran-article-sidebar-meta-size, 0.84rem);
  line-height: 1.25;
}

.article-sidebar-meta {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--peiran-article-sidebar-meta-size, 0.84rem);
  line-height: 1.35;
}

.article-sidebar-sticky {
  position: sticky;
  top: var(--peiran-review-sidebar-sticky-top, 126px);
  max-height: calc(100vh - var(--peiran-review-sidebar-sticky-top, 126px));
  overflow: visible;
}

.article-sidebar-sticky-spaced {
  padding-top: 10px;
}

.article-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-bottom: 0;
  overflow: hidden;
}

.article-tabs button {
  min-height: 46px;
  position: relative;
  border: 0;
  border-right: 1px solid var(--line);
  background: #eeeeee;
  color: var(--blue);
  font-family: var(--font-sans);
  font-size: var(--peiran-article-sidebar-tab-font-size, 0.86rem);
  cursor: pointer;
}

.article-tabs button.is-active {
  z-index: 1;
  background: white;
  color: var(--text);
  font-weight: 700;
}

.article-tabs button.is-active::before,
.article-tabs button.is-active::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: white;
}

.article-tabs button.is-active::before {
  left: -1px;
}

.article-tabs button.is-active::after {
  right: -1px;
}

.article-tabs button.is-active:first-child::before {
  display: none;
}

.article-tabs button:last-child {
  border-right: 0;
}

.article-tabs-two-up {
  grid-template-columns: repeat(2, 1fr);
}

.section-nav {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.section-nav-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-nav-list li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-nav-list .section-nav-list {
  margin: 0;
  padding: 0;
}

.section-nav a,
.section-nav div {
  position: relative;
  display: block;
  max-width: 100%;
  min-height: 24px;
  padding: 2px 0;
  overflow: hidden;
  color: var(--blue);
  font-family: var(--font-sans);
  font-size: var(--peiran-article-sidebar-tab-font-size, 0.86rem);
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

.section-nav a::before,
.section-nav div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: transparent;
}

.section-nav a.is-active {
  color: var(--text);
}

.section-nav a.is-active::before {
  background: #d6d6d6;
}

.article-tab-panel {
  max-height: calc(100vh - 245px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-bottom: 0;
  background: white;
}

.article-tab-panel[data-article-panel="sections"],
.article-tab-panel[data-article-panel="references"] {
  padding: 18px 20px 20px;
}

.article-tab-panel[data-article-panel="sections"] {
  max-height: var(--peiran-article-sidebar-panel-max-height, 254px);
  overflow-y: scroll;
  border-bottom: 0 !important;
  scrollbar-color: #bdbdbd #f3f3f3;
  scrollbar-width: thin;
}

.article-detail-page .article-tabs button {
  min-height: var(--peiran-article-sidebar-tab-height, 42px);
  font-size: var(--peiran-article-sidebar-tab-font-size, 0.86rem);
  line-height: 1.1;
}

.article-detail-page .section-nav {
  gap: 9px;
}

.article-detail-page .section-nav a {
  min-height: 24px;
  padding-left: 16px;
  padding-top: 1px;
  padding-bottom: 1px;
}

.article-detail-page .section-nav a::before {
  top: 50%;
  bottom: auto;
  height: 40px;
  transform: translateY(-50%);
}

.article-detail-page .article-tab-panel[data-article-panel="sections"],
.article-detail-page .article-tab-panel[data-article-panel="references"] {
  padding: 16px 16px 20px;
  border-left: 0;
}

.article-detail-page .article-tab-panel[data-article-panel="sections"] {
  max-height: var(--peiran-article-sidebar-panel-max-height, clamp(220px, calc(100vh - 430px), 360px));
  min-height: 220px;
  overflow-y: scroll;
  padding-bottom: 22px;
}

.article-detail-page .article-tabs {
  position: relative;
}

.article-detail-page .article-tab-panel[data-code-panel="summary"] {
  max-height: clamp(220px, calc(100vh - 430px), 360px);
  min-height: 220px;
  padding: 16px 20px 20px;
  border-bottom: 0 !important;
  scrollbar-color: #bdbdbd #f3f3f3;
  scrollbar-width: thin;
}

.article-detail-page .article-tab-panel[data-code-panel="files"] {
  border-bottom: 0 !important;
}

.article-detail-page .article-tab-panel[data-code-panel="summary"]::-webkit-scrollbar {
  width: 12px;
}

.article-detail-page .article-tab-panel[data-code-panel="summary"]::-webkit-scrollbar-track {
  background: #f3f3f3;
  border-left: 1px solid #e1e1e1;
}

.article-detail-page .article-tab-panel[data-code-panel="summary"]::-webkit-scrollbar-thumb {
  border: 3px solid #f3f3f3;
  border-radius: 999px;
  background: #bdbdbd;
}

.article-sidebar > .subjects-panel {
  display: block;
  margin-top: 22px;
  padding-top: 6px;
  border-top: 0;
  clear: both;
}

.article-sidebar > .subjects-panel[hidden] {
  display: none !important;
}

.article-sidebar > .subjects-panel div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.article-sidebar > .subjects-panel a {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  text-align: center;
}

.article-sidebar > .subjects-panel:last-child {
  margin-bottom: 8px;
}

.article-tab-panel[data-article-panel="sections"]::-webkit-scrollbar {
  width: 12px;
}

.article-tab-panel[data-article-panel="sections"]::-webkit-scrollbar-track {
  background: #f3f3f3;
  border-left: 1px solid #e1e1e1;
}

.article-tab-panel[data-article-panel="sections"]::-webkit-scrollbar-thumb {
  border: 3px solid #f3f3f3;
  border-radius: 999px;
  background: #bdbdbd;
}

.sidebar-figure-list {
  display: grid;
}

.sidebar-figure-card {
  padding: 24px 20px 26px;
  border-bottom: 1px solid var(--line);
}

.sidebar-figure-card:last-child {
  border-bottom: 0;
}

.sidebar-figure-card h3 {
  margin: 0 0 18px;
  color: var(--text);
  font-family: var(--nature-sans);
  font-size: clamp(0.94rem, 1vw, 1.06rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}

.sidebar-figure-card img {
  width: 100%;
  max-height: 430px;
  display: block;
  object-fit: contain;
  background: white;
}

.sidebar-figure-actions {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 22px;
}

.sidebar-figure-actions a {
  color: var(--blue);
  font-family: var(--nature-sans);
  font-size: 0.86rem;
  line-height: 1.25;
  text-decoration: underline;
}

.sidebar-empty-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.article-reference-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding-left: 22px;
  color: var(--text);
  font-family: var(--nature-sans);
  font-size: 0.86rem;
  line-height: 1.45;
}

.article-reference-list li {
  padding-left: 4px;
}

.article-reference-list a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.similar-content {
  margin-top: 120px;
  padding: 24px;
  background: #f2f2f2;
}

.review-content-spacer { height: 0; }

.similar-content h2 {
  margin-bottom: 18px;
  font-family: var(--nature-sans);
  font-size: 1rem;
  letter-spacing: 0;
}

.similar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.similar-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: white;
}

.similar-grid h3 {
  font-size: 0.9rem;
}

.article-about {
  max-width: 100%;
  width: 100%;
  margin: 56px 0 0;
  padding-top: 8px;
  border-top: 4px solid #d0d0d0;
}

.article-about > h2 {
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--nature-serif);
  font-size: clamp(1.12rem, 1.28vw, 1.32rem);
  font-weight: 800;
  line-height: 1.14;
}

.article-about-card {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
}

.article-update-note {
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 0 24px 0 0;
  border-right: 1px solid var(--line);
  text-align: center;
}

.article-update-button {
  display: inline-grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.article-update-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.article-update-image {
  width: 92px;
  height: auto;
  display: block;
}

.article-update-status {
  max-width: 120px;
  margin: 10px 0 0;
  color: var(--muted, #536275);
  font-size: 0.76rem;
  line-height: 1.35;
}

.article-about-content {
  min-width: 0;
}

.article-cite-block h3,
.article-share-block h3,
.article-about-subjects h3 {
  margin: 0 0 14px;
  font-family: var(--nature-sans);
  font-size: clamp(1rem, 1.08vw, 1.16rem);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: 0;
  text-decoration: none;
}

.article-cite-block p {
  max-width: 760px;
  margin: 0 0 18px;
  font-family: var(--nature-sans);
  font-size: 0.9rem;
  line-height: 1.55;
}

.download-citation-link {
  position: relative;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 30px;
  color: var(--blue);
  font-family: var(--nature-sans);
  font-size: 0.92rem;
  line-height: 1.15;
}

.download-citation-link::after {
  content: "";
  width: 21px;
  height: 25px;
  display: inline-block;
  background:
    linear-gradient(var(--blue), var(--blue)) 50% 0 / 4px 17px no-repeat,
    linear-gradient(45deg, transparent 45%, var(--blue) 46% 58%, transparent 59%) 2px 11px / 11px 11px no-repeat,
    linear-gradient(135deg, transparent 45%, var(--blue) 46% 58%, transparent 59%) 8px 11px / 11px 11px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 50% 100% / 21px 4px no-repeat;
  text-decoration: none;
}

.article-about-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 42px;
  margin: 0 0 40px;
}

.article-about-dates div {
  min-width: 0;
}

.article-about-dates .is-doi {
  grid-column: 1 / -1;
}

.article-about-dates dt {
  margin: 0 0 9px;
  color: var(--text);
  font-family: var(--nature-sans);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.2;
}

.article-about-dates dd {
  margin: 0;
  color: var(--text);
  font-family: var(--nature-sans);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.article-about-dates a {
  color: var(--text);
  text-decoration: none;
}

.article-about-dates a:hover,
.article-about-dates a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
}

.article-share-block {
  margin-bottom: 40px;
}

.article-share-block p {
  max-width: 820px;
  margin: 0 0 18px;
  font-family: var(--nature-sans);
  font-size: 0.9rem;
  line-height: 1.5;
}

.share-link-button {
  min-height: 44px;
  padding: 0 20px;
  border: 2px solid var(--blue);
  background: #ffffff;
  color: var(--blue);
  font-family: var(--nature-sans);
  font-size: 0.92rem;
  cursor: pointer;
}

.share-link-button:hover,
.share-link-button:focus-visible {
  background: #eef7fb;
}

.share-link-status {
  min-height: 1.4em;
  margin-top: 12px !important;
  color: var(--muted);
  font-size: 0.92rem !important;
}

.article-about-subjects {
  padding: 0;
  border: 0;
}

.article-about-subjects div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-about-subjects a {
  padding: 9px 14px;
  border-radius: 4px;
  background: #eef5f8;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.article-meta p {
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 700;
}

.article-meta {
  align-self: start;
}

.article-meta .access {
  color: var(--accent);
  font-weight: 400;
}

.article-copy h3 {
  font-family: var(--nature-serif);
  font-size: clamp(1.08rem, 1.45vw, 1.36rem);
  font-weight: 900;
  line-height: 1.08;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.article-copy p {
  max-width: 820px;
}

.authors {
  margin-top: 12px;
  color: var(--text);
}

.journal-name {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 700;
}

.article-image {
  align-self: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
}

.article-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.collection-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.collection-card .entry-image {
  margin-bottom: 14px;
  aspect-ratio: 16 / 10;
  background: transparent;
  border: 0;
}

.collection-card .entry-copy {
  padding: 0 0 20px;
}

.collection-card .entry-image img {
  object-fit: contain;
}

.entry-image {
  display: block;
  aspect-ratio: 16 / 9;
  margin-bottom: 11px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
}

.entry-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.entry-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.pub-tag {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.news-card p,
.article-copy p,
.review-card p,
.collection-card p {
  color: var(--muted);
  line-height: 1.5;
}

.entry-meta {
  margin-top: 8px;
  padding-top: 7px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.review-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: calc(10px + var(--review-meta-offset, 0px));
  gap: 5px;
}

.review-card-subjects {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.38;
}

.review-card-year {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  display: block;
}

.nature-home-reviews.section {
  padding-top: 12px;
}

.nature-home-reviews {
  max-width: var(--max);
  margin: 0 auto;
}

.nature-home-header {
  padding: 6px 0 10px;
  border-top: 6px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.nature-home-header h2 {
  margin: 0;
}

.nature-home-header .section-title-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.nature-home-feature {
  padding: var(--peiran-home-feature-padding-top, 10px) 0 0;
}

.nature-home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.28fr);
  gap: var(--peiran-home-layout-gap, 18px);
  align-items: start;
}

.nature-home-main {
  min-width: 0;
  display: grid;
  gap: var(--peiran-home-main-gap, 24px);
}

.nature-home-lead {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
  gap: var(--peiran-home-lead-gap, 18px);
  align-items: start;
}

.nature-home-feature,
.nature-home-card,
.nature-home-rail-item {
  min-width: 0;
}

.nature-home-lead-copy,
.nature-home-card-copy {
  min-width: 0;
}

.nature-home-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nature-home-lead-copy h3,
.nature-home-rail-item h4,
.nature-home-card h4 {
  margin: 0;
  color: var(--text);
  font-family: var(--nature-serif);
  font-weight: 800;
  line-height: 1.04;
}

.nature-home-lead-copy h3 {
  font-size: clamp(1.35rem, 1.85vw, 2.05rem);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.nature-home-rail-item h4,
.nature-home-card h4 {
  font-size: clamp(0.96rem, 1.12vw, 1.22rem);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.nature-home-summary,
.nature-home-rail-summary,
.nature-home-card-summary {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.52;
}

.nature-home-summary {
  max-width: 44ch;
}

.nature-home-rail-summary {
  max-width: 32ch;
  font-size: 0.86rem;
}

.nature-home-card-summary {
  max-width: 38ch;
  font-size: 0.84rem;
}

.nature-review-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.25;
}

.nature-review-subjects {
  font-weight: 800;
}

.nature-review-year {
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.nature-review-figure {
  margin: 0;
}

.nature-review-figure a {
  display: block;
}

.nature-review-figure img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  background: #f7f7f2;
  object-fit: contain;
}

.nature-home-lead .nature-review-figure img {
  aspect-ratio: 1.95 / 1;
}

.nature-home-rail {
  display: flex;
  flex-direction: column;
  gap: var(--peiran-home-rail-gap, 0);
}

.nature-home-rail-item {
  padding: 0 0 var(--peiran-home-rail-gap, 18px);
  border-bottom: 1px solid var(--line);
}

.nature-home-rail-item + .nature-home-rail-item {
  padding-top: var(--peiran-home-rail-gap, 18px);
}

.nature-home-rail-item h4 {
  margin-top: 2px;
}

.nature-home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--peiran-home-grid-gap-y, 12px) var(--peiran-home-grid-gap-x, 14px);
  padding-top: var(--peiran-home-grid-padding-top, 10px);
  border-top: 1px solid var(--line);
}

.nature-home-grid:empty {
  display: none;
}

.nature-home-card {
  display: flex;
  flex-direction: column;
}

.nature-home-card .nature-review-figure {
  margin-bottom: 10px;
}

.nature-home-card .nature-review-figure img {
  aspect-ratio: 16 / 9;
}

.nature-home-divider {
  display: none;
}

body.home-page {
  --home-section-title: var(--peiran-home-section-title, clamp(1.12rem, 1.55vw, 1.42rem));
  --home-lead-title: var(--peiran-home-lead-title, clamp(1.28rem, 1.82vw, 1.78rem));
  --home-feature-title: var(--peiran-home-feature-title, clamp(1.08rem, 1.32vw, 1.34rem));
  --home-card-title: var(--peiran-home-card-title, clamp(1.02rem, 1.12vw, 1.18rem));
  --home-small-title: var(--peiran-home-small-title, clamp(0.96rem, 1.04vw, 1.08rem));
  --home-body: var(--peiran-home-body, clamp(0.92rem, 0.98vw, 0.98rem));
  --home-meta: var(--peiran-home-meta, clamp(0.82rem, 0.88vw, 0.88rem));
  --home-kicker: var(--peiran-home-kicker, clamp(0.82rem, 0.88vw, 0.9rem));
  --peiran-home-feature-padding-top: 10px;
  --peiran-home-layout-gap: 18px;
  --peiran-home-main-gap: 24px;
  --peiran-home-lead-gap: 18px;
  --peiran-home-grid-gap-y: 12px;
  --peiran-home-grid-gap-x: 14px;
  --peiran-home-grid-padding-top: 10px;
  --peiran-home-rail-gap: 14px;
}

body.home-page .section-heading h2,
body.home-page .split-section h2 {
  font-size: var(--home-section-title);
  line-height: 1.06;
}

body.home-page .eyebrow,
body.home-page .nature-home-kicker,
body.home-page .pub-tag,
body.home-page .article-meta p,
body.home-page .issue-thread-label,
body.home-page .input-files-metric span,
body.home-page .featured-strip-meta,
body.home-page .funding-meta-list dt,
body.home-page .funding-sidebar-list dt {
  font-size: var(--home-kicker);
}

body.home-page .featured-news h3,
body.home-page .nature-home-lead-copy h3 {
  font-size: var(--home-lead-title);
  line-height: 1.03;
}

body.home-page .news-card h3,
body.home-page .article-card h3,
body.home-page .code-banner-copy h3,
body.home-page .issue-card h3,
body.home-page .issue-board-teaser h3,
body.home-page .knowledge-teaser-copy h3,
body.home-page .funding-card h3,
body.home-page .funding-index-row h2,
body.home-page .institution-copy strong,
body.home-page .input-files-copy strong {
  font-size: var(--home-feature-title);
  line-height: 1.06;
}

body.home-page .news-card:not(.featured-news) h3,
body.home-page .featured-strip-card h3,
body.home-page .code-banner-card h3,
body.home-page .nature-home-card h4,
body.home-page .nature-home-rail-item h4 {
  font-size: var(--home-card-title);
  line-height: 1.08;
}

body.home-page .news-card p,
body.home-page .article-card p,
body.home-page .nature-home-summary,
body.home-page .nature-home-rail-summary,
body.home-page .nature-home-card-summary,
body.home-page .code-banner-copy p,
body.home-page .code-banner-card p,
body.home-page .issue-card p,
body.home-page .issue-board-teaser p:last-child,
body.home-page .featured-strip-card p,
body.home-page .knowledge-teaser-copy p,
body.home-page .funding-card p,
body.home-page .funding-index-row p,
body.home-page .institution-copy span,
body.home-page .institution-copy em,
body.home-page .glass-panel,
body.home-page .profile-email,
body.home-page .input-files-copy span {
  font-size: var(--home-body);
  line-height: 1.5;
}

body.home-page .news-card .entry-meta,
body.home-page .news-card .news-author,
body.home-page .entry-meta,
body.home-page .article-meta,
body.home-page .article-meta p,
body.home-page .article-copy .authors,
body.home-page .journal-name,
body.home-page .nature-review-meta,
body.home-page .code-banner-card .entry-meta,
body.home-page .code-banner-copy .entry-meta,
body.home-page .issue-card-meta,
body.home-page .issue-form-status,
body.home-page .knowledge-teaser-copy .entry-meta,
body.home-page .funding-meta-list dd,
body.home-page .funding-sidebar-list dd,
body.home-page .funding-card .entry-meta,
body.home-page .muted {
  font-size: var(--home-meta);
  line-height: 1.35;
}

@media (max-width: 1120px) {
  .nature-home-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .nature-home-lead {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1.15fr);
  }

  .nature-home-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--peiran-home-rail-gap, 18px);
  }

  .nature-home-rail-item {
    padding-top: 0;
  }

  .nature-home-rail-item + .nature-home-rail-item {
    padding-top: 0;
  }

  .nature-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nature-home-grid,
  .nature-home-rail {
    grid-template-columns: 1fr;
  }

  .nature-home-lead {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }

  .nature-home-rail {
    display: grid;
  }

  .nature-home-rail-item + .nature-home-rail-item {
    padding-top: 18px;
  }

  .nature-review-meta {
    flex-wrap: wrap;
  }

  .nature-home-summary,
  .nature-home-rail-summary,
  .nature-home-card-summary {
    max-width: none;
  }

}

.download,
.collection-card a {
  align-self: flex-start;
  color: var(--blue);
  font-weight: 700;
}

.profile-email {
  margin: 0 0 16px;
  color: var(--text);
}

.profile-email a {
  color: var(--blue);
  font-weight: 700;
}

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--peiran-footer-padding, 22px 20px 34px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  max-width: none;
  margin-top: 28px;
  padding: 0;
  border-top: 0;
  background: var(--peiran-footer-bg, #073d52);
  color: white;
}

.footer-directory {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 20px 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--peiran-footer-directory-gap, 34px);
}

.footer-directory h2,
.footer-newsletter h2 {
  margin-bottom: 14px;
  font-family: var(--nature-sans);
  font-size: 1.16rem;
  letter-spacing: 0;
}

.footer-directory a {
  display: block;
  margin-bottom: 10px;
  color: white;
  font-size: var(--peiran-footer-directory-link-size, 1.04rem);
  line-height: 1.35;
}

.footer-newsletter {
  background: var(--peiran-footer-newsletter-bg, #29303b);
}

.footer-newsletter > div,
.footer-newsletter {
  min-width: 0;
}

.footer-newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 22px max(20px, calc((100vw - var(--max)) / 2 + 20px));
}

.footer-newsletter p {
  max-width: 560px;
  margin-bottom: 0;
  color: white;
  font-size: var(--peiran-footer-newsletter-text-size, 1.04rem);
  line-height: 1.45;
}

.footer-login {
  display: inline-flex;
  min-height: 38px;
  padding: 0 18px;
  align-items: center;
  border: 1px solid white;
  color: white;
  font-size: var(--peiran-footer-newsletter-text-size, 1.04rem);
  font-weight: 700;
  text-decoration: none;
}

.footer-legal {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 20px 22px;
  display: flex;
  gap: 18px;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: thin;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  font-size: var(--peiran-footer-legal-text-size, 1.02rem);
}

.footer-legal p {
  margin: 0 auto 0 0;
  min-width: max-content;
  color: white;
}

.footer-legal a {
  color: white;
  flex: 0 0 auto;
}

.footer-beian-link {
  white-space: nowrap;
}

.footer-police-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.footer-police-icon {
  width: 18px;
  height: 20px;
  object-fit: contain;
}

.downloads-intro {
  max-width: 780px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.login-panel,
.download-panel {
  margin-top: 24px;
  padding: 22px;
  border-top: 4px solid var(--rule);
  background: #eeeeee;
}

.login-panel h2,
.download-panel h2 {
  margin-bottom: 16px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.login-panel form {
  display: grid;
  grid-template-columns: minmax(240px, 420px) auto;
  gap: 12px;
  align-items: end;
}

.login-panel form button[type="submit"] { width: 100%; min-height: 40px; }

.login-panel label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.login-panel input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--text);
  background: white;
  color: var(--text);
  font: inherit;
}

.login-panel button,
.download-panel button {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--text);
  background: white;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.form-message {
  margin: 12px 0 0;
  color: var(--accent);
  font-weight: 700;
}

.download-panel-heading {
  display: flex;
  gap: 18px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.download-list {
  display: grid;
  gap: 14px;
}

.download-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.download-row h3 {
  margin-bottom: 8px;
}

.download-file-list {
  max-width: 920px;
  border-top: 1px solid var(--line);
}

.download-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.download-file-row h3 {
  margin-bottom: 8px;
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-card {
    height: 340px;
    min-height: 340px;
  }

  .code-banner-feature {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  }

  .code-banner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .issue-grid {
    grid-template-columns: 1fr;
  }

  .issue-board-layout {
    grid-template-columns: 1fr;
  }

  .issue-form {
    position: static;
  }

  .featured-strip {
    grid-template-columns: 1fr;
  }

  .featured-strip-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-issue {
    max-width: 320px;
  }

  .code-index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-layout,
  .reviews-layout {
    grid-template-columns: 1fr;
  }

  .footer-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-card,
  .article-index-row {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 24px;
  }

  .featured-news {
    grid-row: auto;
  }

  .review-card:first-child {
    grid-row: auto;
  }

  .article-detail-grid,
  .nature-article-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .review-detail-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .review-sidebar {
    position: static;
  }

  .profile-masthead,
  .profile-detail-grid {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  :root {
    --anchor-offset: var(--peiran-anchor-offset-mobile, 114px);
    --page-gutter: var(--peiran-page-gutter-mobile, 20px);
  }

  body {
    font-size: var(--font-size-mobile);
  }

  .site-header {
    position: relative;
    border-bottom: 0;
  }

  .masthead {
    height: var(--peiran-masthead-mobile-height, 58px);
    padding: 0;
    align-items: stretch;
  }

  .masthead::after {
    left: 0;
    width: 100%;
    transform: none;
    background: var(--line);
  }

  .journal-logo {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 0 14px 0 10px;
    overflow: hidden;
    font-size: var(--peiran-journal-logo-mobile-size, clamp(2rem, 9.4vw, 2.55rem));
    letter-spacing: -0.045em;
  }

  .masthead-links {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
    font-size: var(--peiran-masthead-mobile-links-font-size, 1rem);
    font-weight: var(--peiran-masthead-mobile-links-font-weight, 400);
    line-height: 1.15;
  }

  .masthead-links a {
    min-height: var(--peiran-masthead-mobile-height, 58px);
    min-width: var(--peiran-masthead-mobile-link-min-width, 52px);
    justify-content: center;
    padding: 0 var(--peiran-masthead-mobile-link-padding-x, 10px);
    border-left: 1px solid var(--line);
    align-items: center;
    white-space: nowrap;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
  }

  .masthead-links .journals-link { display: none; }
  .masthead-links a[href*="search.html"] { font-size: 0; min-width: 48px; }
  .masthead-links a[href*="search.html"]::before { content: ""; }

  .masthead-links .auth-only,
  .masthead-links .logout-link {
    display: none !important;
  }

  .masthead-links .super-admin-badge {
    display: flex;
    min-width: var(--peiran-masthead-mobile-secondary-min-width, 92px);
    padding: 0 var(--peiran-masthead-mobile-link-padding-x, 10px);
    color: #9b6f00;
    font-size: var(--peiran-masthead-mobile-secondary-font-size, 0.72rem);
    font-weight: var(--peiran-masthead-mobile-secondary-weight, 900);
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .nav {
    display: block;
    min-height: auto;
    padding: 0;
    border-bottom: 4px solid var(--rule);
    overflow-x: auto;
    overflow-y: visible;
  }

  .site-header.is-glass .nav {
    border-bottom: 1px solid rgba(30, 41, 59, 0.14);
    box-shadow: none;
    background: transparent;
  }

  .nav::after {
    display: none;
  }

  .nav-links {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0 22px;
    gap: var(--peiran-masthead-mobile-nav-gap, 22px);
    font-size: var(--peiran-masthead-mobile-nav-font-size, 0.98rem);
    font-weight: var(--peiran-masthead-mobile-nav-font-weight, 700);
    line-height: 1.15;
  }

  .nav-links a {
    min-height: 42px;
    margin-right: 0;
    padding: 0;
    font-weight: var(--peiran-masthead-mobile-nav-font-weight, 700);
    white-space: nowrap;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
  }

  .nav-secondary {
    display: none;
  }

  .nav-menu-item {
    position: static;
    margin-right: 0;
    padding-right: 0;
    border-right: 0;
  }

  .nav-menu-item::after {
    display: none;
  }

  .nav-menu-trigger {
    min-height: 42px;
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 0;
  }

  .nav-menu-trigger[aria-expanded="true"] {
    background: transparent;
    color: var(--text);
    box-shadow: none;
    transform: none;
  }

  .nav-menu-trigger::before {
    content: "Content";
    font-size: 0.98rem;
  }

  .nav-menu-trigger::after {
    margin-left: 7px;
    border-left-width: 4px;
    border-right-width: 4px;
    border-top-width: 5px;
  }

  .nav > .nav-links > a[href*="about"] {
    font-size: 0;
  }

  .nav > .nav-links > a[href*="about"]::before {
    content: "About";
    font-size: 0.98rem;
  }

  .nav-dropdown {
    position: fixed;
    left: 0;
    right: 0;
    top: 100px;
    z-index: 40;
    width: 100%;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }

  .nav-dropdown-inner {
    padding: 18px 28px 22px;
    border-top: 1px solid var(--line);
    background: #ffffff;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.14);
  }

  .site-header.is-glass .nav-dropdown-inner {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(30, 41, 59, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.52);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 248, 252, 0.82)),
      rgba(255, 255, 255, 0.84);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
  }

  .site-header.is-glass .nav-dropdown-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.7), transparent 32%),
      linear-gradient(130deg, transparent 20%, rgba(255, 255, 255, 0.3) 46%, transparent 70%);
    background-size: 100% 100%, 220% 220%;
    background-position: center, 0% 50%;
    pointer-events: none;
    mix-blend-mode: screen;
    animation: nav-glass-drift 14s linear infinite;
  }

  .site-header.is-glass .nav-dropdown-links {
    position: relative;
    z-index: 1;
  }

  .nav-dropdown-links {
    gap: 14px;
  }

  .nav-dropdown-links a {
    min-height: 0;
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: normal;
  }

  .nav-dropdown-contact {
    color: var(--muted) !important;
  }

  .site-header.mobile-nav-ready .masthead-links a:not([href*="search.html"]) {
    display: none !important;
  }

  .site-header.mobile-nav-ready .nav {
    display: none;
  }

  .mobile-nav-toggle {
    appearance: none;
    min-width: 74px;
    min-height: var(--peiran-masthead-mobile-height, 58px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 0;
    border-left: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-nav-toggle-icon,
  .mobile-nav-toggle-icon::before,
  .mobile-nav-toggle-icon::after {
    width: 17px;
    height: 2px;
    display: block;
    background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .mobile-nav-toggle-icon {
    position: relative;
  }

  .mobile-nav-toggle-icon::before,
  .mobile-nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .mobile-nav-toggle-icon::before { top: -6px; }
  .mobile-nav-toggle-icon::after { top: 6px; }
  .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon { background: transparent; }
  .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
  .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }

  .mobile-nav-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 60;
    max-height: calc(100vh - var(--peiran-masthead-mobile-height, 58px));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--line);
    border-bottom: 4px solid var(--rule);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
  }

  .mobile-nav-panel:not([hidden]) {
    display: block;
  }

  .mobile-nav-panel-inner {
    padding: 8px 20px 24px;
  }

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

  .mobile-nav-section:last-child {
    border-bottom: 0;
  }

  .mobile-nav-section > p {
    margin: 0 0 11px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }

  .mobile-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
  }

  .mobile-nav-grid a {
    min-height: 44px;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  .mobile-nav-grid a[hidden] {
    display: none;
  }

  .scene-zoom-controls button,
  .knowledge-control,
  #issueForm button[type="submit"],
  .knowledge-preview-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .section {
    padding: 20px 20px 54px;
  }

  #news,
  #articles,
  #figures,
  #codes,
  #issues,
  #input-files,
  #funding,
  #institutions {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .hero-content {
    padding: 42px 24px 28px;
  }

  h1 {
    font-size: clamp(1.85rem, 8.5vw, 2.35rem);
  }

  h2 {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .hero-card {
    height: 260px;
    min-height: 260px;
  }

  #news .visit-stats {
    width: auto;
    margin: 0 0 18px;
    padding: 10px 12px;
    display: grid;
    justify-content: stretch;
    gap: 8px;
    font-size: 0.9rem;
  }

  #news .visit-stats .current-time-stat {
    margin-right: 0;
  }

  #news .visit-stats span + span {
    padding-left: 0;
    padding-top: 8px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .news-layout {
    display: block;
    padding-bottom: 24px;
  }

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

  .news-card.featured-news {
    display: block;
    margin: 0 -20px;
    border-bottom: 0;
    background: var(--dark);
  }

  .featured-news .entry-image {
    width: 100%;
    aspect-ratio: 1.18 / 1;
  }

  .featured-news .entry-copy {
    min-height: 0;
    padding: 22px 28px 26px;
  }

  .featured-news h3 {
    margin-bottom: 14px;
    font-size: clamp(1rem, 4.2vw, 1.12rem);
    line-height: 1.05;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
  }

  .featured-news .entry-copy > p {
    font-size: 0.95rem;
    line-height: 1.42;
  }

  .featured-news .news-meta-block {
    position: static;
    margin-top: 18px;
  }

  .news-card:not(.featured-news) {
    padding: 22px 0;
  }

  .news-card:not(.featured-news) .news-card-link {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32%;
    gap: 16px;
    align-items: start;
  }

  .news-card:not(.featured-news) .entry-image {
    order: 2;
    aspect-ratio: 1.6 / 1;
    margin-bottom: 0;
  }

  .news-card:not(.featured-news) .entry-copy {
    min-width: 0;
    order: 1;
  }

  .news-card:not(.featured-news) h3 {
    margin-bottom: 12px;
    font-size: clamp(1.1rem, 5vw, 1.3rem);
    line-height: 1.12;
    text-decoration-thickness: 1.5px;
  }

  .news-card:not(.featured-news) .news-author {
    margin-bottom: 7px;
    font-size: 0.92rem;
    line-height: 1.25;
  }

.news-card:not(.featured-news) .entry-meta {
  color: var(--text);
  font-size: var(--peiran-news-meta-size, 0.88rem);
  font-weight: 400;
  line-height: 1.25;
}

  .institutions-section {
    padding-top: 24px;
  }

  .institution-row {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 18px;
    align-items: start;
    padding: 22px 0;
  }

  .institution-copy {
    gap: 9px;
  }

  .institution-copy strong {
    font-size: clamp(1.45rem, 7vw, 2rem);
    line-height: 1.08;
  }

  .institution-copy span,
  .institution-copy em {
    font-size: 1rem;
    line-height: 1.42;
  }

  .institution-logo {
    width: 96px;
    min-height: 72px;
    justify-content: flex-end;
  }

  .institution-logo.is-dark {
    min-height: 58px;
    padding: 10px;
  }

  .institution-logo img {
    max-width: 100%;
    max-height: 42px;
  }

  .institution-logo.logo-njust img {
    max-height: 26px;
  }

  .institution-logo.logo-nudt img {
    max-height: 32px;
  }

  .institution-logo.logo-zju img {
    max-height: 30px;
  }

  .institution-logo.logo-xtu img {
    max-height: 34px;
  }

  .split-section,
  .news-layout,
  .article-list,
  .featured-strip,
  .featured-strip-list,
  .reviews-layout,
  .code-grid,
  .issue-grid,
  .issue-board-teaser,
  .issue-board-layout,
  .code-banner-feature,
  .code-banner-grid,
  .code-index-list,
  .profile-highlight-list {
    grid-template-columns: 1fr;
  }

  .article-card {
    grid-template-columns: 1fr;
  }

  .article-index-row {
    grid-template-columns: 1fr;
  }

  .issue-index-row {
    display: block;
  }

  .issue-card {
    grid-template-columns: 1fr;
  }

  .issue-card-meta,
  .issue-answer-meta {
    justify-content: start;
    text-align: left;
  }

  .curve-settings-grid {
    grid-template-columns: 1fr;
  }

  .news-editor-grid,
  .news-section-image-row {
    grid-template-columns: 1fr;
  }

  .news-image-upload {
    grid-template-columns: 1fr;
  }

  .news-image-upload img {
    grid-column: 1;
    width: 100%;
  }

  .news-editor-section-heading,
  .news-editor-section-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-dashboard {
    grid-template-columns: 1fr;
  }

  .visitor-account-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-row {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .order-row-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .article-facts {
    grid-template-columns: 1fr;
  }

  .article-detail-page .nature-article-layout {
    display: block;
    height: auto;
  }

  .article-detail-page .article-detail {
    height: auto;
    overflow: visible;
  }

  .article-detail-page .article-main {
    width: 100%;
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .article-detail-page .nature-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    width: min(86vw, 360px);
    padding: 72px 14px 24px;
    overflow-y: auto;
    background: #ffffff;
    box-shadow: -14px 0 34px rgba(0, 0, 0, 0.22);
    transform: translateX(105%);
    transition: transform 180ms ease;
  }

  .is-article-sidebar-open .article-detail-page .nature-sidebar {
    transform: translateX(0);
  }

  .review-detail-page .nature-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    width: min(86vw, 360px);
    padding: 72px 14px 24px;
    overflow-y: auto;
    background: #ffffff;
    box-shadow: -14px 0 34px rgba(0, 0, 0, 0.22);
    transform: translateX(105%);
    transition: transform 180ms ease;
  }

  .is-review-sidebar-open .review-detail-page .nature-sidebar {
    transform: translateX(0);
  }

  .article-sidebar-toggle {
    position: fixed;
    right: 0;
    top: 52%;
    z-index: 70;
    display: inline-flex;
    min-height: 44px;
    padding: 10px 12px;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--blue);
    color: #ffffff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    writing-mode: vertical-rl;
    cursor: pointer;
  }

  .review-sidebar-toggle {
    right: 0;
    top: 52%;
    z-index: 70;
  }

  .article-sidebar-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    min-height: 38px;
    padding: 0 12px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
  }

  .review-detail-page .article-sidebar-close {
    display: inline-flex;
  }

  .article-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 75;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, 0.28);
  }

  .article-sidebar-backdrop[hidden] {
    display: none;
  }

  .review-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 75;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, 0.28);
  }

  .review-sidebar-backdrop[hidden] {
    display: none;
  }

  .is-article-sidebar-open {
    overflow: hidden;
  }

  .is-review-sidebar-open {
    overflow: hidden;
  }

  .article-detail-page .pdf-button {
    margin-bottom: 24px;
  }

  .article-detail-page .article-tab-panel {
    max-height: none;
  }

  .article-detail-page .article-tab-panel[data-article-panel="sections"] {
    max-height: 254px;
  }

  .article-detail-page .article-tab-panel[data-article-panel="sections"],
  .article-detail-page .article-tab-panel[data-article-panel="references"] {
    padding-left: 0;
    padding-right: 12px;
    border-left: 0;
  }

  .article-detail-page .section-nav {
    gap: 7px;
  }

  .article-detail-page .section-nav a {
    padding-left: 0;
  }

  .article-detail-page .section-nav a::before {
    display: none;
  }

  .article-about {
    margin-top: 42px;
  }

  .article-about-card {
    display: block;
  }

  .article-update-note {
    grid-template-columns: 48px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    margin-bottom: 22px;
    padding: 0 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .article-update-image {
    width: 88px;
    height: auto;
  }

  .article-cite-block h3,
  .article-share-block h3,
  .article-about-subjects h3 {
    font-size: 1.08rem;
  }

  .article-cite-block p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .article-about-dates {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .share-link-button {
    width: 100%;
  }

  .article-about-subjects a {
    width: 100%;
    padding: 11px 14px;
  }

  .article-facts div,
  .article-facts div:nth-child(2n),
  .article-facts div:nth-last-child(-n + 2) {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #d6d6d6;
  }

  .article-facts div:last-child {
    border-bottom: 0;
  }

  .article-image {
    order: -1;
  }

  .article-filters {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .similar-grid {
    grid-template-columns: 1fr;
  }

  .news-gallery {
    grid-template-columns: 1fr;
  }

  .content-media-item-top,
  .content-media-upload {
    grid-template-columns: 1fr;
  }

  .content-media-upload {
    align-items: stretch;
  }

  .news-award {
    grid-template-columns: 1fr;
  }

  .collection-card .entry-copy {
    padding-bottom: 22px;
  }

  .footer-directory,
  .footer-newsletter,
  .login-panel form,
  .site-search-form div,
  .site-search-result,
  .download-row,
  .download-file-row {
    grid-template-columns: 1fr;
  }

  .funding-card,
  .funding-index-row {
    grid-template-columns: 1fr;
  }

  .input-files-teaser {
    grid-template-columns: 1fr;
  }

  .input-files-metric {
    min-height: 96px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .footer-newsletter {
    padding: 22px 20px;
  }

  .download-panel-heading {
    display: grid;
  }
}

/* Personal literature workspace, using the existing page and button styles. */
.personal-library-page { max-width: var(--max); margin: 0 auto; }
.personal-library-toolbar, .paper-personal-controls { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:14px 0; }
.personal-library-toolbar label { display:grid; gap:6px; }
.personal-library-toolbar input, .personal-library-toolbar select, .personal-library-row-actions select, .paper-personal-controls select { min-height:40px; max-width:100%; padding:8px; border:1px solid var(--line); background:white; color:var(--text); font:inherit; }
.personal-library-toolbar button, .personal-library-row-actions button, .paper-personal-controls button { min-height:40px; padding:8px 14px; border:1px solid var(--line); background:white; color:var(--text); font:inherit; cursor:pointer; }
.personal-library-toolbar button[aria-pressed="true"], .paper-personal-controls button[aria-pressed="true"] { background:var(--rule); color:white; }
.personal-library-toolbar button:disabled, .paper-personal-controls button:disabled { opacity:.55; cursor:wait; }
.personal-library-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:24px; padding:22px 0; border-bottom:1px solid var(--line); }
.personal-library-row h2 { font-size:1.2rem; line-height:1.4; margin:0 0 8px; overflow-wrap:anywhere; }
.personal-library-row-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.paper-personal-controls [role="status"] { font-size:.85rem; flex-basis:100%; }
@media(max-width:760px) { .personal-library-row { grid-template-columns:1fr; gap:12px; } .personal-library-toolbar input { width:100%; } }

.admin-dashboard a.admin-dashboard-card { text-decoration: none; }
.masthead-links .user-account-link { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Detail actions share the existing Edit / Add tool styling. */
.content-personal-actions .personal-tools-host { display: block; }
.content-personal-actions .paper-personal-controls {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px; margin: 0; width: 100%;
}
.content-personal-actions .paper-personal-controls button {
  display: flex; min-height: 38px; align-items: center; justify-content: center;
  padding: 8px 10px; border: 0; background: #eeeeee; color: var(--blue);
  font-size: .86rem; font-weight: 700; text-align: center;
}
.content-personal-actions .paper-personal-controls button[aria-pressed="true"] {
  background: #e1edf2; color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue);
}
.content-personal-actions .paper-personal-controls select,
.content-personal-actions .paper-personal-controls [role="status"] { grid-column: 1 / -1; }
.content-personal-actions [role="status"]:empty { display: none; }
.download-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
.knowledge-modal-actions .content-personal-actions { width: 220px; margin-top: 12px; }
@media (max-width: 900px) {
  .download-detail-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

.detail-tools-stack { position: sticky; top: var(--peiran-review-sidebar-sticky-top, 126px); max-height: calc(100vh - var(--peiran-review-sidebar-sticky-top, 126px) - 12px); overflow-y: auto; }
.detail-tools-stack > .article-sidebar-sticky { position: static; max-height: none; }
.detail-tools-stack > .subjects-panel { margin-top: 22px; padding-top: 6px; border-top: 0; }
.detail-tools-stack > .subjects-panel div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-tools-stack > .subjects-panel a { display: flex; min-height: 38px; align-items: center; justify-content: center; padding: 8px 10px; text-align: center; }
.detail-tools-stack .personal-tools-host { display: block !important; }
