@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --text: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;
    --radius: 16px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .06);
    --t: .2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ── Hero ─────────────────────────── */
.hero {
    text-align: center;
    padding: 64px 24px 48px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0284c7 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #bae6fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-sub {
    color: rgba(255, 255, 255, .7);
    font-size: .95rem;
    margin-top: 10px;
    position: relative;
}

/* ── Grid ─────────────────────────── */
.main {
    max-width: 960px;
    margin: -28px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 24px 22px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform var(--t), box-shadow var(--t);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .1);
}

.tc-emoji {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.tc-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.tc-desc {
    font-size: .85rem;
    color: var(--text-2);
    flex: 1;
}

.tc-arrow {
    margin-top: 14px;
    font-size: .8rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tc-arrow::after {
    content: '→';
    transition: transform var(--t);
}

.tool-card:hover .tc-arrow::after {
    transform: translateX(4px);
}

.site-focus {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.focus-card,
.guide-card,
.trust-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.focus-card {
    padding: 18px 20px;
}

.focus-card strong {
    display: block;
    color: var(--text);
    margin-bottom: 6px;
    font-size: .95rem;
}

.focus-card p {
    color: var(--text-2);
    font-size: .84rem;
}

.knowledge-hub,
.trust-panel {
    margin-top: 42px;
}

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

.section-heading h2 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 4px;
}

.section-heading p {
    color: var(--text-2);
    font-size: .9rem;
    max-width: 620px;
}

.section-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: .85rem;
    white-space: nowrap;
}

.section-link:hover {
    text-decoration: underline;
}

.guide-grid,
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.guide-card {
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

.guide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    border-color: #bfdbfe;
}

.guide-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary);
    font-size: .74rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.guide-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.guide-desc {
    color: var(--text-2);
    font-size: .86rem;
    line-height: 1.65;
}

/* ── Site Intro (SEO supplementary) ── */
.site-intro {
    max-width: 660px;
    margin: 56px auto 0;
    padding: 0 20px 40px;
    color: var(--text-3);
    font-size: .82rem;
    line-height: 1.7;
}
.site-intro h2 {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-3);
    margin-bottom: 8px;
    letter-spacing: .03em;
}
.site-intro p {
    margin-bottom: 20px;
}
.site-intro ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0;
}
.site-intro li {
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.site-intro li:last-child {
    border-bottom: none;
}
.site-intro li a {
    color: var(--text-2);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: color var(--t);
}
.site-intro li a:hover {
    color: var(--primary);
}
.site-intro li span {
    color: #cbd5e1;
    font-size: .78rem;
}
.site-intro li span::before {
    content: '— ';
}

.trust-card {
    padding: 20px;
}

.trust-card h3 {
    font-size: .96rem;
    color: var(--text);
    margin-bottom: 8px;
}

.trust-card p {
    color: var(--text-2);
    font-size: .86rem;
}

/* ── Footer ───────────────────────── */
footer {
    text-align: center;
    padding: 20px;
    font-size: .75rem;
    color: var(--text-3);
}

/* ── RWD ──────────────────────────── */
@media (max-width: 480px) {
    .hero {
        padding: 48px 18px 40px;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

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

/* ── 首頁常見問題 ───────────── */
.home-faq {
    margin-top: 48px;
}

.home-faq details {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.home-faq summary {
    font-weight: 600;
    cursor: pointer;
    color: #1e293b;
    font-size: 0.95rem;
}

.home-faq details p {
    margin-top: 10px;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.8;
}

.home-faq a {
    color: #2563eb;
    text-decoration: none;
}

.home-faq a:hover {
    text-decoration: underline;
}

/* ── 豆腐 Logo ───────────── */
.hero-logo {
    width: 1.05em;
    height: 1.05em;
    vertical-align: -0.12em;
    filter: drop-shadow(0 2px 4px rgba(74, 63, 53, 0.12));
}
