/* liangchenmei.com shared styles */
@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Nunito:wght@400;500;600;700;800&family=Caveat:wght@500;600&display=swap");

:root {
    --palette-coral: #e4593a;
    --palette-cream: #fff6ee;
    --palette-flame: #ff7a59;
    --palette-teal: #2cb1a6;
    --palette-blue: #5b9dff;
    --palette-purple: #a97be0;
    --palette-white: #ffffff;
    --palette-ink: #2b2620;
    --site-bg: #fff6ee;
    --site-surface: #ffffff;
    --site-surface-subtle: #ffe2d6;
    --site-surface-soft: #fde9e0;
    --site-text: #2b2620;
    --site-text-muted: #66605a;
    --site-line: #fadace;
    --site-line-strong: #e4593a;
    --site-primary: #e4593a;
    --site-primary-strong: #a04630;
    --site-primary-soft: #ffd3c4;
    --site-primary-softer: #fde9e0;
    --site-secondary: #2cb1a6;
    --site-accent: #ff7a59;
    --site-success-bg: #ddf3f1;
    --site-success-text: #2c786f;
    --site-danger-bg: #ffe2d6;
    --site-danger-text: #a04630;
    --site-warning-bg: #ffddd0;
    --site-warning-text: #a04630;
    --site-on-primary: #ffffff;
    --site-info: #5b9dff;
    --site-info-text: #4a72af;
    --site-tertiary: #a97be0;
    --site-tertiary-text: #8462a8;
    --site-glass: rgba(255, 255, 255, 0.92);
    --site-glass-line: rgba(228, 89, 58, 0.22);
    --site-shadow-soft: 0 10px 28px rgba(228, 89, 58, 0.12);
    --site-shadow: 0 18px 42px rgba(228, 89, 58, 0.2);
    --site-focus-ring: rgba(228, 89, 58, 0.28);
    --site-interactive-hover-bg: var(--site-primary-softer);
    --site-interactive-hover-border: var(--site-line-strong);
    --site-interactive-hover-text: var(--site-primary-strong);
    --site-radius-sm: 8px;
    --site-radius-md: 12px;
    --site-radius-lg: 18px;
    --site-shell-main: 1100px;
    --site-shell-wide: 1400px;
    --site-shell-header: 1600px;
    --site-space-xs: 0.5rem;
    --site-space-sm: 0.75rem;
    --site-space-md: 1rem;
    --site-space-lg: 1.5rem;
    --site-space-xl: 2rem;
    --site-space-2xl: 3rem;
    --site-space-3xl: 4rem;
}

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(to right, var(--site-text), var(--site-text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 英雄区域背景渐变 */
.hero-gradient {
    background: linear-gradient(135deg, var(--site-surface-soft) 0%, var(--site-surface-subtle) 55%, var(--site-bg) 100%);
}

/* 导航栏模糊效果 */
.nav-blur {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.site-shell-nav,
.site-shell-footer {
    color: var(--site-text);
    font-family: "Quicksand", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.site-shell-nav {
    background: var(--site-glass);
    border-bottom: 1px solid var(--site-glass-line);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.site-shell-nav-inner,
.site-shell-footer-inner {
    box-sizing: border-box;
    width: min(var(--site-shell-header), calc(100vw - 40px));
    margin: 0 auto;
}

.site-shell-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 72px;
    padding: 14px 24px;
    box-sizing: border-box;
}

.site-shell-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--site-text);
    font-weight: 700;
    text-decoration: none;
    transition: color 160ms ease;
}

.site-shell-brand:hover,
.site-shell-brand:focus-visible {
    color: var(--site-primary-strong);
    text-decoration: none;
}

.site-shell-mark {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--site-radius-sm);
    background: var(--site-primary);
    color: var(--site-on-primary);
    font-weight: 800;
    line-height: 1;
}

.site-shell-badge {
    padding: 4px 8px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-sm);
    background: var(--site-success-bg);
    color: var(--site-success-text);
    font-size: 12px;
    font-weight: 700;
}

.site-shell-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--site-text-muted);
    font-size: 14px;
}

.site-shell-menu a {
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.site-shell-menu a:hover,
.site-shell-menu a:focus-visible {
    transform: translateY(-1px);
    border-color: var(--site-primary);
    background: var(--site-primary-soft);
    color: var(--site-primary-strong);
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    background: var(--site-glass);
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--site-text);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: 100%;
    margin-top: 0.9rem;
    padding: 0.75rem;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-lg);
    background: var(--site-surface);
    box-shadow: var(--site-shadow-soft);
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-list a {
    display: block;
    min-height: 2.5rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    background: var(--site-surface-soft);
    color: var(--site-text);
    font-weight: 700;
    text-decoration: none;
}

.mobile-nav-list a:hover,
.mobile-nav-list a:focus-visible {
    border-color: var(--site-primary);
    background: var(--site-primary-soft);
    color: var(--site-primary-strong);
    transform: translateY(-1px);
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

.site-shell-footer {
    margin-top: 64px;
    border-top: 1px solid var(--site-line);
    background: var(--site-surface);
}

.site-shell-footer-inner {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.7fr);
    gap: 28px;
    padding: 34px 0;
    color: var(--site-text-muted);
    font-size: 14px;
}

.site-shell-footer-brand {
    display: grid;
    gap: 10px;
    align-content: start;
}

.site-shell-footer-brand strong {
    color: var(--site-text);
    font-size: 16px;
}

.site-shell-footer-copy {
    margin: 0;
    line-height: 1.7;
}

.site-shell-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.site-shell-footer-column {
    display: grid;
    gap: 8px;
    align-content: start;
}

.site-shell-footer-column h2 {
    margin: 0 0 4px;
    color: var(--site-text);
    font-size: 14px;
    font-weight: 700;
}

.site-shell-footer-column a {
    color: var(--site-text-muted);
    text-decoration: none;
}

