/*
 * imabit-theme — supplemental stylesheet (dark-first design system).
 *
 * theme.json owns the tokens (color/type/spacing/shadow/layout). This file
 * only adds what theme.json cannot express: atmosphere/background layering,
 * component classes (cards, hero, brand flow), states, and the dark-theme
 * overrides core blocks and WooCommerce do not provide.
 *
 * Section map:
 *   1. Local tokens          6. Category cards      11. Footer
 *   2. Atmosphere/base       7. Featured grid       12. Long-form content
 *                            7b. Featured books
 *                            7c. Books catalog page
 *                            7d. Book page
 *                            7e. Site pages
 *   3. Accessibility         8. (removed: brand flow) 13. Forms
 *   4. Header                9. CTA                 14. WooCommerce
 *   5. Hero                 10. Card system         15. Motion / responsive
 */

/* =====================================================================
 * 1. Local tokens — only what theme.json has no slot for.
 * ================================================================== */
:root {
  /* Radius scale */
  --imabit-radius-sm: 10px;   /* buttons, inputs */
  --imabit-radius: 14px;      /* cards */
  --imabit-radius-lg: 22px;   /* large panels */

  /* Border scale — one resting value, one active value */
  --imabit-border: 1px solid rgba(22, 139, 255, 0.20);
  --imabit-border-bright: 1px solid rgba(22, 139, 255, 0.45);

  /* Card padding — one value for every card surface */
  --imabit-card-pad: 1.5rem;

  /* Icon scale — every icon in the theme uses one of these */
  --imabit-icon-sm: 20px;     /* header/nav utility */
  --imabit-icon-md: 26px;     /* category card */
  --imabit-icon-lg: 40px;     /* feature */

  /* Logo display heights — TRUE artwork heights (tight viewBox). The v2
   * lockup is 6.02:1 with the symbol at 1.62x the wordmark cap height, so
   * 36px keeps the IMABIT cap at ~22px, matching the approved header mockup. */
  --imabit-logo-h: 36px;
  --imabit-logo-h-mark: 30px;

  /* Icon glyphs kept as data URIs so they inherit currentColor via mask.
   * Same family as the inline pillar icons: 24 viewBox, 1.6 stroke, round. */
  --imabit-icon-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.6'/%3E%3Cpath d='M4.8 20c0-3.7 3.2-5.8 7.2-5.8s7.2 2.1 7.2 5.8'/%3E%3C/svg%3E");

  --imabit-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --imabit-grid-line: rgba(70, 130, 200, 0.06);
}

/* =====================================================================
 * 2. Atmosphere — the page is never flat black. One fixed ambient layer
 *    behind everything, so sections can stay cheap and flat themselves.
 * ================================================================== */
body {
  position: relative;
  background-color: var(--wp--preset--color--deep);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(22, 139, 255, 0.18), transparent 62%),
    radial-gradient(760px 520px at 8% 4%, rgba(0, 200, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #061321 0%, #020812 62%);
}

/* Section surfaces — subtle steps, never a hard colour jump. */
.imabit-section--raised {
  background: linear-gradient(180deg, rgba(10, 35, 66, 0.55) 0%, rgba(6, 19, 33, 0.35) 100%);
  border-top: var(--imabit-border);
  border-bottom: var(--imabit-border);
}
.imabit-section--deep { background: var(--wp--preset--color--deep); }

/* Faint technical grid, used sparingly on one or two sections. */
.imabit-grid-bg {
  position: relative;
  isolation: isolate;
}
.imabit-grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--imabit-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--imabit-grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 78%);
}

/* =====================================================================
 * 3. Accessibility — skip link and a single consistent focus ring.
 * ================================================================== */
.imabit-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 0.75rem 1.25rem;
  background: var(--wp--preset--color--blue-strong);
  color: var(--wp--preset--color--white);
  border-radius: 0 0 var(--imabit-radius-sm) 0;
  font-weight: 600;
  text-decoration: none;
}
.imabit-skip-link:focus {
  left: 0;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--wp--preset--color--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Eyebrow — small technical label above headings. */
.imabit-eyebrow {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wp--preset--color--cyan);
  margin: 0 0 0.75rem;
}

/* Lede — the supporting paragraph under a section heading. */
.imabit-lede {
  color: var(--wp--preset--color--text-secondary);
  font-size: var(--wp--preset--font-size--large);
  line-height: 1.6;
}

/* =====================================================================
 * 4. Header — translucent dark bar, sticky, restrained.
 * ================================================================== */
.imabit-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 11, 22, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: var(--imabit-border);
}
.imabit-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.imabit-logo {
  display: block;
  width: auto;
  height: var(--imabit-logo-h);
  max-width: 100%;
}
.imabit-logo--mark { display: none; height: var(--imabit-logo-h-mark); }
/* WooCommerce pages carry body.woocommerce-page, and WooCommerce's own
 * `.woocommerce-page img { height: auto }` outranks .imabit-logo — the logo
 * lost its height and, as a shrinkable flex item, collapsed to nothing
 * (header and footer, 2026-09-25). Heights restated at higher specificity;
 * display is left to the rules above. */
.imabit-logo-link { flex-shrink: 0; }
.imabit-logo-link .imabit-logo { height: var(--imabit-logo-h); }
.imabit-logo-link .imabit-logo--mark { height: var(--imabit-logo-h-mark); }
@media (max-width: 782px) {
  .imabit-header__inner { --imabit-logo-h: 32px; }
}
@media (max-width: 600px) {
  .imabit-logo--full { display: none; }
  .imabit-logo--mark { display: block; }
}

/* Header navigation: quiet by default, brightens on hover/current. */
.imabit-header .wp-block-navigation {
  font-size: var(--wp--preset--font-size--small);
}
.imabit-header .wp-block-navigation-item__content {
  color: var(--wp--preset--color--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0;
  transition: color 0.16s var(--imabit-ease);
}
.imabit-header .wp-block-navigation-item__content:hover,
.imabit-header .current-menu-item > .wp-block-navigation-item__content {
  color: var(--wp--preset--color--white);
}
.imabit-header .current-menu-item > .wp-block-navigation-item__content {
  box-shadow: inset 0 -2px 0 0 var(--wp--preset--color--primary-blue);
}
/* Account link — WooCommerce auto-injects its Customer Account block into the
 * header template part. The link is real (it goes to the WooCommerce My
 * Account page), so it stays; only its glyph is replaced, because Woo's own
 * icon mixes a stroked head with a filled body and does not match this theme's
 * line-icon family. The swap is CSS-only: if WooCommerce ever changes these
 * class names the original icon simply reappears, which is a safe fallback.
 * To drop the link entirely instead, unregister the block server-side. */
.imabit-header .wp-block-woocommerce-customer-account {
  display: flex;
  align-items: center;
}
.imabit-header .wc-block-customer-account__link {
  display: inline-flex;
  align-items: center;
  color: var(--wp--preset--color--text-secondary);
  transition: color 0.16s var(--imabit-ease);
}
.imabit-header .wc-block-customer-account__link:hover {
  color: var(--wp--preset--color--white);
}
.imabit-header .wc-block-customer-account__account-icon {
  display: none;
}
.imabit-header .wc-block-customer-account__visual::before {
  content: "";
  display: block;
  width: var(--imabit-icon-sm);
  height: var(--imabit-icon-sm);
  background-color: currentColor;
  -webkit-mask: var(--imabit-icon-user) center / contain no-repeat;
  mask: var(--imabit-icon-user) center / contain no-repeat;
}

/* Mobile overlay menu inherits the dark surface rather than core's white. */
.wp-block-navigation__responsive-container.is-menu-open {
  background-color: var(--wp--preset--color--surface) !important;
  color: var(--wp--preset--color--white);
  padding-top: 4rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  color: var(--wp--preset--color--white);
  font-size: var(--wp--preset--font-size--large);
  padding: 0.5rem 0;
}
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
  color: var(--wp--preset--color--white);
  padding: 0.5rem;
}

