:root {
  --bg: #eef2f4;
  --bg-deep: #e7ecef;
  --surface: #fbfcfd;
  --surface-muted: #f4f7f9;
  --surface-strong: #ffffff;
  --line: #d7dee5;
  --line-strong: #aab5c1;
  --text: #14202b;
  --muted: #5b6978;
  --muted-strong: #3d4c5b;
  --accent: #18354f;
  --accent-strong: #10293f;
  --accent-soft: #e6edf3;
  --accent-soft-2: #f0f4f7;
  --success: #1d664b;
  --shadow: 0 20px 44px rgba(15, 23, 32, 0.06);
  --shadow-soft: 0 10px 24px rgba(15, 23, 32, 0.04);
  --radius: 20px;
  --radius-soft: 16px;
  --content-width: 1480px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(24, 53, 79, 0.06), transparent 26%),
    radial-gradient(circle at 100% 0, rgba(92, 122, 148, 0.08), transparent 24%),
    linear-gradient(180deg, #f5f7f8 0%, var(--bg) 100%);
  color: var(--text);
  letter-spacing: 0.003em;
  text-rendering: optimizeLegibility;
}

body.pet-modal-open {
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button-link {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 0.84rem 1.2rem;
  background: linear-gradient(135deg, var(--accent), #244766);
  color: #fff;
  box-shadow: 0 12px 24px rgba(24, 53, 79, 0.14);
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  opacity: 0.95;
  box-shadow: 0 16px 30px rgba(24, 53, 79, 0.18);
}

.button-link.secondary,
.inline-link {
  background: linear-gradient(135deg, #eef4f8, #dde7ee);
  color: var(--accent);
  box-shadow: none;
  border: 1px solid var(--line);
}

.button-link.secondary:hover,
.inline-link:hover {
  box-shadow: 0 10px 18px rgba(24, 53, 79, 0.1);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(24, 53, 79, 0.45);
  box-shadow: 0 0 0 4px rgba(24, 53, 79, 0.08);
  background: #fff;
}

textarea {
  resize: vertical;
}

.ghost-button {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 249, 0.92));
  color: var(--accent);
  border: 1px solid var(--line);
  box-shadow: none;
}

.full-width {
  width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#app {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 28px 28px 36px;
}

.surface {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 252, 253, 0.92));
  backdrop-filter: blur(4px);
  border: 1px solid rgba(215, 222, 229, 0.88);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  margin-bottom: 28px;
  background: rgba(250, 252, 253, 0.92);
  border: 1px solid rgba(215, 222, 229, 0.92);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 32, 0.07);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(242, 246, 249, 0.96));
  border: 1px solid rgba(184, 196, 207, 0.68);
  box-shadow: 0 8px 18px rgba(18, 57, 94, 0.08);
  overflow: hidden;
}

.brand-mark img {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: cover;
}

.topnav {
  display: grid;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
}

.topnav-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.topnav a {
  flex: 0 0 auto;
  padding: 0.48rem 0.76rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
}

.topnav a:hover {
  background: var(--accent-soft-2);
  color: var(--accent);
}

.topnav a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.nav-lock {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 0.14rem 0.44rem;
  border-radius: 999px;
  background: rgba(24, 53, 79, 0.08);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}

.auth-entry {
  display: flex;
  justify-content: flex-end;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 249, 0.96));
  box-shadow: var(--shadow-soft);
}

.auth-chip--guest strong {
  color: var(--accent);
}

.auth-chip strong,
.auth-chip span {
  display: block;
}

.auth-chip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-modal-panel {
  width: min(640px, 100%);
}

.auth-modal-head h3 {
  margin: 8px 0 6px;
}

.auth-mode-switch,
.auth-method-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-mode-switch .ghost-button.active,
.auth-method-switch .ghost-button.active {
  background: var(--accent-soft);
  border-color: rgba(24, 53, 79, 0.2);
  color: var(--accent);
  font-weight: 700;
}

.auth-panel {
  margin-top: 16px;
}

.auth-form-grid {
  display: grid;
  gap: 12px;
}

.auth-inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.is-locked {
  position: relative;
}

.protected-page-gate {
  position: sticky;
  top: 120px;
  z-index: 8;
  margin-bottom: 18px;
}

.protected-page-gate__panel {
  padding: 26px 28px;
  text-align: center;
}

.protected-page-gate__panel h3 {
  margin: 8px 0 10px;
}

.protected-page-gate__panel p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.pet-chooser-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.pet-chooser-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 33, 0.44);
  backdrop-filter: blur(8px);
}

.pet-chooser-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(84vh, 920px);
  overflow: auto;
  padding: 28px;
  border-radius: 28px;
}

.pet-chooser-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.pet-chooser-head h3 {
  margin: 4px 0 8px;
  font-size: 1.8rem;
}

.pet-chooser-head p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.pet-chooser-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.pet-choice-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 226px;
  padding: 18px 16px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(241, 247, 250, 0.95));
  border: 1px solid rgba(184, 196, 207, 0.72);
  color: var(--text);
  box-shadow: 0 16px 32px rgba(22, 59, 98, 0.08);
}

