:root {
    --red: #D83333;
    --red-soft: #FEF2F3;
    --red-hover: #B82828;
    --ink: #0F1115;
    --ink-soft: #3A3F47;
    --muted: #6B7280;
    --line: #E5E7EB;
    --line-soft: #F1F2F4;
    --bg: #FFFFFF;
    --bg-soft: #FAFAF7;
    --bg-cream: #F6F3EC;
    --radius-pill: 999px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --sidebar-w: 280px;
    --header-h: 76px;
    --side-pad: 40px;
    --display: 'Source Serif 4', Georgia, serif;
    --sans: 'Source Sans 3', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

/* ============ HEADER ============ */
.header {
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
}

.header-inner {
    height: 100%;
    padding: 0 var(--side-pad);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 32px;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: calc(var(--sidebar-w) - 40px);
}

    .logo img {
        height: 44px;
        width: auto;
        display: block;
    }

/* Search bar replaces header nav — fills the space between logo and actions */
.search-bar {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    position: relative;
    justify-self: stretch;
}

.search-bar-row {
    position: relative;
    width: 100%;
}

    .search-bar-row input {
        width: 100%;
        height: 44px;
        padding: 0 46px 0 46px;
        border: 1px solid var(--line);
        border-radius: var(--radius-pill);
        background: var(--bg-soft);
        font-family: var(--sans);
        font-size: 14px;
        color: var(--ink);
        outline: none;
        transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
    }

        .search-bar-row input::placeholder {
            color: var(--muted);
        }

        .search-bar-row input:hover {
            border-color: #D1D5DB;
        }

        .search-bar-row input:focus-visible {
            border-color: var(--red);
            background: var(--bg);
            box-shadow: 0 0 0 4px rgba(216, 51, 51, 0.12);
        }

    .search-bar-row .search-bar-icon {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 18px;
        height: 18px;
        color: var(--muted);
        pointer-events: none;
    }

.search-bar .search-actions {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-bar .search-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

    .search-bar .search-btn svg {
        width: 16px;
        height: 16px;
        pointer-events: none;
    }

    .search-bar .search-btn:hover {
        border-color: var(--ink);
        color: var(--ink);
        background: var(--line-soft);
    }

    .search-bar .search-btn:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

.search-bar-row input {
    padding-right: 48px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

    .btn:active {
        transform: translateY(1px);
    }

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

    .btn-ghost:hover {
        border-color: var(--ink);
    }

    .btn-ghost:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

/* Account Login - Union Jack reveal on hover */
.header-actions #accountLoginBtn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: color 220ms ease, border-color 220ms ease, transform 140ms ease;
}

    .header-actions #accountLoginBtn::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url("/Content/pio-new/images/Flag_of_the_United_Kingdom_(3-5).svg");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0;
        transform: scale(1.08);
        transition: opacity 260ms ease, transform 420ms ease;
        z-index: -1;
    }

    .header-actions #accountLoginBtn:hover {
        color: #fff;
        border-color: rgba(255, 255, 255, 0.85);
        text-shadow: 0 1px 2px rgba(0, 20, 80, 0.55), 0 0 8px rgba(0, 20, 80, 0.4);
    }

        .header-actions #accountLoginBtn:hover::before {
            opacity: 1;
            transform: scale(1);
        }

/* PIO Shop button in header — fill red on hover */
.header-shop-btn {
    white-space: nowrap;
}

.btn-primary {
    background: var(--red);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--red-hover);
    }

    .btn-primary:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

/* Ghost button that fills red on hover (used on hero CTA) */
.btn-ghost-fillred {
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 140ms ease;
}

    .btn-ghost-fillred:hover {
        background: var(--red);
        border-color: var(--red);
        color: #fff;
    }

.btn-lg {
    padding: 14px 26px;
    font-size: 15px;
}

/* ============ LAYOUT: SIDEBAR + CONTENT ============ */
.layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    align-items: start;
    /* Smooth sidebar collapse/expand so the banner buttons roll in/out
       in sync with the column shrinking/growing. Modern browsers support
       transitioning grid-template-columns; older ones snap. */
    transition: grid-template-columns 360ms cubic-bezier(.34, 1.4, .64, 1);
}

/* ---- Sidebar ---- */
.sidebar {
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding: 56px 20px 32px;
    border-right: 1px solid var(--line);
    background: var(--bg);
    transition: padding 360ms cubic-bezier(.34, 1.4, .64, 1), border-right-color 360ms ease;
}

    .sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: #D1D5DB;
        border-radius: 3px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: transparent;
    }

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-soft);
    transition: background 140ms ease, color 140ms ease;
    cursor: pointer;
    position: relative;
    line-height: 24px;
}

    .sidebar-link:hover {
        background: var(--line-soft);
        color: var(--ink);
    }

    .sidebar-link:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

    .sidebar-link.active {
        background: var(--red-soft);
        color: var(--ink);
    }

    .sidebar-link .icon {
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
    }

        .sidebar-link .icon svg {
            width: 100%;
            height: 100%;
        }

    .sidebar-link .label {
        flex: 1;
    }

    .sidebar-link .chevron {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        opacity: 0.5;
        transition: transform 200ms ease, opacity 200ms ease;
    }

        .sidebar-link .chevron svg {
            width: 100%;
            height: 100%;
            display: block;
        }

/* ---- Submenu (click to toggle) ---- */
.has-submenu > .submenu {
    list-style: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 260ms ease;
    padding-left: 30px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.has-submenu.open > .submenu {
    max-height: 640px;
}

.has-submenu.open > .sidebar-link .chevron {
    transform: rotate(90deg);
    opacity: 0.85;
}

.submenu li {
    margin-top: 2px;
}

.submenu a {
    display: block;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    transition: color 140ms ease, background 140ms ease;
    position: relative;
}

    .submenu a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        width: 6px;
        height: 1px;
        background: var(--line);
        transform: translate(-10px, -50%);
    }

    .submenu a:hover {
        color: var(--ink);
        background: var(--line-soft);
    }

    .submenu a.active {
        background: var(--red-soft);
        color: var(--ink);
        font-weight: 600;
    }

        .submenu a.active::before {
            background: transparent;
        }

/* ---- Sidebar divider + label ---- */
.sidebar-divider {
    margin: 14px 0 10px;
    border: 0;
    height: 1px;
    background: var(--line);
}

.sidebar-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
    font-weight: 600;
    padding: 0 12px 10px;
}

/* ---- Sidebar CTA card at bottom ---- */
.sidebar-card {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg-cream);
}

    .sidebar-card h4 {
        font-family: var(--display);
        font-size: 16px;
        font-weight: 500;
        margin-bottom: 6px;
        letter-spacing: -0.01em;
    }

    .sidebar-card p {
        font-size: 12px;
        color: var(--ink-soft);
        margin-bottom: 12px;
        line-height: 1.5;
    }

    .sidebar-card .btn {
        width: 100%;
        text-align: center;
        padding: 9px 14px;
        font-size: 12.5px;
    }

    /* Logged-in swap for the sidebar CTA card */
    .sidebar-card .sidebar-card-in {
        display: none;
    }

body.is-logged-in .sidebar-card .sidebar-card-out {
    display: none;
}

body.is-logged-in .sidebar-card .sidebar-card-in {
    display: block;
}

.sidebar-card .sc-plan-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sidebar-card .sc-plan-logo {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--red), #A52424);
    color: #fff;
    font-family: var(--display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-card .sc-plan-name {
    font-family: var(--display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.sidebar-card .sc-plan-avail {
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 1.5;
    margin-bottom: 12px;
}

    .sidebar-card .sc-plan-avail strong {
        color: var(--ink);
        font-weight: 600;
    }

/* ---- Content wrapper ---- */
.main-content {
    flex: 1;
    width: 100%;
    margin: 0 auto;
}

/* ---- View switching ---- */
.view {
    display: none;
}

    .view.active {
        display: block;
        animation: viewIn 220ms ease;
    }

@keyframes viewIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Generic content-page layout (for non-home views) ---- */
.page-head {
    padding: 16px 0px;
}

    .page-head .eyebrow {
        display: inline-block;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.18em;
        color: var(--red);
        font-weight: 700;
        margin-bottom: 14px;
    }

    .page-head h1 {
        font-family: var(--display);
        font-weight: 500;
        font-size: clamp(34px, 3.4vw, 46px);
        line-height: 1.1;
        letter-spacing: -0.02em;
        margin-bottom: 16px;
    }

        .page-head h1 em {
            font-style: italic;
            color: var(--red);
            font-weight: 400;
        }

    .page-head .lede {
        font-size: 17px;
        color: var(--ink-soft);
        line-height: 1.6; /*max-width: 640px;*/
    }


.page-body {
    padding: 0px var(--side-pad) 72px;
}

    .page-body section + section { /*margin-top: 40px;*/
    }

    .page-body h2 {
        font-family: var(--display);
        font-weight: 500;
        font-size: 26px;
        letter-spacing: -0.01em;
        margin-bottom: 10px;
    }

.page-body {
    padding-top: 16px;
}

    .page-body h3 {
        font-size: 16px;
        font-weight: 600;
        margin: 16px 0 6px;
    }

    .page-body p {
        color: var(--ink-soft); /*margin-bottom: 12px;*/
        line-height: 1.7;
    }

        .page-body p a {
            color: var(--red);
            font-weight: 500;
        }

            .page-body p a:hover {
                text-decoration: underline;
            }

    .page-body ul {
        color: var(--ink-soft);
        margin: 8px 0 16px 20px;
        line-height: 1.75;
    }

        .page-body ul li {
            margin-bottom: 4px;
        }

    .page-body strong {
        color: var(--ink);
        font-weight: 600;
    }

    .page-body section[id] {
        scroll-margin-top: calc(var(--header-h) + 16px);
    }

    .page-body h2 .from {
        display: inline-block;
        margin-left: 10px;
        font-family: var(--sans);
        font-size: 13px;
        font-weight: 500;
        letter-spacing: 0.04em;
        color: var(--muted);
        vertical-align: middle;
        padding: 4px 10px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: var(--bg-soft);
    }

.ref-table {
    width: auto;
    max-width: 100%;
    border-collapse: collapse;
    margin: 8px 0 16px;
    font-size: 14px;
}

    .ref-table th, .ref-table td {
        padding: 8px 18px 8px 0;
        text-align: left;
        color: var(--ink-soft);
        border-bottom: 1px dashed var(--line);
    }

    .ref-table th {
        font-weight: 600;
        color: var(--ink);
        font-size: 12px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .ref-table code {
        font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
        font-size: 13px;
        color: var(--ink);
        background: var(--bg-soft);
        padding: 2px 6px;
        border-radius: 4px;
    }

/* FAQ accordion */
.faq-item {
    border-top: 1px solid var(--line);
    padding: 16px 0;
}

    .faq-item:last-of-type {
        border-bottom: 1px solid var(--line);
    }

    .faq-item summary {
        cursor: pointer;
        font-weight: 600;
        color: var(--ink);
        font-size: 15px;
        list-style: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

        .faq-item summary::-webkit-details-marker {
            display: none;
        }

        .faq-item summary::after {
            content: '+';
            width: 22px;
            height: 22px;
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-weight: 400;
            font-size: 18px;
            color: var(--muted);
            border: 1px solid var(--line);
            border-radius: 50%;
            transition: transform 180ms ease;
        }

    .faq-item[open] summary::after {
        content: '−';
        transform: rotate(180deg);
    }

    .faq-item .faq-body {
        padding-top: 12px;
        color: var(--ink-soft);
        font-size: 14.5px;
        line-height: 1.7;
    }

        .faq-item .faq-body p {
            font-size: 14.5px;
            margin-bottom: 10px;
        }

        .faq-item .faq-body ul {
            font-size: 14.5px;
        }

/* News archive filter */
.archive-filter {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 360px) auto;
    gap: 16px 22px;
    align-items: end;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-top: 16px;
    max-width: 640px;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
}

    .archive-filter::before {
        content: '';
        position: absolute;
        top: 22px;
        left: 0;
        width: 3px;
        height: 24px;
        background: var(--red);
        border-radius: 0 3px 3px 0;
    }

    .archive-filter .af-field {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .archive-filter label {
        font: 600 12px/1.3 var(--sans);
        color: var(--ink);
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 6px;
    }

    .archive-filter .af-reset {
        justify-self: start;
        padding: 10px 18px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: var(--radius-pill);
        font: 600 13px/1 var(--sans);
        color: var(--ink);
        cursor: pointer;
        transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
    }

        .archive-filter .af-reset:hover {
            background: var(--red-soft);
            border-color: var(--red);
            color: var(--red);
        }

        .archive-filter .af-reset:focus-visible {
            outline: 2px solid var(--red);
            outline-offset: 2px;
        }

@media (max-width: 560px) {
    .archive-filter {
        grid-template-columns: 1fr;
    }

        .archive-filter .af-reset {
            justify-self: stretch;
        }
}

/* News article list */
.news-list-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 10px 28px;
    margin-top: 16px;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
}

    .news-list-card::before {
        content: '';
        position: absolute;
        top: 22px;
        left: 0;
        width: 3px;
        height: 28px;
        background: var(--red);
        border-radius: 0 3px 3px 0;
    }

.news-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

    .news-item:last-child {
        border-bottom: 0;
    }

.news-item-meta {
    font: 500 13px/1.4 var(--sans);
    color: var(--ink-soft);
    margin-bottom: 8px;
}

    .news-item-meta .news-author {
        color: var(--ink-soft);
    }

.news-item-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0 0 10px;
}

    .news-item-title a {
        color: inherit;
        transition: color 140ms ease;
    }

        .news-item-title a:hover {
            color: var(--red);
        }

.news-item-excerpt {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 14px;
}

.news-readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: var(--red);
    color: #fff;
    border: 1px solid var(--red);
    border-radius: var(--radius-pill);
    font: 600 13px/1 var(--sans);
    box-shadow: 0 6px 16px -10px rgba(216, 51, 51, 0.55);
    transition: background 160ms ease, border-color 160ms ease, transform 140ms ease, box-shadow 160ms ease;
}

    .news-readmore:hover {
        background: var(--red-hover, #b52828);
        border-color: var(--red-hover, #b52828);
        box-shadow: 0 10px 20px -12px rgba(216, 51, 51, 0.7);
    }

    .news-readmore:active {
        transform: translateY(1px);
    }

    .news-readmore:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

    .news-readmore::after {
        content: '→';
        font-size: 13px;
        line-height: 1;
    }

.news-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
}

    .news-pagination .page-nums {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
    }

    .news-pagination .page-btn {
        min-width: 34px;
        height: 34px;
        padding: 0 10px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 6px;
        font: 600 13px/1 var(--sans);
        color: var(--ink);
        cursor: pointer;
        transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
    }

        .news-pagination .page-btn:hover:not(:disabled):not(.active) {
            background: var(--red-soft);
            border-color: var(--red);
            color: var(--red);
        }

        .news-pagination .page-btn.active {
            background: var(--red);
            border-color: var(--red);
            color: #fff;
            cursor: default;
        }

        .news-pagination .page-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .news-pagination .page-btn:focus-visible {
            outline: 2px solid var(--red);
            outline-offset: 2px;
        }

    .news-pagination .page-ellipsis {
        padding: 0 4px;
        color: var(--ink-soft);
        font-size: 13px;
    }

    .news-pagination .page-info {
        font: 500 13px/1 var(--sans);
        color: var(--ink-soft);
    }

@media (max-width: 720px) {
    .news-list-card {
        padding: 4px 18px;
    }

    .news-item-title {
        font-size: 20px;
    }

    .news-pagination {
        justify-content: center;
    }
}

/* News detail page */
#view-news-detail .page-body {
    max-width: 1240px;
}

.news-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

    .news-detail-head .news-detail-meta {
        font: 500 13px/1.5 var(--sans);
        color: var(--ink-soft);
        margin-bottom: 6px;
    }

        .news-detail-head .news-detail-meta .news-author {
            color: var(--ink-soft);
        }

    .news-detail-head .news-detail-kicker {
        font: 600 15px/1.35 var(--sans);
        color: var(--ink);
        margin: 0;
    }

    .news-detail-head .news-detail-head-text {
        min-width: 0;
        flex: 1;
    }

    .news-detail-head .bill-back {
        margin-top: 2px;
    }

.news-article {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 34px 40px 40px;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
    position: relative;
}

    .news-article::before {
        content: '';
        position: absolute;
        top: 40px;
        left: 0;
        width: 3px;
        height: 36px;
        background: var(--red);
        border-radius: 0 3px 3px 0;
    }

    .news-article h1 {
        font-family: var(--display);
        font-weight: 600;
        font-size: clamp(28px, 3vw, 36px);
        line-height: 1.15;
        letter-spacing: -0.02em;
        color: var(--ink);
        margin: 0 0 16px;
    }

    .news-article .lead {
        font-size: 17px;
        line-height: 1.65;
        color: var(--ink);
        margin: 0 0 22px;
    }

    .news-article h2 {
        font-family: var(--display);
        font-weight: 600;
        font-size: 22px;
        line-height: 1.25;
        letter-spacing: -0.01em;
        color: var(--ink);
        margin: 28px 0 12px;
    }

    .news-article p {
        font-size: 15px;
        line-height: 1.7;
        color: var(--ink-soft);
        margin: 0 0 14px;
    }

        .news-article p strong {
            color: var(--ink);
            font-weight: 600;
        }

    .news-article ul {
        list-style: disc;
        padding-left: 22px;
        margin: 4px 0 18px;
        font-size: 15px;
        line-height: 1.7;
        color: var(--ink-soft);
    }

        .news-article ul li {
            margin: 4px 0;
        }

            .news-article ul li::marker {
                color: var(--red);
            }

    .news-article a {
        color: var(--red);
        border-bottom: 1px solid transparent;
        transition: border-color 140ms ease;
    }

        .news-article a:hover {
            border-bottom-color: var(--red);
        }

    .news-article .contact-line {
        background: var(--red-soft);
        border: 1px solid rgba(216, 51, 51, 0.18);
        border-radius: 12px;
        padding: 14px 18px;
        margin-top: 18px;
        font-size: 15px;
        color: var(--ink);
    }

        .news-article .contact-line strong {
            color: var(--ink);
        }

@media (max-width: 720px) {
    .news-detail-head {
        flex-direction: column;
    }

    .news-article {
        padding: 24px 22px 28px;
    }

        .news-article::before {
            top: 28px;
        }
}

/* Video grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.video-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg);
}

    .video-card .thumb {
        position: relative;
        aspect-ratio: 16 / 9;
        background: #111;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        overflow: hidden;
    }

        .video-card .thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .video-card .thumb::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.5));
            pointer-events: none;
        }

    .video-card .play {
        position: absolute;
        width: 54px;
        height: 54px;
        border-radius: 50%;
        background: rgba(255,255,255,0.95);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--red);
        box-shadow: 0 6px 16px rgba(0,0,0,0.35);
        z-index: 1;
    }

        .video-card .play svg {
            width: 22px;
            height: 22px;
            margin-left: 3px;
        }

    .video-card .meta {
        padding: 14px 16px;
    }

    .video-card h4 {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 4px;
        color: var(--ink);
    }

    .video-card p {
        font-size: 13px;
        color: var(--muted);
        line-height: 1.5;
        margin: 0;
    }

/* About content - content-feature rows */
.content-feature {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
}

    .content-feature:first-of-type {
        border-top: 0;
        padding-top: 8px;
    }

    .content-feature .label {
        font-size: 11px;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: var(--red);
        font-weight: 700;
    }

/* Subscribe CTA box */
.subscribe-box {
    margin-top: 32px;
    padding: 32px;
    border-radius: 20px;
    background: var(--ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

    .subscribe-box h3 {
        font-family: var(--display);
        font-size: 24px;
        font-weight: 500;
        letter-spacing: -0.01em;
        margin-bottom: 6px;
    }

    .subscribe-box p {
        color: rgba(255,255,255,0.7);
        font-size: 14px;
        margin: 0;
        max-width: 460px;
    }

    .subscribe-box .btn-white {
        background: #fff;
        color: var(--ink);
        padding: 12px 22px;
        border-radius: var(--radius-pill);
        font-weight: 600;
        font-size: 14px;
        transition: background 140ms ease;
    }

        .subscribe-box .btn-white:hover {
            background: var(--bg-cream);
        }

/* Parliament / collection landing */
.coverage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.coverage-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg-soft);
}

    .coverage-card h4 {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 4px;
        color: var(--ink);
    }

    .coverage-card p {
        font-size: 13px;
        color: var(--muted);
        margin: 0;
        line-height: 1.5;
    }

/* Shop panel */
.shop-panel {
    margin-top: 16px;
    padding: 28px;
    border-radius: 20px;
    background: var(--bg-cream);
    border: 1px solid var(--line);
}

    .shop-panel h3 {
        font-family: var(--display);
        font-size: 22px;
        font-weight: 500;
        margin-bottom: 8px;
    }

    .shop-panel .contact-line {
        display: flex;
        flex-wrap: wrap;
        gap: 18px;
        margin-top: 14px;
        font-size: 14px;
        color: var(--ink-soft);
    }

        .shop-panel .contact-line strong {
            color: var(--ink);
        }

/* ============ HERO ============ */
.hero {
    position: relative;
    padding: 72px var(--side-pad) 56px;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-text {
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: var(--red-soft);
    color: var(--red);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

    .hero-eyebrow::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--red);
    }

.hero h1 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(38px, 4.2vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 24px;
}

    .hero h1 em {
        font-style: normal;
        font-weight: 500;
        color: var(--red);
    }

.hero-sub {
    font-size: 17px;
    color: var(--ink-soft);
    margin-bottom: 32px;
    max-width: 520px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.hero-note {
    font-size: 13px;
    color: var(--muted);
    margin-left: 8px;
}

.hero-visual {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 8%, rgba(0,0,0,0.35) 30%, rgba(0,0,0,0.85) 60%, rgba(0,0,0,0.9) 100%);
    mask-image: linear-gradient(to right, transparent 0%, transparent 8%, rgba(0,0,0,0.35) 30%, rgba(0,0,0,0.85) 60%, rgba(0,0,0,0.9) 100%);
}

    .hero-visual img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: right center;
    }

/* ============ STATS BAR ============ */
.stats {
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stats-inner {
    padding: 44px var(--side-pad);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat {
    padding: 26px 26px 24px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(15, 17, 21, 0.03);
    transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), transform 520ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 240ms ease, border-color 240ms ease;
}

.stats.will-animate .stat {
    opacity: 0;
    transform: translateX(-48px);
}

    .stats.will-animate .stat.in {
        opacity: 1;
        transform: translateX(0);
    }

.stat:hover {
    border-color: #D1D5DB;
    box-shadow: 0 8px 24px -8px rgba(15, 17, 21, 0.12);
}

.stat-num {
    font-family: var(--display);
    font-size: 42px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

    .stat-num sup {
        font-size: 20px;
        color: var(--red);
        font-weight: 600;
        margin-left: 2px;
        vertical-align: super;
    }

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    font-weight: 600;
}

/* ============ SECTION: welcome + blocks ============ */
.section-pad {
    padding: 80px var(--side-pad);
}

.content-welcome {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--ink);
    padding-bottom: 28px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--line);
    max-width: 760px;
}

    .content-welcome em {
        color: var(--red);
        font-style: italic;
    }

