:root {
  --brand: #8b5cf6;
  --brand-strong: #7c3aed;
  --brand-soft: #f3e8ff;
  --ink: #172033;
  --muted: #64748b;
  --soft-muted: #94a3b8;
  --line: #e2e8f0;
  --surface: #ffffff;
  --canvas: #fff7ff;
  --shadow: 0 16px 38px rgb(80 52 124 / 10%);
  --radius: 16px;
  background: var(--canvas);
  color: var(--ink);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: #fff7ff;
  color: var(--ink);
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

button,
input {
  font: inherit;
}

button {
  touch-action: manipulation;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -52px;
  left: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--brand-strong);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

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

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid rgb(226 232 240 / 92%);
  background: rgb(255 255 255 / 86%);
  box-shadow: 0 2px 12px rgb(15 23 42 / 5%);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 68px;
  gap: 20px;
}

.top-crumbs {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: #cbd5e1;
  font-size: 16px;
}

.top-crumbs a,
.top-crumbs span {
  white-space: nowrap;
}

.top-crumbs a {
  color: #1e293b;
  font-weight: 750;
  text-decoration: none;
}

.top-crumbs a:hover,
.top-favorites:hover,
.back-link:hover,
.detail-actions a:hover,
.section-heading a:hover {
  color: var(--brand-strong);
}

.back-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.top-crumb-current {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  font-weight: 700;
  text-overflow: ellipsis;
}

.top-favorites {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgb(80 52 124 / 6%);
}

.top-favorites span[aria-hidden="true"] {
  color: #ef4444;
  font-size: 16px;
  line-height: 1;
}

.top-favorites-mobile {
  display: none;
}

.page-main {
  width: min(1120px, calc(100% - 64px));
  min-height: calc(100vh - 170px);
  padding: 38px 0 76px;
  flex: 1;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgb(255 255 255 / 78%);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner > div {
  display: grid;
  gap: 5px;
}

.footer-inner strong {
  color: #1e293b;
  font-size: 15px;
}

.footer-inner nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-inner a,
.back-link,
.detail-actions a,
.section-heading a,
.card-link {
  color: #6d28d9;
  font-weight: 700;
  text-decoration: none;
}

.download-frame {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  clip: rect(0 0 0 0);
}

.download-login-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  color: var(--ink);
  box-shadow: 0 24px 70px rgb(30 34 43 / 24%);
}

.download-login-dialog::backdrop {
  background: rgb(15 23 42 / 48%);
}

.download-login-dialog form {
  padding: 26px;
}

.dialog-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 850;
}

.download-login-dialog h2 {
  margin: 0 0 10px;
  font-size: 21px;
}

.download-login-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.download-login-dialog form > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}

.download-login-dialog button,
.preview-error button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}

.download-login-dialog .dialog-primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.download-status {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  max-width: min(380px, calc(100vw - 40px));
  padding: 13px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  box-shadow: 0 14px 38px rgb(30 34 43 / 16%);
}

.download-status[data-kind="success"] {
  border-color: #a7f3d0;
  color: #047857;
}

.download-status[data-kind="error"] {
  border-color: #fecdd3;
  color: #be123c;
}

.resource-seo-heading {
  max-width: 760px;
  margin: -4px 0 28px;
}

.resource-seo-heading h1 {
  margin: 0;
  color: #172033;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: 0;
}

.resource-seo-heading p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.75;
}

.resource-browser {
  margin-bottom: 32px;
}

.filter-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: end;
  gap: 24px;
}

.filter-lines {
  display: grid;
  gap: 20px;
}

.filter-line {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.filter-label {
  width: 46px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 850;
}

.filter-line a {
  color: #64748b;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
}

.filter-line a:hover,
.filter-line a[aria-current="true"] {
  color: #172033;
  font-weight: 850;
}

.resource-search {
  position: relative;
  min-width: 0;
}

.resource-search label,
.resource-search button {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 15px;
  height: 15px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: #94a3b8;
  content: "";
  transform: rotate(45deg);
}

.resource-search input {
  width: 100%;
  min-height: 40px;
  padding: 0 18px 0 40px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #fff;
  color: #1e293b;
  font-size: 14px;
  box-shadow: 0 5px 16px rgb(80 52 124 / 7%);
  outline: none;
}

.resource-search input:focus {
  border-color: #c4b5fd;
  box-shadow: 0 0 0 4px rgb(139 92 246 / 13%);
}

.active-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: -6px 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.active-summary strong {
  color: #1e293b;
  font-size: 15px;
}

.active-summary span {
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: rgb(255 255 255 / 72%);
}

.active-summary a {
  color: var(--brand-strong);
  font-weight: 700;
  text-decoration: none;
}

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

.resource-card {
  position: relative;
  display: flex;
  width: 100%;
  overflow: hidden;
  min-height: 100%;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgb(80 52 124 / 7%);
  transition:
    box-shadow 180ms ease,
    transform 180ms ease,
    border-color 180ms ease;
}

.detail-favorite-button .favorite-label::before {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  font-size: 18px;
  line-height: 1;
  content: "\2661";
}

.detail-favorite-button[aria-pressed="true"] .favorite-label::before {
  color: #ef4444;
  content: "\2665";
}

.resource-card:hover {
  border-color: #d8b4fe;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef2f7;
  text-decoration: none;
}

.card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms ease;
}

