/* inner pages — 知识库 / 工具 共用版式
   对齐首页：纸色底、沙色导语、衬线标题、细线卡片、青绿强调 */

body.subpage {
    --primary-color: #0f6e7a;
    --primary-dark: #0a525b;
    --primary-light: #3d8b94;
    --accent-color: #0f6e7a;
    --tester-primary: #0f6e7a;
    --tester-primary-hover: #0a525b;
    --tester-primary-light: #d7eef1;
    --contrast-primary: #0f6e7a;
    --contrast-primary-hover: #0a525b;
    --contrast-primary-light: #d7eef1;
    --contrast-gradient: #0f6e7a;
    --ai-primary: #0f6e7a;
    --ai-primary-hover: #0a525b;
    --ai-primary-light: #d7eef1;
    --ai-gradient: #0f6e7a;
    --senior-primary: #0f6e7a;
    --senior-primary-hover: #0a525b;
    --senior-primary-light: #d7eef1;
    --senior-gradient: #0f6e7a;
    --checklist-primary: #0f6e7a;
    --checklist-primary-hover: #0a525b;
    --checklist-primary-light: #d7eef1;
    --checklist-gradient: #0f6e7a;
    --mobile-primary: #0f6e7a;
    --mobile-primary-hover: #0a525b;
    --mobile-primary-light: #d7eef1;
    --mobile-gradient: #0f6e7a;
    --aging-primary: #0f6e7a;
    --aging-primary-hover: #0a525b;
    --aging-primary-light: #d7eef1;
    --aging-gradient: #0f6e7a;
}

/* ===== 导语区：所有内页同一条沙色地平线 ===== */
.page-intro,
.tool-hero,
.cc-title-section,
.ai-title-section,
.senior-title-section,
.checklist-title-section,
.aging-title-section {
    background: var(--sand) !important;
    color: var(--ink) !important;
    margin: 0 !important;
    padding: 2.4rem 0 2rem !important;
    text-align: left !important;
    overflow: visible !important;
    position: relative;
    border-bottom: 1px solid var(--line);
}
.page-intro::before,
.tool-hero::before,
.cc-title-section::before,
.ai-title-section::before,
.senior-title-section::before,
.checklist-title-section::before,
.aging-title-section::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand) 0%, transparent 55%);
    opacity: 1;
    z-index: 1;
}

.page-intro h1,
.tool-hero h1,
.cc-title,
.ai-title,
.senior-title,
.checklist-title,
.aging-title {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 2.6vw, 2.25rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink) !important;
    text-shadow: none !important;
    margin: 0 0 .55rem;
    display: block;
    justify-content: flex-start;
    gap: 0;
}

.page-intro-lead,
.tool-hero-lead,
.cc-title-section .subtitle,
.cc-title-section p,
.ai-title-section p,
.senior-title-section p,
.checklist-title-section p,
.aging-subtitle {
    color: var(--muted) !important;
    opacity: 1 !important;
    font-size: 1.05rem !important;
    line-height: 1.65;
    max-width: 38rem;
    margin: 0 !important;
    text-align: left !important;
}

.page-intro .section-kicker,
.tool-hero .section-kicker,
.cc-title-section .section-kicker,
.ai-title-section .section-kicker,
.senior-title-section .section-kicker,
.checklist-title-section .section-kicker,
.aging-title-section .section-kicker {
    margin-bottom: .45rem;
}

.ai-title-section .badge,
.senior-badges,
.checklist-title-section .badges {
    display: none !important;
}

/* 内页不再需要「返回首页」；导航已覆盖 */
body.subpage a.btn-outline-secondary[href*="index.html"],
body.subpage .back-button {
    display: none !important;
}

/* ===== 工具工作台 ===== */
body.subpage .cc-main,
body.subpage .ai-main,
body.subpage .senior-main,
body.subpage .checklist-main {
    background: var(--paper);
}