.block {
    margin-bottom: 52px;
    max-width: 780px;
}

    .block:last-child {
        margin-bottom: 0;
    }

.block-eyebrow {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--red);
    font-weight: 600;
    margin-bottom: 14px;
}

.block h2 {
    font-family: var(--display);
    font-size: 34px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.block p {
    font-size: 16px;
    color: var(--ink-soft);
    line-height: 1.7;
    margin-bottom: 12px;
}

    .block p a {
        color: var(--red);
        border-bottom: 1px solid transparent;
        transition: border-color 140ms ease;
    }

        .block p a:hover {
            border-bottom-color: var(--red);
        }

.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.why-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg);
    transition: border-color 140ms ease, transform 180ms ease;
}

    .why-card:hover {
        border-color: var(--ink);
        transform: translateY(-2px);
    }

.why-card-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--red-soft);
    color: var(--red);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
}

.why-card h3 {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.why-card p {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0;
    line-height: 1.55;
}

/* ============ FEATURES ============ */
.features {
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.features-inner {
    padding: 80px var(--side-pad);
}

.features-head {
    margin-bottom: 56px;
    max-width: 780px;
}

    .features-head h2 {
        font-family: var(--display);
        font-size: 42px;
        font-weight: 500;
        line-height: 1.05;
        letter-spacing: -0.025em;
        margin-bottom: 24px;
    }

    .features-head p {
        color: var(--ink-soft);
        font-size: 16px;
        line-height: 1.7;
    }

        .features-head p + p {
            margin-top: 14px;
        }

        .features-head p.lead {
            font-size: 19px;
            line-height: 1.55;
            color: var(--ink);
            margin-bottom: 22px;
        }

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.feature {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 260px;
    transition: border-color 140ms ease, transform 180ms ease;
}

    .feature:hover {
        border-color: var(--red);
        transform: translateY(-2px);
    }

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--red-soft);
    color: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .feature-icon svg {
        width: 22px;
        height: 22px;
    }

.feature h3 {
    font-family: var(--display);
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.feature p {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.55;
    flex: 1;
}

.feature-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--red);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ============ ARCHIVE ============ */
.archive {
    padding: 80px var(--side-pad);
}

.archive-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 44px;
    flex-wrap: wrap;
    gap: 24px;
}

    .archive-head h2 {
        font-family: var(--display);
        font-size: 38px;
        font-weight: 500;
        line-height: 1.1;
        letter-spacing: -0.02em;
        max-width: 520px;
    }

    .archive-head .chips {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

.chip {
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: var(--bg);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

    .chip:hover {
        border-color: var(--ink);
        color: var(--ink);
    }

    .chip.active {
        background: var(--red);
        color: #fff;
        border-color: var(--red);
    }

.covers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.archive-cover {
    aspect-ratio: 2/3;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 24px -8px rgba(15, 17, 21, 0.18), 0 2px 4px rgba(15, 17, 21, 0.04);
    position: relative;
    border: 1px solid rgba(0,0,0,0.08);
    transition: transform 200ms ease, box-shadow 200ms ease;
}

    .archive-cover:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 32px -8px rgba(15, 17, 21, 0.22);
    }

    .archive-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* ============ CTA BANNER ============ */
.cta-banner {
    background: var(--ink);
    color: #fff;
}

.cta-banner-inner {
    padding: 72px var(--side-pad);
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
    align-items: center;
}

.cta-banner h2 {
    font-family: var(--display);
    font-size: 46px;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.025em;
}

    .cta-banner h2 em {
        color: #F4A4A4;
        font-style: italic;
    }

.cta-banner-side p {
    color: #B8BDC6;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.btn-white {
    background: #fff;
    color: var(--ink);
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 140ms ease, transform 140ms ease;
}

    .btn-white:hover {
        background: #F0F0F0;
        transform: translateY(-1px);
    }

/* ============ FOOTER ============ */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--line);
}

.footer-inner {
    padding: 56px var(--side-pad) 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 44px;
}

.footer-brand img {
    height: 40px;
    width: auto;
    margin-bottom: 18px;
    display: block;
}

.footer-brand p {
    font-size: 14px;
    color: var(--muted);
    max-width: 280px;
    line-height: 1.6;
}

.footer-col h5 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink);
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    font-size: 14px;
    color: var(--muted);
    transition: color 140ms ease;
}

    .footer-col a:hover {
        color: var(--red);
    }

.footer-bottom {
    border-top: 1px solid var(--line);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--muted);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

/* ============ MOBILE NAV TOGGLE & DRAWER ============ */
.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 140ms ease, border-color 140ms ease;
}

    .nav-toggle:hover {
        background: var(--line-soft);
        border-color: var(--ink);
    }

    .nav-toggle:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

    .nav-toggle svg {
        width: 22px;
        height: 22px;
        display: block;
    }

.drawer-close {
    display: none;
    width: 40px;
    height: 40px;
    margin-left: auto;
    margin-bottom: 6px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink-soft);
    cursor: pointer;
    padding: 0;
    transition: background 140ms ease, color 140ms ease;
}

    .drawer-close:hover {
        background: var(--line-soft);
        color: var(--ink);
    }

    .drawer-close:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

    .drawer-close svg {
        width: 18px;
        height: 18px;
        display: block;
    }

/* ============ SIDEBAR COLLAPSE / OPEN BANNER BUTTONS ============
     Both buttons are PNG banners that "roll" (scaleX) in/out as the sidebar
     expands or collapses. Each banner has its transform-origin set to the
     edge it should roll FROM, so the disappearing banner shrinks toward
     where the next view of the sidebar wants to be. */
.sidebar-collapse-toggle,
.sidebar-expand-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    z-index: 2;
    /* Default visible state — overridden per-button below for hidden state */
    transform: scaleX(1);
    opacity: 1;
    pointer-events: auto;
    transition: transform 360ms cubic-bezier(.34, 1.4, .64, 1), opacity 240ms ease, filter 200ms ease;
    will-change: transform, opacity;
}

    .sidebar-collapse-toggle img,
    .sidebar-expand-toggle img {
        display: block;
        height: 30px;
        width: auto;
        pointer-events: none;
        user-select: none;
        -webkit-user-drag: none;
        filter: drop-shadow(0 4px 10px rgba(216, 51, 51, 0.22));
    }

    .sidebar-collapse-toggle:hover,
    .sidebar-expand-toggle:hover {
        transform: scaleX(1) scale(1.06);
        filter: drop-shadow(0 6px 16px rgba(216, 51, 51, 0.40));
    }

    .sidebar-collapse-toggle:active,
    .sidebar-expand-toggle:active {
        transform: scaleX(1) scale(0.97);
    }

    .sidebar-collapse-toggle:focus-visible,
    .sidebar-expand-toggle:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 4px;
        border-radius: 6px;
    }

/* COLLAPSE banner — sits at the top-right of the sidebar, rolls up
     toward its right edge when the sidebar starts collapsing. */
.sidebar-collapse-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    transform-origin: right center;
}
/* Hidden when sidebar is collapsed */
body.sidebar-collapsed .sidebar-collapse-toggle {
    transform: scaleX(0);
    opacity: 0;
    pointer-events: none;
    transition-duration: 260ms;
}

/* OPEN banner — fixed at top-left of the viewport, hidden by default
     and unrolls leftward when the sidebar collapses. */
.sidebar-expand-toggle {
    position: fixed;
    top: calc(var(--header-h) + 18px);
    left: 0;
    transform: scaleX(0);
    opacity: 0;
    pointer-events: none;
    transform-origin: left center;
}
/* Visible only when sidebar is collapsed; small delay so the COLLAPSE
     banner gets to roll up first — gives the unfurl-then-furl rhythm. */
body.sidebar-collapsed .sidebar-expand-toggle {
    transform: scaleX(1);
    opacity: 1;
    pointer-events: auto;
    transition-delay: 120ms;
}

/* Sidebar layout while collapsed — kept INSTANT (no width transition) so
     the banners do all the visible animation. visibility:hidden is dropped
     here so the COLLAPSE banner can finish its scaleX animation gracefully
     even after the sidebar's width has snapped to 0; overflow:hidden still
     clips its sibling links. */
body.sidebar-collapsed .layout {
    grid-template-columns: 0 1fr;
}

body.sidebar-collapsed .sidebar {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
    border-right: 0;
}

@media (max-width: 900px) {
    body.sidebar-collapsed .layout {
        grid-template-columns: 1fr;
    }

    body.sidebar-collapsed .sidebar {
        width: min(340px, 88vw);
        padding: 14px 18px 24px;
        overflow-y: auto;
        border-right: 1px solid var(--line);
    }
}


.drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 17, 21, 0.5);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
}

