/* Customer storefront surfaces share the homepage's quiet, student-friendly palette. */
body.customer-theme .steps-section,
body.customer-theme .auth-page,
body.customer-theme .book-page {
    padding-block: clamp(2.25rem, 5vw, 4.25rem);
    background: var(--cream);
}

body.customer-theme .auth-page {
    min-height: 60vh;
}

body.customer-theme .section-title {
    margin-bottom: 0.75rem;
    text-align: left;
    font-size: clamp(1.8rem, 3.3vw, 2.75rem);
    letter-spacing: -0.04em;
    color: var(--ink);
}

body.customer-theme .section-subtitle {
    max-width: 44rem;
    margin: 0 0 2rem;
    text-align: left;
    line-height: 1.65;
}

/* The compact search remains available at every width outside focused forms. */
body.customer-theme .search-section--mobile-primary {
    display: block;
    padding-block: 1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

body.customer-theme .search-form--compact {
    max-width: 760px;
    gap: 0.625rem;
}

body.customer-theme .search-form--compact .search-input {
    min-height: 48px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--cream);
    color: var(--ink);
    font: inherit;
}

body.customer-theme .search-form--compact .btn {
    min-height: 48px;
    padding-inline: 1.5rem;
}

body.customer-theme .search-suggest__meta {
    font-size: 0.875rem;
    line-height: 1.5;
}

body.customer-theme .search-suggest__list {
    border-color: var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgb(59 66 81 / 10%);
}

/* Catalogue: retain the established condition/price tracks and live stock states. */
body.customer-theme .catalogue-page-header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    max-width: none;
    gap: 0.75rem 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

body.customer-theme .catalogue-page-header > .section-title,
body.customer-theme .catalogue-page-header > .section-subtitle,
body.customer-theme .catalogue-result-count,
body.customer-theme .catalogue-page-hint {
    flex-basis: 100%;
    max-width: none;
}

body.customer-theme .catalogue-page-header .section-subtitle {
    margin-bottom: 0.5rem;
}

body.customer-theme .catalogue-sort-form {
    margin-left: auto;
}

body.customer-theme .catalogue-result-count {
    margin-top: 0.25rem;
}

body.customer-theme .mode-toggle {
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
}

body.customer-theme .mode-toggle a {
    min-height: 44px;
    padding: 0.65rem 1.65rem;
    border-radius: 999px;
    font-weight: 700;
    color: var(--muted);
}

body.customer-theme .mode-toggle a.is-active {
    color: white;
    background: var(--brand-primary-dark);
}

body.customer-theme .book-summary-toolbar .mode-toggle,
body.customer-theme .catalogue-mode-toggle {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: fit-content;
    overflow: visible;
}

body.customer-theme .book-summary-toolbar .mode-toggle a,
body.customer-theme .catalogue-mode-toggle a {
    text-align: center;
}

body.customer-theme .card-grid--catalogue {
    gap: 1.5rem;
}

body.customer-theme .book-card {
    padding: 1.25rem;
    border-radius: 20px;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

body.customer-theme .book-card:hover {
    transform: none;
    border-color: #c5d9cd;
    box-shadow: 0 8px 28px rgb(59 66 81 / 6%);
}

body.customer-theme .book-card-cover {
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 224px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    background: #f5f2ec;
}

body.customer-theme .book-card:nth-child(3n + 2) .book-card-cover {
    background: #eef5f0;
}

body.customer-theme .book-card:nth-child(3n) .book-card-cover {
    background: #f0f2f6;
}

body.customer-theme .book-card-cover img.book-cover {
    width: auto;
    max-width: 100%;
    height: 100%;
    border-radius: 2px 5px 5px 2px;
    background: transparent;
    box-shadow: 5px 6px 12px rgb(59 66 81 / 14%);
}

body.customer-theme .book-card-title {
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
    line-height: 1.4;
    min-height: 4.2em;
}

body.customer-theme .book-card-price {
    color: var(--ink);
    font-size: 1rem;
}

body.customer-theme .book-card-condition-price {
    color: var(--brand-primary-dark);
}

body.customer-theme .book-card-condition-price--muted {
    color: var(--muted);
}

body.customer-theme .book-card-oos,
body.customer-theme .book-card-sell-hint,
body.customer-theme .book-card-in-cart,
body.customer-theme .book-card-condition-stock,
body.customer-theme .book-card-condition-state,
body.customer-theme .book-cover-fallback-title {
    font-size: 0.875rem;
    line-height: 1.5;
}

body.customer-theme .book-card-condition-stock {
    min-height: 1.3125rem;
}

body.customer-theme .book-card-condition-state {
    min-height: 44px;
    background: var(--cream);
    border-radius: 8px;
}

body.customer-theme .book-card-condition-action .btn {
    min-height: 44px;
}

body.customer-theme .book-request-cta {
    max-width: none;
    margin-top: 2rem;
    padding: 2rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--paper);
}