.tester-container,
.cc-container,
.ai-container,
.senior-container,
.checklist-container,
.checklist-content {
    max-width: 1040px;
    margin: 0 auto;
    padding: 2rem 1.15rem 4.5rem;
}

.test-form,
.cc-card,
.ai-container .test-form {
    background: #fff !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    padding: 1.75rem 1.75rem 1.5rem !important;
}

.tester-container .test-form > h2,
.tester-container .test-form > p:first-of-type {
    display: none;
}

body.subpage .form-control,
body.subpage input[type="text"],
body.subpage input[type="url"],
body.subpage input[type="email"] {
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 48px;
    font-size: 1rem;
}
body.subpage .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 110, 122, .18);
    outline: none;
}
body.subpage .test-form-enhanced .input-group-text { display: none; }
body.subpage .test-form-enhanced .input-group .form-control {
    border-radius: 8px;
}

body.subpage .btn-primary,
body.subpage .btn-lg.btn-primary {
    background: var(--brand) !important;
    border: none !important;
    border-radius: 999px !important;
    color: #fff !important;
    font-weight: 600;
    padding: .7rem 1.4rem !important;
    box-shadow: none !important;
    transform: none !important;
}
body.subpage .btn-primary:hover,
body.subpage .btn-primary:focus-visible {
    background: var(--brand-deep) !important;
    color: #fff !important;
    transform: none !important;
}

body.subpage .alert-warning {
    background: var(--sand);
    border: 1px solid var(--line);
    color: var(--ink-2);
    border-radius: 10px;
    margin-top: 1.25rem;
}
body.subpage .alert-warning .text-warning,
body.subpage .alert-warning .fa-2x {
    display: none;
}
body.subpage .alert-warning h4 {
    font-size: 1rem;
    margin-bottom: .4rem;
}

.ai-features {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem !important;
}
.feature-card {
    background: #fff !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 1.15rem 1.1rem 1.25rem !important;
    text-align: left !important;
}
.feature-icon { display: none !important; }
.feature-card h3 {
    font-size: 1.05rem !important;
    margin: 0 0 .35rem !important;
}
.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
}
@media (max-width: 767.98px) {
    .ai-features { grid-template-columns: 1fr; }
}

/* ===== 知识库阅读栏 ===== */
.standards-main {
    background: var(--paper) !important;
    padding: 0 0 4.5rem !important;
    min-height: 60vh;
}
.standards-main > .page-intro + .container,
.standards-main > .aging-title-section + .container,
.standards-main > .page-intro + .standards-container {
    padding-top: 2rem;
}
.standards-container {
    display: grid !important;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1.5rem !important;
    max-width: 1120px !important;
    margin: 0 auto !important;
    padding: 0 1.15rem !important;
    align-items: start;
}
.standards-sidebar {
    position: sticky !important;
    top: 5.4rem !important;
    max-height: calc(100vh - 6.2rem);
    overflow: auto;
    background: #fff !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    padding: 1.15rem 1rem !important;
}
.standards-sidebar h2 {
    font-size: .95rem !important;
    font-weight: 700;
    color: var(--ink) !important;
    border-bottom: 1px solid var(--line) !important;
    margin: 0 0 1rem !important;
    padding-bottom: .65rem !important;
    letter-spacing: .04em;
}
.standards-nav {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.standards-nav li { margin-bottom: .4rem; }
.standards-nav a {
    display: block;
    padding: .55rem .8rem !important;
    border-left: 3px solid transparent !important;
    border-radius: 6px !important;
    color: var(--ink-2) !important;
    text-decoration: none;
    font-size: .92rem;
}
.standards-nav a:hover,
.standards-nav a:focus-visible,
.standards-nav a.active {
    background: var(--brand-soft) !important;
    color: var(--brand-deep) !important;
    border-left-color: var(--brand) !important;
    outline: none !important;
}

.standards-content {
    background: #fff !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    padding: 2.25rem 2.4rem 2.75rem !important;
}
.standards-content > .section-kicker,
.standards-content > h1:first-of-type {
    display: none;
}
.standards-content h2 {
    color: var(--ink) !important;
    font-family: var(--font-display);
    font-size: 1.35rem !important;
    border-bottom: 1px solid var(--line) !important;
    padding-bottom: .5rem;
    margin-top: 2.4rem !important;
    scroll-margin-top: 5.5rem;
}
.standards-content h3 {
    color: var(--ink-2) !important;
    font-size: 1.12rem !important;
    margin-top: 1.6rem !important;
}
.standards-content p,
.standards-content li {
    color: var(--ink-2);
    font-size: 1.02rem;
    line-height: 1.8;
}
.standards-content a {
    text-underline-offset: 3px;
}
.standards-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}
.standards-content th,
.standards-content td {
    border-bottom: 1px solid var(--line);
    padding: .55rem .4rem;
    text-align: left;
}
.standards-content th {
    color: var(--muted);
    font-weight: 600;
    font-size: .82rem;
}

