/* ==========================================================================
   Doxolio design system — from the "Doxolio Website" design (2026)
   Light by default · 70% Cloud & Mists · 20% Ink · 10% Cobalt & Tangerine
   10px corners, flat (no shadows). Inter Tight headlines, Instrument Serif
   italic for one accent word, Inter for body & interface.
   ========================================================================== */

:root {
    --dx-cloud: #FAFBFF;
    --dx-cobalt-mist: #EAEEFF;
    --dx-aqua-mist: #E2F6F3;
    --dx-apricot-mist: #FFEDE4;
    --dx-cobalt: #2B44FF;
    --dx-cobalt-dark: #1F33D6;
    --dx-tangerine: #FF6B35;
    --dx-ink: #1A1F3D;
    --dx-ink-2: #474C68;
    --dx-muted: #6B7090;
    --dx-line: #E4E7F2;
    --dx-white: #FFFFFF;
    --dx-teal: #0E7C6B;      /* "Free" labels, aqua accents */
    --dx-sale: #D9480F;      /* sale prices */

    --dx-font-head: 'Inter Tight', 'Inter', system-ui, -apple-system, Arial, sans-serif;
    --dx-font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --dx-font-body: 'Inter', system-ui, -apple-system, Arial, sans-serif;

    --dx-radius: 10px;
    --dx-container: 1200px;
}