/* =====================================================================
 * 5. Hero — signature composition: copy left, product scene right.
 * ================================================================== */
.imabit-hero {
  position: relative;
  overflow: hidden;
}
.imabit-hero__title {
  max-width: 15ch;
}
.imabit-hero__accent {
  background: linear-gradient(120deg, var(--wp--preset--color--primary-blue), var(--wp--preset--color--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.imabit-hero__copy {
  color: var(--wp--preset--color--text-secondary);
  font-size: clamp(1.0625rem, 1.05vw, 1.1875rem);
  line-height: 1.6;
  max-width: 560px;
}

/* The product scene: a stack of layered surfaces, not a fake screenshot. */
.imabit-scene {
  position: relative;
  padding: 0.5rem;
}
.imabit-scene::before {
  content: "";
  position: absolute;
  inset: 8% -6% -10% 4%;
  z-index: 0;
  background: radial-gradient(closest-side, rgba(22, 139, 255, 0.30), transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}
.imabit-panel {
  position: relative;
  z-index: 1;
  border-radius: var(--imabit-radius-lg);
  border: var(--imabit-border);
  background: linear-gradient(165deg, #0B2745 0%, #061627 58%, #04101D 100%);
  box-shadow: var(--wp--preset--shadow--raised);
  overflow: hidden;
}
.imabit-panel__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 44px;
  padding: 0 1.1rem;
  border-bottom: var(--imabit-border);
  background: rgba(2, 8, 18, 0.35);
}
.imabit-panel__dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.imabit-panel__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(150, 180, 215, 0.28);
}
.imabit-panel__file {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: var(--wp--preset--color--text-muted);
}
/* Brand mark lives inside the panel chrome — no floating badge. */
.imabit-panel__mark {
  display: block;
  width: auto;
  height: 18px;
  margin-left: auto;
  opacity: 0.85;
}
.imabit-code {
  margin: 0;
  padding: 1.6rem 1.4rem;
  font-family: var(--wp--preset--font-family--mono);
  font-size: clamp(0.8125rem, 0.98vw, 0.9375rem);
  line-height: 1.8;
  color: #C7D6E6;
  white-space: pre;
  overflow-x: auto;
}
.imabit-code .tok-kw  { color: #7C9CFF; }
.imabit-code .tok-fn  { color: var(--wp--preset--color--cyan); }
.imabit-code .tok-key { color: #9FB4CC; }
.imabit-code .tok-val { color: var(--wp--preset--color--teal); }
.imabit-code .tok-punc{ color: #5C7188; }

/* Output rail: what the code produces, as four quiet nodes. */
.imabit-panel__out {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-top: var(--imabit-border);
  background: var(--wp--preset--color--border);
}
.imabit-out {
  background: rgba(4, 16, 29, 0.85);
  padding: 0.85rem 0.5rem;
  text-align: center;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--text-muted);
}
.imabit-out span {
  display: block;
  width: 6px;
  height: 6px;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
}
.imabit-out--software span { background: var(--wp--preset--color--primary-blue); }
.imabit-out--ai span       { background: var(--wp--preset--color--cyan); }
.imabit-out--media span    { background: var(--wp--preset--color--purple); }
.imabit-out--books span    { background: var(--wp--preset--color--teal); }

/* =====================================================================
 * 6. Category cards — the one pillar section.
 *
 * Mini product cards: accent badge beside the title (as in the approved
 * dark mockup), full-width description, CTA row pinned to the bottom. Each
 * card sets one accent as an RGB triple so every tint derives from it;
 * Software adds a lighter text tint because #168BFF on the card's lightest
 * wash is 4.47:1, just under AA for small text (#4DA3FF clears it).
 * ================================================================== */
/* Centred section intro — shared by Featured Books and Four Disciplines, so
 * every homepage section opens with the same alignment as the closing CTA.
 * (Four Disciplines' intro is a constrained group, whose contentSize caps its
 * children at the same 720px.) The supporting copy sits a step below the
 * global lede so the heading stays dominant. */
.imabit-section-intro {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}
.imabit-section-intro h2 { text-wrap: balance; }
.imabit-section-intro .imabit-lede {
  max-width: 34rem;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--wp--preset--color--text-muted);
}

.imabit-pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
.imabit-pillar--software { --imabit-accent: var(--wp--preset--color--primary-blue); --imabit-accent-rgb: 22, 139, 255; --imabit-accent-text: #4DA3FF; }
.imabit-pillar--ai       { --imabit-accent: var(--wp--preset--color--cyan);         --imabit-accent-rgb: 0, 200, 255; }
.imabit-pillar--media    { --imabit-accent: var(--wp--preset--color--purple);       --imabit-accent-rgb: 155, 132, 255; }
.imabit-pillar--books    { --imabit-accent: var(--wp--preset--color--teal);         --imabit-accent-rgb: 17, 184, 190; }

.imabit-pillar {
  --imabit-accent-rgb: 22, 139, 255;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: var(--imabit-radius);
  border: 1px solid rgba(var(--imabit-accent-rgb), 0.18);
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(var(--imabit-accent-rgb), 0.10) 0%, transparent 60%),
    linear-gradient(180deg, rgba(10, 35, 66, 0.72) 0%, rgba(6, 19, 33, 0.78) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: transform 0.2s var(--imabit-ease), border-color 0.2s var(--imabit-ease), box-shadow 0.2s var(--imabit-ease);
}
/* Accent line along the top edge: solid at the left, fading out — a
 * technical detail rather than a full coloured bar. */
.imabit-pillar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--imabit-accent) 0%, rgba(var(--imabit-accent-rgb), 0.35) 45%, transparent 85%);
}
.imabit-pillar:hover,
.imabit-pillar:focus-within {
  transform: translateY(-3px);
  border-color: rgba(var(--imabit-accent-rgb), 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 40px -22px rgba(var(--imabit-accent-rgb), 0.55),
    var(--wp--preset--shadow--soft);
}

/* Small mono index, top-right: quiet sequencing, no extra meaning. */
.imabit-pillar__index {
  position: absolute;
  top: 1.25rem;
  right: 1.35rem;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--wp--preset--color--text-muted);
  opacity: 0.7;
}

.imabit-pillar__head {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-bottom: 1.1rem;
  padding-right: 1.5rem; /* clear the index */
}
.imabit-pillar__icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  border: 1px solid rgba(var(--imabit-accent-rgb), 0.38);
  background:
    radial-gradient(circle at 30% 25%, rgba(var(--imabit-accent-rgb), 0.24) 0%, rgba(var(--imabit-accent-rgb), 0.06) 70%),
    rgba(2, 8, 18, 0.6);
  box-shadow: 0 0 22px -6px rgba(var(--imabit-accent-rgb), 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--imabit-accent);
  transition: box-shadow 0.2s var(--imabit-ease), border-color 0.2s var(--imabit-ease);
}
.imabit-pillar__icon svg { width: 32px; height: 32px; }
.imabit-pillar:hover .imabit-pillar__icon {
  border-color: rgba(var(--imabit-accent-rgb), 0.6);
  box-shadow: 0 0 28px -4px rgba(var(--imabit-accent-rgb), 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.imabit-pillar h3 {
  margin: 0;
  font-size: 1.3125rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.imabit-pillar__label {
  margin: 0.3rem 0 0;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--imabit-accent-text, var(--imabit-accent));
}
.imabit-pillar__desc {
  margin: 0 0 1.35rem;
  color: var(--wp--preset--color--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* CTA row: hairline divider, label left, round arrow button right. */
.imabit-pillar__cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(var(--imabit-accent-rgb), 0.14);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--imabit-accent-text, var(--imabit-accent));
  text-decoration: none;
}
/* Stretched link: the whole card is the hit area, still one link/one name. */
.imabit-pillar__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.imabit-pillar__cta:focus-visible { outline: none; }
.imabit-pillar:has(.imabit-pillar__cta:focus-visible) {
  outline: 2px solid var(--wp--preset--color--cyan);
  outline-offset: 3px;
}
.imabit-pillar__arrow {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(var(--imabit-accent-rgb), 0.4);
  background: rgba(var(--imabit-accent-rgb), 0.06);
  transition: background-color 0.2s var(--imabit-ease), color 0.2s var(--imabit-ease), border-color 0.2s var(--imabit-ease);
}
.imabit-pillar__arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--imabit-ease);
}
.imabit-pillar:hover .imabit-pillar__arrow,
.imabit-pillar:focus-within .imabit-pillar__arrow {
  background: var(--imabit-accent);
  border-color: var(--imabit-accent);
  color: var(--wp--preset--color--deep);
}
.imabit-pillar:hover .imabit-pillar__arrow svg { transform: translateX(2px); }

/* =====================================================================
 * 7. Featured grid — editorial: one lead card, secondary cards beside it.
 * ================================================================== */
.imabit-featured .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
/* First post becomes the lead: spans two columns, image sits left. */
.imabit-featured .wp-block-post-template > li:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
/* Archive/search/blog grids reuse the same card shell, minus the lead card. */
.imabit-postgrid .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.imabit-featured .wp-block-post-template > li,
.imabit-postgrid .wp-block-post-template > li {
  display: flex;
  flex-direction: column;
  border-radius: var(--imabit-radius);
  border: var(--imabit-border);
  background: linear-gradient(180deg, rgba(10, 35, 66, 0.62) 0%, rgba(6, 19, 33, 0.72) 100%);
  overflow: hidden;
  transition: transform 0.18s var(--imabit-ease), border-color 0.18s var(--imabit-ease), box-shadow 0.18s var(--imabit-ease);
}
.imabit-featured .wp-block-post-template > li:hover,
.imabit-postgrid .wp-block-post-template > li:hover {
  transform: translateY(-2px);
  border-color: rgba(90, 170, 240, 0.45);
  box-shadow: var(--wp--preset--shadow--soft);
}
.imabit-featured .wp-block-post-featured-image,
.imabit-postgrid .wp-block-post-featured-image {
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(22, 139, 255, 0.16), rgba(0, 200, 255, 0.06)),
    var(--wp--preset--color--surface-2);
}
.imabit-featured .wp-block-post-featured-image img,
.imabit-postgrid .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.imabit-featured .wp-block-post-template > li:first-child .wp-block-post-featured-image img {
  aspect-ratio: 16 / 10;
}
/* Posts with no featured image get a designed band instead of a blank card.
 * :has() is unsupported in older browsers — they simply get a text-only card,
 * which still reads as finished. */