.site-shell-footer-column a:hover,
.site-shell-footer-column a:focus-visible {
    color: var(--site-interactive-hover-text);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.svg-card-page {
    display: flex;
    justify-content: center;
    padding: 32px 16px 0;
    background: var(--site-bg);
}

.svg-card-page svg {
    max-width: min(900px, 100%);
    height: auto;
    box-shadow: var(--site-shadow-soft);
}

.topic-link-card {
    display: block;
    min-height: 168px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    background: var(--site-surface);
    padding: 24px;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.topic-link-card:hover,
.topic-link-card:focus-visible {
    transform: translateY(-2px);
    border-color: var(--site-interactive-hover-border);
    box-shadow: var(--site-shadow);
    text-decoration: none;
}

.topic-link-card h3 {
    margin: 14px 0 8px;
    color: var(--site-text);
    font-size: 1.25rem;
    font-weight: 700;
}

.topic-link-card p {
    color: var(--site-text-muted);
    font-size: 0.925rem;
    line-height: 1.65;
}

.topic-count {
    display: inline-flex;
    min-width: 64px;
    justify-content: center;
    border-radius: 8px;
    background: var(--site-primary-soft);
    border: 1px solid var(--site-line);
    color: var(--site-primary-strong);
    font-size: 0.875rem;
    font-weight: 700;
    padding: 4px 10px;
}

.resource-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--site-glass-line);
    border-radius: var(--site-radius-md);
    background: var(--site-glass);
    color: var(--site-text);
    padding: 18px;
    font-weight: 600;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.resource-card:hover,
.resource-card:focus-visible {
    transform: translateY(-1px);
    background: var(--site-surface);
    border-color: var(--site-interactive-hover-border);
    text-decoration: none;
}

.resource-quick-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--site-space-md);
    margin-bottom: var(--site-space-2xl);
}

.resource-quick-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-sm);
    background: var(--site-primary-softer);
    color: var(--site-primary-strong);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
    padding: 9px 14px;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.resource-quick-nav-link:hover,
.resource-quick-nav-link:focus-visible {
    background: var(--site-primary-strong);
    border-color: var(--site-primary-strong);
    color: var(--site-on-primary);
    outline: 3px solid var(--site-focus-ring);
    outline-offset: 2px;
    text-decoration: none;
}

.resource-quick-nav-link:active {
    transform: translateY(1px);
}

.browser-bookmark-layout {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

.browser-bookmark-sidebar {
    position: sticky;
    top: 96px;
    max-height: calc(100dvh - 120px);
    overflow: auto;
    border: 1px solid var(--site-glass-line);
    border-radius: var(--site-radius-md);
    background: var(--site-glass);
    box-shadow: var(--site-shadow-soft);
    padding: 14px;
}

.browser-bookmark-sidebar-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--site-text-muted);
    font-size: 0.85rem;
    font-weight: 800;
}

.browser-bookmark-sidebar-title strong {
    color: var(--site-primary-strong);
    font-variant-numeric: tabular-nums;
}

.browser-bookmark-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bookmark-category-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: var(--site-radius-sm);
    color: var(--site-text);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.25;
    padding: 8px 10px;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.bookmark-category-link:hover,
.bookmark-category-link:focus-visible,
.bookmark-category-link.is-active {
    background: var(--site-primary-strong);
    border-color: var(--site-primary-strong);
    color: var(--site-on-primary);
    outline: 3px solid var(--site-focus-ring);
    outline-offset: 2px;
    text-decoration: none;
}

.bookmark-category-link:hover .bookmark-category-count,
.bookmark-category-link:focus-visible .bookmark-category-count,
.bookmark-category-link.is-active .bookmark-category-count {
    background: var(--site-surface);
    border-color: var(--site-surface);
    color: var(--site-primary-strong);
}

.bookmark-category-link:active {
    transform: translateY(1px);
}

.bookmark-category-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-category-count {
    min-width: 32px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-sm);
    background: var(--site-surface-soft);
    color: var(--site-primary-strong);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    padding: 3px 7px;
    text-align: center;
}

.browser-bookmark-groups {
    min-width: 0;
}

.bookmark-section {
    margin-bottom: 28px;
    scroll-margin-top: 96px;
}

.bookmark-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.bookmark-section-title {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.bookmark-section-title h3 {
    margin: 0;
    color: var(--site-text);
    font-size: clamp(1.15rem, 1.6vw, 1.45rem);
    font-weight: 800;
    line-height: 1.2;
}

.bookmark-section-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--site-radius-sm);
    background: var(--site-primary);
    color: var(--site-on-primary);
}

.bookmark-section-count {
    flex: 0 0 auto;
    color: var(--site-text-muted);
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.bookmark-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 10px;
}

.bookmark-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 14px;
    min-height: 76px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-sm);
    background: var(--site-surface);
    color: var(--site-text);
    padding: 12px 14px;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bookmark-card:hover,
.bookmark-card:focus-within {
    background: var(--site-surface-soft);
    border-color: var(--site-interactive-hover-border);
    box-shadow: var(--site-shadow-soft);
    transform: translateY(-1px);
}

.bookmark-card:hover .bookmark-card-title,
.bookmark-card:focus-within .bookmark-card-title {
    color: var(--site-primary-strong);
}

.bookmark-card:hover .bookmark-card-meta,
.bookmark-card:focus-within .bookmark-card-meta {
    color: var(--site-text);
}

.bookmark-card:hover .bookmark-card-badge,
.bookmark-card:focus-within .bookmark-card-badge {
    background: var(--site-primary-strong);
    border-color: var(--site-primary-strong);
    color: var(--site-on-primary);
}

.bookmark-card-main {
    min-width: 0;
}

.bookmark-card-title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--site-text);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;
    text-wrap: pretty;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.bookmark-card-title:hover,
.bookmark-card-title:focus-visible {
    color: var(--site-primary-strong);
    outline: 3px solid var(--site-focus-ring);
    outline-offset: 3px;
    text-decoration: none;
}

.bookmark-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-top: 5px;
    color: var(--site-text-muted);
    font-size: 0.82rem;
    line-height: 1.3;
}

.bookmark-card-host {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-card-source::before {
    content: "/";
    margin-right: 6px;
    color: var(--site-line-strong);
}

.bookmark-card-side {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.bookmark-card-badge {
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-sm);
    background: var(--site-primary-softer);
    color: var(--site-primary-strong);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    padding: 5px 7px;
    white-space: nowrap;
}

.bookmark-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-sm);
    background: var(--site-surface-soft);
    color: var(--site-primary-strong);
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.bookmark-card-action:hover,
.bookmark-card-action:focus-visible {
    background: var(--site-primary-strong);
    border-color: var(--site-primary-strong);
    color: var(--site-on-primary);
    outline: 3px solid var(--site-focus-ring);
    outline-offset: 2px;
    text-decoration: none;
}

.bookmark-card-action:active {
    transform: translateY(1px);
}

