.hero {
    background:
        radial-gradient(circle at top, rgba(90, 134, 255, 0.25), transparent 35%),
        linear-gradient(135deg, #09111f 0%, #101b2d 38%, #0f172a 100%);
    color: white;
    padding: 4rem 1rem 3.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: min(56vh, 31rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle at center, black 48%, transparent 90%);
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    display: block;
}

.hero-bg-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(11, 18, 32, 0.2) 0%, rgba(15, 23, 42, 0.6) 100%);
}

.hero-content {
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    padding: 0 0.15rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 18px 45px rgba(15, 23, 42, 0.45);
    box-sizing: border-box;
}

.hero-brand {
    display: inline-block;
    margin: 0 0 0.85rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #96d8ff;
}

.hero h1 {
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(2.1rem, 4vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1.04;
    max-width: 820px;
    margin-inline: auto;
}

.hero p {
    margin: 1rem auto 1.5rem;
    max-width: 40rem;
    font-size: 1.14rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-search {
    display: flex;
    gap: 0.7rem;
    max-width: 42rem;
    width: 100%;
    margin: 0 auto 1.5rem;
    padding: 0.5rem 0.6rem 0.5rem 1rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 999px;
    backdrop-filter: blur(14px);
    box-sizing: border-box;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
}

.hero-search input[type="search"] {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 1rem;
    padding: 0.8rem 0.6rem;
    outline: none;
}

.hero-search input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.hero-search input[type="search"]::-webkit-search-cancel-button {
    filter: invert(1);
}

.hero-search-btn {
    flex-shrink: 0;
    border: 0;
    border-radius: 999px;
    padding: 0.78rem 1.3rem;
    background: linear-gradient(135deg, #5eead4, #60a5fa);
    color: #081221;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 28px rgba(96, 165, 250, 0.32);
}

.hero-search-btn:hover {
    transform: translateY(-1px);
}

.hero-search-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.hero-metrics {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.25rem auto 0;
    max-width: 42rem;
}

.hero-metrics .metric-pill {
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    color: rgba(255,255,255,0.86);
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin: 0 auto;
    width: 100%;
    max-width: 32rem;
    box-sizing: border-box;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    line-height: 1.25;
    box-sizing: border-box;
    max-width: 100%;
    transition: all 0.2s ease;
}

.btn-hero-primary {
    background: #fff;
    color: #0f172a;
}

.btn-hero-primary:hover {
    background: #ecfdf5;
    color: #0f172a;
}

.btn-hero-secondary {
    background: rgba(94, 234, 212, 0.12);
    color: #ecfeff;
    border: 1px solid rgba(94, 234, 212, 0.4);
}

.btn-hero-secondary:hover {
    background: rgba(94, 234, 212, 0.18);
    color: #fff;
}

.btn-hero-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-hero-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-hero:focus-visible {
    outline: 3px solid #6ee7b7;
    outline-offset: 3px;
}

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.15rem;
    margin: 0 auto;
    max-width: 40rem;
    padding: 0 0.5rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.78);
}

.trust-strip a {
    color: #a7f3d0;
    text-decoration: none;
    font-weight: 500;
}

.trust-strip a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.trust-strip .trust-sep {
    margin: 0 0.45rem;
    opacity: 0.45;
    user-select: none;
}

.catalog-note,
.hero p.catalog-note {
    margin: 1rem auto 0;
    max-width: 36rem;
    padding: 0 0.5rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.45;
    opacity: 1;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
}

/* Collapsed category switcher (all viewports). Desktop chip grid is hidden. */

.category-picker {
    display: block;
    max-width: 1200px;
    margin: 1.25rem auto 0.75rem;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

.category-picker > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    max-width: 36rem;
    margin: 0 auto;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.35;
    cursor: pointer;
    min-height: 44px;
    box-sizing: border-box;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.category-picker > summary::-webkit-details-marker {
    display: none;
}

.category-picker > summary::marker {
    content: "";
}

.category-picker > summary:hover {
    border-color: var(--accent);
}

.category-picker > summary:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.category-picker > summary::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    margin-left: 0.25rem;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(45deg);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.category-picker[open] > summary {
    border-color: var(--accent);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-width: none;
}

.category-picker[open] > summary::after {
    transform: rotate(-135deg);
    margin-top: 0.2rem;
}

.category-picker-label {
    color: var(--text-muted);
    font-weight: 500;
}

.category-picker-current {
    color: var(--primary);
    font-weight: 700;
}

.category-picker-summary-text {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.35rem;
    min-width: 0;
}

.category-picker .category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
    max-width: none;
    margin: 0;
    padding: 0.75rem 1rem 1rem;
    border: 1px solid var(--accent);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--bg-card);
    max-height: min(50vh, 22rem);
    max-height: min(50dvh, 22rem);
    overflow-y: auto;
    box-sizing: border-box;
}