/* ---------- Base ---------- */
.dx-page,
.dx-page body {
    background: var(--dx-cloud);
}
body.dx-body {
    margin: 0;
    background: var(--dx-cloud);
    color: var(--dx-ink);
    font-family: var(--dx-font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
.dx-body *, .dx-body *::before, .dx-body *::after { box-sizing: border-box; }
.dx-body a { color: inherit; text-decoration: none; }
.dx-body a:hover { color: var(--dx-cobalt); }
.dx-body img { max-width: 100%; }
.dx-body ::selection { background: var(--dx-cobalt-mist); }
.dx-body button, .dx-body input, .dx-body select, .dx-body textarea { font-family: var(--dx-font-body); }

.dx-container {
    width: 100%;
    max-width: var(--dx-container);
    margin: 0 auto;
    padding: 0 24px;
}
@media (max-width: 575.98px) { .dx-container { padding: 0 16px; } }

.dx-section { padding: 56px 0; }
.dx-section--tight { padding: 32px 0; }
.dx-band--cobalt { background: var(--dx-cobalt-mist); }
.dx-band--aqua { background: var(--dx-aqua-mist); }
.dx-band--apricot { background: var(--dx-apricot-mist); }
.dx-band--white { background: var(--dx-white); }

/* ---------- Typography ---------- */
.dx-body h1, .dx-body h2, .dx-body h3, .dx-body h4, .dx-body h5, .dx-body h6,
.dx-h-display, .dx-h1, .dx-h2, .dx-h3 {
    font-family: var(--dx-font-head);
    color: var(--dx-ink);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin: 0;
}
.dx-h-display { font-size: clamp(44px, 6.4vw, 76px); letter-spacing: -0.045em; line-height: .98; }
.dx-h1 { font-size: clamp(36px, 4.8vw, 56px); letter-spacing: -0.045em; }
.dx-h2 { font-size: clamp(26px, 3vw, 32px); }
.dx-h3 { font-size: 20px; letter-spacing: -0.02em; line-height: 1.2; }
.dx-h4 { font-family: var(--dx-font-head); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: var(--dx-ink); }

/* One accent word in Instrument Serif italic */
.dx-serif,
.dx-body h1 em, .dx-body h2 em, .dx-body h3 em,
.dx-h-display em, .dx-h1 em, .dx-h2 em, .dx-h3 em {
    font-family: var(--dx-font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
}
.dx-h-display em, .dx-h1 em { color: var(--dx-cobalt); }
.dx-h2 em, .dx-h3 em { color: inherit; }

.dx-eyebrow {
    display: inline-block;
    font-family: var(--dx-font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dx-cobalt);
}
.dx-eyebrow--tangerine { color: var(--dx-tangerine); }
.dx-eyebrow--teal { color: var(--dx-teal); }
.dx-lead { font-size: 16px; line-height: 1.6; color: var(--dx-ink-2); max-width: 34em; }
.dx-muted { color: var(--dx-muted); }
.dx-small { font-size: 13px; }
.dx-num {
    font-family: var(--dx-font-serif);
    font-style: italic;
    font-weight: 400;
    color: var(--dx-ink-2);
}
.dx-link-u { text-decoration: underline !important; text-underline-offset: 3px; color: var(--dx-cobalt) !important; font-weight: 500; }
.dx-link-u:hover { color: var(--dx-cobalt-dark) !important; }

/* Section heading: "Browse by subject" + rule */
.dx-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid var(--dx-ink);
    margin-bottom: 24px;
}
.dx-section-head--plain { border-bottom: 0; padding-bottom: 0; }

/* ---------- Buttons ---------- */
.dx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: var(--dx-radius);
    border: 1.5px solid transparent;
    font-family: var(--dx-font-body);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    text-decoration: none !important;
}
.dx-btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.dx-btn--lg { height: 52px; padding: 0 26px; font-size: 15px; }
.dx-btn--block { width: 100%; }
.dx-btn--primary { background: var(--dx-cobalt); color: #fff !important; }
.dx-btn--primary:hover { background: var(--dx-cobalt-dark); color: #fff !important; }
.dx-btn--ink { background: var(--dx-ink); color: #fff !important; }
.dx-btn--ink:hover { background: #2B3160; color: #fff !important; }
.dx-btn--mist { background: var(--dx-cobalt-mist); color: var(--dx-ink) !important; }
.dx-btn--mist:hover { background: #DCE2FF; }
.dx-btn--outline { background: #fff; color: var(--dx-ink) !important; border-color: var(--dx-line); }
.dx-btn--outline:hover { border-color: var(--dx-ink); }
.dx-btn--ghost { background: transparent; color: var(--dx-ink) !important; }
.dx-btn:focus-visible, .dx-input:focus-visible { outline: 3px solid rgba(43, 68, 255, .35); outline-offset: 2px; }

.dx-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: var(--dx-radius);
    background: var(--dx-cobalt-mist);
    color: var(--dx-ink);
    border: 0;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.dx-icon-btn:hover { background: var(--dx-cobalt); color: #fff; }

/* ---------- Chips / pills / tags ---------- */
.dx-chip {
    display: inline-flex; align-items: center;
    height: 30px; padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--dx-line);
    background: #fff;
    font-size: 12px; font-weight: 500;
    color: var(--dx-ink) !important;
    white-space: nowrap;
}
.dx-chip:hover { border-color: var(--dx-ink); }
.dx-chip.is-active { background: var(--dx-ink); border-color: var(--dx-ink); color: #fff !important; }
.dx-tag {
    display: inline-flex; align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px; font-weight: 600;
    background: var(--dx-cobalt-mist); color: var(--dx-cobalt);
}
.dx-tag--free { background: var(--dx-aqua-mist); color: var(--dx-teal); }
.dx-tag--new, .dx-tag--sale { background: var(--dx-apricot-mist); color: var(--dx-sale); }
.dx-tag--outline { background: #fff; border: 1px solid var(--dx-line); color: var(--dx-ink); }

/* ---------- Forms ---------- */
.dx-label { display: block; font-size: 13px; font-weight: 600; color: var(--dx-ink); margin-bottom: 8px; }
.dx-input, .dx-select, .dx-textarea {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--dx-line);
    border-radius: var(--dx-radius);
    background: var(--dx-cloud);
    color: var(--dx-ink);
    font-size: 14px;
    transition: border-color .15s ease, background-color .15s ease;
}
.dx-textarea { height: auto; min-height: 140px; padding: 12px 14px; resize: vertical; }
.dx-input:focus, .dx-select:focus, .dx-textarea:focus {
    outline: none; border-color: var(--dx-cobalt); background: #fff;
}
.dx-input.is-invalid, .dx-select.is-invalid { border-color: var(--dx-sale); }
.dx-field { margin-bottom: 18px; }
.dx-help { font-size: 12px; color: var(--dx-muted); margin-top: 6px; }
.dx-error { font-size: 12px; color: var(--dx-sale); margin-top: 6px; }
.dx-check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dx-ink); cursor: pointer; }
.dx-check input { width: 16px; height: 16px; accent-color: var(--dx-cobalt); margin: 0; }
.dx-divider-text {
    display: flex; align-items: center; gap: 12px;
    font-size: 12px; color: var(--dx-muted);
    margin: 20px 0;
}
.dx-divider-text::before, .dx-divider-text::after { content: ""; flex: 1; height: 1px; background: var(--dx-line); }

.dx-card {
    background: #fff;
    border: 1px solid var(--dx-line);
    border-radius: 14px;
    padding: 24px;
}
.dx-alert {
    border-radius: var(--dx-radius);
    padding: 12px 16px;
    font-size: 14px;
    background: var(--dx-cobalt-mist);
    color: var(--dx-ink);
    margin-bottom: 16px;
}
.dx-alert--success { background: var(--dx-aqua-mist); color: var(--dx-teal); }
.dx-alert--danger { background: var(--dx-apricot-mist); color: var(--dx-sale); }

/* ---------- Logo ---------- */
.dx-logo { display: inline-flex; align-items: center; gap: 9px; }
.dx-logo__mark { width: 28px; height: 28px; flex: none; }
.dx-logo__word {
    font-family: var(--dx-font-head);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.04em;
    color: var(--dx-ink);
    line-height: 1;
}

/* ---------- Header ---------- */
.dx-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #fff;
    border-bottom: 1px solid var(--dx-line);
}
.dx-header__inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.dx-nav { display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; list-style: none; }
.dx-nav a {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    color: var(--dx-ink);
    padding: 24px 0;
}
.dx-nav a.is-active { color: var(--dx-cobalt); }
.dx-nav a.is-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 14px;
    height: 2px; background: var(--dx-cobalt); border-radius: 2px;
}
.dx-header__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.dx-search { position: relative; width: 240px; }
.dx-search input {
    width: 100%; height: 40px;
    border: 0; border-radius: var(--dx-radius);
    background: var(--dx-cobalt-mist);
    padding: 0 14px 0 36px;
    font-size: 13px; color: var(--dx-ink);
}
.dx-search input::placeholder { color: var(--dx-muted); }
.dx-search input:focus { outline: 2px solid var(--dx-cobalt); background: #fff; }
.dx-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dx-muted); }
.dx-cart-btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--dx-line); border-radius: var(--dx-radius);
    background: #fff; color: var(--dx-ink);
}
.dx-cart-btn:hover { border-color: var(--dx-ink); color: var(--dx-ink); }
.dx-cart-count {
    position: absolute; top: -6px; right: -6px;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px;
    background: var(--dx-tangerine); color: #fff;
    font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.dx-user { position: relative; }
.dx-user > button {
    display: inline-flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 10px 0 4px;
    border: 1px solid var(--dx-line); border-radius: var(--dx-radius);
    background: #fff; color: var(--dx-ink); font-size: 13px; font-weight: 500;
    white-space: nowrap; line-height: 1; font-family: var(--dx-font-body);
}
.dx-header, .dx-footer { font-family: var(--dx-font-body); }
.dx-header ul, .dx-header nav { margin-bottom: 0; }
.dx-user img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.dx-user .dropdown-menu {
    border: 1px solid var(--dx-line); border-radius: 12px; padding: 6px;
    box-shadow: 0 12px 32px rgba(26, 31, 61, .08);
}
.dx-user .dropdown-item { border-radius: 8px; font-size: 14px; padding: 8px 12px; }
.dx-user .dropdown-item:active { background: var(--dx-cobalt); }

.dx-user .dropdown-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 1040;
    min-width: 180px; background: #fff;
}
.dx-user .dropdown-menu.show { display: block; }
.dx-user .dropdown-item { display: block; color: var(--dx-ink); }
.dx-user .dropdown-item:hover { background: var(--dx-cobalt-mist); color: var(--dx-ink); }

/* Cookie consent */
.dx-body .consent-wrapper, body.dx-legacy .consent-wrapper {
    border: 1px solid var(--dx-line); border-radius: 14px; padding: 18px 20px 20px;
    box-shadow: 0 18px 44px rgba(26, 31, 61, .12); max-width: 330px;
    font-family: var(--dx-font-body);
}
.dx-body .consent-wrapper header h2, body.dx-legacy .consent-wrapper header h2 {
    font-family: var(--dx-font-head); font-size: 18px; font-weight: 700; color: var(--dx-ink); letter-spacing: -0.02em; margin: 0;
}
.dx-body .consent-wrapper .data p, body.dx-legacy .consent-wrapper .data p { font-size: 13px; color: var(--dx-ink-2); margin: 0; line-height: 1.55; }
.dx-body .consent-wrapper .buttons, body.dx-legacy .consent-wrapper .buttons { gap: 8px; }
.dx-body .consent-wrapper .button, body.dx-legacy .consent-wrapper .button {
    flex: 1; height: 38px; border-radius: var(--dx-radius); font-family: var(--dx-font-body); font-size: 13px; font-weight: 600;
    background: var(--dx-cobalt) !important; border: 1.5px solid var(--dx-cobalt) !important; color: #fff !important; padding: 0;
}
.dx-body .consent-wrapper #declineBtn, body.dx-legacy .consent-wrapper #declineBtn {
    background: #fff !important; border-color: var(--dx-line) !important; color: var(--dx-ink) !important;
}
@media (max-width: 767.98px) { .dx-body .consent-wrapper.show { left: 12px; right: 12px; bottom: 80px; max-width: none; width: auto; } }

.dx-menu-btn { display: none; }
.dx-mobile-panel { display: none; }