body.drawer-open .drawer-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1180px) {
    :root {
        --side-pad: 32px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .covers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    :root {
        --side-pad: 20px;
        --sidebar-w: 0px;
        --header-h: 64px;
    }

    /* Header - single row: hamburger | logo | search (flex) | login */
    .header {
        height: var(--header-h);
    }

    .header-inner {
        grid-template-columns: auto auto minmax(0, 1fr) auto;
        grid-template-rows: var(--header-h);
        gap: 8px;
        padding: 0 12px;
        align-items: center;
    }

    .nav-toggle {
        display: inline-flex;
        grid-column: 1;
        grid-row: 1;
    }

    .logo {
        width: auto;
        justify-self: start;
        grid-column: 2;
        grid-row: 1;
    }

        .logo img {
            height: 28px;
        }

    .search-bar {
        grid-column: 3;
        grid-row: 1;
        width: 100%;
        max-width: none;
        min-width: 0;
        justify-self: stretch;
    }

    .search-bar-row input {
        height: 38px;
        font-size: 12.5px;
        padding: 0 40px 0 36px;
    }

    .search-bar-row .search-bar-icon {
        width: 15px;
        height: 15px;
        left: 11px;
    }

    .search-bar .search-actions {
        right: 5px;
    }

    .search-bar .search-btn {
        width: 28px;
        height: 28px;
    }

        .search-bar .search-btn svg {
            width: 14px;
            height: 14px;
        }

    .header-actions {
        grid-column: 4;
        grid-row: 1;
    }

        .header-actions .btn-ghost {
            padding: 8px 12px;
            font-size: 12.5px;
            white-space: nowrap;
        }

        .header-actions .btn-primary {
            padding: 9px 16px;
            font-size: 13px;
        }

    .drawer-overlay {
        display: block;
    }

    /* Layout collapses to single column; drawer is absolute */
    .layout {
        grid-template-columns: 1fr;
    }

    /* Sidebar becomes off-canvas drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(340px, 88vw);
        height: 100vh;
        height: 100dvh;
        z-index: 101;
        background: var(--bg);
        border-right: 1px solid var(--line);
        padding: 14px 18px 24px;
        transform: translateX(-102%);
        transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 28px 0 60px -20px rgba(0, 0, 0, 0.25);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    body.drawer-open .sidebar {
        transform: translateX(0);
    }

    body.drawer-open {
        overflow: hidden;
    }

    .drawer-close {
        display: inline-flex;
    }

    .sidebar-collapse-toggle,
    .sidebar-expand-toggle {
        display: none !important;
    }

    .search-bar .search-btn {
        width: 28px;
        height: 28px;
    }

    /* Touch-friendly sidebar items */
    .sidebar-link {
        padding: 13px 14px;
        font-size: 15px;
        gap: 14px;
        border-radius: 12px;
    }

        .sidebar-link .icon {
            width: 20px;
            height: 20px;
        }

        .sidebar-link .chevron {
            width: 16px;
            height: 16px;
        }

    .submenu a {
        padding: 11px 14px;
        font-size: 14px;
        border-radius: 10px;
    }

    .has-submenu > .submenu {
        padding-left: 34px;
        transition: max-height 320ms ease;
    }

    .has-submenu.open > .submenu {
        max-height: 2000px;
    }

    .has-submenu.open > .sidebar-link .chevron {
        transform: rotate(90deg);
        opacity: 0.85;
    }

    .sidebar-card {
        margin-top: 20px;
    }

    /* Hero + sections */
    .hero {
        grid-template-columns: 1fr;
        padding-top: 40px;
        padding-bottom: 36px;
        gap: 32px;
    }

    .hero-text {
        max-width: 640px;
    }

    .hero h1 {
        font-size: clamp(30px, 6vw, 44px);
    }

    .hero-sub {
        font-size: 16px;
    }

    .hero-visual {
        position: static;
        width: 100%;
        height: 260px;
    }

        .hero-visual img {
            -webkit-mask-image: none;
            mask-image: none;
            object-position: center;
        }

    .stats-inner {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 14px;
        padding: 36px var(--side-pad);
    }

    .stat {
        padding: 22px 22px 20px;
    }

    .stat-num {
        font-size: 36px;
    }

    .section-pad {
        padding: 52px var(--side-pad);
    }

    .content-welcome {
        font-size: 19px;
        padding-bottom: 22px;
        margin-bottom: 32px;
    }

    .block h2 {
        font-size: 28px;
    }

    .features-inner, .archive {
        padding: 52px var(--side-pad);
    }

    .features-head {
        margin-bottom: 36px;
    }

        .features-head h2 {
            font-size: 32px;
        }

        .features-head p.lead {
            font-size: 17px;
        }

    .archive-head h2 {
        font-size: 30px;
    }

    .archive-head {
        margin-bottom: 28px;
    }

    .cta-banner-inner {
        grid-template-columns: 1fr;
        padding: 52px var(--side-pad);
        gap: 28px;
    }

    .cta-banner h2 {
        font-size: 32px;
    }

    .footer-inner {
        padding: 44px var(--side-pad) 28px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Content pages */
    .page-head {
        padding: 16px var(--side-pad) 20px;
    }

        .page-head h1 {
            font-size: clamp(28px, 6vw, 38px);
        }

    .page-body {
        padding: 20px var(--side-pad) 56px;
    }

        .page-body h2 {
            font-size: 22px;
        }

            .page-body h2 .from {
                display: inline-block;
                margin-left: 0;
                margin-top: 6px;
            }

    .ref-table {
        font-size: 13px;
    }

        .ref-table th, .ref-table td {
            padding: 6px 12px 6px 0;
        }

    .subscribe-box {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
    }

        .subscribe-box h3 {
            font-size: 22px;
        }
}

@media (max-width: 560px) {
    :root {
        --side-pad: 16px;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .covers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stats-inner {
        grid-template-columns: 1fr;
        padding: 28px var(--side-pad);
    }

    .hero {
        padding-top: 32px;
        padding-bottom: 28px;
        gap: 24px;
    }

        .hero h1 {
            font-size: 30px;
        }

    .hero-sub {
        font-size: 15px;
    }

    .hero-visual {
        height: 200px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

        .hero-cta .btn {
            width: 100%;
            justify-content: center;
        }

    .hero-note {
        margin-left: 0;
        text-align: center;
        margin-top: 4px;
    }

    .section-pad {
        padding: 40px var(--side-pad);
    }

    .features-inner, .archive {
        padding: 40px var(--side-pad);
    }

    .block h2 {
        font-size: 24px;
    }

    .features-head h2 {
        font-size: 26px;
    }

    .archive-head h2 {
        font-size: 24px;
    }

    .cta-banner h2 {
        font-size: 26px;
    }

    .cta-banner-inner {
        padding: 40px var(--side-pad);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    :root {
        --header-h: 60px;
    }

    .header-inner {
        padding: 0 10px;
        gap: 6px;
        grid-template-rows: var(--header-h);
    }

    .header-actions .btn-ghost {
        padding: 7px 10px;
        font-size: 11.5px;
    }

    .header-actions .btn-primary {
        padding: 7px 12px;
        font-size: 12px;
    }

    .nav-toggle {
        width: 38px;
        height: 38px;
    }

        .nav-toggle svg {
            width: 20px;
            height: 20px;
        }

    .logo img {
        height: 24px;
    }

    .search-bar-row input {
        height: 36px;
        font-size: 12px;
        padding: 0 36px 0 30px;
    }

    .search-bar-row .search-bar-icon {
        width: 14px;
        height: 14px;
        left: 9px;
    }

    .search-bar .search-actions {
        right: 4px;
    }

    .search-bar .search-btn {
        width: 26px;
        height: 26px;
    }

        .search-bar .search-btn svg {
            width: 13px;
            height: 13px;
        }

    .search-bar-row input::placeholder {
        color: var(--muted);
    }

    .page-head {
        padding: 36px var(--side-pad) 16px;
    }

        .page-head h1 {
            font-size: 28px;
        }

    .page-body {
        padding: 16px var(--side-pad) 44px;
    }

        .page-body h2 {
            font-size: 20px;
        }

    .archive-link {
        padding: 12px 14px;
        font-size: 13px;
    }
}

/* ============ SHOP PAGE ============ */
.shop-body {
    padding: 16px var(--side-pad) 72px;
    max-width: none;
}

.shop-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
    gap: 32px;
    align-items: center;
    max-width: none;
    padding-top: 0;
    padding-bottom: 0;
}

    .shop-head .shop-head-text {
        min-width: 0;
        grid-column: 1;
        grid-row: 1;
    }

        .shop-head .shop-head-text h1,
        .shop-head .shop-head-text .lede { /*max-width: 560px;*/
        }

.shop-head-art {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-width: 0;
}

    .shop-head-art img {
        display: block;
        width: 100%;
        max-width: 480px;
        height: auto;
    }

@media (max-width: 1024px) {
    .shop-head {
        grid-template-columns: 1fr;
        gap: 16px;
    }

        .shop-head .shop-head-text {
            grid-column: 1;
            grid-row: 1;
        }

    .shop-head-art {
        grid-column: 1;
        grid-row: 2;
        justify-content: center;
    }

        .shop-head-art img {
            max-width: 320px;
        }
}

.shop-toolbar {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 32px;
}

.shop-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.shop-toolbar > .shop-fields {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.shop-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .shop-field label {
        font-size: 11.5px;
        font-weight: 600;
        color: var(--ink-soft);
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .shop-field select,
    .shop-field input {
        height: 42px;
        padding: 0 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        background: var(--bg);
        font-family: var(--sans);
        font-size: 14px;
        color: var(--ink);
        outline: none;
        transition: border-color 140ms ease, box-shadow 140ms ease;
    }

    .shop-field select {
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%233A3F47' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
        background-repeat: no-repeat;
        background-position: right 14px center;
        padding-right: 38px;
    }

        .shop-field select:hover,
        .shop-field input:hover {
            border-color: #D1D5DB;
        }

        .shop-field select:focus-visible,
        .shop-field input:focus-visible {
            border-color: var(--red);
            box-shadow: 0 0 0 4px rgba(216, 51, 51, 0.12);
        }

.shop-advanced {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

    .shop-advanced .shop-field-wide {
        grid-column: span 2;
    }

.shop-toolbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.btn-clear {
    background: var(--line-soft);
    color: var(--ink);
    border-color: var(--line-soft);
}

    .btn-clear:hover {
        background: var(--line);
        border-color: var(--line);
    }

.shop-results-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

    .shop-results-head .count {
        font-size: 14px;
        color: var(--ink-soft);
    }

        .shop-results-head .count strong {
            color: var(--ink);
            font-weight: 600;
        }

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 28px 18px;
    margin-bottom: 40px;
}

.shop-tile {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 200ms ease;
}

    .shop-tile .cover {
        aspect-ratio: 2/3;
        border-radius: 4px;
        overflow: hidden;
        box-shadow: 0 6px 18px -6px rgba(15, 17, 21, 0.18), 0 1px 3px rgba(15, 17, 21, 0.04);
        border: 1px solid rgba(0,0,0,0.08);
        margin-bottom: 12px;
        background: var(--bg-soft);
        transition: box-shadow 200ms ease;
    }

        .shop-tile .cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

    .shop-tile:hover {
        transform: translateY(-3px);
    }

        .shop-tile:hover .cover {
            box-shadow: 0 14px 26px -8px rgba(15, 17, 21, 0.25);
        }

    .shop-tile .title {
        font-family: var(--display);
        font-size: 14px;
        font-weight: 500;
        line-height: 1.3;
        color: var(--ink);
        margin: 0 0 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .shop-tile .meta {
        font-size: 12px;
        color: var(--ink-soft);
        display: flex;
        justify-content: space-between;
        gap: 8px;
    }

        .shop-tile .meta .price {
            color: var(--red);
            font-weight: 600;
        }

.shop-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    background: var(--bg);
    border-radius: var(--radius-md);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

    .page-btn:hover:not([disabled]):not(.active) {
        border-color: var(--ink);
        color: var(--ink);
    }

    .page-btn:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

    .page-btn.active {
        background: var(--red);
        border-color: var(--red);
        color: #fff;
        cursor: default;
    }

    .page-btn[disabled] {
        opacity: 0.4;
        cursor: not-allowed;
    }

.page-ellipsis {
    color: var(--muted);
    padding: 0 4px;
    user-select: none;
}

@media (max-width: 960px) {
    .shop-fields {
        grid-template-columns: repeat(2, 1fr);
    }

    .shop-advanced {
        grid-template-columns: repeat(2, 1fr);
    }

        .shop-advanced .shop-field-wide {
            grid-column: span 2;
        }
}

@media (max-width: 560px) {
    .shop-toolbar {
        padding: 18px;
    }

    .shop-fields {
        grid-template-columns: 1fr;
    }

    .shop-advanced {
        grid-template-columns: 1fr;
    }

        .shop-advanced .shop-field-wide {
            grid-column: span 1;
        }

    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px 14px;
    }

    .shop-toolbar-actions .btn {
        flex: 1 1 120px;
    }
}

/* ============ BOOK DETAIL ============ */
.book-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-bottom: 12px;
    transition: color 140ms ease;
}

    .book-back:hover {
        color: var(--red);
    }

.book-detail {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: 48px;
    padding: 8px 0 12px;
    margin-bottom: 56px;
}

.book-cover-lg {
    aspect-ratio: 2/3;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 20px 40px -12px rgba(15, 17, 21, 0.28), 0 4px 10px rgba(15, 17, 21, 0.06);
    border: 1px solid rgba(0,0,0,0.08);
    background: var(--bg-soft);
    align-self: start;
}

    .book-cover-lg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.book-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .book-info h1 {
        font-family: var(--display);
        font-size: 32px;
        font-weight: 500;
        line-height: 1.15;
        letter-spacing: -0.02em;
        margin: 0 0 8px;
        color: var(--ink);
    }

    .book-info .book-subtitle {
        color: var(--ink-soft);
        font-size: 15px;
        margin: 0 0 24px;
    }

.book-meta {
    display: grid;
    grid-template-columns: 200px 1fr;
    margin: 0 0 28px;
    padding: 0;
    border-top: 1px solid var(--line);
}

    .book-meta dt,
    .book-meta dd {
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
        margin: 0;
        font-size: 14px;
        line-height: 1.5;
    }

    .book-meta dt {
        font-weight: 600;
        color: var(--ink-soft);
        text-transform: uppercase;
        font-size: 11.5px;
        letter-spacing: 0.04em;
        display: flex;
        align-items: center;
    }

    .book-meta dd {
        color: var(--ink);
    }

        .book-meta dd.price {
            color: var(--red);
            font-weight: 600;
            font-family: var(--display);
            font-size: 20px;
        }

.book-cta {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-add-checkout {
    padding: 14px 28px;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

    .btn-add-checkout::before {
        content: "+";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        border: 1.5px solid currentColor;
        border-radius: 50%;
        font-size: 14px;
        font-weight: 400;
        line-height: 1;
    }

.book-preview {
    margin-top: 8px;
    padding-top: 40px;
    border-top: 1px solid var(--line);
}

    .book-preview h2 {
        font-family: var(--display);
        font-size: 24px;
        font-weight: 500;
        margin: 0 0 4px;
        letter-spacing: -0.01em;
    }

.book-preview-sub {
    color: var(--ink-soft);
    font-size: 14px;
    margin: 0 0 24px;
}

.book-page-frame {
    background: var(--bg-cream);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 36px;
    display: flex;
    justify-content: center;
}

    .book-page-frame img {
        max-width: 100%;
        height: auto;
        box-shadow: 0 18px 40px -12px rgba(15, 17, 21, 0.28), 0 2px 6px rgba(15, 17, 21, 0.06);
        border: 1px solid rgba(0,0,0,0.08);
        background: #fff;
        border-radius: 2px;
    }

@media (max-width: 820px) {
    .book-detail {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .book-cover-lg {
        max-width: 240px;
    }

    .book-info h1 {
        font-size: 26px;
    }

    .book-meta {
        grid-template-columns: 1fr;
        border-top: none;
    }

        .book-meta dt {
            padding: 14px 0 2px;
            border-bottom: none;
        }

        .book-meta dd {
            padding: 0 0 14px;
        }

    .book-page-frame {
        padding: 18px;
    }
}

/* ===== Checkout ===== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 4px;
    align-items: start;
}

.checkout-info h1 {
    font-family: var(--display);
    font-size: 36px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.checkout-info p {
    color: var(--ink-soft);
    font-size: 14.5px;
    line-height: 1.7;
    margin: 0 0 14px;
}

    .checkout-info p strong {
        color: var(--ink);
        font-weight: 600;
    }

.basket-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 18px 40px -24px rgba(216, 51, 51, 0.18), 0 2px 6px rgba(15, 17, 21, 0.04);
}

.basket-card-head {
    background: var(--red);
    color: #fff;
    padding: 16px 26px;
    font-family: var(--display);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.basket-row {
    display: grid;
    grid-template-columns: 1fr 44px 92px 96px 44px;
    column-gap: 16px;
    align-items: center;
    padding: 20px 26px;
    border-bottom: 1px solid var(--line);
}

.basket-row-head {
    padding: 18px 26px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
    text-transform: none;
}

    .basket-row-head .bc-title {
        font-size: 13px;
    }

.bc-qty {
    text-align: right;
}

.bc-price {
    text-align: right;
}

.basket-row-head .bc-qty,
.basket-row-head .bc-price {
    font-size: 13px;
}

.basket-item-title {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.basket-item-cover {
    width: 56px;
    height: 84px;
    flex-shrink: 0;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 8px 18px -8px rgba(15, 17, 21, 0.32), 0 1px 3px rgba(15, 17, 21, 0.08);
    border: 1px solid rgba(0,0,0,0.05);
    background: #000;
}

    .basket-item-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.basket-item-text h4 {
    font-family: var(--display);
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.35;
    margin: 0 0 4px;
    color: var(--ink);
    text-decoration: underline;
}

.basket-item-text .meta {
    color: var(--ink-soft);
    font-size: 12.5px;
    margin: 0;
}

.icon-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-soft);
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease, transform .18s ease, background .18s ease;
}

    .icon-btn:hover {
        border-color: var(--red);
        color: var(--red);
        background: var(--red-soft);
    }

    .icon-btn:active {
        transform: scale(0.96);
    }

    .icon-btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px var(--red-soft);
        border-color: var(--red);
    }

    .icon-btn svg {
        width: 16px;
        height: 16px;
    }

.basket-qty-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: var(--sans);
    font-size: 14px;
    text-align: center;
    color: var(--ink);
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

    .basket-qty-input:focus {
        outline: none;
        border-color: var(--red);
        box-shadow: 0 0 0 3px var(--red-soft);
    }

    .basket-qty-input::-webkit-outer-spin-button,
    .basket-qty-input::-webkit-inner-spin-button {
        margin: 0;
    }

.basket-totals {
    padding: 20px 26px 26px;
}

    .basket-totals .t-row {
        display: grid;
        grid-template-columns: 1fr 44px 92px 96px 44px;
        column-gap: 16px;
        font-size: 14px;
        padding: 6px 0;
        color: var(--ink);
    }

    .basket-totals .t-label {
        grid-column: 1;
    }

    .basket-totals .t-qty {
        grid-column: 3;
        text-align: right;
    }

    .basket-totals .t-value {
        grid-column: 4;
        text-align: right;
    }

    .basket-totals .t-row.t-total {
        margin-top: 4px;
        padding-top: 12px;
        border-top: 1px solid var(--line);
        font-weight: 700;
        font-size: 15px;
    }

.checkout-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

#view-checkout .page-head {
    position: relative;
    padding-right: calc(var(--side-pad) + 200px);
}

    #view-checkout .page-head .btn-back-shop {
        position: absolute;
        top: 56px;
        right: var(--side-pad);
    }

@media (max-width: 720px) {
    #view-checkout .page-head {
        padding-right: var(--side-pad);
    }

        #view-checkout .page-head .btn-back-shop {
            position: static;
            margin-top: 12px;
        }
}

.btn-back-shop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border: 1px solid var(--red);
    background: var(--red);
    border-radius: var(--radius-pill);
    color: #fff;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

    .btn-back-shop:hover {
        background: #C32929;
        border-color: #C32929;
    }

    .btn-back-shop:active {
        transform: translateY(1px);
    }

    .btn-back-shop:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px var(--red-soft);
    }

.overseas-link {
    font-size: 14px;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .18s ease;
}

    .overseas-link:hover {
        color: var(--red);
    }

@media (max-width: 900px) {
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .basket-row,
    .basket-totals .t-row {
        grid-template-columns: 1fr 40px 72px 80px 40px;
        column-gap: 10px;
    }

    .basket-row, .basket-row-head, .basket-totals {
        padding-left: 18px;
        padding-right: 18px;
    }

    .basket-item-cover {
        width: 48px;
        height: 72px;
    }

    .checkout-info h1 {
        font-size: 28px;
    }
}


/* ===== Sidebar: Account details section ===== */
.sidebar-account {
    display: none;
}

body.is-logged-in .sidebar-account {
    display: block;
}

.sidebar-account .sidebar-divider {
    margin: 14px 0 10px;
}

.sidebar-subdivider {
    margin: 8px 12px 8px;
    border: 0;
    height: 1px;
    background: var(--line);
    opacity: 0.7;
}

.sidebar-link.sidebar-logoff {
    color: var(--red);
}

    .sidebar-link.sidebar-logoff .icon {
        color: var(--red);
    }

    .sidebar-link.sidebar-logoff:hover {
        background: var(--red-soft);
        color: var(--red);
    }

    .sidebar-link.sidebar-logoff.active {
        background: var(--red-soft);
        color: var(--red);
    }

/* Header: account state indicator */
.header-actions .account-chip {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: #fff;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .14s ease;
}

    .header-actions .account-chip:hover {
        border-color: var(--red);
        background: var(--red-soft);
    }

    .header-actions .account-chip:active {
        transform: translateY(1px);
    }

    .header-actions .account-chip:focus-visible {
        outline: none;
        border-color: var(--red);
        box-shadow: 0 0 0 3px var(--red-soft);
    }

    .header-actions .account-chip .avatar {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: var(--red);
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-family: var(--display);
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0;
    }

body.is-logged-in .header-actions #accountLoginBtn {
    display: none;
}

body.is-logged-in .header-actions .account-chip {
    display: inline-flex;
}

/* Search bar is available only to signed-in users */
body:not(.is-logged-in) .search-bar {
    display: none;
}

/* Header logout — hidden by default, shown only when logged in */
.header-actions .header-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
}

    .header-actions .header-logout-btn svg {
        width: 16px;
        height: 16px;
        color: currentColor;
    }

body.is-logged-in .header-actions .header-logout-btn {
    display: inline-flex;
}

/* Account placeholder views */
.account-placeholder {
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
    padding: 48px 32px;
    text-align: center;
    color: var(--ink-soft);
    background: #FAFBFC;
    font-size: 14.5px;
}

    .account-placeholder strong {
        color: var(--ink);
        font-weight: 600;
    }

/* ===== Change Password form ===== */
.password-form {
    max-width: 640px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 18px 40px -24px rgba(15, 17, 21, 0.14), 0 2px 6px rgba(15, 17, 21, 0.04);
}

.password-form-user {
    padding: 18px 28px;
    background: var(--bg-cream);
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    color: var(--ink-soft);
}

    .password-form-user strong {
        color: var(--ink);
        font-weight: 600;
        letter-spacing: 0.02em;
    }

.password-form-body {
    padding: 28px 28px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pw-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .pw-field label {
        font-size: 13px;
        font-weight: 600;
        color: var(--ink);
        letter-spacing: 0.01em;
    }

.pw-input-wrap {
    position: relative;
}

.pw-field input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    font-family: var(--sans);
    font-size: 15px;
    color: var(--ink);
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

    .pw-field input::placeholder {
        color: #9AA0A8;
    }

    .pw-field input:hover {
        border-color: #D1D5DB;
    }

    .pw-field input:focus-visible {
        border-color: var(--red);
        box-shadow: 0 0 0 4px rgba(216, 51, 51, 0.12);
    }

.pw-field.is-valid input {
    border-color: #3A9966;
}

.pw-field.is-invalid input {
    border-color: #C24141;
}

.pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 999px;
    color: var(--ink-soft);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 140ms ease, color 140ms ease;
}

    .pw-toggle:hover {
        background: var(--line-soft);
        color: var(--ink);
    }

    .pw-toggle:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px var(--red-soft);
        color: var(--red);
    }

    .pw-toggle svg {
        width: 18px;
        height: 18px;
    }

.pw-checklist {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 18px;
}

    .pw-checklist li {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: var(--ink-soft);
        transition: color 140ms ease;
    }

    .pw-checklist .pw-dot {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        border: 1px solid var(--line);
        background: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: transparent;
        flex-shrink: 0;
        transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
    }

        .pw-checklist .pw-dot svg {
            width: 11px;
            height: 11px;
        }

    .pw-checklist li.met {
        color: #2F7A54;
    }

        .pw-checklist li.met .pw-dot {
            background: #3A9966;
            border-color: #3A9966;
            color: #fff;
        }

.pw-match {
    margin-top: 2px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
}

    .pw-match.ok {
        color: #2F7A54;
    }

    .pw-match.bad {
        color: #C24141;
    }

    .pw-match .pw-dot {
        flex-shrink: 0;
    }

    .pw-match.ok .pw-dot {
        background: #3A9966;
        border-color: #3A9966;
        color: #fff;
    }

    .pw-match.bad .pw-dot {
        background: #C24141;
        border-color: #C24141;
        color: #fff;
    }

    .pw-match[hidden] {
        display: none;
    }

.password-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

    .password-form-actions .btn[disabled] {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
    }

.pw-success {
    display: none;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: #EDF7F1;
    border: 1px solid #C7E3D2;
    color: #2F7A54;
    font-size: 14px;
    font-weight: 500;
}

    .pw-success.show {
        display: block;
    }

@media (max-width: 600px) {
    .password-form-body {
        padding: 22px 20px 24px;
    }

    .password-form-user {
        padding: 16px 20px;
    }

    .pw-checklist {
        grid-template-columns: 1fr;
    }
}

/* ===== Login / Register page ===== */
#view-login .page-body {
    max-width: 1240px;
}

.login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.login-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-col-title {
    font: 600 15px/1.4 var(--sans);
    color: var(--ink-soft);
    margin: 0 0 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.auth-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
}

.auth-card-head {
    padding: 12px 20px;
    font: 600 14px/1.3 var(--sans);
    letter-spacing: 0.01em;
    background: var(--red);
    color: #fff;
    border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
}

    .auth-card-head.is-muted {
        background: var(--bg-soft);
        color: var(--ink);
        border-bottom: 1px solid var(--line);
    }

.auth-card-body {
    padding: 20px 22px 24px;
}

    .auth-card-body p.auth-helper {
        font-size: 14px;
        color: var(--ink-soft);
        line-height: 1.55;
        margin: 0 0 16px;
    }

    .auth-card-body .pw-field:not(:last-child) {
        margin-bottom: 16px;
    }

.auth-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px 16px;
    align-items: center;
}

    .auth-row > label {
        font: 600 13px/1.3 var(--sans);
        color: var(--ink);
    }

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 500 13px/1 var(--sans);
    color: var(--ink-soft);
    cursor: pointer;
    user-select: none;
    margin: 14px 0 16px;
}

    .auth-remember input {
        width: 16px;
        height: 16px;
        accent-color: var(--red);
        cursor: pointer;
    }

.auth-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 26px;
    background: var(--red);
    color: #fff;
    border: 1px solid var(--red);
    border-radius: var(--radius-pill);
    font: 600 14px/1 var(--sans);
    cursor: pointer;
    box-shadow: 0 6px 16px -10px rgba(216, 51, 51, 0.55);
    transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

    .auth-btn:hover {
        background: #b52828;
        border-color: #b52828;
        box-shadow: 0 10px 20px -12px rgba(216, 51, 51, 0.7);
    }

    .auth-btn:active {
        transform: translateY(1px);
    }

    .auth-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        box-shadow: none;
    }

    .auth-btn:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

.auth-btn-ghost {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: none;
}

    .auth-btn-ghost:hover {
        background: var(--bg-soft);
        border-color: var(--ink);
        color: var(--ink);
        box-shadow: none;
    }

.auth-forgot-note {
    margin: 14px 0 0;
    font: 400 13px/1.5 var(--sans);
    color: var(--ink-soft);
}

    .auth-forgot-note strong {
        color: var(--ink);
        font-weight: 600;
    }

.auth-shib {
    display: flex;
    align-items: center;
    gap: 18px;
}

.auth-shib-logo {
    flex-shrink: 0;
    width: 96px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font: 600 10px/1.1 var(--sans);
    color: var(--ink-soft);
    text-align: center;
    padding: 6px;
}

.auth-athens {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 18px;
    align-items: flex-start;
}

.auth-athens-logo {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(118, 36, 135, 0.12), rgba(118, 36, 135, 0.04));
    color: #762487;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 42px/1 var(--display);
}

