.author-profile-body {
  --profile-ink: #172033;
  --profile-muted: #667085;
  --profile-line: #d9e1ec;
  --profile-teal: #0f766e;
  --profile-blue: #2457a6;
  --profile-berry: #9f2548;
  background: #f6f8fb;
  color: var(--profile-ink);
}

.author-profile-body .author-profile-shell {
  width: min(1180px, calc(100% - 36px));
  padding-top: 12px;
}

.author-profile-body .topbar {
  position: sticky;
  top: 10px;
  z-index: 30;
  min-height: 66px;
  border: 1px solid rgba(217, 225, 236, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.06);
}

.author-profile-body .brand-title {
  display: block;
  color: var(--profile-ink);
  font-size: 19px;
  font-weight: 800;
}

.author-profile-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 18px;
}

.author-profile-identity {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 250px;
  align-items: end;
  overflow: hidden;
  border: 1px solid #27384d;
  border-radius: 8px;
  background: #172033;
  padding: 36px;
  color: #fff;
  box-shadow: 0 18px 44px rgba(23, 32, 51, 0.16);
}

.author-profile-identity::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #0f766e 0 42%, #2457a6 42% 76%, #9f2548 76%);
}

.author-profile-identity .eyebrow { color: #7dd3c7; }
.author-profile-identity h1 { margin: 0; color: #fff; font-size: 42px; line-height: 1.1; letter-spacing: 0; }
.author-profile-meta { margin: 14px 0 0; color: #c8d3df; line-height: 1.6; }
.author-full-affiliation { max-width: 780px; margin: 9px 0 0; color: #9fb0c3; font-size: 12px; line-height: 1.5; }

.author-profile-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.author-level-badge {
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 5px;
  padding: 6px 9px;
  color: #e4ebf3;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.author-profile-body .profile-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.author-profile-body .profile-metric-grid .index-chip {
  min-height: 82px;
  border: 1px solid var(--profile-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.author-profile-body .profile-metric-grid .index-chip span { color: var(--profile-muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.author-profile-body .profile-metric-grid .index-chip strong { font-size: 22px; font-variant-numeric: tabular-nums; }

.author-context-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 12px;
}

.author-analysis-panel,
.author-evidence-panel {
  border: 1px solid var(--profile-line);
  border-radius: 8px;
  background: #fff;
  padding: 24px;
}

.author-analysis-panel { border-left: 4px solid var(--profile-teal); }
.author-panel-kicker { margin: 0 0 6px; color: var(--profile-teal); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.author-analysis-panel h2,
.author-evidence-panel h2 { margin: 0; font-size: 19px; }

.author-analysis-list { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.author-analysis-list li { position: relative; padding-left: 18px; color: #344054; font-size: 14px; line-height: 1.6; }
.author-analysis-list li::before { content: ""; position: absolute; top: 9px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--profile-teal); }
.author-analysis-basis { margin: 16px 0 0; border-top: 1px solid var(--profile-line); padding-top: 12px; color: var(--profile-muted); font-size: 11px; line-height: 1.5; }

.author-evidence-list { display: grid; margin: 14px 0 0; }
.author-evidence-list div { display: grid; grid-template-columns: 1fr auto; gap: 12px; border-top: 1px solid var(--profile-line); padding: 11px 0; }
.author-evidence-list dt { color: var(--profile-muted); font-size: 12px; }
.author-evidence-list dd { margin: 0; font-size: 12px; font-weight: 750; text-align: right; }

.author-profile-nav {
  position: sticky;
  top: 88px;
  z-index: 15;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  border: 1px solid var(--profile-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: 10px 14px;
  white-space: nowrap;
}

.author-profile-nav a { color: #526173; font-size: 12px; font-weight: 750; text-decoration: none; }
.author-profile-nav a:hover { color: var(--profile-teal); }

.author-profile-section {
  scroll-margin-top: 138px;
  border: 1px solid var(--profile-line);
  border-radius: 8px;
  background: #fff;
  padding: 26px;
}

.author-section-heading { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 18px; }
.author-section-heading h2 { margin: 0; font-size: 22px; }
.author-section-heading p { margin: 6px 0 0; color: var(--profile-muted); font-size: 13px; }

.author-identity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--profile-line);
  border-radius: 8px;
}

.author-identity-grid div { min-height: 86px; border-left: 1px solid var(--profile-line); padding: 16px; }
.author-identity-grid div:first-child { border-left: 0; }
.author-identity-grid span { display: block; color: var(--profile-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.author-identity-grid strong { display: block; margin-top: 9px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }

.author-trend-chart {
  min-height: 260px;
  border: 1px solid var(--profile-line);
  border-radius: 8px;
  padding: 18px;
}

.author-trend-chart svg { display: block; width: 100%; height: 220px; }
.author-trend-legend { display: flex; gap: 16px; margin-bottom: 10px; color: var(--profile-muted); font-size: 11px; }
.author-trend-key::before { content: ""; display: inline-block; width: 12px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--key-color); }

.author-profile-body .profile-formula-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.author-profile-body .profile-formula-grid .index-chip {
  min-height: 78px;
  border: 1px solid var(--profile-line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

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

.author-profile-body .distribution-panel { border: 1px solid var(--profile-line); border-radius: 8px; box-shadow: none; }
.author-profile-body .yearly-panel { border: 0; box-shadow: none; }
.author-profile-body .yearly-panel .table-wrap { max-height: 520px; overflow: auto; border: 1px solid var(--profile-line); border-radius: 8px; }
.author-profile-body .yearly-panel thead th { position: sticky; top: 0; z-index: 2; background: #eef2f6; }

.author-correction-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  border: 1px solid #c6d8ea;
  border-left: 4px solid var(--profile-blue);
  border-radius: 8px;
  background: #f6f9fd;
  padding: 22px 24px;
}
.author-correction-note h2 { margin: 0; font-size: 17px; }
.author-correction-note p { margin: 7px 0 0; color: var(--profile-muted); font-size: 13px; line-height: 1.6; }
.author-correction-note a { color: var(--profile-blue); font-weight: 750; white-space: nowrap; }

@media (max-width: 1000px) {
  .author-profile-body .profile-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .author-context-grid { grid-template-columns: 1fr; }
  .author-identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .author-identity-grid div:nth-child(3) { border-left: 0; border-top: 1px solid var(--profile-line); }
  .author-identity-grid div:nth-child(4) { border-top: 1px solid var(--profile-line); }
}

@media (max-width: 760px) {
  .author-profile-body .author-profile-shell { width: min(100% - 20px, 1180px); }
  .author-profile-body .topbar,
  .author-profile-nav { position: static; }
  .author-profile-identity { grid-template-columns: 1fr; min-height: auto; padding: 28px 22px; }
  .author-profile-identity h1 { font-size: 32px; }
  .author-profile-levels { justify-content: flex-start; margin-top: 22px; }
  .author-profile-body .profile-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .author-profile-section,
  .author-analysis-panel,
  .author-evidence-panel { padding: 20px; }
  .author-profile-body .profile-formula-grid,
  .author-profile-body .profile-detail-grid,
  .author-identity-grid { grid-template-columns: 1fr; }
  .author-identity-grid div { border-top: 1px solid var(--profile-line); border-left: 0; }
  .author-identity-grid div:first-child { border-top: 0; }
  .author-correction-note { grid-template-columns: 1fr; }
}
