/* Antrik 2026 theme layer: loaded after every older stylesheet.
   Palette checked against WCAG 2.2 AA (ratios noted against the background each colour is used on). */

:root {
  --ink: #1F1D2B;          /* body text: 15.6:1 on paper, 16.6:1 on white */
  --muted: #5B5768;        /* secondary text: 6.6:1 on paper */
  --paper: #FBF8F3;        /* page background */
  --surface: #FFFFFF;
  --tint: #EEEDFB;         /* hover / selected rows: indigo 8.6:1, ink 14.3:1 */
  --indigo: #3730A3;       /* links, primary buttons: 9.4:1 on paper; white on it 9.9:1 */
  --indigo-dark: #2A247F;  /* hover: white on it 12.7:1 */
  --saffron: #E0B04E;      /* accent fills with ink text: 8.3:1 */
  --saffron-50: #FCF3DD;
  --saffron-text: #7A5410; /* accent as text: 6.4:1 on paper */
  --green: #166534;        /* prices: 7.1:1 on white */
  --red: #B42318;          /* errors: 6.6:1 on white */
  --line: #E4E0D8;         /* decorative dividers */
  --field: #8C8799;        /* form borders: 3.5:1 on white (non-text) */
  --night: #1F1D2B;        /* footer */
  --night-deep: #15141D;
  --on-night: #E9E6F2;     /* 13.4:1 on night */
  --on-night-link: #C7C2FF;/* 9.9:1 on night */
  --radius: 10px;
  --font-body: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Atkinson Hyperlegible", "Source Sans 3", system-ui, sans-serif;
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .modal-title {
  font-family: var(--font-head);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
p, li, td, th, dd, dt, label, .form-control, .btn { font-family: var(--font-body); }
.text-muted, .gray66, .gray77, .gray80, .gray88 { color: var(--muted) !important; }
.text-danger, .red { color: var(--red) !important; }
.orange { color: var(--saffron-text); }
hr { border-top-color: var(--line); }

a { color: var(--indigo); }
a:hover, a:focus { color: var(--indigo-dark); }
/* Links inside running text are underlined, so colour is not the only cue (WCAG 1.4.1). */
.main-content p a, .main-content li a, .main-content td a, .main-content blockquote a,
.modal-body p a, .modal-body li a { text-decoration: underline; text-underline-offset: 2px; }

/* Visible keyboard focus everywhere (WCAG 2.4.7, 2.4.13). */
:focus { outline: none; }
:focus-visible, a:focus-visible, button:focus-visible, .btn:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--indigo) !important;
  outline-offset: 2px !important;
  border-radius: 4px;
}
.form-control:focus, .form-control:focus-visible {
  border-color: var(--indigo);
  outline: 3px solid var(--indigo) !important;
  outline-offset: 1px !important;
  box-shadow: none;
}
footer :focus-visible { outline-color: var(--on-night-link) !important; }

.visually-hidden, .sr-only-antrik {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10000;
  background: var(--indigo); color: #fff !important; padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header ---------- */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
#top-shadow { display: none; }
#logo img { max-height: 46px; width: auto; }
#main-nav ul a, #main-nav a {
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
}
#main-nav ul a:hover, #main-nav a:hover, #main-nav a:focus-visible { color: var(--indigo); }
#main-nav .user-image { border-radius: 50%; }
#cd-hamburger-menu a, #cd-cart-trigger a { color: var(--ink); }
#cd-cart-trigger a .fa, #cd-cart-trigger .fa-shopping-cart { color: var(--indigo); }
#cd-cart-trigger a span {
  background: var(--saffron) !important;
  color: var(--ink) !important;
  font-weight: 700;
  border: 2px solid var(--surface);
}

/* Mega menu bar */
.sky-mega-menu {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(31, 29, 43, 0.04);
}
.sky-mega-menu > li > a {
  color: var(--ink) !important;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  min-height: 48px;
  line-height: 48px;
  padding-left: 18px;
  padding-right: 18px;
  border-left-color: var(--line) !important;
  border-right-color: var(--line) !important;
}
.sky-mega-menu > li:hover > a, .sky-mega-menu > li > a:focus-visible, .sky-mega-menu > li.current > a {
  background: var(--tint) !important;
  color: var(--indigo) !important;
}
.sky-mega-menu .grid-container3, .sky-mega-menu .grid-container12 {
  background: var(--surface) !important;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 12px 28px rgba(31, 29, 43, 0.12);
}
.sky-mega-menu li li a, .sky-mega-menu .grid-column a {
  color: var(--ink) !important;
  font-size: 16px;
  padding-top: 9px !important;
  padding-bottom: 9px !important;
  min-height: 24px;
}
.sky-mega-menu li li:hover > a, .sky-mega-menu li li a:hover, .sky-mega-menu li li a:focus-visible,
.sky-mega-menu .grid-column a:hover, .sky-mega-menu .grid-column a:focus-visible {
  background: var(--tint) !important;
  color: var(--indigo) !important;
}
.sky-mega-menu .fa-indicator { color: var(--muted) !important; }
/* The search icon in the menu bar */
.sky-mega-menu .search .fa-stack { color: var(--indigo) !important; }
.sky-mega-menu .search .fa-stack .fa-inverse { color: #fff !important; }

#search-toggle {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--line);
}
#search-toggle .form-control { height: 48px; }