.auth-athens p {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.55;
    margin: 0 0 8px;
}

    .auth-athens p:last-child {
        margin-bottom: 0;
    }

.auth-athens strong {
    color: var(--ink);
}

@media (max-width: 960px) {
    .login-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 560px) {
    .auth-row {
        grid-template-columns: 1fr;
    }

    .auth-shib {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .auth-athens {
        grid-template-columns: 1fr;
    }
}

/* ===== Saved Searches ===== */
.saved-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
}

.btn-create-search {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: var(--red);
    color: #fff;
    border: 1px solid var(--red);
    border-radius: var(--radius-pill);
    font-family: var(--sans);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
    box-shadow: 0 8px 18px -10px rgba(216, 51, 51, 0.55);
}

    .btn-create-search:hover {
        background: #C32929;
    }

    .btn-create-search:active {
        transform: translateY(1px);
    }

    .btn-create-search:focus-visible {
        outline: none;
        box-shadow: 0 0 0 4px var(--red-soft), 0 8px 18px -10px rgba(216, 51, 51, 0.55);
    }

    .btn-create-search::before {
        content: "";
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #fff;
        color: var(--red);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23D83333' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M12 5v14'/><path d='M5 12h14'/></svg>");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 12px 12px;
        transition: transform 220ms ease;
    }

    .btn-create-search.open::before {
        transform: rotate(45deg);
    }

.saved-block {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 18px 40px -24px rgba(15, 17, 21, 0.1), 0 2px 6px rgba(15, 17, 21, 0.03);
}

.saved-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.saved-block-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

    .saved-block-title h2 {
        font-family: var(--display);
        font-size: 20px;
        font-weight: 500;
        margin: 0;
        color: var(--ink);
    }

.saved-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--red-soft);
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.saved-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

    .saved-toggle:hover {
        border-color: var(--red);
        color: var(--red);
        background: var(--red-soft);
    }

    .saved-toggle:focus-visible {
        outline: none;
        border-color: var(--red);
        box-shadow: 0 0 0 3px var(--red-soft);
    }

    .saved-toggle .chev {
        width: 16px;
        height: 16px;
        transform: rotate(-180deg);
        transition: transform 260ms ease;
    }

.saved-block.collapsed .saved-toggle .chev {
    transform: rotate(0);
}

.saved-block-body {
    max-height: 640px;
    overflow: hidden;
    transition: max-height 300ms ease, opacity 220ms ease, border-top-width 220ms ease;
    opacity: 1;
}

.saved-block.collapsed .saved-block-body {
    max-height: 0;
    opacity: 0;
}

.saved-block.collapsed .saved-block-head {
    border-bottom-color: transparent;
}

.saved-table-head {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) minmax(260px, 2fr) 120px;
    padding: 14px 24px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #FAFBFC;
    border-bottom: 1px solid var(--line);
}

.saved-scroll {
    max-height: calc(5 * 72px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #D1D5DB transparent;
}

    .saved-scroll::-webkit-scrollbar {
        width: 8px;
    }

    .saved-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .saved-scroll::-webkit-scrollbar-thumb {
        background: #D1D5DB;
        border-radius: 4px;
    }

        .saved-scroll::-webkit-scrollbar-thumb:hover {
            background: #B4B9C1;
        }

.saved-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) minmax(260px, 2fr) 120px;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
    min-height: 72px;
    transition: background 140ms ease;
}

    .saved-row:last-child {
        border-bottom: 0;
    }

    .saved-row:hover {
        background: #FAFBFC;
    }

    .saved-row .saved-name {
        font-family: var(--display);
        font-size: 15.5px;
        font-weight: 500;
        color: var(--ink);
        text-decoration: none;
        line-height: 1.35;
    }

        .saved-row .saved-name:hover {
            color: var(--red);
        }

    .saved-row .cell-details {
        font-size: 13.5px;
        color: var(--ink-soft);
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .saved-row .cell-actions {
        display: inline-flex;
        gap: 8px;
        justify-self: end;
    }

.saved-action {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-soft);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

    .saved-action:hover {
        border-color: var(--red);
        color: var(--red);
        background: var(--red-soft);
    }

    .saved-action svg {
        width: 15px;
        height: 15px;
    }

.saved-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 56px 32px;
    text-align: center;
    color: var(--ink-soft);
}

    .saved-empty .icon-wrap {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--bg-cream);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--red);
        margin-bottom: 6px;
    }

        .saved-empty .icon-wrap svg {
            width: 24px;
            height: 24px;
        }

    .saved-empty strong {
        color: var(--ink);
        font-family: var(--display);
        font-size: 18px;
        font-weight: 500;
    }

    .saved-empty p {
        margin: 0;
        font-size: 14px;
        max-width: 360px;
    }

.saved-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 24px;
    border-top: 1px solid var(--line);
    background: #FAFBFC;
    font-size: 13px;
    color: var(--ink-soft);
}

    .saved-pagination[hidden] {
        display: none;
    }

    .saved-pagination .page-info {
        font-weight: 500;
        color: var(--ink);
    }

    .saved-pagination .page-nav {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 7px 14px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: #fff;
        color: var(--ink);
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
    }

        .saved-pagination .page-nav:hover:not(:disabled) {
            border-color: var(--red);
            color: var(--red);
            background: var(--red-soft);
        }

        .saved-pagination .page-nav:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

.saved-search-form {
    overflow: hidden;
    margin-top: 0;
    transition: max-height 360ms ease, margin-top 240ms ease;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
    max-height: 1800px;
    padding: 22px 24px 24px;
    border-color: var(--line);
}

    .saved-search-form .form-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin: 0 0 6px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--line);
    }

    .saved-search-form h3 {
        font-family: var(--display);
        font-size: 22px;
        font-weight: 500;
        margin: 0;
        color: var(--ink);
        letter-spacing: -0.01em;
    }

    .saved-search-form .shop-fields {
        margin-top: 18px;
        row-gap: 16px;
    }

    .saved-search-form .shop-field input,
    .saved-search-form .shop-field select {
        background: #fff;
    }

    .saved-search-form .shop-field-full {
        grid-column: 1 / -1;
    }

.saved-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

    .saved-form-actions .btn-cancel {
        background: var(--line-soft);
        color: var(--ink);
        border: 1px solid var(--line);
        padding: 10px 20px;
        border-radius: var(--radius-pill);
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: background 140ms ease, border-color 140ms ease;
    }

        .saved-form-actions .btn-cancel:hover {
            background: #E8EAEE;
            border-color: #CFD3D9;
        }

        .saved-form-actions .btn-cancel:focus-visible {
            outline: none;
            border-color: var(--red);
            box-shadow: 0 0 0 3px var(--red-soft);
        }

/* ===== Email Alerts form (two-column sections) ===== */
.alert-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    margin-top: 18px;
}

.alert-section + .alert-section {
    margin-top: 26px;
}

.alert-section-title {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 500;
    color: var(--red);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(216, 51, 51, 0.2);
    letter-spacing: 0.01em;
}

.alert-section-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    .alert-section-body .shop-field input,
    .alert-section-body .shop-field select {
        background: #fff;
    }

.alert-date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 820px) {
    .alert-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ===== RSS Feeds ===== */
.page-head .lede-list {
    max-width: 640px;
    padding-left: 22px;
    margin: 0 0 14px;
    color: var(--ink-soft);
    font-size: 17px;
    line-height: 1.6;
}

    .page-head .lede-list li {
        margin: 4px 0;
    }

        .page-head .lede-list li::marker {
            color: var(--red);
        }

.page-head .lede strong {
    color: var(--ink);
    font-weight: 600;
}

.rss-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, #FF8A2A, #E86A00);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px -6px rgba(232, 106, 0, 0.55), 0 1px 2px rgba(0,0,0,0.08);
}

    .rss-icon svg {
        width: 18px;
        height: 18px;
    }

.rss-row .cell-search {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rss-row .rss-info {
    min-width: 0;
}

    .rss-row .rss-info .saved-name {
        display: block;
    }

.rss-row .rss-url {
    font-size: 12.5px;
    color: var(--ink-soft);
    margin: 2px 0 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rss-generator-form {
    margin-top: 24px;
    padding: 22px 24px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
}

    .rss-generator-form .form-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin: 0 0 6px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--line);
    }

    .rss-generator-form h3 {
        font-family: var(--display);
        font-size: 22px;
        font-weight: 500;
        margin: 0;
        color: var(--ink);
        letter-spacing: -0.01em;
    }

    .rss-generator-form .shop-fields {
        margin-top: 18px;
        row-gap: 16px;
    }

    .rss-generator-form .shop-field input,
    .rss-generator-form .shop-field select {
        background: #fff;
    }

/* ===== Billing / My PIO Books ===== */
.billing-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 18px 40px -24px rgba(15, 17, 21, 0.1), 0 2px 6px rgba(15, 17, 21, 0.03);
}

.billing-head {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--line);
}

    .billing-head h2 {
        font-family: var(--display);
        font-size: 22px;
        font-weight: 500;
        margin: 0 0 4px;
        color: var(--ink);
        letter-spacing: -0.01em;
    }

    .billing-head p {
        margin: 0;
        color: var(--ink-soft);
        font-size: 14px;
    }

.billing-scroll {
    overflow-x: auto;
}

.billing-row {
    display: grid;
    grid-template-columns: 130px minmax(220px, 1fr) 130px 140px 80px;
    gap: 14px;
    align-items: center;
    padding: 16px 28px;
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
    color: var(--ink);
    min-width: 800px;
}

    .billing-row .col-actions {
        display: flex;
        justify-content: center;
    }

    .billing-row:last-child {
        border-bottom: 0;
    }

.billing-head-row {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #FAFBFC;
    padding: 14px 28px;
}

.billing-body .billing-row:hover {
    background: #FAFBFC;
}

.billing-row .col-desc {
    font-weight: 500;
    color: var(--ink);
}

.billing-row .col-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

    .status-pill.pending {
        background: #FEF2E8;
        color: #B85D10;
    }

    .status-pill.completed {
        background: #E7F6ED;
        color: #2F7A54;
    }

.format-chips {
    display: inline-flex;
    gap: 6px;
}

.format-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    background: #fff;
    letter-spacing: 0.03em;
    transition: border-color 140ms ease, color 140ms ease, background 140ms ease, transform 140ms ease;
}

    .format-chip:hover {
        border-color: var(--red);
        color: var(--red);
        background: var(--red-soft);
    }

    .format-chip:active {
        transform: translateY(1px);
    }

    .format-chip.disabled,
    .billing-row.is-pending .format-chip {
        opacity: 0.4;
        pointer-events: none;
        background: #F4F5F7;
    }

.bill-download {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 140ms ease, color 140ms ease, background 140ms ease, transform 140ms ease;
}

    .bill-download:hover {
        border-color: var(--red);
        color: var(--red);
        background: var(--red-soft);
    }

    .bill-download:active {
        transform: translateY(1px);
    }

    .bill-download svg {
        width: 16px;
        height: 16px;
    }

    .bill-download.disabled,
    .billing-row.is-pending .bill-download {
        opacity: 0.35;
        pointer-events: none;
    }

.billing-row.is-pending .col-books .dash,
.billing-row.is-pending .col-bills .dash {
    color: var(--ink-soft);
}

.billing-empty {
    padding: 56px 32px;
    text-align: center;
    color: var(--ink-soft);
}

    .billing-empty strong {
        display: block;
        color: var(--ink);
        font-family: var(--display);
        font-size: 18px;
        font-weight: 500;
        margin-bottom: 4px;
    }

#view-my-books .page-body {
    max-width: 1240px;
}

/* ===== My Subscription ===== */
#view-my-subscription .page-body {
    max-width: 1100px;
}

.subs-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.subs-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    padding: 28px 30px;
    box-shadow: 0 18px 40px -24px rgba(15, 17, 21, 0.1), 0 2px 6px rgba(15, 17, 21, 0.03);
}

    .subs-card > h2 {
        font-family: var(--display);
        font-size: 22px;
        font-weight: 500;
        margin: 0 0 4px;
        color: var(--ink);
        letter-spacing: -0.01em;
    }

    .subs-card > .subs-sub {
        margin: 0 0 20px;
        color: var(--ink-soft);
        font-size: 14px;
    }

/* --- Current Plan --- */
.plan-row {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 36px;
    align-items: center;
    padding: 6px 0 22px;
}

.plan-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--red), #A52424);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--display);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    box-shadow: 0 14px 30px -14px rgba(216, 51, 51, 0.55), 0 2px 5px rgba(15, 17, 21, 0.08);
}

.plan-info {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 40px;
    align-items: center;
}

    .plan-info .field label {
        display: block;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--ink-soft);
        font-weight: 700;
        margin-bottom: 6px;
    }

    .plan-info .field strong {
        font-family: var(--display);
        font-size: 20px;
        font-weight: 500;
        color: var(--ink);
        letter-spacing: -0.01em;
    }

    .plan-info .field.plan-name strong {
        font-size: 22px;
    }

.plan-actions {
    display: flex;
    gap: 12px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.btn-cancel-sub {
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    background: #fff;
    color: var(--red);
    border: 1.5px solid var(--red);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 140ms ease, transform 140ms ease;
}

    .btn-cancel-sub:hover {
        background: var(--red-soft);
    }

    .btn-cancel-sub:active {
        transform: translateY(1px);
    }

    .btn-cancel-sub:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px var(--red-soft);
    }

/* --- Usage Quotas --- */
.quota-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.quota-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quota-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

    .quota-label .name {
        font-family: var(--sans);
        font-size: 14.5px;
        font-weight: 600;
        color: var(--ink);
    }

    .quota-label .count {
        font-variant-numeric: tabular-nums;
        font-size: 13.5px;
        color: var(--ink-soft);
        font-weight: 500;
    }

.quota-bar {
    height: 8px;
    background: #EEF0F3;
    border-radius: 999px;
    overflow: hidden;
}

.quota-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF8A2A, var(--red));
    border-radius: 999px;
    transition: width 600ms ease;
}

    .quota-fill.level-high {
        background: linear-gradient(90deg, var(--red), #A52424);
    }

@media (max-width: 820px) {
    .plan-row {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .plan-info {
        grid-template-columns: 1fr 1fr;
        gap: 20px 28px;
    }
}

@media (max-width: 720px) {
    .billing-head {
        padding: 20px 20px 16px;
    }

    .billing-row, .billing-head-row {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 720px) {
    .saved-table-head, .saved-row {
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

        .saved-table-head > :nth-child(2) {
            display: none;
        }

        .saved-row .cell-details {
            grid-column: 1 / -1;
            padding-top: 4px;
        }

    .saved-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========== Custom dropdown (replaces native <select>) ========== */
.pio-dropdown {
    position: relative;
    display: inline-flex;
    width: 100%;
    min-width: 0;
}

    .pio-dropdown > select.pio-dropdown-native {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        border: 0;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
    }

.pio-dropdown-trigger {
    width: 100%;
    min-height: 40px;
    padding: 0 38px 0 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font: 400 14px/1.2 var(--sans);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

    .pio-dropdown-trigger:hover {
        border-color: #CBD0D8;
    }

    .pio-dropdown-trigger:focus-visible,
    .pio-dropdown.is-open .pio-dropdown-trigger {
        outline: 0;
        border-color: var(--red);
        box-shadow: 0 0 0 3px rgba(216, 51, 51, 0.14);
    }

.pio-dropdown-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pio-dropdown-caret {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 8px;
    color: var(--ink-soft);
    pointer-events: none;
    transition: transform 220ms ease, color 160ms ease;
}

.pio-dropdown.is-open .pio-dropdown-caret {
    transform: translateY(-50%) rotate(180deg);
    color: var(--red);
}

.pio-dropdown-caret svg {
    width: 100%;
    height: 100%;
    display: block;
}

.pio-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 34px -14px rgba(15, 17, 21, 0.28);
    padding: 6px;
    margin: 0;
    list-style: none;
    z-index: 500;
    transform-origin: top center;
    animation: pioDropFade 180ms cubic-bezier(.34, 1.2, .64, 1);
}

.pio-dropdown.is-open {
    z-index: 500;
}

.pio-dropdown-menu[hidden] {
    display: none;
}

@keyframes pioDropFade {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pio-dropdown-option {
    padding: 9px 14px;
    border-radius: 8px;
    font: 500 13.5px/1.4 var(--sans);
    color: var(--ink);
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
}

    .pio-dropdown-option:hover,
    .pio-dropdown-option.is-highlighted {
        background: var(--red-soft);
        color: var(--red);
    }

    .pio-dropdown-option.is-selected {
        background: var(--red);
        color: #fff;
    }

        .pio-dropdown-option.is-selected:hover,
        .pio-dropdown-option.is-selected.is-highlighted {
            background: #C32929;
            color: #fff;
        }

.bill-filter .pio-dropdown-trigger {
    min-height: 42px;
}

.confirm-modal .pio-dropdown-menu {
    z-index: 1100;
}

/* Searchable dropdown — search field at the top of the menu */
.pio-dropdown-search-li {
    display: block;
    position: relative;
    margin: 0 0 6px;
    padding: 6px 6px 10px 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    list-style: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237A8088' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>");
    background-repeat: no-repeat;
    background-position: 8px 14px;
}

.pio-dropdown-search {
    width: 100%;
    height: 36px;
    padding: 0 14px;
    background: var(--bg-cream, #F6F3EC);
    border: 1px solid #B5BAC2;
    border-radius: var(--radius-pill);
    font: 400 13.5px/1 var(--sans);
    color: var(--ink);
    outline: 0;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

    .pio-dropdown-search::placeholder {
        color: #9AA0A8;
    }

    .pio-dropdown-search:focus {
        background: #fff;
        border-color: var(--red);
        box-shadow: 0 0 0 3px rgba(216, 51, 51, 0.14);
    }

/* ========== Bill Tracker ========== */
#view-bill-tracker .page-head,
#view-saved-searches .page-head,
#view-email-alerts .page-head,
#view-rss-feeds .page-head {
    padding-top: 32px;
    padding-bottom: 8px;
    max-width: none;
}

    #view-bill-tracker .page-head .lede,
    #view-saved-searches .page-head .lede,
    #view-email-alerts .page-head .lede,
    #view-rss-feeds .page-head .lede {
        max-width: 1100px;
    }

        #view-bill-tracker .page-head .lede + .lede {
            margin-top: 12px;
        }

#view-bill-tracker .page-body,
#view-saved-searches .page-body,
#view-email-alerts .page-body,
#view-rss-feeds .page-body {
    max-width: 1100px;
    padding-top: 12px;
}

.bt-filter {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 18px 22px;
    align-items: end;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 22px;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
    position: relative;
}

    .bt-filter::before {
        content: '';
        position: absolute;
        top: 22px;
        left: 0;
        width: 3px;
        height: 24px;
        background: var(--red);
        border-radius: 0 3px 3px 0;
    }

.bt-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .bt-field > label {
        font: 600 12px/1.3 var(--sans);
        color: var(--ink);
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 6px;
    }

.bt-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    font: 600 13px/1 var(--sans);
    color: var(--ink);
    cursor: pointer;
    user-select: none;
}

    .bt-checkbox input {
        appearance: none;
        -webkit-appearance: none;
        width: 20px;
        height: 20px;
        border: 1.5px solid var(--line);
        border-radius: 6px;
        background: #fff;
        cursor: pointer;
        position: relative;
        transition: background 160ms ease, border-color 160ms ease;
    }

        .bt-checkbox input:hover {
            border-color: var(--red);
        }

        .bt-checkbox input:checked {
            background: var(--red);
            border-color: var(--red);
        }

            .bt-checkbox input:checked::after {
                content: '';
                position: absolute;
                top: 4px;
                left: 7px;
                width: 5px;
                height: 9px;
                border: solid #fff;
                border-width: 0 2px 2px 0;
                transform: rotate(45deg);
            }

        .bt-checkbox input:focus-visible {
            outline: 2px solid var(--red);
            outline-offset: 2px;
        }

.bt-list-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
}

.bt-list-head {
    padding: 14px 22px;
    background: #FAFBFC;
    border-bottom: 1px solid var(--line);
    font: 500 13px/1.3 var(--sans);
    color: var(--ink-soft);
}

    .bt-list-head strong {
        color: var(--ink);
        font-weight: 700;
        font-size: 14px;
    }

.bt-alpha {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 14px 22px;
}

.bt-alpha-letter {
    background: none;
    border: 0;
    padding: 4px 8px;
    min-width: 26px;
    font: 700 13px/1 var(--sans);
    color: var(--ink-soft);
    cursor: pointer;
    border-radius: 6px;
    transition: background 140ms ease, color 140ms ease;
}

    .bt-alpha-letter:hover:not(:disabled):not(.active) {
        background: var(--red-soft);
        color: var(--red);
    }

    .bt-alpha-letter.active {
        background: var(--red);
        color: #fff;
    }

    .bt-alpha-letter:disabled {
        color: #C5CAD2;
        cursor: default;
    }

    .bt-alpha-letter:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

.bt-table {
    display: flex;
    flex-direction: column;
}

.bt-row-head,
.bt-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px 130px 130px;
    gap: 20px;
    padding: 14px 22px;
    align-items: center;
}

.bt-row-head {
    background: #FAFBFC;
    border-bottom: 1px solid var(--line);
    font: 600 12px/1.3 var(--sans);
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

    .bt-row-head button {
        background: none;
        border: 0;
        padding: 0;
        font: inherit;
        color: inherit;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        text-transform: uppercase;
    }

        .bt-row-head button:hover {
            color: var(--red);
        }

        .bt-row-head button .sort-arrow {
            font-size: 10px;
            opacity: 0.7;
        }

        .bt-row-head button.sorted {
            color: var(--ink);
        }

            .bt-row-head button.sorted .sort-arrow {
                color: var(--red);
                opacity: 1;
            }

.bt-row {
    border-top: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
    transition: background 140ms ease;
}

    .bt-row:hover {
        background: var(--red-soft);
    }

        .bt-row:hover .bt-title {
            color: var(--red);
        }

    .bt-row:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: -2px;
        background: var(--red-soft);
    }

    .bt-row.is-hidden {
        display: none;
    }

.bt-title {
    font: 600 14px/1.4 var(--sans);
    color: var(--ink);
    transition: color 140ms ease;
}

.bt-next,
.bt-updated,
.bt-intro {
    font: 500 13px/1.3 var(--sans);
    color: var(--red);
}

.bt-empty {
    padding: 40px 22px;
    text-align: center;
    font: 400 14px/1.5 var(--sans);
    color: var(--ink-soft);
}

@media (max-width: 720px) {
    .bt-filter {
        grid-template-columns: 1fr;
    }

    .bt-row-head,
    .bt-row {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

        .bt-row-head > :nth-child(2),
        .bt-row-head > :nth-child(4),
        .bt-row > .bt-next,
        .bt-row > .bt-intro {
            display: none;
        }
}

/* ========== Bill Publications (per-bill list) ========== */
#view-bill-publications .page-body {
    max-width: 1240px;
}

#view-bill-publications .page-head {
    position: relative;
    padding-right: 120px;
}

    #view-bill-publications .page-head .bill-back {
        position: absolute;
        top: 68px;
        right: var(--side-pad);
    }