.imabit-featured .wp-block-post-template > li:not(:has(.wp-block-post-featured-image))::before,
.imabit-postgrid .wp-block-post-template > li:not(:has(.wp-block-post-featured-image))::before {
  content: "{ }";
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(0, 200, 255, 0.45);
  background:
    linear-gradient(135deg, rgba(22, 139, 255, 0.18), rgba(0, 200, 255, 0.06)),
    var(--wp--preset--color--surface-2);
  border-bottom: var(--imabit-border);
}
.imabit-featured .wp-block-post-template > li:first-child:not(:has(.wp-block-post-featured-image))::before {
  aspect-ratio: 16 / 10;
  font-size: 2.25rem;
}
.imabit-featured__body { padding: var(--imabit-card-pad); }
.imabit-featured .wp-block-post-title,
.imabit-postgrid .wp-block-post-title {
  margin: 0.7rem 0 0.5rem;
  font-size: 1.125rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}
.imabit-featured .wp-block-post-template > li:first-child .wp-block-post-title {
  font-size: clamp(1.3rem, 1.8vw, 1.625rem);
}
.imabit-featured .wp-block-post-title a,
.imabit-postgrid .wp-block-post-title a { color: var(--wp--preset--color--white); text-decoration: none; }
.imabit-featured .wp-block-post-title a:hover,
.imabit-postgrid .wp-block-post-title a:hover { color: var(--wp--preset--color--cyan); }
.imabit-featured .wp-block-post-excerpt,
.imabit-postgrid .wp-block-post-excerpt {
  margin: 0;
  color: var(--wp--preset--color--text-secondary);
  font-size: 0.9375rem;
}
.imabit-featured .wp-block-post-excerpt__more-link { color: var(--wp--preset--color--primary-blue); }
/* Category label as a quiet pill. */
.imabit-featured .wp-block-post-terms a,
.imabit-postgrid .wp-block-post-terms a {
  display: inline-block;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wp--preset--color--cyan);
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  border: var(--imabit-border);
  border-radius: 999px;
  background: rgba(2, 8, 18, 0.5);
}

/* =====================================================================
 * 7b. Featured books carousel — [imabit_featured_books] (inc/featured-books.php).
 *
 * One book at a time: cover left, details right, controls underneath. No JS:
 * only the server-marked .is-active book shows. With JS (.is-ready) every
 * slide shares one grid cell, so the stage is as tall as the tallest book and
 * rotating never shifts the page; slides crossfade with a 6px rise.
 * ================================================================== */
/* Top border: straight after the hero, the solid deep band would otherwise
 * melt into the dark end of the page gradient with no visible edge. */
.imabit-books-section {
  padding-top: var(--wp--preset--spacing--50);
  padding-bottom: var(--wp--preset--spacing--50);
  border-top: var(--imabit-border);
}
.imabit-books-section__inner {
  max-width: 1280px;
  margin-inline: auto;
}
/* Intro centred above the carousel; everything inside the carousel stays left-aligned. */
/* Centring comes from the shared .imabit-section-intro rule (section 6). */
.imabit-books-section__intro { margin-bottom: 2.75rem; }
.imabit-books-section__intro h2 { margin: 0 0 1rem; }

.imabit-books {
  position: relative;
  padding: clamp(1.5rem, 3.2vw, 2.75rem);
  border-radius: var(--imabit-radius-lg);
  border: var(--imabit-border);
  background:
    radial-gradient(60% 80% at 18% 30%, rgba(22, 139, 255, 0.14) 0%, transparent 62%),
    linear-gradient(180deg, rgba(10, 35, 66, 0.78) 0%, rgba(6, 19, 33, 0.86) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), var(--wp--preset--shadow--raised);
  overflow: hidden;
}
.imabit-books::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--wp--preset--color--primary-blue) 0%, var(--wp--preset--color--cyan) 40%, transparent 85%);
  opacity: 0.8;
}

.imabit-book { display: none; }
.imabit-book.is-active { display: grid; }
.imabit-books.is-ready .imabit-books__viewport { display: grid; }
.imabit-books.is-ready .imabit-book {
  display: grid;
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.45s var(--imabit-ease), transform 0.45s var(--imabit-ease), visibility 0s linear 0.45s;
}
.imabit-books.is-ready .imabit-book.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.45s var(--imabit-ease), transform 0.45s var(--imabit-ease), visibility 0s;
}

.imabit-book {
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(1.75rem, 4.5vw, 4rem);
  align-items: center;
}
.imabit-book__cover {
  position: relative;
  display: block;
  isolation: isolate;
}
/* Soft blue backlight behind the cover — the product is the brightest thing here. */
.imabit-book__cover::before {
  content: "";
  position: absolute;
  inset: 8% -6% -4%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(22, 139, 255, 0.38), transparent);
  filter: blur(18px);
}
.imabit-book__cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow:
    0 30px 60px -24px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.07);
}

.imabit-book__body { min-width: 0; }
.imabit-book__eyebrow {
  margin: 0 0 0.85rem;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wp--preset--color--cyan);
}
.imabit-book__title {
  margin: 0;
  font-size: clamp(1.625rem, 2.6vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.imabit-book__subtitle {
  margin: 0.6rem 0 0;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.45;
  color: var(--wp--preset--color--text-secondary);
  text-wrap: pretty;
}
.imabit-book__excerpt {
  max-width: 38rem;
  margin: 1.1rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--wp--preset--color--text-muted);
}
.imabit-book__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}
.imabit-book__meta li {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 200, 255, 0.28);
  background: rgba(0, 200, 255, 0.06);
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--wp--preset--color--text-secondary);
}
.imabit-book__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Multi-book layout: the side arrows share grid row 1 with the slides, so they
 * sit vertically centred on the slide area (not on the whole card), and the
 * dots row spans underneath. The columns are reserved server-side
 * (.imabit-books--multi), so nothing shifts when JS reveals the arrows. */
