/* ==========================================================================
   Whitepapers & Guides (index.html #whitepapers-guides)
   Three category accordions -> subcategory accordions -> HMRC resources.
   Uses the site's colour variables, so light and dark modes follow the site.
   Behaviour: assets/js/hmrc-hub.js   Data: assets/js/hmrc-hub-data.js
   ========================================================================== */

#whitepapers-guides {
    --hub-accent: var(--color-secondary);
    --hub-ink: var(--color-text-heading);
    --hub-text: var(--color-text);
    --hub-muted: var(--color-text-light);
    --hub-card: var(--color-bg-card);
    --hub-line: color-mix(in srgb, var(--color-text-heading) 10%, transparent);
    --hub-soft: color-mix(in srgb, var(--hub-accent) 7%, transparent);
    --hub-ease: cubic-bezier(0.22, 1, 0.36, 1);

    position: relative;
    /* Starts with the same plain background as the pricing section above, so there is no visible seam */
    padding-top: 1.5rem;
    background:
        radial-gradient(900px 420px at 10% 40%, color-mix(in srgb, var(--hub-accent) 7%, transparent), transparent 70%),
        linear-gradient(180deg, var(--color-bg-body) 0%, var(--color-bg-body) 30%, var(--color-bg-light) 100%);
}

/* Decorative glow orbs and a faint dot grid behind the content */
#whitepapers-guides::before,
#whitepapers-guides::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

#whitepapers-guides::before {
    inset: 0;
    background-image: radial-gradient(color-mix(in srgb, var(--hub-ink) 9%, transparent) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
    opacity: 0.6;
}

#whitepapers-guides::after {
    width: 520px;
    height: 520px;
    right: -160px;
    top: 18%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--hub-accent) 22%, transparent), transparent 65%);
    filter: blur(20px);
    animation: hub-float 14s ease-in-out infinite alternate;
}

#whitepapers-guides > .container {
    position: relative;
    z-index: 1;
}

@keyframes hub-float {
    to { transform: translate(-80px, 60px) scale(1.1); }
}

/* ---------- 3D side objects (assets/js/hub-3d.js; desktop only) ---------- */
/* Clip both ways: the side objects can never spill over the next section */
#whitepapers-guides {
    overflow: clip;
}

.hub-3d {
    --w: clamp(190px, calc(50vw - 525px), 320px);
    position: absolute;
    z-index: 0;
    top: 190px;
    width: var(--w);
    height: calc(var(--w) * 1.3);
    pointer-events: none;
    opacity: 0;
    transform: translateY(30px) scale(0.92);
    transition: opacity 1s ease, transform 1.2s var(--hub-ease);
}

/* centred in the gutter between the screen edge and the 1000px accordion */
.hub-3d-left {
    left: calc((50% - 500px - var(--w)) / 2);
}

.hub-3d-right {
    right: calc((50% - 500px - var(--w)) / 2);
    top: 300px;
}

#whitepapers-guides.has-3d .hub-3d {
    opacity: 1;
    transform: none;
}

/* They decorate the gutters beside the open guides, so they appear only while the guides are
   open (the collapsed section is shorter than they are). hub-3d.js pauses them meanwhile. */
#whitepapers-guides.has-3d.hub-collapsible:not(.hub-body-open) .hub-3d {
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.92);
}

.hub-3d canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    filter: drop-shadow(0 30px 30px color-mix(in srgb, var(--hub-accent) 25%, transparent));
}

@media (max-width: 1279px) {
    .hub-3d {
        display: none;
    }
}

/* Less space after the pricing footnote, so the two sections read as one flow */
#why-choose-new {
    padding-bottom: 1.5rem;
}

/* ---------- Stats strip ---------- */
.hub-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 760px;
    margin: 1.75rem auto 0;
    border: 1px solid color-mix(in srgb, var(--hub-accent) 30%, transparent);
    border-radius: 18px;
    background: color-mix(in srgb, var(--hub-card) 75%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 40px -32px color-mix(in srgb, var(--hub-accent) 70%, transparent);
}

.hub-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 1rem 0.5rem;
}

.hub-stat + .hub-stat {
    border-left: 1px solid var(--hub-line);
}