.bp-filter {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 22px;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
}

    .bp-filter::before {
        content: '';
        position: absolute;
        top: 22px;
        left: 0;
        width: 3px;
        height: 24px;
        background: var(--red);
        border-radius: 0 3px 3px 0;
    }

.bp-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 170px 170px minmax(0, 1.3fr);
    gap: 14px 18px;
    align-items: end;
}

.bp-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .bp-field > label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font: 600 12px/1.3 var(--sans);
        color: var(--ink);
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 6px;
    }

        .bp-field > label .info {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: #0F1115;
            color: #fff;
            font: 700 9px/14px var(--sans);
            text-align: center;
            letter-spacing: 0;
            text-transform: none;
            cursor: help;
        }

.bp-input,
.bp-select {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font: 400 13.5px/1 var(--sans);
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

    .bp-input:focus,
    .bp-select:focus {
        outline: 0;
        border-color: var(--red);
        box-shadow: 0 0 0 3px rgba(216, 51, 51, 0.14);
    }

    .bp-input::placeholder {
        color: #9AA0A8;
    }

.bp-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--line);
}

.bp-btn-search {
    background: var(--red);
    color: #fff;
    padding: 11px 28px;
    border: 0;
    border-radius: var(--radius-pill);
    font: 700 13px/1 var(--sans);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 14px -6px rgba(216, 51, 51, 0.45);
    transition: background 160ms ease, transform 120ms ease, box-shadow 200ms ease;
}

    .bp-btn-search:hover {
        background: #C32929;
        box-shadow: 0 6px 18px -6px rgba(216, 51, 51, 0.55);
    }

    .bp-btn-search:active {
        transform: translateY(1px);
    }

.bp-btn-clear {
    background: #fff;
    color: var(--ink);
    padding: 11px 22px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-pill);
    font: 600 13px/1 var(--sans);
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

    .bp-btn-clear:hover {
        background: #F6F3EC;
        border-color: #CBD0D8;
    }

/* Main area */
.bp-main-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.bp-count {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font: 500 13px/1.3 var(--sans);
    color: var(--ink-soft);
}

    .bp-count strong {
        color: var(--ink);
        font-weight: 700;
    }

.bp-actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bp-btn-outline {
    background: #fff;
    color: var(--red);
    border: 1.5px solid var(--red);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font: 600 13px/1 var(--sans);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 160ms ease, color 160ms ease, transform 120ms ease;
}

    .bp-btn-outline:hover {
        background: var(--red);
        color: #fff;
    }

    .bp-btn-outline:active {
        transform: translateY(1px);
    }

    .bp-btn-outline:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

    .bp-btn-outline .caret {
        font-size: 10px;
        transition: transform 180ms ease;
    }

.bp-export.is-open .bp-btn-outline .caret {
    transform: rotate(180deg);
}

.bp-export {
    position: relative;
}

.bp-export-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 140px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 34px -14px rgba(15, 17, 21, 0.28);
    padding: 6px;
    list-style: none;
    margin: 0;
    z-index: 40;
    animation: pioDropFade 180ms cubic-bezier(.34, 1.2, .64, 1);
}

    .bp-export-menu[hidden] {
        display: none;
    }

    .bp-export-menu li {
        padding: 8px 14px;
        border-radius: 8px;
        font: 600 13px/1.3 var(--sans);
        color: var(--ink);
        cursor: pointer;
        transition: background 120ms ease, color 120ms ease;
    }

        .bp-export-menu li:hover {
            background: var(--red-soft);
            color: var(--red);
        }

/* Publications list (4-column variant) */
.pub-list.pub-list-4col .pub-meta {
    grid-template-columns: 140px minmax(140px, 1.2fr) minmax(160px, 1fr) minmax(150px, 1fr);
}

@media (max-width: 960px) {
    .bp-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    #view-bill-publications .page-head {
        padding-right: 0;
    }

        #view-bill-publications .page-head .bill-back {
            position: static;
            margin-bottom: 16px;
            display: inline-block;
        }
}

@media (max-width: 720px) {
    .bp-filter-grid {
        grid-template-columns: 1fr;
    }

    .pub-list.pub-list-4col .pub-meta {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* ========== My Account ========== */
#view-my-account .page-body {
    max-width: 1100px;
}

.ma-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ma-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 30px;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
}

    .ma-card::before {
        content: '';
        position: absolute;
        top: 28px;
        left: 0;
        width: 3px;
        height: 26px;
        background: var(--red);
        border-radius: 0 3px 3px 0;
    }

    .ma-card h2 {
        font: 500 22px/1.2 var(--display);
        color: var(--ink);
        letter-spacing: -0.015em;
        margin: 0 0 4px;
    }

.ma-sub {
    font: 400 14px/1.5 var(--sans);
    color: var(--ink-soft);
    margin: 0 0 24px;
}

.ma-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    margin-bottom: 24px;
}

.ma-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

    .ma-field label {
        font: 600 13px/1.3 var(--sans);
        color: var(--ink);
        margin-bottom: 8px;
    }

.ma-input {
    width: 100%;
    height: 44px;
    padding: 0 48px 0 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font: 400 14px/1 var(--sans);
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

    .ma-input:focus {
        outline: 0;
        border-color: var(--red);
        box-shadow: 0 0 0 3px rgba(216, 51, 51, 0.14);
    }

    .ma-input[readonly] {
        background: #FAFBFC;
        color: var(--ink-soft);
        cursor: not-allowed;
    }

        .ma-input[readonly]:focus {
            border-color: var(--line);
            box-shadow: none;
        }

.ma-check {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2F7A54;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 220ms ease, transform 220ms cubic-bezier(.34, 1.2, .64, 1);
    pointer-events: none;
}

    .ma-check svg {
        width: 13px;
        height: 13px;
    }

.ma-field.is-valid .ma-check {
    opacity: 1;
    transform: scale(1);
}

.ma-field.is-readonly .ma-check {
    background: var(--ink-soft);
}

.ma-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.ma-btn-cancel {
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--line);
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    font: 600 13px/1 var(--sans);
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

    .ma-btn-cancel:hover:not(:disabled) {
        background: #F6F3EC;
        border-color: #CBD0D8;
    }

.ma-btn-save {
    background: var(--red);
    color: #fff;
    border: 0;
    padding: 11px 28px;
    border-radius: var(--radius-pill);
    font: 600 13px/1 var(--sans);
    cursor: pointer;
    box-shadow: 0 4px 14px -6px rgba(216, 51, 51, 0.45);
    transition: background 160ms ease, transform 120ms ease, box-shadow 200ms ease, opacity 160ms ease;
}

    .ma-btn-save:hover:not(:disabled) {
        background: #C32929;
        box-shadow: 0 6px 18px -6px rgba(216, 51, 51, 0.55);
    }

    .ma-btn-save:active:not(:disabled) {
        transform: translateY(1px);
    }

    .ma-btn-cancel:disabled,
    .ma-btn-save:disabled {
        opacity: 0.45;
        cursor: not-allowed;
        box-shadow: none;
    }

    .ma-btn-cancel:focus-visible,
    .ma-btn-save:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

/* Delete Account card */
.ma-input-code {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.4em;
    font-weight: 600;
    text-align: center;
    padding-right: 16px;
}

.ma-verify-success {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: #E7F6ED;
    border: 1px solid #C7E3D2;
    color: #2F7A54;
    font: 500 13.5px/1.5 var(--sans);
}

    .ma-verify-success strong {
        color: #245F42;
        font-weight: 700;
    }

.ma-save-toast {
    position: fixed;
    top: 96px;
    right: 24px;
    z-index: 1100;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid #2F7A54;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: 0 10px 30px -18px rgba(15, 17, 21, 0.35);
    font: 500 14px/1.4 var(--sans);
    color: var(--ink);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
}

    .ma-save-toast.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

@media (max-width: 720px) {
    .ma-grid {
        grid-template-columns: 1fr;
    }

    .ma-card {
        padding: 24px 22px;
    }
}

/* ========== Subscription (pricing) page ========== */
#view-subscription .page-body {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

#view-subscription .page-head {
    text-align: center;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

    #view-subscription .page-head .eyebrow {
        display: block;
    }

    #view-subscription .page-head h1 {
        max-width: none;
    }

    #view-subscription .page-head .lede {
        margin-left: auto;
        margin-right: auto;
    }

.pricing-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    align-items: stretch;
}

    .pricing-grid .plan-card {
        flex: 0 1 calc((100% - 44px) / 3);
        min-width: 0;
    }

.plan-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 26px 26px;
    box-shadow: 0 1px 0 rgba(15,17,21,0.02), 0 6px 22px -18px rgba(15,17,21,0.18);
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
    position: relative;
}

    .plan-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 1px 0 rgba(15,17,21,0.02), 0 14px 30px -18px rgba(216,51,51,0.22);
    }

    .plan-card.current {
        border-color: var(--red);
        box-shadow: 0 1px 0 rgba(15,17,21,0.02), 0 14px 34px -18px rgba(216,51,51,0.28);
    }

        .plan-card.current::before {
            content: 'Current Plan';
            position: absolute;
            top: -11px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--red);
            color: #fff;
            font: 600 11px/1 var(--sans);
            letter-spacing: 0.08em;
            text-transform: uppercase;
            padding: 6px 12px;
            border-radius: var(--radius-pill);
        }

    .plan-card h3 {
        font: 600 22px/1.2 var(--display);
        color: var(--ink);
        letter-spacing: -0.02em;
        margin: 0 0 6px;
    }

    .plan-card .plan-desc {
        font: 400 13.5px/1.5 var(--sans);
        color: var(--ink-soft);
        margin: 0 0 22px;
        min-height: 40px;
    }

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 22px;
    padding-bottom: 22px;
}

    .plan-price .amount {
        font: 600 40px/1 var(--display);
        color: var(--red);
        letter-spacing: -0.03em;
    }

    .plan-price .cycle {
        font: 500 14px/1 var(--sans);
        color: var(--ink-soft);
    }

.plan-features {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

    .plan-features li {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        font: 400 13.5px/1.45 var(--sans);
        color: var(--ink);
    }

        .plan-features li svg {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
            color: var(--red);
            margin-top: 1px;
        }

.plan-long-desc {
    font: 400 13.5px/1.55 var(--sans);
    color: var(--ink);
    margin: 0 0 22px;
    flex: 1;
}

.plan-footnote {
    font: 400 12.5px/1.45 var(--sans);
    font-style: italic;
    color: var(--ink-soft);
    margin: 14px 0 0;
    text-align: center;
}

.btn-choose-plan {
    display: block;
    width: 100%;
    background: var(--red);
    color: #fff;
    font: 600 14px/1 var(--sans);
    letter-spacing: 0.01em;
    padding: 13px 18px;
    border: 0;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background 180ms ease, transform 120ms ease;
    margin-top: auto;
}

    .btn-choose-plan:hover {
        background: #C32929;
    }

    .btn-choose-plan:active {
        transform: translateY(1px);
    }

    .btn-choose-plan:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

    .btn-choose-plan.is-current {
        background: #fff;
        color: var(--red);
        border: 1.5px solid var(--red);
        cursor: default;
    }

        .btn-choose-plan.is-current:hover {
            background: var(--red-soft);
        }

.payment-note {
    margin-top: 42px;
    text-align: center;
    padding: 26px 20px;
    border-top: 1px solid var(--line);
}

    .payment-note p {
        font: 500 14px/1.4 var(--sans);
        color: var(--ink-soft);
        margin: 0 0 16px;
        letter-spacing: 0.005em;
    }

    .payment-note strong {
        color: var(--ink);
        font-weight: 700;
    }

.payment-logos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.paypal-logo {
    height: 28px;
    width: auto;
}

/* Pricing responsive */

@media (max-width: 1180px) {
    .pricing-grid .plan-card {
        flex: 0 1 calc((100% - 22px) / 2);
    }

    .plan-card {
        padding: 24px 22px 22px;
    }

        .plan-card h3 {
            font-size: 20px;
        }

    .plan-price .amount {
        font-size: 36px;
    }

    .plan-combined {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

@media (max-width: 700px) {
    .pricing-grid {
        gap: 18px;
    }

        .pricing-grid .plan-card {
            flex: 0 1 100%;
            width: 100%;
        }
}

/* ========== Confirm Modal ========== */
.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

    .confirm-modal.is-open {
        display: flex;
    }

.cm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 17, 21, 0.48);
    backdrop-filter: blur(2px);
    animation: cmFade 180ms ease;
}

.cm-dialog {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 28px 30px 24px;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 24px 60px -20px rgba(15, 17, 21, 0.35);
    animation: cmPop 220ms cubic-bezier(.34,1.2,.64,1);
}

@keyframes cmFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes cmPop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cm-dialog h3 {
    font: 600 22px/1.2 var(--display);
    color: var(--ink);
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.cm-dialog p {
    font: 400 14.5px/1.55 var(--sans);
    color: var(--ink-soft);
    margin: 0 0 22px;
}

    .cm-dialog p strong {
        color: var(--ink);
        font-weight: 600;
    }

.cm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cm-back, .cm-confirm {
    font: 600 14px/1 var(--sans);
    padding: 11px 20px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, transform 120ms ease;
}

.cm-back {
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--line);
}

    .cm-back:hover {
        background: #F6F3EC;
        border-color: #CBD0D8;
    }

    .cm-back:active {
        transform: translateY(1px);
    }

.cm-confirm {
    background: var(--red);
    color: #fff;
    border: 1.5px solid var(--red);
}

    .cm-confirm:hover {
        background: #C32929;
        border-color: #C32929;
    }

    .cm-confirm:active {
        transform: translateY(1px);
    }

    .cm-back:focus-visible, .cm-confirm:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

.cancel-success {
    position: fixed;
    top: 96px;
    right: 24px;
    z-index: 1100;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--red);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: 0 10px 30px -18px rgba(15, 17, 21, 0.35);
    font: 500 14px/1.4 var(--sans);
    color: var(--ink);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
}

    .cancel-success.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

/* ========== Explore (logged-in) – search + filters + categories ========== */
.explore-loggedin {
    display: none;
}

body.is-logged-in .view .explore-loggedin {
    display: block;
}

body.is-logged-in .view .explore-default {
    display: none;
}

.explore-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 22px;
}