@media (max-width: 900px) {
    .browser-bookmark-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .browser-bookmark-sidebar {
        z-index: 5;
        top: 72px;
        max-height: none;
        padding: 10px;
    }

    .browser-bookmark-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .bookmark-category-link {
        grid-template-columns: auto auto;
        flex: 0 0 auto;
        min-height: 36px;
    }

    .bookmark-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .bookmark-card-side {
        justify-content: space-between;
    }
}

.site-page-bg {
    background: var(--site-bg);
    color: var(--site-text);
    font-family: "Quicksand", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.site-muted {
    color: var(--site-text-muted);
}

.site-accent-text {
    color: var(--site-primary-strong);
}

.site-accent-link {
    color: var(--site-primary-strong);
    text-decoration: none;
}

.site-accent-link:hover,
.site-accent-link:focus-visible {
    color: var(--site-interactive-hover-text);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

body[data-theme="core"] {
    --heartopia-hero-height: min(760px, calc(100dvh - 72px));
}

body[data-shell="explorer"] .site-shell-nav-inner,
body[data-shell="explorer"] .site-shell-footer-inner {
    width: min(var(--site-shell-header), calc(100vw - 40px));
}

.heartopia-main {
    overflow: hidden;
}

.heartopia-container {
    width: min(var(--site-shell-wide), calc(100vw - 40px));
    margin: 0 auto;
}

.heartopia-container--narrow {
    width: min(900px, calc(100vw - 40px));
    margin: 0 auto;
}

.heartopia-hero {
    position: relative;
    display: flex;
    min-height: var(--heartopia-hero-height, min(720px, calc(100dvh - 72px)));
    align-items: center;
    overflow: hidden;
    padding: clamp(72px, 10vw, 132px) 0 clamp(64px, 9vw, 112px);
}

.heartopia-hero--compact {
    min-height: min(620px, calc(100dvh - 72px));
}

/* 工具中心：整屏 hero（clamp(72px,10vw,132px) 上下 padding + 620px 最小高）把工具列表
   挤到首屏之外，这里改成紧凑头部，与知识库页面一致。
   选择器必须压过 heartopia-design-tokens.css 里的 body[data-theme] .heartopia-hero。 */
.heartopia-main .heartopia-hero.tools-hero {
    display: block;
    min-height: 0;
    padding: 34px 0 26px;
    align-items: stretch;
}
.heartopia-main .tools-hero .heartopia-hero-bg::after { display: none; }
.heartopia-main .tools-hero .heartopia-hero-badge { margin-bottom: 14px; padding: 6px 14px; font-size: 0.8rem; }
.heartopia-main .tools-hero .heartopia-hero-title { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.22; }
.heartopia-main .tools-hero .heartopia-hero-tagline { margin-top: 12px; font-size: clamp(1rem, 1.4vw, 1.15rem); font-style: normal; }
.heartopia-main .tools-hero .heartopia-hero-description { margin-top: 10px; font-size: 0.92rem; line-height: 1.7; }
.heartopia-main .tools-hero .heartopia-hero-actions { margin-top: 18px; }
.heartopia-main .tools-hero .heartopia-hero-actions .site-primary-button,
.heartopia-main .tools-hero .heartopia-hero-actions .site-secondary-button { min-height: 42px; padding: 9px 18px; font-size: 0.9rem; }
.heartopia-main .tools-hero .heartopia-hero-stats { margin-top: 20px; gap: clamp(18px, 3vw, 40px); }
.heartopia-main .tools-hero .heartopia-hero-stat-value { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.heartopia-main .tools-hero .heartopia-hero-stat-label { margin-top: 4px; font-size: 0.78rem; }

.heartopia-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, var(--site-primary-softer) 0%, var(--site-bg) 52%, var(--site-surface-soft) 100%);
}

.heartopia-hero-bg::after {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    content: "";
    background:
        linear-gradient(180deg, transparent 0%, var(--site-bg) 78%),
        repeating-linear-gradient(90deg, transparent 0 46px, var(--site-line) 46px 47px);
    opacity: 0.24;
}

.heartopia-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.heartopia-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--site-space-lg);
    border: 1px solid var(--site-line);
    border-radius: 999px;
    background: var(--site-glass);
    color: var(--site-primary-strong);
    box-shadow: var(--site-shadow-soft);
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 800;
}

.heartopia-hero-badge-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--site-primary);
    box-shadow: 0 0 0 5px var(--site-primary-soft);
}

.heartopia-hero-title {
    max-width: 960px;
    margin: 0;
    color: var(--site-text);
    font-size: clamp(3rem, 8vw, 6.6rem);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: 0;
    text-wrap: balance;
}

.heartopia-highlight {
    position: relative;
    display: inline-block;
    color: var(--site-primary-strong);
}

.heartopia-highlight::after {
    position: absolute;
    left: 0.04em;
    right: 0.04em;
    bottom: 0.08em;
    z-index: -1;
    height: 0.18em;
    border-radius: 999px;
    background: var(--site-primary-soft);
    content: "";
}

.heartopia-hero-tagline {
    max-width: 760px;
    margin: var(--site-space-xl) auto 0;
    color: var(--site-primary-strong);
    font-size: clamp(1.2rem, 2vw, 1.75rem);
    font-style: italic;
    font-weight: 700;
    line-height: 1.45;
}

.heartopia-hero-description {
    max-width: 780px;
    margin: var(--site-space-lg) auto 0;
    color: var(--site-text-muted);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.85;
}

.heartopia-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--site-space-md);
    margin-top: var(--site-space-xl);
}

.heartopia-hero-actions .site-primary-button,
.heartopia-hero-actions .site-secondary-button {
    min-height: 52px;
    border-radius: 999px;
    padding: 12px 22px;
}

.heartopia-hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(22px, 4vw, 56px);
    margin-top: var(--site-space-2xl);
}

.heartopia-hero-stat {
    min-width: 120px;
    text-align: center;
}

