/* ===================================================================
   FXBrokerTrust 前台样式
   来源：frontend/app/globals.css（去掉 @tailwind 指令，改用 Tailwind Play CDN）
   =================================================================== */

/* 主色底上保证文字对比度 */
.bg-accent.text-white {
    color: var(--c-on-accent) !important;
}

/* 视觉隐藏、屏幕阅读器可读（与 Tailwind .sr-only 一致，供非 Tailwind 场景兜底） */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============ Theme Variables ============ */
:root {
    --c-bg: #f5f7fa;
    --c-surface: #ffffff;
    --c-card: #ffffff;
    --c-card-hover: #f8fafc;
    --c-border: #e5e7eb;
    --c-border-lt: #d1d5db;
    --c-fg: #111827;
    --c-fg-m: #4b5563;
    --c-fg-d: #9ca3af;
    --c-accent: #1d4ed8;
    --c-accent-dk: #1e40af;
    --c-on-accent: #ffffff;
    --c-gold: #b45309;
    --c-danger: #dc2626;
    --c-warning: #d97706;
    --c-safe: #059669;

    --c-accent-glow: rgba(29, 78, 216, 0.08);
    --c-accent-bg: rgba(29, 78, 216, 0.06);
    --c-gold-bg: rgba(180, 83, 9, 0.06);
    --c-danger-bg: rgba(220, 38, 38, 0.05);
    --c-warning-bg: rgba(217, 119, 6, 0.06);
    --c-safe-bg: rgba(5, 150, 105, 0.06);
    --c-shadow: rgba(0, 0, 0, 0.06);
    --c-shadow-lg: rgba(0, 0, 0, 0.1);
    --c-nav-bg: rgba(255, 255, 255, 0.85);
    --c-hero-gradient: linear-gradient(135deg, #eff6ff 0%, #f5f7fa 40%, #eef2ff 100%);
    --c-hero-orb1: rgba(29, 78, 216, 0.06);
    --c-hero-orb2: rgba(29, 78, 216, 0.05);
    --c-grid-line: rgba(29, 78, 216, 0.04);
    --c-score-track: #e5e7eb;
}

/* ============ Reset & Base ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--c-bg);
    color: var(--c-fg);
    font-family: 'Inter', "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Alpine cloak */
[x-cloak] {
    display: none !important;
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--c-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--c-border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--c-border-lt);
}

/* ============ Background Grid ============ */
.bg-grid {
    background-image:
        linear-gradient(var(--c-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--c-grid-line) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ============ Glow Orbs ============ */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    opacity: 0.6;
}

/* ============ Keyframes ============ */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-14px);
    }
}

.float-anim {
    animation: float 7s ease-in-out infinite;
}

.float-anim-d1 {
    animation: float 7s ease-in-out 2s infinite;
}

.float-anim-d2 {
    animation: float 7s ease-in-out 4s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 首页列表错位进场延迟（替代模板内联 {(...)} 运算，方案A：CSS nth-child）。
   各组延迟与原内联公式一致：broker ×0.025s / compare ×0.05s / scoring ×0.04s / methodology ×0.06s / regulators ×0.04s。 */
.home-broker-row:nth-child(1) {
    transition-delay: 0s;
}

.home-broker-row:nth-child(2) {
    transition-delay: .025s;
}

.home-broker-row:nth-child(3) {
    transition-delay: .05s;
}

.home-broker-row:nth-child(4) {
    transition-delay: .075s;
}

.home-broker-row:nth-child(5) {
    transition-delay: .1s;
}

.home-broker-row:nth-child(6) {
    transition-delay: .125s;
}

.home-broker-row:nth-child(7) {
    transition-delay: .15s;
}

.home-broker-row:nth-child(8) {
    transition-delay: .175s;
}

.home-broker-row:nth-child(9) {
    transition-delay: .2s;
}

.home-broker-row:nth-child(10) {
    transition-delay: .225s;
}

.home-compare-card:nth-child(1) {
    transition-delay: 0s;
}

.home-compare-card:nth-child(2) {
    transition-delay: .05s;
}

.home-compare-card:nth-child(3) {
    transition-delay: .1s;
}

.home-compare-card:nth-child(4) {
    transition-delay: .15s;
}

.home-scoring-card:nth-child(1) {
    transition-delay: 0s;
}

.home-scoring-card:nth-child(2) {
    transition-delay: .04s;
}

.home-scoring-card:nth-child(3) {
    transition-delay: .08s;
}

.home-scoring-card:nth-child(4) {
    transition-delay: .12s;
}

.home-scoring-card:nth-child(5) {
    transition-delay: .16s;
}

.home-scoring-card:nth-child(6) {
    transition-delay: .2s;
}

.home-method-step:nth-child(1) {
    transition-delay: 0s;
}

.home-method-step:nth-child(2) {
    transition-delay: .06s;
}

.home-method-step:nth-child(3) {
    transition-delay: .12s;
}

.home-method-step:nth-child(4) {
    transition-delay: .18s;
}

.home-reg-card:nth-child(1) {
    transition-delay: 0s;
}

.home-reg-card:nth-child(2) {
    transition-delay: .04s;
}

.home-reg-card:nth-child(3) {
    transition-delay: .08s;
}

.home-reg-card:nth-child(4) {
    transition-delay: .12s;
}

.home-reg-card:nth-child(5) {
    transition-delay: .16s;
}

.home-reg-card:nth-child(6) {
    transition-delay: .2s;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-anim {
    opacity: 0;
    animation: countUp 0.7s ease-out forwards;
}

@keyframes searchPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 var(--c-accent-glow);
    }

    50% {
        box-shadow: 0 0 0 8px transparent;
    }
}

.search-box:focus-within {
    animation: searchPulse 2s ease-in-out infinite;
    border-color: var(--c-accent) !important;
}

@keyframes flash-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ============ Tag Pill ============ */
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* 交易商详情：移动端监管标签单行，放不下的整颗标签隐藏（由 JS fitRegBadges 控制） */
@media (max-width: 639px) {
    .broker-reg-badges {
        --broker-reg-badge-row: 1.5rem;
        flex-wrap: nowrap;
        max-width: 100%;
        margin-bottom: 0.5rem;
        overflow: hidden;
    }

    .broker-reg-badges .tag-pill {
        height: var(--broker-reg-badge-row);
        box-sizing: border-box;
        flex-shrink: 0;
    }
}

/* ============ Score Ring (default 48px) ============ */
.score-ring {
    position: relative;
    width: 48px;
    height: 48px;
}

.score-ring svg {
    transform: rotate(-90deg);
}

.score-ring .score-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

/* ============ Score Ring Large (80px) ============ */
.score-ring-lg {
    position: relative;
    width: 80px;
    height: 80px;
}

.score-ring-lg svg {
    transform: rotate(-90deg);
}

.score-ring-lg .score-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-ring-lg .score-num {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.score-ring-lg .score-label {
    font-size: 9px;
    color: var(--c-fg-d);
    margin-top: 1px;
}

/* ============ Score Bar ============ */
.score-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--c-border);
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

