.hero-home {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.hero-home::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 46%);
}

.hero-home[style*="--hero-image"]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--surface) 30%, color-mix(in srgb, var(--surface) 86%, transparent)), var(--hero-image) center / cover no-repeat;
  opacity: .2;
}

.hero-stage { position: relative; z-index: 1; min-height: 360px; display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(288px, .82fr); align-items: center; gap: 36px; }
.hero-copy-column { min-width: 0; padding: 48px 0 44px; }
.hero-home h1 { max-width: 720px; margin: 0 0 8px; color: var(--text-strong); font-size: 42px; line-height: 1.14; letter-spacing: -0.035em; text-wrap: balance; }
.hero-copy { max-width: 640px; margin: 0 0 20px; color: var(--muted); font-size: 16px; text-wrap: pretty; }
.hero-search { width: min(100%, 760px); }
.source-strip { width: min(100%, 760px); display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; }
.source-strip-label { color: var(--subtle); font-size: 12px; }
.source-chip { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; color: var(--muted); font-size: 12px; font-weight: 650; }
.source-chip img { width: 22px; height: 22px; object-fit: contain; }

.hero-latest { min-width: 0; border-left: 1px solid var(--line); padding-left: 24px; }
.hero-latest-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hero-latest-heading .latest-icon { width: 32px; height: 32px; border-radius: 8px; }
.hero-latest-heading h2 { margin: 0; color: var(--text-strong); font-size: 17px; line-height: 1.25; }
.hero-latest-list { display: grid; }
.hero-latest-row { min-width: 0; min-height: 38px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 6px; border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent); color: var(--text); font-size: 13px; }
.hero-latest-row:last-child { border-bottom: 0; }
.hero-latest-row:hover, .hero-latest-row:focus-visible { color: var(--accent); }
.hero-latest-index { color: var(--subtle); font-size: 10px; font-variant-numeric: tabular-nums; }
.hero-latest-row:nth-child(-n+3) .hero-latest-index { color: var(--accent); font-weight: 800; }
.hero-latest-row .row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-latest-row .row-time { color: var(--subtle); font-size: 10px; font-variant-numeric: tabular-nums; }

.home-index { padding-block: 22px 16px; }
.home-template main { min-height: 0; }
.content-section { padding: 0; }
.discovery-heading { align-items: center; margin-bottom: 0; padding-bottom: 4px; }
.discovery-heading .latest-icon { width: 32px; height: 32px; border-radius: 8px; }
.discovery-tabs, .inline-tabs { display: flex; align-items: center; gap: 16px; overflow-x: auto; scrollbar-width: none; }
.discovery-tabs { max-width: 70%; }
.discovery-tabs::-webkit-scrollbar, .inline-tabs::-webkit-scrollbar { display: none; }
.discovery-tabs .tab, .inline-tabs .tab, .mode-tabs .tab {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 8px 2px 7px;
  background: transparent;
}
.discovery-tabs .tab img, .inline-tabs .tab img { width: 18px; height: 18px; object-fit: contain; }
.discovery-tabs .tab:hover, .inline-tabs .tab:hover, .mode-tabs .tab:hover { color: var(--text-strong); background: transparent; }
.discovery-tabs .tab.active, .inline-tabs .tab.active, .mode-tabs .tab.active { border-color: var(--accent); color: var(--accent); background: transparent; box-shadow: none; }
.discovery-panel { min-width: 0; }
.track-list, .trend-rich-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.discovery-section .resource-row { min-height: 52px; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 6px 2px; }
.discovery-section .drive-badge { width: 28px; height: 28px; border-radius: 0; background: transparent; }
.discovery-section .drive-badge img { width: 24px; height: 24px; }
.discovery-section .row-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.discovery-section .row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discovery-section .row-meta { flex-wrap: nowrap; font-variant-numeric: tabular-nums; }
.discovery-section .rank-row { min-height: 48px; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; padding: 4px 2px; }
.discovery-section .rank-number { color: var(--accent); }
.discovery-section .search-cue { opacity: 0; transition: opacity var(--motion-fast), color var(--motion-fast); }
.discovery-section .rank-row:hover .search-cue, .discovery-section .rank-row:focus-visible .search-cue { opacity: 1; color: var(--accent); }