.pet-choice-card:hover {
  transform: translateY(-4px) scale(1.01);
}

.pet-choice-card.is-active {
  border-color: rgba(36, 86, 139, 0.56);
  box-shadow: 0 18px 36px rgba(22, 59, 98, 0.14);
}

.pet-choice-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 0.28rem 0.66rem;
  border-radius: 999px;
  background: rgba(36, 86, 139, 0.1);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
}

.pet-choice-preview {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  margin-top: 10px;
  border-radius: 28px;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), rgba(230, 238, 245, 0.96));
  overflow: hidden;
}

.pet-choice-preview img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  animation: pet-card-bounce 1.9s ease-in-out infinite;
}

.pet-choice-card strong {
  font-size: 1rem;
}

.pet-choice-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.pet-roaming-layer {
  position: fixed;
  inset: 0;
  z-index: 42;
  pointer-events: none;
}

.pet-roamer {
  position: absolute;
  left: 24px;
  bottom: 20px;
  display: grid;
  justify-items: center;
  gap: 2px;
  background: transparent;
  padding: 0;
  pointer-events: auto;
  transition: left 4.8s ease-in-out, bottom 4.8s ease-in-out, transform 0.35s ease;
}

.pet-roamer:hover {
  transform: scale(1.04);
}

.pet-roamer.is-flipped img {
  transform: scaleX(-1);
}

.pet-roamer img {
  width: 108px;
  height: 108px;
  object-fit: contain;
  transition: transform 0.22s ease;
  animation: pet-roamer-bob 1.7s ease-in-out infinite;
}

.pet-roamer-shadow {
  width: 58px;
  height: 14px;
  border-radius: 999px;
  background: rgba(25, 39, 56, 0.12);
  filter: blur(2px);
  margin-top: -8px;
}

.pet-roamer-name {
  margin-top: -2px;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(184, 196, 207, 0.76);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(22, 59, 98, 0.08);
}

.pet-roamer-bubble {
  max-width: 180px;
  margin-bottom: 6px;
  padding: 0.68rem 0.86rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(184, 196, 207, 0.84);
  color: #24425f;
  font-size: 0.88rem;
  line-height: 1.45;
  box-shadow: 0 14px 28px rgba(18, 57, 94, 0.12);
  text-align: center;
  animation: pet-bubble-pop 0.22s ease;
}

@keyframes pet-card-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pet-roamer-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pet-bubble-pop {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 28px;
  padding: 46px;
  margin-bottom: 28px;
  background:
    radial-gradient(circle at 12% 18%, rgba(65, 101, 129, 0.11), transparent 24%),
    radial-gradient(circle at 86% 20%, rgba(24, 53, 79, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(253, 254, 255, 0.99), rgba(241, 246, 249, 0.96));
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero::before {
  width: 340px;
  height: 340px;
  right: -120px;
  top: -130px;
  background: radial-gradient(circle, rgba(22, 59, 98, 0.12), transparent 68%);
}

.hero::after {
  width: 280px;
  height: 280px;
  left: -120px;
  bottom: -140px;
  background: radial-gradient(circle, rgba(78, 166, 131, 0.12), transparent 68%);
}

.hero-copy,
.hero-aside {
  position: relative;
  z-index: 1;
}

.hero-brand-strip {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px 10px 10px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(236, 243, 248, 0.94));
  border: 1px solid rgba(184, 196, 207, 0.72);
  box-shadow: 0 12px 28px rgba(18, 57, 94, 0.06);
}

.hero-brand-strip img {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  object-fit: cover;
  display: block;
}

.hero-brand-strip strong {
  display: block;
  font-size: 1.28rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.hero-brand-strip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: #36526d;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1.02;
  margin: 0 0 16px;
  max-width: 10ch;
  letter-spacing: -0.03em;
}

.hero-text {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.88;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 30px 0 20px;
}

.hero-search input {
  min-height: 56px;
  border-radius: 18px;
  border-color: rgba(184, 196, 207, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hero-search button {
  min-height: 56px;
  padding-inline: 1.45rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #163b62, #2a5b88);
  box-shadow: 0 14px 28px rgba(22, 59, 98, 0.2);
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(184, 196, 207, 0.65);
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.hero-aside {
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(246, 249, 251, 0.95), rgba(255, 255, 255, 0.84));
  border: 1px solid rgba(184, 196, 207, 0.5);
}

.stat-card,
.feature-card,
.journal-card,
.article-card,
.info-card,
.contact-card,
.metric-card {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.stat-card {
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 248, 250, 0.95));
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: var(--accent);
}

.stat-card span {
  color: var(--muted);
}

.section {
  padding: 30px;
  margin-bottom: 26px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 22px;
}

.section-head.compact {
  margin-bottom: 18px;
}

.section-head h3,
.subsection h4,
.contact-card h4,
.guide-layout h4 {
  margin: 0;
  font-size: 1.24rem;
  letter-spacing: -0.01em;
}

.section-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: min(100%, 520px);
}

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

.feature-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 248, 250, 0.96));
  box-shadow: var(--shadow-soft);
}