.heartopia-hero-stat-value {
    display: block;
    color: var(--site-primary-strong);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.heartopia-hero-stat-label {
    display: block;
    margin-top: 8px;
    color: var(--site-text-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.heartopia-section {
    padding: clamp(64px, 9vw, 104px) 0;
}

.heartopia-section--surface {
    background: var(--site-surface-soft);
}

.heartopia-section--flush-top {
    padding-top: clamp(36px, 6vw, 72px);
}

.heartopia-section-header {
    max-width: 820px;
    margin: 0 auto clamp(32px, 5vw, 56px);
    text-align: center;
}

.heartopia-section-header h2 {
    margin: 0;
    color: var(--site-text);
    font-size: clamp(2rem, 4vw, 3.8rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0;
    text-wrap: balance;
}

.heartopia-section-header p {
    margin: var(--site-space-md) auto 0;
    color: var(--site-text-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.heartopia-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: var(--site-space-md);
    border: 1px solid var(--site-line);
    border-radius: 999px;
    background: var(--site-primary-soft);
    color: var(--site-primary-strong);
    padding: 7px 13px;
    font-size: 0.86rem;
    font-weight: 800;
}

.heartopia-quick-nav-grid,
.heartopia-card-grid {
    display: grid;
    gap: var(--site-space-lg);
}

.heartopia-quick-nav-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.heartopia-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.heartopia-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--site-space-lg);
}

.heartopia-quick-nav-item,
.heartopia-route-card {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    background: var(--site-surface);
    box-shadow: var(--site-shadow-soft);
    color: var(--site-text);
    padding: var(--site-space-lg);
    text-align: center;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.heartopia-quick-nav-item:hover,
.heartopia-quick-nav-item:focus-visible,
.heartopia-route-card:hover,
.heartopia-route-card:focus-visible {
    transform: translateY(-6px);
    border-color: var(--site-interactive-hover-border);
    box-shadow: var(--site-shadow);
    text-decoration: none;
}

.heartopia-quick-nav-icon,
.heartopia-route-icon {
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--site-space-md);
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    background: var(--site-primary-soft);
    color: var(--site-primary-strong);
}

.heartopia-quick-nav-title,
.heartopia-route-card h3 {
    margin: 0 0 6px;
    color: var(--site-text);
    font-size: 1.1rem;
    font-weight: 900;
}

.heartopia-quick-nav-count,
.heartopia-route-card p {
    margin: 0;
    color: var(--site-text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.heartopia-card-grid .topic-link-card {
    min-height: 190px;
    text-align: center;
}

.heartopia-card-grid .topic-link-card i,
.heartopia-card-grid .topic-link-card .topic-count {
    margin-left: auto;
    margin-right: auto;
}

.heartopia-index-card {
    min-height: 100%;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    background: var(--site-surface);
    box-shadow: var(--site-shadow-soft);
    padding: var(--site-space-xl);
}

.heartopia-index-card h3 {
    margin: 0 0 var(--site-space-md);
    color: var(--site-text);
    font-size: 1.2rem;
    font-weight: 900;
}

.heartopia-index-card a {
    color: var(--site-text-muted);
    text-decoration: none;
}

.heartopia-index-card a:hover,
.heartopia-index-card a:focus-visible {
    color: var(--site-interactive-hover-text);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.heartopia-tool-search {
    padding-bottom: clamp(40px, 6vw, 72px);
}

.heartopia-tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.heartopia-split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
    gap: var(--site-space-lg);
}

.heartopia-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--site-space-lg);
}

.heartopia-qr-card {
    display: grid;
    justify-items: center;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    background: var(--site-surface);
    box-shadow: var(--site-shadow-soft);
    padding: clamp(24px, 4vw, 40px);
    text-align: center;
}

.heartopia-qr-card img {
    width: min(220px, 72vw);
    height: min(220px, 72vw);
    object-fit: contain;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    background: var(--site-surface);
    padding: 8px;
}

.site-primary-button,
.site-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.site-primary-button {
    border: 2px solid var(--site-primary);
    background: var(--site-primary-strong);
    color: var(--site-on-primary);
    box-shadow: 0 10px 28px rgba(228, 89, 58, 0.28);
}

.site-primary-button:hover,
.site-primary-button:focus-visible {
    background: var(--palette-ink);
    border-color: var(--palette-ink);
    transform: translateY(-2px);
    color: var(--site-on-primary);
    box-shadow: 0 16px 36px rgba(43, 38, 32, 0.28);
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

.site-secondary-button {
    border: 2px solid var(--site-primary);
    background: var(--site-surface);
    color: var(--site-primary-strong);
    box-shadow: 0 8px 20px rgba(228, 89, 58, 0.12);
}

.site-secondary-button:hover,
.site-secondary-button:focus-visible {
    border-color: var(--site-primary-strong);
    background: var(--site-primary-soft);
    color: var(--site-primary-strong);
    transform: translateY(-2px);
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

.site-tool-section {
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-lg);
    background: var(--site-surface);
    box-shadow: var(--site-shadow-soft);
}

.site-search-panel {
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-lg);
    background: var(--site-surface);
    box-shadow: var(--site-shadow-soft);
    padding: clamp(16px, 2vw, 22px);
}

.site-search-panel-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.site-category-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.tool-card {
    position: relative;
    display: flex;
    min-height: 100%;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    background: var(--site-surface);
    box-shadow: var(--site-shadow-soft);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tool-card:hover,
.tool-card:focus-within {
    transform: translateY(-2px);
    border-color: var(--site-interactive-hover-border);
    box-shadow: var(--site-shadow);
}

.tool-card.is-hidden,
.tool-card.hidden {
    display: none;
}

.tool-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.tool-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.feature-icon,
.feature-icon-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--site-on-primary);
}

.feature-icon {
    background: var(--site-primary);
}

.feature-icon-soft {
    border: 1px solid var(--site-line);
    background: var(--site-primary-soft);
    color: var(--site-primary-strong);
}

.tool-badge,
.tool-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--site-line);
    background: var(--site-primary-soft);
    color: var(--site-primary-strong);
    font-weight: 700;
}

.tool-badge {
    min-height: 28px;
    padding: 4px 10px;
    border-radius: var(--site-radius-sm);
    font-size: 12px;
}

.tool-tag {
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.tool-card h3 {
    margin: 0 0 8px;
    color: var(--site-text);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.3;
}

.tool-card p {
    margin: 0;
    color: var(--site-text-muted);
    font-size: 0.925rem;
    line-height: 1.7;
}

.tool-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 18px;
}

.tool-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: auto;
    border-radius: var(--site-radius-sm);
    background: var(--site-primary);
    color: var(--site-on-primary);
    font-weight: 700;
    text-decoration: none;
    transition: background 160ms ease, transform 160ms ease;
}