.imabit-books--multi {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  column-gap: clamp(0.75rem, 2vw, 1.5rem);
}
.imabit-books--multi > .imabit-books__viewport { grid-column: 2; grid-row: 1; }

.imabit-books__arrow {
  grid-row: 1;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 200, 255, 0.26);
  background: rgba(2, 8, 18, 0.55);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.8);
  color: var(--wp--preset--color--white);
  cursor: pointer;
  transition: background-color 0.2s var(--imabit-ease), border-color 0.2s var(--imabit-ease), color 0.2s var(--imabit-ease);
}
.imabit-books__arrow[hidden] { display: none; }
.imabit-books__arrow--prev { grid-column: 1; }
.imabit-books__arrow--next { grid-column: 3; }
.imabit-books__arrow:hover {
  border-color: var(--wp--preset--color--cyan);
  background: rgba(0, 200, 255, 0.08);
  color: var(--wp--preset--color--cyan);
}
.imabit-books__arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Bottom row: dots left (aligned with the cover), pause/play right, on a hairline. */
.imabit-books__controls {
  grid-column: 2;
  grid-row: 2;
  /* dots | Browse all | Pause — equal side columns keep the link truly centred. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "dots all nav";
  align-items: center;
  gap: 1rem;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-top: 1.1rem;
  border-top: var(--imabit-border);
}
.imabit-books__controls[hidden] { display: none; }
.imabit-books__dots { grid-area: dots; justify-self: start; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.imabit-books__dots[hidden],
.imabit-books__nav[hidden] { display: none; }
/* "Browse all N books": the route from the curated few to the full catalog.
 * Same round-arrow language as the Four Disciplines CTAs, one size down to sit
 * with the carousel controls. */
.imabit-books__all {
  grid-area: all;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.45rem;
  border-radius: var(--imabit-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--wp--preset--color--cyan);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--imabit-ease);
}
.imabit-books__all:hover { color: var(--wp--preset--color--white); }
.imabit-books__all:focus-visible {
  outline: 2px solid var(--wp--preset--color--cyan);
  outline-offset: 3px;
}
.imabit-books__all-arrow {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(0, 200, 255, 0.4);
  background: rgba(0, 200, 255, 0.06);
  transition: background-color 0.2s var(--imabit-ease), border-color 0.2s var(--imabit-ease), color 0.2s var(--imabit-ease);
}
.imabit-books__all-arrow svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s var(--imabit-ease);
}
.imabit-books__all:hover .imabit-books__all-arrow,
.imabit-books__all:focus-visible .imabit-books__all-arrow {
  background: var(--wp--preset--color--cyan);
  border-color: var(--wp--preset--color--cyan);
  color: var(--wp--preset--color--deep);
}
.imabit-books__all:hover .imabit-books__all-arrow svg { transform: translateX(2px); }
/* 24px hit area (WCAG 2.5.8) around a small visual dot. */
.imabit-books__dot {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.imabit-books__dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(169, 185, 203, 0.35);
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--imabit-ease), background-color 0.25s var(--imabit-ease);
}
.imabit-books__dot:hover::before { background: rgba(169, 185, 203, 0.7); }
.imabit-books__dot[aria-current="true"]::before {
  width: 22px;
  background: var(--wp--preset--color--cyan);
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
}
.imabit-books__nav { grid-area: nav; justify-self: end; display: flex; gap: 0.5rem; }
/* Pause/play: the quietest control — secondary to the side arrows. */
.imabit-books__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: var(--imabit-border);
  background: transparent;
  color: var(--wp--preset--color--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s var(--imabit-ease), color 0.2s var(--imabit-ease);
}
.imabit-books__btn[hidden] { display: none; }
.imabit-books__btn:hover {
  border-color: var(--wp--preset--color--cyan);
  color: var(--wp--preset--color--cyan);
}
.imabit-books__btn svg { width: 14px; height: 14px; fill: currentColor; }
.imabit-books__icon-play,
.imabit-books__btn.is-paused .imabit-books__icon-pause { display: none; }
.imabit-books__btn.is-paused .imabit-books__icon-play { display: block; }

/* Local copy so this section never depends on a plugin's stylesheet. */
.imabit-books-section .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =====================================================================
 * 7c. Books catalog page — [imabit_books_catalog] (templates/page-books.html).
 *
 * Centred intro (shared .imabit-section-intro), taxonomy-driven filter pills,
 * then a card grid: 3 columns from 1200px, 2 from 700px, 1 below. Covers keep
 * their 2:3 ratio and are never cropped (object-fit: contain). Discovery only —
 * no price/cart/stock chrome.
 * ================================================================== */
.imabit-catalog {
  padding-top: clamp(3rem, 5vw, 4.5rem);
  padding-bottom: var(--wp--preset--spacing--50);
}
.imabit-catalog__inner { max-width: 1280px; margin-inline: auto; }
.imabit-catalog__intro { margin-bottom: 2.25rem; }
.imabit-catalog__intro h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.imabit-catalog__filters { margin: 0 auto 2.5rem; }
.imabit-catalog__filters ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.imabit-catalog__filters a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.45rem 1.05rem;
  border-radius: 999px;
  border: var(--imabit-border);
  background: rgba(6, 19, 33, 0.6);
  color: var(--wp--preset--color--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s var(--imabit-ease), color 0.2s var(--imabit-ease), background-color 0.2s var(--imabit-ease);
}
.imabit-catalog__filters a:hover { border-color: rgba(0, 200, 255, 0.5); color: var(--wp--preset--color--white); }
.imabit-catalog__filters a[aria-current="page"] {
  border-color: var(--wp--preset--color--cyan);
  background: rgba(0, 200, 255, 0.1);
  color: var(--wp--preset--color--white);
}
.imabit-catalog__count {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  color: var(--wp--preset--color--text-muted);
}

.imabit-catalog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.4vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.imabit-bookcard { display: flex; }
.imabit-bookcard__inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: var(--imabit-radius);
  border: var(--imabit-border);
  background: linear-gradient(180deg, rgba(10, 35, 66, 0.72) 0%, rgba(6, 19, 33, 0.82) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: transform 0.2s var(--imabit-ease), border-color 0.2s var(--imabit-ease), box-shadow 0.2s var(--imabit-ease);
}
.imabit-bookcard__inner:hover,
.imabit-bookcard__inner:focus-within {
  transform: translateY(-2px);
  border-color: rgba(22, 139, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--wp--preset--shadow--soft);
}

/* Cover stage: a lit shelf the cover sits on — the product is the focal point. */
.imabit-bookcard__stage {
  display: flex;
  justify-content: center;
  padding: 1.75rem 1.5rem 1.4rem;
  background:
    radial-gradient(70% 80% at 50% 45%, rgba(22, 139, 255, 0.16) 0%, transparent 70%),
    rgba(2, 8, 18, 0.35);
  border-bottom: var(--imabit-border);
}
.imabit-bookcard__stage img {
  display: block;
  width: 210px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.imabit-bookcard__nocover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 210px;
  max-width: 100%;
  aspect-ratio: 2 / 3;
  padding: 1.25rem;
  border-radius: 6px;
  border: 1px dashed rgba(0, 200, 255, 0.3);
  background: linear-gradient(160deg, #0A2342 0%, #061321 100%);
  color: var(--wp--preset--color--text-secondary);
  font-weight: 600;
  text-align: center;
}

.imabit-bookcard__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem 1.5rem 1.5rem;
}
.imabit-bookcard__label {
  margin: 0 0 0.55rem;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wp--preset--color--cyan);
}
.imabit-bookcard__title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.imabit-bookcard__subtitle {
  margin: 0.45rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--wp--preset--color--text-secondary);
}
.imabit-bookcard__teaser {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--wp--preset--color--text-muted);
}
.imabit-bookcard__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.imabit-bookcard__meta li {
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 200, 255, 0.26);
  background: rgba(0, 200, 255, 0.05);
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.72rem;
  color: var(--wp--preset--color--text-secondary);
}
.imabit-bookcard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 1.35rem;
}
.imabit-bookcard__actions .wp-block-button__link {
  padding: 0.6rem 1.05rem;
  font-size: 0.875rem;
}