.feature-card h4 {
  margin: 0 0 12px;
  font-size: 1.08rem;
}

.feature-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #18354f, #3d627f, #89a6c0);
}

.feature-card .button-link {
  border-radius: 14px;
  padding: 0.72rem 1rem;
}

.feature-card:nth-child(2)::before {
  background: linear-gradient(90deg, #2d6f78, #4ea683, #a7d0b8);
}

.feature-card:nth-child(3)::before {
  background: linear-gradient(90deg, #163b62, #2a5b88, #4d87ad);
}

.page-banner {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: end;
  padding: 32px 34px;
  background:
    radial-gradient(circle at 12% 18%, rgba(65, 101, 129, 0.1), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(242, 246, 248, 0.96));
}

.page-banner::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(22, 59, 98, 0.11), transparent 68%);
  pointer-events: none;
}

.page-banner-contrast {
  background:
    radial-gradient(circle at 78% 22%, rgba(78, 166, 131, 0.14), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 245, 249, 0.95));
}

.page-banner-copy,
.page-banner-meta {
  position: relative;
  z-index: 1;
}

.page-banner-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.page-banner-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.84;
  max-width: 62ch;
}

.page-banner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-self: center;
}

.page-banner-meta .chip {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(184, 196, 207, 0.75);
}

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

.page-grid {
  display: grid;
  gap: 24px;
}

.sidebar {
  position: sticky;
  top: 112px;
  height: fit-content;
  padding: 24px;
}

.filter-group {
  margin-bottom: 14px;
}

.filter-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

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

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

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

.journal-card {
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 251, 0.95));
  box-shadow: var(--shadow-soft);
}

.author-card {
  position: relative;
}

.author-card__header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}

.author-card__header .daily-rank {
  position: static;
}

.author-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.author-metrics div {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f4f7fa;
  border: 1px solid var(--line);
}

.author-metrics strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
  color: var(--text);
}

.author-metrics span {
  color: var(--muted);
  font-size: 0.88rem;
}

.journal-card h4 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.journal-card .journal-short {
  color: var(--muted);
  margin-bottom: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  background: #edf2f6;
  color: var(--accent);
  font-size: 0.81rem;
  border: 1px solid #d9e2e9;
  letter-spacing: 0.02em;
}

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

.card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin-bottom: 16px;
  font-size: 0.94rem;
  color: var(--muted);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-actions.compact {
  margin-top: 10px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.article-filters,
.guide-layout,
.resource-grid,
.contact-grid,
.about-grid {
  display: grid;
  gap: 16px;
}

.article-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

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

.article-card,
.info-card {
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 250, 0.95));
  box-shadow: var(--shadow-soft);
}

.article-card h4,
.info-card h4 {
  margin: 0 0 10px;
}

.article-card p,
.info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.78;
}

.meta-line {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.bullet-list {
  padding-left: 18px;
  margin: 0;
  line-height: 1.8;
  color: var(--muted);
}

.guide-layout {
  grid-template-columns: 0.9fr 1.1fr;
  margin-bottom: 18px;
}

.table-card {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #eff3f6;
  color: var(--muted-strong);
  font-weight: 700;
}

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

.resource-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resource-grid.single-column {
  grid-template-columns: 1fr;
}

.search-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1fr 1fr 1fr auto;
  gap: 12px;
}

.workspace-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.78fr);
  gap: 18px;
  align-items: start;
}

.workspace-shell-wide {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
}

.workspace-main,
.workspace-aside {
  min-width: 0;
}

.workspace-aside {
  display: grid;
  gap: 14px;
}

.workspace-note-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(251, 252, 253, 0.98), rgba(244, 247, 249, 0.95));
  box-shadow: var(--shadow-soft);
}

.workspace-note-card h4 {
  margin: 2px 0 10px;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
}

.workspace-note-card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.hero-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.hero-brief-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(243, 247, 249, 0.92));
  border: 1px solid rgba(215, 222, 229, 0.82);
}

.hero-brief-card h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.hero-brief-card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.76;
}

.author-search-form {
  grid-template-columns: 1.25fr 1.25fr repeat(4, minmax(0, 1fr)) auto;
}

.author-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.comparison-form {
  grid-template-columns: 1.3fr 1.3fr 1.3fr 1fr 1fr 1fr auto;
}

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

.comparison-timeline {
  min-height: 360px;
}

.comparison-card {
  height: 100%;
}

.review-search-form {
  grid-template-columns: 2fr 1fr 1.2fr 1fr auto;
}

.review-paper-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(251, 252, 253, 0.98), rgba(244, 247, 249, 0.95));
  box-shadow: var(--shadow-soft);
}

.review-paper-card input {
  width: auto;
  margin-top: 4px;
}

.review-output {
  min-height: 420px;
  white-space: pre-wrap;
}

.jump-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.jump-form input {
  width: 120px;
}

.toolbar-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.compact-toolbar {
  margin-top: 12px;
  gap: 10px;
}