.card-cover-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 24px;
  color: #475569;
  font-size: 18px;
  font-weight: 850;
  text-align: center;
}

.resource-card:hover .card-cover img {
  transform: scale(1.045);
}

.card-body {
  display: flex;
  min-height: 188px;
  flex-direction: column;
  padding: 16px 16px 14px;
}

.card-body h2 {
  margin: 0;
  color: #1e293b;
  font-size: 15px;
  line-height: 1.55;
}

.card-body h2 a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.card-body h2 a:hover {
  color: var(--brand-strong);
}

.card-body p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.card-tags span,
.format-mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid #edf2f7;
  border-radius: 5px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.format-mark {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 850;
}

.tag-type::before {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  color: currentColor;
  font-size: 12px;
  line-height: 1;
  content: "\25A1";
}

.format-lesson_plan {
  --type-color: #2563eb;
  --type-soft: #eff6ff;
}

.format-courseware_ppt {
  --type-color: #ea580c;
  --type-soft: #fff7ed;
}

.format-handout {
  --type-color: #7c3aed;
  --type-soft: #f5f3ff;
}

.format-paper {
  --type-color: #dc2626;
  --type-soft: #fff1f2;
}

.format-exercise {
  --type-color: #059669;
  --type-soft: #ecfdf5;
}

.format-knowledge_image {
  --type-color: #0891b2;
  --type-soft: #ecfeff;
}

.format-knowledge_video {
  --type-color: #0284c7;
  --type-soft: #f0f9ff;
}

.format-lesson_plan,
.format-courseware_ppt,
.format-handout,
.format-paper,
.format-exercise,
.format-knowledge_image,
.format-knowledge_video {
  border-color: color-mix(in srgb, var(--type-color) 14%, #fff);
  background: var(--type-soft);
  color: var(--type-color);
}

.card-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  color: #94a3b8;
  font-size: 12px;
}

.metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #8a97aa;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.metric::before {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
}

.metric-view::before {
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2394a3b8'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2.062%2012.348a1%201%200%200%201%200-.696%2010.75%2010.75%200%200%201%2019.876%200%201%201%200%200%201%200%20.696%2010.75%2010.75%200%200%201-19.876%200'/%3E%3Ccircle%20cx='12'%20cy='12'%20r='3'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  content: "";
}

.metric-view {
  position: relative;
}

.metric-view::after {
  content: none;
}

.metric-download::before,
.metric-download-static::before {
  content: "\2193";
}

.metric-favorite-static::before {
  content: "\2661";
}

.metric-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.metric-button:hover {
  color: var(--brand-strong);
}

.favorite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.favorite-button:hover,
.favorite-button[aria-pressed="true"] {
  border-color: #ddd6fe;
  background: #faf5ff;
  color: var(--brand-strong);
}

.favorite-button:disabled,
.download-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--brand);
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgb(139 92 246 / 24%);
  cursor: pointer;
}

.download-button:hover {
  background: #7c3aed;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 320px;
  margin-top: 18px;
  padding: 56px 20px;
  border: 1px dashed #d8c4ef;
  border-radius: 16px;
  background: rgb(255 255 255 / 76%);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  margin-top: 16px;
  color: #1e293b;
  font-size: 17px;
}

.empty-state p {
  margin: 8px 0 0;
  font-size: 13px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #687080;
  font-size: 13px;
  text-decoration: none;
}

.detail-shell {
  width: min(100%, 1120px);
  margin: -10px auto 0;
}

.detail-hero {
  position: relative;
  display: block;
  height: 300px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 18px 18px 0 0;
  background: #e8edf4;
  box-shadow: 0 18px 42px rgb(80 52 124 / 10%);
}

.detail-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero .card-cover-fallback {
  font-size: 32px;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(15 23 42 / 8%) 0, rgb(15 23 42 / 12%) 42%, rgb(15 23 42 / 66%) 100%),
    linear-gradient(90deg, rgb(15 23 42 / 45%), transparent 58%);
}

.detail-favorite-button {
  position: absolute;
  z-index: 3;
  top: 20px;
  right: 20px;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-color: rgb(255 255 255 / 70%);
  border-radius: 999px;
  background: rgb(255 255 255 / 92%);
  color: #334155;
  box-shadow: 0 14px 28px rgb(15 23 42 / 18%);
  backdrop-filter: blur(12px);
}

.detail-favorite-button .favorite-label {
  width: 18px;
  height: 18px;
  overflow: hidden;
  font-size: 0;
}

.detail-hero-content {
  position: absolute;
  right: 32px;
  bottom: 28px;
  left: 32px;
  color: #fff;
}

.hero-tags {
  margin-top: 0;
  margin-bottom: 12px;
}

.hero-tags span {
  border-color: rgb(255 255 255 / 16%);
  background: rgb(255 255 255 / 22%);
  color: #fff;
  backdrop-filter: blur(10px);
}