@media (max-width: 1099.98px) {
    .dx-search { width: 190px; }
    .dx-nav { gap: 16px; }
}
@media (max-width: 991.98px) {
    .dx-nav, .dx-search, .dx-header__auth { display: none !important; }
    .dx-menu-btn { display: inline-flex; }
    .dx-header__inner { height: 60px; }
    .dx-mobile-panel.is-open {
        display: block;
        border-top: 1px solid var(--dx-line);
        padding: 16px 0 20px;
        background: #fff;
    }
    .dx-mobile-panel .dx-search { display: block !important; width: 100%; margin-bottom: 12px; }
    .dx-mobile-panel nav a { display: block; padding: 12px 0; font-size: 16px; font-weight: 500; border-bottom: 1px solid var(--dx-line); }
    .dx-mobile-panel nav a.is-active { color: var(--dx-cobalt); }
    .dx-mobile-panel .dx-mobile-auth { display: flex; gap: 10px; margin-top: 16px; }
    .dx-mobile-panel .dx-mobile-auth .dx-btn { flex: 1; }
}

/* ---------- Mobile tab bar ---------- */
.dx-tabbar { display: none; }
@media (max-width: 767.98px) {
    .dx-tabbar {
        display: grid; grid-template-columns: repeat(4, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
        background: #fff; border-top: 1px solid var(--dx-line);
        padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    }
    .dx-tabbar a {
        display: flex; flex-direction: column; align-items: center; gap: 4px;
        font-size: 11px; font-weight: 500; color: var(--dx-muted);
    }
    .dx-tabbar a.is-active { color: var(--dx-cobalt); }
    .dx-tabbar svg { width: 20px; height: 20px; }
    body.dx-body { padding-bottom: 68px; }
}

/* ---------- Footer ---------- */
.dx-newsletter-row {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    border-top: 1.5px solid var(--dx-ink);
    padding: 28px 0 40px;
}
.dx-newsletter-row form { display: flex; gap: 8px; width: min(100%, 420px); }
.dx-footer {
    background: #fff;
    border-top: 1px solid var(--dx-line);
    padding: 40px 0 0;
    font-size: 13px;
}
.dx-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.dx-footer__tag {
    font-family: var(--dx-font-head); font-weight: 700; font-size: 18px;
    letter-spacing: -0.03em; margin: 14px 0 18px;
}
.dx-footer__tag em { font-family: var(--dx-font-serif); font-style: italic; font-weight: 400; color: var(--dx-cobalt); }
.dx-footer__news { display: flex; gap: 8px; max-width: 320px; }
.dx-footer__news .dx-input { height: 38px; font-size: 13px; }
.dx-footer__news .dx-btn { height: 38px; font-size: 13px; }
.dx-footer h6 { font-family: var(--dx-font-body); font-size: 13px; font-weight: 700; letter-spacing: 0; margin-bottom: 12px; }
.dx-footer ul { list-style: none; margin: 0; padding: 0; }
.dx-footer li { margin-bottom: 9px; color: var(--dx-ink-2); }
.dx-footer li a { color: var(--dx-ink-2); }
.dx-footer li a:hover { color: var(--dx-cobalt); }
.dx-footer__social { display: flex; gap: 12px; flex-wrap: wrap; }
.dx-footer__social a { color: var(--dx-cobalt) !important; text-decoration: underline; text-underline-offset: 3px; }
.dx-footer__bottom {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    border-top: 1px solid var(--dx-line);
    margin-top: 32px; padding: 16px 0;
    font-size: 12px; color: var(--dx-ink-2);
}
.dx-footer__bottom nav { display: flex; gap: 16px; align-items: center; }
.dx-footer__bottom nav a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 767.98px) {
    .dx-footer__grid { grid-template-columns: 1fr 1fr; }
    .dx-footer__grid > :first-child { grid-column: 1 / -1; }
    .dx-newsletter-row { flex-direction: column; align-items: stretch; }
}

/* ---------- Covers ---------- */
.dx-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: var(--dx-radius);
    overflow: hidden;
    background: var(--dx-cobalt-mist);
    border: 1px solid var(--dx-line);
}
.dx-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dx-cover .dx-tag { position: absolute; top: 10px; right: 10px; }
/* Shape cover — used when a title has no cover art */
.dx-shape-cover { padding: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.dx-shape-cover__label { font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dx-ink); position: relative; z-index: 1; }
.dx-shape-cover__title { font-family: var(--dx-font-head); font-weight: 700; font-size: 18px; letter-spacing: -0.03em; line-height: 1.1; color: var(--dx-ink); position: relative; z-index: 1; }
.dx-shape-cover::after { content: ""; position: absolute; }
.dx-shape-cover--0 { background: var(--dx-cobalt-mist); }
.dx-shape-cover--0::after { width: 58%; aspect-ratio: 1; border-radius: 50%; background: var(--dx-cobalt); right: -8%; top: 22%; }
.dx-shape-cover--1 { background: var(--dx-apricot-mist); }
.dx-shape-cover--1::after { width: 62%; aspect-ratio: 1; border-radius: 100% 0 0 0; background: var(--dx-tangerine); right: 0; top: 28%; }
.dx-shape-cover--2 { background: var(--dx-aqua-mist); }
.dx-shape-cover--2::after { width: 40%; aspect-ratio: 1; background: var(--dx-ink); right: 0; top: 26%; }
.dx-shape-cover--3 { background: #fff; }
.dx-shape-cover--3::after { width: 54%; aspect-ratio: 1; border-radius: 50%; background: var(--dx-cobalt-mist); right: -10%; top: 24%; }

/* ---------- Book card ---------- */
.dx-grid-books {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 20px;
}
.dx-grid-books--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dx-grid-books--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 991.98px) { .dx-grid-books, .dx-grid-books--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .dx-grid-books, .dx-grid-books--5, .dx-grid-books--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; } }