body.subpage .cta-box,
body.subpage .highlight-box,
body.subpage .info-box {
    background: var(--sand) !important;
    border: 1px solid var(--line) !important;
    border-left: 3px solid var(--brand) !important;
    border-radius: 8px !important;
    color: var(--ink-2) !important;
}

.app-page {
    padding-top: 0 !important;
}

.standards-nav a span[aria-hidden] { display: none !important; }

body.subpage .standard-card,
body.subpage .principle-item {
    background: var(--paper) !important;
    border: 1px solid var(--line) !important;
    border-left: 3px solid var(--brand) !important;
    box-shadow: none !important;
    border-radius: 8px !important;
}
body.subpage .standard-card:hover { transform: none !important; }
body.subpage .standard-card h3,
body.subpage .principle-item h4 {
    color: var(--ink) !important;
    font-family: var(--font-display);
}

body.subpage .checklist-toolbar,
body.subpage .checklist-controls {
    background: #fff !important;
    border: 1px solid var(--line) !important;
    box-shadow: none !important;
    border-radius: 12px !important;
}
body.subpage .filter-btn {
    border-radius: 999px !important;
    border-color: var(--line) !important;
    background: #fff !important;
    color: var(--ink-2) !important;
}
body.subpage .filter-btn.active,
body.subpage .filter-btn:hover {
    background: var(--brand-soft) !important;
    border-color: var(--brand) !important;
    color: var(--brand-deep) !important;
}

body.subpage .cc-actions .btn {
    border-radius: 999px !important;
    border-color: var(--line) !important;
    background: #fff !important;
    color: var(--ink-2) !important;
}
body.subpage .cc-actions .btn:hover {
    background: var(--brand-soft) !important;
    border-color: var(--brand) !important;
    color: var(--brand-deep) !important;
}

body.subpage .result-area,
body.subpage .loading-state {
    border: 1px solid var(--line);
    box-shadow: none !important;
    border-radius: 12px;
}
body.subpage .result-title,
body.subpage .score-number,
body.subpage .score-level {
    font-family: var(--font-display);
}
body.subpage .score-card {
    background: var(--sand) !important;
    border: 1px solid var(--line) !important;
    box-shadow: none !important;
}
body.subpage .summary-card-enhanced {
    box-shadow: none !important;
    transform: none !important;
    border-width: 1px !important;
}
body.subpage .locked-banner {
    background: var(--sand) !important;
    border-color: var(--line) !important;
}
body.subpage .info-box {
    border-left-color: var(--brand) !important;
}
body.subpage .info-box-tip {
    background: var(--sand) !important;
}
body.subpage .action-btn {
    border-radius: 999px !important;
    box-shadow: none !important;
    transform: none !important;
}
body.subpage .action-btn.primary {
    background: var(--brand) !important;
    border-color: var(--brand) !important;
}