.inline-link-button {
  text-decoration: none;
}

.auto-research-help {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.auto-research-top {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 16px;
  margin-bottom: 18px;
}

.auto-research-primary,
.auto-research-sidecard {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
}

.auto-research-primary {
  background:
    radial-gradient(circle at top right, rgba(39, 79, 121, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(241, 247, 250, 0.95));
}

.auto-research-sidecard {
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(246, 248, 250, 0.94));
}

.auto-research-primary-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.auto-research-primary h4,
.auto-research-sidecard h4 {
  margin: 4px 0 8px;
}

.beta-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #24568b;
  background: rgba(36, 86, 139, 0.1);
  vertical-align: middle;
}

.chip-strong {
  background: rgba(47, 157, 121, 0.12);
  color: #1f7a61;
}

.advanced-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(249, 251, 253, 0.96), rgba(243, 247, 250, 0.94));
  overflow: hidden;
}

.advanced-panel summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 700;
  color: var(--accent);
}

.advanced-panel summary::-webkit-details-marker {
  display: none;
}

.advanced-panel-body {
  padding: 0 20px 20px;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.auto-research-actions {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
}

.template-upload-card {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(245, 249, 252, 0.94));
}

#grantOutlineText {
  min-height: 260px;
  resize: vertical;
}

.help-inline-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.help-inline-head h4 {
  margin: 0 0 8px;
}

.help-inline-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.help-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bridge-meta-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.directory-picker-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.directory-picker-field input[readonly] {
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.98), rgba(242, 246, 249, 0.94));
  cursor: default;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: rgba(145, 158, 171, 0.85);
  box-shadow: 0 0 0 6px rgba(145, 158, 171, 0.12);
}

.status-dot-online {
  background: #2f9d79;
  box-shadow: 0 0 0 6px rgba(47, 157, 121, 0.14);
}

.status-dot-offline {
  background: #cf6b5c;
  box-shadow: 0 0 0 6px rgba(207, 107, 92, 0.14);
}

.saved-searches {
  margin-top: 18px;
  padding: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.saved-searches,
.llm-panel {
  min-width: 0;
}

.saved-searches h4 {
  margin: 0 0 12px;
}

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

.help-compare,
.help-flow,
.help-troubleshoot {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.help-compare {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.help-flow {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.help-troubleshoot {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.help-path-card,
.help-step-card,
.help-trouble-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(243, 247, 250, 0.94));
}

.help-path-card::before,
.help-step-card::before,
.help-trouble-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #274f79, #57a0a3);
}

.help-path-primary::before {
  background: linear-gradient(180deg, #274f79, #8db3cf);
}

.help-path-accent::before {
  background: linear-gradient(180deg, #2f8c73, #8ac7ad);
}

.help-path-card h4,
.help-step-card h4,
.help-trouble-card h4 {
  margin: 4px 0 10px;
}

.help-bullet-list {
  margin: 12px 0 0;
  padding-left: 1.15rem;
  line-height: 1.8;
  color: var(--text);
}

.help-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.help-signal {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(34, 101, 130, 0.14);
  background: linear-gradient(135deg, rgba(239, 247, 249, 0.95), rgba(249, 252, 253, 0.98));
}

.help-signal strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
}

.help-signal p {
  margin: 0;
  color: var(--text);
  line-height: 1.8;
}

.help-card {
  min-height: 180px;
}

.ordered-list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.8;
}

.ordered-list li + li {
  margin-top: 0.35rem;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.inline-check input {
  width: auto;
}

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

.analysis-insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.analysis-grid .subsection {
  min-width: 0;
}

.analysis-grid .subsection h4,
.hotspot-visual-grid .subsection h4,
.author-analysis-grid .subsection h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(215, 222, 229, 0.92);
  font-size: 1.04rem;
}

.analysis-grid .subsection h4::before,
.hotspot-visual-grid .subsection h4::before,
.author-analysis-grid .subsection h4::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #244766, #5d7e9f);
  box-shadow: 0 0 0 5px rgba(36, 71, 102, 0.08);
}

.author-analysis-grid .subsection {
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.hotspot-visual-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  margin-bottom: 16px;
}

.daily-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 20px;
  align-items: start;
}

.daily-hero h2 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.daily-summary {
  margin: 12px 0 0;
  color: var(--text);
  line-height: 1.85;
  font-size: 1rem;
}

.daily-card {
  position: relative;
  padding-top: 52px;
}

.daily-rank {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.84rem;
}

.daily-insight {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f6f2ea;
  border: 1px solid #eadcc4;
}

.daily-insight strong {
  display: block;
  margin-bottom: 8px;
  color: #7a5b1f;
}

.daily-insight p {
  color: var(--text);
}

.chart-canvas {
  width: 100%;
  height: 320px;
  padding-top: 6px;
}

.chart-canvas-tall {
  height: 360px;
}

.hotspot-card {
  position: relative;
  overflow: hidden;
}

.hotspot-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #274f79, #8db3cf);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.page-button {
  min-width: 42px;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--accent);
}

