:root {
    --page-bg: #fff8ea;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --ink: #18130f;
    --muted: #766d66;
    --line: rgba(24, 19, 15, 0.1);
    --accent: #f02525;
    --accent-2: #355cff;
    --accent-3: #ffd13d;
    --hot: #f02525;
    --strong: #00a6a6;
    --rising: #ff4f91;
    --steady: #34a853;
    --orange: #ff7a2f;
    --shadow: 0 22px 56px rgba(64, 35, 18, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    margin: 0;
    padding: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    color: var(--ink);
    background:
        linear-gradient(120deg, rgba(240, 37, 37, 0.14), transparent 34%),
        linear-gradient(220deg, rgba(53, 92, 255, 0.14), transparent 36%),
        linear-gradient(135deg, #fff8ea 0%, #f4fff8 47%, #fff5fb 100%);
    text-align: left;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
    background-image:
        linear-gradient(rgba(24, 19, 15, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 19, 15, 0.045) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

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

a:hover,
a:focus,
a:focus-visible {
    color: inherit;
    text-decoration: none !important;
}

.topic-link {
    color: #0d6efd;
    font-weight: 600;
    text-decoration: none !important;
}

.topic-link:hover,
.topic-link:focus-visible {
    color: inherit;
    text-decoration: none !important;
}

main {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 44px;
}

.tools-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 22px;
    align-items: end;
    min-height: 220px;
    margin: 12px 0 18px;
    padding: clamp(20px, 3.5vw, 38px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    background:
        linear-gradient(130deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.62)),
        linear-gradient(135deg, rgba(240, 37, 37, 0.18), rgba(255, 209, 61, 0.24), rgba(0, 166, 166, 0.18));
    box-shadow: var(--shadow);
}

.newsroom-hero {
    min-height: 236px;
}

.tools-hero__content {
    max-width: 820px;
    text-align: left;
}

.tools-hero__eyebrow,
.section-kicker,
.trend-group__kicker {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tools-hero h1 {
    max-width: 100%;
    margin: 0;
    font-size: clamp(1.85rem, 2.85vw, 2.8rem);
    line-height: 1.12;
    font-weight: 850;
    white-space: nowrap;
}

.tools-hero__summary {
    max-width: 680px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: clamp(0.98rem, 1.5vw, 1.08rem);
    line-height: 1.75;
}

.benefits-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 16px;
    padding: 0 20px;
    border: 2px solid rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--orange) 56%, var(--accent-3));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(240, 37, 37, 0.28);
}

.benefits-entry:hover,
.benefits-entry:focus-visible {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ghost-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 16px;
    padding: 0 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink);
    font-weight: 850;
}

.shelf-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 16px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)) padding-box,
        linear-gradient(135deg, var(--accent), var(--orange) 56%, var(--accent-3)) border-box;
    color: var(--ink);
    font-weight: 850;
}

.shelf-entry:hover,
.shelf-entry:focus-visible {
    color: var(--ink);
    text-decoration: none;
    transform: translateY(-2px);
}

.tools-hero__panel-wrap {
    display: grid;
    align-content: end;
    gap: 10px;
}

.hero-updated {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-align: right;
}

.tools-hero__panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tools-hero__panel span {
    display: grid;
    min-height: 54px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    color: #29343e;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(23, 33, 43, 0.08);
}

.tools-hero__panel span:nth-child(5) {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #18130f, var(--accent));
    color: #fff;
}

#trend-board,
#pulse-board,
#ai-observer,
.ai-observer,
#friend-links {
    margin-top: 20px;
}

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

.section-heading h2,
#friend-links h3 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.2;
    font-weight: 850;
}

.trend-count {
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--muted);
    font-size: 0.88rem;
    white-space: nowrap;
}

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

.hook-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.hook-strip article {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 24px rgba(28, 34, 43, 0.06);
}

.hook-strip span,
.hook-strip strong {
    display: block;
}