.ai-report {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.ai-report-head {
    background: var(--sand);
    padding: 1.75rem 1.75rem 1.35rem;
    border-bottom: 1px solid var(--line);
    position: relative;
}
.ai-report-head::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand) 0%, transparent 55%);
}
.ai-report-head h1 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    margin: 0 0 .5rem;
    color: var(--ink);
    font-weight: 700;
}
.ai-report-meta {
    color: var(--muted);
    margin: 0 0 .2rem;
    font-size: .95rem;
    word-break: break-all;
}
.ai-report-block {
    padding: 1.5rem 1.75rem 1.75rem;
    border-top: 1px solid var(--line);
}
.ai-report-block > h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.ai-report-foot {
    background: var(--paper);
    padding: 1rem 1.75rem;
    color: var(--muted);
    font-size: .9rem;
}
.ai-report-foot p { margin: 0; }

#resultArea article a {
    color: var(--brand-deep) !important;
}
#resultArea article a:hover {
    color: var(--brand) !important;
}

.app-page { padding: 0 0 4.5rem !important; }
.app-page > .container { padding-top: 2rem; }
.app-card { box-shadow: none !important; }

.policy-body { padding-top: 2.25rem !important; padding-bottom: 4rem !important; }
.policy-body > h1 { display: none; }

.page-related {
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 2rem 0 2.4rem;
}
.page-related h2 {
    font-size: 1.15rem;
    margin: 0 0 .9rem;
}
.related-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .6rem;
}
.related-row a {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .38rem .95rem;
    text-decoration: none;
    color: var(--ink-2);
    font-size: .9rem;
    background: var(--paper);
    font-family: var(--font-sans);
}
.related-row a:hover,
.related-row a:focus-visible {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-deep);
}

/* ===== 三点摘要：导语下快速读懂这一页 ===== */
.key-facts {
    list-style: none;
    margin: 1.35rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    max-width: 46rem;
}
.key-facts li {
    background: rgba(255, 255, 255, .72);
    padding: .9rem 1rem 1rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.key-facts .kf-index {
    font-family: var(--font-latin);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--brand);
}
.key-facts strong {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--ink);
}
.key-facts span:last-child {
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.45;
}

/* 工具页过长提示改为一句边界说明 */
.tool-note {
    margin: 1.1rem 0 0;
    padding: .9rem 1.05rem;
    background: var(--sand);
    border: 1px solid var(--line);
    border-left: 3px solid var(--brand);
    border-radius: 8px;
    color: var(--ink-2);
    font-size: .95rem;
    line-height: 1.65;
}
.tool-note a {
    font-weight: 600;
    text-underline-offset: 3px;
}

/* ===== 页尾下一步：获客但不夸大 ===== */
.page-convert {
    background: var(--sand);
    border-top: 1px solid var(--line);
    padding: 2.1rem 0 2.2rem;
}
.page-convert-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
}
.page-convert h2 {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    margin: 0 0 .35rem;
    max-width: 28rem;
}
.page-convert p {
    margin: 0;
    color: var(--muted);
    max-width: 32rem;
    font-size: .95rem;
}
.page-convert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}
.page-convert .btn-detect,
.page-convert .btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: .7rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-family: var(--font-sans);
}
.page-convert .btn-detect {
    background: var(--brand);
    color: #fff;
}
.page-convert .btn-detect:hover,
.page-convert .btn-detect:focus-visible {
    background: var(--brand-deep);
    color: #fff;
}
.page-convert .btn-ghost {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}
.page-convert .btn-ghost:hover,
.page-convert .btn-ghost:focus-visible {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-deep);
}

@media (max-width: 767.98px) {
    .key-facts { grid-template-columns: 1fr; max-width: none; }
}

@media (max-width: 991.98px) {
    .standards-container {
        grid-template-columns: 1fr;
    }
    .standards-sidebar {
        position: relative !important;
        top: auto !important;
        max-height: none;
    }
    .standards-content {
        padding: 1.5rem 1.2rem 2rem !important;
    }
}