/* ============ Broker Table ============ */
.broker-table {
    border-collapse: collapse;
}

.broker-table th,
.broker-table td {
    vertical-align: middle;
}

/* Alpine <template> 内的 Tailwind 响应式类可能未被 CDN 扫描，用本地规则保证桌面/移动列切换 */
.broker-table thead.broker-thead {
    display: none !important;
}

.broker-table td.broker-col-desktop,
.broker-table th.broker-col-desktop {
    display: none !important;
}

.broker-table td.broker-col-mobile {
    display: table-cell !important;
}

@media (min-width: 768px) {
    .broker-table thead.broker-thead {
        display: table-header-group !important;
    }

    .broker-table td.broker-col-desktop,
    .broker-table th.broker-col-desktop {
        display: table-cell !important;
    }

    .broker-table td.broker-col-mobile {
        display: none !important;
    }
}

/* ============ Home 排行榜：桌面表格 / 移动卡片互斥显隐 ============ */
/* 拆分移动版到独立 ul（非表格），避免同一 tr 内桌面 6 列 + 移动 colspan 列叠加破坏表格行列语义；
   用 display:none 切换确保被隐藏的一份不进可访问性树，任一视口排名/名称等仅一份暴露给读屏。 */
.home-broker-table {
    display: none;
}

.home-broker-card-list {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-broker-card-item {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--c-border);
}

.home-broker-card-item:last-child {
    border-bottom: none;
}

.home-broker-card-item:hover {
    background-color: var(--c-card-hover);
}

@media (min-width: 768px) {
    .home-broker-table {
        display: table;
    }

    .home-broker-card-list {
        display: none;
    }
}

/* 移动卡片错位进场延迟（与桌面 .home-broker-row 同步，步长 0.025s） */
.home-broker-card-item:nth-child(1) {
    transition-delay: 0s;
}

.home-broker-card-item:nth-child(2) {
    transition-delay: .025s;
}

.home-broker-card-item:nth-child(3) {
    transition-delay: .05s;
}

.home-broker-card-item:nth-child(4) {
    transition-delay: .075s;
}

.home-broker-card-item:nth-child(5) {
    transition-delay: .1s;
}

.home-broker-card-item:nth-child(6) {
    transition-delay: .125s;
}

.home-broker-card-item:nth-child(7) {
    transition-delay: .15s;
}

.home-broker-card-item:nth-child(8) {
    transition-delay: .175s;
}

.home-broker-card-item:nth-child(9) {
    transition-delay: .2s;
}

.home-broker-card-item:nth-child(10) {
    transition-delay: .225s;
}

/* ============ Broker List Mobile Cards ============ */
.broker-card-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.broker-card {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--c-border);
}

.broker-card-list .broker-card-item:last-child .broker-card {
    border-bottom: none;
}

.broker-card:hover {
    background-color: var(--c-card-hover);
}

/* ============ Meta Inline ============ */
.meta-inline,
.meta-inline dd {
    margin: 0;
    padding: 0;
}

.meta-inline div {
    display: inline;
}

.meta-inline dt {
    display: none;
}

.meta-inline dd {
    display: inline;
}

.meta-inline div+div::before {
    content: " · ";
    margin: 0 0.25em;
    color: var(--c-fg-m);
}

/* ============ Site container (SSR critical — before Tailwind CDN) ============ */
.max-w-8xl {
    max-width: 1400px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .lg\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ============ Insights List Layout (SSR critical — before Tailwind CDN) ============ */
.insights-page-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.insights-page-main {
    flex: 1 1 0%;
    min-width: 0;
}

.insights-page-sidebar {
    display: none;
    width: 280px;
    flex-shrink: 0;
}

.insights-featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.insights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

@media (min-width: 640px) {
    .insights-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.insights-page-sidebar-mobile {
    width: 100%;
}

.recommended-brokers-sidebar__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 1023px) {
    .insights-page-sidebar {
        display: none !important;
    }

    .insights-page-sidebar-mobile .recommended-brokers-sidebar__body {
        padding: 0.75rem;
    }

    .insights-page-sidebar-mobile .recommended-brokers-sidebar__list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .insights-page-sidebar-mobile .broker-row {
        border-bottom: none;
        background: var(--c-surface);
        border: 1px solid var(--c-border);
    }

    .insights-page-sidebar-mobile .broker-row:active {
        background: var(--c-card-hover);
    }
}

@media (min-width: 480px) and (max-width: 1023px) {
    .insights-page-sidebar-mobile .recommended-brokers-sidebar__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .insights-page-body {
        flex-direction: row;
        align-items: stretch;
    }

    .insights-page-sidebar {
        display: block;
    }

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

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

.insights-grid .insight-card-wrap {
    height: 100%;
}

.insights-grid .insight-card-title {
    min-height: 2.75rem;
    /* 固定 2 行标题区（text-sm + leading-snug） */
}

.insights-grid .insight-card-excerpt {
    min-height: 2.4375rem;
    /* 固定 2 行摘要区（text-xs + leading-relaxed） */
    flex: 1 0 auto;
}

/* ============ Sticky Sidebar Dock（双栏 PC 侧栏贴底） ============ */
.sticky-sidebar-layout {
    position: relative;
    align-items: stretch;
}

@media (min-width: 1024px) {
    .sticky-sidebar-layout__aside {
        position: relative;
        align-self: stretch;
        flex-shrink: 0;
    }

    .sticky-sidebar-dock {
        position: absolute;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1;
    }

    /* 文章详情：纯 CSS sticky，避免 JS 改 top 导致目录点击时侧栏颤动 */
    .insight-detail-sidebar-dock.sticky-sidebar-dock {
        position: sticky;
        top: 80px;
        align-self: flex-start;
    }
}

/* 文章卡片：标题链接触发整卡点击（::after 拉伸），避免块级链接包裹 h2/p */
.insight-article-card,
.insights-featured-grid .article-card {
    position: relative;
}

.article-card-title-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.article-card-title-link {
    position: relative;
    z-index: 2;
}

/* 文章详情 Hero：object-cover 裁剪焦点偏上，保留封面主体（16:9 等宽图在矮横幅中少切顶部） */
.insight-detail-hero-cover {
    object-position: center 30%;
    filter: brightness(0.4);
}

.regulators-grid .reg-card-wrap {
    display: none;
}

.regulators-grid .reg-card-wrap.reg-card-visible {
    display: block;
}

.broker-table.broker-table-filterable tbody tr.broker-row {
    display: none;
}

.broker-table.broker-table-filterable tbody tr.broker-row.broker-row-visible {
    display: table-row;
}

.broker-card-list.broker-card-list-filterable .broker-card-item {
    display: none;
}

.broker-card-list.broker-card-list-filterable .broker-card-item.broker-card-visible {
    display: list-item;
}

.home-broker-row {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--c-border);
}

/* ============ Home Insights Tabs ============ */
.home-insights-tablist {
    display: flex;
    width: 100%;
    gap: 0.375rem;
}

.home-insights-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.375rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--c-fg-m);
    background: transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.home-insights-tab:hover {
    color: var(--c-fg);
    background: var(--c-card-hover);
}

