/* Public tools share the Home/Download palette without changing the site navigation. */
.resource-page {
    --resource-ink: #0f172a;
    --resource-muted: #64748b;
    --resource-line: #e2e8f0;
    --resource-surface: #fff;
    --resource-soft: #f8fafc;
    --resource-accent: #4f46e5;
    --resource-selected: #eef2ff;
    color: var(--resource-ink);
    background: var(--resource-surface);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}
.dark .resource-page {
    --resource-ink: #e2e8f0;
    --resource-muted: #a3b1c6;
    --resource-line: #2b384f;
    --resource-surface: #0f172a;
    --resource-soft: #172033;
    --resource-accent: #a5b4fc;
    --resource-selected: #222b4a;
}
.resource-page *, .resource-page *::before, .resource-page *::after { box-sizing: border-box; }
.resource-page [hidden] { display: none !important; }
.resource-container { width: min(100%, 1168px); margin-inline: auto; padding-inline: 24px; }
.resource-hero { padding: 124px 0 36px; background: linear-gradient(135deg, #f8faff, #eef2ff 55%, #f8faff); }
.dark .resource-hero { background: linear-gradient(135deg, #1e293b, #1a2340 55%, #1e293b); }
.resource-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 18px; color: var(--resource-muted); font-size: .8rem; }
.resource-breadcrumb a { color: var(--resource-muted); text-decoration: none; }
.resource-breadcrumb a:hover { color: var(--resource-accent); }
.resource-eyebrow { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; padding: 5px 12px; border: 1px solid #6366f130; border-radius: 999px; background: #6366f10d; color: var(--resource-accent); font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.resource-hero h1 { margin: 0; color: var(--resource-ink); font-size: clamp(2rem, 4.5vw, 2.9rem); font-weight: 800; line-height: 1.2; letter-spacing: -.035em; }
.resource-hero p { max-width: 680px; margin: 12px 0 0; color: var(--resource-muted); font-size: 1rem; }
.resource-jumps { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; }
.resource-jumps a { color: var(--resource-accent); text-decoration: none; font-size: .85rem; font-weight: 650; }
.resource-jumps a:hover { text-decoration: underline; }
.resource-main { padding-block: 30px 64px; }
.resource-card { padding: 26px; border: 1px solid var(--resource-line); border-radius: 16px; background: var(--resource-surface); box-shadow: 0 6px 24px #0f172a05; }
.resource-section { margin-top: 40px; scroll-margin-top: 100px; }
.resource-section h2 { margin: 0 0 8px; font-size: 1.45rem; font-weight: 750; line-height: 1.4; letter-spacing: -.02em; }
.resource-section > p { margin: 0 0 20px; color: var(--resource-muted); }
.resource-button, .resource-secondary { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; padding: 10px 18px; border: 1px solid transparent; border-radius: 9px; font-size: .875rem; font-weight: 700; line-height: 1.4; text-decoration: none; cursor: pointer; }
.resource-button { background: #4f46e5; color: #fff; }
.resource-button:hover { background: #4338ca; color: #fff; }
.resource-secondary { background: var(--resource-surface); border-color: var(--resource-line); color: var(--resource-ink); }
.resource-secondary:hover { border-color: #a5b4fc; color: var(--resource-accent); }
.resource-page button:disabled { cursor: wait; opacity: .65; }
.resource-page :is(button, a, input, textarea, select, summary):focus-visible { outline: 3px solid #818cf8; outline-offset: 3px; }
.resource-note { margin-top: 16px; color: var(--resource-muted); font-size: .85rem; }
.resource-details { margin-top: 16px; padding: 16px 20px; border: 1px solid var(--resource-line); border-radius: 12px; background: var(--resource-surface); scroll-margin-top: 100px; }
.resource-details > summary { cursor: pointer; color: var(--resource-ink); font-weight: 650; }
.resource-details > summary::marker { color: var(--resource-accent); }
.resource-details > :last-child { margin-bottom: 0; }
.resource-details p { color: var(--resource-muted); }
.resource-related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.resource-related a { padding: 8px 12px; border: 1px solid var(--resource-line); border-radius: 8px; color: var(--resource-accent); font-size: .85rem; text-decoration: none; }
.resource-related a:hover { background: var(--resource-selected); }
.resource-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.tools-start { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tools-start a { padding: 24px; border: 1px solid var(--resource-line); border-radius: 14px; color: var(--resource-ink); background: var(--resource-surface); text-decoration: none; transition: border-color .15s, transform .15s; }
.tools-start a:hover, .tools-card:hover { border-color: #818cf8; transform: translateY(-2px); }
.tools-start a:first-child { border-color: #c7d2fe; background: var(--resource-selected); }
.tools-icon { display: inline-flex; justify-content: center; align-items: center; width: 38px; height: 38px; margin-bottom: 14px; border-radius: 10px; color: var(--resource-accent); background: var(--resource-selected); font-size: 1.1rem; font-weight: 700; }
.tools-start h2 { margin: 0 0 8px; font-size: 1.13rem; font-weight: 750; }
.tools-start p, .tools-card p { margin: 0; color: var(--resource-muted); font-size: .88rem; }
.tools-arrow { display: block; margin-top: 18px; color: var(--resource-accent); font-size: .83rem; font-weight: 700; }
.tools-directory-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.tools-search { display: flex; align-items: center; gap: 10px; }
.tools-search label { color: var(--resource-muted); font-size: .85rem; }
.tools-search input { width: min(100%, 260px); min-height: 44px; padding: 9px 12px; border: 1px solid var(--resource-line); border-radius: 8px; color: var(--resource-ink); background: var(--resource-surface); font-size: .875rem; }
.tools-group { margin-top: 26px; scroll-margin-top: 100px; }
.tools-group > h3 { margin: 0 0 3px; font-size: 1rem; font-weight: 700; }
.tools-group > p { margin: 0 0 14px; color: var(--resource-muted); font-size: .875rem; }
.tools-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tools-card { display: flex; gap: 13px; padding: 19px; border: 1px solid var(--resource-line); border-radius: 12px; color: var(--resource-ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.tools-card .tools-icon { flex-shrink: 0; width: 32px; height: 32px; margin-bottom: 0; }
.tools-card h4 { margin: 1px 0 5px; font-size: .95rem; font-weight: 700; }
.tools-help { background: var(--resource-soft); }
.tools-help p { max-width: 84ch; margin-block: 12px; }
.tools-help p a { color: var(--resource-accent); text-decoration: underline; text-underline-offset: 3px; }
.resource-reading-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-block: 18px 24px; }
.resource-reading-grid h3 { margin: 0 0 8px; color: var(--resource-ink); font-size: 1rem; font-weight: 700; }
.resource-reading-grid p { margin: 0; color: var(--resource-muted); font-size: .9rem; }
.resource-reading-grid p a { color: var(--resource-accent); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .tools-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
    .resource-container { padding-inline: 18px; }
    .resource-hero { padding: 110px 0 28px; }
    .resource-main { padding-top: 22px; }
    .resource-card { padding: 20px; }
    .tools-start, .tools-cards, .resource-reading-grid { grid-template-columns: 1fr; }
    .tools-start a { padding: 20px; }
    .tools-search { width: 100%; flex-wrap: wrap; }
    .tools-search input { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .resource-page * { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