.hook-strip span {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.hook-strip strong {
    line-height: 1.45;
}

.newsroom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 14px;
    margin-top: 20px;
}

.lead-story,
.mini-panel,
.editorial-panel {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 10px 30px rgba(28, 34, 43, 0.06);
}

.lead-story {
    padding: 18px 20px;
}

.lead-story h2 {
    margin: 0 0 12px;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    line-height: 1.3;
    font-weight: 900;
}

.fresh-finds .panel-heading h3 {
    font-size: clamp(1.24rem, 2vw, 1.52rem);
    font-weight: 950;
}

.lead-story ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.78;
}

.side-stack {
    display: grid;
    gap: 12px;
}

.mini-panel {
    padding: 15px 16px;
}

.mini-panel p {
    margin: 0 0 6px;
    color: var(--accent-2);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mini-panel h3 {
    margin: 0 0 10px;
    font-size: 1.08rem;
    font-weight: 900;
}

.mini-panel ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mini-panel li {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.mini-panel li b {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 8px;
    background: #17212b;
    color: #fff;
    font-size: 0.76rem;
}

.accent-panel {
    background:
        linear-gradient(135deg, rgba(236, 91, 53, 0.12), rgba(255,255,255,0.8)),
        rgba(255, 255, 255, 0.72);
}

.accent-panel blockquote {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.7;
}

.editorial-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 14px;
    margin-top: 14px;
    align-items: stretch;
}

.editorial-panel {
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.finds-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    flex: 1;
}

.finds-grid section {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
}

.finds-grid b {
    color: var(--accent);
    font-size: 0.78rem;
}

.finds-grid h4 {
    margin: 8px 0 6px;
    font-size: 1rem;
    font-weight: 900;
}

.finds-grid p,
.quote-list p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.quote-list {
    display: grid;
    gap: 6px;
    flex: 1;
}

.quote-list section {
    padding: 9px 11px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
}

.quote-list strong {
    display: block;
    margin-bottom: 4px;
}

.flash-panel li b {
    color: var(--accent);
    background: rgba(236, 91, 53, 0.12);
}

.pulse-card {
    position: relative;
    min-height: 132px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 28px rgba(28, 34, 43, 0.08);
}

.pulse-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.12;
}

.pulse-card--market::before {
    background: linear-gradient(135deg, var(--accent), transparent 60%);
}

.pulse-card--open-source::before {
    background: linear-gradient(135deg, var(--accent-2), transparent 60%);
}

.pulse-card--fun::before {
    background: linear-gradient(135deg, var(--rising), transparent 60%);
}

.pulse-card p,
.pulse-card strong,
.pulse-card span {
    position: relative;
    z-index: 1;
    display: block;
}

.pulse-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.pulse-card strong {
    margin-bottom: 10px;
    font-size: clamp(1rem, 1.8vw, 1.28rem);
    line-height: 1.35;
}

.pulse-card span {
    color: var(--muted);
    font-size: 0.88rem;
}

.trend-groups {
    display: grid;
    gap: 14px;
}

.trend-group {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 10px 30px rgba(28, 34, 43, 0.06);
}

.trend-group__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.trend-group__header h3 {
    margin: 0;
    font-size: clamp(1.08rem, 1.7vw, 1.36rem);
    font-weight: 850;
    line-height: 1.25;
}

.trend-group__header span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.84rem;
}

.trend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
}

.trend-card {
    min-width: 0;
}

.trend-card a {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    min-height: 208px;
    height: 100%;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(28, 34, 43, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.trend-card a::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background: linear-gradient(135deg, var(--strong), transparent 58%);
}

.trend-card--hot a::before {
    background: linear-gradient(135deg, var(--hot), transparent 58%);
}

.trend-card--rising a::before {
    background: linear-gradient(135deg, var(--rising), transparent 58%);
}

.trend-card--steady a::before {
    background: linear-gradient(135deg, var(--steady), transparent 58%);
}

.trend-card a:hover,
.trend-card a:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(236, 91, 53, 0.34);
    box-shadow: 0 16px 36px rgba(28, 34, 43, 0.13);
    outline: none;
}