.home-insights-tab[aria-selected="true"] {
    background: var(--c-accent-glow);
    color: var(--c-accent);
    border-color: var(--c-accent);
}

/* ============ Home Insights（市场洞察）布局 ============ */
/* 移动/平板：主推 16:9，自然流式高度 */
.home-insight-featured__link {
    aspect-ratio: 16 / 9;
    width: 100%;
}

.home-insight-featured__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-insight-thumb {
    width: 8.75rem;
    aspect-ratio: 16 / 9;
    height: auto;
    flex-shrink: 0;
    align-self: flex-start;
}

.home-insight-thumb img {
    object-fit: cover;
}

@media (min-width: 1024px) {

    /* 无侧栏，或侧栏不足 3 条：主推保持固定比例，避免被矮侧栏压扁 */
    .home-insight-featured:not(:has(+ .home-insight-sidebar)) .home-insight-featured__link,
    .home-insight-layout:not(.home-insight-layout--stretch) .home-insight-featured__link {
        aspect-ratio: 5 / 3;
        height: auto;
        flex: none;
    }

    /*
     * 侧栏满 3 条：Grid 等高，行高由右侧卡片撑开；
     * 左侧主推取消固定比例，height:100% 跟随右侧总高度。
     */
    .home-insight-layout--stretch {
        align-items: stretch;
    }

    .home-insight-layout--stretch .home-insight-featured {
        display: flex;
        flex-direction: column;
        min-height: 0;
        align-self: stretch;
    }

    .home-insight-layout--stretch .home-insight-featured__link {
        flex: 1 1 auto;
        width: 100%;
        height: 100%;
        min-height: 0;
        aspect-ratio: unset;
        overflow: hidden;
    }

    .home-insight-thumb {
        width: 10rem;
    }

    .home-insights-tablist {
        gap: 0.5rem;
    }

    .home-insights-tab {
        padding: 0.375rem 0.625rem;
    }
}

@media (max-width: 639px) {

    /* 移动端：侧栏文章列表，缩略图与文字垂直居中 */
    .home-insight-item__link {
        align-items: center;
    }

    .home-insight-thumb {
        align-self: center;
    }

    /* 5 个标签等宽放在一排（不换行），过长用省略号 */
    .home-insights-tablist {
        flex-wrap: nowrap;
        gap: 0.25rem;
    }

    .home-insights-tab {
        flex: 1 1 0;
        padding: 0.375rem 0.25rem;
    }
}

/* 面板显隐改由 Alpine x-show 控制（同时管理 display 与可访问性树）；
   首屏未初始化前由 [x-cloak] 隐藏，避免闪现。不再用 CSS class 切换 display，
   否则会覆盖 x-show 的显示态。 */

/* ============ Regulator Detail Hero ============ */
.regulator-detail-hero__flag img {
    display: block;
    width: 3rem;
    height: 3rem;
    border-radius: 0.625rem;
    object-fit: cover;
}

.regulator-detail-hero__btn--primary {
    background: #3042b4;
    color: #fff;
}

.regulator-detail-hero__btn--primary:hover {
    background: #283a9a;
}

@media (max-width: 639px) {
    .regulator-detail-hero__identity {
        justify-content: center;
        width: 100%;
    }

    .regulator-detail-hero__identity .min-w-0 {
        text-align: center;
        flex: 0 1 auto;
    }

    .regulator-detail-hero__identity h1 {
        justify-content: center;
    }

    .regulator-detail-hero__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .regulator-detail-hero__actions:has(.regulator-detail-hero__btn:only-child) {
        grid-template-columns: 1fr;
    }

    .regulator-detail-hero__btn {
        min-height: 2.75rem;
        padding: 0.625rem 0.75rem;
        text-align: center;
        white-space: nowrap;
    }

    .regulator-detail-hero__btn--secondary {
        background: var(--c-card);
        border: 1px solid var(--c-border);
        color: var(--c-fg);
    }

    .regulator-detail-hero__btn--secondary:hover {
        border-color: var(--c-border-lt);
        background: var(--c-surface);
    }
}

@media (min-width: 640px) {
    .regulator-detail-hero__actions {
        flex-direction: row;
        align-items: center;
    }

    .regulator-detail-hero__btn {
        padding: 0.5rem 1rem;
    }

    .regulator-detail-hero__btn--secondary {
        background: var(--c-card);
        border: 1px solid var(--c-border);
        color: var(--c-fg);
    }

    .regulator-detail-hero__btn--secondary:hover {
        border-color: var(--c-accent);
        color: var(--c-accent);
    }
}

/* ============ Hero Search Suggest ============ */
.hero-section {
    overflow: visible;
}

/* 移动/平板（<lg，无右侧周榜卡片）：取消 hero 的 100vh 最小高度。
   否则内容用 flex items-center 垂直居中后，会在上下产生等量的大块留白（下方留白与上方一样高）。
   桌面（≥1024px）保留行内 min-height:100vh 的整屏 hero 设计。 */
@media (max-width: 1023px) {
    .hero-section {
        min-height: auto !important;
    }
}

.search-box {
    position: relative;
    z-index: 30;
}

.search-box__field {
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
}

.search-box__input {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-box__input::placeholder {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 639px) {
    .search-box__submit {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* iOS Safari：输入框字号 < 16px 聚焦时会自动放大整页，移动端统一 16px（需 !important 压过 Tailwind text-sm 等） */
@media (max-width: 1023px) {

    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="color"]),
    select,
    textarea {
        font-size: 16px !important;
    }
}

.hero-search-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 120;
    max-height: min(42vh, 280px);
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px var(--c-shadow-lg);
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .hero-search-suggest {
        max-height: min(52vh, 400px);
    }
}

.hero-search-option {
    margin: 0;
    padding: 0;
}

.hero-search-option-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    transition: background 0.15s;
}

.hero-search-option-link:hover,
.hero-search-option-link:focus {
    background: var(--c-card-hover);
    outline: none;
}

.hero-search-logo,
.hero-search-option-link .hero-search-logo {
    flex-shrink: 0;
}

.hero-search-option-name {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--c-fg);
}

.hero-search-option-score {
    line-height: 0;
}

.hero-search-empty {
    padding: 12px 10px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--c-fg-d);
}

.home-broker-row:last-child {
    border-bottom: none;
}

.home-broker-row:hover {
    background-color: var(--c-card-hover);
}

.broker-row {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--c-border);
}

.broker-row:last-child {
    border-bottom: none;
}

.broker-row:hover {
    background-color: var(--c-card-hover);
}

/* ============ Rank Badge ============ */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    color: #fff;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #B8690E);
    color: #fff;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

.rank-default {
    background: var(--c-surface);
    color: var(--c-fg-d);
}