/* ---------- Buttons ---------- */
.btn {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  padding: 10px 18px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-lg { min-height: 52px; font-size: 18px; }
.btn-sm, .btn-xs { min-height: 32px; padding: 5px 12px; }
.btn-primary, .btn-info, .btn-success {
  background: var(--indigo) !important;
  border-color: var(--indigo) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-info:hover, .btn-success:hover,
.btn-primary:focus, .btn-info:focus, .btn-success:focus,
.btn-primary:active, .btn-info:active, .btn-success:active {
  background: var(--indigo-dark) !important;
  border-color: var(--indigo-dark) !important;
  color: #fff !important;
}
.btn-warning {
  background: var(--saffron) !important;
  border-color: var(--saffron) !important;
  color: var(--ink) !important;
}
.btn-warning:hover, .btn-warning:focus { background: #D19F3A !important; border-color: #D19F3A !important; color: var(--ink) !important; }
.btn-default {
  background: var(--surface) !important;
  border: 2px solid var(--indigo) !important;
  color: var(--indigo) !important;
}
.btn-default:hover, .btn-default:focus { background: var(--tint) !important; color: var(--indigo-dark) !important; }
.btn-danger { background: var(--red) !important; border-color: var(--red) !important; color: #fff !important; }
.btn .big, .btn big { font-size: inherit; }

/* Round icon buttons (add to cart, wishlist): indigo circle, white icon. */
.fa-stack.orange { color: var(--indigo) !important; }
.fa-stack.orange .fa-inverse { color: #fff !important; }
[onclick*="addtocart"], [role="button"][data-antrik-cart] { cursor: pointer; }

/* Book-cover hover captions used to be white on orange (2:1). */
figcaption { background: var(--indigo) !important; color: #fff !important; }
figcaption a, figcaption h3, figcaption p, figcaption span { color: #fff !important; }

/* Badges and labels */
.badge, .label-info, .label-primary { background: var(--indigo) !important; color: #fff !important; }
.label-warning { background: var(--saffron) !important; color: var(--ink) !important; }
.label-default { background: #5B5768 !important; color: #fff !important; }

/* ---------- Forms ---------- */
.form-control {
  border: 1px solid var(--field);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  min-height: 44px;
  font-size: 16px;
  box-shadow: none;
}
.form-control::placeholder { color: var(--muted); opacity: 1; }
.input-lg { min-height: 52px; font-size: 17px; }
.form-label-antrik { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.parsley-errors-list, .parsley-required, .parsley-type, .parsley-minlength { color: var(--red) !important; font-size: 15px; }
input.parsley-error, select.parsley-error, textarea.parsley-error { border-color: var(--red) !important; }

/* ---------- Dialogs ---------- */
.modal-content {
  border-radius: 14px;
  border: 0;
  box-shadow: 0 24px 60px rgba(31, 29, 43, 0.28);
}
.modal-header { border-bottom-color: var(--line); padding: 18px 22px; }
.modal-title, .modal-title.text-muted { color: var(--ink) !important; font-size: 22px; }
.modal-header .close {
  opacity: 1; color: var(--ink); text-shadow: none;
  width: 44px; height: 44px; margin: -10px -12px 0 0; font-size: 30px;
}
.modal-header .close:hover { color: var(--indigo); }
.modal-backdrop.in { opacity: .55; }
#message:not(:empty) {
  background: #FDECEA; color: var(--red); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px;
}

/* ---------- Page body ---------- */
.main-content { color: var(--ink); }
.main-content h1, .main-content h2 { margin-top: 10px; }
.panel { border-color: var(--line); border-radius: var(--radius); }
.panel-default > .panel-heading { background: var(--saffron-50); color: var(--ink); border-color: var(--line); }
.table > thead > tr > th { color: var(--ink); border-bottom-color: var(--line); }
blockquote { border-left-color: var(--indigo); }
.price, .ebook-price, .book-price { color: var(--green); font-weight: 700; }

/* ---------- Footer ---------- */
footer .footer {
  background: var(--night) !important;
  color: var(--on-night) !important;
  border-top: 4px solid var(--saffron);
  padding-top: 36px;
}
footer .footer h3 {
  color: var(--saffron) !important;
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
footer .footer p, footer .footer li { color: var(--on-night) !important; }
footer .footer a, footer .footer-bottom a {
  color: var(--on-night-link) !important;
  display: inline-block;
  padding: 4px 0;
  font-size: 15px;
}
footer .footer a:hover, footer .footer-bottom a:hover { color: #fff !important; text-decoration: underline; }
footer .footer-bottom {
  background: var(--night-deep) !important;
  color: var(--on-night) !important;
  border-top: 1px solid #2E2B3D;
  font-size: 15px;
}
footer .footer-bottom p, footer .footer-bottom div { color: var(--on-night) !important; }

/* Recently viewed strip above the footer */
.recently-viewed, #browsing-history { background: var(--surface); }

/* ---------- Small screens ---------- */
@media (max-width: 767px) {
  body { font-size: 16px; }
  .sky-mega-menu > li > a { line-height: 44px; min-height: 44px; }
  footer .footer-bottom .pull-left, footer .footer-bottom .pull-right { float: none !important; display: block; text-align: left; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Fixes found by the contrast scan ---------- */
/* "Quick view" buttons inside the indigo cover captions */
figcaption .btn-default {
  background: transparent !important; border: 2px solid #fff !important; color: #fff !important;
}
figcaption .btn-default *, figcaption .btn-default small { color: inherit !important; }
figcaption .btn-default:hover, figcaption .btn-default:focus-visible { background: #fff !important; color: var(--indigo) !important; }
/* EPUB / PDF format picker on book pages (was white on orange) */
section > div input[type="radio"]:checked + label { background: var(--indigo) !important; color: #fff !important; }
section > div input[type="radio"]:checked + label h3,
section > div input[type="radio"]:checked + label p { color: #fff !important; }
section > div input[type="radio"]:checked + label::after { color: var(--green) !important; border-color: var(--green) !important; }
/* "Important steps before purchase" badge link */
.badge a, .badge a:hover { color: #fff !important; }
/* "Show more" expanders */
.expand, .expand span, .expand i { color: var(--indigo) !important; }
/* Pagination */
.prevnext { color: var(--muted) !important; }
a.prevnext { color: var(--indigo) !important; }
/* Buttons that also carry .text-danger */
.btn.text-danger, .btn .text-danger { color: #fff !important; }
/* Orange inline text from older page content */
[style*="ff6600"], [style*="FF6600"] { color: var(--saffron-text) !important; }

/* ---------- Keyboard access to menus and cover captions ---------- */
/* Closed menus are out of the tab order; hover, or .is-open from the keyboard, shows them. */
.sky-mega-menu li > div { visibility: hidden; }
.sky-mega-menu li:hover > div, .sky-mega-menu li.is-open > div { visibility: visible; }
.sky-mega-menu li.is-open > div {
  left: 0; opacity: 1;
  -webkit-transform: none; transform: none;
}
.sky-mega-menu li li.is-open > div { left: 100%; }
.sky-mega-menu li.is-dismissed > div { visibility: hidden !important; opacity: 0 !important; left: -9999px !important; }
.sky-mega-menu > li.is-open > a { background: var(--tint) !important; color: var(--indigo) !important; }
@media (max-width: 767px) {
  .sky-mega-menu-response-to-switcher.is-open > li { display: block; border-top: 1px solid var(--line); }
  .sky-mega-menu li.is-open > div, .sky-mega-menu li li.is-open > div { position: static; left: auto; width: auto; margin: 0; box-shadow: none; }
}
.cs-style-4 figure:focus-within img { -webkit-transform: translateX(25%); transform: translateX(25%); }
.cs-style-4 figure:focus-within figcaption { opacity: .96; -webkit-transform: rotateY(0deg); transform: rotateY(0deg); }

/* ---------- Radio buttons: 24px targets, indigo, visible focus ---------- */
.radio label { min-height: 24px; line-height: 24px; }
.radio input[type="radio"] { width: 24px; height: 24px; margin-left: -22px; margin-top: 0; }
.radio-warning input[type="radio"]:checked + label::before { border-color: var(--indigo) !important; }
.radio-warning input[type="radio"] + label::after, .radio-warning input[type="radio"]:checked + label::after { background-color: var(--indigo) !important; }
.radio input[type="radio"] + label::before { border-color: var(--field); }
.radio input[type="radio"]:focus-visible + label::before { outline: 3px solid var(--indigo); outline-offset: 2px; }

/* ---------- Phone-width overflow ---------- */
.main-content { min-width: 0; max-width: 1280px; overflow-wrap: anywhere; }
.main-content img, .main-content iframe, .modal-body iframe { max-width: 100%; }
@media (max-width: 767px) { .main-content .row { margin-left: -10px; margin-right: -10px; } .main-content [class*="col-"] { padding-left: 10px; padding-right: 10px; } }

/* ========== Phase 2: home page ========== */
.ak-hero { background: var(--indigo-dark); color: #fff; }
.ak-hero-inner {
  max-width: 1280px; margin: 0 auto; padding: 56px 32px;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 48px; align-items: center;
}
.ak-eyebrow { color: var(--saffron); font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.ak-hero h1 { color: #fff; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.08; margin: 0 0 20px; }
.ak-quote { border-left: 4px solid var(--saffron) !important; margin: 0 0 26px; padding: 2px 0 2px 18px; max-width: 660px; font-size: 19px; }
.ak-quote p { color: #F1EFFA; font-size: 19px; line-height: 1.5; margin: 0 0 6px; }
.ak-quote cite { color: var(--on-night); font-style: normal; font-size: 16px; font-weight: 600; }
.ak-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.ak-btn-saffron, .ak-btn-saffron:visited { background: var(--saffron) !important; border: 2px solid var(--saffron) !important; color: var(--ink) !important; }
.ak-btn-saffron:hover, .ak-btn-saffron:focus { background: #F0C76C !important; border-color: #F0C76C !important; color: var(--ink) !important; }
.ak-btn-ghost, .ak-btn-ghost:visited { background: transparent !important; border: 2px solid #fff !important; color: #fff !important; }
.ak-btn-ghost:hover, .ak-btn-ghost:focus { background: #fff !important; color: var(--indigo-dark) !important; }
.ak-hero :focus-visible { outline-color: #fff !important; }
.ak-hero-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; margin: 0; color: var(--on-night); font-size: 15px; }
.ak-hero-facts li::before { content: "\2713"; color: var(--saffron); font-weight: 700; margin-right: 7px; }
.ak-hero-covers { position: relative; height: 330px; }
.ak-hero-covers img { position: absolute; top: 18px; width: 178px; height: 267px; object-fit: cover; border-radius: 6px; box-shadow: 0 16px 34px rgba(0, 0, 0, .42); }
.ak-hero-covers img:nth-child(1) { left: 0; transform: rotate(-7deg); }
.ak-hero-covers img:nth-child(2) { left: 50%; margin-left: -89px; top: 0; z-index: 2; }
.ak-hero-covers img:nth-child(3) { right: 0; transform: rotate(7deg); }

.ak-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0 18px; }
.ak-section-head h2 { font-size: 28px; margin: 0; }
.ak-row-nav { display: flex; gap: 8px; }
.ak-row-nav button {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--indigo); background: var(--surface); color: var(--indigo); padding: 0;
}
.ak-row-nav button:hover, .ak-row-nav button:focus-visible { background: var(--indigo); color: #fff; }
.ak-row { list-style: none; padding: 0; margin: 0 -8px 26px; }
.ak-row:not(.slick-initialized) { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; margin-left: 0; margin-right: 0; }
.ak-row:not(.slick-initialized) ~ * { clear: both; }
.ak-row .slick-track { display: flex; }
.ak-row .slick-slide { height: auto; float: none; }
.ak-card {
  display: flex !important; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin: 0 8px; transition: box-shadow .15s ease, transform .15s ease;
}
.ak-row:not(.slick-initialized) .ak-card { margin: 0; }
.ak-card:hover, .ak-card:focus-within { box-shadow: 0 10px 24px rgba(31, 29, 43, .14); transform: translateY(-2px); }
.ak-cover { display: block; position: relative; margin-bottom: 12px; }
.ak-cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 5px; background: var(--tint); }
.ak-discount { position: absolute; top: 8px; left: 8px; background: var(--red); color: #fff; font-size: 14px; font-weight: 700; padding: 3px 8px; border-radius: 5px; }
.ak-title { font-size: 16px; line-height: 1.3; margin: 0 0 4px; font-weight: 700; }
.ak-title a { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.ak-title a:hover, .ak-title a:focus-visible { color: var(--indigo); text-decoration: underline; }
.ak-author { color: var(--muted); font-size: 15px; line-height: 1.3; margin: 0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ak-price { color: var(--green); font-size: 19px; font-weight: 700; margin-top: auto; padding-top: 4px; }
.ak-price p { margin: 0 0 8px; color: inherit; }
.ak-price del, .ak-price strike, .ak-price s { color: var(--muted); font-weight: 400; font-size: 15px; }
.ak-add {
  width: 100%; background: var(--indigo) !important; border: 2px solid var(--indigo) !important; color: #fff !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 6px; font-size: 15px;
}
.ak-add:hover, .ak-add:focus { background: var(--indigo-dark) !important; border-color: var(--indigo-dark) !important; color: #fff !important; }

@media (max-width: 900px) {
  .ak-hero-inner { grid-template-columns: 1fr; padding: 38px 20px; }
  .ak-hero-covers { display: none; }
}
@media (max-width: 480px) {
  .ak-hero-actions .btn { width: 100%; white-space: normal; }
  .ak-quote, .ak-quote p { font-size: 17px; }
  .ak-section-head h2 { font-size: 24px; }
  .ak-card { padding: 9px; margin: 0 5px; }
  .ak-row { margin-left: -5px; margin-right: -5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ak-card:hover, .ak-card:focus-within { transform: none; }
}

/* Cart and status message bar: was pale fill with mid-tone text. */
.peek-a-bar { background: var(--ink) !important; color: #fff !important; }
.peek-a-bar *, .peek-a-bar .text-success, .peek-a-bar .text-danger { color: #fff !important; }
.peek-a-bar a { text-decoration: underline; }


/* ========== Reading help pages ========== */
.rh { max-width: 980px; margin: 0 auto; }
.rh section { display: block; width: auto; padding: 0; }
.rh h1 { font-size: clamp(30px, 4vw, 42px); margin: 8px 0 10px; }
.rh > section, .rh-note, .rh-steps { margin-top: 28px; }
.rh h2 { font-size: 25px; margin: 0 0 12px; }
.rh-lede { font-size: 19px; color: var(--muted); max-width: 760px; }
.rh-nav ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.main-content .rh-nav li a { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border-radius: 999px; color: var(--indigo); font-weight: 600; font-size: 15px; text-decoration: none; }
.main-content .rh-nav li a:hover { background: var(--tint); }
.main-content .rh-nav li a[aria-current="page"] { background: var(--indigo); color: #fff; }
.rh-steps { list-style: none; counter-reset: rh; padding: 0; }
.rh-steps > li { counter-increment: rh; position: relative; padding: 16px 18px 16px 70px; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.rh-steps > li::before { content: counter(rh); position: absolute; left: 18px; top: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--indigo); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rh-steps h2, .rh-steps h3 { font-size: 19px; margin: 0 0 4px; }
.rh-steps p { margin: 0; }
.rh-note { background: var(--tint); border-left: 4px solid var(--indigo); border-radius: 6px; padding: 14px 18px; }
.rh-note h2 { font-size: 18px; margin: 0 0 4px; }
.rh-note p { margin: 0; }
.rh-note-warn { background: var(--saffron-50); border-left-color: var(--saffron-text); }
.rh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.rh-cards > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.rh-cards h2, .rh-cards h3 { font-size: 19px; margin: 0 0 6px; }
.rh-cards p { margin: 0; }
.rh-table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rh-table:focus-visible { outline: 3px solid var(--indigo); }
.rh-table table { width: 100%; border-collapse: collapse; }
.rh-table th, .rh-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.rh-table thead th { background: var(--saffron-50); }
.rh-table tbody tr:last-child > * { border-bottom: 0; }
.rh code { color: var(--ink); background: var(--tint); padding: 1px 5px; border-radius: 4px; font-size: .9em; white-space: normal; overflow-wrap: anywhere; }
.rh-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.rh-chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 15px; }
.rh-faq { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.rh-faq summary { min-height: 44px; padding: 10px 14px; cursor: pointer; font-weight: 600; }
.rh-faq summary:hover { color: var(--indigo); }
.rh-faq p { margin: 0; padding: 0 14px 14px; }
.rh-help { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }
.rh-mini { padding-left: 22px; line-height: 1.6; }
.rh-mini li { margin-bottom: 8px; }
@media (max-width: 560px) {
  .rh-steps > li { padding: 62px 14px 14px; }
  .rh-steps > li::before { left: 14px; top: 14px; }
  .rh-lede { font-size: 17px; }
}


/* ========== Phase 3: book, list, cart, checkout and account pages ========== */
.main-content { padding-left: clamp(14px, 2.5vw, 32px); padding-right: clamp(14px, 2.5vw, 32px); }
h1.ak-page-title, .ak-page-title { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15; margin: 8px 0 18px; }
.ak-page-title small { color: var(--muted) !important; font-size: .5em; font-weight: 400; }
.page-header { border-bottom-color: var(--line); }
.main-content h2 { font-size: 24px; }
.main-content h3 { font-size: 19px; }
.main-content .text-light, .main-content .text-light-medium { color: var(--muted) !important; font-weight: 400; }

/* Quiet labels (BY, FORMAT, LANGUAGE ...) */
.badge.bg-gray77, .badge.badge-default { background: var(--tint) !important; color: var(--indigo) !important; font-weight: 700; border-radius: 6px; padding: 4px 8px; white-space: normal; }
.badge.bg-gray77 a, .badge.badge-default a, .badge.bg-gray77 a:hover { color: var(--indigo) !important; text-decoration: underline !important; display: inline-block; min-height: 24px; line-height: 18px; padding-top: 3px; }

/* The older flat-button rule outranks .btn-info. */
.btn.btn-flat.btn-info, .btn.btn-info.ladda-button { background: var(--indigo) !important; border-color: var(--indigo) !important; color: #fff !important; }
.btn.btn-flat.btn-info:hover, .btn.btn-info.ladda-button:hover { background: var(--indigo-dark) !important; border-color: var(--indigo-dark) !important; }

/* Summary and buying panels */
.well { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(31, 29, 43, .07); padding: 16px; }
.text-info { color: var(--green) !important; font-weight: 700; }
.our-price-large, .our-price-large .text-info { color: var(--green) !important; }
.well .btn { white-space: normal; }
.main-content hr.hr-xl { border-top: 3px solid var(--saffron); margin-right: calc(100% - 64px) !important; }

/* Format picker */
.ak-formats { display: flex !important; flex-wrap: wrap; gap: 12px; width: auto !important; max-width: 340px; margin-top: 30px; }
.ak-formats > div { flex: 1 1 130px; min-width: 120px; position: relative; margin: 0 !important; width: auto !important; float: none !important; }
.ak-formats input[type="radio"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.ak-formats label { display: block; margin: 0; height: 100%; padding: 14px 8px 12px; text-align: center; background: var(--surface); color: var(--ink); border: 2px solid var(--field); border-radius: var(--radius); box-shadow: none; }
.ak-formats label img { width: 44px !important; margin: 0 auto 6px !important; display: block; }
.ak-format-name { display: block; font-family: var(--font-head); font-size: 19px; font-weight: 700; }
.ak-formats input:checked + label { background: var(--indigo) !important; color: #fff !important; border-color: var(--indigo); }
.ak-formats input:checked + label .ak-format-name, .ak-formats input:checked + label p { color: #fff !important; }
.ak-formats input:checked + label img { background: #fff; border-radius: 6px; padding: 3px; }
.ak-formats input:checked + label::after { display: none !important; }
.ak-formats input:checked + label .ak-format-name::after { content: " \2713"; }
.ak-formats input:focus-visible + label { outline: 3px solid var(--indigo); outline-offset: 2px; }

/* Device list on book pages */
.ak-devices { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 10px 0 0; }
.ak-devices li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 15px; }
.ak-devices .fa { color: var(--indigo); }

/* Book rows beyond the home page */
.ak-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px clamp(14px, 2.5vw, 32px) 8px; margin: 28px 0 0; overflow: hidden; }
.ak-band > p { color: var(--muted); }
.ak-band .ak-card { background: var(--paper); }
.ak-view { width: 100%; background: var(--surface) !important; border: 2px solid var(--indigo) !important; color: var(--indigo) !important; padding: 8px 6px; font-size: 15px; }
.ak-view:hover, .ak-view:focus { background: var(--tint) !important; color: var(--indigo-dark) !important; }

/* Tables: cart, checkout, orders, details */
.responsive_table { border-radius: var(--radius); }
.main-content table thead tr, .main-content tr.bg-gray88 { background: var(--saffron-50) !important; }
.main-content table thead th { color: var(--ink) !important; font-weight: 700; font-size: 14px; letter-spacing: .03em; }
#cart-table-0 { background: var(--surface); border: 1px solid var(--line); }
#cart-table-0 td, #cart-table-0 th { padding: 12px; border-color: var(--line); }
.table-striped > tbody > tr:nth-of-type(odd) { background: var(--paper); }
.ak-remove { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: var(--red) !important; }
.ak-remove:hover, .ak-remove:focus-visible { background: #FDECEA; }
.ak-remove .fa, .ak-remove .baby-pink { color: var(--red) !important; }

/* Lists and account panels */
.main-content .bg-gray96 { background: var(--surface) !important; border: 1px solid var(--line); border-radius: 8px; }
.list-group-item { border-color: var(--line); padding: 0; }
.list-group-item a { display: block; padding: 11px 15px; }
.list-group-item a:hover { background: var(--tint); }
.panel-title { font-family: var(--font-head); font-size: 17px; font-weight: 700; margin: 0; }
.panel-title a { color: var(--ink); display: block; }
.form-horizontal label, .form-group > label { color: var(--ink) !important; font-weight: 600; }
.ak-empty { text-align: center; padding: 32px 12px; color: var(--ink) !important; }
.ak-empty .fa { display: none; }
.pagination > li > a, .prevnext { min-width: 32px; min-height: 32px; }
.pagination > .active > a, .pagination > .active > a:hover { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.pagination > li > a { color: var(--indigo); }

/* Buttons and titles inside content */
.main-content .btn, .main-content .btn:hover, .ak-remove { text-decoration: none !important; }
.main-content h2 a, .main-content h3 a { color: var(--ink); }
.main-content h2 a:hover, .main-content h3 a:hover { color: var(--indigo); text-decoration: underline; }
.main-content .col-md-8 > h2 { font-size: 23px; }
.panel-heading a, .panel-heading a:hover { color: var(--ink) !important; }
#left_action_menu .panel-heading [data-toggle="collapse"]:after, #left_action_menu .panel-heading [data-toggle="collapse"].collapsed:after { color: var(--indigo) !important; }

/* Cart and checkout: a real table on larger screens, compact cards on phones */
#cart-table-0 { width: 100%; border-collapse: collapse; border-radius: var(--radius); overflow: hidden; }
#cart-table-0 td a { overflow-wrap: anywhere; }
@media (min-width: 768px) {
  #cart-table-0 { display: table !important; }
  #cart-table-0 thead { display: table-header-group !important; }
  #cart-table-0 tbody { display: table-row-group !important; }
  #cart-table-0 tfoot { display: table-footer-group !important; }
  #cart-table-0 tr { display: table-row !important; border-bottom: 1px solid var(--line); }
  #cart-table-0 th, #cart-table-0 td { display: table-cell !important; width: auto; border: 0 !important; border-bottom: 1px solid var(--line) !important; text-align: left !important; vertical-align: top; }
  #cart-table-0 th:nth-child(3), #cart-table-0 tbody td:nth-child(3), #cart-table-0 tfoot td:nth-child(2) { text-align: right !important; }
  #cart-table-0 th:last-child, #cart-table-0 tbody td:last-child { text-align: center !important; }
  #cart-table-0 tfoot td { font-size: 19px; font-weight: 700; color: var(--green) !important; background: var(--saffron-50); }
  #cart-table-0 tfoot td:first-child { text-align: right !important; color: var(--ink) !important; font-size: 16px; }
}
@media (max-width: 767px) {
  #cart-table-0, #cart-table-0 tbody, #cart-table-0 tfoot { display: block !important; width: 100%; }
  #cart-table-0 thead { display: none !important; }
  #cart-table-0 tbody tr { display: grid !important; grid-template-columns: 76px minmax(0, 1fr) 44px; gap: 4px 10px; padding: 12px; border-bottom: 1px solid var(--line); }
  #cart-table-0 tbody td { display: block !important; width: auto !important; border: 0 !important; padding: 0 !important; text-align: left !important; }
  #cart-table-0 tbody td:nth-child(1) { grid-row: 1 / span 2; }
  #cart-table-0 tbody td:nth-child(2) { grid-column: 2; }
  #cart-table-0 tbody td:nth-child(3) { grid-column: 2; font-weight: 700; color: var(--green); }
  #cart-table-0 tbody td:last-child { grid-column: 3; grid-row: 1; }
  #cart-table-0 tfoot tr { display: flex !important; justify-content: space-between; align-items: center; padding: 12px; background: var(--saffron-50); }
  #cart-table-0 tfoot td { display: block !important; width: auto !important; border: 0 !important; padding: 0 !important; text-align: left !important; }
  #cart-table-0 tfoot td:nth-child(2) { font-size: 19px; font-weight: 700; color: var(--green) !important; }
}

@media (max-width: 767px) {
  .main-content hr[style] { margin-right: 0 !important; }
  .main-content .form-horizontal .form-group, .main-content form .form-group { margin-left: 0; margin-right: 0; }
  .ak-formats { max-width: none; }
  .responsive_table { overflow-x: auto; }
  #cart-table-0 td { padding: 8px; }
}


/* ========== DMI Group bar and one aligned page width ========== */
:root { --ak-gutter: clamp(14px, 2.5vw, 32px); --ak-edge: max(var(--ak-gutter), calc((100% - 1280px) / 2 + var(--ak-gutter))); }
html { scroll-padding-top: 104px; }
main { padding-top: 0 !important; max-width: none !important; width: 100% !important; min-width: 0 !important; margin: 0 !important; }
.dmi-gbar.dmi-gbar.dmi-gbar .dmi-gbar__in { max-width: 1280px; padding-left: var(--ak-gutter); padding-right: var(--ak-gutter); }
.ak-masthead { position: sticky; top: 0; z-index: 1000; background: var(--surface); border-bottom: 1px solid var(--line); }
.ak-masthead-in { position: relative; box-sizing: border-box; width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--ak-gutter); }
.ak-masthead header { position: relative; display: flex; align-items: center; justify-content: space-between; width: auto; height: 60px; background: none; border: 0; box-shadow: none; z-index: 6; }
.ak-masthead #logo { position: static; order: 1; padding: 0; margin: 0 auto 0 0; transform: none; line-height: 0; }
.ak-masthead #cd-hamburger-menu { order: 2; }
.ak-masthead #cd-cart-trigger { order: 3; }
.ak-masthead #logo img { display: block; max-height: 42px; width: auto; margin-left: -8px; } /* the image has built-in left padding */
.ak-masthead #cd-hamburger-menu, .ak-masthead #cd-cart-trigger { position: static; height: auto; }
.ak-masthead #cd-hamburger-menu a, .ak-masthead #cd-cart-trigger a { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; font-size: 28px; }
.ak-masthead #cd-hamburger-menu a { color: var(--indigo); font-size: 25px; }
.ak-masthead #cd-cart-trigger a { justify-content: flex-end; }
@media (max-width: 1023px) {
  .ak-masthead #main-nav { position: absolute; top: 100%; left: -110%; width: min(320px, 100vw); height: auto; max-height: calc(100vh - 60px); padding-top: 0; background: var(--surface); visibility: hidden; z-index: 5; transition: left .2s, visibility .2s; }
  .ak-masthead #main-nav.speed-in { left: 0; visibility: visible; }
}
@media (min-width: 1024px) {
  .ak-masthead-in { display: flex; align-items: center; gap: 12px; min-height: 76px; }
  .ak-masthead header { display: contents; }
  .ak-masthead #logo { order: 1; margin-right: auto; }
  .ak-masthead #logo img { max-height: 50px; margin-left: -9px; }
  .ak-masthead #main-nav { position: static; order: 2; width: auto; height: auto; padding: 0; overflow: visible; line-height: normal; background: none; box-shadow: none; }
  .ak-masthead #main-nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
  .ak-masthead #main-nav li { margin: 0; }
  .ak-masthead #main-nav ul a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; }
  .ak-masthead #cd-cart-trigger { order: 3; }
  .ak-masthead #cd-cart-trigger a { width: 48px; height: 48px; font-size: 34px; }
}
.peek-a-bar { z-index: 1100 !important; }
@media (max-height: 500px) { .ak-masthead { position: relative; } }

/* Every section starts and ends on the same two edges. */
.sky-mega-menu { box-sizing: border-box; padding-left: var(--ak-edge) !important; padding-right: var(--ak-edge) !important; }
@media (min-width: 768px) {
  .sky-mega-menu > li:first-child { border-left: 0 !important; }
  .sky-mega-menu > li:first-child > a { padding-left: 0 !important; }
  .sky-mega-menu > li.right { border: 0 !important; }
  .sky-mega-menu > li.right > a { padding-right: 0 !important; }
}
.sky-mega-menu > li:first-child > a .fa-home { margin-left: -5px !important; width: auto !important; text-align: left; }
.sky-mega-menu > li.right > a .fa-stack { margin-right: -5px; }
#search-toggle form { box-sizing: border-box; max-width: 1280px; margin: 0 auto; padding: 15px var(--ak-gutter) !important; }
.ak-hero .ak-hero-inner { padding-left: var(--ak-gutter); padding-right: var(--ak-gutter); }
.main-content { box-sizing: border-box; width: 100%; max-width: 1280px; margin-left: auto; margin-right: auto; padding-left: var(--ak-gutter); padding-right: var(--ak-gutter); }
.ak-band { padding-left: var(--ak-edge); padding-right: var(--ak-edge); }
footer .container { box-sizing: border-box; width: 100%; max-width: 1280px; padding-left: var(--ak-gutter); padding-right: var(--ak-gutter); }
footer .container > .row { margin-left: calc(-1 * var(--ak-gutter)); margin-right: calc(-1 * var(--ak-gutter)); }
footer .container > .row > [class*="col-"] { padding-left: var(--ak-gutter); padding-right: var(--ak-gutter); }


/* ========== WCAG 2.2 AA pass ========== */
/* The whole card opens the book, through the single title link. */
.ak-card { position: relative; }
.ak-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.ak-title a:focus-visible { outline: none !important; }
.ak-title a:focus-visible::after { outline: 3px solid var(--indigo); outline-offset: 2px; }
.ak-add, .ak-view { position: relative; z-index: 2; }
.ak-card:hover .ak-title a { color: var(--indigo); text-decoration: underline; }
/* Links in running text never rely on colour alone. */
.main-content a:where(:not(.btn, .skip-link, [role="button"], .prevnext)), .ak-band > p a, footer .footer-bottom a { text-decoration: underline; text-underline-offset: 2px; }
.main-content .rh-nav a, .main-content .list-group a, .main-content .panel-title a, .main-content .ak-title a, .main-content .pagination a { text-decoration: none; }
.main-content .list-group a:hover, .main-content .ak-title a:hover, .ak-band .ak-title a:hover { text-decoration: underline; }
/* Accessibility badge */
.footer a.ak-a11y-badge { display: inline-flex !important; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 14px !important; border: 1px solid #8A97A8; border-radius: 8px; background: #2A2838; color: #fff !important; text-decoration: none; }
.footer a.ak-a11y-badge:hover, .footer a.ak-a11y-badge:focus-visible { border-color: #fff; color: #fff !important; text-decoration: none; }
.ak-a11y-badge svg { flex: none; width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.ak-a11y-badge svg .dot { fill: currentColor; stroke: none; }
.ak-a11y-badge > span { display: grid; gap: 1px; line-height: 1.25; }
.ak-a11y-badge strong { font-size: 16px; }
.ak-a11y-badge small { color: var(--on-night); font-size: 13px; }
@media (forced-colors: active) { .ak-a11y-badge { border: 1px solid LinkText; } }


/* ========== Compact customer reviews ========== */
.ak-reviews { margin: 26px 0 8px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ak-rev-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.main-content .ak-rev-head h2 { font-size: 21px; margin: 0; }
.main-content .btn.ak-rev-write { min-height: 36px; padding: 5px 14px; font-size: 15px; background: var(--surface) !important; border: 2px solid var(--indigo) !important; color: var(--indigo) !important; }
.main-content .btn.ak-rev-write:hover, .main-content .btn.ak-rev-write:focus { background: var(--tint) !important; }
.ak-rev-empty { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.ak-rev-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; margin-top: 12px; }
.ak-rev-summary { display: grid; gap: 10px; align-content: start; }
.ak-rev-main { min-width: 0; }
.ak-rev-all { margin: 8px 0 0; font-size: 14px; font-weight: 600; }
.ak-rev-score { display: flex; align-items: center; gap: 10px; }
.ak-rev-score > strong { font-family: var(--font-head); font-size: 34px; line-height: 1; }
.ak-rev-score > span { display: grid; gap: 2px; }
.ak-rev-score small { color: var(--muted); font-size: 14px; }
.ak-stars { position: relative; display: inline-block; width: 5.2em; height: 1em; font-size: 15px; line-height: 1; letter-spacing: .04em; color: #8C8799; white-space: nowrap; flex: none; }
.ak-stars::before { content: "\2605\2605\2605\2605\2605"; }
.ak-stars > span { position: absolute; left: 0; top: 0; height: 100%; overflow: hidden; color: #B45309; }
.ak-stars > span::before { content: "\2605\2605\2605\2605\2605"; }
.ak-rev-bars { list-style: none; padding: 0; margin: 0; font-size: 13px; line-height: 1.35; }
.ak-rev-bars li { display: grid; grid-template-columns: 30px 1fr 22px; align-items: center; gap: 6px; color: var(--muted); }
.ak-rev-bars li > span:last-child { text-align: right; }
.ak-rev-bars i { display: block; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.ak-rev-bars b { display: block; height: 100%; background: #B45309; }
.ak-rev-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 0 10px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.ak-rev-tools label { margin: 0; font-weight: 600; color: var(--ink); }
.ak-rev-tools select.form-control { width: auto; height: 34px; min-height: 34px; padding: 3px 8px; font-size: 14px; }
.ak-rev-range { margin-left: auto; }
.ak-rev-pages .pagination { margin: 0; }
.ak-rev-list { list-style: none; padding: 0; margin: 0; }
.ak-rev { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ak-rev:first-child { padding-top: 0; }
.ak-rev:last-child { border-bottom: 0; padding-bottom: 0; }
.ak-rev-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.main-content .ak-rev-top h3 { font-family: var(--font-body); font-size: 16px; font-weight: 700; margin: 0; }
.ak-rev-meta { margin: 2px 0 4px; color: var(--muted); font-size: 13px; }
.ak-rev-text { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.ak-rev-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ak-rev-more { display: inline-flex; align-items: center; min-height: 24px; padding: 0; border: 0; background: none; color: var(--indigo); font-size: 14px; font-weight: 600; text-decoration: underline; }
.ak-rev-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 5px; color: var(--muted); font-size: 13px; }
.ak-rev-foot button { min-width: 36px; min-height: 26px; padding: 1px 8px; border: 1px solid var(--field); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 13px; }
.ak-rev-foot button:hover { background: var(--tint); border-color: var(--indigo); color: var(--indigo); }
.ak-rev-foot small { margin-left: 6px; font-size: 13px; }
.ak-rev-page { max-width: 860px; }
.ak-rev-page .ak-reviews { margin-top: 12px; }
@media (max-width: 760px) { .ak-rev-body { grid-template-columns: 1fr; gap: 12px; } .ak-rev-summary { padding-bottom: 10px; border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) {
  .ak-reviews { padding: 14px; }
  .ak-rev-range { margin-left: 0; }
}
@media (forced-colors: active) { .ak-stars > span { color: Highlight; forced-color-adjust: none; } .ak-rev-bars b { background: Highlight; } }