.hero-tags .tag-type::before {
  color: #fdba74;
}

.detail-hero h1 {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-size: 31px;
  line-height: 1.28;
  letter-spacing: 0;
  text-shadow: 0 2px 14px rgb(15 23 42 / 36%);
  overflow-wrap: anywhere;
}

.detail-panel {
  overflow: hidden;
  margin-bottom: 30px;
  border: 1px solid #e2e8f0;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgb(80 52 124 / 8%);
}

.detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border-bottom: 1px solid #f1f5f9;
}

.detail-metrics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  color: #64748b;
  font-size: 14px;
}

.detail-metrics .metric {
  color: #64748b;
  font-size: 14px;
}

.detail-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.favorite-button-large {
  min-height: 46px;
  padding: 0 22px;
}

.resource-intro {
  padding: 30px 32px 34px;
}

.resource-intro h2 {
  margin: 0 0 18px;
  color: #172033;
  font-size: 18px;
}

.resource-intro p {
  margin: 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.9;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid #e2e8f0;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: #fff;
  color: #64748b;
  font-size: 12px;
}

.preview-toolbar > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-toolbar strong {
  color: #1e293b;
  font-size: 14px;
}

.preview-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.preview-panel {
  overflow: hidden;
  min-height: 360px;
  border: 1px solid #e2e8f0;
  border-radius: 0 0 16px 16px;
  background: #fff;
}

.preview-panel video,
.preview-panel .detail-image {
  display: block;
  width: 100%;
  max-height: 78vh;
  background: #0f172a;
}

.preview-panel .detail-image {
  height: auto;
  object-fit: contain;
  background: #fff;
}

.preview-panel-document {
  height: min(78vh, 920px);
  min-height: 680px;
}

.onlyoffice-host,
.preview-panel-document > iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
}

.preview-loading,
.preview-error {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.preview-error {
  gap: 16px;
}

.detail-actions {
  margin-top: 22px;
}

.recommendations {
  margin-top: 34px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 16px;
}

.section-heading h2 {
  margin: 0;
  color: #1e293b;
  font-size: 20px;
}

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

.recommendation-list a {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #1e293b;
  text-decoration: none;
}

.recommendation-list img {
  width: 96px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
}

.recommendation-list span {
  display: grid;
  align-content: center;
  min-width: 0;
  gap: 4px;
}

.recommendation-list small {
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.recommendation-list strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorites-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.favorites-heading h1 {
  margin: 0;
  color: #172033;
  font-size: 34px;
  line-height: 1.2;
}

.favorites-heading p {
  margin: 10px 0 0;
  color: var(--muted);
}

.favorites-panel .resource-grid {
  margin-top: 4px;
}

.favorites-more {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

.favorites-more .download-button {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 10px;
}

@media (max-width: 1120px) {
  .resource-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .shell,
  .page-main {
    width: min(100% - 28px, 1120px);
  }

  .header-inner {
    width: calc(100% - 28px);
    min-height: 68px;
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
  }

  .top-favorites {
    display: none;
  }

  .top-crumbs {
    width: auto;
    flex: 0 1 auto;
    font-size: 15px;
  }

  .top-favorites-mobile {
    position: static !important;
    z-index: 80;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    min-height: 36px;
    margin-left: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #ef4444 !important;
    box-shadow: 0 6px 16px rgb(80 52 124 / 6%);
  }

  .top-crumb-current {
    max-width: 42vw;
  }

  .page-main {
    padding-top: 36px;
  }

  .filter-strip {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .filter-line {
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 10px 18px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .filter-line::-webkit-scrollbar {
    display: none;
  }

  .filter-label {
    flex: 0 0 auto;
    width: 44px;
  }

  .filter-line a {
    flex: 0 0 auto;
  }

  .resource-search {
    width: 100%;
  }

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

  .detail-shell {
    margin-top: -4px;
  }

  .detail-hero {
    height: 270px;
  }

  .detail-hero-content {
    right: 22px;
    bottom: 24px;
    left: 22px;
  }

  .detail-hero h1 {
    font-size: 25px;
  }

  .detail-bar {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .resource-intro {
    padding: 24px;
  }

  .preview-panel-document {
    height: 72dvh;
    min-height: 480px;
  }

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

@media (max-width: 560px) {
  .shell,
  .page-main {
    width: min(100% - 28px, 1120px);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 22px 0;
  }

  .footer-inner nav {
    flex-wrap: wrap;
    gap: 14px;
  }

  .filter-lines {
    gap: 18px;
  }

  .filter-line {
    align-items: flex-start;
    gap: 10px 16px;
  }

  .filter-line a {
    margin-right: 0;
  }

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

  .card-body {
    min-height: 190px;
  }

  .detail-hero {
    height: 260px;
  }

  .detail-favorite-button {
    top: 14px;
    right: 14px;
  }

  .detail-hero h1 {
    font-size: 22px;
  }

  .detail-metrics {
    gap: 14px;
  }

  .detail-buttons {
    width: 100%;
  }

  .detail-buttons button {
    flex: 1 1 140px;
  }

  .preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 10px 14px;
  }
}