/* ============ Filter Tag ============ */
.filter-tag {
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.filter-tag:hover,
.filter-tag.active {
    background-color: var(--c-accent-glow);
    border-color: var(--c-accent);
    color: var(--c-accent);
}

/* ============ Nav Link ============ */
.nav-link {
    position: relative;
    transition: color 0.2s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--c-accent);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--c-accent);
}

.nav-link.active {
    color: var(--c-accent);
}

.nav-link.active::after {
    width: 100%;
}

/* ============ Toast ============ */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 360px;
    backdrop-filter: blur(12px);
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: var(--c-safe-bg);
    border: 1px solid var(--c-safe);
    color: var(--c-safe);
}

.toast-warning {
    background: var(--c-warning-bg);
    border: 1px solid var(--c-warning);
    color: var(--c-warning);
}

.toast-error {
    background: var(--c-danger-bg);
    border: 1px solid var(--c-danger);
    color: var(--c-danger);
}

/* ============ News Card ============ */
.news-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--c-border);
    background: var(--c-card);
    transition: all 0.25s;
    cursor: pointer;
}

.news-card:hover {
    border-color: var(--c-border-lt);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--c-shadow-lg);
}

.news-card:hover .news-title,
.news-card:hover .nc-title {
    color: var(--c-accent);
}

/* ============ Related Articles (broker detail) ============ */
.related-articles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-article {
    border-radius: 14px;
    border: 1px solid var(--c-border);
    background: var(--c-card);
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.related-article:hover {
    border-color: var(--c-border-lt);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--c-shadow-lg);
}

.related-article__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    border-radius: inherit;
}

.related-article__link:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
}

.related-article__thumb {
    width: 136px;
    aspect-ratio: 5 / 3;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.related-article__body {
    flex: 1;
    min-width: 0;
}

.related-article__title {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.4;
    color: var(--c-fg);
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.related-article:hover .related-article__title {
    color: var(--c-accent);
}

.related-article__date {
    font-size: 11px;
    line-height: 1.4;
    color: var(--c-fg-d);
    margin: 0 0 6px;
}

.related-article__excerpt {
    font-size: 11px;
    line-height: 1.5;
    color: var(--c-fg-d);
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

@media (min-width: 400px) {
    .related-article__link {
        gap: 12px;
        padding: 12px 14px;
    }

    .related-article__title {
        font-size: 14px;
    }

    .related-article__date {
        font-size: 12px;
    }

    .related-article__excerpt {
        font-size: 12px;
    }
}

@media (min-width: 640px) {
    .related-article__link {
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
    }
}

/* ============ Article Card ============ */
.article-card {
    transition: all 0.3s ease;
    border: 1px solid var(--c-border);
    box-shadow: 0 1px 3px var(--c-shadow);
}

.article-card:hover {
    border-color: var(--c-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--c-shadow-lg);
}

/* ============ Mobile Menu ============ */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
    visibility: hidden;
}

.mobile-menu.open {
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
}

.mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.5rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--c-fg-m);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle:hover {
    color: var(--c-fg);
}

.mobile-menu-toggle:active {
    background: var(--c-card-hover);
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem 0.5rem;
    margin: 0;
    list-style: none;
}

.mobile-nav__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--c-fg);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav__link--active {
    background: var(--c-accent-glow);
    color: var(--c-accent);
    font-weight: 600;
}

.mobile-nav__icon {
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
    font-size: 1rem;
    color: var(--c-fg-m);
}

.mobile-nav__link--active .mobile-nav__icon {
    color: var(--c-accent);
}

.mobile-nav__label {
    flex: 1;
    min-width: 0;
}

.mobile-nav__chevron {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 0.6875rem;
    color: var(--c-fg-d);
}

/* ============ Compare Badge ============ */
.compare-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

/* ============ Search Box Small ============ */
.search-box-sm {
    transition: border-color 0.2s;
}

.search-box-sm:focus-within {
    border-color: var(--c-accent) !important;
}

/* ============ Pagination ============ */
.pagination-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pagination-nav>.pagination-nav__track {
    display: none !important;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
    flex-wrap: nowrap;
    padding: 0.125rem 0;
    box-sizing: border-box;
}

/* ≤374px：最简页码 */
.pagination-nav>.pagination-nav__track--mobile-sm {
    display: inline-flex !important;
}

@media (min-width: 375px) {
    .pagination-nav>.pagination-nav__track--mobile-sm {
        display: none !important;
    }

    .pagination-nav>.pagination-nav__track--mobile {
        display: inline-flex !important;
    }
}

@media (min-width: 640px) {
    .pagination-nav>.pagination-nav__track--mobile {
        display: none !important;
    }

    .pagination-nav>.pagination-nav__track--desktop {
        display: inline-flex !important;
        flex-wrap: wrap;
    }
}

.pagination-nav__jump {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pagination-nav__jump-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
}

.pagination-nav__jump-input {
    width: 3.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.25;
    border: 1px solid var(--c-border);
    border-radius: 0.5rem;
    background: var(--c-surface);
    color: var(--c-fg-m);
    outline: none;
}

.pagination-nav__jump-input:focus {
    border-color: var(--c-accent);
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid var(--c-border);
    background: var(--c-card);
    color: var(--c-fg-m);
    text-decoration: none;
    flex-shrink: 0;
}

.page-btn:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
}

.page-btn.active {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: var(--c-on-accent);
}

.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

@media (max-width: 639px) {
    .page-btn {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
        border-radius: 0.5rem;
    }

    .page-btn-nav {
        min-width: 2.25rem;
    }

    .page-btn-ellipsis {
        min-width: 1.5rem;
        padding: 0 0.125rem;
        border-color: transparent;
        background: transparent;
    }

    .pagination-nav__jump {
        width: 100%;
    }
}

/* ============ Sort Button ============ */
.sort-btn {
    transition: all 0.2s;
    cursor: pointer;
}

.sort-btn:hover {
    color: var(--c-accent);
}

.sort-btn.active {
    color: var(--c-accent);
    font-weight: 700;
}

.sort-btn.active .sort-arrow {
    opacity: 1;
}

.sort-arrow {
    opacity: 0.3;
    transition: opacity 0.2s;
}

/* ============ Filter Group ============ */
.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 13px;
    color: var(--c-fg-m);
    transition: color 0.2s;
}

.filter-group label:hover {
    color: var(--c-fg);
}

.filter-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--c-border-lt);
    background: var(--c-surface);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
}

.filter-group input[type="checkbox"]:checked {
    background: var(--c-accent);
    border-color: var(--c-accent);
}

.filter-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-on-accent);
    font-size: 10px;
    font-weight: 700;
}

/* ============ Filter Sidebar ============ */
.filter-sidebar {
    transition: transform 0.3s ease;
}

@media (max-width: 1023px) {

    /* 覆盖 Tailwind hidden：移动端用 transform 隐藏，而非 display:none */
    .filter-sidebar {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        z-index: 55;
        transform: translateX(-100%);
        background: var(--c-card);
        border-right: 1px solid var(--c-border);
        overflow-y: auto;
        padding: 24px;
    }

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

    .filter-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 54;
        background: rgba(0, 0, 0, 0.4);
    }

    .filter-overlay.open {
        display: block;
    }

    /* 固定定位的侧栏不占 flex 空间，但保险起见 */
    .filter-sidebar {
        margin: 0 !important;
    }
}