.explore-search {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 30px;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

    .explore-search:hover {
        transform: translateY(-2px);
        border-color: rgba(216, 51, 51, 0.25);
        box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 16px 34px -20px rgba(216, 51, 51, 0.22);
    }

    .explore-search::before {
        content: '';
        position: absolute;
        top: 28px;
        left: 0;
        width: 3px;
        height: 28px;
        background: var(--red);
        border-radius: 0 3px 3px 0;
    }

    .explore-search label {
        display: block;
        font: 500 24px/1.2 var(--display);
        color: var(--ink);
        letter-spacing: -0.015em;
        margin-bottom: 18px;
    }

.explore-search-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.explore-search-input {
    flex: 1;
    min-width: 0;
    height: 56px;
    padding: 0 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font: 400 16px/1 var(--sans);
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

    .explore-search-input::placeholder {
        color: #9AA0A8;
    }

    .explore-search-input:focus {
        outline: 0;
        border-color: var(--red);
        box-shadow: 0 0 0 3px rgba(216, 51, 51, 0.14);
    }

.explore-search-btn {
    height: 56px;
    padding: 0 36px;
    background: var(--red);
    color: #fff;
    font: 600 14px/1 var(--sans);
    letter-spacing: 0.02em;
    border: 0;
    border-radius: var(--radius-pill);
    cursor: pointer;
    box-shadow: 0 4px 14px -6px rgba(216, 51, 51, 0.45);
    transition: background 160ms ease, transform 120ms ease, box-shadow 200ms ease;
}

    .explore-search-btn:hover {
        background: #C32929;
        box-shadow: 0 6px 18px -6px rgba(216, 51, 51, 0.55);
    }

    .explore-search-btn:active {
        transform: translateY(1px);
    }

    .explore-search-btn:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

.explore-adv-toggle {
    background: none;
    border: 0;
    padding: 4px 0 0;
    font: 600 13px/1.3 var(--sans);
    color: var(--ink-soft);
    cursor: pointer;
    text-decoration: none;
    transition: color 160ms ease;
}

    .explore-adv-toggle:hover {
        color: var(--red);
    }

    .explore-adv-toggle .caret {
        margin-left: 4px;
        font-size: 11px;
        display: inline-block;
        transition: transform 220ms ease;
    }

    .explore-adv-toggle[aria-expanded="true"] .caret {
        transform: rotate(180deg);
    }

.explore-news {
    display: flex;
    flex-direction: column;
}

    .explore-news h3 {
        font: 500 20px/1.2 var(--display);
        color: var(--ink);
        letter-spacing: -0.015em;
        margin: 0 0 12px;
    }

    .explore-news p {
        font: 400 14px/1.6 var(--sans);
        color: var(--ink-soft);
        margin: 0 0 16px;
        flex: 1;
    }

    .explore-news a {
        align-self: flex-start;
        font: 600 13px/1 var(--sans);
        color: var(--red);
        text-decoration: none;
        transition: color 160ms ease;
    }

        .explore-news a:hover {
            color: #C32929;
            text-decoration: underline;
        }

/* Advanced search panel */
.explore-advanced {
    display: none;
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px 28px 22px;
    margin-bottom: 22px;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
}

    .explore-advanced.is-open {
        display: block;
        animation: advFade 260ms ease;
    }

@keyframes advFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.explore-advanced::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    width: 3px;
    height: 24px;
    background: var(--red);
    border-radius: 0 3px 3px 0;
}

.explore-advanced h3 {
    font: 500 18px/1.2 var(--display);
    color: var(--ink);
    letter-spacing: -0.01em;
    margin: 0 0 16px;
}

.adv-all-fields {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.adv-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
}

.adv-icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink-soft);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

    .adv-icon-btn:hover {
        background: var(--red-soft);
        color: var(--red);
        border-color: var(--red);
    }

    .adv-icon-btn svg {
        width: 16px;
        height: 16px;
    }

.adv-tabs {
    display: flex;
    gap: 18px;
    margin-top: 10px;
}

.adv-tab {
    background: none;
    border: 0;
    padding: 3px 0;
    font: 600 13px/1 var(--sans);
    letter-spacing: 0.02em;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: border-color 160ms ease, opacity 160ms ease;
}

    .adv-tab.include {
        color: #2F7A54;
    }

    .adv-tab.exclude {
        color: var(--red);
    }

    .adv-tab.active {
        border-bottom-color: currentColor;
    }

    .adv-tab:not(.active) {
        opacity: 0.72;
    }

    .adv-tab:hover {
        opacity: 1;
    }

    .adv-tab:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: 3px;
        border-radius: 2px;
    }

.adv-match-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.adv-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 18px;
    margin-bottom: 20px;
}

.adv-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    z-index: 1;
}

    .adv-field:has(.pio-dropdown.is-open) {
        z-index: 100;
    }

    .adv-field label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font: 600 12px/1.3 var(--sans);
        color: var(--ink);
        letter-spacing: 0.02em;
        margin-bottom: 6px;
    }

    .adv-field .info {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #0F1115;
        color: #fff;
        font: 700 9px/14px var(--sans);
        text-align: center;
        cursor: help;
    }

.adv-input,
.adv-select {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font: 400 13.5px/1 var(--sans);
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

    .adv-input:focus,
    .adv-select:focus {
        outline: 0;
        border-color: var(--red);
        box-shadow: 0 0 0 3px rgba(216, 51, 51, 0.14);
    }

    .adv-input::placeholder {
        color: #9AA0A8;
    }

.adv-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%233A3F47' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='m1 1.5 5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 38px;
    cursor: pointer;
}

.adv-input[type="date"] {
    padding-right: 10px;
    font-family: var(--sans);
}

.adv-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 20px;
    margin: 20px 0px;
}

.adv-btn-clear {
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--line);
    padding: 11px 24px;
    border-radius: var(--radius-pill);
    font: 600 13px/1 var(--sans);
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

    .adv-btn-clear:hover {
        background: #F6F3EC;
        border-color: #CBD0D8;
    }

.adv-btn-search {
    background: var(--red);
    color: #fff;
    padding: 11px 30px;
    border-radius: var(--radius-pill);
    border: 0;
    font: 600 13px/1 var(--sans);
    cursor: pointer;
    box-shadow: 0 4px 14px -6px rgba(216, 51, 51, 0.45);
    transition: background 160ms ease, transform 120ms ease, box-shadow 200ms ease;
}

    .adv-btn-search:hover {
        background: #C32929;
        box-shadow: 0 6px 18px -6px rgba(216, 51, 51, 0.55);
    }

    .adv-btn-search:active {
        transform: translateY(1px);
    }

    .adv-btn-clear:focus-visible,
    .adv-btn-search:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

@media (max-width: 1100px) {
    .adv-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .adv-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .adv-match-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .adv-grid {
        grid-template-columns: 1fr;
    }
}

.explore-filters {
    display: grid;
    grid-template-columns: auto repeat(3, 1fr);
    gap: 14px;
    align-items: end;
    margin-bottom: 26px;
}

.explore-filter-toggle {
    display: flex;
    align-items: end;
}

    .explore-filter-toggle .btn-all-filters {
        height: 40px;
        padding: 0 18px;
        align-self: end;
    }

.explore-filter label {
    display: block;
    font: 600 12px/1.3 var(--sans);
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.explore-filter select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #D6DAE0;
    border-radius: 4px;
    font: 400 14px/1 var(--sans);
    color: var(--ink);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%233A3F47' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='m1 1.5 5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

    .explore-filter select:focus {
        outline: 0;
        border-color: var(--red);
        box-shadow: 0 0 0 3px rgba(216, 51, 51, 0.14);
    }

.explore-categories {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.explore-categories-head {
    background: var(--red);
    color: #fff;
    padding: 12px 18px;
    font: 700 14px/1.3 var(--sans);
    letter-spacing: 0.01em;
}

.explore-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .explore-categories-list li + li {
        border-top: 1px solid var(--line);
    }

    .explore-categories-list a {
        display: block;
        padding: 12px 18px;
        text-decoration: none;
        transition: background 140ms ease;
    }

        .explore-categories-list a:hover {
            background: var(--red-soft);
        }

    .explore-categories-list .cat-name {
        font: 600 14px/1.3 var(--sans);
        color: var(--ink);
        margin-bottom: 3px;
    }

    .explore-categories-list .cat-range {
        font: 400 12px/1.3 var(--sans);
        color: var(--red);
    }

/* Publications list (shown when a subcategory is selected) */
.explore-publications {
    display: none;
}

    .explore-publications.is-active {
        display: block;
    }

.explore-publications-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

    .explore-publications-head h2 {
        font: 500 20px/1.2 var(--display);
        color: var(--ink);
        margin: 0;
        letter-spacing: -0.01em;
    }

        .explore-publications-head h2 em {
            color: var(--red);
            font-style: italic;
            font-weight: 400;
        }

    .explore-publications-head .count {
        font: 500 13px/1.3 var(--sans);
        color: var(--ink-soft);
    }

        .explore-publications-head .count strong {
            color: var(--ink);
            font-weight: 700;
        }

.pub-list {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.pub-row {
    display: block;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
    transition: background 140ms ease;
}

    .pub-row:first-child {
        border-top: 0;
    }

    .pub-row:hover {
        background: #FBFAF6;
    }

        .pub-row:hover .pub-title {
            color: var(--red);
        }

    .pub-row:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: -2px;
        background: var(--red-soft);
    }

.pub-title {
    font: 600 14px/1.45 var(--sans);
    color: var(--ink);
    margin-bottom: 6px;
    transition: color 140ms ease;
}

.pub-meta {
    display: grid;
    grid-template-columns: 160px minmax(100px, 1fr) minmax(180px, 1.4fr);
    gap: 12px;
    font: 400 12.5px/1.4 var(--sans);
    color: var(--ink-soft);
}

    .pub-meta .pub-ref {
        color: var(--red);
        font-weight: 600;
    }

.pub-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
    flex-wrap: wrap;
}

    .pub-pagination .page-btn {
        min-width: 34px;
        height: 34px;
        padding: 0 10px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 6px;
        font: 600 13px/1 var(--sans);
        color: var(--ink);
        cursor: pointer;
        transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
    }

        .pub-pagination .page-btn:hover:not(:disabled):not(.active) {
            background: var(--red-soft);
            border-color: var(--red);
            color: var(--red);
        }

        .pub-pagination .page-btn.active {
            background: var(--red);
            border-color: var(--red);
            color: #fff;
            cursor: default;
        }

        .pub-pagination .page-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .pub-pagination .page-btn:focus-visible {
            outline: 2px solid var(--red);
            outline-offset: 2px;
        }

    .pub-pagination .page-ellipsis {
        padding: 0 4px;
        color: var(--ink-soft);
        font-size: 13px;
    }

@media (max-width: 720px) {
    .pub-meta {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* ========== Bill / publication detail view ========== */
#view-bill-detail .page-body {
    max-width: 1240px;
}

.bill-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.bill-title {
    font: 500 28px/1.25 var(--display);
    color: var(--ink);
    letter-spacing: -0.015em;
    margin: 0;
    max-width: 960px;
}

    .bill-title em {
        color: var(--red);
        font-style: italic;
        font-weight: 400;
    }

.bill-back {
    flex-shrink: 0;
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--line);
    padding: 9px 20px;
    border-radius: var(--radius-pill);
    font: 600 13px/1 var(--sans);
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

    .bill-back:hover {
        background: #F6F3EC;
        border-color: #CBD0D8;
        color: var(--red);
    }

    .bill-back:active {
        transform: translateY(1px);
    }

    .bill-back:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

.bill-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
}

.bill-tab {
    background: none;
    border: 0;
    padding: 12px 22px;
    font: 600 14px/1 var(--sans);
    color: var(--ink-soft);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 160ms ease, border-color 160ms ease;
}

    .bill-tab.active {
        color: var(--red);
        border-bottom-color: var(--red);
    }

    .bill-tab:hover:not(.active) {
        color: var(--ink);
    }

    .bill-tab:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: -2px;
        border-radius: 4px;
    }

.bill-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px 220px auto;
    gap: 12px;
    margin-bottom: 26px;
}

.bill-input,
.bill-select {
    height: 42px;
    padding: 0 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font: 400 14px/1 var(--sans);
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

    .bill-input:focus,
    .bill-select:focus {
        outline: 0;
        border-color: var(--red);
        box-shadow: 0 0 0 3px rgba(216, 51, 51, 0.14);
    }

.bill-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%233A3F47' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='m1 1.5 5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 38px;
    cursor: pointer;
}

.bill-scrolltop {
    background: var(--red);
    color: #fff;
    padding: 0 26px;
    height: 42px;
    border: 0;
    border-radius: var(--radius-pill);
    font: 600 13px/1 var(--sans);
    cursor: pointer;
    box-shadow: 0 4px 14px -6px rgba(216, 51, 51, 0.45);
    transition: background 160ms ease, transform 120ms ease, box-shadow 200ms ease;
}

    .bill-scrolltop:hover {
        background: #C32929;
        box-shadow: 0 6px 18px -6px rgba(216, 51, 51, 0.55);
    }

    .bill-scrolltop:active {
        transform: translateY(1px);
    }

    .bill-scrolltop:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

.bill-body {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.bill-toc {
    position: sticky;
    top: calc(var(--header-h, 76px) + 20px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
}

.toc-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--red);
    color: #fff;
    padding: 12px 16px;
    font: 600 14px/1.3 var(--sans);
}

    .toc-head svg {
        width: 16px;
        height: 16px;
    }

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 680px;
    overflow-y: auto;
}

.toc-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 4px 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background 140ms ease, color 140ms ease;
}

    .toc-item:last-child {
        border-bottom: 0;
    }

    .toc-item:hover {
        background: var(--red-soft);
    }

    .toc-item.active {
        background: var(--red);
        color: #fff;
    }

.toc-icon {
    grid-row: span 2;
    align-self: start;
    margin-top: 2px;
    color: var(--red);
    display: block;
}

    .toc-icon svg {
        width: 14px;
        height: 14px;
    }

.toc-item.active .toc-icon {
    color: #fff;
}

.toc-text {
    font: 600 13px/1.35 var(--sans);
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.toc-page {
    grid-column: 2;
    font: 500 12px/1 var(--sans);
    color: var(--ink-soft);
    margin-top: 2px;
}

.toc-item.active .toc-page {
    color: rgba(255, 255, 255, 0.85);
}

.toc-item:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: -2px;
}

.bill-preview {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
}

.bill-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    font: 400 12px/1.4 var(--sans);
    color: var(--ink-soft);
}

    .bill-preview-head .ref {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.bill-dl-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 0;
    background: none;
    color: var(--ink-soft);
    cursor: pointer;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 160ms ease, color 160ms ease;
}

    .bill-dl-btn:hover {
        background: var(--red-soft);
        color: var(--red);
    }

    .bill-dl-btn svg {
        width: 18px;
        height: 18px;
    }

.bill-preview-image {
    padding: 20px;
    background: #FAFBFC;
}

    .bill-preview-image img {
        display: block;
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
        border: 1px solid var(--line);
        box-shadow: 0 10px 30px -14px rgba(15, 17, 21, 0.25);
        border-radius: 4px;
    }

@media (max-width: 900px) {
    .bill-body {
        grid-template-columns: 1fr;
    }

    .bill-toc {
        position: static;
    }

    .toc-list {
        max-height: 320px;
    }

    .bill-filter {
        grid-template-columns: 1fr 1fr;
    }

        .bill-filter .bill-input {
            grid-column: 1 / -1;
        }

    .bill-scrolltop {
        grid-column: 1 / -1;
    }
}

/* Bill detail tab panels */
.bill-panel {
    display: none;
}

    .bill-panel.is-active {
        display: block;
    }

/* Download panel */
.bill-download-panel {
    display: grid;
    grid-template-columns: 220px 1fr minmax(300px, 1.2fr);
    gap: 48px;
    align-items: center;
    padding: 36px 8px;
}

.dl-preview {
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 14px 34px -16px rgba(15, 17, 21, 0.28);
}

    .dl-preview img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 2px;
    }

.dl-action {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dl-btn-primary {
    background: var(--red);
    color: #fff;
    font: 700 15px/1.1 var(--sans);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 18px 28px;
    border: 0;
    border-radius: var(--radius-pill);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 24px -10px rgba(216, 51, 51, 0.55);
    transition: background 160ms ease, transform 120ms ease, box-shadow 200ms ease;
}

    .dl-btn-primary:hover {
        background: #C32929;
        box-shadow: 0 14px 30px -10px rgba(216, 51, 51, 0.65);
    }

    .dl-btn-primary:active {
        transform: translateY(1px);
    }

    .dl-btn-primary:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 3px;
    }

    .dl-btn-primary .size {
        font-weight: 600;
        letter-spacing: 0.02em;
        opacity: 0.92;
    }

    .dl-btn-primary svg {
        width: 20px;
        height: 20px;
    }

.dl-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 22px;
    row-gap: 12px;
    margin: 0;
}

    .dl-meta dt {
        font: 600 14px/1.4 var(--sans);
        color: var(--ink);
        text-align: right;
        letter-spacing: -0.005em;
    }

    .dl-meta dd {
        font: 500 14px/1.4 var(--sans);
        color: var(--red);
        margin: 0;
    }

/* Associated Papers panel */
.bill-related-panel {
    padding: 6px 0 0;
    max-width: 750px;
}

.bill-related-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

    .bill-related-head h2 {
        font: 500 20px/1.2 var(--display);
        color: var(--ink);
        letter-spacing: -0.01em;
        margin: 0;
    }

    .bill-related-head .count {
        font: 500 13px/1.3 var(--sans);
        color: var(--ink-soft);
    }

        .bill-related-head .count strong {
            color: var(--ink);
            font-weight: 700;
        }

@media (max-width: 900px) {
    .bill-download-panel {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .dl-preview {
        max-width: 240px;
        margin: 0 auto;
    }

    .dl-meta {
        text-align: left;
    }
}

/* Explore widgets after pagination */
.explore-widgets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.explore-widget {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

    .explore-widget:hover {
        transform: translateY(-2px);
        border-color: rgba(216, 51, 51, 0.25);
        box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 16px 34px -20px rgba(216, 51, 51, 0.22);
    }

    .explore-widget::before {
        content: '';
        position: absolute;
        top: 22px;
        left: 0;
        width: 3px;
        height: 24px;
        background: var(--red);
        border-radius: 0 3px 3px 0;
    }

    .explore-widget h3 {
        font: 500 20px/1.2 var(--display);
        color: var(--ink);
        letter-spacing: -0.015em;
        margin: 0 0 12px;
    }

    .explore-widget p {
        font: 400 14px/1.6 var(--sans);
        color: var(--ink-soft);
        margin: 0 0 20px;
        flex: 1;
    }

    .explore-widget .btn-widget {
        align-self: flex-start;
        background: var(--red);
        color: #fff;
        font: 600 13px/1 var(--sans);
        letter-spacing: 0.005em;
        padding: 11px 22px;
        border: 0;
        border-radius: var(--radius-pill);
        cursor: pointer;
        text-decoration: none;
        transition: background 160ms ease, transform 120ms ease, box-shadow 200ms ease;
        box-shadow: 0 4px 14px -6px rgba(216, 51, 51, 0.45);
    }

        .explore-widget .btn-widget:hover {
            background: #C32929;
            box-shadow: 0 6px 18px -6px rgba(216, 51, 51, 0.55);
        }

        .explore-widget .btn-widget:active {
            transform: translateY(1px);
        }

        .explore-widget .btn-widget:focus-visible {
            outline: 2px solid var(--red);
            outline-offset: 2px;
        }

@media (max-width: 720px) {
    .explore-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .explore-top {
        grid-template-columns: 1fr;
    }

    .explore-filters {
        grid-template-columns: 1fr;
    }
}

/* ===== Explore views (logged-in) — vertical Advanced Search rail + results on the right ===== */
.explore-loggedin .explore-adv-toggle {
    display: none;
}

.explore-loggedin .page-head {
    padding-top: 32px;
    padding-bottom: 8px;
    max-width: none;
}

    .explore-loggedin .page-head .lede {
        max-width: 1100px;
    }

.explore-loggedin .page-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "top"
        "filters"
        "advanced"
        "main";
    row-gap: 18px;
    column-gap: 0;
    align-items: start;
    max-width: none;
    padding-top: 12px;
}

.explore-loggedin .explore-advanced-wrap {
    grid-area: advanced;
    align-self: stretch;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 480ms cubic-bezier(.22, .8, .22, 1);
}

.explore-loggedin .page-body.is-filters-open .explore-advanced-wrap {
    max-height: 1200px;
}

.explore-loggedin .explore-top {
    grid-area: top;
}

.explore-loggedin .explore-toolbar {
    grid-area: toolbar;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-all-filters {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid var(--ink);
    background: #fff;
    border-radius: var(--radius-pill);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

    .btn-all-filters svg {
        width: 15px;
        height: 15px;
        stroke: currentColor;
        flex-shrink: 0;
    }

    .btn-all-filters:hover {
        background: var(--ink);
        color: #fff;
    }

    .btn-all-filters:active {
        transform: translateY(1px);
    }

    .btn-all-filters:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px var(--red-soft);
    }

    .btn-all-filters[aria-expanded="true"] {
        background: var(--ink);
        color: #fff;
    }

.explore-loggedin .explore-advanced {
    display: block;
    position: relative;
    width: 100%;
    margin: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px 28px 22px;
    box-shadow: 0 1px 0 rgba(15, 17, 21, 0.02), 0 8px 24px -20px rgba(15, 17, 21, 0.14);
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 200ms ease;
}

    .explore-loggedin .explore-advanced:hover,
    .explore-loggedin .explore-advanced:focus-within {
        scrollbar-color: rgba(15, 17, 21, 0.25) transparent;
    }

    .explore-loggedin .explore-advanced::before {
        display: none;
    }

    .explore-loggedin .explore-advanced .adv-close {
        position: absolute;
        top: 14px;
        right: 14px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 1px solid var(--line);
        background: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: border-color .18s ease, background .18s ease, color .18s ease, opacity 200ms ease;
        color: var(--ink);
    }

        .explore-loggedin .explore-advanced .adv-close:hover {
            border-color: var(--ink);
            background: var(--ink);
            color: #fff;
        }

        .explore-loggedin .explore-advanced .adv-close:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px var(--red-soft);
        }

        .explore-loggedin .explore-advanced .adv-close svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
        }

    .explore-loggedin .explore-advanced > h3 {
        padding-right: 44px;
    }
    /* Cascade fade-in for panel contents — only when filters are open */
    .explore-loggedin .explore-advanced > h3,
    .explore-loggedin .explore-advanced > .adv-close,
    .explore-loggedin .explore-advanced > .adv-all-fields,
    .explore-loggedin .explore-advanced > .adv-grid > .adv-field,
    .explore-loggedin .explore-advanced > .adv-actions {
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 280ms ease, transform 280ms ease;
    }