.page-button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.author-block {
  color: var(--muted);
  line-height: 1.6;
  margin: 10px 0 0;
  font-size: 0.94rem;
}

.quick-take {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: #eef4f8;
  border-radius: 12px;
  color: var(--text);
  font-size: 0.95rem;
}

.subsection {
  padding: 22px;
  background: linear-gradient(180deg, rgba(251, 252, 253, 0.98), rgba(244, 247, 249, 0.95));
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.metric-card {
  padding: 20px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 248, 250, 0.95));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.metric-number {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.compact-stack {
  margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.theme-chart {
  display: grid;
  gap: 10px;
  min-height: 280px;
  align-content: start;
}

#authorNetworkChart,
#authorAffiliationRank {
  min-height: 320px;
  height: 100%;
}

#authorAffiliationRank {
  align-content: start;
  overflow: auto;
  padding-right: 4px;
}

.chart-row {
  display: grid;
  grid-template-columns: 120px 1fr 44px;
  gap: 12px;
  align-items: center;
}

.chart-bar {
  position: relative;
  height: 10px;
  background: #dfe7ee;
  border-radius: 999px;
  overflow: hidden;
}

.chart-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #234f7e, #4a7aa8);
}

.chart-bar.tone-ai span,
.hotspot-card.tone-ai::before {
  background-image: linear-gradient(90deg, #24568b, #68a1d9);
}

.chart-bar.tone-market span,
.hotspot-card.tone-market::before {
  background-image: linear-gradient(90deg, #b66a1e, #e9a04c);
}

.chart-bar.tone-ops span,
.hotspot-card.tone-ops::before {
  background-image: linear-gradient(90deg, #1f7a50, #53b486);
}

.chart-bar.tone-finance span,
.hotspot-card.tone-finance::before {
  background-image: linear-gradient(90deg, #5d48a8, #8c77d6);
}

.chart-bar.tone-strategy span,
.hotspot-card.tone-strategy::before {
  background-image: linear-gradient(90deg, #1f6f74, #5aa7ad);
}

.chart-bar.tone-general span,
.hotspot-card.tone-general::before {
  background-image: linear-gradient(90deg, #607182, #93a3b1);
}

.tool-list,
.conference-list {
  display: grid;
  gap: 12px;
}

.inline-form {
  display: grid;
  gap: 12px;
}

.llm-panel {
  margin: 12px 0 0;
  padding: 20px;
  background: linear-gradient(180deg, rgba(251, 252, 253, 0.98), rgba(244, 247, 249, 0.95));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

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

.about-grid,
.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-card {
  padding: 20px;
}

.contact-card:last-child {
  grid-column: 1 / -1;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px 28px;
  margin: 28px 0 12px;
}

.footer p {
  margin: 6px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-credit {
  text-align: right;
}

.footer-lab-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}

.footer-lab-link img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  border-radius: 999px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 14, 23, 0.48);
  padding: 20px;
  z-index: 50;
}

.modal-panel {
  width: min(960px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.97));
  border-radius: 24px;
  padding: 28px;
  position: relative;
  box-shadow: 0 28px 72px rgba(15, 23, 32, 0.18);
}

.compact-panel {
  width: min(520px, 100%);
}

.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: block;
}

.hidden {
  display: none;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.detail-header h3 {
  margin: 0 0 10px;
  font-size: 1.9rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-section {
  padding: 18px;
  background: linear-gradient(180deg, rgba(251, 252, 253, 0.98), rgba(244, 247, 249, 0.95));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.detail-section.full {
  grid-column: 1 / -1;
}

.cite-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.code-block {
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f3f6f8;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.9rem;
}

.clustrmaps-host {
  min-height: 320px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(250, 252, 253, 0.98), rgba(243, 247, 249, 0.95));
  overflow: hidden;
  padding: 10px;
}

#analyticsLatest {
  gap: 10px;
}

.visit-row {
  display: grid;
  grid-template-columns: 176px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(251, 252, 253, 0.98), rgba(244, 247, 249, 0.95));
  box-shadow: var(--shadow-soft);
}

.visit-row__time {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.visit-row__body h4 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.visit-row__body p {
  margin: 0;
  color: var(--muted);
}

.trend {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 180px;
  margin-top: 16px;
}

.trend-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.trend-bar span {
  width: 100%;
  max-width: 48px;
  border-radius: 16px 16px 6px 6px;
  background: linear-gradient(180deg, #295889, #7fa4c7);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--text);
  color: #fff;
  z-index: 60;
}

.selection-ask-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 56;
  min-width: 112px;
  border-radius: 999px;
  padding: 0.9rem 1.15rem;
  background: linear-gradient(135deg, #163b62, #2d6f78);
  box-shadow: 0 18px 36px rgba(22, 59, 98, 0.24);
}

.selection-ask-bubble {
  position: absolute;
  z-index: 57;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #163b62, #2d6f78);
  box-shadow: 0 14px 26px rgba(22, 59, 98, 0.22);
}

.selection-ask-panel {
  position: fixed;
  right: 24px;
  bottom: 82px;
  z-index: 58;
  width: min(420px, calc(100vw - 28px));
  max-height: min(76vh, 760px);
  overflow: auto;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(184, 196, 207, 0.82);
  box-shadow: 0 24px 56px rgba(15, 23, 32, 0.16);
  backdrop-filter: blur(14px);
}

.selection-ask-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.selection-ask-head strong {
  display: block;
  font-size: 1.05rem;
}

.selection-ask-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.selection-ask-block {
  margin-top: 14px;
}

.selection-ask-label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.73rem;
  font-weight: 700;
}

.selection-ask-selected,
.selection-ask-answer {
  padding: 14px 15px;
  border-radius: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  line-height: 1.72;
}

.selection-ask-selected {
  max-height: 124px;
  overflow: auto;
  color: var(--text);
}

.selection-ask-answer {
  min-height: 160px;
}

.selection-ask-answer h4,
.selection-ask-answer h5 {
  margin: 0 0 10px;
  color: var(--accent);
}

.selection-ask-answer p,
.selection-ask-placeholder {
  margin: 0;
  color: var(--muted);
}

.selection-ask-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.selection-ask-actions .ghost-button {
  border-radius: 14px;
  padding: 0.62rem 0.9rem;
}

.selection-ask-submit {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.paper-reader-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.paper-upload-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 250, 0.94));
  border: 1px solid var(--line);
}

.paper-progress-card {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(248, 251, 253, 0.95);
  border: 1px solid rgba(22, 59, 98, 0.1);
}

.paper-progress-card.is-busy {
  box-shadow: 0 10px 24px rgba(25, 67, 107, 0.08);
}

.paper-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.paper-progress-head strong {
  color: var(--accent);
}

.paper-progress-head span {
  color: var(--muted);
  font-weight: 700;
}

.paper-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(161, 179, 197, 0.24);
  overflow: hidden;
  margin-bottom: 10px;
}

.paper-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #24568b, #57a0a3);
  transition: width 220ms ease;
}