/* ============ Detail Tab ============ */
.detail-tab {
    display: inline-block;
    position: relative;
    padding: 12px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--c-fg-m);
    cursor: pointer;
    transition: color 0.2s;
    white-space: nowrap;
    text-decoration: none;
}

.detail-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    border-radius: 1px;
    transition: background 0.2s;
}

.detail-tab:hover {
    color: var(--c-fg);
}

.detail-tab.active {
    color: var(--c-accent);
    font-weight: 700;
}

.detail-tab.active::after {
    background: var(--c-accent);
}

/* ============ Info Row ============ */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--c-border);
    font-size: 13px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: var(--c-fg-m);
}

.info-row .value {
    color: var(--c-fg);
    font-weight: 600;
    text-align: right;
}

/* ============ Pros / Cons ============ */
.pros-item,
.cons-item {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--c-fg-m);
    line-height: 1.5;
}

.pros-item::before {
    content: '✓';
    color: var(--c-safe);
    font-weight: 700;
    flex-shrink: 0;
}

.cons-item::before {
    content: '✗';
    color: var(--c-danger);
    font-weight: 700;
    flex-shrink: 0;
}

.pro-line,
.con-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
    color: var(--c-fg-m);
    line-height: 1.6;
}

.pro-line::before {
    content: '✓';
    color: var(--c-safe);
    font-weight: 700;
    flex-shrink: 0;
}

.con-line::before {
    content: '✗';
    color: var(--c-danger);
    font-weight: 700;
    flex-shrink: 0;
}

/* ============ Sticky Nav ============ */
.sticky-nav {
    position: sticky;
    top: 64px;
    z-index: 30;
    background: var(--c-card);
    border-bottom: 1px solid var(--c-border);
    backdrop-filter: blur(12px);
}

.sticky-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sticky-nav li {
    display: block;
}

/* ============ Section Anchor ============ */
.section-anchor {
    scroll-margin-top: 130px;
}

/* ============ VS Badge ============ */
.vs-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    border: 3px solid var(--c-border);
    background: var(--c-card);
    color: var(--c-fg-d);
    flex-shrink: 0;
    z-index: 2;
}

/* 对比页胜负标签：PC 单行显示获胜方名称，移动端隐藏避免挤压变形 */
.cmp-verdict-badge {
    white-space: nowrap;
}

.cmp-verdict-badge--win {
    background: var(--c-safe-bg);
    color: var(--c-safe);
}

.cmp-verdict-badge--draw {
    background: var(--c-gold-bg);
    color: var(--c-gold);
}

/* ============ Compare Table ============ */
.cmp-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.cmp-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.cmp-row {
    border-bottom: 1px solid var(--c-border);
    transition: background 0.15s;
}

.cmp-row:last-child {
    border-bottom: none;
}

.cmp-row:hover {
    background: var(--c-card-hover);
}

.cmp-cell {
    padding: 14px 20px;
    font-size: 13px;
}

.cmp-cell-left {
    text-align: right;
    width: 42%;
}

.cmp-cell-center {
    text-align: center;
    padding: 14px 12px;
    min-width: 100px;
    font-weight: 600;
    color: var(--c-fg-d);
    font-size: 12px;
    background: var(--c-bg);
    width: 16%;
}

.cmp-cell-right {
    text-align: left;
    width: 42%;
}

.cmp-winner {
    color: var(--c-safe);
    font-weight: 700;
}

.cmp-loser {
    color: var(--c-fg-d);
}

.cmp-draw {
    color: var(--c-fg-m);
}

.cmp-section-header {
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
}

.cmp-section-header .cmp-cell-center {
    font-weight: 700;
    color: var(--c-accent);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============ Broker Picker（对比页） ============ */
.broker-picker {
    position: relative;
}

.broker-picker-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    text-align: left;
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: 12px;
    padding: 8px 36px 8px 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--c-fg);
    cursor: pointer;
    transition: border-color 0.2s;
}

.broker-picker-trigger:focus {
    outline: none;
    border-color: var(--c-accent);
}

.broker-picker-value {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.broker-picker-logo-wrap {
    flex-shrink: 0;
    line-height: 0;
}

.broker-picker-logo,
.broker-picker-logo-wrap img,
.broker-picker-logo-wrap div {
    display: block;
}

.broker-picker-name {
    flex: 1;
    min-width: 0;
}

.broker-picker-placeholder {
    color: var(--c-fg-d);
    font-weight: 500;
}

.broker-picker-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-fg-d);
    font-size: 12px;
    pointer-events: none;
}

.broker-picker-menu {
    position: absolute;
    z-index: 50;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--c-shadow);
    list-style: none;
    margin: 0;
    padding: 6px;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .broker-picker-menu {
        max-height: min(72vh, 560px);
    }
}

.broker-picker-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--c-fg);
}

.broker-picker-option:hover,
.broker-picker-option:focus {
    background: var(--c-card-hover);
    outline: none;
}

.broker-picker-option[aria-selected="true"] {
    background: var(--c-accent-glow);
    color: var(--c-accent);
}

/* ============ Broker Select（遗留原生样式，其他页仍可用） ============ */
.broker-select {
    position: relative;
}

.broker-select select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: 12px;
    padding: 10px 36px 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--c-fg);
    cursor: pointer;
    width: 100%;
    transition: border-color 0.2s;
}

.broker-select select:focus {
    outline: none;
    border-color: var(--c-accent);
}

.broker-select::after {
    content: '▾';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-fg-d);
    font-size: 12px;
    pointer-events: none;
}

/* ============ Category Tab ============ */
.cat-tab {
    position: relative;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--c-fg-m);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 10px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.cat-tab:hover {
    color: var(--c-fg);
    background: var(--c-card-hover);
}

.cat-tab.active {
    color: var(--c-accent);
    font-weight: 700;
    background: var(--c-accent-glow);
}

/* ============ Sidebar Link ============ */
.sidebar-link {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--c-border);
    transition: color 0.2s;
}

.sidebar-link:last-child {
    border-bottom: none;
}

.sidebar-link:hover .sidebar-link-title {
    color: var(--c-accent);
}

/* ============ Prose ============ */
.prose {
    max-width: none;
}

.prose h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--c-fg);
    margin: 48px 0 18px;
    padding-left: 14px;
    border-left: 3px solid var(--c-accent);
    line-height: 1.4;
    scroll-margin-top: 80px;
}

.prose h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--c-fg);
    margin: 32px 0 12px;
    line-height: 1.5;
    scroll-margin-top: 80px;
}

.prose p {
    font-size: 15px;
    line-height: 1.9;
    color: var(--c-fg-m);
    margin-bottom: 18px;
}

.prose ul,
.prose ol {
    margin: 16px 0 20px;
    padding: 0;
    font-size: 15px;
    line-height: 1.85;
    color: var(--c-fg-m);
}