.hub-stat-num {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(120deg, color-mix(in srgb, var(--hub-accent) 70%, var(--hub-ink)), var(--hub-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hub-stat span {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hub-muted);
}

/* ---------- Scroll-in reveal (class added by JS; content is visible without JS) ---------- */
.hub-anim .hub-reveal {
    opacity: 0;
    transform: translateY(26px);
}

.hub-anim.is-in .hub-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.8s var(--hub-ease), border-color 0.3s, box-shadow 0.4s var(--hub-ease);
    transition-delay: calc(var(--d, 0) * 110ms + 150ms), calc(var(--d, 0) * 110ms + 150ms), 0s, 0s;
}

/* once the entrance has played, hover reacts instantly */
.hub-anim.is-done .hub-reveal {
    transition-delay: 0s;
}

/* ---------- Accordion shell ---------- */
.hub-accordion {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    max-width: 1000px;
    margin: 2.25rem auto 0;
}

.hub-cat-item {
    --edge: var(--hub-line);
    position: relative;
    border: 1px solid transparent;
    border-radius: 22px;
    /* gradient border: card fill on the padding box, gold sweep on the border box */
    background:
        linear-gradient(var(--hub-card), var(--hub-card)) padding-box,
        linear-gradient(135deg, color-mix(in srgb, var(--hub-accent) 60%, transparent), var(--edge) 35%, var(--edge) 65%, color-mix(in srgb, var(--hub-accent) 45%, transparent)) border-box;
    box-shadow: 0 22px 44px -34px rgba(15, 23, 42, 0.5);
    transition: transform 0.45s var(--hub-ease), box-shadow 0.45s var(--hub-ease);
}

.hub-cat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 30px 60px -34px color-mix(in srgb, var(--hub-accent) 60%, transparent);
}

.hub-cat-item.is-open {
    --edge: color-mix(in srgb, var(--hub-accent) 35%, transparent);
    transform: none;
    box-shadow: 0 34px 70px -36px color-mix(in srgb, var(--hub-accent) 65%, transparent);
}

/* gold accent bar on the left edge */
.hub-cat-item::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 22px;
    bottom: 22px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--hub-accent), color-mix(in srgb, var(--hub-accent) 40%, #FFFFFF));
    transform: scaleY(0.35);
    opacity: 0.6;
    transition: transform 0.5s var(--hub-ease), opacity 0.3s;
}

.hub-cat-item:hover::before,
.hub-cat-item.is-open::before {
    transform: scaleY(1);
    opacity: 1;
}

#whitepapers-guides .hub-cat-heading,
#whitepapers-guides .hub-sub-heading {
    margin: 0;
    font: inherit;
}

/* ---------- Category header buttons ---------- */
.hub-cat-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    padding: 1.6rem 1.75rem;
    border: 0;
    border-radius: 21px;
    background: transparent;
    color: var(--hub-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
}

/* light sweep across the header on hover */
.hub-cat-toggle::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -40%;
    width: 30%;
    background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--hub-accent) 14%, transparent), transparent);
    transform: skewX(-18deg) translateX(0);
    pointer-events: none;
}

.hub-cat-toggle:hover::after {
    transform: skewX(-18deg) translateX(560%);
    transition: transform 1.1s var(--hub-ease);
}

/* big faded number in the background */
.hub-cat-num {
    position: absolute;
    right: 9.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-heading);
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px color-mix(in srgb, var(--hub-accent) 28%, transparent);
    pointer-events: none;
    transition: -webkit-text-stroke-color 0.3s;
}

.hub-cat-item:hover .hub-cat-num,
.hub-cat-item.is-open .hub-cat-num {
    -webkit-text-stroke-color: color-mix(in srgb, var(--hub-accent) 55%, transparent);
}

.hub-cat-toggle:focus-visible,
.hub-sub-toggle:focus-visible,
.hub-btn:focus-visible {
    outline: 2px solid var(--hub-accent);
    outline-offset: 3px;
}

.hub-cat-icon {
    position: relative;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--hub-accent) 75%, #FFFFFF), var(--hub-accent) 55%, color-mix(in srgb, var(--hub-accent) 75%, #000000));
    color: #FFFFFF;
    box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--hub-accent) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.45s var(--hub-ease);
}

/* soft pulsing ring that invites a click (stops once opened) */
.hub-cat-icon::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    border: 2px solid var(--hub-accent);
    opacity: 0;
    animation: hub-pulse 2.8s ease-out infinite;
    animation-delay: calc(var(--d, 0) * 0.6s);
}

.hub-cat-item.is-open .hub-cat-icon::after {
    animation: none;
}

@keyframes hub-pulse {
    0% { opacity: 0.55; transform: scale(1); }
    70%, 100% { opacity: 0; transform: scale(1.35); }
}

.hub-cat-toggle:hover .hub-cat-icon {
    transform: rotate(-6deg) scale(1.06);
}

.hub-cat-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hub-cat-text {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.hub-cat-name {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.2vw, 1.6rem);
    font-weight: 700;
    line-height: 1.2;
}

.hub-cat-intro {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--hub-muted);
}