.tool-action:hover,
.tool-action:focus-visible {
    background: var(--site-primary-strong);
    transform: translateY(-2px);
    color: var(--site-on-primary);
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

.category-tag {
    min-height: 42px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-sm);
    background: var(--site-surface);
    color: var(--site-text);
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.category-tag:hover,
.category-tag:focus-visible {
    border-color: var(--site-line-strong);
    color: var(--site-primary-strong);
}

.category-tag.active {
    border-color: var(--site-primary-strong);
    background: var(--site-primary-strong);
    color: var(--site-on-primary);
}

.category-tag.active:hover,
.category-tag.active:focus-visible {
    transform: translateY(-1px);
    box-shadow: var(--site-shadow-soft);
}

.search-box {
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    background: var(--site-surface);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

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

.search-box:focus-within {
    border-color: var(--site-primary);
    box-shadow: 0 0 0 4px var(--site-focus-ring);
}

.resource-tile {
    border: 1px solid var(--site-line);
    background: var(--site-surface);
}

.usage-panel {
    border: 1px solid var(--site-primary-strong);
    border-radius: var(--site-radius-lg);
    background: var(--site-primary-strong);
    color: var(--site-on-primary);
    box-shadow: var(--site-shadow);
}

.usage-panel .usage-chip {
    border: 1px solid var(--site-on-primary);
    background: color-mix(in srgb, var(--site-on-primary) 16%, transparent);
}

main a[href]:not([class*="button"]):not([class*="btn"]):not([class*="card"]):not([class*="chip"]):not([class*="tag"]):not([class*="action"]):hover,
main a[href]:not([class*="button"]):not([class*="btn"]):not([class*="card"]):not([class*="chip"]):not([class*="tag"]):not([class*="action"]):focus-visible,
.site-shell-footer a[href]:hover,
.site-shell-footer a[href]:focus-visible {
    color: var(--site-interactive-hover-text) !important;
    text-decoration: underline !important;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

:where(a[href], button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--site-line-strong);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px var(--site-focus-ring);
}

[class~="bg-gray-50"],
[class~="bg-slate-50"],
[class~="bg-zinc-50"],
[class~="bg-neutral-50"],
[class~="bg-stone-50"] {
    background-color: var(--site-bg) !important;
}

[class~="bg-white"],
[class~="bg-gray-100"],
[class~="bg-slate-100"] {
    background-color: var(--site-surface) !important;
}

[class*="text-gray-900"],
[class*="text-slate-900"],
[class*="text-zinc-900"],
[class*="text-neutral-900"],
[class*="text-stone-900"],
[class*="text-gray-800"],
[class*="text-slate-800"] {
    color: var(--site-text) !important;
}

[class*="text-gray-700"],
[class*="text-gray-600"],
[class*="text-gray-500"],
[class*="text-slate-700"],
[class*="text-slate-600"],
[class*="text-slate-500"] {
    color: var(--site-text-muted) !important;
}

[class*="border-gray-"],
[class*="border-slate-"],
[class*="border-zinc-"],
[class*="border-neutral-"],
[class*="border-stone-"] {
    border-color: var(--site-line) !important;
}

[class*="from-blue-"],
[class*="from-indigo-"],
[class*="from-purple-"],
[class*="from-pink-"],
[class*="from-violet-"],
[class*="from-cyan-"],
[class*="from-teal-"],
[class*="from-orange-"],
[class*="from-amber-"],
[class*="from-yellow-"] {
    --tw-gradient-from: var(--site-primary-soft) var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

[class*="via-blue-"],
[class*="via-indigo-"],
[class*="via-purple-"],
[class*="via-pink-"],
[class*="via-violet-"],
[class*="via-cyan-"],
[class*="via-teal-"],
[class*="via-orange-"],
[class*="via-amber-"],
[class*="via-yellow-"] {
    --tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--site-surface-soft) var(--tw-gradient-via-position), var(--tw-gradient-to) !important;
}

[class*="to-blue-"],
[class*="to-indigo-"],
[class*="to-purple-"],
[class*="to-pink-"],
[class*="to-violet-"],
[class*="to-cyan-"],
[class*="to-teal-"],
[class*="to-orange-"],
[class*="to-amber-"],
[class*="to-yellow-"] {
    --tw-gradient-to: var(--site-primary-softer) var(--tw-gradient-to-position) !important;
}

[class~="bg-blue-500"],
[class~="bg-blue-600"],
[class~="bg-indigo-500"],
[class~="bg-indigo-600"],
[class~="bg-purple-500"],
[class~="bg-purple-600"],
[class~="bg-pink-500"],
[class~="bg-pink-600"],
[class~="bg-violet-500"],
[class~="bg-violet-600"],
[class~="bg-cyan-500"],
[class~="bg-cyan-600"],
[class~="bg-teal-500"],
[class~="bg-teal-600"],
[class~="bg-orange-500"],
[class~="bg-orange-600"],
[class~="bg-amber-500"],
[class~="bg-amber-600"],
[class~="bg-yellow-500"],
[class~="bg-yellow-600"] {
    background-color: var(--site-primary) !important;
}

[class*="bg-blue-"],
[class*="bg-indigo-"],
[class*="bg-purple-"],
[class*="bg-pink-"],
[class*="bg-violet-"],
[class*="bg-cyan-"],
[class*="bg-teal-"],
[class*="bg-orange-"],
[class*="bg-amber-"],
[class*="bg-yellow-"] {
    background-color: var(--site-primary-soft) !important;
}

[class~="bg-blue-500"],
[class~="bg-blue-600"],
[class~="bg-blue-700"],
[class~="bg-indigo-500"],
[class~="bg-indigo-600"],
[class~="bg-indigo-700"],
[class~="bg-purple-500"],
[class~="bg-purple-600"],
[class~="bg-purple-700"],
[class~="bg-pink-500"],
[class~="bg-pink-600"],
[class~="bg-pink-700"],
[class~="bg-violet-500"],
[class~="bg-violet-600"],
[class~="bg-violet-700"],
[class~="bg-cyan-500"],
[class~="bg-cyan-600"],
[class~="bg-cyan-700"],
[class~="bg-teal-500"],
[class~="bg-teal-600"],
[class~="bg-teal-700"],
[class~="bg-orange-500"],
[class~="bg-orange-600"],
[class~="bg-orange-700"],
[class~="bg-amber-500"],
[class~="bg-amber-600"],
[class~="bg-amber-700"],
[class~="bg-yellow-500"],
[class~="bg-yellow-600"],
[class~="bg-yellow-700"] {
    background-color: var(--site-primary) !important;
}

[class~="bg-green-50"],
[class~="bg-green-100"],
[class~="bg-green-200"],
[class~="bg-emerald-50"],
[class~="bg-emerald-100"],
[class~="bg-emerald-200"] {
    background-color: var(--site-success-bg) !important;
}

[class~="bg-green-500"],
[class~="bg-green-600"],
[class~="bg-emerald-500"],
[class~="bg-emerald-600"] {
    background-color: var(--site-success-text) !important;
}

[class~="bg-red-50"],
[class~="bg-red-100"],
[class~="bg-red-200"] {
    background-color: var(--site-danger-bg) !important;
}

[class~="bg-red-500"],
[class~="bg-red-600"] {
    background-color: var(--site-danger-text) !important;
}

[class*="text-blue-"],
[class*="text-indigo-"],
[class*="text-purple-"],
[class*="text-pink-"],
[class*="text-violet-"],
[class*="text-cyan-"],
[class*="text-teal-"],
[class*="text-orange-"],
[class*="text-amber-"],
[class*="text-yellow-"] {
    color: var(--site-primary-strong) !important;
}

[class*="text-green-"],
[class*="text-emerald-"] {
    color: var(--site-success-text) !important;
}

[class*="text-red-"] {
    color: var(--site-danger-text) !important;
}

[class*="border-blue-"],
[class*="border-indigo-"],
[class*="border-purple-"],
[class*="border-pink-"],
[class*="border-violet-"],
[class*="border-cyan-"],
[class*="border-teal-"],
[class*="border-orange-"],
[class*="border-amber-"],
[class*="border-yellow-"] {
    border-color: var(--site-line-strong) !important;
}

[class*="border-green-"],
[class*="border-emerald-"] {
    border-color: var(--site-success-text) !important;
}

[class*="border-red-"] {
    border-color: var(--site-danger-text) !important;
}

[class*="ring-blue-"],
[class*="ring-indigo-"],
[class*="ring-purple-"],
[class*="ring-pink-"],
[class*="ring-violet-"],
[class*="ring-cyan-"],
[class*="ring-teal-"],
[class*="ring-orange-"],
[class*="ring-amber-"],
[class*="ring-yellow-"] {
    --tw-ring-color: var(--site-focus-ring) !important;
}

[class*="hover:bg-blue-"]:hover,
[class*="hover:bg-indigo-"]:hover,
[class*="hover:bg-purple-"]:hover,
[class*="hover:bg-pink-"]:hover,
[class*="hover:bg-violet-"]:hover,
[class*="hover:bg-cyan-"]:hover,
[class*="hover:bg-teal-"]:hover,
[class*="hover:bg-orange-"]:hover,
[class*="hover:bg-amber-"]:hover,
[class*="hover:bg-yellow-"]:hover,
[class*="hover:from-blue-"]:hover,
[class*="hover:from-indigo-"]:hover,
[class*="hover:from-purple-"]:hover,
[class*="hover:from-pink-"]:hover,
[class*="hover:from-violet-"]:hover,
[class*="hover:from-cyan-"]:hover,
[class*="hover:from-teal-"]:hover,
[class*="hover:from-orange-"]:hover,
[class*="hover:from-amber-"]:hover,
[class*="hover:from-yellow-"]:hover {
    background-color: var(--site-primary-strong) !important;
    --tw-gradient-from: var(--site-primary-strong) var(--tw-gradient-from-position) !important;
}

[class*="hover:text-blue-"]:hover,
[class*="hover:text-indigo-"]:hover,
[class*="hover:text-purple-"]:hover,
[class*="hover:text-pink-"]:hover,
[class*="hover:text-violet-"]:hover,
[class*="hover:text-cyan-"]:hover,
[class*="hover:text-teal-"]:hover,
[class*="hover:text-orange-"]:hover,
[class*="hover:text-amber-"]:hover,
[class*="hover:text-yellow-"]:hover {
    color: var(--site-primary-strong) !important;
}

/* White text was landing on #e4593a (3.63:1) or the soft gradient (1.37:1).
   Keep the palette and use the accessible coral fill instead. */
:is(
    [class*="text-white"][class*="from-blue-"],
    [class*="text-white"][class*="from-indigo-"],
    [class*="text-white"][class*="from-purple-"],
    [class*="text-white"][class*="from-pink-"],
    [class*="text-white"][class*="from-violet-"],
    [class*="text-white"][class*="from-cyan-"],
    [class*="text-white"][class*="from-teal-"],
    [class*="text-white"][class*="from-orange-"],
    [class*="text-white"][class*="from-amber-"],
    [class*="text-white"][class*="from-yellow-"],
    [class*="text-white"][class~="bg-blue-500"],
    [class*="text-white"][class~="bg-blue-600"],
    [class*="text-white"][class~="bg-blue-700"],
    [class*="text-white"][class~="bg-indigo-500"],
    [class*="text-white"][class~="bg-indigo-600"],
    [class*="text-white"][class~="bg-indigo-700"],
    [class*="text-white"][class~="bg-purple-500"],
    [class*="text-white"][class~="bg-purple-600"],
    [class*="text-white"][class~="bg-purple-700"],
    [class*="text-white"][class~="bg-pink-500"],
    [class*="text-white"][class~="bg-pink-600"],
    [class*="text-white"][class~="bg-pink-700"],
    [class*="text-white"][class~="bg-violet-500"],
    [class*="text-white"][class~="bg-violet-600"],
    [class*="text-white"][class~="bg-violet-700"],
    [class*="text-white"][class~="bg-cyan-500"],
    [class*="text-white"][class~="bg-cyan-600"],
    [class*="text-white"][class~="bg-cyan-700"],
    [class*="text-white"][class~="bg-teal-500"],
    [class*="text-white"][class~="bg-teal-600"],
    [class*="text-white"][class~="bg-teal-700"],
    [class*="text-white"][class~="bg-orange-500"],
    [class*="text-white"][class~="bg-orange-600"],
    [class*="text-white"][class~="bg-orange-700"],
    [class*="text-white"][class~="bg-amber-500"],
    [class*="text-white"][class~="bg-amber-600"],
    [class*="text-white"][class~="bg-amber-700"],
    [class*="text-white"][class~="bg-yellow-500"],
    [class*="text-white"][class~="bg-yellow-600"],
    [class*="text-white"][class~="bg-yellow-700"]
) {
    background-image: none !important;
    background-color: var(--site-primary-strong) !important;
    color: var(--site-on-primary) !important;
}

/* Those hover fills are the dark coral. Text utilities are the same coral, so the label vanishes.
   Snap the color. A 300ms fade crosses an unreadable blend of the two corals. */
:is(
    [class*="hover:bg-blue-"],
    [class*="hover:bg-indigo-"],
    [class*="hover:bg-purple-"],
    [class*="hover:bg-pink-"],
    [class*="hover:bg-violet-"],
    [class*="hover:bg-cyan-"],
    [class*="hover:bg-teal-"],
    [class*="hover:bg-orange-"],
    [class*="hover:bg-amber-"],
    [class*="hover:bg-yellow-"],
    [class*="hover:from-blue-"],
    [class*="hover:from-indigo-"],
    [class*="hover:from-purple-"],
    [class*="hover:from-pink-"],
    [class*="hover:from-violet-"],
    [class*="hover:from-cyan-"],
    [class*="hover:from-teal-"],
    [class*="hover:from-orange-"],
    [class*="hover:from-amber-"],
    [class*="hover:from-yellow-"]
) {
    transition-property: transform, box-shadow, border-color !important;
}

:is(
    [class*="hover:bg-blue-"],
    [class*="hover:bg-indigo-"],
    [class*="hover:bg-purple-"],
    [class*="hover:bg-pink-"],
    [class*="hover:bg-violet-"],
    [class*="hover:bg-cyan-"],
    [class*="hover:bg-teal-"],
    [class*="hover:bg-orange-"],
    [class*="hover:bg-amber-"],
    [class*="hover:bg-yellow-"],
    [class*="hover:from-blue-"],
    [class*="hover:from-indigo-"],
    [class*="hover:from-purple-"],
    [class*="hover:from-pink-"],
    [class*="hover:from-violet-"],
    [class*="hover:from-cyan-"],
    [class*="hover:from-teal-"],
    [class*="hover:from-orange-"],
    [class*="hover:from-amber-"],
    [class*="hover:from-yellow-"]
):hover {
    background-image: none !important;
    color: var(--site-on-primary) !important;
}

:is(
    [class*="hover:bg-blue-"],
    [class*="hover:bg-indigo-"],
    [class*="hover:bg-purple-"],
    [class*="hover:bg-pink-"],
    [class*="hover:bg-violet-"],
    [class*="hover:bg-cyan-"],
    [class*="hover:bg-teal-"],
    [class*="hover:bg-orange-"],
    [class*="hover:bg-amber-"],
    [class*="hover:bg-yellow-"],
    [class*="hover:from-blue-"],
    [class*="hover:from-indigo-"],
    [class*="hover:from-purple-"],
    [class*="hover:from-pink-"],
    [class*="hover:from-violet-"],
    [class*="hover:from-cyan-"],
    [class*="hover:from-teal-"],
    [class*="hover:from-orange-"],
    [class*="hover:from-amber-"],
    [class*="hover:from-yellow-"]
):hover :where(*) {
    color: var(--site-on-primary) !important;
    -webkit-text-fill-color: currentColor;
}

@media (max-width: 1120px) {
    .site-shell-nav-inner:has(.mobile-menu-toggle) .site-shell-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

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

@media (max-width: 800px) {
    .site-shell-nav-inner {
        align-items: flex-start;
        width: min(100% - 28px, var(--site-shell-header));
        padding: 12px 14px;
    }

    .site-shell-nav-inner:not(:has(.mobile-menu-toggle)) .site-shell-menu {
        width: 100%;
        row-gap: 4px;
    }

    .site-shell-menu a {
        padding: 7px 8px;
    }

    .site-shell-footer-inner,
    .site-shell-footer-grid {
        grid-template-columns: 1fr;
    }

    .site-search-panel-inner {
        grid-template-columns: 1fr;
    }

    .site-category-row {
        justify-content: flex-start;
    }

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

    .heartopia-container,
    .heartopia-container--narrow {
        width: min(100% - 28px, var(--site-shell-wide));
    }

    .heartopia-hero {
        min-height: auto;
        padding: 64px 0 56px;
    }

    .heartopia-hero-title {
        font-size: clamp(2.65rem, 15vw, 4.2rem);
    }

    .heartopia-hero-actions {
        width: 100%;
    }

    .heartopia-hero-actions .site-primary-button,
    .heartopia-hero-actions .site-secondary-button {
        width: 100%;
    }

    .heartopia-hero-stats {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--site-space-lg);
    }

    .heartopia-quick-nav-grid,
    .heartopia-card-grid,
    .heartopia-link-grid,
    .heartopia-split-section,
    .heartopia-contact-grid {
        grid-template-columns: 1fr;
    }

    .heartopia-section {
        padding: 52px 0;
    }
}

@media (min-width: 801px) and (max-width: 1120px) {
    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .heartopia-split-section {
        grid-template-columns: 1fr;
    }
}

/* TrustMRR data explorer */
html:has(body.trustmrr-page),
body.trustmrr-page {
    overflow-x: hidden;
}

.trustmrr-page {
    min-height: 100vh;
}

.trustmrr-main {
    color: var(--site-text);
}

.trustmrr-hero .heartopia-hero-content {
    max-width: var(--site-shell-wide);
}

.trustmrr-data-flow,
.trustmrr-visuals,
.trustmrr-explorer {
    scroll-margin-top: 96px;
}

.trustmrr-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--site-space-lg);
}