.dx-book { display: flex; flex-direction: column; min-width: 0; }
.dx-book__meta { margin-top: 10px; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dx-muted); }
.dx-book__title {
    margin-top: 3px;
    font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--dx-ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.7em;
}
.dx-book__title:hover { color: var(--dx-cobalt); }
.dx-book__author { font-size: 12px; color: var(--dx-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-book__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.dx-price { font-family: var(--dx-font-head); font-weight: 700; font-size: 16px; letter-spacing: -0.02em; color: var(--dx-ink); }
.dx-price--sale { color: var(--dx-sale); }
.dx-price--free { color: var(--dx-teal); }
.dx-price s { font-family: var(--dx-font-body); font-weight: 400; font-size: 12px; color: var(--dx-muted); margin-left: 4px; }
.dx-book form { margin: 0; }

/* ---------- Home ---------- */
.dx-hero { padding: 56px 0 48px; overflow: hidden; }
.dx-hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.dx-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.dx-hero__find { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; font-size: 12px; color: var(--dx-ink-2); }
.dx-hero__stack { position: relative; height: 330px; }
.dx-hero__stack .dx-cover { position: absolute; width: 168px; box-shadow: 0 18px 40px rgba(26, 31, 61, .12); }
.dx-hero__stack .dx-cover:nth-child(1) { left: 2%; top: 46px; transform: rotate(-3deg); z-index: 1; }
.dx-hero__stack .dx-cover:nth-child(2) { left: 30%; top: 0; z-index: 2; }
.dx-hero__stack .dx-cover:nth-child(3) { left: 58%; top: 70px; transform: rotate(3deg); z-index: 3; }
@media (max-width: 991.98px) {
    .dx-hero__grid { grid-template-columns: 1fr; }
    .dx-hero__stack { height: 280px; max-width: 520px; }
    .dx-hero__stack .dx-cover { width: 140px; }
}
@media (max-width: 575.98px) {
    .dx-hero { padding: 32px 0; }
    .dx-hero__stack { display: none; }
}

.dx-subjects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dx-subject {
    display: flex; align-items: center; gap: 12px;
    height: 64px; padding: 0 16px;
    background: #fff; border: 1px solid var(--dx-line); border-radius: var(--dx-radius);
    font-size: 14px; font-weight: 600; color: var(--dx-ink);
}
.dx-subject:hover { border-color: var(--dx-ink); color: var(--dx-ink); }
.dx-subject__icon {
    flex: none; width: 32px; height: 32px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--dx-cobalt-mist); color: var(--dx-ink);
}
.dx-subject:nth-child(4n+2) .dx-subject__icon { background: var(--dx-apricot-mist); }
.dx-subject:nth-child(4n+3) .dx-subject__icon { background: var(--dx-aqua-mist); }
.dx-subject__name { flex: 1; min-width: 0; line-height: 1.2; }
.dx-subject .dx-num { font-size: 14px; color: var(--dx-muted); }
@media (max-width: 991.98px) { .dx-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
    .dx-subjects { grid-template-columns: 1fr; gap: 0; }
    .dx-subject { border: 0; border-bottom: 1px solid var(--dx-line); border-radius: 0; background: transparent; padding: 0; }
}

.dx-filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }

.dx-publish-band {
    position: relative; overflow: hidden;
    background: var(--dx-apricot-mist);
    border-radius: 16px;
    padding: 40px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
}
.dx-publish-band::after {
    content: ""; position: absolute; right: -55px; top: -55px;
    width: 130px; height: 130px; border-radius: 50%; background: var(--dx-tangerine);
}
.dx-publish-band .dx-steps { padding-right: 56px; }
@media (max-width: 767.98px) { .dx-publish-band .dx-steps { padding-right: 0; } }
.dx-steps { list-style: none; padding: 0; margin: 0; position: relative; z-index: 1; }
.dx-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 6px; padding: 14px 0; border-bottom: 1px solid rgba(26, 31, 61, .15); }
.dx-steps li:first-child { padding-top: 0; }
.dx-steps .dx-num { font-size: 28px; line-height: 1; color: var(--dx-ink); }
.dx-steps h4 { font-size: 15px; margin-bottom: 4px; letter-spacing: -0.01em; }
.dx-steps p { margin: 0; font-size: 13px; color: var(--dx-ink-2); }
@media (max-width: 767.98px) {
    .dx-publish-band { grid-template-columns: 1fr; padding: 28px 22px; }
}

.dx-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dx-duo > * { border-radius: 16px; padding: 28px; }
.dx-free-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.dx-free-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: #fff; border-radius: var(--dx-radius); padding: 12px 14px;
}
.dx-free-list strong { display: block; font-size: 13px; }
.dx-free-list small { color: var(--dx-muted); font-size: 11px; }
.dx-free-list a.dx-link-u { color: var(--dx-teal) !important; font-size: 13px; }
@media (max-width: 767.98px) { .dx-duo { grid-template-columns: 1fr; } }

/* ---------- Listing (All books) ---------- */
.dx-page-head { background: var(--dx-cobalt-mist); padding: 28px 0 32px; }
.dx-crumbs { font-size: 12px; color: var(--dx-ink-2); margin-bottom: 14px; }
.dx-crumbs a { text-decoration: underline; text-underline-offset: 2px; }
.dx-listing { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 32px 0 56px; }
.dx-filters h6 {
    font-family: var(--dx-font-body); font-size: 11px; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; color: var(--dx-cobalt);
    margin: 0 0 10px;
}
.dx-filters ul { list-style: none; padding: 0; margin: 0 0 28px; }
.dx-filters li a {
    display: block; padding: 6px 10px; border-radius: 8px;
    font-size: 13px; color: var(--dx-ink-2);
}
.dx-filters li a:hover { color: var(--dx-ink); background: rgba(43, 68, 255, .05); }
.dx-filters li a.is-active { background: var(--dx-cobalt-mist); color: var(--dx-ink); font-weight: 600; }
.dx-listing__bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding-bottom: 12px; border-bottom: 1.5px solid var(--dx-ink); margin-bottom: 24px;
    font-size: 13px; color: var(--dx-ink-2);
}
.dx-listing__bar select { height: 34px; width: auto; font-size: 13px; padding: 0 30px 0 10px; }
.dx-filters-toggle { display: none; }
@media (max-width: 991.98px) {
    .dx-listing { grid-template-columns: 1fr; gap: 0; }
    .dx-filters { display: none; }
    .dx-filters.is-open { display: block; padding-bottom: 8px; }
    .dx-filters-toggle { display: inline-flex; margin-bottom: 16px; }
}

/* Pagination */
.dx-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
.dx-pagination a, .dx-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 12px;
    border: 1px solid var(--dx-line); border-radius: 8px; background: #fff;
    font-size: 13px; font-weight: 500; color: var(--dx-ink);
}
.dx-pagination a:hover { border-color: var(--dx-ink); }
.dx-pagination .is-active { background: var(--dx-ink); border-color: var(--dx-ink); color: #fff; }
.dx-pagination .is-disabled { color: var(--dx-muted); opacity: .6; }

/* ---------- Book detail ---------- */
.dx-detail { display: grid; grid-template-columns: 420px 1fr; gap: 48px; padding: 8px 0 40px; }
.dx-detail__cover .dx-cover { box-shadow: 0 18px 40px rgba(26, 31, 61, .1); }
.dx-detail__tags { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.dx-detail__by { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding-bottom: 18px; border-bottom: 1px solid var(--dx-line); font-size: 13px; }
.dx-avatar {
    flex: none; width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--dx-aqua-mist); color: var(--dx-teal);
    font-family: var(--dx-font-serif); font-style: italic; font-size: 15px;
    overflow: hidden;
}
.dx-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dx-detail__price { display: flex; align-items: baseline; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--dx-line); }
.dx-detail__price .dx-price { font-size: 30px; }
.dx-detail__buy { display: flex; gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--dx-line); }
.dx-qty {
    display: inline-flex; align-items: center;
    height: 44px; border: 1px solid var(--dx-line); border-radius: var(--dx-radius); background: #fff;
}
.dx-qty button { width: 34px; height: 100%; border: 0; background: transparent; font-size: 16px; color: var(--dx-ink); cursor: pointer; }
.dx-qty input { width: 36px; border: 0; text-align: center; font-weight: 600; font-size: 14px; background: transparent; }
.dx-specs { display: grid; grid-template-columns: 1fr 1fr; }
.dx-specs > div { padding: 14px 0; border-bottom: 1px solid var(--dx-line); }
.dx-specs dt { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dx-muted); margin-bottom: 2px; }
.dx-specs dd { margin: 0; font-size: 13px; }
.dx-tabs { display: flex; gap: 28px; border-bottom: 1.5px solid var(--dx-ink); margin-bottom: 20px; }
.dx-tabs button {
    background: none; border: 0; padding: 0 0 12px; position: relative;
    font-size: 14px; font-weight: 500; color: var(--dx-ink-2); cursor: pointer;
}
.dx-tabs button.is-active { color: var(--dx-cobalt); }
.dx-tabs button.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1.5px; height: 2px; background: var(--dx-cobalt); }
.dx-tabpanel { display: none; font-size: 14px; line-height: 1.7; color: var(--dx-ink-2); max-width: 760px; }
.dx-tabpanel.is-active { display: block; }
.dx-review { padding: 16px 0; border-bottom: 1px solid var(--dx-line); }
.dx-stars { color: var(--dx-tangerine); letter-spacing: 2px; }
@media (max-width: 991.98px) { .dx-detail { grid-template-columns: 1fr; gap: 28px; } .dx-detail__cover { max-width: 360px; } }