.prose ul {
    list-style: none;
    padding-left: 0;
}

.prose ul>li {
    position: relative;
    margin: 0 0 8px;
    padding: 6px 0 6px 28px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.prose ul>li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 1.2em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-accent);
    transform: translateY(-50%);
}

.prose ol {
    list-style: none;
    counter-reset: prose-ol;
}

.prose ol>li {
    counter-increment: prose-ol;
    --ol-badge-size: 24px;
    --ol-badge-gap: 12px;
    --ol-badge-offset: 2px;
    --ol-first-line: calc(1.85 * 1em);
    position: relative;
    margin: 0 0 10px;
    padding: 6px 0 6px calc(var(--ol-badge-size) + var(--ol-badge-gap));
    background: transparent;
    border: none;
    box-shadow: none;
}

.prose ol>li::before {
    content: counter(prose-ol);
    position: absolute;
    left: 0;
    top: calc(6px + (var(--ol-first-line) - var(--ol-badge-size)) / 2 + var(--ol-badge-offset));
    width: var(--ol-badge-size);
    height: var(--ol-badge-size);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--c-accent-glow);
    color: var(--c-accent);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.prose ol.list-paddingleft-2,
.prose ul.list-paddingleft-2 {
    padding-left: 0;
}

.prose li>p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.prose li>p+p {
    margin-top: 8px;
}

.prose li>ul,
.prose li>ol {
    margin-top: 10px;
    margin-bottom: 0;
}

.prose ol>li>ol>li,
.prose ol>li>ul>li,
.prose ul>li>ol>li,
.prose ul>li>ul>li {
    background: transparent;
    border: none;
    border-left: none;
    box-shadow: none;
    margin-bottom: 6px;
}

.prose ol>li>ul>li,
.prose ul>li>ul>li {
    padding: 0 0 0 1.25em;
}

.prose ol>li>ol>li,
.prose ul>li>ol>li {
    --ol-badge-size: 20px;
    --ol-badge-gap: 10px;
    --ol-first-line: calc(1.85 * 1em);
    padding: 0 0 0 calc(var(--ol-badge-size) + var(--ol-badge-gap));
}

.prose ol>li>ol>li::before,
.prose ul>li>ol>li::before {
    top: calc((var(--ol-first-line) - var(--ol-badge-size)) / 2 + var(--ol-badge-offset, 2px));
    width: var(--ol-badge-size);
    height: var(--ol-badge-size);
    font-size: 11px;
    border-radius: 6px;
    box-shadow: none;
    transform: none;
    background: var(--c-accent-glow);
    color: var(--c-accent);
}

.prose ul>li>ul>li::before,
.prose ol>li>ul>li::before {
    top: 0.7em;
    left: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--c-accent);
    box-shadow: none;
    transform: translateY(-50%);
}

.prose abbr {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    cursor: help;
}

@media (max-width: 639px) {

    .prose ul,
    .prose ol {
        font-size: 14px;
        line-height: 1.8;
    }

    .prose ul>li {
        padding: 5px 0 5px 24px;
        margin-bottom: 7px;
    }

    .prose ul>li::before {
        left: 6px;
        width: 5px;
        height: 5px;
    }

    .prose ol>li {
        --ol-badge-size: 22px;
        --ol-badge-gap: 10px;
        --ol-first-line: calc(1.8 * 1em);
        padding: 5px 0 5px calc(var(--ol-badge-size) + var(--ol-badge-gap));
        margin-bottom: 8px;
    }

    .prose ol>li::before {
        top: calc(5px + (var(--ol-first-line) - var(--ol-badge-size)) / 2 + var(--ol-badge-offset));
        font-size: 11px;
        border-radius: 6px;
    }
}

.prose strong {
    color: var(--c-fg);
    font-weight: 600;
}

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

.prose a:hover {
    color: var(--c-accent-dk);
}

.prose blockquote {
    border-left: 3px solid var(--c-accent);
    padding: 12px 16px;
    margin: 18px 0;
    background: var(--c-accent-glow);
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: var(--c-fg-m);
    line-height: 1.8;
}

.prose pre {
    margin: 20px 0;
    padding: 16px 18px;
    border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-accent);
    border-radius: 0 12px 12px 0;
    background: var(--c-surface);
    color: var(--c-fg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 1px 3px var(--c-shadow);
    tab-size: 2;
}

.prose pre code {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

.prose :not(pre)>code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.88em;
    font-weight: 500;
    padding: 0.15em 0.45em;
    border-radius: 6px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    color: var(--c-fg);
    word-break: break-word;
}

@media (max-width: 639px) {
    .prose pre {
        margin: 16px 0;
        padding: 12px 14px;
        font-size: 13px;
        line-height: 1.75;
        border-radius: 0 10px 10px 0;
    }
}

/* 移动端正文两端对齐：CJK 两端对齐排版整齐；英文叠加自动连字符避免词间大间隙（符合英文排版）。仅作用于移动端。 */
@media (max-width: 639px) {

    .prose p,
    .prose li {
        text-align: justify;
        text-justify: inter-ideograph;
    }

    /* 英文版：两端对齐配合连字符断词，避免出现过宽的词间空白（“文字河流”）。 */
    html[lang="en"] .prose p,
    html[lang="en"] .prose li {
        text-justify: inter-word;
        -webkit-hyphens: auto;
        hyphens: auto;
        overflow-wrap: break-word;
    }
}

.prose table {
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    width: 100%;
}

.prose .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--c-border);
    margin: 14px 0;
}

.prose .table-scroll table {
    border: none;
    border-radius: 0;
    margin: 0;
}

.prose table caption {
    caption-side: top;
    text-align: center;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-fg);
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
}

.prose table caption small {
    font-size: 11px;
    font-weight: 400;
    color: var(--c-fg-m);
}

.prose table th {
    background: var(--c-surface);
    color: var(--c-fg);
    font-weight: 700;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid var(--c-border);
    font-size: 12px;
    white-space: nowrap;
}

.prose table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--c-border);
    color: var(--c-fg-m);
    word-break: break-word;
}

@media (max-width: 1023px) {
    .prose .table-scroll table {
        width: max-content;
        min-width: 100%;
        table-layout: auto;
    }

    .prose table caption br {
        display: none;
    }

    .prose table th,
    .prose table td {
        white-space: normal;
        word-break: keep-all;
        overflow-wrap: break-word;
        line-height: 1.5;
        vertical-align: top;
        min-width: 5.5rem !important;
    }

    .prose table th:first-child,
    .prose table td:first-child {
        min-width: 4.75rem !important;
    }
}

@media (min-width: 1024px) {
    .prose .table-scroll table {
        min-width: 500px;
    }

    .prose table caption small {
        display: block;
        margin-top: 4px;
        line-height: 1.5;
    }
}

.prose table tr:last-child td {
    border-bottom: none;
}

.prose table tr:hover td {
    background: var(--c-card-hover);
}

.prose img {
    border-radius: 10px;
    margin: 16px auto;
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    box-shadow: 0 2px 8px var(--c-shadow);
}