.trustmrr-flow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--site-space-md);
}

.trustmrr-flow-card,
.trustmrr-panel {
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    background: var(--site-surface);
    box-shadow: var(--site-shadow-soft);
}

.trustmrr-flow-card {
    display: grid;
    gap: var(--site-space-sm);
    align-content: start;
    padding: var(--site-space-lg);
}

.trustmrr-flow-card span {
    inline-size: 36px;
    block-size: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--site-radius-sm);
    background: var(--site-primary-soft);
    color: var(--site-primary-strong);
    font-weight: 800;
}

.trustmrr-flow-card h3,
.trustmrr-panel h2,
.trustmrr-panel h3 {
    margin: 0;
}

.trustmrr-flow-card p,
.trustmrr-panel p {
    margin: 0;
    color: var(--site-text-muted);
}

.trustmrr-panel {
    padding: var(--site-space-lg);
}

.trustmrr-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--site-space-sm);
    margin-top: var(--site-space-md);
}

.trustmrr-mini-stat {
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-sm);
    background: var(--site-surface-soft);
    padding: var(--site-space-md);
}

.trustmrr-mini-stat strong {
    display: block;
    color: var(--site-primary-strong);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    line-height: 1.1;
}

.trustmrr-mini-stat span {
    display: block;
    margin-top: var(--site-space-xs);
    color: var(--site-text-muted);
    font-size: 0.85rem;
}

