:root {
    --home-bg: #ffffff;
    --home-surface: #ffffff;
    --home-border: #e8ecf1;
    --home-text: #1a2332;
    --home-muted: #6b7a90;
    --home-accent: #2563eb;
    --home-accent-soft: #eff6ff;
    --home-radius: 12px;
    --home-radius-lg: 16px;
    --home-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --home-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] {
    --home-bg: #0f172a;
    --home-surface: #1e293b;
    --home-border: #334155;
    --home-text: #f1f5f9;
    --home-muted: #94a3b8;
    --home-accent: #60a5fa;
    --home-accent-soft: #1e3a5f;
    --home-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    --home-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body.letools-home-page,
body.letools-portal-list-page {
    background: var(--home-bg);
    color: var(--home-text);
    font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.home-wrap {
    max-width: 1210px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero */
.home-hero {
    text-align: center;
    padding: 48px 0 36px;
}

.home-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 28px;
}

.home-brand:hover {
    color: inherit;
}

.home-brand-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.25);
}

.home-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 18px;
}

.home-brand-name {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--home-text);
}

.home-brand-tagline {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--home-accent);
}

.home-search {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}

.home-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    pointer-events: none;
}

.home-search-input {
    width: 100%;
    height: 52px;
    padding: 0 20px 0 48px;
    border: 1px solid var(--home-border);
    border-radius: 999px;
    background: var(--home-surface);
    font-size: 0.95rem;
    color: var(--home-text);
    box-shadow: var(--home-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-search-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.home-search-input::placeholder {
    color: #94a3b8;
}

/* Section headers */
.home-section {
    padding: 28px 0 12px;
}

.home-section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 28px;
}

.home-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.home-section-title {
    margin: 0 0 10px;
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    color: var(--home-text);
}

.home-section-title span {
    color: #2563eb;
}

.home-section-sub {
    margin: 0;
    color: var(--home-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* Browse categories — 一行 6 个 */
.home-browse-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.home-browse-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 12px 16px;
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    background: var(--home-surface);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--home-shadow);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 118px;
}

a.home-browse-card:hover {
    color: inherit;
    transform: translateY(-2px);
    box-shadow: var(--home-shadow-md);
    border-color: #dbeafe;
}

.home-browse-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--home-accent-soft);
    color: var(--home-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.home-browse-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    width: 100%;
}

.home-browse-label {
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    color: var(--home-text);
}

.home-browse-desc {
    display: block;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--home-muted);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Recommended tools — 一行 5 个 */
.home-section--recommend {
    padding-bottom: 36px;
}

.home-recommend-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    padding-bottom: 8px;
}

.home-recommend-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 14px;
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-lg);
    background: var(--home-surface);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--home-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 100%;
}

.home-recommend-card:hover {
    color: inherit;
    transform: translateY(-2px);
    box-shadow: var(--home-shadow-md);
    border-color: #dbeafe;
}

.home-recommend-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.home-recommend-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-recommend-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--home-text);
}

.home-recommend-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--home-muted);
}

/* Domain deals */
.home-section--deals {
    padding: 28px 0 48px;
}

.home-deals-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.home-deal-card {
    --deal-accent: #2563eb;
    --deal-soft: #eff6ff;
    --deal-soft-2: #dbeafe;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px 20px 20px;
    border: 1px solid var(--home-border);
    border-radius: 18px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--deal-soft) 72%, #fff) 0%, #fff 48%);
    box-shadow: var(--home-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-deal-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--home-shadow-md);
}

.home-deal-card--blue {
    --deal-accent: #2563eb;
    --deal-soft: #eff6ff;
    --deal-soft-2: #dbeafe;
}

.home-deal-card--orange {
    --deal-accent: #ea580c;
    --deal-soft: #fff7ed;
    --deal-soft-2: #ffedd5;
}

.home-deal-card--purple {
    --deal-accent: #7c3aed;
    --deal-soft: #f5f3ff;
    --deal-soft-2: #ede9fe;
}

.home-deal-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.home-deal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.home-deal-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--deal-accent);
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.home-deal-logo--img {
    object-fit: cover;
    background: #fff;
    border: 1px solid var(--home-border);
    padding: 4px;
}

.home-deal-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.home-deal-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--home-text);
    line-height: 1.3;
}

.home-deal-tagline {
    font-size: 0.78rem;
    color: var(--home-muted);
    line-height: 1.4;
}

.home-deal-badge {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--deal-accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.home-deal-card--orange .home-deal-badge {
    background: #ffedd5;
    color: #c2410c;
}

.home-deal-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding-top: 2px;
}

.home-deal-offer {
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
}