.imabit-catalog__empty {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: var(--imabit-radius-lg);
  border: var(--imabit-border);
  background: linear-gradient(180deg, rgba(10, 35, 66, 0.6) 0%, rgba(6, 19, 33, 0.75) 100%);
  text-align: center;
  color: var(--wp--preset--color--text-secondary);
}
.imabit-catalog__empty-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--wp--preset--color--white);
}
.imabit-catalog__empty p:last-child { margin-bottom: 0; }
.imabit-catalog .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1199px) {
  .imabit-catalog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
  .imabit-catalog__grid { grid-template-columns: minmax(0, 1fr); }
  .imabit-bookcard__stage img,
  .imabit-bookcard__nocover { width: 170px; }
  .imabit-bookcard__body { padding: 1.1rem 1.2rem 1.3rem; }
}

/* =====================================================================
 * 7d. Book page — [imabit_book_page] (templates/single-product.html).
 *
 * Breadcrumb, then a two-column hero: the cover (max 400px) beside the
 * summary (label, title, subtitle, lede, detail chips, free sample + browse
 * all), vertically centred so the shorter summary doesn't leave a block of
 * empty space under it. Then "About this book" (the long description, at
 * reading width) and "More books" (catalog cards). Stacks below 900px.
 * Discovery only — no price/cart/stock chrome.
 * ================================================================== */
.imabit-bookpage {
  padding-top: clamp(1.25rem, 2.5vw, 2rem);
  padding-bottom: var(--wp--preset--spacing--70);
}
.imabit-bookdetail { max-width: 1180px; margin-inline: auto; }

.imabit-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0 0 clamp(1.75rem, 3.5vw, 2.75rem);
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--wp--preset--color--text-muted);
}
.imabit-breadcrumb li { display: inline-flex; align-items: center; gap: 0.6rem; min-width: 0; }
/* Chevron separator, drawn so it follows the text colour and never reads as a slash. */
.imabit-breadcrumb li + li::before {
  content: "";
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
}
.imabit-breadcrumb a {
  color: var(--wp--preset--color--text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--imabit-ease);
}
.imabit-breadcrumb a:hover { color: var(--wp--preset--color--white); text-decoration: underline; text-underline-offset: 0.2em; }
.imabit-breadcrumb [aria-current="page"] {
  overflow: hidden;
  max-width: 42ch;
  color: var(--wp--preset--color--white);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.imabit-bookdetail__hero {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.imabit-bookdetail__cover {
  position: relative;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: var(--imabit-border);
  border-radius: var(--imabit-radius-lg);
  background:
    radial-gradient(70% 70% at 50% 45%, rgba(22, 139, 255, 0.2) 0%, transparent 72%),
    rgba(2, 8, 18, 0.45);
}
.imabit-bookdetail__cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.imabit-bookdetail__cover .imabit-bookcard__nocover { width: 100%; }

.imabit-bookdetail__label { margin-bottom: 0.9rem; }
.imabit-bookdetail__title {
  margin: 0 0 0.9rem;
  font-size: clamp(2.25rem, 4.2vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.imabit-bookdetail__subtitle {
  margin: 0 0 1.25rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--wp--preset--color--white);
}
.imabit-bookdetail__lede {
  max-width: 38rem;
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--wp--preset--color--text-secondary);
}
.imabit-bookdetail__meta { margin-top: 1.5rem; }
.imabit-bookdetail__actions { gap: 0.75rem; margin-top: 2rem; }

.imabit-bookdetail__about,
.imabit-bookdetail__more {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: var(--imabit-border);
}
.imabit-bookdetail__about h2,
.imabit-bookdetail__more h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}
.imabit-bookdetail__prose { max-width: 46rem; }
.imabit-bookdetail__prose p {
  margin: 0 0 1.1rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--wp--preset--color--text-secondary);
}
.imabit-bookdetail__prose p:last-child { margin-bottom: 0; }
.imabit-bookdetail .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .imabit-bookdetail__hero { grid-template-columns: minmax(0, 1fr); }
  .imabit-bookdetail__cover { width: 100%; max-width: 340px; margin-inline: auto; }
}
@media (max-width: 600px) {
  .imabit-breadcrumb [aria-current="page"] { max-width: 24ch; }
  .imabit-bookdetail__actions .wp-block-button { flex: 1 1 100%; }
  .imabit-bookdetail__actions .wp-block-button__link { width: 100%; }
}

/* =====================================================================
 * 7e. Site pages — [imabit_site_page] (templates/page-{software,ai,media,about}.html).
 *
 * Centred intro, then titled sections of product cards (.imabit-venture,
 * one accent each; the wide card puts its feature list in a second column),
 * principle cards (.imabit-points), area link cards (.imabit-areas) and a
 * closing CTA panel. The AI page reuses the catalog's book cards.
 * ================================================================== */
.imabit-sitepage {
  padding-top: clamp(3rem, 5vw, 4.5rem);
  padding-bottom: var(--wp--preset--spacing--70);
}
.imabit-sitepage__inner { max-width: 1180px; margin-inline: auto; }
.imabit-sitepage__intro {
  max-width: 760px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
.imabit-sitepage__intro h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.imabit-sitepage__intro .imabit-lede { max-width: 40rem; margin: 0 auto; font-size: 1.0625rem; line-height: 1.7; }
.imabit-sitepage__section { margin-top: clamp(3rem, 6vw, 4.5rem); }
.imabit-sitepage__intro + .imabit-sitepage__section { margin-top: 0; }
.imabit-sitepage__section > h2 { margin: 0 0 1.5rem; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.imabit-sitepage__section-intro {
  max-width: 42rem;
  margin: -0.75rem 0 1.75rem;
  color: var(--wp--preset--color--text-secondary);
  line-height: 1.65;
}

/* Legal pages share the site-page intro and palette, with a narrower reading column. */
.imabit-legal { padding-inline: clamp(1rem, 4vw, 2rem); }
.imabit-legal__prose { max-width: 46rem; margin-inline: auto; line-height: 1.75; overflow-wrap: anywhere; }
.imabit-legal__prose section { margin-top: 2.75rem; }
.imabit-legal__prose h2 { margin-bottom: 1rem; font-size: clamp(1.4rem, 2.4vw, 1.8rem); line-height: 1.3; }
.imabit-legal__prose h3 { margin-top: 1.75rem; font-size: 1.2rem; line-height: 1.4; }
.imabit-legal__prose :is(h2, h3) { scroll-margin-top: 7rem; }
.imabit-legal__prose li + li { margin-top: 0.6rem; }
.imabit-legal__prose :is(ul, ol) { padding-inline-start: 1.5rem; }
.imabit-legal__prose a { text-decoration: underline; text-underline-offset: 0.2em; }
.imabit-legal a:focus-visible { outline: 2px solid var(--wp--preset--color--cyan); outline-offset: 4px; }
.imabit-legal__updated {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.4rem 0.9rem;
  border: var(--imabit-border);
  border-radius: var(--imabit-radius);
  color: var(--wp--preset--color--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.imabit-legal__contents,
.imabit-legal__draft { padding: clamp(1rem, 3vw, 1.5rem); border: var(--imabit-border); border-radius: var(--imabit-radius-lg); background: rgba(6, 19, 33, 0.55); }
.imabit-legal__draft { margin-bottom: 1.5rem; }
.imabit-legal__draft p { margin: 0; }
.imabit-legal__contents h2 { margin-top: 0; }
.imabit-legal__contents ol { margin-bottom: 0; }

/* Product / initiative cards */
.imabit-venture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.4vw, 2rem);
}
.imabit-venture {
  --imabit-accent: var(--wp--preset--color--cyan);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  overflow: hidden;
  padding: clamp(1.5rem, 2.6vw, 2rem);
  border: var(--imabit-border);
  border-radius: var(--imabit-radius-lg);
  background: linear-gradient(180deg, rgba(10, 35, 66, 0.55) 0%, rgba(6, 19, 33, 0.55) 100%);
}
.imabit-venture::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--imabit-accent), transparent);
  opacity: 0.85;
}
/* BeeMyGuest's own bee yellow; purple from the palette. */
.imabit-venture--amber { --imabit-accent: #FFB81C; }
.imabit-venture--purple { --imabit-accent: var(--wp--preset--color--purple); }
.imabit-venture--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(2rem, 4vw, 3.5rem);
  row-gap: 1.1rem;
  align-items: start;
}
.imabit-venture--wide .imabit-venture__features { grid-column: 2; grid-row: 1 / span 2; }
.imabit-venture__head { display: flex; align-items: center; gap: 1rem; }
.imabit-venture__head > div { min-width: 0; }
.imabit-venture__logo { flex: none; width: 72px; height: 72px; }
.imabit-venture__icon,
.imabit-point__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--imabit-accent, var(--wp--preset--color--cyan));
  background: rgba(0, 200, 255, 0.08);
  background: color-mix(in srgb, var(--imabit-accent, #00C8FF) 10%, transparent);
  border: 1px solid rgba(0, 200, 255, 0.24);
  border-color: color-mix(in srgb, var(--imabit-accent, #00C8FF) 30%, transparent);
}
.imabit-venture__icon { width: 64px; height: 64px; }
.imabit-venture__icon svg { width: 32px; height: 32px; }
.imabit-venture__status {
  margin: 0 0 0.3rem;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--imabit-accent);
}
.imabit-venture__title { margin: 0; font-size: clamp(1.35rem, 2vw, 1.65rem); line-height: 1.2; }
.imabit-venture__tagline {
  margin: 0 0 0.6rem;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--wp--preset--color--white);
}
.imabit-venture__text { margin: 0; line-height: 1.7; color: var(--wp--preset--color--text-secondary); }
.imabit-venture .imabit-bookcard__meta { margin-top: 1.1rem; }
.imabit-venture__features { display: grid; gap: 0.8rem; margin: 0; padding: 0; list-style: none; }
.imabit-venture__features li {
  padding: 0.9rem 1rem;
  border: var(--imabit-border);
  border-radius: var(--imabit-radius);
  background: rgba(2, 8, 18, 0.35);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--wp--preset--color--text-secondary);
}
.imabit-venture__features strong { color: var(--wp--preset--color--white); font-weight: 600; }
.imabit-venture__link { margin: auto 0 0; }
.imabit-venture__link a { font-weight: 600; text-underline-offset: 0.2em; }