.trustmrr-check-list {
    margin: var(--site-space-md) 0 0;
    padding: 0;
    display: grid;
    gap: var(--site-space-sm);
    list-style: none;
    color: var(--site-text-muted);
}

.trustmrr-check-list li {
    position: relative;
    padding-left: 1.25rem;
}

.trustmrr-check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    inline-size: 0.5rem;
    block-size: 0.5rem;
    border-radius: var(--site-radius-sm);
    background: var(--site-primary);
}

.trustmrr-bar-list {
    display: grid;
    gap: var(--site-space-sm);
    margin-top: var(--site-space-md);
}

.trustmrr-bar-row {
    display: grid;
    grid-template-columns: minmax(110px, 0.85fr) minmax(120px, 2fr) minmax(56px, auto);
    align-items: center;
    gap: var(--site-space-sm);
}

.trustmrr-bar-label,
.trustmrr-bar-count {
    min-width: 0;
    color: var(--site-text);
    font-size: 0.9rem;
}

.trustmrr-bar-label {
    overflow-wrap: anywhere;
}

.trustmrr-bar-track {
    display: block;
    min-block-size: 12px;
    overflow: hidden;
    border-radius: var(--site-radius-sm);
    background: var(--site-primary-soft);
}

.trustmrr-bar-fill {
    display: block;
    min-block-size: 12px;
    border-radius: inherit;
    background: var(--site-primary);
}