/* Book details keep the cover, edition and purchase/sale choices easy to compare. */
body.customer-theme .book-summary {
    gap: 1rem 2rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    margin-bottom: 2.5rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--paper);
}

body.customer-theme .book-summary-toolbar {
    margin-bottom: 0.25rem;
}

body.customer-theme .book-summary-cover {
    padding: 1rem;
    border-radius: 16px;
    background: #f5f2ec;
}

body.customer-theme .book-summary-cover .book-cover {
    border-radius: 3px 6px 6px 3px;
    background: transparent;
    box-shadow: 5px 7px 15px rgb(59 66 81 / 14%);
}

body.customer-theme .book-summary-title {
    max-width: 42rem;
    font-size: clamp(1.5rem, 2.5vw, 2.15rem);
    letter-spacing: -0.035em;
    line-height: 1.25;
}

body.customer-theme .book-summary-meta {
    gap: 0.5rem;
}

body.customer-theme .book-summary-price {
    color: var(--ink);
    font-size: 1.625rem;
}

body.customer-theme .book-conditions-heading {
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    letter-spacing: -0.025em;
}

body.customer-theme .condition-list {
    gap: 0.875rem;
}

body.customer-theme .condition-row {
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
}

body.customer-theme .condition-row-name {
    color: var(--ink);
    font-size: 1rem;
}

body.customer-theme .condition-row-price {
    color: var(--brand-primary-dark);
    font-size: 1.125rem;
}

body.customer-theme .condition-row-price--muted,
body.customer-theme .condition-row-stock,
body.customer-theme .condition-row-status,
body.customer-theme .book-status-badge,
body.customer-theme .availability-notify-reassurance,
body.customer-theme .offer-group--unavailable .text-muted {
    font-size: 0.875rem;
    line-height: 1.5;
}

body.customer-theme .condition-row--selected {
    border-color: var(--brand-primary);
    box-shadow: inset 3px 0 0 var(--brand-primary);
}

body.customer-theme .condition-row--unavailable .condition-row-price,
body.customer-theme .condition-row--unavailable .condition-row-name,
body.customer-theme .condition-row-price--muted {
    color: var(--muted);
}

body.customer-theme .availability-notify {
    border-radius: 16px;
    border-color: #cde7d8;
    background: #f2faf5;
}

/* Authentication, order and payment screens use the same calm card surfaces. */
body.customer-theme .auth-page--focused {
    padding-block: clamp(2.5rem, 6vw, 5rem);
}

body.customer-theme .auth-page-inner {
    max-width: 480px;
}

body.customer-theme .auth-panel,
body.customer-theme .auth-page > .container > .card {
    padding: clamp(1.25rem, 3vw, 2rem);
}

body.customer-theme .auth-panel h1,
body.customer-theme .auth-page > .container > .card > h1 {
    font-size: clamp(1.65rem, 3vw, 2rem);
    letter-spacing: -0.035em;
}

body.customer-theme .auth-lead {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

body.customer-theme .auth-form .form-group {
    margin-bottom: 1.25rem;
}

body.customer-theme .auth-register-prompt {
    margin-top: 1.5rem;
}

body.customer-theme .auth-divider,
body.customer-theme .reservation-note,
body.customer-theme .reservation-cta-hint,
body.customer-theme .cart-line .item-meta,
body.customer-theme .checkout-line .item-meta,
body.customer-theme #checkout-form .item-meta {
    font-size: 0.875rem;
    line-height: 1.5;
}