.trend-card__topline,
.trend-card h4,
.trend-card p,
.trend-card__tags {
    position: relative;
    z-index: 1;
}

.trend-card__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.trend-card__heat,
.trend-card__level {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid rgba(23, 33, 43, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.trend-card__heat {
    color: var(--ink);
}

.trend-card h4 {
    margin: 0 0 9px;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 850;
}

.trend-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.62;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.trend-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.trend-card__tags span {
    padding: 4px 7px;
    border-radius: 7px;
    background: rgba(23, 33, 43, 0.06);
    color: #3d4852;
    font-size: 0.74rem;
    font-weight: 750;
}

.observer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.85fr);
    gap: 14px;
    align-items: stretch;
}

.observer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.observer-panel {
    display: flex;
    flex-direction: column;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 10px 30px rgba(28, 34, 43, 0.06);
}

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

.panel-heading p {
    margin: 0 0 4px;
    color: var(--accent-2);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-heading h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 850;
}

.panel-heading span {
    color: var(--muted);
    font-size: 0.82rem;
}

.ranking-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-panel .ranking-list,
.category-panel .category-list,
.fun-panel .fun-list {
    flex: 1;
}

.ranking-list li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 7px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.76);
}

.ranking-list b,
.fun-list b {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    background: #17212b;
    color: #fff;
    font-size: 0.82rem;
}

.ranking-list span {
    font-weight: 800;
}

.ranking-list em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.9rem;
}

.category-list {
    display: grid;
    gap: 6px;
}

.category-list section {
    padding: 9px 11px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
}

.category-list h4 {
    margin: 0 0 3px;
    font-size: 0.96rem;
    font-weight: 850;
}

.category-list p,
.panel-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.panel-note {
    margin-top: 16px;
}

.fun-highlight {
    margin-bottom: 8px;
    padding: 11px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
}

.fun-highlight span {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 900;
}

.fun-highlight h4 {
    margin: 8px 0 6px;
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 900;
}

.fun-highlight p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.fun-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fun-list li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
}

.fun-list span {
    font-weight: 800;
}

#friend-links {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
}

#friend-links h3 {
    margin-bottom: 14px;
}

#friend-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
}

#friend-links-list li {
    list-style: none;
}

#friend-links-list a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 0.92rem;
}

@media (max-width: 1040px) {
    main {
        width: min(100% - 24px, 820px);
        padding-top: 16px;
    }

    .tools-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        border-radius: 20px;
    }

    .tools-hero h1 {
        white-space: normal;
    }

    .hero-updated {
        text-align: left;
    }

    .tools-hero__panel {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .tools-hero__panel span,
    .tools-hero__panel span:nth-child(5) {
        grid-column: auto;
        min-height: 46px;
        font-size: 0.88rem;
    }

    .observer-grid,
    .observer-shell,
    .newsroom-grid,
    .editorial-row {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    main {
        width: min(100% - 20px, 480px);
        padding-bottom: 40px;
    }

    .tools-hero {
        margin-top: 10px;
        padding: 24px;
    }

    .tools-hero h1 {
        font-size: clamp(1.55rem, 8vw, 2.35rem);
        line-height: 1.12;
    }

    .tools-hero__summary {
        margin-top: 16px;
        font-size: clamp(0.78rem, 3.8vw, 0.94rem);
        line-height: 1.7;
    }

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

    .tools-hero__panel span:nth-child(5) {
        grid-column: 1 / -1;
    }

    .section-heading,
    .trend-group__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .trend-count {
        white-space: normal;
    }

    .trend-group {
        padding: 14px;
        border-radius: 16px;
    }

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

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

    .hook-strip {
        grid-template-columns: 1fr;
    }

    .trend-card a {
        min-height: 188px;
        padding: 14px;
    }
}
