/* Homepage branding; the page grid uses Bootstrap, navigation uses site-shell.css. */
:root {
    color-scheme: light;
    --home-bg: #f6f8fc;
    --home-surface: #fff;
    --home-ink: #17243e;
    --home-muted: #65748b;
    --home-line: #e3e9f2;
    --home-soft: #edf3ff;
    --home-blue: #2563eb;
    --home-hero: #f0f5ff;
    --brand: #2563eb;
}
html[data-theme="dark"] {
    color-scheme: dark;
    --home-bg: #101827;
    --home-surface: #182336;
    --home-ink: #edf3ff;
    --home-muted: #a5b4cb;
    --home-line: #2c3a50;
    --home-soft: #203554;
    --home-blue: #8ab4ff;
    --home-hero: #14223a;
    --brand: #8ab4ff;
}
.home-page { background: var(--home-bg); color: var(--home-ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.7; }
.home-page [hidden] { display: none !important; }
.home-page a { color: inherit; text-decoration: none; }
.home-page a:hover { color: var(--home-blue); }
.home-page a:focus:not(:focus-visible), .home-page button:focus:not(:focus-visible), .home-page summary:focus:not(:focus-visible) { outline: none; }
.home-page a:focus-visible, .home-page button:focus-visible, .home-page summary:focus-visible { outline: 3px solid var(--home-blue); outline-offset: 4px; }
.home-page h1, .home-page h2, .home-page h3 { color: var(--home-ink); font-weight: 700; }
.home-page .btn { border-radius: 9px; box-shadow: none; }
.home-page .btn-link { color: var(--home-blue); padding: 0; }
.home-page .btn-primary { color: #fff; background: #2563eb; border-color: #2563eb; }
.home-page .btn-primary:hover { background: #1d4ed8; }
.home-hero { background: linear-gradient(180deg, var(--home-hero), var(--home-bg)); padding: 38px 0 22px; border-bottom: 1px solid var(--home-line); }
.home-hero h1 { font-size: 34px; line-height: 1.4; letter-spacing: -.5px; margin: 0 0 12px; }
.home-hero-description { color: var(--home-muted); line-height: 1.8; margin: 0 0 23px; }
.home-search { position: relative; max-width: 740px; margin: 0 auto; text-align: left; }
.home-search-field { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 18px; background: var(--home-surface); border: 1px solid #c9d6ed; border-radius: 12px; box-shadow: 0 6px 24px rgba(38,78,145,.06); }
.home-search-field:focus-within { border-color: var(--home-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.home-search-field > i { color: var(--home-muted); font-size: 17px; }
.home-search-field .form-control { min-width: 0; padding: 6px 0; height: 42px; background: transparent; color: var(--home-ink); border: 0; box-shadow: none; }
.home-search-field .form-control::placeholder { color: var(--home-muted); opacity: 1; }
.home-search-field .btn { height: 42px; padding: 0 21px; font-weight: 600; }
.home-search-popover { position: absolute; top: calc(100% + 8px); left: 0; width: 100%; background: var(--home-surface); border: 1px solid var(--home-line); border-radius: 12px; box-shadow: 0 16px 40px rgba(15,30,60,.16); z-index: 30; overflow: hidden; }
.home-search-summary, .home-search-help { font-size: 12px; color: var(--home-muted); margin: 0; padding: 10px 16px; }
.home-search-summary { border-bottom: 1px solid var(--home-line); }
.home-search-help { border-top: 1px solid var(--home-line); background: var(--home-bg); }
#heroSearchResults { max-height: 310px; max-height: min(310px, 45vh); overflow-y: auto; overscroll-behavior: contain; }
.home-search-option { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 46px; }
.home-search-option:hover, .home-search-option[aria-selected="true"] { background: var(--home-soft); }
.home-search-option strong { font-size: 14px; font-weight: 600; flex: 1; }
.home-search-option small { color: var(--home-muted); font-size: 12px; flex-shrink: 0; }
.home-search-no-match { padding: 14px 16px; margin: 0; color: var(--home-muted); }
.home-quick-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px 16px; margin-top: 12px; font-size: 12px; }
.home-quick-links > span, .home-quick-links a { color: var(--home-muted); }
.home-quick-links a:hover { color: var(--home-blue); text-decoration: underline; }
.home-category-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 820px; margin: 24px auto 0; scroll-margin-top: 20px; }
.home-category-entry { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 8px 4px; border-radius: 9px; min-width: 0; }
.home-category-entry:hover { background: var(--home-surface); }
.home-category-entry strong { font-size: 13px; font-weight: 500; white-space: nowrap; }
.home-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 10px; width: 40px; height: 40px; color: #2563eb; background: #edf3ff; font-size: 20px; }
.home-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-page .home-icon.home-icon--image { background: transparent !important; border-radius: 0; }
.home-search-option .home-icon { width: 28px; height: 28px; font-size: 16px; }
.home-category-entry .home-icon { width: 30px; height: 30px; font-size: 17px; border-radius: 8px; }
[data-category="pdf"] .home-icon { color: #df525d; background: #fff0f1; }
[data-category="image"] .home-icon { color: #3576da; background: #eef4ff; }
[data-category="audio"] .home-icon { color: #9251d9; background: #f5eeff; }
[data-category="qrcode"] .home-icon { color: #23875c; background: #eaf8f1; }
[data-category="dev"] .home-icon { color: #c57b22; background: #fff5e6; }
html[data-theme="dark"] .home-icon { background: #273950; color: #9ac1ff; }
html[data-theme="dark"] [data-category="pdf"] .home-icon { color: #ffa4ab; background: #402e3b; }
html[data-theme="dark"] [data-category="audio"] .home-icon { color: #ceafff; background: #342e4f; }
html[data-theme="dark"] [data-category="qrcode"] .home-icon { color: #83dcb3; background: #233f3d; }
html[data-theme="dark"] [data-category="dev"] .home-icon { color: #f0c382; background: #40392f; }
.home-section { padding-top: 28px; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.home-section-heading h2 { font-size: 21px; line-height: 1.4; margin: 0; }
.home-section-heading p { color: var(--home-muted); font-size: 12px; margin: 5px 0 0; }
.home-text-link { color: var(--home-blue) !important; font-size: 12px; white-space: nowrap; }
.home-text-link i { margin-left: 6px; }
.home-tool-grid { display: flex; flex-wrap: wrap; margin-left: -7px; margin-right: -7px; }
.home-tool-grid:before, .home-tool-grid:after { display: none; }
.home-tool-cell { display: flex; margin-bottom: 14px; padding-left: 7px; padding-right: 7px; }
.home-tool-card { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 110px; padding: 18px; border: 1px solid var(--home-line); border-radius: 11px; background: var(--home-surface); transition: border-color .15s, box-shadow .15s; }
.home-tool-card:hover { border-color: #a9c3f4; box-shadow: 0 5px 18px rgba(24,64,123,.06); }
.home-tool-copy { min-width: 0; }
.home-tool-card h3 { margin: 0 0 6px; font-size: 15px; line-height: 1.5; }
.home-tool-card p { margin: 0; font-size: 12px; color: var(--home-muted); line-height: 1.7; }
.home-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 5px 0 0; padding: 12px 0; }
.home-recent h2 { flex-shrink: 0; margin: 0; font-size: 12px; line-height: 1.7; font-weight: 500; color: var(--home-muted); }
.home-recent h2 i { margin-right: 4px; }
.home-recent .btn-link { flex-shrink: 0; font-size: 12px; margin-left: auto; padding: 6px 0; }
.home-recent-list { display: flex; flex: 1; flex-wrap: wrap; min-width: 0; gap: 6px 8px; }
.home-recent-list a { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-height: 34px; padding: 4px 9px 4px 5px; border: 1px solid var(--home-line); border-radius: 8px; background: var(--home-surface); font-size: 12px; transition: border-color .15s, background-color .15s; }
.home-recent-list a:hover { background: var(--home-soft); border-color: var(--home-blue); }
.home-recent-list .home-icon { width: 24px; height: 24px; border-radius: 6px; font-size: 13px; }
.home-recent-name { min-width: 0; overflow-wrap: anywhere; }
.home-small-note { flex-basis: 100%; font-size: 11px; color: var(--home-muted); margin: 0; }
.home-help { margin-top: 20px; margin-bottom: 32px; padding-top: 26px; border-top: 1px solid var(--home-line); }
.home-help .home-section-heading { margin-bottom: 10px; }
.home-help h2 { font-size: 17px; }
.home-guide-list { margin: 0; }
.home-guide { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--home-line); }
.home-guide-category { color: var(--home-muted); font-size: 11px; flex-shrink: 0; }
.home-guide-title { flex: 1; font-size: 13px; line-height: 1.7; }
.home-guide > .fa { color: var(--home-muted); }
.home-notes { padding-left: 40px; }
.home-faq-list details { border-bottom: 1px solid var(--home-line); padding: 12px 0; }
.home-faq-list summary { cursor: pointer; color: var(--home-ink); font-size: 13px; }
.home-faq-list p { font-size: 12px; color: var(--home-muted); margin: 10px 0 0; line-height: 1.9; }
.home-faq-list .btn-link { font-size: inherit; vertical-align: baseline; white-space: normal; text-align: left; }
.home-noscript { color: var(--home-muted); margin-top: 10px; }
@media (min-width: 1200px) { .home-page .container { width: 1180px; } }
@media (max-width: 991px) {
    .home-notes { padding-left: 15px; margin-top: 26px; }
}
@media (max-width: 767px) {
    .home-page .container { padding-left: 20px; padding-right: 20px; }
    .home-hero { padding: 28px 0 16px; }
    .home-hero h1 { font-size: 27px; margin-bottom: 10px; }
    .home-hero-description { font-size: 14px; margin-bottom: 20px; }
    .home-hero-description span { display: block; }
    .home-search-field { padding: 5px 5px 5px 12px; gap: 7px; border-radius: 10px; }
    .home-search-field .form-control { font-size: 16px; height: 44px; }
    .home-search-field .btn { font-size: 14px; padding: 0 12px; height: 44px; white-space: nowrap; }
    .home-search-field > i { font-size: 14px; }
    .home-search-help { font-size: 12px; padding: 9px 12px; }
    .home-search-summary { font-size: 12px; padding: 9px 12px; }
    .home-search-option { padding: 10px 12px; }
    .home-search-option strong { font-size: 13px; }
    .home-search-option small { font-size: 12px; }
    .home-quick-links { gap: 4px 12px; font-size: 12px; margin-top: 10px; }
    .home-quick-links a { display: inline-flex; min-height: 32px; align-items: center; }
    .home-category-strip { gap: 3px; margin-top: 18px; }
    .home-category-entry { flex-direction: column; gap: 5px; padding: 7px 0; }
    .home-category-entry strong { font-size: 12px; }
    .home-category-entry .home-icon { width: 30px; height: 30px; font-size: 18px; }
    .home-section { padding-top: 22px; }
    .home-section-heading { margin-bottom: 15px; gap: 10px; }
    .home-section-heading h2 { font-size: 19px; }
    .home-section-heading p { font-size: 13px; }
    .home-text-link { font-size: 12px; min-height: 40px; display: inline-flex; align-items: center; }
    .home-tool-grid { margin: 0 -5px; }
    .home-tool-cell { padding: 0 5px; margin-bottom: 10px; }
    .home-tool-card { display: block; min-height: 166px; padding: 16px 14px; border-radius: 10px; }
    .home-tool-card .home-icon { width: 36px; height: 36px; font-size: 19px; border-radius: 8px; }
    .home-tool-card h3 { font-size: 15px; margin: 10px 0 6px; }
    .home-tool-card p { font-size: 13px; line-height: 1.7; }
    .home-recent { gap: 8px 12px; }
    .home-recent .btn-link { order: 1; }
    .home-recent-list { order: 2; flex-basis: 100%; }
    .home-recent-list a { min-height: 44px; font-size: 13px; }
    .home-small-note { order: 3; }
    .home-help { margin-top: 18px; margin-bottom: 25px; padding-top: 22px; }
    .home-help h2 { font-size: 17px; }
    .home-guide { gap: 8px; padding: 12px 0; }
    .home-guide-category { font-size: 12px; }
    .home-guide-title { font-size: 14px; }
    .home-faq-list summary { font-size: 14px; min-height: 44px; }
}
@media (max-width: 359px) {
    .home-hero h1 { font-size: 25px; }
    .home-category-entry strong { font-size: 12px; }
    .home-quick-links { column-gap: 9px; }
}
@media (prefers-reduced-motion: reduce) { .home-page *, .home-page *:before, .home-page *:after { transition: none !important; scroll-behavior: auto !important; } }
