:root {
  color-scheme: light;
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #eeeeea;
  --ink: #181918;
  --muted: #6f736f;
  --line: #dedfda;
  --line-strong: #c9cbc5;
  --red: #ef334d;
  --red-dark: #c91f38;
  --red-soft: #fff0f2;
  --green: #1e755b;
  --green-soft: #eaf5f0;
  --yellow: #f4c64f;
  --shadow: 0 14px 36px rgba(20, 22, 20, 0.10);
  --radius: 8px;
  --topbar: 72px;
  --font: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(239, 51, 77, 0.35);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: var(--topbar);
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(230px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  background: var(--ink);
  color: white;
  font-family: SimSun, serif;
  font-size: 21px;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  font-size: 15px;
  line-height: 1.2;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
}

.nav-tab {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.nav-tab svg,
.icon-button svg,
.secondary-button svg,
.reset-button svg,
.search-field svg,
.select-wrap svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.nav-tab:hover {
  color: var(--ink);
}

.nav-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.topbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}

.data-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.view {
  min-height: calc(100vh - var(--topbar));
}

.page-intro {
  max-width: 1540px;
  margin: 0 auto;
  padding: 48px 32px 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  max-width: 880px;
  margin-bottom: 14px;
  font-size: 34px;
  line-height: 1.25;
  font-weight: 750;
}

.intro-copy {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.secondary-button,
.reset-button,
.load-more {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.secondary-button {
  padding: 0 16px;
}

.secondary-button:hover,
.load-more:hover {
  border-color: var(--ink);
}

.mobile-filter-trigger,
.mobile-filter-close {
  display: none;
}

.metric-strip {
  max-width: 1540px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric-item {
  min-height: 120px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 22px 28px;
  border-right: 1px solid var(--line);
}

.metric-item:last-child {
  border-right: 0;
}

.metric-item span,
.metric-item small {
  color: var(--muted);
}

.metric-item span {
  font-size: 12px;
}

.metric-item strong {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

.metric-item small {
  font-size: 11px;
}

.metric-highlight {
  background: var(--ink);
  color: white;
}

.metric-highlight span,
.metric-highlight small {
  color: #bfc3bf;
}

.library-workspace {
  max-width: 1540px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  gap: 28px;
  padding: 0 32px 80px;
}

.filter-panel {
  position: sticky;
  top: calc(var(--topbar) + 20px);
  align-self: start;
  max-height: calc(100vh - var(--topbar) - 40px);
  padding: 22px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.filter-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.filter-panel h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.panel-kicker {
  margin-bottom: 6px;
}

.search-field {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}

.search-field:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-field input::placeholder {
  color: #999d99;
}

kbd {
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
  color: var(--muted);
  font-family: inherit;
  font-size: 9px;
  white-space: nowrap;
}

.filter-group {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.filter-label-row,
.filter-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.filter-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.filter-label {
  display: block;
  margin-bottom: 10px;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 11px;
  cursor: pointer;
}

.checkbox-list {
  display: grid;
  gap: 4px;
}

.check-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
}

.check-row:hover {
  background: var(--bg);
}

.check-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--red);
}

.check-row small {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  width: 100%;
  height: 42px;
  appearance: none;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.select-wrap select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.select-wrap > svg {
  position: absolute;
  top: 50%;
  right: 10px;
  pointer-events: none;
  transform: translateY(-50%);
}

.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}

.segmented.vertical {
  display: grid;
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle-row .filter-label {
  margin-bottom: 4px;
}

.toggle-row small {
  display: block;
  max-width: 160px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: #c7cac6;
  cursor: pointer;
  transition: background 160ms ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--red);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.reset-button {
  width: 100%;
  margin-top: 18px;
  color: var(--muted);
}

.reset-button:hover {
  color: var(--ink);
}

.content-panel {
  min-width: 0;
}

.content-toolbar {
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.result-label {
  margin: 0 0 8px;
  color: var(--muted);
}

.result-label strong {
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--red-soft);
  color: var(--red-dark);
  font-size: 10px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-wrap.compact {
  width: 190px;
}

.select-wrap.compact select {
  height: 38px;
  font-size: 12px;
}

.icon-segment button {
  width: 34px;
  display: grid;
  place-items: center;
}

.icon-segment svg {
  width: 16px;
  height: 16px;
}

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

.content-grid.is-list {
  grid-template-columns: 1fr;
  gap: 10px;
}

.note-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.note-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(25, 27, 25, 0.08);
}

.cover-button {
  position: relative;
  width: 100%;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #e8e8e3;
  cursor: zoom-in;
  aspect-ratio: 3 / 4;
}

.cover-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.note-card:hover .cover-button img {
  transform: scale(1.018);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 32px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 4px;
  background: rgba(20, 20, 20, 0.82);
  color: white;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.duplicate-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 9px;
}

.note-body {
  padding: 14px 14px 12px;
}

.note-title {
  min-height: 45px;
  margin-bottom: 11px;
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 700;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.note-meta,
.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.note-meta {
  margin-bottom: 11px;
}

.account-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.like-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.like-count svg {
  width: 13px;
  height: 13px;
}

.note-footer {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.category-tag {
  max-width: calc(100% - 72px);
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.card-action {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.card-action:hover {
  background: var(--bg);
  color: var(--ink);
}

.card-action svg {
  width: 14px;
  height: 14px;
}

.content-grid.is-list .note-card {
  min-height: 140px;
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
}

.content-grid.is-list .cover-button {
  height: 100%;
  aspect-ratio: auto;
}

.content-grid.is-list .note-body {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 150px;
  align-items: center;
  gap: 28px;
  padding: 18px 22px;
}

.content-grid.is-list .note-title {
  min-height: 0;
  margin: 0;
  font-size: 16px;
  -webkit-line-clamp: 3;
}

.content-grid.is-list .note-meta,
.content-grid.is-list .note-footer {
  margin: 0;
  padding: 0;
  border: 0;
}

.content-grid.is-list .note-meta {
  display: grid;
  justify-items: start;
}

.load-more {
  width: 100%;
  margin-top: 24px;
  background: transparent;
}

.empty-state {
  min-height: 400px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  color: var(--muted);
}

.empty-state h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.empty-state p {
  margin-bottom: 20px;
  color: var(--muted);
}

.insight-intro,
.cover-intro {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.insight-layout {
  max-width: 1540px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0 32px 80px;
}

.analysis-section {
  min-height: 420px;
  padding: 36px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.analysis-section:nth-child(2n) {
  border-right: 0;
}

.analysis-section.span-two {
  grid-column: 1 / -1;
  border-right: 0;
}

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

.section-heading > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.section-number {
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
}

.bar-chart {
  display: grid;
  gap: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 54px;
  align-items: center;
  gap: 14px;
}

.bar-label {
  font-size: 12px;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  background: #e4e5e0;
}

.bar-fill {
  display: block;
  height: 100%;
  background: var(--ink);
  transform-origin: left;
  animation: barGrow 560ms ease both;
}

.bar-value {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.ring-summary {
  display: grid;
  gap: 12px;
}

.pattern-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.pattern-rank {
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 18px;
}

.pattern-row strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.pattern-row small,
.pattern-count {
  color: var(--muted);
  font-size: 10px;
}

.signal-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 9px;
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.signal-pill strong {
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.top-title-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 42px;
}

.top-title-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.top-title-item:hover .top-title-copy strong {
  color: var(--red-dark);
}

.top-title-rank {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 17px;
}

.top-title-copy {
  min-width: 0;
}

.top-title-copy strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-title-copy small {
  color: var(--muted);
  font-size: 9px;
}

.top-title-likes {
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
}

.account-table-wrap {
  overflow-x: auto;
}

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

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

.account-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.account-table td {
  font-size: 11px;
}

.account-table td:first-child {
  min-width: 210px;
  font-weight: 700;
}

.cover-principles {
  max-width: 1540px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}

.cover-principles article {
  min-height: 230px;
  padding: 36px 28px;
  border-right: 1px solid var(--line);
}

.cover-principles article:first-child {
  border-left: 1px solid var(--line);
}

.cover-principles span {
  display: block;
  margin-bottom: 48px;
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 12px;
}

.cover-principles h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.cover-principles p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.cover-sample-section {
  max-width: 1540px;
  margin: 0 auto;
  padding: 48px 32px 90px;
}

.section-heading.wide {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.cover-showcase {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 18px;
}

.cover-sample {
  min-width: 0;
  cursor: pointer;
}

.cover-sample-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #e5e5df;
}

.cover-sample-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease;
}

.cover-sample:hover img {
  transform: scale(1.02);
}

.cover-sample-rank {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 42px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: white;
  font-family: Georgia, serif;
  font-size: 12px;
}

.cover-sample h3 {
  margin: 12px 0 6px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cover-sample p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.drawer-shell {
  position: fixed;
  z-index: 300;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}

.drawer-shell.is-open {
  visibility: visible;
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(13, 14, 13, 0.52);
  opacity: 0;
  transition: opacity 180ms ease;
}

.drawer-shell.is-open .drawer-backdrop {
  opacity: 1;
}

.detail-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(560px, 100%);
  height: 100%;
  overflow-y: auto;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.drawer-shell.is-open .detail-drawer {
  transform: translateX(0);
}

.drawer-head {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  font-weight: 700;
}

.drawer-content {
  padding: 22px 22px 40px;
}

.drawer-cover {
  width: min(100%, 380px);
  margin: 0 auto 26px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--surface-2);
}

.drawer-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-title {
  margin-bottom: 12px;
  font-size: 24px;
  line-height: 1.45;
}

.drawer-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.drawer-account a {
  color: var(--red-dark);
}

.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 24px;
}

.drawer-tags span {
  padding: 6px 8px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--muted);
  font-size: 10px;
}

.drawer-facts {
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.drawer-facts div {
  min-height: 76px;
  padding: 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.drawer-facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
}

.drawer-facts dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.data-boundary {
  margin-bottom: 22px;
  padding: 14px;
  border-left: 3px solid var(--yellow);
  background: #fff9e9;
  color: #6d5d2c;
  font-size: 11px;
  line-height: 1.65;
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.drawer-actions button,
.drawer-actions a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: white;
  cursor: pointer;
}

.drawer-actions .primary-action {
  border-color: var(--red);
  background: var(--red);
  color: white;
}

.drawer-actions svg {
  width: 16px;
  height: 16px;
}

.toast {
  position: fixed;
  z-index: 500;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

footer {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: #b8bcb8;
  font-size: 11px;
}

footer p {
  margin: 0;
}

footer a {
  color: white;
  font-weight: 700;
}

@keyframes barGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 1220px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .primary-nav {
    justify-self: center;
  }

  .brand-copy small,
  .data-date {
    display: none;
  }

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

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

@media (max-width: 960px) {
  :root {
    --topbar: 64px;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 0 18px;
  }

  .brand-copy {
    display: none;
  }

  .primary-nav {
    justify-self: center;
  }

  .nav-tab span {
    display: none;
  }

  .nav-tab {
    width: 42px;
    justify-content: center;
    padding: 0;
  }

  .page-intro {
    padding: 34px 20px 26px;
  }

  h1 {
    font-size: 28px;
  }

  .mobile-filter-trigger,
  .mobile-filter-close {
    display: inline-flex;
  }

  .metric-strip {
    margin: 0 20px 24px;
    grid-template-columns: 1fr 1fr;
  }

  .metric-item:nth-child(2) {
    border-right: 0;
  }

  .metric-item:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .library-workspace {
    grid-template-columns: 1fr;
    padding: 0 20px 64px;
  }

  .filter-panel {
    position: fixed;
    z-index: 260;
    top: 0;
    left: 0;
    width: min(360px, 90vw);
    height: 100vh;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: var(--shadow);
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  .filter-panel.is-open {
    transform: translateX(0);
  }

  .filter-scrim {
    position: fixed;
    z-index: 250;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.46);
  }

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

  .content-grid.is-list .note-body {
    grid-template-columns: 1fr 150px;
  }

  .content-grid.is-list .note-footer {
    display: none;
  }

  .insight-layout {
    grid-template-columns: 1fr;
    padding: 0 20px 64px;
  }

  .analysis-section,
  .analysis-section.span-two {
    grid-column: 1;
    border-right: 0;
    padding: 30px 12px;
  }

  .cover-principles {
    grid-template-columns: 1fr 1fr;
    padding: 0 20px;
  }

  .cover-principles article:nth-child(2) {
    border-right: 0;
  }

  .cover-principles article:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .cover-sample-section {
    padding: 40px 20px 70px;
  }

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

@media (max-width: 680px) {
  .topbar {
    padding: 0 12px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .topbar-actions .icon-button {
    width: 34px;
    height: 34px;
  }

  .page-intro {
    align-items: flex-start;
    padding-top: 28px;
  }

  .page-intro h1 {
    font-size: 24px;
    line-height: 1.35;
  }

  .intro-copy {
    font-size: 13px;
  }

  .mobile-filter-trigger span {
    display: none;
  }

  .mobile-filter-trigger {
    width: 40px;
    flex: 0 0 40px;
    padding: 0;
  }

  .metric-strip {
    margin-right: 16px;
    margin-left: 16px;
  }

  .metric-item {
    min-height: 100px;
    padding: 16px;
  }

  .metric-item strong {
    font-size: 25px;
  }

  .library-workspace {
    padding-right: 16px;
    padding-left: 16px;
  }

  .content-toolbar {
    align-items: flex-end;
  }

  .select-wrap.compact {
    width: 150px;
  }

  .icon-segment {
    display: none;
  }

  .content-grid,
  .content-grid.is-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }

  .content-grid.is-list .note-card {
    min-height: 0;
    display: block;
  }

  .content-grid.is-list .cover-button {
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .content-grid.is-list .note-body {
    display: block;
    padding: 12px;
  }

  .content-grid.is-list .note-title {
    min-height: 45px;
    margin-bottom: 10px;
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .content-grid.is-list .note-meta {
    display: flex;
    margin-bottom: 10px;
  }

  .content-grid.is-list .note-footer {
    display: flex;
    padding-top: 9px;
    border-top: 1px solid var(--line);
  }

  .note-body {
    padding: 11px;
  }

  .note-title {
    min-height: 43px;
    font-size: 13px;
    line-height: 1.6;
  }

  .category-tag {
    max-width: calc(100% - 32px);
  }

  .card-actions .card-action:first-child {
    display: none;
  }

  .top-title-list {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 110px 1fr 44px;
  }

  .analysis-section {
    min-height: 0;
  }

  .cover-principles {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }

  .cover-principles article,
  .cover-principles article:first-child,
  .cover-principles article:nth-child(2) {
    min-height: 0;
    padding: 28px 18px;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .cover-principles span {
    margin-bottom: 22px;
  }

  .cover-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 10px;
  }

  .drawer-content {
    padding: 16px 16px 32px;
  }

  .drawer-title {
    font-size: 21px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