.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 1200px;
    margin: 2.5rem auto 1rem auto;
    padding: 0 1.5rem;
}

.nav-link {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    box-sizing: border-box;
    transition: var(--transition);
    box-shadow: none;
}

.nav-link:hover {
    border-color: var(--accent);
    color: var(--text-main);
    background-color: #f0fdf4;
    box-shadow: none;
}

.nav-link.active {
    border-color: var(--accent);
    color: var(--text-main);
    background-color: #ecfdf5;
    box-shadow: none;
    font-weight: 600;
}

.nav-link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

main {
    max-width: 1280px;
    margin: 2rem auto 3rem auto;
    padding: 0 1.5rem;
    min-height: 50vh;
}

.super-category {
    margin-bottom: 4rem;
    scroll-margin-top: 2rem;
}

.super-title {
    font-size: 1.65rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.super-title-icon {
    display: none;
}

.seo-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    max-width: 900px;
    line-height: 1.5;
}

.page-catalog .breadcrumb {
    margin-top: 0.25rem;
}

h1.catalog-title {
    font-size: 1.85rem;
    color: var(--text-main);
    margin: 0 0 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: normal;
}

h1.catalog-title .super-title-icon {
    display: none;
}

.page-intro {
    max-width: 68rem;
    margin: 0 0 1.75rem;
}

.page-intro p {
    margin: 0 0 1rem;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text-main);
}

.page-intro p:last-child {
    margin-bottom: 0;
}

.catalog-warning {
    margin: 0.25rem 0 0;
    padding: 0.85rem 1rem;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.6;
}

.catalog-guide {
    max-width: 68rem;
    margin: 0 0 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.catalog-guide-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem 1.25rem;
}

.catalog-guide-block h2 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    color: var(--text-main);
}

.catalog-guide-lead {
    margin: 0 0 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.catalog-guide-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-main);
}

.catalog-guide-list li {
    margin: 0 0 0.65rem;
    font-size: 1rem;
    line-height: 1.6;
}

.catalog-guide-list li:last-child {
    margin-bottom: 0;
}

.hardware-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.hardware-card {
    background: var(--bg-body, #f8fafc);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.95rem;
}

.hardware-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    color: var(--text-main);
}

.hardware-card p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .hardware-grid {
        grid-template-columns: 1fr;
    }
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.15rem;
}

.hub-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.5rem;
    margin: 0 0 1.75rem;
}