.hub-cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.hub-cat-chips b {
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hub-ink) 6%, transparent);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--hub-text);
}

.hub-cat-chips .hub-chip-pdf {
    background: var(--hub-soft);
    border: 1px solid color-mix(in srgb, var(--hub-accent) 35%, transparent);
    color: color-mix(in srgb, var(--hub-accent) 70%, var(--hub-ink));
}

/* "Explore" call to action + chevron */
.hub-cat-cta {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.4rem 0.35rem 1rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--hub-accent) 40%, transparent);
    background: color-mix(in srgb, var(--hub-card) 80%, transparent);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--hub-accent);
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.hub-cta-close,
.hub-cat-item.is-open .hub-cta-open {
    display: none;
}

.hub-cat-item.is-open .hub-cta-close {
    display: inline;
}

.hub-cat-toggle:hover .hub-cat-cta,
.hub-cat-item.is-open .hub-cat-cta {
    background: var(--hub-accent);
    border-color: var(--hub-accent);
    color: #FFFFFF;
}

.hub-chevron {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--hub-soft);
    transition: transform 0.45s var(--hub-ease), background 0.3s;
}

.hub-cat-toggle:hover .hub-chevron,
.hub-cat-item.is-open .hub-chevron {
    background: rgba(255, 255, 255, 0.22);
}

.hub-chevron svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hub-cat-toggle:not(:hover) .hub-chevron svg {
    animation: hub-nudge 2.4s ease-in-out infinite;
}

.hub-cat-item.is-open .hub-chevron svg {
    animation: none !important;
}

@keyframes hub-nudge {
    0%, 60%, 100% { transform: translateY(0); }
    75% { transform: translateY(3px); }
}

.hub-cat-item.is-open > .hub-cat-heading .hub-chevron {
    transform: rotate(180deg);
}

/* ---------- Collapse animation (shared by both levels) ---------- */
.hub-collapse {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.45s var(--hub-ease), visibility 0s linear 0.45s;
}

.is-open > .hub-collapse {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows 0.45s var(--hub-ease), visibility 0s linear 0s;
}

.hub-collapse-inner {
    min-height: 0;
    overflow: hidden;
}

.hub-collapse-inner > * {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.4s var(--hub-ease);
}

.is-open > .hub-collapse > .hub-collapse-inner > * {
    opacity: 1;
    transform: none;
    transition-delay: 0.08s;
}

/* ---------- Subcategories ---------- */
.hub-subs {
    margin: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--hub-line);
}

.hub-sub {
    border-bottom: 1px solid var(--hub-line);
}

.hub-sub:last-child {
    border-bottom: 0;
}

.hub-sub-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    min-height: 56px;
    padding: 0.9rem 0.25rem;
    border: 0;
    background: transparent;
    color: var(--hub-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.hub-sub-name {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.25s;
}

.hub-sub-toggle:hover .hub-sub-name,
.hub-sub.is-open .hub-sub-name {
    color: var(--hub-accent);
}

.hub-sub-count {
    font-size: 0.78rem;
    color: var(--hub-muted);
    white-space: nowrap;
}

/* plus / minus */
.hub-plus {
    position: relative;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--hub-line);
    transition: border-color 0.3s, background 0.3s;
}

.hub-plus::before,
.hub-plus::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 2px;
    margin: -1px 0 0 -5.5px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.35s var(--hub-ease);
}

.hub-plus::after {
    transform: rotate(90deg);
}

.hub-sub.is-open .hub-plus {
    border-color: var(--hub-accent);
    background: var(--hub-soft);
}

.hub-sub.is-open .hub-plus::after {
    transform: rotate(0deg);
}

/* ---------- Resource list ---------- */
.hub-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0.25rem 0 1.25rem;
    list-style: none;
}

.hub-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.1rem 1.2rem;
    border-radius: 14px;
    border: 1px solid var(--hub-line);
    background: color-mix(in srgb, var(--color-bg-body) 55%, var(--hub-card));
    transition: border-color 0.3s;
}

.hub-item:hover {
    border-color: color-mix(in srgb, var(--hub-accent) 40%, transparent);
}

.hub-item-body {
    flex: 1;
    min-width: 0;
}

.hub-item-type {
    display: inline-block;
    margin-bottom: 0.45rem;
    padding: 0.18rem 0.55rem;
    border-radius: 6px;
    background: var(--hub-soft);
    color: color-mix(in srgb, var(--hub-accent) 75%, var(--hub-ink));
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#whitepapers-guides .hub-item-title {
    margin: 0 0 0.35rem;
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--hub-ink);
}