body.customer-theme .auth-forgot-link,
body.customer-theme .auth-register-prompt a,
body.customer-theme .cart-line-title,
body.customer-theme .checkout-line-title {
    color: var(--brand-primary-dark);
}

body.customer-theme .cart-line-cover .book-cover-fallback-title,
body.customer-theme .checkout-line-cover .book-cover-fallback-title {
    font-size: 0.875rem;
    overflow-wrap: anywhere;
}

body.customer-theme .cart-line {
    padding-block: 1.25rem;
    gap: 1rem;
}

body.customer-theme .cart-line-title,
body.customer-theme .checkout-line-title {
    font-weight: 650;
    line-height: 1.45;
}

body.customer-theme .cart-line-price,
body.customer-theme .checkout-line-price {
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

body.customer-theme .cart-line--total {
    padding-top: 0;
    font-size: 1.25rem;
}

body.customer-theme .cart-summary-actions {
    margin-top: 1.5rem;
}

body.customer-theme .checkout-line {
    padding-block: 1rem;
}

body.customer-theme #checkout-form > .card {
    padding: clamp(1.25rem, 3vw, 2rem);
}

body.customer-theme #checkout-form > .card > h3 {
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
}

body.customer-theme .checkout-saved-address {
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--cream);
}

body.customer-theme .payment-option {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    cursor: pointer;
}

body.customer-theme .payment-option:has(input:checked) {
    border-color: #90c9a9;
    background: #f2faf5;
}

body.customer-theme .checkout-progress-card {
    color: var(--ink);
    border-radius: 24px;
}

body.customer-theme .checkout-progress-spinner {
    border-color: #dcefe3;
    border-top-color: var(--brand-primary);
}

body.customer-theme .book-request-intent-option {
    border-radius: 14px;
}

body.customer-theme .book-request-intent-title {
    color: var(--ink);
}

/* Longer help and legal content gets a reading rhythm, not a new interaction. */
body.customer-theme .information-page .card {
    padding: clamp(1.25rem, 3vw, 2rem);
}

body.customer-theme .information-page .card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

body.customer-theme .information-page .card p {
    line-height: 1.75;
}

body.customer-theme .information-page .card p:last-child {
    margin-bottom: 0;
}

body.customer-theme .legal-page,
body.customer-theme .legal-hero {
    background: var(--cream);
    border-color: var(--line);
}

body.customer-theme .legal-hero {
    padding-block: 2rem 3rem;
}

body.customer-theme .legal-hero h1,
body.customer-theme .legal-section h2,
body.customer-theme .legal-help h2,
body.customer-theme .legal-index summary,
body.customer-theme .legal-document {
    color: var(--ink);
}

body.customer-theme .legal-eyebrow,
body.customer-theme .legal-back,
body.customer-theme .legal-help a,
body.customer-theme .legal-document a,
body.customer-theme .legal-section-number {
    color: var(--brand-primary-dark);
}

body.customer-theme .legal-eyebrow,
body.customer-theme .legal-source,
body.customer-theme .legal-tabs a {
    font-size: 0.875rem;
}

body.customer-theme .legal-intro,
body.customer-theme .legal-meta,
body.customer-theme .legal-help p,
body.customer-theme .legal-source {
    color: var(--muted);
}

body.customer-theme .legal-tabs a {
    border-color: var(--line);
    border-radius: 999px;
    color: var(--ink);
}

body.customer-theme .legal-tabs a[aria-current='page'] {
    background: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
    color: white;
}

body.customer-theme .legal-index,
body.customer-theme .legal-document {
    border-color: var(--line);
    border-radius: 20px;
}

body.customer-theme .legal-index a {
    color: var(--ink);
}

body.customer-theme .legal-index a:hover,
body.customer-theme .legal-note {
    background: var(--brand-primary-light);
    color: var(--ink);
}