/* Principles */
.imabit-points,
.imabit-areas {
  display: grid;
  gap: clamp(1.25rem, 2.4vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.imabit-points { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.imabit-point,
.imabit-area a {
  padding: 1.5rem;
  border: var(--imabit-border);
  border-radius: var(--imabit-radius-lg);
  background: rgba(6, 19, 33, 0.55);
}
.imabit-point__icon { width: 48px; height: 48px; margin-bottom: 1rem; border-radius: 12px; }
.imabit-point__icon svg { width: 26px; height: 26px; }
.imabit-point h3 { margin: 0 0 0.5rem; font-size: 1.15rem; line-height: 1.3; }
.imabit-point p { margin: 0; font-size: 0.95rem; line-height: 1.65; color: var(--wp--preset--color--text-secondary); }

/* Area link cards (About) */
.imabit-areas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.imabit-area a {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: 100%;
  box-sizing: border-box;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s var(--imabit-ease), transform 0.2s var(--imabit-ease);
}
.imabit-area a:hover { border-color: rgba(0, 200, 255, 0.5); transform: translateY(-2px); }
.imabit-area .imabit-point__icon { margin-bottom: 0.25rem; }
.imabit-area__title { font-size: 1.2rem; font-weight: 700; color: var(--wp--preset--color--white); }
.imabit-area__text { font-size: 0.95rem; line-height: 1.6; color: var(--wp--preset--color--text-secondary); }

/* Closing CTA */
.imabit-sitepage__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border: var(--imabit-border);
  border-radius: var(--imabit-radius-lg);
  background:
    radial-gradient(80% 140% at 0% 0%, rgba(22, 139, 255, 0.16) 0%, transparent 60%),
    rgba(6, 19, 33, 0.6);
}
.imabit-sitepage__cta p { max-width: 36rem; margin: 0; font-size: 1.125rem; font-weight: 500; color: var(--wp--preset--color--white); }
.imabit-sitepage__cta .wp-block-buttons { gap: 0.75rem; }

@media (max-width: 1024px) {
  .imabit-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .imabit-venture-grid,
  .imabit-points { grid-template-columns: minmax(0, 1fr); }
  .imabit-venture--wide { display: flex; }
}
@media (max-width: 600px) {
  .imabit-areas { grid-template-columns: minmax(0, 1fr); }
  .imabit-sitepage__cta .wp-block-button { flex: 1 1 100%; }
  .imabit-sitepage__cta .wp-block-button__link { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .imabit-area a { transition: none; }
  .imabit-area a:hover { transform: none; }
}

/* =====================================================================
 * 9. Closing CTA — brightest moment on the page.
 * ================================================================== */
/* Deep band behind the CTA panel; Four Disciplines' bottom border separates it. */
.imabit-cta-section { padding-top: var(--wp--preset--spacing--50); }
.imabit-cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--imabit-radius-lg);
  border: var(--imabit-border-bright);
  background:
    radial-gradient(900px 420px at 18% 120%, rgba(0, 200, 255, 0.20), transparent 62%),
    radial-gradient(700px 380px at 82% -20%, rgba(22, 139, 255, 0.26), transparent 60%),
    linear-gradient(160deg, #0A2342 0%, #061321 100%);
  box-shadow: var(--wp--preset--shadow--raised);
}
/* Stacked v2 logo (1.70:1): substantial, but still secondary to the headline. */
.imabit-cta__logo {
  display: block;
  width: 205px;
  height: auto;
  margin: 0 auto 2.25rem;
}

/* =====================================================================
 * 10. Card system — shared shell used outside the grids above.
 * ================================================================== */
.imabit-card {
  border-radius: var(--imabit-radius);
  border: var(--imabit-border);
  background: linear-gradient(180deg, rgba(10, 35, 66, 0.62) 0%, rgba(6, 19, 33, 0.72) 100%);
  transition: transform 0.18s var(--imabit-ease), border-color 0.18s var(--imabit-ease), box-shadow 0.18s var(--imabit-ease);
}
.imabit-card:hover {
  transform: translateY(-2px);
  border-color: rgba(90, 170, 240, 0.45);
  box-shadow: var(--wp--preset--shadow--soft);
}

/* Buttons — primary gets a soft blue lift, secondary is an outline. */
.wp-block-button__link {
  transition: background-color 0.16s var(--imabit-ease), color 0.16s var(--imabit-ease), box-shadow 0.16s var(--imabit-ease), transform 0.16s var(--imabit-ease);
}
.wp-block-button:not(.is-style-outline) > .wp-block-button__link {
  box-shadow: 0 6px 18px rgba(22, 139, 255, 0.18);
}
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 200, 255, 0.24);
}
.wp-block-button.is-style-outline > .wp-block-button__link {
  border: var(--imabit-border-bright);
  color: var(--wp--preset--color--white);
  background: rgba(10, 35, 66, 0.45);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
  background: rgba(22, 139, 255, 0.16);
  border-color: var(--wp--preset--color--cyan);
  color: var(--wp--preset--color--white);
}

/* =====================================================================
 * 11. Footer — darkest surface, organised into groups.
 * ================================================================== */