/* ---------- Author ---------- */
.dx-author-head { position: relative; overflow: hidden; background: var(--dx-aqua-mist); padding: 44px 0; }
.dx-author-head::before { content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.55); }
.dx-author-head::after { content: ""; position: absolute; right: 70px; bottom: -70px; width: 140px; height: 140px; border-radius: 100% 0 0 0; background: var(--dx-tangerine); }
.dx-author-head__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 112px 1fr auto; gap: 28px; align-items: center; }
.dx-author-head .dx-avatar { width: 112px; height: 112px; background: #fff; font-size: 48px; box-shadow: 0 8px 24px rgba(26,31,61,.08); }
.dx-author-stats { display: flex; gap: 28px; text-align: center; margin-right: 160px; }
.dx-author-stats .dx-num { display: block; font-size: 30px; color: var(--dx-ink); line-height: 1; margin-top: 6px; }
@media (max-width: 767.98px) {
    .dx-author-head__grid { grid-template-columns: 1fr; gap: 16px; }
    .dx-author-stats { margin-right: 0; text-align: left; }
}

/* ---------- Cart ---------- */
.dx-cart { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; padding: 40px 0 64px; }
.dx-cart__list { border-top: 1.5px solid var(--dx-ink); margin-top: 22px; }
.dx-cart__item { display: grid; grid-template-columns: 64px 1fr auto 110px; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--dx-line); }
.dx-cart__item .dx-cover { width: 64px; aspect-ratio: 4 / 5; }
.dx-cart__item h4 { font-family: var(--dx-font-body); font-size: 14px; font-weight: 600; letter-spacing: 0; margin-bottom: 2px; }
.dx-cart__item small { color: var(--dx-muted); font-size: 12px; display: block; }
.dx-cart__remove { font-size: 12px; color: var(--dx-sale) !important; text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; margin-top: 6px; cursor: pointer; }
.dx-cart__item .dx-price { text-align: right; }
.dx-summary { position: sticky; top: 92px; }
.dx-summary__row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 14px; }
.dx-summary__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1.5px solid var(--dx-ink); padding-top: 16px; margin: 18px 0; }
.dx-summary__total .dx-price { font-size: 28px; }
@media (max-width: 991.98px) { .dx-cart { grid-template-columns: 1fr; } .dx-summary { position: static; } }
@media (max-width: 575.98px) {
    .dx-cart__item { grid-template-columns: 56px 1fr; }
    .dx-cart__item .dx-qty, .dx-cart__item .dx-price { grid-column: 2; justify-self: start; }
}

/* ---------- About ---------- */
.dx-about-hero { display: grid; grid-template-columns: 1.3fr 1fr; min-height: 340px; }
.dx-about-hero__art { position: relative; background: var(--dx-cobalt-mist); overflow: hidden; }
.dx-about-hero__art::before { content: ""; position: absolute; width: 58%; aspect-ratio: 1; border-radius: 50%; background: var(--dx-cobalt); left: 22%; top: 12%; }
.dx-about-hero__art::after { content: ""; position: absolute; width: 34%; aspect-ratio: 1; border-radius: 100% 0 0 0; background: var(--dx-apricot-mist); left: 0; bottom: 0; }
.dx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.dx-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.dx-pillars span { padding: 10px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.dx-tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.dx-tri h3 { font-family: var(--dx-font-serif); font-style: italic; font-weight: 400; font-size: 28px; letter-spacing: -0.01em; margin-bottom: 8px; }
.dx-tri p { font-size: 14px; color: var(--dx-ink-2); margin: 0; }
.dx-team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.dx-team--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 991.98px) { .dx-team--5 { grid-template-columns: repeat(3, 1fr); } }
.dx-team__photo { aspect-ratio: 1 / .9; border-radius: 12px; position: relative; overflow: hidden; }
.dx-team__photo img { width: 100%; height: 100%; object-fit: cover; }
.dx-team strong { display: block; margin-top: 10px; font-size: 14px; }
.dx-team small { color: var(--dx-muted); }
@media (max-width: 767.98px) {
    .dx-about-hero, .dx-two, .dx-tri { grid-template-columns: 1fr; }
    .dx-about-hero__art { min-height: 200px; }
    .dx-team { grid-template-columns: 1fr 1fr; }
}

/* ---------- Articles ---------- */
.dx-feature { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; margin: 32px 0 40px; }
.dx-art {
    position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 16 / 10;
    background: var(--dx-cobalt-mist);
}
.dx-art img { width: 100%; height: 100%; object-fit: cover; }
.dx-art--shapes::before { content: ""; position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; background: var(--dx-cobalt); right: 12%; top: 12%; }
.dx-art--shapes::after { content: ""; position: absolute; width: 30%; aspect-ratio: 1; border-radius: 0 100% 0 0; background: var(--dx-tangerine); left: 10%; bottom: 0; }
.dx-articles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.dx-articles .dx-art { aspect-ratio: 16 / 10; margin-bottom: 12px; }
.dx-articles h3 { font-size: 17px; margin: 6px 0 4px; }
@media (max-width: 991.98px) { .dx-articles { grid-template-columns: repeat(2, 1fr); } .dx-feature { grid-template-columns: 1fr; } }
.dx-prose { max-width: 720px; font-size: 16px; line-height: 1.75; color: var(--dx-ink-2); }
.dx-prose p { margin: 0 0 1.1em; }
.dx-prose h2, .dx-prose h3 { margin: 1.6em 0 .6em; }
.dx-prose img { border-radius: 12px; margin: 1em 0; }