body.customer-theme .legal-note {
    border-left-color: var(--brand-primary);
}

body.customer-theme .legal-print {
    border-color: var(--line);
    background: var(--paper);
    color: var(--ink);
    border-radius: 10px;
}

body.customer-theme .legal-page :is(a, button, summary):focus-visible {
    outline-color: var(--brand-primary-dark);
}

/* The process remains readable throughout its automatic, gentle sequence. */
body.customer-theme .how-it-works-hero {
    padding-block: clamp(2.5rem, 5vw, 4rem) 2.5rem;
    background: var(--cream);
}

body.customer-theme .how-it-works-hero__inner {
    max-width: 1200px;
}

body.customer-theme .how-it-works-jump {
    margin-top: 1.5rem;
}

body.customer-theme .journey-infographic {
    padding-block: 3rem;
    border: 0;
    background: var(--paper);
}

body.customer-theme .journey-infographic__pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

body.customer-theme .journey-infographic__header {
    margin-bottom: 2rem;
}

body.customer-theme .journey-infographic__intro .section-heading {
    text-align: left;
    font-size: clamp(1.6rem, 2.7vw, 2.2rem);
    color: var(--ink);
    letter-spacing: -0.035em;
}

body.customer-theme .journey-lane {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem;
    border: 1px solid var(--line);
    border-radius: 24px;
}

body.customer-theme .journey-lane--buy {
    background: #f6fbf8;
}

body.customer-theme .journey-lane--sell {
    background: #faf9f5;
}

body.customer-theme .journey-lane__header {
    display: block;
    margin: 0;
}

body.customer-theme .journey-lane__badge {
    margin-bottom: 0.75rem;
}

body.customer-theme .journey-lane__title {
    color: var(--ink);
    font-size: 1.125rem;
    line-height: 1.4;
}

body.customer-theme .journey-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

body.customer-theme .journey-step {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 1rem;
    border: 0;
}

body.customer-theme .journey-step:not(:last-child)::after {
    display: block;
    top: 1.9rem;
    left: calc(50% + 2.5rem);
    width: calc(100% - 3.75rem);
    height: 1px;
    background: #cbd8d0;
}

body.customer-theme .journey-step__marker {
    flex-direction: row;
    justify-content: center;
    width: 100%;
}

body.customer-theme .journey-step__number {
    position: absolute;
    top: -4px;
    left: calc(50% + 14px);
    z-index: 2;
    width: 22px;
    height: 22px;
    border: 2px solid white;
    background: var(--ink);
    font-size: 12px;
}

body.customer-theme .journey-step__icon {
    display: inline-flex;
    width: 62px;
    height: 62px;
    border: 1px solid #d8e8df;
    background: white;
    color: var(--brand-primary-dark);
}

body.customer-theme .journey-lane--sell .journey-step__icon {
    border-color: #e5dfd2;
    color: var(--ink);
}

body.customer-theme .journey-step__icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 1.5;
}

body.customer-theme .journey-step__copy {
    text-align: center;
}

body.customer-theme .journey-step__title {
    margin-bottom: 0.4rem;
    color: var(--ink);
    font-size: 0.9375rem;
    line-height: 1.35;
}

body.customer-theme .journey-step__body {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.55;
}

body.customer-theme .journey-infographic.is-running .journey-step__icon {
    animation: customer-journey-pulse 6.4s ease-in-out infinite;
    animation-delay: calc((var(--journey-order, 0)) * 1.6s);
}

body.customer-theme .journey-step[data-journey-step='2'] { --journey-order: 1; }
body.customer-theme .journey-step[data-journey-step='3'] { --journey-order: 2; }
body.customer-theme .journey-step[data-journey-step='4'] { --journey-order: 3; }

@keyframes customer-journey-pulse {
    0%, 28%, 100% { box-shadow: 0 0 0 0 rgb(0 166 81 / 0%); transform: translateY(0); }
    12% { box-shadow: 0 0 0 7px rgb(0 166 81 / 9%); transform: translateY(-3px); }
}

