* { box-sizing: border-box; }

/* Market ledger: a quiet near-black ground, hairline rules instead of boxes, and
   prices set in tabular figures so columns line up. Product photos have white
   backgrounds, so they sit on a light --ff-photo tile rather than floating on dark.

   Colour tokens. Text contrast (WCAG AA, 4.5:1 for normal text) is checked against
   the surfaces text sits on: --ff-bg, --ff-card and --ff-track.
   - --ff-text and --ff-text-secondary pass on all three (secondary is 6.8:1 on the
     lightest, --ff-track).
   - --ff-gold is the one accent: the primary action, focus rings and the current page.
     It passes on every dark surface, and never signals a price going up or down.
   - --ff-up / --ff-down / --ff-neutral are price direction colours. They pass on the
     dark surfaces and on --ff-pill-bg (the label over photos), and always come with an
     arrow or sign so colour isn't the only signal. */
:root {
    --ff-bg: #0E0F11;
    --ff-navbar-bg: #0E0F11;
    --ff-card: #16181B;          /* raised surface: dialogs, menus, panels on other pages */
    --ff-card-border: #2C3036;
    --ff-track: #1E2125;         /* inputs and secondary buttons */
    --ff-line: rgba(255, 255, 255, 0.09);   /* hairline between rows and sections */
    --ff-photo: #F3F2EF;         /* tile behind product photos */
    --ff-text: #EDEEF0;
    --ff-text-secondary: #A4A9B3;
    --ff-gold: #F2C14E;
    --ff-teal: #1D9E75;
    --ff-coral: #F0997B;
    --ff-pill-bg: rgba(14, 15, 17, 0.8);
    --ff-up: #4FD49B;
    --ff-down: #FF8E78;
    --ff-neutral: #A4A9B3;
    --ff-heart: #FF8FA6;
    --ff-danger-bg: #8A2A1C;     /* fill behind white text for destructive buttons */
    --ff-font: "Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background: var(--ff-bg);
    font-family: var(--ff-font);
    color: var(--ff-text);
    -webkit-font-smoothing: antialiased;
}

::selection {
    color: #0E0F11;
    background: var(--ff-gold);
}

/* Text only screen readers hear (price wording, icon button names) */
.ff-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ===== Switch =====
   A real checkbox (<input type="checkbox" role="switch" class="ff-switch">) inside its
   <label>, drawn as a switch. Being a checkbox it's reachable with Tab and toggles with
   Space; account-ui.js adds Enter. */
.ff-switch {
    appearance: none;
    flex-shrink: 0;
    position: relative;
    width: 44px;
    height: 24px;
    margin: 0;
    background: var(--ff-track);
    border: 1px solid var(--ff-card-border);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ff-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--ff-text);
    border-radius: 50%;
    transition: transform 0.15s ease;
}

.ff-switch:checked {
    background: var(--ff-gold);
    border-color: var(--ff-gold);
}

.ff-switch:checked::after {
    transform: translateX(20px);
    background: #0E0F11;
}

.ff-switch:focus-visible {
    outline: 2px solid var(--ff-gold);
    outline-offset: 3px;
}

.ff-switch:disabled {
    opacity: 0.5;
    cursor: wait;
}

@media (prefers-reduced-motion: reduce) {
    .ff-switch,
    .ff-switch::after {
        transition: none;
    }
}

/* ===== Navbar ===== */
/* Built by buildNav() in account-ui.js. Wide: logo, links, then currency, search and
   account on the right. Below 768px: menu button | logo | actions, links in a panel. */
.ff-navbar {
    position: relative;
    z-index: 30;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo links actions";
    align-items: center;
    gap: 0 36px;
    margin-bottom: 32px;
    padding: 12px 32px;
    background: var(--ff-navbar-bg);
    border-bottom: 1px solid var(--ff-line);
}

#logo {
    display: block;
    height: 40px;
}

.ff-navbar-links {
    grid-area: links;
    display: flex;
    gap: 26px;
}

.ff-navbar-logo {
    grid-area: logo;
}

.ff-navbar-actions {
    grid-area: actions;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ff-navbar-links a {
    padding: 6px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--ff-text-secondary);
    text-decoration: none;
}

.ff-navbar-links a:hover {
    color: var(--ff-text);
}

.ff-navbar-links a[aria-current="page"] {
    color: var(--ff-text);
    text-decoration: underline;
    text-decoration-color: var(--ff-gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}

.ff-navbar-logo a {
    color: var(--ff-text);
    text-decoration: none;
}

.ff-menu-btn {
    grid-area: menu;
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--ff-text);
    background: none;
    border: 1px solid var(--ff-card-border);
    border-radius: 6px;
    cursor: pointer;
}