.paper-progress-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.paper-upload-dropzone {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 190px;
  padding: 24px;
  border: 1.5px dashed rgba(22, 59, 98, 0.3);
  border-radius: 20px;
  background: rgba(248, 251, 253, 0.92);
  text-align: center;
}

.paper-upload-dropzone input {
  display: none;
}

.paper-upload-dropzone strong {
  font-size: 1.08rem;
  color: var(--accent);
}

.paper-upload-dropzone span {
  color: var(--muted);
  line-height: 1.7;
  max-width: 42ch;
}

.paper-reader-summary {
  display: grid;
  gap: 14px;
}

.paper-reader-chat {
  display: grid;
  gap: 14px;
  max-height: 560px;
  overflow: auto;
  padding-right: 2px;
}

.chat-bubble {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.chat-bubble strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
}

.chat-bubble.user {
  background: #eef4f8;
  border-color: rgba(22, 59, 98, 0.16);
}

.chat-bubble.assistant {
  background: #f8fafc;
}

.paper-question-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 16px;
  align-items: end;
}

.paper-question-form textarea {
  min-height: 108px;
}

.review-input-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.ghost-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(248, 251, 253, 0.92);
}

.ghost-upload input {
  display: none;
}

.decision-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
}

.decision-overlay.hidden {
  display: none;
}

.decision-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 28, 0.48);
  backdrop-filter: blur(4px);
}

.decision-overlay__content {
  position: relative;
  width: min(92vw, 560px);
  padding: 32px 28px 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(217, 225, 232, 0.92);
  box-shadow: 0 24px 64px rgba(15, 23, 32, 0.24);
  text-align: center;
  overflow: hidden;
}

.decision-overlay__content h3 {
  margin: 0 0 10px;
  font-size: 2rem;
  color: var(--accent);
}

.decision-overlay__content p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.decision-overlay.accept .decision-overlay__content {
  background: linear-gradient(180deg, rgba(246, 253, 255, 0.99), rgba(239, 250, 250, 0.97));
}

.decision-overlay.reject .decision-overlay__content {
  background: linear-gradient(180deg, rgba(255, 248, 248, 0.99), rgba(253, 239, 239, 0.97));
}

.decision-overlay__particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.decision-overlay__particles span {
  position: absolute;
  top: -10px;
  width: 12px;
  height: 22px;
  border-radius: 999px;
  background: hsl(var(--particle-hue), 72%, 58%);
  opacity: 0;
  animation: particle-burst 1.5s ease forwards;
}

.decision-overlay.reject .decision-overlay__particles span {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  animation-name: particle-explode;
}

.virtual-review-round {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(243, 247, 250, 0.94));
  border: 1px solid var(--line);
}

.virtual-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reviewer-card ul {
  margin: 0.35rem 0 0.75rem 1.1rem;
  padding: 0;
  color: var(--text);
}

.reviewer-card li {
  margin-bottom: 0.3rem;
  line-height: 1.65;
}

.senior-card {
  border-color: rgba(34, 101, 130, 0.16);
  background: linear-gradient(180deg, rgba(248, 252, 253, 0.98), rgba(237, 246, 247, 0.92));
}