.home-deal-price-box {
    text-align: right;
}

.home-deal-price {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    color: var(--deal-accent);
}

.home-deal-price-old {
    display: block;
    margin-top: 4px;
    font-size: 0.82rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.home-deal-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-deal-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.4;
}

.home-deal-features .bi {
    color: var(--deal-accent);
    font-size: 0.95rem;
}

.home-deal-coupon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px dashed var(--deal-soft-2);
    border-radius: 12px;
    background: color-mix(in srgb, var(--deal-soft) 80%, #fff);
}

.home-deal-coupon-text {
    font-size: 0.86rem;
    color: #475569;
}

.home-deal-coupon-text strong {
    color: var(--home-text);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.home-deal-copy {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--deal-accent);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.home-deal-copy:hover {
    background: #fff;
}

.home-deal-copy.is-copied {
    color: #16a34a;
}

.home-deal-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    margin-top: auto;
    border-radius: 12px;
    background: var(--deal-accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.home-deal-cta:hover {
    color: #fff;
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.home-deals-more {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.home-deals-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: 1px solid var(--home-border);
    border-radius: 999px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-weight: 650;
    font-size: 0.92rem;
    box-shadow: var(--home-shadow);
    transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.home-deals-more-btn:hover {
    color: var(--home-accent);
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

/* Legacy featured (unused on home, keep for safety) */
.home-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

.home-featured-card {
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-lg);
    background: var(--home-surface);
    overflow: hidden;
    box-shadow: var(--home-shadow);
    display: flex;
    flex-direction: column;
}

.home-featured-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.home-featured-head-title {
    min-width: 0;
}

.home-featured-more-link {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.home-featured-more-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.55);
}

.home-featured-body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.home-featured-desc {
    margin: 0 0 14px;
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--home-muted);
}

.home-featured-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.home-highlight {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--home-border);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: #fafbfc;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.home-highlight:hover {
    color: inherit;
    border-color: #cbd5e1;
    background: #fff;
}

.home-highlight-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.home-highlight-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    color: var(--home-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-highlight-title {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--home-text);
    min-width: 0;
}

.home-highlight-desc {
    display: block;
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--home-muted);
}

.home-featured-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-top: auto;
}

.home-featured-link {
    font-size: 0.8rem;
    color: var(--home-accent);
    text-decoration: none;
    padding: 2px 0;
    line-height: 1.45;
}

.home-featured-link:hover {
    text-decoration: underline;
}

/* Home footer */
.home-footer {
    border-top: 1px solid var(--home-border);
    padding: 40px 0 24px;
    margin-top: 12px;
}

.home-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    margin-bottom: 28px;
}

.home-about-title {
    margin: 0 0 12px;
    font-size: 1.1rem;
    font-weight: 700;
}

.home-about-text {
    margin: 0 0 10px;
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--home-muted);
}

.home-share-box {
    background: #f8fafc;
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-lg);
    padding: 22px;
}

.home-share-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
}

.home-share-sub {
    margin: 0 0 16px;
    font-size: 0.84rem;
    color: var(--home-muted);
}