.ff-menu-btn:focus-visible,
.ff-navbar-links a:focus-visible,
.ff-navbar-logo a:focus-visible,
.ff-profile-btn:focus-visible {
    outline: 2px solid var(--ff-gold);
    outline-offset: 3px;
}

/* Account button: your photo or initial, or "Sign in" (account-ui.js) */
.ff-profile-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--ff-text);
    background: var(--ff-track);
    border: 1px solid var(--ff-card-border);
    border-radius: 50%;
    cursor: pointer;
}

.ff-profile-btn--signin {
    width: auto;
    padding: 0 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 6px;
}

.ff-profile-btn--signin:hover {
    border-color: var(--ff-text-secondary);
}

.ff-profile-btn--me {
    overflow: hidden;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #0E0F11;
    background: var(--ff-gold);
    border-color: var(--ff-gold);
}

.ff-profile-btn--me img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 900px) {
    .ff-navbar {
        gap: 0 20px;
        padding: 12px 20px;
    }

    .ff-navbar-links {
        gap: 18px;
    }
}

@media (max-width: 767px) {
    .ff-navbar {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "menu logo actions"
            "links links links";
        gap: 0 8px;   /* tight enough that menu, logo, currency, search and account fit at 360px */
        padding: 10px 12px;
    }

    .ff-menu-btn {
        display: grid;
    }

    .ff-navbar-logo {
        justify-self: start;
    }

    #logo {
        height: 32px;
    }

    .ff-navbar-actions {
        gap: 6px;
    }

    /* The links fold into a panel under the bar, opened by the menu button */
    .ff-navbar-links {
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: 10px;
        padding-top: 4px;
        border-top: 1px solid var(--ff-line);
    }

    .ff-navbar.is-menu-open .ff-navbar-links {
        display: flex;
    }

    .ff-navbar-links a {
        padding: 12px 4px;
        font-size: 16px;
    }

    .ff-navbar-links a[aria-current="page"] {
        text-underline-offset: 6px;
    }

    /* Without JavaScript (no menu button) keep the links showing */
    .ff-navbar:not(:has(.ff-menu-btn)) .ff-navbar-links {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0 16px;
    }
}

/* ===== Expanding nav search ===== */
.ff-nav-search {
    position: relative;
    width: 36px;
    height: 36px;
    margin: 0;
}

.ff-nav-search__box {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    width: 36px;
    height: 36px;
    overflow: hidden;
    background: var(--ff-track);
    border: 1px solid var(--ff-card-border);
    border-radius: 6px;
    transition: width 0.2s ease;
}

.ff-nav-search__input {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    height: 100%;
    padding: 0;
    font: inherit;
    font-size: 14px;
    color: var(--ff-text);
    background: transparent;
    border: none;
    outline: none;
    opacity: 0;
    transition: opacity 0.15s ease, padding 0.2s ease;
}

.ff-nav-search__input::placeholder {
    color: var(--ff-text-secondary);
}

.ff-nav-search__icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: var(--ff-text);
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Open while focused (after a click or tap) */
.ff-nav-search:focus-within .ff-nav-search__box {
    width: min(260px, 70vw);
    border-color: var(--ff-gold);
}

.ff-nav-search:focus-within .ff-nav-search__input {
    opacity: 1;
    padding-left: 12px;
}

/* Open on hover (mouse only) */
@media (hover: hover) {
    .ff-nav-search:hover .ff-nav-search__box {
        width: min(260px, 70vw);
    }

    .ff-nav-search:hover .ff-nav-search__input {
        opacity: 1;
        padding-left: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ff-nav-search__box,
    .ff-nav-search__input {
        transition: none;
    }
}

/* =====================================================================
   Page shell and shared pieces (home, figure page, and the hm-* parts
   other pages borrow)
   ===================================================================== */
.hm-page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px;
}

.hm-page h1,
.hm-page h2 {
    font-family: var(--ff-font);
    letter-spacing: -0.015em;
}

/* Small label above a page title (Explore, Series) */
.hm-eyebrow {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ff-text-secondary);
}

/* Prices line up in columns everywhere */
.ff-num {
    font-variant-numeric: tabular-nums;
}

/* ===== Buttons ===== */
.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: filter 0.15s ease, border-color 0.15s ease;
}

.hm-btn--gold {
    color: #0E0F11;
    background: var(--ff-gold);
}