/* ---------- FAQ ---------- */
.dx-faq { display: grid; grid-template-columns: 180px 1fr; gap: 32px; padding: 32px 0 56px; }
.dx-faq__nav { list-style: none; padding: 0; margin: 0; position: sticky; top: 92px; align-self: start; }
.dx-faq__nav a { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.dx-faq__nav a.is-active, .dx-faq__nav a:hover { background: var(--dx-cobalt-mist); }
.dx-faq__nav .dx-num { font-size: 13px; }
.dx-faq__group { margin-bottom: 40px; scroll-margin-top: 92px; }
.dx-faq details { border-bottom: 1px solid var(--dx-line); }
.dx-faq summary {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    list-style: none; cursor: pointer; padding: 16px 0;
    font-size: 14px; font-weight: 600;
}
.dx-faq summary::-webkit-details-marker { display: none; }
.dx-faq summary::after { content: "+"; font-size: 20px; font-weight: 400; color: var(--dx-ink-2); }
.dx-faq details[open] summary::after { content: "\2212"; }
.dx-faq__body { padding: 0 0 18px; font-size: 14px; line-height: 1.7; color: var(--dx-ink-2); }
.dx-faq__body ol, .dx-faq__body ul { padding-left: 18px; margin: 0; }
.dx-callout {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    border-radius: 12px; padding: 22px 24px;
}
.dx-callout h4 { font-size: 16px; margin-bottom: 2px; }
.dx-callout p { margin: 0; font-size: 13px; color: var(--dx-ink-2); }
@media (max-width: 767.98px) {
    .dx-faq { grid-template-columns: 1fr; }
    .dx-faq__nav { position: static; display: flex; overflow-x: auto; gap: 6px; }
    .dx-faq__nav a { white-space: nowrap; }
}

/* ---------- Contact ---------- */
.dx-contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; padding: 48px 0; }
.dx-contact__list { list-style: none; padding: 0; margin: 26px 0 18px; border-top: 1.5px solid var(--dx-ink); }
.dx-contact__list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--dx-line); }
.dx-contact__list .dx-num { font-size: 20px; }
.dx-contact__list small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--dx-cobalt); }
.dx-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 767.98px) { .dx-contact, .dx-form-grid { grid-template-columns: 1fr; } }

/* ---------- Auth ---------- */
.dx-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 40px 0 56px; align-items: stretch; }
.dx-auth__art { position: relative; overflow: hidden; border-radius: 16px; background: var(--dx-cobalt-mist); min-height: 460px; display: flex; align-items: flex-end; padding: 32px; }
.dx-auth__art::before { content: ""; position: absolute; width: 50%; aspect-ratio: 1; border-radius: 50%; background: var(--dx-cobalt); right: -10%; top: -6%; }
.dx-auth__art::after { content: ""; position: absolute; width: 28%; aspect-ratio: 1; border-radius: 0 100% 0 0; background: var(--dx-apricot-mist); left: 0; top: 22%; }
.dx-auth__art .dx-h-display { position: relative; z-index: 1; font-size: clamp(36px, 4vw, 52px); }
.dx-role { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.dx-role label {
    display: grid; grid-template-columns: 18px 1fr; gap: 2px 10px; align-items: center;
    padding: 14px; border: 1.5px solid var(--dx-line); border-radius: var(--dx-radius); background: #fff; cursor: pointer;
}
.dx-role input { margin: 0; accent-color: var(--dx-cobalt); }
.dx-role strong { font-size: 14px; }
.dx-role small { grid-column: 2; font-size: 12px; color: var(--dx-muted); }
.dx-role label:has(input:checked) { border-color: var(--dx-cobalt); background: var(--dx-cobalt-mist); }
.dx-social-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dx-login-wrap { position: relative; overflow: hidden; background: var(--dx-cobalt-mist); padding: 40px 0 56px; }
.dx-login-wrap::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: var(--dx-cobalt); left: -150px; top: -150px; }
.dx-login-wrap::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: var(--dx-apricot-mist); right: -110px; bottom: -130px; }
.dx-login-card { position: relative; z-index: 1; max-width: 420px; margin: 0 auto; background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 24px 60px rgba(26, 31, 61, .08); }
@media (max-width: 767.98px) { .dx-auth { grid-template-columns: 1fr; } .dx-auth__art { display: none; } .dx-role { grid-template-columns: 1fr; } }

/* ---------- Legal ---------- */
.dx-legal { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 24px 0 56px; }
.dx-legal__toc { position: sticky; top: 92px; align-self: start; border-top: 1.5px solid var(--dx-ink); padding-top: 12px; }
.dx-legal__toc ol { list-style: none; padding: 0; margin: 10px 0 0; }
.dx-legal__toc li a { display: grid; grid-template-columns: 22px 1fr; gap: 6px; padding: 5px 0; font-size: 13px; color: var(--dx-ink-2); }
.dx-legal__toc li a:hover { color: var(--dx-cobalt); }
.dx-legal__body { font-size: 14.5px; line-height: 1.75; color: var(--dx-ink-2); min-width: 0; }
.dx-legal__body h2 { font-size: 22px; margin: 34px 0 12px; padding-top: 22px; border-top: 1px solid var(--dx-line); scroll-margin-top: 92px; }
.dx-legal__body h2:first-of-type { border-top: 0; padding-top: 0; }
.dx-legal__body h2 .dx-num { font-size: 22px; margin-right: 6px; color: var(--dx-cobalt); }
.dx-legal__body strong, .dx-legal__body b { color: var(--dx-ink); }
.dx-legal__body ol, .dx-legal__body ul { padding-left: 20px; }
/* Legacy legal markup inside the new layout */
.dx-legal__body section, .dx-legal__body .container, .dx-legal__body .row, .dx-legal__body [class*="col-"] {
    max-width: none; width: auto; padding: 0; margin: 0; flex: none; display: block; background: none;
}
.dx-legal__body section > .container > .row > [class*="col-"] > h5:first-child,
.dx-legal__body section > .container > .row > [class*="col-"] > h1:first-of-type { display: none; }
.dx-legal__body h1 { font-size: 26px; margin: 48px 0 12px; padding-top: 24px; border-top: 1.5px solid var(--dx-ink); }
.dx-legal__body p { margin: 0 0 1em; }
.dx-legal__body p[style*="background"] { background: var(--dx-cobalt-mist) !important; border-radius: var(--dx-radius); padding: 14px 16px !important; color: var(--dx-ink); }
.dx-legal__body ol[style*="upper-roman"] > li { margin-top: 28px; scroll-margin-top: 92px; }
.dx-legal__body ol[style*="upper-roman"] > li > strong {
    display: block; font-family: var(--dx-font-head); font-size: 20px; letter-spacing: -0.02em; margin-bottom: 8px; color: var(--dx-ink);
}
.dx-legal__body li > strong { color: var(--dx-ink); }
.dx-legal__body li { margin-bottom: 6px; }
.dx-legal__body a { color: var(--dx-cobalt); text-decoration: underline; }
.dx-legal__body .text-danger { color: var(--dx-sale) !important; }
.dx-legal__toc li a { grid-template-columns: 24px 1fr; }
@media (max-width: 991.98px) { .dx-legal { grid-template-columns: 1fr; } .dx-legal__toc { position: static; } }

/* ---------- Utilities ---------- */
.dx-stack-sm > * + * { margin-top: 8px; }
.dx-stack > * + * { margin-top: 16px; }
.dx-mt-0 { margin-top: 0 !important; }
.dx-mt-1 { margin-top: 8px !important; }
.dx-mt-2 { margin-top: 16px !important; }
.dx-mt-3 { margin-top: 24px !important; }
.dx-mt-4 { margin-top: 40px !important; }
.dx-mb-0 { margin-bottom: 0 !important; }
.dx-mb-2 { margin-bottom: 16px !important; }
.dx-mb-3 { margin-bottom: 24px !important; }
.dx-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dx-center { text-align: center; }
.dx-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dx-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dx-hide-mobile { }
@media (max-width: 767.98px) { .dx-hide-mobile { display: none !important; } }