.explore-loggedin .page-body.is-filters-open .explore-advanced > h3,
.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-close,
.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-all-fields,
.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-grid > .adv-field,
.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-actions {
    opacity: 1;
    transform: translateY(0);
}

.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-close {
    transition-delay: 60ms;
}

.explore-loggedin .page-body.is-filters-open .explore-advanced > h3 {
    transition-delay: 100ms;
}

.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-all-fields {
    transition-delay: 160ms;
}

.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-grid > .adv-field:nth-child(1) {
    transition-delay: 220ms;
}

.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-grid > .adv-field:nth-child(2) {
    transition-delay: 260ms;
}

.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-grid > .adv-field:nth-child(3) {
    transition-delay: 300ms;
}

.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-grid > .adv-field:nth-child(4) {
    transition-delay: 340ms;
}

.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-grid > .adv-field:nth-child(5) {
    transition-delay: 380ms;
}

.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-grid > .adv-field:nth-child(6) {
    transition-delay: 420ms;
}

.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-grid > .adv-field:nth-child(7) {
    transition-delay: 460ms;
}

.explore-loggedin .page-body.is-filters-open .explore-advanced > .adv-actions {
    transition-delay: 500ms;
}

.explore-loggedin .explore-advanced::-webkit-scrollbar {
    width: 4px;
}

.explore-loggedin .explore-advanced::-webkit-scrollbar-button,
.explore-loggedin .explore-advanced::-webkit-scrollbar-button:single-button,
.explore-loggedin .explore-advanced::-webkit-scrollbar-button:double-button,
.explore-loggedin .explore-advanced::-webkit-scrollbar-button:start,
.explore-loggedin .explore-advanced::-webkit-scrollbar-button:end,
.explore-loggedin .explore-advanced::-webkit-scrollbar-button:vertical,
.explore-loggedin .explore-advanced::-webkit-scrollbar-button:horizontal,
.explore-loggedin .explore-advanced::-webkit-scrollbar-button:vertical:start:decrement,
.explore-loggedin .explore-advanced::-webkit-scrollbar-button:vertical:end:increment,
.explore-loggedin .explore-advanced::-webkit-scrollbar-button:horizontal:start:decrement,
.explore-loggedin .explore-advanced::-webkit-scrollbar-button:horizontal:end:increment {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    background: transparent !important;
    background-image: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.explore-loggedin .explore-advanced::-webkit-scrollbar-corner {
    background: transparent;
    display: none;
}

.explore-loggedin .explore-advanced::-webkit-scrollbar-track {
    background: transparent;
}

.explore-loggedin .explore-advanced::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 2px;
    transition: background 200ms ease;
}

.explore-loggedin .explore-advanced:hover::-webkit-scrollbar-thumb,
.explore-loggedin .explore-advanced:focus-within::-webkit-scrollbar-thumb {
    background: rgba(15, 17, 21, 0.25);
}

.explore-loggedin .explore-advanced::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 17, 21, 0.4);
}

.explore-loggedin .explore-filters {
    grid-area: filters;
    margin-bottom: 0;
    position: sticky;
    top: var(--header-h);
    z-index: 20;
    background: var(--bg);
    margin-left: calc(var(--side-pad) * -1);
    margin-right: calc(var(--side-pad) * -1);
    padding: 14px var(--side-pad);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 6px 16px -14px rgba(15, 17, 21, 0.18);
}

.explore-loggedin .explore-categories,
.explore-loggedin .explore-publications {
    grid-area: main;
}

/* Cross-search: hide categories list, always show publications */
.explore-loggedin[data-explore="all-papers"] .explore-categories {
    display: none;
}

.explore-loggedin[data-explore="all-papers"] .explore-publications {
    display: block;
}

.explore-loggedin .adv-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 18px;
}

.explore-loggedin .adv-match-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 1100px) {
    .explore-loggedin .adv-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .explore-loggedin .adv-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .explore-loggedin .explore-advanced {
        max-width: 100%;
        padding: 20px 18px 18px;
    }

    .explore-loggedin .adv-grid {
        grid-template-columns: 1fr;
    }

    .explore-loggedin .adv-match-row {
        grid-template-columns: 1fr;
    }
}


.has-submenu > .submenu-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.has-submenu > label.sidebar-link {
    cursor: pointer;
    user-select: none;
}

.has-submenu > .submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 260ms ease;
}

.has-submenu > .submenu-toggle:checked ~ .submenu {
    max-height: 2000px;
}

.has-submenu > .submenu-toggle:checked + .sidebar-link .chevron {
    transform: rotate(90deg);
    opacity: 0.85;
}

.p20 {
    padding: 20px;
}

html {
    scroll-padding-top: 80px;
}


.hide {
    display: none;
}



/* loading bar */

.pio-loader {
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef1f5;
    position: relative;
    opacity: 0;
    display: none;
    transition: opacity .18s ease, visibility .18s;
}

.pio-loader-visible {
    opacity: 1;
    display: block;
}

.pio-loader-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 35%;
    border-radius: inherit;
    background: linear-gradient( 90deg, #d83333 0%, #f05a5a 50%, #d83333 100% );
    animation: pio-loader-slide 1.15s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(216, 51, 51, .35);
}

@keyframes pio-loader-slide {
    0% {
        transform: translateX(-110%);
    }

    50% {
        width: 45%;
    }

    100% {
        transform: translateX(300%);
    }
}


.align-items-center {
    align-items: center;
}

.error-page {
    max-width: 900px;
    margin: 0 auto;
}