.hub-toc a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.62rem 0.9rem;
    box-sizing: border-box;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text-main);
    background: rgba(255,255,255,0.65);
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hub-toc a:hover,
.hub-toc a:focus-visible {
    border-color: rgba(29, 78, 216, 0.3);
    color: var(--text-main);
    background: rgba(232, 241, 255, 0.9);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.hub-section {
    margin: 0 0 2.5rem;
    scroll-margin-top: 1.25rem;
}

.hub-section[hidden] {
    display: none;
}

.hub-section h2 {
    font-family: var(--font-body);
    font-size: clamp(1.4rem, 2.1vw, 1.8rem);
    font-weight: 750;
    color: var(--text-main);
    margin: 0 0 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.03em;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

a.hub-card,
a.hub-card:link,
a.hub-card:visited {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem 1.2rem 1.1rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 190px;
}

a.hub-card:hover {
    border-color: rgba(29, 78, 216, 0.3);
    box-shadow: var(--shadow-md);
    background: linear-gradient(180deg, rgba(255,255,255,1), rgba(243,247,255,1));
    transform: translateY(-4px);
}

a.hub-card:hover .hub-card-icon {
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
    color: #0f172a;
    transform: scale(1.03);
}

.hub-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.15rem;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, #e0f2fe, #ecfdf5);
    color: var(--text-main);
    transition: all 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.hub-card-icon svg {
    width: 1.45rem;
    height: 1.45rem;
}

.hub-card-kicker {
    display: none;
}

.hub-card strong {
    font-family: var(--font-body);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.hub-card p {
    margin: 0;
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.hub-card .hub-card-action {
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--accent-strong);
}

a.section-article,
a.section-article:link,
a.section-article:visited {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 1.5rem;
    row-gap: 0.2rem;
    align-items: center;
    margin-bottom: 0.75rem;
    margin: 0 0 2rem;
    padding: 1.2rem 1.4rem 1.2rem 1.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-main);
}

a.section-article *,
a.section-article:hover * {
    text-decoration: none;
}

a.section-article:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.section-article-kicker {
    grid-column: 1;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: none;
    color: var(--text-main);
}

.section-article-copy {
    grid-column: 1;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.section-article-copy strong {
    display: block;
    font-family: var(--font-body);
    color: var(--text-main);
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    line-height: 1.35;
    letter-spacing: normal;
}

.section-article-action {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

a.section-article:hover .section-article-action {
    background: var(--accent-hover);
    color: #fff;
}

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

@media (max-width: 1100px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: none;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    content-visibility: auto;
    contain-intrinsic-size: 320px 420px;
}

.card:hover {
    box-shadow: var(--shadow-sm);
    border-color: rgba(4, 120, 87, 0.35);
}

h2.category,
h3.category {
    font-family: var(--font-body);
    font-size: 1rem;
    text-transform: none;
    color: var(--text-main);
    font-weight: 650;
    letter-spacing: normal;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.item-blurb {
    flex: 1 0 100%;
    margin: 0.15rem 0 0;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.4;
}

.related-cats {
    margin: 2.5rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.related-cats h2 {
    font-size: 1.05rem;
    color: var(--text-main);
    margin: 0 0 0.75rem;
}

.related-cats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.related-cats-list a {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
}

.related-cats-list a:hover {
    border-color: var(--accent);
    color: var(--text-main);
}

.replaces {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.45rem;
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    line-height: 1.4;
}

.replaces-pill {
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

.alt-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.alt-list li {
    display: flex;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
}

.item-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--bg-body);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
    min-height: 48px;
    transition: var(--transition);
}

.item-link:hover {
    border-color: var(--border);
    background-color: #f1f5f9;
}

.item-link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.item-link:hover .item-name {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.item-link:hover .item-external {
    opacity: 0.75;
    color: var(--text-main);
}

.item-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.item-name {
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 600;
    display: block;
    position: relative;
    padding-left: 14px;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.item-name::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--primary);
    opacity: 0.55;
}

.item-external {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    opacity: 0.4;
    transition: var(--transition);
}

.item-external::before {
    content: "↗";
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1;
}

.badge {
    font-size: 1rem;
    padding: 3px 7px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

.badge-os {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-free {
    background-color: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

.badge-freemium {
    background-color: #fef08a;
    color: #854d0e;
    border: 1px solid #fde047;
}

.faq-section {
    background-color: var(--bg-card);
    padding: 4rem 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-header h2 {
    color: var(--text-main);
    font-size: 2rem;
    margin: 0 0 10px 0;
}

.faq-header p {
    color: var(--text-muted);
    margin: 0;
}

.faq-item {
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: var(--transition);
    content-visibility: auto;
    contain-intrinsic-size: 260px 180px;
}

.faq-item:hover {
    border-color: var(--accent);
}

.faq-item summary {
    padding: 1.2rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-main);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--text-main);
    transition: transform 0.3s;
    font-weight: 300;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item .faq-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    background-color: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

#backToTopBtn:hover {
    background-color: var(--accent-hover);
    box-shadow: var(--shadow-md);
}

#backToTopBtn:focus-visible {
    outline: 3px solid var(--accent-bright);
    outline-offset: 3px;
}

#backToTopBtn svg {
    width: 24px;
    height: 24px;
}

@media (prefers-reduced-motion: reduce) {
    .nav-link:hover,
    .card:hover,
    a.section-article:hover,
    a.hub-card:hover,
    #backToTopBtn:hover {
        transform: none;
    }
}

@media (max-width: 959px) {
    .category-picker {
        margin: 1rem auto 0.75rem;
        padding: 0 1rem;
    }

    .category-picker > summary,
    .category-picker[open] > summary {
        max-width: none;
    }

    .category-picker .category-nav {
        max-height: 45vh;
        max-height: 45dvh;
    }
}

@media (max-width: 768px) {
    a.section-article {
        grid-template-columns: 1fr;
        row-gap: 0.45rem;
    }

    .section-article-kicker,
    .section-article-copy,
    .section-article-action {
        grid-column: 1;
        grid-row: auto;
        width: auto;
    }

    .section-article-action {
        justify-self: start;
        margin-top: 0.35rem;
    }

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

    .hero h1 {
        font-size: 1.55rem;
    }

    .hero {
        min-height: 0;
        padding: 2.25rem 1rem 2.5rem;
        align-items: flex-start;
    }

    .hero-content {
        padding: 0;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 14px;
        padding: 0.45rem;
        max-width: none;
    }

    .hero-search-btn {
        width: 100%;
        box-sizing: border-box;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        max-width: none;
        gap: 0.55rem;
    }

    .btn-hero {
        width: 100%;
        white-space: normal;
        padding: 0.7rem 1rem;
    }

    #backToTopBtn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Keep search identifiable and focus visible on the photo. */
.hero-search { background: #134e4a; border-color: #a7f3d0; }
.hero-search input[type="search"]:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -3px;
    border-radius: 999px;
    box-shadow: none;
}
.hub-card p,
.item-blurb,
.hardware-card p { line-height: 1.6; }
.related-cats-list a { min-height: 44px; box-sizing: border-box; }
.hub-grid > *, .grid > * { min-width: 0; }
@media (max-width: 380px) {
    main { padding-inline: 1rem; }
    .card { padding: 1rem; }
}

/* Comfortable catalog reading; callouts remain clear without relying on color. */
.hub-card strong, .section-article-copy strong,
.hardware-card h3, h2.category, h3.category { font-size: 1.2rem; font-weight: 600; }
.hub-card p, .item-blurb, .hardware-card p,
.catalog-guide-lead, .section-article-copy, .catalog-intro {
    color: var(--text-main);
    line-height: 1.6;
}
.item-name, .hub-card-action {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}
/* Uniform header: search is the primary action. */
.hero { background: #134e4a; min-height: 0; }
.hero-content { text-shadow: none; }
.hero p { opacity: 1; }
.hero-brand { font-family: var(--font-display); }
.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
}
.hero-search-label {
    grid-column: 1 / -1;
    text-align: left;
    font-weight: 600;
    color: #fff;
}
.hero-noscript {
    margin: 0.85rem 0 0;
    max-width: 40rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    line-height: 1.5;
}
.hero-noscript a {
    color: #a7f3d0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.hero-search input[type="search"] {
    background: #fff;
    color: #000;
    border: 2px solid #64748b;
    border-radius: var(--radius-sm);
    min-height: 48px;
    box-sizing: border-box;
}
.hero-search input[type="search"]::placeholder { color: #475569; opacity: 1; }
.hero-search input[type="search"]::-webkit-search-cancel-button { filter: none; }
.hero-search input[type="search"]:focus-visible {
    outline: 3px solid #000;
    outline-offset: -5px;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 0 3px #fff;
}
.hero-search-btn { border-radius: var(--radius-sm); min-height: 48px; }
.hero-actions { flex-wrap: wrap; gap: 0.35rem 0.75rem; }
.btn-hero, .btn-hero-primary, .btn-hero-secondary, .btn-hero-ghost {
    background: transparent;
    color: #fff;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    font-weight: 500;
    padding: 0.5rem 0.25rem;
}
.btn-hero:hover { background: #0f3d3a; color: #fff; }
@media (max-width: 768px) {
    .hero-search { grid-template-columns: minmax(0, 1fr); }
    .hero-actions { align-items: flex-start; }
    .btn-hero { justify-content: flex-start; text-align: left; }
}

/* Compact home hero: intro and search side by side. */
.page-home .hero {
    padding: 1.5rem;
    text-align: left;
}
.page-home .hero-content {
    max-width: 1400px;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    gap: 1.5rem 2.5rem;
}
.page-home .hero-copy { min-width: 0; }
.page-home .hero h1 {
    font-size: clamp(1.5rem, 2.5vw, 1.85rem);
    line-height: 1.2;
}
.page-home .hero p {
    margin: 0.5rem 0 0;
    max-width: 38rem;
    font-size: 1rem;
    line-height: 1.45;
}
.page-home .hero-search {
    margin: 0;
    max-width: none;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem 0.5rem;
    border-radius: 0;
    padding: 0;
}
.page-home .hero-search-label { font-size: 0.95rem; }
.page-home .hero-search-btn { width: auto; }
.page-home #mainContent { margin-top: 1rem; }
.page-home .hub-toc { margin-bottom: 1.15rem; gap: 0.4rem; }
.page-home .hub-toc a { font-size: 0.9rem; padding: 0.35rem 0.6rem; }
@media (max-width: 900px) {
    .page-home .hero-content { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .page-home .hero { padding: 1.25rem 1.5rem; }
}
@media (max-width: 600px) {
    .page-home .hero { padding: 1rem; }
    .page-home #mainContent { padding: 0 1rem; }
    .page-home .hero-search input[type="search"] { padding: 0.6rem; }
    .page-home .hero-search-btn { padding: 0.6rem 0.8rem; }
    .page-home .hub-toc {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.2rem 0.2rem 0.5rem;
        margin-bottom: 0.75rem;
    }
    .page-home .hub-toc a { flex-shrink: 0; }
}