body.customer-theme .how-it-works-notes {
    padding-block: 0 4rem;
    background: var(--paper);
}

body.customer-theme .how-it-works-note {
    padding: 1.75rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--paper);
}

body.customer-theme .how-it-works-note h2 {
    color: var(--ink);
    font-size: 1.25rem;
}

body.customer-theme .how-it-works-note li {
    line-height: 1.7;
}

@media (max-width: 991px) {
    body.customer-theme .journey-lane {
        grid-template-columns: minmax(0, 1fr);
    }

    body.customer-theme .journey-lane__header {
        display: flex;
        align-items: center;
    }

    body.customer-theme .journey-lane__badge {
        margin-bottom: 0;
    }

    body.customer-theme .book-summary {
        gap: 1rem 1.5rem;
    }
}

@media (max-width: 768px) {
    body.customer-theme .steps-section,
    body.customer-theme .auth-page,
    body.customer-theme .book-page {
        padding-block: 2rem 2.5rem;
    }

    body.customer-theme .book-summary {
        grid-template-columns: 104px minmax(0, 1fr);
        padding: 1.25rem;
        gap: 1rem;
    }

    body.customer-theme .book-summary-cover {
        padding: 0.5rem;
    }

    body.customer-theme .book-summary-title {
        font-size: 1.25rem;
    }

    body.customer-theme .book-summary-meta > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.1rem;
        font-size: 0.875rem;
    }

    body.customer-theme .condition-row {
        padding: 1rem;
    }

    body.customer-theme .auth-panel,
    body.customer-theme .auth-page > .container > .card,
    body.customer-theme #checkout-form > .card {
        padding: 1.25rem;
    }

    body.customer-theme .how-it-works-hero {
        padding-block: 2.5rem 2rem;
    }

    body.customer-theme .journey-infographic {
        padding-block: 2rem;
    }

    body.customer-theme .journey-lane {
        padding: 1.5rem;
    }

    body.customer-theme .how-it-works-jump .btn {
        width: auto;
        flex: 1 1 auto;
    }
}

@media (max-width: 600px) {
    body.customer-theme .catalogue-page-header {
        gap: 0.75rem;
    }

    body.customer-theme .catalogue-sort-form {
        flex: 1 1 100%;
        margin-left: 0;
    }

    body.customer-theme .journey-steps {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    body.customer-theme .journey-step {
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
    }

    body.customer-theme .journey-step__marker {
        width: 52px;
        flex: 0 0 52px;
    }

    body.customer-theme .journey-step__icon {
        width: 52px;
        height: 52px;
    }

    body.customer-theme .journey-step__number {
        left: 35px;
    }

    body.customer-theme .journey-step__copy {
        text-align: left;
        padding-top: 0.25rem;
    }

    body.customer-theme .journey-step:not(:last-child)::after {
        top: 58px;
        left: 26px;
        width: 1px;
        height: calc(100% - 40px);
    }

    body.customer-theme .how-it-works-note {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    body.customer-theme .card-grid--catalogue {
        gap: 1rem;
    }

    body.customer-theme .book-card {
        padding: 1rem;
    }

    body.customer-theme .book-summary {
        grid-template-columns: 88px minmax(0, 1fr);
        padding: 1rem;
        border-radius: 20px;
    }

    body.customer-theme .book-summary-title {
        font-size: 1.125rem;
    }

    body.customer-theme .cart-line {
        gap: 0.75rem;
    }

    body.customer-theme .condition-row-action .btn {
        white-space: normal;
        text-align: center;
    }

    body.customer-theme .legal-hero {
        padding-block: 1.25rem 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.customer-theme .journey-infographic.is-running .journey-step__icon {
        animation: none;
    }

    body.customer-theme .book-card {
        transition: none;
    }
}

@media print {
    body.customer-theme .legal-hero {
        padding: 0 0 1rem;
    }

    body.customer-theme .legal-document {
        padding: 0;
        border-radius: 0;
    }

    body.customer-theme .legal-page,
    body.customer-theme .legal-hero,
    body.customer-theme .legal-document {
        background: white;
        color: black;
        border: 0;
    }
}