.hm-btn--gold:hover {
    filter: brightness(1.08);
}

.hm-btn--outline {
    color: var(--ff-text);
    background: transparent;
    border-color: var(--ff-card-border);
}

.hm-btn--outline:hover {
    border-color: var(--ff-text-secondary);
}

.hm-btn:focus-visible {
    outline: 2px solid var(--ff-gold);
    outline-offset: 2px;
}

/* ===== Home: intro (statement + search) beside the biggest gains ledger ===== */
.hm-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 64px;
    align-items: start;
    padding: 24px 0 8px;
}

.hm-intro__title {
    max-width: 15ch;
    margin: 0 0 16px;
    font-size: clamp(32px, 3.8vw, 48px);
    font-weight: 650;
    line-height: 1.06;
    letter-spacing: -0.03em;
}

.hm-intro__text {
    max-width: 44ch;
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ff-text-secondary);
}

.hm-intro__text strong {
    font-weight: 600;
    color: var(--ff-text);
}

.hm-search {
    display: flex;
    gap: 8px;
    max-width: 520px;
}

.hm-search input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    font: inherit;
    font-size: 15px;
    color: var(--ff-text);
    background: var(--ff-track);
    border: 1px solid var(--ff-card-border);
    border-radius: 6px;
    outline: none;
}

.hm-search input::placeholder {
    color: var(--ff-text-secondary);
}

.hm-search input:focus {
    border-color: var(--ff-gold);
}

.hm-search button {
    height: 48px;
    padding: 0 22px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #0E0F11;
    background: var(--ff-gold);
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.hm-search button:focus-visible {
    outline: 2px solid var(--ff-gold);
    outline-offset: 2px;
}

/* "Browse: Nendoroid · figma · …" under the search */
.hm-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
    margin: 18px 0 0;
    font-size: 14px;
    color: var(--ff-text-secondary);
}

.hm-quick a {
    color: var(--ff-text);
    text-decoration: underline;
    text-decoration-color: var(--ff-card-border);
    text-underline-offset: 4px;
}

.hm-quick a:hover {
    text-decoration-color: var(--ff-text);
}

/* ===== Ledger: figures as rows of RRP, eBay average and change (home.js) ===== */
.hm-ledger__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 4px;
}

.hm-ledger__head h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.hm-ledger__head a {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--ff-text-secondary);
    text-decoration: none;
}

.hm-ledger__head a:hover {
    color: var(--ff-text);
}

.hm-ledger__note {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--ff-text-secondary);
}

.hm-ledger__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* The column labels and each row share one grid */
.hm-ledger__cols,
.hm-ledger__row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 72px 72px 84px;
    gap: 14px;
    align-items: center;
}

.hm-ledger__cols {
    padding: 8px 0;
    font-size: 12px;
    color: var(--ff-text-secondary);
    border-bottom: 1px solid var(--ff-line);
}

.hm-ledger__cols span:nth-child(n + 3),
.hm-ledger__num {
    text-align: right;
}

.hm-ledger__row {
    padding: 10px 0;
    color: var(--ff-text);
    text-decoration: none;
    border-bottom: 1px solid var(--ff-line);
}

.hm-ledger__row:hover .hm-ledger__title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hm-ledger__row:focus-visible {
    outline: 2px solid var(--ff-gold);
    outline-offset: 2px;
}

.hm-ledger__img {
    width: 44px;
    height: 56px;
    overflow: hidden;
    background: var(--ff-photo);
    border-radius: 3px;
}

.hm-ledger__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    display: block;
}

.hm-ledger__name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hm-ledger__title {
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hm-ledger__series {
    overflow: hidden;
    font-size: 12.5px;
    color: var(--ff-text-secondary);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hm-ledger__num {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hm-ledger__num--rrp {
    color: var(--ff-text-secondary);
}

.hm-ledger__num--avg {
    font-weight: 600;
}

.hm-ledger__num--up   { color: var(--ff-up); font-weight: 600; }
.hm-ledger__num--down { color: var(--ff-down); font-weight: 600; }

/* Change: the % (what the table is ranked by) with the money difference under it */
.hm-ledger__change {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.hm-ledger__diff {
    font-size: 12px;
    font-weight: 500;
    color: var(--ff-text-secondary);
}

/* The RRP under the name, for phones, where the RRP column is hidden */
.hm-ledger__rrp-inline {
    display: none;
    font-size: 12px;
    color: var(--ff-text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hm-ledger__empty {
    margin: 0;
    padding: 20px 0;
    font-size: 14px;
    color: var(--ff-text-secondary);
}

/* Loading rows */
.hm-ledger__row--skeleton {
    height: 77px;
}

.hm-ledger__row--skeleton::before {
    content: "";
    grid-column: 1 / -1;
    height: 12px;
    background: var(--ff-track);
    border-radius: 3px;
}

/* ===== Sections (card rows and the rest) ===== */
.hm-section {
    margin-top: 56px;
}

.hm-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--ff-line);
}

.hm-section__head h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.hm-section__head p {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--ff-text-secondary);
}

.hm-section__head a {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--ff-text-secondary);
    text-decoration: none;
}

.hm-section__head a:hover {
    color: var(--ff-text);
}

/* "See all" link and the row's ‹ › buttons (row-scroll.js) */
.hm-section__tools {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 14px;
}

.hm-row-nav {
    display: flex;
    gap: 6px;
}

.hm-row-nav__btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--ff-text);
    background: transparent;
    border: 1px solid var(--ff-card-border);
    border-radius: 6px;
    cursor: pointer;
}