.trustmrr-status {
    margin-bottom: var(--site-space-md);
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-sm);
    background: var(--site-surface);
    color: var(--site-text-muted);
    padding: var(--site-space-md);
}

.trustmrr-status[data-tone="success"] {
    border-color: color-mix(in srgb, var(--site-success-text) 28%, var(--site-line));
    background: var(--site-success-bg);
    color: var(--site-success-text);
}

.trustmrr-status[data-tone="error"] {
    border-color: var(--site-line-strong);
    background: var(--site-warning-bg);
    color: var(--site-warning-text);
}

.trustmrr-filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(160px, 0.7fr));
    gap: var(--site-space-md);
    align-items: end;
    margin-bottom: var(--site-space-md);
}

.trustmrr-filter-panel label {
    display: grid;
    gap: var(--site-space-xs);
    color: var(--site-text);
    font-weight: 700;
}

.trustmrr-filter-panel input,
.trustmrr-filter-panel select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-sm);
    background: var(--site-surface);
    color: var(--site-text);
    padding: 0.85rem 0.95rem;
    font: inherit;
}

.trustmrr-filter-panel input:focus,
.trustmrr-filter-panel select:focus {
    outline: 3px solid var(--site-focus-ring);
    outline-offset: 2px;
    border-color: var(--site-line-strong);
}

.trustmrr-result-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--site-space-sm);
    margin: 0 0 var(--site-space-md);
    color: var(--site-text-muted);
}

.trustmrr-result-line span:first-child {
    color: var(--site-primary-strong);
    font-weight: 800;
}

.trustmrr-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-md);
    background: var(--site-surface);
    box-shadow: var(--site-shadow-soft);
}

.trustmrr-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.trustmrr-table th,
.trustmrr-table td {
    padding: var(--site-space-md);
    border-bottom: 1px solid var(--site-line);
    text-align: left;
    vertical-align: top;
}

.trustmrr-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--site-primary-soft);
    color: var(--site-primary-strong);
    font-size: 0.85rem;
    letter-spacing: 0;
}

.trustmrr-table td {
    color: var(--site-text-muted);
}

.trustmrr-table tr:last-child td {
    border-bottom: 0;
}

.trustmrr-table a {
    color: var(--site-primary-strong);
    font-weight: 700;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.trustmrr-product {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--site-space-sm);
    align-items: start;
    min-width: 240px;
}

.trustmrr-logo {
    inline-size: 40px;
    block-size: 40px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-sm);
    background: var(--site-surface-soft);
    object-fit: contain;
}

.trustmrr-product-name,
.trustmrr-product-description,
.trustmrr-cell-line {
    display: block;
}

.trustmrr-product-name {
    color: var(--site-text);
    font-size: 0.98rem;
    line-height: 1.35;
}

.trustmrr-product-description {
    margin-top: var(--site-space-xs);
    color: var(--site-text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.trustmrr-cell-line + .trustmrr-cell-line {
    margin-top: var(--site-space-xs);
}

@media (max-width: 1100px) {
    .trustmrr-flow-grid,
    .trustmrr-grid,
    .trustmrr-filter-panel {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .trustmrr-stat-grid,
    .trustmrr-bar-row {
        grid-template-columns: 1fr;
    }

    .trustmrr-panel,
    .trustmrr-flow-card {
        padding: var(--site-space-md);
    }
}

.warning-banner {
    background: var(--site-warning-bg) !important;
    border-color: var(--site-primary-strong) !important;
}

/* Every real control, on every page that loads this sheet, shows it can be clicked. */
:is(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], summary, div[onclick]) {
    cursor: pointer;
}

:is(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], summary, div[onclick]):hover,
:is(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], summary, div[onclick]):focus-visible {
    transform: translateY(-2px);
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

:is(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], summary):disabled,
:is(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], summary)[disabled],
:is(button, [role="button"])[aria-disabled="true"] {
    transform: none;
    text-decoration: none;
    cursor: not-allowed;
}

.topic-link-card:hover h3,
.topic-link-card:focus-visible h3,
.heartopia-route-card:hover h3,
.heartopia-route-card:focus-visible h3,
.heartopia-quick-nav-item:hover .heartopia-quick-nav-title,
.heartopia-quick-nav-item:focus-visible .heartopia-quick-nav-title {
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
}

@media (prefers-reduced-motion: reduce) {
    :is(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], summary, div[onclick]):hover,
    :is(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], summary, div[onclick]):focus-visible,
    .site-primary-button:hover,
    .site-secondary-button:hover,
    .tool-action:hover,
    .site-shell-menu a:hover,
    .mobile-nav-list a:hover {
        transform: none;
    }
}