.imabit-footer {
  background: var(--wp--preset--color--deep);
  border-top: var(--imabit-border);
}
/* v2 lockup is 6.02:1 — 32px keeps the footer IMABIT cap (~20px) just under the header's 22px. */
.imabit-footer__inner { --imabit-logo-h: 32px; }
.imabit-footer h2 {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wp--preset--color--text-muted);
  margin: 0 0 1rem;
}
.imabit-footer .wp-block-navigation {
  font-size: 0.9375rem;
}
.imabit-footer .wp-block-navigation-item__content {
  color: var(--wp--preset--color--text-secondary);
  text-decoration: none;
}
.imabit-footer .wp-block-navigation-item__content:hover {
  color: var(--wp--preset--color--white);
}

/* =====================================================================
 * 12. Long-form content — posts, pages, book/article reading.
 * ================================================================== */
.imabit-prose p,
.imabit-prose li {
  color: var(--wp--preset--color--text-secondary);
}
.imabit-prose h2,
.imabit-prose h3,
.imabit-prose h4 {
  margin-top: 2.5rem;
}
.imabit-prose blockquote {
  margin: 2rem 0;
  padding: 0.35rem 0 0.35rem 1.5rem;
  border-left: 3px solid var(--wp--preset--color--primary-blue);
  color: var(--wp--preset--color--white);
}
.imabit-prose :where(code):not(.wp-block-code code) {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  border-radius: 5px;
  background: rgba(10, 35, 66, 0.8);
  border: var(--imabit-border);
  color: var(--wp--preset--color--cyan);
}
.imabit-prose a { text-underline-offset: 3px; }
.imabit-prose table {
  width: 100%;
  border-collapse: collapse;
}
.imabit-prose th,
.imabit-prose td {
  border: var(--imabit-border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}
.imabit-prose th { color: var(--wp--preset--color--white); background: rgba(10, 35, 66, 0.6); }

/* Page/post header block used by the internal templates. */
.imabit-page-head {
  border-bottom: var(--imabit-border);
}
.imabit-meta {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--text-muted);
}

/* Pagination and post-to-post navigation. */
.wp-block-query-pagination {
  gap: 0.4rem;
  font-size: 0.9375rem;
}
.wp-block-query-pagination a,
.wp-block-query-pagination .current,
.wp-block-post-navigation-link a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border: var(--imabit-border);
  border-radius: var(--imabit-radius-sm);
  color: var(--wp--preset--color--text-secondary);
  text-decoration: none;
  background: rgba(10, 35, 66, 0.4);
}
.wp-block-query-pagination a:hover,
.wp-block-post-navigation-link a:hover {
  color: var(--wp--preset--color--white);
  border-color: rgba(90, 170, 240, 0.45);
}
.wp-block-query-pagination .current {
  color: var(--wp--preset--color--white);
  border-color: var(--wp--preset--color--primary-blue);
}

/* Search block — the input/button pair used on search and 404. */
.wp-block-search__inside-wrapper { gap: 0.5rem; }
.wp-block-search .wp-block-search__button {
  background: var(--wp--preset--color--blue-strong);
  color: var(--wp--preset--color--white);
  border: none;
  padding: 0.7rem 1.25rem;
  font-weight: 600;
}
.wp-block-search .wp-block-search__button:hover {
  background: var(--wp--preset--color--cyan);
  color: var(--wp--preset--color--deep);
}

/* =====================================================================
 * 13. Forms — dark surfaces with clearly visible borders.
 * ================================================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select,
.wp-block-search__input {
  background: rgba(2, 8, 18, 0.65);
  border: var(--imabit-border);
  border-radius: var(--imabit-radius-sm);
  color: var(--wp--preset--color--white);
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.9375rem;
}
input::placeholder,
textarea::placeholder {
  color: var(--wp--preset--color--text-muted);
  opacity: 1;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--wp--preset--color--primary-blue);
  outline: 2px solid var(--wp--preset--color--cyan);
  outline-offset: 2px;
}
input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
label { color: var(--wp--preset--color--text-secondary); font-size: 0.9375rem; }
.wp-block-search__button { border-radius: var(--imabit-radius-sm); }

/* =====================================================================
 * 14. WooCommerce — inherit the dark system, no behaviour changes.
 * ================================================================== */
/* WooCommerce's breadcrumb on the pages it still renders itself — the same
 * quiet style as the book page's .imabit-breadcrumb. */