#whitepapers-guides .hub-item-summary {
    margin: 0 0 0.6rem;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--hub-muted);
}

#whitepapers-guides .hub-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin: 0;
    font-size: 0.76rem;
    color: var(--hub-muted);
}

.hub-item-meta span + span::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    margin: 0 0.6rem 0.15rem -0.6rem;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
    vertical-align: middle;
}

.hub-item-actions {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.3;
    transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--hub-ease);
}

.hub-btn svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hub-btn-pdf {
    background: var(--hub-accent);
    color: var(--color-bg-body);
    border: 1px solid var(--hub-accent);
}

.hub-btn-pdf span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hub-btn-pdf small {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.85;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-btn-pdf:hover {
    background: color-mix(in srgb, var(--hub-accent) 85%, #000000);
    transform: translateY(-1px);
}

.hub-btn-more {
    justify-content: center;
    border: 1px solid var(--hub-line);
    color: var(--hub-ink);
    background: transparent;
}

.hub-btn-more:hover {
    border-color: var(--hub-accent);
    color: var(--hub-accent);
}

.hub-noscript {
    display: grid;
    gap: 0.75rem;
    padding: 0;
    list-style: none;
    text-align: center;
}

.hub-noscript a,
#whitepapers-guides .hub-note a {
    color: var(--hub-accent);
}

/* ---------- Footer ---------- */
.hub-footer {
    margin-top: 2.25rem;
    text-align: center;
}

/* ---------- Collapsed until clicked: "Explore the guides" ---------- */
#whitepapers-guides .hub-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 1.5rem auto 0;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--hub-accent) 45%, transparent);
    background: color-mix(in srgb, var(--hub-card) 80%, transparent);
    color: var(--hub-ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 14px 30px -24px color-mix(in srgb, var(--hub-accent) 80%, transparent);
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

#whitepapers-guides .hub-open-btn[hidden] {
    display: none;
}

#whitepapers-guides .hub-open-btn:hover {
    border-color: var(--hub-accent);
    background: var(--hub-soft);
    transform: translateY(-1px);
}

#whitepapers-guides .hub-open-btn:focus-visible {
    outline: 2px solid var(--hub-accent);
    outline-offset: 3px;
}

#whitepapers-guides .hub-open-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #C5A039;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s ease;
}

#whitepapers-guides .hub-open-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

#whitepapers-guides .hub-stats-clickable {
    cursor: pointer;
}

#whitepapers-guides.hub-body-open .hub-stats-clickable {
    cursor: default;
}

#whitepapers-guides .hub-body:not([hidden]) {
    animation: hub-body-in 0.45s var(--hub-ease) both;
}

@keyframes hub-body-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    #whitepapers-guides .hub-body:not([hidden]) {
        animation: none;
    }
}

#whitepapers-guides .hub-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    padding: 0.85rem 1.6rem;
}

.hub-all-btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#whitepapers-guides .hub-note {
    max-width: 720px;
    margin: 1.1rem auto 0;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--hub-muted);
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
    .hub-cat-num {
        right: 4.5rem;
        font-size: 4rem;
    }

    .hub-cta-open,
    .hub-cta-close,
    .hub-cat-item.is-open .hub-cta-close {
        display: none;
    }

    .hub-cat-cta {
        padding: 0.3rem;
    }

    .hub-item {
        flex-direction: column;
    }

    .hub-item-actions {
        flex: none;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hub-btn {
        flex: 1 1 200px;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
    .hub-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hub-stat:nth-child(3) {
        border-left: 0;
    }

    .hub-stat:nth-child(n + 3) {
        border-top: 1px solid var(--hub-line);
    }

    .hub-cat-toggle {
        align-items: flex-start;
        gap: 0.85rem;
        padding: 1.2rem 1rem;
    }

    .hub-cat-num {
        display: none;
    }

    .hub-cat-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .hub-cat-icon svg {
        width: 23px;
        height: 23px;
    }

    .hub-cat-intro {
        font-size: 0.82rem;
    }

    .hub-chevron {
        width: 32px;
        height: 32px;
    }

    .hub-subs {
        margin: 0 1rem 1rem;
    }

    .hub-sub-count {
        display: none;
    }

    .hub-item {
        padding: 1rem;
    }

    #whitepapers-guides .hub-item-meta {
        flex-direction: column;
        gap: 0.15rem;
    }

    .hub-item-meta span + span::before {
        display: none;
    }

    .hub-btn {
        flex-basis: 100%;
    }

    #whitepapers-guides .hub-all-btn {
        width: 100%;
        justify-content: center;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    #whitepapers-guides *,
    #whitepapers-guides *::before,
    #whitepapers-guides *::after {
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
}