.error-card {
    position: relative;
    padding: 42px;
    background: #fff;
    border: 1px solid var(--line, #E5E7EB);
    border-radius: var(--radius-lg, 20px);
    box-shadow: 0 1px 0 rgba(15,17,21,.02), 0 18px 48px -32px rgba(15,17,21,.26);
    text-align: center;
}

    .error-card::before {
        content: '';
        position: absolute;
        top: 34px;
        left: 0;
        width: 3px;
        height: 34px;
        background: var(--red, #d83333);
        border-radius: 0 3px 3px 0;
    }

.error-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 22px;
    background: var(--red-soft, #FEF2F3);
    color: var(--red, #d83333);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .error-icon svg {
        width: 34px;
        height: 34px;
    }

.error-card h1 {
    margin: 0 0 16px;
    font-family: var(--display, Georgia, serif);
    font-size: 34px;
    font-weight: 500;
    line-height: 1.15;
    color: var(--ink, #0F1115);
}

.error-card p {
    margin: 0 auto 10px;
    max-width: 680px;
    color: var(--ink-soft, #3A3F47);
    font-size: 17px;
    line-height: 1.65;
}

.error-card a {
    font-weight: 700;
}

.error-actions {
    margin-top: 30px;
}

@media (max-width: 620px) {
    .error-card {
        padding: 30px 22px;
    }

        .error-card h1 {
            font-size: 28px;
        }

    .error-actions .btn {
        width: 100%;
    }
}


/* =========================================================
   Site Map
   ========================================================= */

.sitemap {
    max-width: 1100px;
}

    .sitemap > ul,
    .sitemap ul {
        list-style: none;
        margin: 0;
        padding-left: 28px;
        position: relative;
    }

    .sitemap > ul {
        padding-left: 0;
    }

    .sitemap li {
        position: relative;
        margin: 4px 0;
        padding: 4px 0 4px 18px;
    }

    /* вертикальная линия */

    .sitemap ul::before {
        content: "";
        position: absolute;
        left: 9px;
        top: 0;
        bottom: 10px;
        width: 1px;
        background: #d9dde3;
    }

    /* горизонтальная линия */

    .sitemap li::before {
        content: "";
        position: absolute;
        left: -1px;
        top: 17px;
        width: 12px;
        height: 1px;
        background: #d9dde3;
    }

    /* корень */

    .sitemap > ul::before,
    .sitemap > ul > li::before {
        display: none;
    }

    /* ссылки */

    .sitemap a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 36px;
        padding: 0 14px;
        border-radius: 10px;
        color: var(--ink);
        text-decoration: none;
        transition: .15s;
    }

        /* иконка */

        .sitemap a::before {
            content: "▸";
            color: var(--red);
            font-size: 11px;
        }

        /* hover */

        .sitemap a:hover {
            background: var(--red-soft);
            color: var(--red);
        }

    /* первый уровень */

    .sitemap > ul > li > a {
        font-weight: 700;
        font-size: 17px;
    }

    /* второй */

    .sitemap ul ul > li > a {
        font-size: 15px;
    }

    /* третий */

    .sitemap ul ul ul > li > a {
        color: var(--ink-soft);
    }

/* ============================================================
   Basket - responsive
   ============================================================ */

.basket-item-text {
    min-width: 0;
}

    .basket-item-text h4 {
        overflow-wrap: break-word;
    }

.basket-mobile-type {
    display: none;
}


/* ------------------------------------------------------------
   Mobile
   ------------------------------------------------------------ */

@media (max-width: 700px) {

    /*
     * Desktop headings are no longer useful:
     * each value gets its own data-label.
     */
    .basket-row-head {
        display: none !important;
    }


    /*
     * ITEM
     *
     * First row: title
     * Second row: Type | Qty | Price | Remove
     */
    .basket-row:not(.basket-row-head) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
        gap: 0;
        padding: 18px 16px;
        align-items: stretch;
    }


        /* Title takes the entire first row */

        .basket-row:not(.basket-row-head) > .bc-title {
            grid-column: 1 / -1;
            min-width: 0;
            padding: 0 0 16px;
            border-bottom: 1px solid var(--line, #E5E7EB);
        }


        /* Four equal cells */

        .basket-row:not(.basket-row-head) > .bc-actions-print,
        .basket-row:not(.basket-row-head) > .bc-qty,
        .basket-row:not(.basket-row-head) > .bc-price,
        .basket-row:not(.basket-row-head) > .bc-remove {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            min-width: 0;
            padding: 13px 5px 0;
            text-align: center;
        }


    /*
     * data-label
     */

    .basket-row [data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 7px;
        color: var(--muted, #6B7280);
        font-size: 9px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: .08em;
        text-transform: uppercase;
    }


    /* Vertical separators make the four cells easier to scan */

    .basket-row:not(.basket-row-head) > .bc-qty,
    .basket-row:not(.basket-row-head) > .bc-price,
    .basket-row:not(.basket-row-head) > .bc-remove {
        border-left: 1px solid var(--line, #E5E7EB);
    }


    /* --------------------------------------------------------
       Title
       -------------------------------------------------------- */

    .basket-item-title {
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 13px;
        align-items: start;
    }

    .basket-item-cover {
        width: 58px;
        min-width: 58px;
    }

        .basket-item-cover img {
            display: block;
            width: 100%;
            height: auto;
        }

    .basket-item-text {
        min-width: 0;
    }

        .basket-item-text h4 {
            margin: 0 0 5px;
            font-size: 15px;
            line-height: 1.35;
            overflow-wrap: anywhere;
        }

        .basket-item-text .meta {
            margin: 0;
            font-size: 12px;
            line-height: 1.4;
        }


    /* --------------------------------------------------------
       Type
       -------------------------------------------------------- */

    .basket-mobile-value {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        min-width: 0;
    }

    .basket-mobile-type {
        display: block;
        max-width: 100%;
        color: var(--ink-soft, #3A3F47);
        font-size: 10px;
        font-weight: 600;
        white-space: nowrap;
    }

    /* --------------------------------------------------------
       Quantity
       -------------------------------------------------------- */

    .basket-qty-input {
        width: 46px !important;
        max-width: 100%;
        text-align: center;
    }

    .basket-qty-static {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }


    /* --------------------------------------------------------
       Price
       -------------------------------------------------------- */

    .bc-price {
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
    }


    /* --------------------------------------------------------
       Remove
       -------------------------------------------------------- */

    .bc-remove .icon-btn {
        margin: 0 auto;
    }


    /* --------------------------------------------------------
       Empty basket must NOT become a 4-column grid
       -------------------------------------------------------- */

    .basket-row.basket-empty {
        display: block;
    }

        .basket-row.basket-empty > .bc-title {
            padding-bottom: 0;
            border-bottom: 0;
        }


    /* --------------------------------------------------------
       Totals
       -------------------------------------------------------- */

    .basket-totals {
        margin-top: 0;
    }

        .basket-totals .t-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 12px;
            align-items: center;
        }

        .basket-totals .t-qty {
            display: none;
        }

        .basket-totals .t-value {
            text-align: right;
            white-space: nowrap;
        }
}


/* ------------------------------------------------------------
   Really small phones
   ------------------------------------------------------------ */

@media (max-width: 420px) {

    .basket-row:not(.basket-row-head) {
        padding: 15px 10px;
    }

        .basket-row:not(.basket-row-head) > .bc-actions-print,
        .basket-row:not(.basket-row-head) > .bc-qty,
        .basket-row:not(.basket-row-head) > .bc-price,
        .basket-row:not(.basket-row-head) > .bc-remove {
            padding-right: 2px;
            padding-left: 2px;
        }

    .basket-item-title {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 10px;
    }

    .basket-item-cover {
        width: 50px;
        min-width: 50px;
    }

    .basket-mobile-type {
        font-size: 9px;
    }

    .bc-price {
        font-size: 12px;
    }

    .basket-qty-input {
        width: 40px !important;
    }
}


.sidebar-link:hover,
.submenu-toggle:checked + .sidebar-link {
    background: #f1f1f1;
    color: var(--ink);
}

    .sidebar-link:hover .icon,
    .submenu-toggle:checked + .sidebar-link .icon {
        color: var(--ink);
    }

.header-welcome {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--ink, #0F1115);
}

.header-welcome-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid var(--line, #E5E7EB);
    border-radius: 50%;
    background: var(--bg-soft, #FAFAF7);
    color: var(--red, #d83333);
}

    .header-welcome-icon svg {
        width: 17px;
        height: 17px;
    }

.header-welcome-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.header-welcome-label {
    margin-bottom: 2px;
    color: var(--muted, #6B7280);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.header-welcome-user {
    overflow: hidden;
    max-width: 320px;
    color: var(--ink, #0F1115);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .header-welcome-user {
        max-width: 180px;
    }
}

@media (max-width: 700px) {
    .header-welcome-text {
        display: none;
    }

    .header-welcome-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }
}

.layout,
.main-content,
.page-body {
    min-width: 0;
}

.main-content {
    overflow-x: clip;
}

.page-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.sidebar-collapsed .page-body {
    padding-top: 64px;
}

@media (max-width: 900px) {
    body.sidebar-collapsed .page-body {
        padding-top: 0px;
    }
}

/* ==========================================================================
   KENDO UI — PIO NEW THEME OVERRIDES
   Keep all Kendo-specific overrides together in this section.
   ========================================================================== */

/* =========================================================
   1. Shared controls — DropDown / ComboBox / DatePicker / MultiSelect
   ========================================================= */

.k-dropdown,
.k-combobox,
.k-datepicker,
.k-multiselect,
.k-widget.k-dropdown,
.k-widget.k-combobox,
.k-widget.k-datepicker,
.k-widget.k-multiselect {
    /*width: 100%;*/
    box-shadow: none !important;
    background: white;
}

/* wrappers */
.k-dropdown-wrap,
.k-picker-wrap,
.k-numeric-wrap {
    min-height: 42px !important;
    border: 1px solid var(--line, #E5E7EB) !important;
    border-radius: 12px !important;
    background: #fff !important;
    background-image: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

    /* dropdown focus */
    .k-dropdown-wrap.k-state-focused,
    .k-dropdown-wrap.k-state-active,
    .k-dropdown-wrap.k-state-border-down,
    .k-picker-wrap.k-state-focused,
    .k-picker-wrap.k-state-active {
        border-color: var(--red, #d83333) !important;
        box-shadow: 0 0 0 4px rgba(216, 51, 51, .12) !important;
        background-image: none !important;
    }

    /* no text selection in dropdown closed value */
    .k-dropdown-wrap,
    .k-dropdown-wrap .k-input,
    .k-picker-wrap,
    .k-picker-wrap .k-input,
    .k-combobox .k-input,
    .k-datepicker .k-input {
        user-select: none;
    }

        .k-dropdown-wrap .k-input,
        .k-picker-wrap .k-input,
        .k-combobox .k-input,
        .k-datepicker .k-input {
            height: 40px !important;
            line-height: 40px !important;
            padding: 0 0 !important;
            color: var(--ink, #0F1115) !important;
            background: transparent !important;
            box-sizing: border-box !important;
        }

.k-select {
    border-left: 0 !important;
    background: transparent !important;
    background-image: none !important;
    color: var(--ink, #0F1115) !important;
}

.k-dropdown {
    height: 42px;
    max-height: 42px;
}

/* =========================================================
   MultiSelect
   ========================================================= */

.k-widget.k-multiselect,
.k-header.k-multiselect,
.k-multiselect {
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

    .k-multiselect .k-multiselect-wrap {
        min-height: 42px !important;
        border: 1px solid var(--line, #E5E7EB) !important;
        border-radius: 12px !important;
        background: #fff !important;
        background-image: none !important;
        box-shadow: none !important;
        padding: 4px 8px !important;
        box-sizing: border-box !important;
    }

    .k-multiselect.k-state-focused .k-multiselect-wrap,
    .k-multiselect-wrap.k-state-focused {
        border-color: var(--red, #d83333) !important;
        box-shadow: 0 0 0 4px rgba(216, 51, 51, .12) !important;
    }

.k-multiselect-wrap .k-input {
    height: 32px !important;
    line-height: 32px !important;
    min-height: 32px !important;
    padding: 0 6px !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-indent: 0 !important;
}

.k-multiselect-wrap .k-button {
    min-height: 30px !important;
    line-height: 28px !important;
    margin: 2px 4px 2px 0 !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    background: var(--red, #d83333) !important;
    background-image: none !important;
    border-color: var(--red, #d83333) !important;
    color: #fff !important;
    box-shadow: none !important;
}

    .k-multiselect-wrap .k-button .k-icon,
    .k-multiselect-wrap .k-button .k-delete,
    .k-multiselect-wrap .k-button .k-i-close {
        color: #fff !important;
    }

/* Kendo MultiSelect: stop ul.k-reset from stretching height */
.k-multiselect .k-multiselect-wrap > ul.k-reset {
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: normal !important;
}

    .k-multiselect .k-multiselect-wrap > ul.k-reset > li {
        margin: 2px 4px 2px 0 !important;
        padding: 0px 10px !important;
        line-height: 30px !important;
    }

        /* placeholder/input li */
        .k-multiselect .k-multiselect-wrap > ul.k-reset > li.k-input {
            height: 30px !important;
            min-height: 30px !important;
            line-height: 30px !important;
            margin: 2px 0 !important;
            padding: 0 !important;
        }

/* actual input inside placeholder */
.k-multiselect .k-multiselect-wrap input.k-input {
    height: 30px !important;
    min-height: 30px !important;
    line-height: 30px !important;
    margin: 0px 5px !important;
    padding: 0 !important;
}

.k-multiselect-wrap .k-button .k-icon.k-delete {
    color: #fff !important;
    font-size: 0 !important;
    line-height: 1 !important;
    width: 16px !important;
    height: 16px !important;
    margin-left: 6px !important;
    position: relative !important;
    top: -1px !important;
    right: -4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

    .k-multiselect-wrap .k-button .k-icon.k-delete::after {
        content: "×";
        color: #fff !important;
        font-size: 21px !important;
        font-weight: 800 !important;
        line-height: 16px !important;
    }


/* =========================================================
   Popup / list
   ========================================================= */

.k-animation-container .k-list-container,
.k-list-container.k-popup,
.k-popup {
    border: 1px solid var(--line, #E5E7EB) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 16px 42px rgba(15, 17, 21, .14) !important;
    background: #fff !important;
}

.k-list-filter {
    padding: 10px !important;
    background: #fff !important;
    border-bottom: 1px solid var(--line, #E5E7EB) !important;
}

    .k-list-filter input,
    .k-list-filter .k-textbox {
        height: 38px !important;
        min-height: 38px !important;
        border: 1px solid var(--line, #E5E7EB) !important;
        border-radius: 12px !important;
        padding: 0 12px !important;
        box-shadow: none !important;
    }

        .k-list-filter input:focus,
        .k-list-filter .k-textbox:focus {
            border-color: var(--red, #d83333) !important;
            box-shadow: 0 0 0 3px rgba(216, 51, 51, .12) !important;
        }

/* IMPORTANT:
   do NOT force display:flex here.
   Old Kendo hides already selected MultiSelect items with display:none.
*/
.k-list .k-item,
.k-popup .k-item,
.k-list-optionlabel {
    min-height: 40px !important;
    padding: 0 14px !important;
    line-height: 40px !important;
    border-radius: 8px !important;
    margin: 2px 6px !important;
    background-image: none !important;
    box-sizing: border-box !important;
}

    /* selected/focused */
    .k-list .k-item.k-state-selected,
    .k-list .k-item.k-state-focused,
    .k-popup .k-item.k-state-selected,
    .k-popup .k-item.k-state-focused,
    .k-list-optionlabel.k-state-selected {
        background: var(--red, #d83333) !important;
        background-image: none !important;
        color: #fff !important;
        border-color: var(--red, #d83333) !important;
    }

    /* hover */
    .k-list .k-item:hover,
    .k-list .k-item.k-state-hover,
    .k-popup .k-item:hover,
    .k-popup .k-item.k-state-hover {
        background: var(--red-soft, #FEF2F3) !important;
        background-image: none !important;
        color: var(--red, #d83333) !important;
    }

    /* selected hover */
    .k-list .k-item.k-state-selected:hover,
    .k-list .k-item.k-state-selected.k-state-hover,
    .k-popup .k-item.k-state-selected:hover {
        background: var(--red, #d83333) !important;
        color: #fff !important;
    }

.k-animation-container .k-list-container {
    margin-top: 4px;
}


/* =========================================================
   2. Kendo button content
   ========================================================= */

.k-button span strong {
    color: white;
}

/* =========================================================
   3. Pager
   ========================================================= */

/* активная страница */
.k-pager-wrap .k-state-selected,
.k-pager-wrap .k-state-active,
.k-pager-wrap .k-link.k-state-selected {
    background: #d83333 !important;
    border-color: #d83333 !important;
    color: #fff !important;
    margin: 0px 2px;
    line-height: 31px;
}

/* hover */
.k-pager-wrap .k-link:hover {
    background: #fbe8e8 !important;
    color: #d83333 !important;
}

/* цифры */
.k-pager-wrap .k-link {
    color: #d83333;
    margin: 0px 2px;
}

a.k-link, span.k-state-selected {
    border-radius: 10px !important;
}

/* текущая страница */
.k-pager-wrap .k-state-selected:hover,
.k-pager-wrap .k-state-active:hover {
    background: #d83333 !important;
    color: #fff !important;
}

.k-pager-info {
    margin-left: auto;
    user-select: none;
}

.k-pager-wrap {
    display: flex;
    align-items: center;
}

    .k-pager-wrap > * {
        vertical-align: middle;
    }

.page-body ul.k-pager-numbers {
    margin: 0;
    position: relative;
    top: 2px;
}

/* =========================================================
   3.1 Pager — mobile ListView layout
   ========================================================= */

@media (max-width: 700px) {
    /* Both bottom and top Kendo pagers:
           #ListView_pager
           #ListView_pager_top
        */
    [id^="ListView_pager"],
    [id^="PaperList_pager"] {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        max-width: 100%;
        padding: 12px 8px;
        box-sizing: border-box;
    }
        /* First / Previous / Next / Last */
        [id^="ListView_pager"] .k-pager-nav,
        [id^="PaperList_pager"] .k-pager-nav {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            min-width: 40px;
            margin: 0;
            padding: 0;
            border-radius: 12px;
            box-sizing: border-box;
        }
        /* Numeric pages */
        [id^="ListView_pager"] .k-pager-numbers,
        [id^="PaperList_pager"] .k-pager-numbers {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            margin: 0;
            padding: 0;
        }

            [id^="ListView_pager"] .k-pager-numbers .k-link,
            [id^="ListView_pager"] .k-pager-numbers .k-state-selected,
            [id^="ListView_pager"] .k-pager-numbers .k-selected,
            [id^="PaperList_pager"] .k-pager-numbers .k-link,
            [id^="PaperList_pager"] .k-pager-numbers .k-state-selected,
            [id^="PaperList_pager"] .k-pager-numbers .k-selected {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                width: 40px;
                height: 40px;
                min-width: 40px;
                margin: 0;
                padding: 0;
                border-radius: 12px;
                box-sizing: border-box;
            }
        /* "1 - 10 of 374204 papers" */
        [id^="ListView_pager"] .k-pager-info,
        [id^="PaperList_pager"] .k-pager-info {
            flex: 0 0 100%;
            order: 20;
            margin: 4px 0 0;
            padding: 0;
            color: var(--muted, #858B94);
            font-size: 12px;
            line-height: 1.4;
            text-align: center;
            white-space: normal;
        }
}



@media (max-width: 520px) {
    #ListView_pager_top .k-pager-numbers a[title="More pages"],
    #ListView_pager .k-pager-numbers a[title="More pages"],
    #PaperList_pager_top .k-pager-numbers a[title="More pages"],
    #PaperList_pager .k-pager-numbers a[title="More pages"] {
        display: none;
    }

    #ListView_pager_top .k-pager-numbers > li:not(:has(.k-state-selected)),
    #ListView_pager .k-pager-numbers > li:not(:has(.k-state-selected)),
    #PaperList_pager_top .k-pager-numbers > li:not(:has(.k-state-selected)),
    #PaperList_pager .k-pager-numbers > li:not(:has(.k-state-selected)) {
        display: none;
    }
}

/* =========================================================
   DatePicker — Shop fields
   ========================================================= */

.shop-field .k-datepicker {
    width: 100% !important;
    max-width: 100%;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    line-height: 42px !important;
    border: 0 !important;
    border-radius: 12px;
    background: #fff !important;
    box-shadow: none !important;
}

    .shop-field .k-datepicker .k-picker-wrap {
        position: relative !important;
        display: flex !important;
        align-items: stretch !important;
        width: 100%;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        padding: 0 !important;
        overflow: hidden;
        border: 1px solid var(--line, #E5E7EB) !important;
        border-radius: 12px !important;
        background: #fff !important;
        background-image: none !important;
        line-height: normal !important;
        box-shadow: none !important;
    }

    .shop-field .k-datepicker .k-input {
        flex: 1 1 auto;
        width: 100% !important;
        min-width: 0;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        padding: 0 14px !important;
        border: 0 !important;
        border-radius: 12px 0 0 12px !important;
        background: transparent !important;
        background-image: none !important;
        line-height: 40px !important;
        box-sizing: border-box;
        box-shadow: none !important;
        outline: 0;
    }

    .shop-field .k-datepicker .k-select {
        position: static !important;
        display: flex;
        flex: 0 0 44px;
        align-items: center;
        justify-content: center;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        padding: 0 !important;
        border: 0 !important;
        border-left: 1px solid var(--line, #E5E7EB) !important;
        border-radius: 0 12px 12px 0 !important;
        background: transparent !important;
        background-image: none !important;
        line-height: 40px !important;
        box-sizing: border-box;
        box-shadow: none !important;
        cursor: pointer;
    }

    .shop-field .k-datepicker .k-picker-wrap.k-state-default,
    .shop-field .k-datepicker .k-picker-wrap.k-state-hover,
    .shop-field .k-datepicker .k-picker-wrap.k-state-focused,
    .shop-field .k-datepicker .k-picker-wrap.k-state-active {
        background: #fff !important;
        background-image: none !important;
        box-shadow: none !important;
    }

    .shop-field .k-datepicker .k-picker-wrap:focus-within {
        border-color: var(--red, #D83333) !important;
        box-shadow: 0 0 0 4px rgba(216, 51, 51, .10) !important;
    }

    .shop-field .k-datepicker .k-icon,
    .shop-field .k-datepicker .k-select .k-icon {
        position: static !important;
        margin: 0 !important;
        line-height: 1 !important;
    }


/* =========================================================
   Calendar popup
   ========================================================= */

/* =========================================================
   Kendo Calendar — final PIO styles
   Stable geometry: no jumping on hover / select / focus
   ========================================================= */

/* Calendar cells */

.k-calendar td,
.k-calendar td.k-state-default,
.k-calendar td.k-state-hover,
.k-calendar td.k-state-focused,
.k-calendar td.k-state-selected,
.k-calendar td.k-state-selected.k-state-focused {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
}


    /* Date links — geometry NEVER changes between states */

    .k-calendar td > .k-link {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        /* Always present — prevents 1–2px row jumping */
        border: 2px solid transparent !important;
        border-radius: 8px !important;
        background: transparent !important;
        background-image: none !important;
        color: inherit;
        text-align: center !important;
        line-height: normal !important;
        box-shadow: none !important;
        outline: none !important;
    }


    /* Hover */

    .k-calendar td:hover > .k-link,
    .k-calendar td.k-state-hover > .k-link {
        border-color: transparent !important;
        background: var(--red-soft, #FEF2F3) !important;
        color: var(--red, #D83333) !important;
        box-shadow: none !important;
    }


    /* Focus / selected */

    .k-calendar td.k-state-focused > .k-link,
    .k-calendar td.k-state-selected > .k-link,
    .k-calendar td.k-state-selected.k-state-focused > .k-link {
        border-color: var(--red, #D83333) !important;
        background: var(--red-soft, #FEF2F3) !important;
        color: var(--red, #D83333) !important;
        box-shadow: none !important;
        outline: none !important;
    }


    /* Selected + hover must keep exactly the same geometry */

    .k-calendar td.k-state-selected:hover > .k-link,
    .k-calendar td.k-state-selected.k-state-hover > .k-link,
    .k-calendar td.k-state-focused:hover > .k-link {
        border-color: var(--red, #D83333) !important;
        background: var(--red-soft, #FEF2F3) !important;
        color: var(--red, #D83333) !important;
        box-shadow: none !important;
    }


    /* Other-month dates */

    .k-calendar td.k-other-month > .k-link {
        border-color: transparent !important;
    }


    /* Disabled dates */

    .k-calendar td.k-state-disabled > .k-link {
        border-color: transparent !important;
        box-shadow: none !important;
    }

/* =========================================================
   Kendo loading indicator — PIO
   ========================================================= */

.k-autocomplete .k-loading,
.k-dropdown-wrap .k-loading,
.k-combobox .k-loading,
.k-multiselect-wrap .k-loading,
.k-widget .k-i-loading {
    position: absolute !important;
    top: 50% !important;
    right: 14px !important;
    width: 18px !important;
    height: 18px !important;
    margin: -9px 0 0 0 !important;
    padding: 0 !important;
    border: 2px solid rgba(216, 51, 51, .20) !important;
    border-top-color: var(--red, #d83333) !important;
    border-radius: 50% !important;
    background: none !important;
    background-image: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    box-sizing: border-box !important;
    animation: pio-kendo-spin .7s linear infinite !important;
}

@keyframes pio-kendo-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    body.sidebar-collapsed .sidebar {
        transition: none;
    }

    body.sidebar {
        transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
    }
}


/* =========================================================
   COLLAPSIBLE PANEL
========================================================= */

.collapsible-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    overflow: hidden;
}

.collapsible-panel-title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border: 0;
    background: #fff;
    font-family: var(--display);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    user-select: none;
    transition: background 160ms ease, color 160ms ease;
    text-transform: uppercase;
    color: var(--red);
}

    .collapsible-panel-title:hover {
        background: var(--red-soft, #FEF2F3);
    }

    .collapsible-panel-title:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: -2px;
    }

    .collapsible-panel-title::after {
        content: "";
        width: 10px;
        height: 10px;
        flex-shrink: 0;
        border-right: 2px solid var(--ink-soft);
        border-bottom: 2px solid var(--ink-soft);
        transform: rotate(45deg);
        transition: transform 240ms ease;
    }

.collapsible-panel.is-open > .collapsible-panel-title::after {
    transform: rotate(225deg);
}

.collapsible-panel.is-open > .collapsible-panel-title {
    border-bottom: 1px solid var(--line);
}


/* Animated wrapper */

.collapsible-panel-collapse {
    height: 0;
    overflow: hidden;
    transition: height 280ms cubic-bezier(0.4, 0, 0.2, 1);
}


/* Optional mobile adjustment */

@media (max-width: 560px) {
    .collapsible-panel-title {
        padding: 14px 16px;
        font-size: 18px;
    }

    .collapsible-panel-body {
        padding: 16px;
    }
}



.lords {
    background: #ff0000;
}

.commons {
    background: #008000;
}

.legislation {
    background: #000000;
}

.cmnd {
    background: #ffffff;
    border: 1px solid #000000;
    color: #000000;
}

.joint {
    background: #ff0000;
    background: -webkit-linear-gradient(left, #ff0000, #008000);
    background: -o-linear-gradient(right, #ff0000, #008000);
    background: -moz-linear-gradient(right, #ff0000, #008000);
    background: linear-gradient(to right, #ff0000, #008000);
}

.pdf-viewer-scroll-buffer {
    height: 0;
}

.pdf-viewer-scroll-buffer.is-active {
    height: 100vh;
}

.pdf-viewer-scroll-buffer.is-finished {
    height: 0;
}


/* =========================================================
   Unified paper Kendo ListView template
   ========================================================= */
.search-results-list-wrap {
    min-width: 0;
}

.search-paper-results-list,
.paper-results-list {
    border: 0 !important;
    background: transparent !important;
}

.paper-result {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line, #E5E7EB);
    background: #fff;
    cursor: pointer;
    transition: background .15s ease;
}

    .paper-result:last-child {
        border-bottom: 0;
    }

    .paper-result:hover {
        background: var(--red-soft, #FEF2F3);
    }

.paper-result-main {
    flex: 1 1 auto;
    min-width: 0;
}

.paper-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.paper-result-title {
    display: block;
    min-width: 0;
    color: var(--ink, #0F1115);
    font-family: var(--display, Georgia, serif);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
}

    .paper-result-title:hover {
        color: var(--red, #d83333);
        text-decoration: none;
    }

.paper-identifier {
    display: inline-flex;
    flex: 0 0 auto;
    width: fit-content;
    height: fit-content;
    align-self: flex-start;
    white-space: nowrap;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

    .paper-identifier:empty,
    .paper-result-context:empty,
    .paper-meta-item:empty {
        display: none;
    }

.paper-result-context {
    margin-top: 8px;
    color: var(--ink-soft, #3A3F47);
    font-size: 14px;
    line-height: 1.55;
}

.paper-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 12px;
    color: var(--ink-soft, #3A3F47);
    font-size: 13px;
    line-height: 1.45;
}

.paper-meta-item {
    min-width: 0;
    overflow-wrap: anywhere;
}

.paper-meta-category,
.paper-meta-author {
    flex: 1 1 200px;
}

.paper-meta-isbn {
    white-space: nowrap;
}

span.highlight {
    color: var(--red, #d83333);
    font-weight: bold;
    font-style: normal;
}

/* Pepper v. Hart selection checkbox: present in the shared template,
   hidden everywhere unless existing PvH code adds .is-visible. */
.paper-result-check.pepper-hart-show {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
}

    .paper-result-check.pepper-hart-show.is-visible {
        display: flex;
    }

.paper-check {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}

    .paper-check input {
        position: absolute;
        opacity: 0;
    }

.paper-check-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid #C7CBD1;
    border-radius: 7px;
    background: #fff;
}

.paper-check-mark {
    display: none;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.paper-check input:checked + .paper-check-box {
    border-color: var(--red, #d83333);
    background: var(--red, #d83333);
}

    .paper-check input:checked + .paper-check-box .paper-check-mark {
        display: block;
    }

@media (max-width: 760px) {
    .paper-result {
        padding: 18px;
    }

    .paper-result-title {
        font-size: 17px;
    }

    .paper-result-head {
        flex-direction: column;
        gap: 8px;
    }

    .paper-result-meta {
        gap: 5px 16px;
    }

    .paper-meta-category,
    .paper-meta-author {
        flex-basis: 100%;
    }
}

@media (max-width: 520px) {
    .paper-result {
        padding: 16px;
        gap: 12px;
    }

    .paper-result-meta {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .paper-meta-isbn {
        white-space: normal;
    }
}


/* =========================================================
   Act Tracker
   ========================================================= */

.act-tracker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    align-items: stretch;
}


/* Card */

.act-tracker-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 16px;
    color: var(--ink, #1f2937);
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .03), 0 8px 24px rgba(0, 0, 0, .05);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

    .act-tracker-card:hover {
        transform: translateY(-5px);
        border-color: rgba(216, 51, 51, .25);
        box-shadow: 0 6px 12px rgba(0, 0, 0, .06), 0 16px 36px rgba(0, 0, 0, .10);
        color: var(--ink, #1f2937);
        text-decoration: none;
    }

    .act-tracker-card:focus-visible {
        outline: 3px solid rgba(216, 51, 51, .18);
        outline-offset: 3px;
    }


/* First-page preview */

.act-tracker-card-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f4f5f7;
    border-bottom: 1px solid var(--line, #e5e7eb);
}

    .act-tracker-card-preview img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top center;
        transition: transform 300ms ease;
    }

.act-tracker-card:hover .act-tracker-card-preview img {
    transform: scale(1.025);
}


/* Content */

.act-tracker-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 20px;
}

.act-tracker-card-title {
    margin: 0;
    color: var(--ink, #1f2937);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.act-tracker-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
    margin-top: auto;
    padding-top: 18px;
}


.act-tracker-card-meta-item {
    min-width: 0;
    flex-direction: column;
    display: flex;
}

.act-tracker-card-meta-item.left{
    text-align: left;
}

.act-tracker-card-meta-item.right{
    text-align: right;
}

.act-tracker-card-label {
    margin-bottom: 3px;
    color: var(--ink-soft, #6b7280);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.act-tracker-card-value {
    color: var(--ink, #1f2937);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}


/* Responsive */

@media (max-width: 760px) {
    .act-tracker-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
    }

    .act-tracker-card-body {
        padding: 18px;
    }
}

@media (max-width: 520px) {
    .act-tracker-grid {
        grid-template-columns: 1fr;
    }

    .act-tracker-card-preview {
        aspect-ratio: 16 / 10;
    }
}