.not-prose img {
    border-radius: inherit;
    margin: 0;
    width: 25%;
    box-shadow: none;
}

.prose details {
    border: 1px solid var(--c-border);
    border-radius: 10px;
    margin: 16px 0;
    overflow: hidden;
    background: var(--c-surface);
    transition: border-color 0.2s;
}

.prose details[open] {
    border-color: var(--c-accent);
}

.prose summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--c-fg);
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: none;
    border: none;
    outline: none;
    transition: background 0.15s;
}

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

.prose summary::marker {
    content: none;
}

.prose summary::before {
    content: '+';
    flex-shrink: 0;
    width: auto;
    height: auto;
    color: var(--c-accent);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prose details[open] summary::before {
    content: '−';
}

.prose details>p,
.prose details>div {
    padding: 0 18px 16px 48px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--c-fg-m);
    margin: 0;
}

/* ============ TOC Item ============ */
.toc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 7px 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--c-fg-d);
    background: transparent;
    border-left: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    user-select: none;
    min-width: 0;
}

.toc-item-num {
    flex-shrink: 0;
    min-width: 1.4em;
    font-weight: 700;
    color: var(--c-fg-d);
    transition: color 0.2s;
}

.toc-item-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toc-item:hover {
    color: var(--c-accent);
    background: var(--c-accent-glow);
}

.toc-item:hover .toc-item-num {
    color: var(--c-accent);
}

.toc-item.active {
    color: var(--c-accent);
    background: var(--c-accent-glow);
    border-left-color: var(--c-accent);
}

.toc-item.active .toc-item-num {
    color: var(--c-accent);
}

/* ============ Article Excerpt ============ */
.article-excerpt {
    background: #fafbfc;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
    position: relative;
}

.article-excerpt-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-accent);
    background: var(--c-accent-glow);
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.article-excerpt-label i {
    font-size: 10px;
    opacity: 0.7;
}

.article-excerpt-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--c-fg-m);
    margin: 0;
}

/* ============ Read Progress Bar ============ */
#readProgress {
    position: fixed;
    top: 64px;
    left: 0;
    height: 2px;
    background: var(--c-accent);
    z-index: 45;
    transition: width 60ms linear;
    width: 0;
}

/* ============ Headline Card ============ */
.headline-card {
    border: 1px solid var(--c-border);
    background: var(--c-card);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 1px 3px var(--c-shadow);
}

.headline-card:hover {
    border-color: var(--c-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--c-shadow-lg);
}

.headline-card:hover .headline-title {
    color: var(--c-accent);
}

/* ============ Flash Dot ============ */
.flash-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-danger);
    animation: flash-pulse 2s ease-in-out infinite;
}

/* ============ Level Tab ============ */
.level-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--c-fg-m);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.level-tab:hover {
    color: var(--c-fg);
    background: var(--c-card-hover);
}

.level-tab.active {
    font-weight: 700;
    background: var(--c-accent-glow);
    color: var(--c-accent);
}

/* ============ Regulator Card ============ */
.reg-card {
    position: relative;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.25s;
    box-shadow: 0 1px 3px var(--c-shadow);
    height: 100%;
}

/* 整卡用块级 <a> 包裹，悬停反馈作用在内部 .reg-card 上 */
.reg-card-link {
    display: block;
    height: 100%;
}

.reg-card-link:hover .reg-card {
    border-color: var(--c-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--c-shadow-lg);
}

/* ============ Info Grid ============ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.info-item {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 14px;
}

.info-item .label {
    font-size: 12px;
    color: var(--c-fg-d);
    margin-bottom: 4px;
}

.info-item .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-fg);
}

/* ============ Feature Card ============ */
.feature-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
}

.feature-card:hover {
    border-color: var(--c-accent);
    box-shadow: 0 4px 12px var(--c-shadow);
}

/* ============ Broker Row reg-variant ============ */
.broker-row.reg-variant {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--c-border);
    background: var(--c-card);
    transition: all 0.2s;
    cursor: pointer;
}

.broker-row.reg-variant:hover {
    border-color: var(--c-accent);
    transform: translateX(4px);
}

/* ============ Value Card (about) ============ */
.value-card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.25s;
}

.value-card:hover {
    border-color: var(--c-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--c-shadow-lg);
}

.value-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

/* ============ Score Dimension Bar ============ */
.score-dim {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--c-border);
}

.score-dim:last-child {
    border-bottom: none;
}

.score-bar-bg {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--c-border);
    margin: 0 14px;
    max-width: 200px;
}

.score-bar-bg .score-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--c-accent);
}

/* ============ Contact Input ============ */
.contact-input {
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--c-fg);
    background: var(--c-surface);
    outline: none;
    transition: border-color 0.2s;
}

.contact-input:focus {
    border-color: var(--c-accent);
}

.contact-input::placeholder {
    color: var(--c-fg-d);
}

.contact-captcha-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-surface);
    cursor: pointer;
    overflow: hidden;
    min-height: 44px;
}

.contact-captcha-btn:hover {
    border-color: var(--c-accent);
}

.contact-captcha-img {
    display: block;
    width: 120px;
    height: 44px;
    object-fit: cover;
}

/* ============ FAQ Accordion ============ */
.faq-details {
    border: 1px solid var(--c-border);
    border-radius: 12px;
    overflow: hidden;
}

.faq-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s;
    background: var(--c-surface);
}

.faq-summary:hover {
    background: var(--c-card-hover);
}

.faq-content {
    padding: 16px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--c-fg-m);
    border-top: 1px solid var(--c-border);
    background: var(--c-card);
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .broker-grid {
        grid-template-columns: 1fr !important;
    }

    .section-anchor {
        padding: 20px 16px !important;
    }

    /* 经纪商详情 hero：移动端隐藏 meta-inline（公司名/总部/成立年份） */
    .hero-info .meta-inline {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .cmp-cell {
        padding: 10px 12px;
        font-size: 12px;
    }

    .cmp-cell-center {
        min-width: 70px;
        font-size: 10px;
        padding: 10px 6px;
    }

    .news-card {
        flex-direction: column;
    }

    /* 6 格指标网格在手机上紧凑 */
    .metric-grid>div {
        padding: 10px 8px !important;
    }

    .metric-grid>div dd {
        font-size: 14px !important;
    }

    .metric-grid>div dt {
        font-size: 11px !important;
    }

    /* 段落卡片更紧凑 */
    .section-anchor {
        padding: 16px !important;
    }

    .section-anchor h2 {
        font-size: 17px !important;
    }

    /* 对比 battle header 在手机上更紧凑 */
    .vs-badge {
        width: 36px;
        height: 36px;
        font-size: 11px;
        border-width: 2px;
    }

    .cmp-verdict-badge {
        display: none;
    }
}

/* ============ Breadcrumb ============ */
nav[aria-label="breadcrumb"] ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1.5px;
    font-size: 12px;
    color: var(--c-fg-d);
}

nav[aria-label="breadcrumb"] ol li {
    display: flex;
    align-items: center;
}