.stack-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.stack-list.compact {
  gap: 10px;
}

.stack-row {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(24, 64, 108, 0.1);
  background: rgba(247, 250, 253, 0.9);
}

.stack-row p {
  margin: 6px 0 0;
}

.stack-row .tag-row {
  margin-bottom: 6px;
}

@media (max-width: 1160px) {
  .hero,
  .page-banner,
  .paper-reader-grid,
  .workspace-shell,
  .layout-grid,
  .guide-layout,
  .resource-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .topnav-row {
    justify-content: flex-start;
  }

  .feature-grid,
  .analysis-insight-grid,
  .auto-research-top,
  .author-insight-grid,
  .author-grid,
  .comparison-grid,
  .comparison-results-grid,
  .journal-grid,
  .faq-grid,
  .hero-brief-grid,
  .help-grid,
  .help-compare,
  .help-flow,
  .help-troubleshoot,
  .search-form,
  .llm-grid,
  .daily-hero,
  .hotspot-visual-grid,
  .cite-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pet-chooser-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .directory-picker-field {
    grid-template-columns: 1fr;
  }

  .advanced-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .visit-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .page-banner-meta {
    justify-content: flex-start;
  }

  .topbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .topnav {
    justify-content: start;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  #app {
    padding: 12px;
  }

  .hero,
  .section,
  .footer,
  .sidebar,
  .modal-panel {
    padding: 16px;
  }

  .topbar {
    position: static;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 20px;
  }

  .brand {
    align-items: center;
    gap: 12px;
  }

  .brand h1 {
    font-size: 1.04rem;
  }

  .brand p {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .brand-mark img {
    width: 44px;
    height: 44px;
  }

  .topnav {
    gap: 8px;
  }

  .topnav-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .topnav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.6rem 0.7rem;
    text-align: center;
    font-size: 0.86rem;
    line-height: 1.25;
  }

  .hero {
    gap: 18px;
    padding: 24px 18px;
    margin-bottom: 18px;
    border-radius: 22px;
  }

  .hero h2 {
    max-width: none;
    font-size: clamp(1.7rem, 8vw, 2.4rem);
    line-height: 1.08;
  }

  .hero-text,
  .page-banner-copy p:last-child {
    line-height: 1.72;
    font-size: 0.95rem;
  }

  .hero-search {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 20px 0 16px;
  }

  .hero-search button,
  .hero-search input {
    min-height: 50px;
  }

  .page-banner {
    gap: 14px;
    padding: 22px 18px;
    border-radius: 22px;
  }

  .page-banner-copy h2 {
    font-size: clamp(1.45rem, 7vw, 2rem);
    line-height: 1.1;
  }

  .page-banner-meta {
    gap: 8px;
  }

  .page-banner-meta .chip,
  .tag-row .chip {
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
  }

  .page-banner-meta .chip:nth-child(n + 4) {
    display: none;
  }

  .pet-chooser-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pet-chooser-head {
    flex-direction: column;
  }

  .help-inline-head {
    flex-direction: column;
  }

  .auto-research-primary-head {
    flex-direction: column;
  }

  .section-head,
  .section-tools,
  .toolbar-row,
  .card-actions,
  .article-filters,
  .feature-grid,
  .analysis-insight-grid,
  .hero-brief-grid,
  .author-insight-grid,
  .author-grid,
  .comparison-grid,
  .comparison-results-grid,
  .journal-grid,
  .faq-grid,
  .stat-grid,
  .search-form,
  .llm-grid,
  .daily-hero,
  .hotspot-visual-grid,
  .cite-grid {
    grid-template-columns: 1fr;
  }

  .section-tools {
    width: 100%;
  }

  .section-tools input {
    min-width: 0;
  }

  .section-head {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
  }

  .section-head h3 {
    font-size: 1.1rem;
    line-height: 1.3;
  }

  .section-head .eyebrow {
    margin-bottom: 6px;
  }

  .toolbar-row > button,
  .toolbar-row > .button-link,
  .toolbar-row > .ghost-button {
    width: 100%;
    justify-content: center;
  }

  .card-meta,
  .author-metrics,
  .chart-row,
  .compact-stack {
    grid-template-columns: 1fr;
  }

  .author-metrics {
    gap: 8px;
  }

  .search-form,
  .author-search-form,
  .comparison-form,
  .review-search-form,
  .paper-question-form,
  .virtual-review-grid,
  .directory-picker-field,
  .article-filters {
    gap: 10px;
  }

  .workspace-shell,
  .workspace-shell-wide,
  .auto-research-top,
  .paper-reader-grid,
  .guide-layout,
  .layout-grid,
  .daily-hero,
  .hotspot-visual-grid,
  .analysis-grid,
  .detail-grid,
  .resource-grid,
  .about-grid,
  .contact-grid,
  .comparison-grid,
  .comparison-results-grid,
  .author-grid,
  .journal-grid,
  .help-grid,
  .help-compare,
  .help-flow,
  .help-troubleshoot {
    grid-template-columns: 1fr;
  }

  .subsection,
  .article-card,
  .info-card,
  .journal-card,
  .metric-card,
  .workspace-note-card,
  .paper-upload-card,
  .review-paper-card,
  .virtual-review-round {
    padding: 16px;
  }

  .feature-card {
    padding: 18px 16px;
  }

  .feature-card h4,
  .journal-card h4,
  .article-card h4,
  .info-card h4 {
    font-size: 1rem;
    line-height: 1.35;
  }

  .feature-card p,
  .journal-card p,
  .article-card p,
  .info-card p,
  .workspace-note-card p:last-child,
  .daily-summary {
    font-size: 0.92rem;
    line-height: 1.68;
  }

  .chart-canvas {
    height: 260px;
  }

  .chart-canvas-tall,
  .comparison-timeline,
  #authorNetworkChart,
  #authorAffiliationRank {
    height: 280px;
    min-height: 280px;
  }

  .author-analysis-grid .subsection {
    min-height: 0;
  }

  .paper-reader-chat {
    max-height: none;
  }

  .paper-upload-dropzone {
    min-height: 150px;
    padding: 18px 16px;
  }

  .paper-upload-dropzone strong {
    font-size: 1rem;
  }

  #grantOutlineText,
  .paper-question-form textarea,
  #virtualReviewExistingReviews,
  #virtualReviewRevisionIdea {
    min-height: 140px;
  }

  .review-paper-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .review-paper-card input {
    justify-self: start;
  }

  .author-card__header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .daily-rank {
    position: static;
    display: inline-flex;
    margin-bottom: 10px;
  }

  .advanced-panel summary {
    padding: 14px 16px;
    align-items: flex-start;
    line-height: 1.5;
  }

  .advanced-panel-body {
    padding: 0 16px 16px;
  }

  .comparison-card,
  .metric-card {
    height: auto;
  }

  .tag-row,
  .toolbar-row {
    margin-top: 10px;
  }

  .code-block,
  .review-output {
    max-height: none;
    overflow: visible;
  }

  .review-output,
  .code-block {
    font-size: 0.84rem;
    line-height: 1.55;
  }

  .footer {
    align-items: start;
    flex-direction: column;
  }

  .footer-credit {
    text-align: left;
  }

  .hero-brand-strip {
    width: 100%;
    border-radius: 22px;
  }

  .hero-brand-strip img {
    width: 60px;
    height: 60px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px;
  }

  .selection-ask-bubble {
    max-width: calc(100vw - 32px);
    white-space: normal;
    line-height: 1.35;
  }

  .selection-ask-launcher {
    right: 14px;
    bottom: 14px;
  }

  .selection-ask-panel {
    right: 14px;
    left: 14px;
    width: auto;
    bottom: 72px;
  }

  .paper-question-form,
  .virtual-review-grid {
    grid-template-columns: 1fr;
  }

  .auth-chip,
  .auth-inline-row,
  .auth-mode-switch,
  .auth-method-switch {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .auth-entry {
    justify-content: stretch;
  }
}