.woocommerce-breadcrumb {
  margin: 0 0 1.75rem;
  font-size: 0.8125rem;
  color: var(--wp--preset--color--text-muted);
}
.woocommerce-breadcrumb a {
  color: var(--wp--preset--color--text-secondary);
  text-decoration: none;
}
.woocommerce-breadcrumb a:hover { color: var(--wp--preset--color--white); text-decoration: underline; text-underline-offset: 0.2em; }
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wc-block-components-button {
  border-radius: var(--imabit-radius-sm) !important;
  background-color: var(--wp--preset--color--blue-strong) !important;
  color: var(--wp--preset--color--white) !important;
  border: none !important;
  font-weight: 600;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.wc-block-components-button:hover {
  background-color: var(--wp--preset--color--cyan) !important;
  color: var(--wp--preset--color--deep) !important;
}
.woocommerce ul.products li.product,
.wc-block-grid__product,
.woocommerce .cart_totals,
.woocommerce-checkout .woocommerce-checkout-review-order {
  border-radius: var(--imabit-radius);
  border: var(--imabit-border);
  background: rgba(10, 35, 66, 0.5);
  padding: 1rem;
}
.woocommerce .price,
.woocommerce-Price-amount {
  color: var(--wp--preset--color--white);
  font-weight: 700;
}
.woocommerce-info,
.woocommerce-message,
.woocommerce-error,
.wc-block-components-notice-banner {
  border-radius: var(--imabit-radius-sm);
  border: var(--imabit-border);
  background: rgba(10, 35, 66, 0.7) !important;
  color: var(--wp--preset--color--white) !important;
}
.woocommerce-error { border-left: 3px solid #FF6B6B; }
.woocommerce-message { border-left: 3px solid var(--wp--preset--color--teal); }
.woocommerce table.shop_table,
.woocommerce table.shop_table td,
.woocommerce table.shop_table th {
  border-color: var(--wp--preset--color--border);
  color: var(--wp--preset--color--text-secondary);
}
.woocommerce table.shop_table th { color: var(--wp--preset--color--white); }
.woocommerce .quantity .qty {
  background: rgba(2, 8, 18, 0.65);
  border: var(--imabit-border);
  color: var(--wp--preset--color--white);
  border-radius: var(--imabit-radius-sm);
  padding: 0.5rem;
}

/* =====================================================================
 * 15. Responsive + motion.
 * ================================================================== */
/* Tablet: the header's five nav items plus a CTA stop fitting well before the
 * overlay menu kicks in at 600px, so the CTA steps out first (it is repeated
 * in the hero and the closing CTA, so nothing is lost). */
@media (max-width: 900px) {
  .imabit-header__inner .wp-block-buttons { display: none; }
  .imabit-header .wp-block-navigation { --wp--style--block-gap: 1.25rem; }
}

/* Narrow desktop: four ~250px cards leave the title little room beside the
 * badge, so the card tightens one step before the grid drops to 2x2. */
@media (min-width: 1025px) and (max-width: 1240px) {
  .imabit-pillar { padding: 1.3rem 1.25rem 1.1rem; }
  .imabit-pillar__head { gap: 0.8rem; padding-right: 1.1rem; }
  .imabit-pillar__icon { width: 52px; height: 52px; border-radius: 12px; }
  .imabit-pillar__icon svg { width: 28px; height: 28px; }
  .imabit-pillar h3 { font-size: 1.1875rem; }
  .imabit-pillar__index { right: 1.1rem; }
}
@media (max-width: 1024px) {
  .imabit-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .imabit-featured .wp-block-post-template,
  .imabit-postgrid .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .imabit-featured .wp-block-post-template > li:first-child { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 900px) {
  .imabit-book { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 1.75rem; }
  .imabit-books--multi { grid-template-columns: 44px minmax(0, 1fr) 44px; column-gap: 0.75rem; }
  .imabit-books__arrow { width: 44px; height: 44px; }
}
/* Too narrow for dots | Browse all | Pause on one line: the link takes its own
 * centred line under the dots and Pause. */
@media (max-width: 700px) {
  .imabit-books__controls {
    grid-template-columns: 1fr auto;
    grid-template-areas: "dots nav" "all all";
    row-gap: 0.85rem;
  }
  .imabit-books__all { justify-self: center; }
}
@media (max-width: 600px) {
  .imabit-pillars { grid-template-columns: 1fr; gap: 1rem; }
  .imabit-book { grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
  .imabit-book__cover { width: min(58vw, 230px); margin-inline: auto; }
  .imabit-book__actions .wp-block-button { flex: 1 1 100%; }
  .imabit-book__actions .wp-block-button__link { width: 100%; text-align: center; }
  .imabit-cta__logo { width: 155px; margin-bottom: 1.85rem; }
  /* Phones: side arrows would squeeze the stacked slide, so they drop to the
   * bottom row, either side of the dots. */
  .imabit-books--multi { grid-template-columns: 44px minmax(0, 1fr) 44px; column-gap: 0.5rem; }
  .imabit-books--multi > .imabit-books__viewport { grid-column: 1 / -1; }
  /* align-self: start keeps the arrows level with the dots row, not centred on the two-line controls. */
  .imabit-books__arrow { grid-row: 2; align-self: start; margin-top: clamp(1.5rem, 3vw, 2.25rem); }
  .imabit-books__controls { border-top: 0; padding-top: 0; }
  .imabit-books__dots { justify-self: center; }
  .imabit-pillar__icon { width: 52px; height: 52px; border-radius: 12px; }
  .imabit-pillar__icon svg { width: 28px; height: 28px; }
  .imabit-featured .wp-block-post-template,
  .imabit-postgrid .wp-block-post-template { grid-template-columns: 1fr; }
  .imabit-featured .wp-block-post-template > li:first-child { grid-column: auto; }
  .imabit-panel__out { grid-template-columns: repeat(2, 1fr); }
  .imabit-hero__title { max-width: none; }
}
@media (max-width: 400px) {
  .imabit-code { font-size: 0.72rem; padding: 1.1rem 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .imabit-books.is-ready .imabit-book,
  .imabit-bookcard__inner:hover,
  .imabit-bookcard__inner:focus-within,
  .imabit-pillar:hover,
  .imabit-pillar:focus-within,
  .imabit-pillar:hover .imabit-pillar__arrow svg,
  .imabit-card:hover,
  .imabit-featured .wp-block-post-template > li:hover,
  .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
    transform: none;
  }
}

/* Articles & Insights — shares the existing theme palette and prose foundation. */
.imabit-editorial-shell { width: min(1280px, calc(100% - 3rem)); margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) 0; }
.imabit-editorial-head { max-width: 860px; margin-bottom: 2.5rem; }
.imabit-editorial-head h1 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.12; letter-spacing: -.035em; overflow-wrap: anywhere; }
.imabit-editorial-head > p:not(.imabit-meta):not(.imabit-eyebrow) { color: var(--wp--preset--color--text-secondary); font-size: 1.15rem; }
.imabit-insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.imabit-insight-card { min-width: 0; border: 1px solid rgba(127,147,170,.25); border-radius: 16px; background: var(--wp--preset--color--surface); overflow: hidden; }
.imabit-insight-card__body { padding: 1.5rem; }
.imabit-insight-card h2, .imabit-insight-card h3 { font-size: 1.4rem; line-height: 1.35; margin: .75rem 0; overflow-wrap: anywhere; }
.imabit-insight-card h2 a, .imabit-insight-card h3 a { color: var(--wp--preset--color--white); text-decoration: none; }
.imabit-insight-card a:hover { text-decoration: underline; }
.imabit-insight-card__image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.imabit-insight-card .imabit-meta { font-size: .85rem; }
.imabit-insight-filters, .imabit-topic-filter, .imabit-share__controls, .imabit-insight-pagination { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin: 1.5rem 0; }
.imabit-insight-filters a, .imabit-share__controls a, .imabit-share button, .imabit-code-block button, .imabit-topic-filter button, .imabit-insight-pagination > * { padding: .55rem .9rem; border: 1px solid rgba(127,147,170,.4); border-radius: 8px; background: var(--wp--preset--color--surface); color: var(--wp--preset--color--white); font: inherit; cursor: pointer; }
.imabit-insight-filters a[aria-current], .imabit-insight-pagination .current { border-color: var(--wp--preset--color--blue-strong); background: rgba(11,111,214,.2); }
.imabit-topic-filter select { max-width: 100%; padding: .6rem; color: var(--wp--preset--color--white); background: var(--wp--preset--color--surface); border: 1px solid rgba(127,147,170,.4); border-radius: 8px; font: inherit; }
.imabit-article { max-width: 1000px; }
.imabit-article .imabit-editorial-head, .imabit-article > .imabit-prose { max-width: 760px; margin-inline: auto; }
.imabit-article > .wp-block-post-featured-image { margin: 2rem 0 3rem; }
.imabit-article .wp-block-post-featured-image img { border-radius: 16px; }
.imabit-prose { overflow-wrap: break-word; }
.imabit-prose > * { min-width: 0; }
.imabit-prose pre { overflow: auto; max-width: 100%; white-space: pre; tab-size: 4; padding: 1.3rem; font-size: .9rem; line-height: 1.65; background: #06101f; }
.imabit-prose pre code { padding: 0; background: transparent; border: 0; color: #e4eaf3; white-space: pre; font-family: var(--wp--preset--font-family--mono, monospace); }
.imabit-code-block { margin: 2rem 0; border: 1px solid rgba(127,147,170,.3); border-radius: 12px; overflow: hidden; }
.imabit-code-block pre { margin: 0; border: 0; border-radius: 0; }
.imabit-code-block__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem 1rem; background: var(--wp--preset--color--surface); font-size: .85rem; }
.imabit-prose .wp-block-table { overflow-x: auto; }
.imabit-prose img, .imabit-prose video, .imabit-prose svg { max-width: 100%; height: auto; }
.imabit-prose h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin-top: 2.5rem; }
.imabit-prose h3 { font-size: 1.4rem; margin-top: 2rem; }
.imabit-prose h4 { font-size: 1.15rem; }
.imabit-prose figure { margin-inline: 0; }
.imabit-share, .imabit-related-products, .imabit-related-reading { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(127,147,170,.25); }
.imabit-product-callout { display: flex; gap: 1.5rem; align-items: center; padding: 1.5rem; border: 1px solid rgba(127,147,170,.25); border-radius: 14px; margin: 1rem 0; }
.imabit-product-callout img { width: 110px; height: auto; flex-shrink: 0; }
.imabit-product-callout h3 { margin-top: 0; }
.imabit-editorial-shell :where(a,button,select,pre):focus-visible { outline: 3px solid var(--wp--preset--color--blue-strong); outline-offset: 4px; }
.imabit-code-block .token.comment, .imabit-code-block .token.prolog { color: #91a4bc; }
.imabit-code-block .token.punctuation { color: #c5d3e5; }
.imabit-code-block .token.string, .imabit-code-block .token.attr-value { color: #b5e89a; }
.imabit-code-block .token.keyword, .imabit-code-block .token.tag, .imabit-code-block .token.boolean { color: #bca9ff; }
.imabit-code-block .token.function, .imabit-code-block .token.class-name { color: #82caff; }
.imabit-code-block .token.number, .imabit-code-block .token.constant { color: #ffc58d; }
.imabit-code-block .token.operator, .imabit-code-block .token.property, .imabit-code-block .token.attr-name { color: #8be3dc; }
@media (max-width: 1000px) { .imabit-insight-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) { .imabit-insight-grid { grid-template-columns: minmax(0,1fr); } .imabit-editorial-shell { width: calc(100% - 2rem); } .imabit-product-callout { align-items: flex-start; } .imabit-product-callout img { width: 70px; } }