.hm-row-nav__btn:hover:not(:disabled) {
    border-color: var(--ff-text-secondary);
}

.hm-row-nav__btn:focus-visible {
    outline: 2px solid var(--ff-gold);
    outline-offset: 2px;
}

.hm-row-nav__btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Horizontal scrolling row of figure cards */
.hm-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 188px;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 2px 2px 14px;   /* room for the focus ring */
    scrollbar-width: thin;
    scrollbar-color: var(--ff-card-border) transparent;
}

.hm-row > * {
    scroll-snap-align: start;
}

.hm-row__empty {
    margin: 0;
    padding: 24px 0;
    color: var(--ff-text-secondary);
    font-size: 14px;
}

/* "#1" label on the top few Trending cards */
.hm-rank {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 1;
    padding: 2px 7px;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ff-gold);
    background: var(--ff-pill-bg);
    border-radius: 3px;
}

/* ===== Home: under retail ledger beside the series list ===== */
.hm-split {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

.hm-split > .hm-section {
    margin-top: 0;
}

/* Biggest series as a plain ranked list */
.hm-serieslist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hm-serieslist a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    color: var(--ff-text);
    text-decoration: none;
    border-bottom: 1px solid var(--ff-line);
}

.hm-serieslist a:hover span:first-child {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hm-serieslist a:focus-visible {
    outline: 2px solid var(--ff-gold);
    outline-offset: 2px;
}

.hm-serieslist span:first-child {
    min-width: 0;
    overflow: hidden;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hm-serieslist span:last-child {
    flex-shrink: 0;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--ff-text-secondary);
}

/* ===== Series tiles (Series page index) ===== */
.hm-series {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.hm-series__tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
    min-height: 170px;
    overflow: hidden;
    padding: 14px;
    color: var(--ff-text);
    text-decoration: none;
    background: var(--ff-card);
    border: 1px solid var(--ff-card-border);
    border-radius: 6px;
}

.hm-series__tile:hover,
.hm-series__tile:focus-visible {
    border-color: var(--ff-text-secondary);
    outline: none;
}

.hm-series__tile:focus-visible {
    outline: 2px solid var(--ff-gold);
    outline-offset: 2px;
}

.hm-series__name {
    position: relative;
    z-index: 1;
    font-size: 16px;
    font-weight: 600;
}

.hm-series__link {
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: var(--ff-text-secondary);
}

/* With a figure photo behind the name, darkened at the bottom so the name stays readable */
.hm-series__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.hm-series__tile--photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(14, 15, 17, 0.94) 0%, rgba(14, 15, 17, 0.6) 45%, rgba(14, 15, 17, 0.05) 100%);
    pointer-events: none;
}

.hm-series__tile--photo .hm-series__link {
    color: var(--ff-text);
}

/* ===== Price range bar (renderPriceRange in figure-cards.js) =====
   The track is eBay low to high; the gold marker is RRP, the white one the average.
   No text sits on the track; the labels are under it, with a swatch matching each marker. */
.hm-range__title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}

.hm-range__title span {
    font-weight: 400;
    color: var(--ff-text-secondary);
}

.hm-range__bar {
    position: relative;
    height: 4px;
    margin: 16px 0 10px;
    background: var(--ff-track);
    border-radius: 2px;
}

.hm-range__fill {
    position: absolute;
    top: 0;
    bottom: 0;
    background: #3E8F6E;
    border-radius: 2px;
}

.hm-range__mark {
    position: absolute;
    top: -6px;
    width: 3px;
    height: 16px;
    margin-left: -1.5px;
    border-radius: 1px;
}