nav[aria-label="breadcrumb"] ol li.breadcrumb-page-title {
    display: none;
}

@media (min-width: 640px) {
    nav[aria-label="breadcrumb"] ol li.breadcrumb-page-title {
        display: flex;
    }
}

@media (max-width: 639px) {
    nav.insight-detail-breadcrumb {
        margin-top: -15px;
    }
}

nav[aria-label="breadcrumb"] ol li+li::before {
    content: "›";
    margin: 0 6px;
    color: var(--c-fg-d);
    font-size: 11px;
}

nav[aria-label="breadcrumb"] ol li:last-child {
    color: var(--c-fg-d);
    font-weight: 500;
}

/* ============ Skeleton Shimmer ============ */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.sk {
    background: linear-gradient(90deg, var(--c-border) 25%, rgba(29, 78, 216, 0.06) 37%, var(--c-border) 63%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
    border-radius: 6px;
}

.sk-circle {
    border-radius: 50%;
}

.sk-pill {
    border-radius: 6px;
    height: 20px;
    width: 56px;
}

/* ============ Footer ============ */
.footer-main-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand {
    width: 100%;
    max-width: 20rem;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.footer-brand-desc {
    margin: 0 auto;
}

.footer-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    width: 100%;
    max-width: 22rem;
}

.footer-nav h3 {
    margin-bottom: 1rem;
}

/* 中屏：768px – 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    .footer-main-grid {
        gap: 2.5rem;
    }

    .footer-brand {
        max-width: 36rem;
    }

    .footer-nav-grid {
        max-width: 36rem;
        gap: 1.5rem 2.5rem;
    }
}

/* 大屏：1024px+ */
@media (min-width: 1024px) {
    .footer-main-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: start;
        text-align: left;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: span 2;
        max-width: none;
    }

    .footer-brand-row {
        justify-content: flex-start;
    }

    .footer-brand-desc {
        margin: 0;
        max-width: 20rem;
    }

    .footer-nav-grid {
        display: contents;
    }
}

@media (max-width: 1023px) {
    .footer-legal {
        text-align: center;
    }
}

/* ============ Accessibility ============ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .count-anim,
    .fade-in-up {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============ 404 Not Found ============ */
.not-found-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 4rem);
    padding: 3.5rem 1.25rem;
}

.not-found-panel {
    width: 100%;
    max-width: 660px;
    text-align: center;
}

.not-found-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: var(--c-accent);
    background: var(--c-accent-bg);
    border: 1px solid var(--c-accent-glow);
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    animation: not-found-fade-up 0.5s ease both;
}

.not-found-chip__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-warning);
}

.not-found-chart {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 1.625rem auto 0.5rem;
    animation: not-found-fade-up 0.6s ease 0.08s both;
}

.not-found-chart__ghost {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-weight: 700;
    font-size: clamp(4rem, 16vw, 7.375rem);
    color: var(--c-fg);
    opacity: 0.045;
    pointer-events: none;
    user-select: none;
}

.not-found-chart__svg {
    width: 100%;
    height: auto;
    display: block;
}

.not-found-chart__gap {
    stroke: var(--c-warning);
    stroke-dasharray: 5 6;
    fill: var(--c-warning-bg);
    animation: not-found-dash 6s linear infinite;
}

.not-found-chart__gap-title {
    font-size: 13px;
    font-weight: 700;
    fill: var(--c-fg);
}

.not-found-chart__gap-sub {
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    fill: var(--c-fg-d);
}

.not-found-title {
    font-size: clamp(1.25rem, 3.2vw, 1.5625rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0.875rem 0 0.625rem;
    animation: not-found-fade-up 0.6s ease 0.14s both;
}

.not-found-lead {
    font-size: 0.875rem;
    line-height: 1.75;
    color: var(--c-fg-m);
    max-width: 28.75rem;
    margin: 0 auto 1.625rem;
    animation: not-found-fade-up 0.6s ease 0.18s both;
}

.not-found-actions {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
    margin-bottom: 1.625rem;
    animation: not-found-fade-up 0.6s ease 0.22s both;
}

.not-found-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6875rem 1.375rem;
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: 0.5625rem;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.not-found-btn:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
}

.not-found-btn--primary {
    background: var(--c-accent);
    color: var(--c-on-accent);
}

.not-found-btn--primary:hover {
    background: var(--c-accent-dk);
}

.not-found-btn--secondary {
    background: var(--c-surface);
    border-color: var(--c-border);
    color: var(--c-fg);
}

.not-found-btn--secondary:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
}

.not-found-search {
    display: flex;
    width: 100%;
    max-width: 27.5rem;
    margin: 0 auto 2.25rem;
    animation: not-found-fade-up 0.6s ease 0.26s both;
}

.not-found-search input {
    flex: 1;
    min-width: 0;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-right: none;
    border-radius: 0.5625rem 0 0 0.5625rem;
    padding: 0.6875rem 0.875rem;
    font-size: 0.84rem;
    color: var(--c-fg);
    font-family: inherit;
}

.not-found-search input::placeholder {
    color: var(--c-fg-d);
}

.not-found-search input:focus {
    outline: none;
    border-color: var(--c-accent);
}

.not-found-search button {
    background: var(--c-fg);
    color: #fff;
    border: none;
    border-radius: 0 0.5625rem 0.5625rem 0;
    padding: 0 1.25rem;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.not-found-search button:hover {
    background: var(--c-accent);
}

.not-found-quicklinks {
    animation: not-found-fade-up 0.6s ease 0.3s both;
}

.not-found-quicklinks__label {
    display: block;
    font-size: 0.72rem;
    color: var(--c-fg-d);
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    letter-spacing: 0.09em;
    margin-bottom: 0.75rem;
}

.not-found-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5625rem;
}

.not-found-chip-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8125rem;
    border: 1px solid var(--c-border);
    border-radius: 0.625rem;
    background: var(--c-surface);
    font-size: 0.78rem;
    color: var(--c-fg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.not-found-chip-link:hover {
    border-color: var(--c-accent);
    box-shadow: 0 2px 8px var(--c-accent-glow);
}

.not-found-chip-link__name {
    font-weight: 700;
}

.not-found-chip-link__reg {
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.625rem;
    color: var(--c-safe);
    background: var(--c-safe-bg);
    padding: 0.125rem 0.375rem;
    border-radius: 0.3125rem;
    letter-spacing: 0.02em;
}

.not-found-chip-link__score {
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--c-gold);
}

@keyframes not-found-fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes not-found-dash {
    to {
        stroke-dashoffset: -110;
    }
}

@media (max-width: 520px) {
    .not-found-actions {
        flex-direction: column;
        width: 100%;
        max-width: 17.5rem;
        margin-left: auto;
        margin-right: auto;
    }

    .not-found-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {

    .not-found-chip,
    .not-found-chart,
    .not-found-title,
    .not-found-lead,
    .not-found-actions,
    .not-found-search,
    .not-found-quicklinks,
    .not-found-chart__gap {
        animation: none !important;
    }
}