/* ---------- Legacy pages (layouts.master) ----------
   Pages not yet rebuilt still use the old layout; these rules make them sit
   comfortably under the new header and footer. */
body.dx-legacy { background: var(--dx-cloud); font-family: var(--dx-font-body); color: var(--dx-ink); }
body.dx-legacy main > .container-fluid { padding: 0; }
body.dx-legacy h1, body.dx-legacy h2, body.dx-legacy h3, body.dx-legacy h4, body.dx-legacy h5 { font-family: var(--dx-font-head); letter-spacing: -0.02em; color: var(--dx-ink); }
body.dx-legacy .btn-danger, body.dx-legacy .btn-primary, body.dx-legacy .btn-get-started {
    background: var(--dx-cobalt) !important; border-color: var(--dx-cobalt) !important; color: #fff !important; border-radius: var(--dx-radius) !important; box-shadow: none !important;
}
body.dx-legacy .card { border: 1px solid var(--dx-line); border-radius: 12px; }
body.dx-legacy .card-header.bg-dark { background: var(--dx-ink) !important; }

/* ---------- Buyer account area (layouts.user-master) ---------- */
.dx-account-tabs { background: #fff; border-bottom: 1px solid var(--dx-line); }
.dx-account-tabs .dx-container { display: flex; align-items: center; gap: 22px; height: 52px; overflow-x: auto; }
.dx-account-tabs .dx-eyebrow { margin-right: 6px; white-space: nowrap; }
.dx-account-tabs a {
    position: relative; font-family: var(--dx-font-body); font-size: 14px; font-weight: 500; color: var(--dx-ink-2);
    padding: 16px 0; white-space: nowrap;
}
.dx-account-tabs a:hover { color: var(--dx-ink); text-decoration: none; }
.dx-account-tabs a.is-active { color: var(--dx-cobalt); }
.dx-account-tabs a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 2px; background: var(--dx-cobalt); border-radius: 2px; }
.dx-account-main { min-height: 50vh; padding-bottom: 56px; }
body.dx-account .container { max-width: var(--dx-container); padding-left: 24px; padding-right: 24px; }
/* Page titles were grey boxes ("my-4 p-3 bg-light"); show them as plain headings */
body.dx-account .dx-account-main h4.bg-light,
body.dx-account .dx-account-main h3.bg-light {
    background: none !important; padding: 0 !important; margin: 32px 0 20px !important;
    font-family: var(--dx-font-head); font-weight: 700; font-size: 32px; letter-spacing: -0.04em; color: var(--dx-ink);
}
body.dx-account .card { border: 1px solid var(--dx-line); border-radius: 14px; box-shadow: none; }
body.dx-account .card-header { background: #fff; border-bottom: 1px solid var(--dx-line); font-family: var(--dx-font-head); font-weight: 700; color: var(--dx-ink); }
body.dx-account .table thead th { border-top: 0; border-bottom: 1.5px solid var(--dx-ink); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dx-ink); }
body.dx-account .table td { border-color: var(--dx-line); vertical-align: middle; }
body.dx-account .btn { border-radius: var(--dx-radius); font-weight: 600; box-shadow: none; }
body.dx-account .btn-primary, body.dx-account .btn-danger, body.dx-account .btn-info {
    background: var(--dx-cobalt); border-color: var(--dx-cobalt); color: #fff;
}
body.dx-account .btn-success { background: var(--dx-teal); border-color: var(--dx-teal); }
body.dx-account .badge-success { background: var(--dx-aqua-mist); color: var(--dx-teal); }
body.dx-account .badge-warning { background: var(--dx-apricot-mist); color: var(--dx-sale); }
body.dx-account .badge-danger { background: #FDE4DA; color: var(--dx-sale); }
body.dx-account .form-control { border-color: var(--dx-line); border-radius: var(--dx-radius); background: var(--dx-cloud); }
body.dx-account .form-control:focus { border-color: var(--dx-cobalt); background: #fff; box-shadow: 0 0 0 3px rgba(43, 68, 255, .15); }
body.dx-account .user-avatar img { border-radius: 12px; }
body.dx-account .text-danger { color: var(--dx-sale) !important; }
body.dx-account a { color: var(--dx-cobalt); }
body.dx-account .dx-header a, body.dx-account .dx-footer a, body.dx-account .dx-account-tabs a:not(.is-active) { color: inherit; }
body.dx-account .dx-header .dx-btn--primary { color: #fff !important; }
body.dx-account .text-success { color: var(--dx-teal) !important; }
body.dx-account .text-warning { color: var(--dx-tangerine) !important; }
.dx-account-tabs .dx-container { scrollbar-width: none; }
.dx-account-tabs .dx-container::-webkit-scrollbar { display: none; }
@media (max-width: 767.98px) {
    body.dx-account .dx-account-main table { display: block; overflow-x: auto; white-space: nowrap; }
    body.dx-account .dx-account-main h4.bg-light, body.dx-account .dx-account-main h3.bg-light { font-size: 28px; margin-top: 24px !important; }
}
/* Undo legacy media-queries.css rule that forces .shadow / #mobileRow to 400px+ on phones */
@media screen and (max-width: 414px) {
    body.dx-legacy .shadow { width: auto !important; }
    body.dx-legacy #mobileRow { width: auto !important; }
}

/* ---------- Payment method buttons (public.payment / payment-xendit) ---------- */
.dx-pay-methods { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dx-pay-methods a { display: inline-flex; }
.dx-pay-methods .btn, .dx-pay-methods .stripe-button-el {
    height: 52px; min-width: 140px; padding: 8px 16px !important;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff !important; border: 1px solid var(--dx-line) !important; border-radius: var(--dx-radius) !important;
    color: var(--dx-ink) !important; font-family: var(--dx-font-body); font-weight: 600; box-shadow: none !important;
}
.dx-pay-methods .btn:hover { border-color: var(--dx-ink) !important; }
.dx-pay-methods .btn img { max-height: 26px; width: auto !important; height: auto !important; }
.dx-pay-methods .stripe-button-el[disabled] { opacity: .5; cursor: not-allowed; }
.dx-pay-methods .stripe-button-el span { background: none !important; color: var(--dx-muted) !important; text-shadow: none !important; box-shadow: none !important; font-family: var(--dx-font-body) !important; }

/* Follow button: shows "Unfollow" on hover */
.dx-follow .dx-follow__off { display: none; }
.dx-follow.is-following:hover .dx-follow__on, .dx-follow.is-following:focus-visible .dx-follow__on { display: none; }
.dx-follow.is-following:hover .dx-follow__off, .dx-follow.is-following:focus-visible .dx-follow__off { display: inline; color: var(--dx-sale); }

/* Author profile: reviews */
.dx-reviews { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.dx-reviews__summary { position: sticky; top: 92px; }
.dx-reviews__avg { font-family: var(--dx-font-head); font-weight: 700; font-size: 48px; letter-spacing: -0.04em; line-height: 1; color: var(--dx-ink); }
.dx-reviews__avg span { font-size: 18px; color: var(--dx-muted); margin-left: 2px; }
.dx-reviews__stars { font-size: 20px; margin: 6px 0 4px; }
.dx-reviews__bars { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; }
.dx-reviews__bars li { display: grid; grid-template-columns: 30px 1fr 24px; align-items: center; gap: 8px; font-size: 12px; }
.dx-reviews__bar { height: 6px; border-radius: 3px; background: var(--dx-cobalt-mist); overflow: hidden; }
.dx-reviews__bar span { display: block; height: 100%; background: var(--dx-tangerine); }
.dx-reviews__list { display: grid; gap: 14px; }
.dx-review-card { background: #fff; border: 1px solid var(--dx-line); border-radius: 14px; padding: 18px 20px; }
.dx-review-card strong { color: var(--dx-ink); font-size: 14px; }
.dx-review-card .dx-avatar { width: 36px; height: 36px; background: var(--dx-cobalt-mist); color: var(--dx-cobalt); font-size: 18px; }
.dx-review-card__book { margin: 12px 0 6px; font-size: 13px; color: var(--dx-ink-2); }
.dx-review-card__book .dx-tag { margin-left: 4px; }
.dx-review-card__body { font-size: 14px; line-height: 1.65; color: var(--dx-ink-2); }
.dx-review-card__body p { margin: 0 0 .6em; }
.dx-review-card__body p:last-child { margin-bottom: 0; }
@media (max-width: 767.98px) { .dx-reviews { grid-template-columns: 1fr; } .dx-reviews__summary { position: static; } }

/* Header currency switcher */
.dx-currency > button { gap: 6px; padding: 0 10px; font-weight: 600; }
.dx-currency__sym { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 6px; background: var(--dx-cobalt-mist); color: var(--dx-cobalt); font-size: 12px; }
.dx-currency__menu { width: 280px; padding: 8px !important; }
.dx-currency__menu form { margin: 0; }
.dx-currency__note { font-size: 12px; color: var(--dx-muted); margin: 4px 8px 8px; line-height: 1.45; }
.dx-currency__list { max-height: 300px; overflow-y: auto; border-top: 1px solid var(--dx-line); margin-top: 4px; padding-top: 4px; }
.dx-currency .dropdown-item { width: 100%; text-align: left; border: 0; background: none; font-family: var(--dx-font-body); cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.dx-currency .dropdown-item span { color: var(--dx-muted); font-size: 13px; }
.dx-currency .dropdown-item.is-active { background: var(--dx-cobalt-mist); color: var(--dx-cobalt); font-weight: 600; }
.dx-currency__credit { display: block; font-size: 11px; color: var(--dx-muted) !important; margin: 8px 8px 2px; }
.dx-price-note { font-size: 12px; color: var(--dx-muted); }
@media (max-width: 991.98px) { .dx-header .dx-currency { display: block !important; } }

/* Vouchers ------------------------------------------------------------ */
.dx-summary__row--discount strong { color: var(--dx-teal, #0F8F7A); }
.dx-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--dx-cloud); border-radius: 6px; padding: 2px 6px; color: var(--dx-ink); letter-spacing: .04em; }
.dx-line-discount { display: block; font-size: 12px; font-weight: 600; color: var(--dx-teal, #0F8F7A); text-align: right; }
.dx-voucher { border: 1px dashed var(--dx-line); border-radius: 10px; padding: 14px; margin: 0 0 18px; }
.dx-voucher__form { margin: 0; }
.dx-voucher__form .dx-label { margin-bottom: 6px; }
.dx-voucher__row { display: flex; gap: 8px; }
.dx-voucher__row .dx-input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.dx-voucher__row .dx-input::placeholder { text-transform: none; letter-spacing: 0; }
.dx-voucher__applied { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dx-voucher__applied form { margin: 0; }
.dx-voucher__applied small { display: block; color: var(--dx-muted, #5B6178); font-size: 12px; margin-top: 2px; }
.dx-voucher__applied strong { color: var(--dx-ink); letter-spacing: .04em; }
.dx-voucher__ok { margin: 8px 0 0; font-size: 13px; color: var(--dx-teal, #0F8F7A); font-weight: 600; }

/* Sale campaign badge on books */
.dx-sale-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #fff; background: var(--dx-tangerine, #FF6B35); border-radius: 999px; padding: 3px 10px; margin-top: 6px; max-width: 100%; }
.dx-sale-flag code { font: inherit; background: rgba(255,255,255,.22); border-radius: 4px; padding: 0 5px; letter-spacing: .04em; }
.dx-sale-callout { display: flex; gap: 12px; align-items: center; border: 1.5px solid var(--dx-tangerine, #FF6B35); background: #FFF4EE; border-radius: 10px; padding: 12px 14px; margin-top: 14px; font-size: 14px; color: var(--dx-ink); }
.dx-sale-callout strong { color: var(--dx-tangerine, #FF6B35); }
.dx-sale-callout code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; background: #fff; border: 1px dashed var(--dx-tangerine, #FF6B35); border-radius: 6px; padding: 2px 8px; letter-spacing: .05em; }

/* Ebooks page ---------------------------------------------------------- */
.dx-ebooks-head { position: relative; overflow: hidden; background: var(--dx-cobalt-mist); padding: 28px 0 40px; }
.dx-ebooks-head::after { content: ""; position: absolute; right: -50px; bottom: -90px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.dx-ebooks-head__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; }
.dx-ebooks-head .dx-lead { max-width: 640px; }
.dx-ebooks-search { display: flex; gap: 8px; max-width: 560px; margin-top: 20px; }
.dx-ebooks-search .dx-input { flex: 1; min-width: 0; background: #fff; }
.dx-ebooks-stats { display: flex; gap: 32px; margin: 0; }
.dx-ebooks-stats dt { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dx-cobalt); }
.dx-ebooks-stats dd { margin: 6px 0 0; font-size: 34px; line-height: 1; color: var(--dx-ink); }
@media (max-width: 767.98px) {
    .dx-ebooks-head__grid { grid-template-columns: 1fr; gap: 20px; }
    .dx-ebooks-stats { gap: 24px; }
    .dx-ebooks-stats dd { font-size: 28px; }
}
.dx-ebooks-subjects { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.dx-ebooks-subjects .dx-chip { flex: none; }
.dx-chip__n { margin-left: 4px; font-size: 11px; font-weight: 600; opacity: .6; }
.dx-book__isbn { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; letter-spacing: .02em; color: var(--dx-muted); margin-top: 4px; }
.dx-ebooks-publish { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 24px; border-radius: 12px; background: var(--dx-apricot-mist); }
.dx-ebooks-publish strong { display: block; font-family: var(--dx-font-head); font-size: 18px; letter-spacing: -0.02em; color: var(--dx-ink); }
.dx-ebooks-publish span { font-size: 14px; color: var(--dx-ink-2); }