.hm-range__mark--rrp { background: var(--ff-gold); }
.hm-range__mark--avg { background: var(--ff-text); }

/* RRP and Avg labels: placed under their markers by placeRangeLabels() */
.hm-range__labels {
    position: relative;
    height: 20px;
}

.hm-range__label {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hm-range__label::before {
    content: "";
    width: 3px;
    height: 12px;
    border-radius: 1px;
}

.hm-range__label--rrp::before { background: var(--ff-gold); }
.hm-range__label--avg::before { background: var(--ff-text); }

/* eBay low / high */
.hm-range__ends {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--ff-text-secondary);
}

.hm-range__summary {
    margin: 10px 0 0;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

/* ===== Sign-up band (hidden once signed in) ===== */
.hm-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 64px;
    padding: 28px 0;
    border-top: 1px solid var(--ff-line);
    border-bottom: 1px solid var(--ff-line);
}

.hm-cta[hidden] {
    display: none;
}

.hm-cta h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
}

.hm-cta p {
    max-width: 60ch;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ff-text-secondary);
}

.hm-cta__actions {
    display: flex;
    flex-shrink: 0;
    gap: 10px;
}

/* ===== Footer ===== */
.hm-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1240px;
    margin: 64px auto 0;
    padding: 24px 32px 36px;
    font-size: 13px;
    color: var(--ff-text-secondary);
}

.hm-footer__brand {
    font-size: 14px;
    font-weight: 600;
    color: var(--ff-text);
}

.hm-footer__links {
    display: flex;
    gap: 22px;
}

.hm-footer__links a {
    color: var(--ff-text-secondary);
    text-decoration: none;
}

.hm-footer__links a:hover {
    color: var(--ff-text);
}

/* ===== Smaller screens ===== */
@media (max-width: 960px) {
    .hm-intro,
    .hm-split {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .hm-split > .hm-section + .hm-section {
        margin-top: 0;
    }

    .hm-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== Touch targets =====
   On phones everything you tap is at least 44×44px. Done here once, for every page,
   rather than per component: controls get a minimum size, and stand-alone text links
   (navbar, breadcrumbs, "See all", footer) get a 44px-tall tappable box around the text. */
@media (max-width: 767px) {
    button,
    select,
    [role="button"],
    .hm-btn {
        min-width: 44px;
        min-height: 44px;
    }

    /* A tick box or switch is tapped through its label, so the label gets the size */
    label:has(> input[type="checkbox"]),
    label:has(> input[type="radio"]) {
        min-height: 44px;
    }

    .ff-currency,
    .ff-nav-search,
    .ff-nav-search__box,
    .ff-nav-search__icon,
    .ff-profile-btn,
    .hm-row-nav__btn {
        height: 44px;
    }

    .ff-nav-search,
    .ff-nav-search__box,
    .ff-nav-search__icon,
    .ff-profile-btn:not(.ff-profile-btn--signin),
    .hm-row-nav__btn {
        width: 44px;
    }

    .ff-navbar-logo a,
    .hm-section__head a,
    .hm-ledger__head a,
    .hm-quick a,
    .hm-footer__links a,
    nav[aria-label="Breadcrumb"] a,
    [class$="crumbs"] a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 600px) {
    .hm-page {
        padding: 0 16px;
    }

    .hm-intro {
        padding: 8px 0 40px;
    }

    .hm-search button {
        padding: 0 16px;
    }

    .hm-quick {
        gap: 0 14px;
    }

    /* Phones drop the RRP column and show the RRP under the name instead */
    .hm-ledger__cols,
    .hm-ledger__row {
        grid-template-columns: 40px minmax(0, 1fr) 56px 72px;   /* fixed, so the rows line up */
        gap: 10px;
    }

    .hm-ledger__cols span:nth-child(3),
    .hm-ledger__num--rrp {
        display: none;
    }

    .hm-ledger__rrp-inline {
        display: block;
    }

    .hm-ledger__diff {
        font-size: 11.5px;
    }

    .hm-ledger__img {
        width: 40px;
        height: 52px;
    }

    .hm-ledger__num {
        font-size: 13px;
    }

    .hm-row {
        grid-auto-columns: 152px;
        gap: 14px;
    }

    .hm-section__head h2 {
        font-size: 18px;
    }

    .hm-cta__actions {
        flex-wrap: wrap;
    }

    .hm-footer {
        flex-direction: column;
        padding: 24px 16px 32px;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-btn {
        transition: none;
    }
}