.search-page, .detail-page { min-height: 0; padding: 20px 0 24px; }
.search-shell { width: min(calc(100% - 40px), 1120px); }
.search-toolbar { max-width: 760px; margin-bottom: 12px; }
.compact-search { min-height: 44px; gap: 3px; padding: 3px; border-radius: 11px; }
.compact-search .search-field { gap: 8px; padding-left: 10px; }
.compact-search .search-icon { width: 18px; height: 18px; }
.compact-search input { padding: 9px 10px 9px 0; }
.compact-search .search-submit { min-width: 84px; border-radius: 8px; }
.compact-search .button { min-height: 38px; padding: 7px 14px; }
.search-context-bar { min-height: 46px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.mode-tabs { width: fit-content; display: flex; gap: 20px; margin: 0; }
.mode-tab { flex: 0 0 auto; }
.search-context-summary { min-width: 0; min-height: 44px; display: flex; align-items: center; color: var(--muted); font-size: 13px; text-align: right; }
.search-context-summary > div { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.search-context-summary strong { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.context-switch { min-height: 44px; border: 0; padding: 0; color: var(--accent); background: transparent; font: inherit; font-weight: 680; cursor: pointer; }
.context-switch:hover { color: var(--accent-hover); }
.search-content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 32px; }
.search-content-full { grid-template-columns: 1fr; }
.search-results-column, .result-surface { min-width: 0; }
.filter-tabs { min-height: 48px; display: flex; align-items: center; gap: 3px; overflow-x: auto; margin-bottom: 8px; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs .tab { min-height: 40px; padding: 7px 10px; }
.drive-tab img { width: 22px; height: 22px; object-fit: contain; }
.result-row { min-height: 76px; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; }
.result-list .drive-badge { width: 34px; height: 34px; border-radius: 0; background: transparent; }
.result-list .drive-badge img { width: 30px; height: 30px; }
.result-row .row-title { font-size: 15px; }
.result-row .row-meta { gap: 4px 10px; }
.result-row .row-meta span + span::before { content: "·"; margin-right: 10px; color: var(--subtle); }
.row-actions { display: flex; align-items: center; gap: 8px; }
.row-actions .button, .article-actions .button { min-height: 36px; padding: 6px 14px; }
.row-actions .button.secondary, .article-actions .button.secondary { border-color: transparent; color: var(--text); background: var(--surface-muted); }
.row-actions .button.secondary:hover, .article-actions .button.secondary:hover { color: var(--accent); background: var(--surface-accent); }
.copy-action { min-width: 82px; }
.sse-list:empty { display: none; }
.empty-state { min-height: 220px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 32px 0; color: var(--muted); background: transparent; text-align: center; }
.empty-state img { width: min(220px, 70vw); max-height: 140px; object-fit: contain; }
.empty-graphic { width: 80px; height: 80px; display: grid; place-items: center; border-radius: 20px; margin-bottom: 16px; color: var(--accent); background: var(--surface-accent); }
.empty-graphic > .icon { width: 32px; height: 32px; }
.empty-providers { display: none; }
.empty-state h2 { margin: 0 0 4px; color: var(--text-strong); font-size: 20px; }
.empty-state p { margin: 0 0 16px; }
.page { display: flex; justify-content: center; padding-top: 20px; }
.page .el-pagination { gap: 3px; color: var(--muted); }
.page .el-pagination button, .page .el-pager li { position: relative; min-width: 40px !important; height: 40px !important; margin: 0 !important; border-radius: 8px !important; color: var(--muted) !important; background: transparent !important; }
.page .el-pagination button:not(:disabled):hover, .page .el-pager li:hover { color: var(--accent) !important; background: var(--surface-accent) !important; }
.page .el-pager li.is-active { color: var(--accent) !important; background: transparent !important; font-weight: 760; }
.page .el-pager li.is-active::after { content: ""; position: absolute; right: 10px; bottom: 3px; left: 10px; height: 2px; border-radius: 2px; background: var(--accent); }
.page .el-pagination button:disabled { opacity: .35; background: transparent !important; }

.flow-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.flow-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.flow-heading h2 { margin: 0; color: var(--text-strong); font-size: 20px; line-height: 1.3; letter-spacing: -0.02em; }
.flow-heading p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.search-trend-section { position: sticky; top: 16px; min-width: 0; border-left: 1px solid var(--line); padding-left: 24px; }
.search-trend-section .inline-tabs { border-bottom: 1px solid var(--line); }
.search-trend-section .flow-heading { margin-bottom: 4px; }
.search-trend-section .flow-heading h2 { font-size: 18px; }
.trend-compact-panel .discovery-row { min-height: 68px; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 7px 0; }
.search-trend-cover, .search-trend-cover-placeholder { width: 40px; height: 52px; border-radius: 7px; background: var(--surface-muted); }
.search-trend-cover { object-fit: cover; }
.search-trend-cover-placeholder { display: grid; place-items: center; color: var(--accent); }
.search-trend-cover-placeholder .icon { width: 18px; height: 18px; }
.trend-title-line { min-width: 0; display: flex; align-items: baseline; gap: 5px; }

.detail-shell { width: min(calc(100% - 40px), 1180px); }
.detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 8px; }
.detail-search-masthead { min-width: 0; flex: 1; max-width: 680px; }
.back-link { min-height: 44px; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; font-weight: 650; }
.back-link:hover { color: var(--accent); }
.back-link .icon { transform: rotate(180deg); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 36px; }
.detail-layout-full { grid-template-columns: 1fr; }
.detail-main { min-width: 0; }
.resource-article { min-width: 0; }
.article-header { padding: 16px 0 12px; }
.provider-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.provider-badge { min-height: 32px; display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 700; }
.provider-badge img { width: 24px; height: 24px; object-fit: contain; }
.article-header h1 { max-width: 920px; margin: 0 0 12px; color: var(--text-strong); font-size: 28px; line-height: 1.25; letter-spacing: -0.03em; overflow-wrap: anywhere; text-wrap: balance; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 13px; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-body { padding-top: 12px; }
.article-content { max-width: 76ch; color: var(--muted); font-size: 15px; }
.article-content::after { content: ""; display: block; clear: both; }
.article-content p { margin: 0 0 12px; }
.article-cover { float: left; width: 176px; max-height: 248px; margin: 0 20px 16px 0; border-radius: var(--radius); object-fit: cover; }
.resource-access { clear: both; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; margin-top: 16px; border-block: 1px solid var(--line); padding-block: 14px; }
.resource-facts { min-width: 0; display: grid; gap: 6px; margin: 0; }
.resource-facts > div { min-width: 0; display: flex; align-items: center; gap: 12px; }
.resource-facts dt { flex: 0 0 64px; color: var(--muted); font-size: 12px; font-weight: 700; }
.resource-facts dd { min-width: 0; flex: 1; margin: 0; }
.resource-address { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px; border: 0; padding: 0; color: var(--accent); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.resource-address span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-code { min-height: 32px; display: inline-flex; align-items: center; color: var(--text-strong); font-weight: 750; font-variant-numeric: tabular-nums; }
.article-actions { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; }

.compact-rank-row { min-height: 48px; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 6px; padding: 6px 0; }
.compact-rank-row .row-title { font-size: 14px; }
.row-time { color: var(--subtle); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.detail-resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.detail-resource-grid .compact-rank-row:nth-last-child(-n+2) { border-bottom: 0; }
.resource-list-section:has(.compact-rank-list:empty) { display: none; }

.detail-sidebar { position: sticky; top: 24px; min-width: 0; margin-top: 16px; border-left: 1px solid var(--line); padding-left: 24px; }
.detail-sidebar-tabs { display: none; }
.sidebar-section + .sidebar-section { margin-top: 16px; }
.sidebar-heading { min-height: 32px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.sidebar-heading-icon { width: 22px; height: 22px; flex: 0 0 22px; }
.sidebar-heading-icon { border-radius: 5px; object-fit: cover; }
.sidebar-heading h2 { margin: 0; color: var(--text-strong); font-size: 16px; line-height: 1.3; }
.sidebar-row { min-height: 38px; grid-template-columns: 15px minmax(0, 1fr); gap: 5px; padding: 2px 0; }
.sidebar-row .row-title { overflow: hidden; font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.discovery-row { min-height: 52px; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 7px 0; }
.discovery-row .row-meta { min-width: 0; align-items: baseline; }
.discovery-row .row-meta > span:first-child { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.trend-compact-panel .rank-number { color: var(--accent); }