.home-share-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.home-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--home-border);
    background: #fff;
    color: var(--home-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.home-share-btn:hover {
    color: var(--home-accent);
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

.home-share-btn.is-copied {
    color: #16a34a;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.home-share-weibo {
    display: block;
}

.home-copyright {
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
    padding-top: 8px;
}

@media (max-width: 1199.98px) {
    .home-browse-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-recommend-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-deals-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .home-browse-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-recommend-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .home-hero {
        padding: 32px 0 24px;
    }

    .home-browse-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-browse-desc {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .home-featured-grid {
        grid-template-columns: 1fr;
    }

    .home-recommend-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-deals-grid {
        grid-template-columns: 1fr;
    }

    .home-featured-highlights {
        grid-template-columns: 1fr;
    }

    .home-footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 379.98px) {
    .home-browse-grid,
    .home-recommend-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Archive / List pages ===== */

.portal-topbar {
    border-bottom: 1px solid var(--home-border);
    background: var(--home-surface);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 30;
}

.portal-topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    position: relative;
    min-height: 40px;
}

.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    grid-column: 2;
    justify-self: center;
}

.portal-brand:hover {
    color: inherit;
}

.portal-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.portal-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.portal-brand-name {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-topbar-actions {
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 2;
}

.portal-icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--home-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.portal-icon-btn:hover {
    background: var(--home-accent-soft);
    color: var(--home-accent);
}

.portal-icon-btn:focus-visible {
    outline: 2px solid var(--home-accent);
    outline-offset: 2px;
}

.portal-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.portal-search {
    position: absolute;
    right: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    width: min(320px, calc(100vw - 120px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.portal-search-wrap.is-open .portal-search {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.portal-search-wrap.is-open .portal-search-toggle {
    background: var(--home-accent-soft);
    color: var(--home-accent);
}

.portal-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.portal-search-input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 40px;
    border: 1px solid var(--home-border);
    border-radius: 999px;
    background: var(--home-bg);
    color: var(--home-text);
    font-size: 0.88rem;
    box-shadow: var(--home-shadow-md);
}

.portal-search-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.portal-search-close {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--home-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.portal-search-close:hover {
    color: var(--home-text);
    background: var(--home-accent-soft);
}

.portal-topbar .theme-toggle.portal-icon-btn:hover {
    background: var(--home-accent-soft);
    border-color: transparent;
    color: var(--home-accent);
}

.archive-main {
    padding: 28px 0 48px;
}

.archive-hero {
    margin-bottom: 24px;
}

.archive-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--home-accent-soft);
    color: var(--home-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.archive-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.archive-title-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.archive-title {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.archive-lead {
    margin: 0 0 8px;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--home-muted);
    max-width: 720px;
}

.archive-meta {
    font-size: 0.84rem;
    color: var(--home-muted);
}

.archive-section {
    margin-bottom: 28px;
}

.archive-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.archive-section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.archive-section-sub {
    margin: 0;
    font-size: 0.84rem;
    color: var(--home-muted);
}

.home-browse-card.is-current {
    border-color: var(--home-accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
    pointer-events: none;
}

.archive-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.archive-tool-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-lg);
    background: var(--home-surface);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--home-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 100%;
}

.archive-tool-card:hover {
    color: inherit;
    transform: translateY(-2px);
    box-shadow: var(--home-shadow-md);
    border-color: #dbeafe;
}

.archive-tool-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.archive-tool-body {
    flex: 1;
    min-width: 0;
}

.archive-tool-title {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--home-text);
}

.archive-tool-desc {
    display: block;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--home-muted);
}

.archive-tool-action {
    align-self: center;
    color: var(--home-accent);
    font-size: 1rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.archive-tool-card:hover .archive-tool-action {
    opacity: 1;
}

.archive-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.archive-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--home-border);
    border-radius: 999px;
    background: #fafbfc;
    color: var(--home-text);
    font-size: 0.82rem;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.archive-tag:hover {
    color: var(--home-accent);
    border-color: #bfdbfe;
    background: #fff;
}

.archive-tag-count {
    color: var(--home-muted);
    font-size: 0.75rem;
}

.archive-empty {
    padding: 40px 20px;
    text-align: center;
    border: 1px dashed var(--home-border);
    border-radius: var(--home-radius-lg);
    background: #fafbfc;
    color: var(--home-muted);
}

.archive-empty-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #cbd5e1;
}

.archive-pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

.archive-pagination .nav-links,
.archive-pagination ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.archive-pagination a,
.archive-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--home-border);
    border-radius: 999px;
    background: #fff;
    color: var(--home-muted);
    text-decoration: none;
    font-size: 0.84rem;
}

.archive-pagination a:hover {
    color: var(--home-accent);
    border-color: #bfdbfe;
}

.archive-pagination .current {
    color: #fff;
    background: var(--home-accent);
    border-color: var(--home-accent);
}

.portal-footer {
    border-top: 1px solid var(--home-border);
    padding: 24px 0;
    margin-top: 12px;
}

.portal-footer-copy {
    margin: 0;
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
}

@media (max-width: 991.98px) {
    .archive-tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .portal-brand-name {
        max-width: 42vw;
    }

    .portal-search {
        width: min(280px, calc(100vw - 110px));
    }

    .archive-tools-grid {
        grid-template-columns: 1fr;
    }

    .archive-title-row {
        align-items: flex-start;
    }
}

.page-article {
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-lg);
    box-shadow: var(--home-shadow);
    padding: 28px 32px;
}

.page-article-content {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--home-text);
}

.page-article-content > *:first-child {
    margin-top: 0;
}

.page-article-content > *:last-child {
    margin-bottom: 0;
}

.page-article-content h2,
.page-article-content h3,
.page-article-content h4 {
    margin: 1.6em 0 0.7em;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-article-content p {
    margin: 0 0 1em;
}

.page-article-content a {
    color: var(--home-accent);
    text-decoration: none;
}

.page-article-content a:hover {
    text-decoration: underline;
}

.page-article-content ul,
.page-article-content ol {
    margin: 0 0 1em;
    padding-left: 1.4em;
}

.page-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--home-radius);
}

@media (max-width: 767.98px) {
    .page-article {
        padding: 20px 18px;
    }
}