@media (max-width: 560px) {
  .topnav-row {
    grid-template-columns: 1fr;
  }

  .page-banner-meta {
    display: none;
  }

  .hero-meta {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 8px 12px;
    font-size: 0.84rem;
  }

  .hero-brief-card,
  .workspace-note-card,
  .metric-card,
  .subsection {
    border-radius: 16px;
  }

  .section,
  .hero,
  .page-banner,
  .footer {
    border-radius: 18px;
  }

  .comparison-timeline,
  .chart-canvas-tall,
  #authorNetworkChart,
  #authorAffiliationRank {
    height: 250px;
    min-height: 250px;
  }

  .chart-canvas {
    height: 230px;
  }

  .metric-number {
    font-size: 1.55rem;
  }

  .paper-progress-head {
    align-items: flex-start;
  }

  .pet-chooser-grid {
    grid-template-columns: 1fr;
  }

  .hero-brand-strip {
    padding: 10px 14px 10px 10px;
    gap: 12px;
  }

  .hero-brand-strip img {
    width: 52px;
    height: 52px;
  }

  .hero-meta {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .page-button {
    min-width: 36px;
    padding: 0.62rem 0.78rem;
  }

  .pet-roamer img {
    width: 88px;
    height: 88px;
  }

  .pet-roamer-bubble {
    max-width: 148px;
    font-size: 0.8rem;
  }

  .visit-row {
    padding: 12px 13px;
  }

  .visit-row__body h4 {
    font-size: 0.94rem;
  }

  .visit-row__body p,
  .visit-row__time {
    font-size: 0.84rem;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 12px 14px;
  }
}

@keyframes particle-burst {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(360px) rotate(380deg) scale(1.05);
    opacity: 0;
  }
}

@keyframes particle-explode {
  0% {
    transform: translate(0, 0) scale(0.6) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate(calc((var(--particle-hue) - 12) * 2px), 280px) scale(1.2) rotate(220deg);
    opacity: 0;
  }
}
