/*
Theme Name:   Docpaula
Theme URI:    https://docpaula.com/
Author:       Site maintenance
Description:  Author theme for Dr. M. Paula Daoust. Design direction "Iridescent Naturalist" - antique natural-history plate meets modern editorial. Palette and dragonfly mark derived from the Dragonfly brand card. Books are managed as a custom post type; front-page copy lives in the Customizer.
Version:      1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  docpaula
Tags:         one-column, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   Dr. Paula Daoust — Author Site
   Design system: "Iridescent Naturalist"
   Antique natural-history plate meets modern editorial.
   Palette + dragonfly mark derived from the Dragonfly brand card.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FONTS  (self-hosted — no third-party CDN, satisfies strict CSP)
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Fraunces';
  src: url('assets/fonts/Fraunces-var-latin.woff2') format('woff2-variations');
  font-weight: 300 900;
  font-stretch: normal;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  src: url('assets/fonts/Newsreader-var-latin.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   2. TOKENS
   -------------------------------------------------------------------------- */

:root {
  /* Ground — deep teal-black, pulled from the brand teal driven to near-black */
  --ink-900: #071319;
  --ink-800: #0B1F27;
  --ink-700: #102C37;
  --ink-600: #163A48;
  --ink-500: #1D4B5C;

  /* Brand teal — the band on the business card */
  --teal-600: #2B6377;
  --teal-500: #3D7F94;
  --teal-400: #5E9AA9;
  --teal-300: #8CBCC7;

  /* Antique gold — the infinity loop */
  --gold-600: #9A7431;
  --gold-500: #B98F3E;
  --gold-400: #C89B4A;
  --gold-300: #DCBB7A;
  --gold-200: #EAD39A;

  /* Warm paper — the card stock */
  --ivory-100: #FBF8F1;
  --ivory-200: #F4EFE3;
  --ivory-300: #E9E1CE;
  --ivory-400: #D8CCB2;

  /* Iridescence — the dragonfly wings */
  --wing-sapphire: #3C6FD0;
  --wing-viridian: #3FA98B;
  --wing-magenta:  #C0559B;
  --wing-violet:   #7B5BC4;

  /* Semantic */
  --bg: var(--ink-900);
  --bg-alt: var(--ivory-200);
  --fg: #E4EDF0;
  --fg-dim: #9DB4BD;
  --fg-on-light: #16302B;
  --fg-on-light-dim: #4C6660;
  --rule: rgba(200, 155, 74, 0.28);
  --rule-light: rgba(22, 48, 43, 0.16);

  /* Type */
  --f-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --f-body: 'Newsreader', 'Iowan Old Style', Georgia, 'Times New Roman', serif;

  /* Fluid scale */
  --t-xs:   clamp(0.72rem, 0.69rem + 0.14vw, 0.80rem);
  --t-sm:   clamp(0.84rem, 0.80rem + 0.18vw, 0.94rem);
  --t-base: clamp(1.02rem, 0.97rem + 0.24vw, 1.18rem);
  --t-md:   clamp(1.18rem, 1.08rem + 0.46vw, 1.44rem);
  --t-lg:   clamp(1.52rem, 1.30rem + 1.05vw, 2.30rem);
  --t-xl:   clamp(2.10rem, 1.62rem + 2.30vw, 3.75rem);
  --t-2xl:  clamp(2.80rem, 1.85rem + 4.40vw, 6.50rem);

  /* Space */
  --sp-1: 0.375rem;  --sp-2: 0.75rem;  --sp-3: 1.25rem;
  --sp-4: 2rem;      --sp-5: 3.25rem;  --sp-6: 5rem;
  --sp-7: 7.5rem;    --sp-8: 11rem;

  --wrap: 74rem;
  --wrap-narrow: 46rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

/* --------------------------------------------------------------------------
   3. RESET / BASE
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: var(--t-base);
  font-weight: 380;
  line-height: 1.68;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

/* --------------------------------------------------------------------------
   THE hidden ATTRIBUTE MUST ALWAYS WIN
   --------------------------------------------------------------------------
   Browsers implement hidden as [hidden]{display:none} in their default
   stylesheet, which is the weakest possible rule. Any author rule that sets
   display — .rez__row{display:flex}, say — beats it on specificity, and the
   element stays on screen even though JavaScript set element.hidden = true.

   That silently broke the resource filters: the chip highlighted correctly and
   the filter state changed, but no row ever disappeared. Making the rule
   !important here fixes every hidden= toggle in the theme at once, instead of
   patching each component as it is discovered.
   -------------------------------------------------------------------------- */
[hidden] { display: none !important; }


/* Inline icons carry width/height attributes, but this is the backstop: an
   <svg> with only a viewBox has no intrinsic size and will otherwise stretch
   to fill its container. Capping it here means a missing rule degrades to a
   slightly-wrong icon, never a page-filling one. */
svg.ico { width: 1.125em; height: 1.125em; max-width: 2rem; max-height: 2rem; flex: none; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.018em;
  margin: 0;
  font-variation-settings: 'SOFT' 28, 'WONK' 1;
}

p { margin: 0 0 1em; text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--gold-400); color: var(--ink-900); }

/* Skip link — keyboard users land here first */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--gold-400); color: var(--ink-900);
  padding: 0.75rem 1.25rem; font-family: var(--f-display); font-weight: 600;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* --------------------------------------------------------------------------
   4. TEXTURE — paper grain over the whole page
   -------------------------------------------------------------------------- */

body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.32;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   5. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }

.section { position: relative; padding-block: var(--sp-7); }
.section--light {
  background: var(--bg-alt);
  color: var(--fg-on-light);
}
.section--light h1, .section--light h2, .section--light h3 { color: var(--ink-800); }

/* Torn-edge transition between dark and light sections */
.section--light::before,
.section--light::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 3.5rem;
  background: var(--bg-alt);
  z-index: 1;
}
.section--light::before {
  top: -3.4rem;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 60 L0 34 Q 150 10 300 30 T 600 26 T 900 34 T 1200 20 L1200 60 Z' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 60 L0 34 Q 150 10 300 30 T 600 26 T 900 34 T 1200 20 L1200 60 Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.section--light::after {
  bottom: -3.4rem;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L0 26 Q 150 50 300 30 T 600 34 T 900 26 T 1200 40 L1200 0 Z' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L0 26 Q 150 50 300 30 T 600 34 T 900 26 T 1200 40 L1200 0 Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}

/* --------------------------------------------------------------------------
   6. SECTION HEADINGS — eyebrow + rule + title
   -------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--f-display);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-300);
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: var(--sp-3);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.eyebrow::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--rule), transparent);
}
.section--light .eyebrow { color: var(--gold-600); }
.section--light .eyebrow::after {
  background: linear-gradient(90deg, var(--rule-light), transparent);
}

.section-title {
  font-size: var(--t-xl);
  max-width: 20ch;
  margin-bottom: var(--sp-3);
}
.section-title em {
  font-style: italic;
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
  color: var(--gold-300);
}
.section--light .section-title em { color: var(--teal-600); }

.lede {
  font-size: var(--t-md);
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 54ch;
  font-weight: 300;
}
.section--light .lede { color: var(--fg-on-light-dim); }

/* --------------------------------------------------------------------------
   7. HEADER / NAV
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
  transition: background 0.4s var(--ease-out), backdrop-filter 0.4s,
              border-color 0.4s, padding 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(7, 19, 25, 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: rgba(200, 155, 74, 0.18);
  padding-block: 0.6rem;
}

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand__mark { width: 44px; height: 44px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--f-display);
  font-size: 1.06rem; font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ivory-100);
  font-variation-settings: 'SOFT' 20, 'WONK' 0;
}
.brand__role {
  font-family: var(--f-display);
  font-size: 0.56rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--teal-300);
  margin-top: 0.32rem;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav a {
  font-family: var(--f-display);
  font-size: 0.80rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none;
  color: var(--fg-dim);
  position: relative;
  padding-block: 0.3rem;
  transition: color 0.25s;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
  white-space: nowrap;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold-400);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.42s var(--ease-out);
}
.nav a:hover, .nav a[aria-current='true'] { color: var(--ivory-100); }
.nav a:hover::after, .nav a[aria-current='true']::after {
  transform: scaleX(1); transform-origin: left;
}

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--rule); border-radius: 3px;
  color: var(--ivory-200); cursor: pointer;
  padding: 0.5rem 0.7rem; line-height: 0;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* The button carries both icons and swaps them off aria-expanded, so the
   accessible state and the visible state can never disagree. */
.nav-toggle__x { display: none; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars { display: none; }
.nav-toggle[aria-expanded='true'] .nav-toggle__x { display: block; }

/* Only ever a mobile thing. */
.nav-scrim { display: none; }

@media (max-width: 860px) {
  /* The toggle must outrank the panel it opens. Without this the open panel
     covers the button - the panel is a later, positioned sibling in the same
     stacking context - and there is then no way to close the menu on a phone:
     no scrim, and no Escape key on a touch keyboard. */
  .nav-toggle {
    display: block;
    position: relative;
    z-index: 3;
  }

  .nav-scrim {
    display: block;
    position: fixed; inset: 0;
    z-index: 1;
    background: rgba(4, 12, 16, 0.62);
    opacity: 0; pointer-events: none;
    transition: opacity 0.4s var(--ease-out);
  }
  .nav-scrim.is-visible { opacity: 1; pointer-events: auto; }

  .nav {
    position: fixed; inset: 0 0 0 auto;
    z-index: 2;
    width: min(84vw, 20rem);
    background: var(--ink-800);
    border-left: 1px solid var(--rule);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    /* Centred, but never clipping the first items when the list outgrows the
       screen. Older browsers drop this line and fall back to the one above. */
    justify-content: safe center;
    gap: var(--sp-3);
    padding: var(--sp-6) var(--sp-4);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    /* Hidden takes the off-screen links out of the tab order. Delaying it by
       the length of the slide keeps the panel visible while it animates out. */
    visibility: hidden;
    transition: transform 0.5s var(--ease-out), visibility 0s linear 0.5s;
    box-shadow: -30px 0 80px rgba(0, 0, 0, 0.5);
  }
  .nav.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.5s var(--ease-out), visibility 0s;
  }
  .nav a { font-size: 1rem; }
  .brand__role { display: none; }

  /* Stop the page behind the panel scrolling under the reader's thumb. */
  body.nav-open { overflow: hidden; }
}

/* --------------------------------------------------------------------------
   8. HERO
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--sp-8) 0 var(--sp-6);
  overflow: hidden;
  isolation: isolate;
}

/* Layered atmosphere: radial teal bloom + gold glow */
.hero::before {
  content: '';
  position: absolute; inset: -20%;
  z-index: -2;
  background:
    radial-gradient(ellipse 55% 45% at 50% 38%, rgba(61, 127, 148, 0.30), transparent 62%),
    radial-gradient(ellipse 40% 34% at 72% 62%, rgba(192, 85, 155, 0.12), transparent 68%),
    radial-gradient(ellipse 44% 40% at 24% 70%, rgba(63, 169, 139, 0.11), transparent 66%);
  animation: bloom 22s var(--ease-io) infinite alternate;
}
@keyframes bloom {
  0%   { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.14) translate3d(2%, -2%, 0); }
}

/* Canvas holds the drifting motes */
.hero__canvas {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
}

.hero__inner {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--sp-3);
  position: relative;
}

.hero__mark {
  width: clamp(190px, 27vw, 330px);
  margin-bottom: var(--sp-2);
  filter: drop-shadow(0 12px 44px rgba(61, 127, 148, 0.42));
}

.hero__title {
  font-size: var(--t-2xl);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.92;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  color: var(--ivory-100);
}
/* No overflow:hidden here. The headline runs at line-height 0.92 — tighter than
   the font's natural box — so descenders (the g in "Change") fall outside the
   line box and get clipped. There is nothing to mask: the load animation is on
   .line itself, not on an inner element sliding up behind a window. */
.hero__title .line { display: block; }
.hero__title .line > span { display: block; }

/* The name gets the iridescent wing sweep */
.hero__title .shimmer {
  background: linear-gradient(
    100deg,
    var(--gold-200) 0%, var(--wing-viridian) 22%, var(--teal-300) 38%,
    var(--wing-sapphire) 52%, var(--wing-magenta) 68%, var(--gold-300) 86%,
    var(--gold-200) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sweep 11s linear infinite;
}
@keyframes sweep {
  0%   { background-position: 0% 50%; }
  100% { background-position: 260% 50%; }
}

.hero__sub {
  font-size: var(--t-md);
  font-weight: 200;
  color: var(--teal-300);
  max-width: 30ch;
  line-height: 1.45;
  margin: 0;
}

.hero__creds {
  font-family: var(--f-display);
  font-size: var(--t-xs);
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--fg-dim);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.6rem 1.1rem;
  margin-top: var(--sp-1);
}
.hero__creds span { display: flex; align-items: center; gap: 1.1rem; }
.hero__creds span:not(:last-child)::after {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold-500);
}

.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-3); }

/* Scroll cue */
.hero__cue {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: grid; justify-items: center; gap: 0.6rem;
  font-family: var(--f-display); font-size: 0.6rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--fg-dim);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.hero__cue i {
  display: block; width: 1px; height: 44px;
  background: linear-gradient(var(--gold-400), transparent);
  animation: cue 2.6s var(--ease-io) infinite;
  transform-origin: top;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.4); opacity: 0.35; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* --------------------------------------------------------------------------
   9. BUTTONS
   -------------------------------------------------------------------------- */

.btn {
  --btn-fg: var(--ink-900);
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--f-display);
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.7rem;
  border: 1px solid transparent;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
              color 0.3s, border-color 0.3s;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
  isolation: isolate;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 15px; height: 15px; flex: none; }

.btn--gold {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--btn-fg);
  box-shadow: 0 6px 22px rgba(185, 143, 62, 0.28);
}
.btn--gold::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, var(--gold-200), var(--gold-400));
  opacity: 0; transition: opacity 0.35s;
}
.btn--gold:hover { box-shadow: 0 12px 34px rgba(185, 143, 62, 0.42); }
.btn--gold:hover::before { opacity: 1; }

.btn--ghost {
  border-color: rgba(140, 188, 199, 0.42);
  color: var(--teal-300);
  background: rgba(61, 127, 148, 0.06);
}
.btn--ghost:hover {
  border-color: var(--gold-400);
  color: var(--gold-200);
  background: rgba(200, 155, 74, 0.07);
}

.section--light .btn--ghost {
  border-color: rgba(43, 99, 119, 0.4);
  color: var(--teal-600);
  background: rgba(61, 127, 148, 0.05);
}
.section--light .btn--ghost:hover {
  border-color: var(--gold-600); color: var(--gold-600);
}

.btn--sm { padding: 0.65rem 1.15rem; font-size: 0.72rem; }

/* --------------------------------------------------------------------------
   10. BOOK GRID
   -------------------------------------------------------------------------- */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: clamp(1.5rem, 3vw, 2.75rem);
  margin-top: var(--sp-5);
}

.book-card {
  position: relative;
  display: flex; flex-direction: column;
  background: linear-gradient(168deg, rgba(29, 75, 92, 0.34), rgba(11, 31, 39, 0.5));
  border: 1px solid rgba(140, 188, 199, 0.15);
  border-radius: 4px;
  padding: 1.35rem 1.35rem 1.5rem;
  transition: transform 0.5s var(--ease-out), border-color 0.4s, box-shadow 0.5s var(--ease-out);
  transform-style: preserve-3d;
  isolation: isolate;
  overflow: hidden;
}
/* Iridescent sheen that follows the pointer (--mx/--my set in JS) */
.book-card::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(
    18rem circle at var(--mx, 50%) var(--my, 0%),
    rgba(200, 155, 74, 0.16), rgba(63, 169, 139, 0.09) 38%, transparent 68%);
  opacity: 0; transition: opacity 0.45s;
}
.book-card:hover,
.book-card:focus-within {
  transform: translateY(-7px);
  border-color: rgba(200, 155, 74, 0.48);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.75),
              0 0 0 1px rgba(200, 155, 74, 0.10);
}
.book-card:hover::before, .book-card:focus-within::before { opacity: 1; }

/* Cover: real image if present, else a typographic stand-in */
.book-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1.15rem;
  box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.72);
  background: linear-gradient(150deg, var(--cover-a, #2B6377), var(--cover-b, #102C37));
  display: grid;
  align-content: space-between;
  padding: 1.15rem 1rem;
  transition: transform 0.55s var(--ease-out);
}
.book-card:hover .book-cover { transform: scale(1.022) rotate(-0.4deg); }

/* contain, not cover: the eight covers range from 0.625 to 0.667 in ratio and
   carry the title and author right at the edges. Cropping would clip them.
   The container gradient shows through as a deliberate letterbox. */
.book-cover img { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; }

/* Spine highlight so the stand-in reads as a physical book */
.book-cover::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 9px;
  background: linear-gradient(90deg, rgba(0,0,0,0.34), rgba(255,255,255,0.10), transparent);
}

.book-cover__title {
  font-family: var(--f-display);
  font-size: 1.02rem; font-weight: 600;
  line-height: 1.14; letter-spacing: -0.01em;
  color: var(--ivory-100);
  font-variation-settings: 'SOFT' 30, 'WONK' 1;
  text-wrap: balance;
}
.book-cover__rule { width: 2.2rem; height: 2px; background: var(--gold-300); border-radius: 1px; }
.book-cover__author {
  font-family: var(--f-display);
  font-size: 0.56rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(251, 248, 241, 0.78);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.book-cover__ph {
  position: absolute; top: 0.5rem; right: 0.5rem;
  font-family: var(--f-display); font-size: 0.48rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: rgba(7, 19, 25, 0.55); color: var(--gold-200);
  padding: 0.2rem 0.4rem; border-radius: 2px;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}

.book-title {
  font-size: 1.16rem;
  margin-bottom: 0.3rem;
  color: var(--ivory-100);
  text-wrap: balance;
}
.book-sub {
  font-size: var(--t-sm);
  color: var(--teal-300);
  font-style: italic;
  font-weight: 300;
  line-height: 1.4;
  margin-bottom: 0.7rem;
}
.book-blurb {
  font-size: var(--t-sm);
  color: var(--fg-dim);
  line-height: 1.62;
  margin-bottom: 1rem;
  flex: 1;
}

.book-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 1rem;
}
.tag {
  font-family: var(--f-display);
  font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-300);
  border: 1px solid rgba(140, 188, 199, 0.28);
  border-radius: 2px;
  padding: 0.24rem 0.5rem;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.tag--year { color: var(--gold-300); border-color: rgba(200, 155, 74, 0.32); }

.book-links { display: flex; flex-direction: column; gap: 0.5rem; margin-top: auto; }

.book-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  font-family: var(--f-display);
  font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
  padding: 0.7rem 0.95rem;
  border-radius: 2px;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease-out);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.book-links a svg { width: 13px; height: 13px; flex: none; opacity: 0.75; transition: transform 0.3s var(--ease-out); }
.book-links a:hover svg { transform: translate(2px, -2px); }

.link--amazon {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--ink-900);
}
.link--amazon:hover { transform: translateX(2px); filter: brightness(1.08); }

.link--resource {
  border: 1px solid rgba(140, 188, 199, 0.28);
  color: var(--teal-300);
}
.link--resource:hover {
  border-color: var(--gold-400); color: var(--gold-200);
  background: rgba(200, 155, 74, 0.06);
  transform: translateX(2px);
}

/* --------------------------------------------------------------------------
   11. ABOUT
   -------------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  margin-top: var(--sp-4);
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }

.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 3px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--teal-500), var(--ink-700));
  display: grid; place-items: center;
  box-shadow: 0 26px 60px -22px rgba(22, 48, 43, 0.55);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait__ph {
  text-align: center; padding: 2rem;
  font-family: var(--f-display);
  color: var(--ivory-200);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.portrait__ph strong {
  display: block; font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  margin-bottom: 0.6rem; color: var(--gold-200);
}
.portrait__ph span { font-size: 0.8rem; opacity: 0.82; line-height: 1.5; }

/* Gold corner brackets on the portrait */
.portrait::before, .portrait::after {
  content: ''; position: absolute; width: 2.2rem; height: 2.2rem;
  border: 2px solid var(--gold-300); z-index: 2;
}
.portrait::before { top: 0.85rem; left: 0.85rem; border-right: 0; border-bottom: 0; }
.portrait::after { bottom: 0.85rem; right: 0.85rem; border-left: 0; border-top: 0; }

.about-body p { font-size: var(--t-base); }
.about-body p:first-of-type {
  font-size: var(--t-md);
  font-weight: 300;
  line-height: 1.52;
  color: var(--ink-700);
}
/* Drop cap */
.about-body p:first-of-type::first-letter {
  font-family: var(--f-display);
  font-size: 3.6em; font-weight: 600;
  float: left; line-height: 0.78;
  margin: 0.1em 0.12em 0 0;
  color: var(--teal-600);
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
}

.credentials {
  list-style: none; margin: var(--sp-4) 0 0; padding: 0;
  display: grid; gap: 0.85rem;
  border-top: 1px solid var(--rule-light);
  padding-top: var(--sp-3);
}
.credentials li {
  display: flex; align-items: flex-start; gap: 0.85rem;
  font-size: var(--t-sm);
  color: var(--fg-on-light-dim);
}
.credentials li::before {
  content: ''; flex: none;
  width: 7px; height: 7px; margin-top: 0.62em;
  background: var(--gold-500);
  transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   12. SPEAKING / WORK WITH PAULA
   -------------------------------------------------------------------------- */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.5rem;
  margin-top: var(--sp-5);
}
.offer {
  border: 1px solid rgba(140, 188, 199, 0.16);
  border-radius: 4px;
  padding: 1.85rem 1.5rem;
  background: linear-gradient(170deg, rgba(29, 75, 92, 0.22), transparent);
  transition: border-color 0.4s, transform 0.5s var(--ease-out), background 0.4s;
  position: relative; overflow: hidden;
}
.offer:hover {
  border-color: rgba(200, 155, 74, 0.42);
  transform: translateY(-5px);
  background: linear-gradient(170deg, rgba(29, 75, 92, 0.34), rgba(200, 155, 74, 0.04));
}
.offer__num {
  font-family: var(--f-display);
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--gold-400);
  display: block; margin-bottom: 0.9rem;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.offer h3 { font-size: 1.22rem; margin-bottom: 0.6rem; color: var(--ivory-100); }
.offer p { font-size: var(--t-sm); color: var(--fg-dim); margin: 0; line-height: 1.62; }

/* --------------------------------------------------------------------------
   13. RESOURCES
   -------------------------------------------------------------------------- */

.resource-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.25rem;
  margin-top: var(--sp-5);
  list-style: none; padding: 0;
}
.resource {
  display: flex; align-items: center; gap: 1.15rem;
  padding: 1.35rem 1.5rem;
  background: var(--ivory-100);
  border: 1px solid var(--rule-light);
  border-radius: 3px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.42s var(--ease-out), border-color 0.35s, box-shadow 0.42s var(--ease-out);
}
.resource:hover {
  transform: translateY(-4px);
  border-color: var(--gold-500);
  box-shadow: 0 16px 38px -16px rgba(22, 48, 43, 0.32);
}
.resource__icon {
  flex: none; width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--teal-400), var(--teal-600));
  color: var(--ivory-100);
}
.resource__icon svg { width: 18px; height: 18px; }
.resource strong {
  display: block;
  font-family: var(--f-display); font-size: 1rem; font-weight: 600;
  color: var(--ink-800); margin-bottom: 0.15rem;
}
.resource span { font-size: var(--t-sm); color: var(--fg-on-light-dim); line-height: 1.45; }

/* --------------------------------------------------------------------------
   14. CONTACT
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}
.contact-card {
  border: 1px solid rgba(140, 188, 199, 0.18);
  border-radius: 4px;
  padding: 1.85rem 1.6rem;
  background: linear-gradient(170deg, rgba(29, 75, 92, 0.2), transparent);
}
.contact-card h3 {
  font-size: 1.06rem; color: var(--ivory-100); margin-bottom: 0.75rem;
}
.contact-card p { font-size: var(--t-sm); color: var(--fg-dim); }
.contact-card a.plain {
  color: var(--gold-300); text-decoration: none;
  border-bottom: 1px solid rgba(200, 155, 74, 0.35);
  transition: color 0.25s, border-color 0.25s;
  word-break: break-word;
}
.contact-card a.plain:hover { color: var(--gold-200); border-color: var(--gold-200); }

/* --------------------------------------------------------------------------
   15. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid rgba(200, 155, 74, 0.18);
  padding: var(--sp-5) 0 var(--sp-4);
  background: var(--ink-800);
}
.footer-grid {
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  align-items: center; justify-content: space-between;
}
.footer-note {
  font-size: var(--t-xs); color: var(--fg-dim); margin: 0;
  letter-spacing: 0.04em;
}
.footer-mark { width: 40px; opacity: 0.8; }

/* --------------------------------------------------------------------------
   16. THE MARK — dragonfly + infinity
   -------------------------------------------------------------------------- */

.mark__wing {
  transform-origin: var(--ox, 50%) var(--oy, 50%);
  animation: flutter var(--dur, 4.5s) var(--ease-io) infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes flutter {
  0%, 100% { transform: rotate(0deg)   scaleY(1); }
  22%      { transform: rotate(-4.5deg) scaleY(0.90); }
  46%      { transform: rotate(3deg)    scaleY(1.04); }
  70%      { transform: rotate(-1.6deg) scaleY(0.96); }
}

/* The gold infinity draws itself once on load */
.mark__infinity {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 3s var(--ease-out) 0.35s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Slow iridescent drift across the wing gradients */
.mark__irid animate { }

/* --------------------------------------------------------------------------
   17. SCROLL REVEAL
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* Hero copy animates in on load rather than on scroll */
.hero [data-load] {
  opacity: 0;
  transform: translateY(24px);
  animation: rise 1.15s var(--ease-out) forwards;
  animation-delay: var(--load-delay, 0ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   18. DIVIDER — gold infinity rule between sections
   -------------------------------------------------------------------------- */

.divider {
  display: flex; align-items: center; gap: 1.25rem;
  margin-block: var(--sp-5);
  color: var(--gold-500);
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
}
.divider svg { width: 34px; height: 18px; flex: none; opacity: 0.85; }
.section--light .divider::before, .section--light .divider::after {
  background: linear-gradient(90deg, transparent, var(--rule-light), transparent);
}

/* --------------------------------------------------------------------------
   19. NOSCRIPT FALLBACK
   -------------------------------------------------------------------------- */

.noscript-note {
  background: var(--gold-300); color: var(--ink-900);
  padding: 1rem 1.25rem; border-radius: 3px;
  margin-bottom: var(--sp-4);
  font-size: var(--t-sm);
}
.noscript-list { columns: 2; gap: 2rem; }
@media (max-width: 640px) { .noscript-list { columns: 1; } }
.noscript-list a { color: var(--gold-300); }

/* Shown until content.json renders; removed by JS */
.loading-shim {
  min-height: 12rem;
  display: grid; place-items: center;
  color: var(--fg-dim); font-size: var(--t-sm);
}

/* --------------------------------------------------------------------------
   20. MOTION / CONTRAST PREFERENCES
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero [data-load] { opacity: 1; transform: none; }
  .hero__canvas { display: none; }
  .mark__infinity { stroke-dashoffset: 0; }
  .hero__title .shimmer {
    background: none; -webkit-background-clip: initial; background-clip: initial;
    color: var(--gold-200);
  }
}

@media (prefers-contrast: more) {
  :root { --fg-dim: #C9DBE1; --fg-on-light-dim: #33463F; --rule: rgba(200,155,74,0.5); }
}

@media print {
  body::after, .hero__canvas, .site-header, .hero__cue { display: none; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1.5rem; }
  a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 0.7em; }
}


/* ==========================================================================
   WORDPRESS-SPECIFIC ADDITIONS
   Everything above is the shared design system, ported from the static build.
   ========================================================================== */

/* Pages that open with a heading instead of the hero need top clearance,
   or the fixed header sits on top of the title. */
.section--top { padding-top: calc(var(--sp-7) + 4rem); }

/* --- Editor content ------------------------------------------------------ */
.prose { font-size: var(--t-base); line-height: 1.75; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: var(--t-lg); margin-top: 2em; }
.prose h3 { font-size: var(--t-md); margin-top: 1.6em; }
.prose a { color: var(--gold-300); text-underline-offset: 3px; }
.prose a:hover { color: var(--gold-200); }
.prose blockquote {
  border-left: 2px solid var(--gold-500);
  padding-left: 1.5rem; margin-left: 0;
  font-style: italic; color: var(--teal-300);
}
.prose code {
  background: rgba(140,188,199,.12); padding: .15em .4em;
  border-radius: 3px; font-size: .9em;
}
.prose pre {
  background: var(--ink-800); border: 1px solid var(--rule);
  padding: 1.25rem; border-radius: 4px; overflow-x: auto;
}
.prose img, .prose figure { border-radius: 3px; }
.prose figcaption {
  font-size: var(--t-sm); color: var(--fg-dim);
  text-align: center; margin-top: .6rem;
}
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td {
  border-bottom: 1px solid var(--rule); padding: .6rem .5rem; text-align: left;
}

/* Core block alignments */
.alignwide  { width: min(100%, 68rem); margin-inline: auto; }
.alignfull  { width: 100vw; margin-inline: calc(50% - 50vw); max-width: none; }
.alignleft  { float: left;  margin: .4rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .4rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; display: block; }
.wp-caption { max-width: 100%; }

/* --- Blog listing -------------------------------------------------------- */
.post-list { display: grid; gap: var(--sp-4); margin-top: var(--sp-5); }
.post-item {
  display: grid; grid-template-columns: minmax(0,15rem) minmax(0,1fr);
  gap: var(--sp-3); align-items: start;
  padding-bottom: var(--sp-4); border-bottom: 1px solid var(--rule);
}
@media (max-width: 700px) { .post-item { grid-template-columns: 1fr; } }
.post-item__thumb img { border-radius: 3px; aspect-ratio: 4/3; object-fit: cover; }
.post-item__date {
  font-family: var(--f-display); font-size: var(--t-xs);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-300); margin-bottom: .5rem;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.post-item__title { font-size: var(--t-lg); margin-bottom: .5rem; }
.post-item__title a { text-decoration: none; color: var(--ivory-100); transition: color .25s; }
.post-item__title a:hover { color: var(--gold-200); }
.post-item__excerpt { color: var(--fg-dim); font-size: var(--t-sm); }
.post-item__more {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--f-display); font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-300); text-decoration: none;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.post-item__more svg { width: 14px; height: 14px; transition: transform .3s var(--ease-out); }
.post-item__more:hover svg { transform: translateX(3px); }

.post-hero { margin: var(--sp-4) 0; }
.post-hero img { border-radius: 3px; width: 100%; }

/* --- Single book --------------------------------------------------------- */
.book-single__grid {
  display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr);
  gap: clamp(2rem,5vw,4.5rem); align-items: start;
}
@media (max-width: 820px) { .book-single__grid { grid-template-columns: 1fr; } }
.book-single__cover .book-cover { aspect-ratio: 2/3; }
.book-title a { color: inherit; text-decoration: none; transition: color .25s; }
.book-title a:hover { color: var(--gold-200); }

/* --- Contact cards sitting on the light section -------------------------- */
.contact-card--light { background: var(--ivory-100); border-color: var(--rule-light); }
.contact-card--light h3 { color: var(--ink-800); }
.contact-card--light p { color: var(--fg-on-light-dim); }
.contact-card--light a.plain { color: var(--teal-600); border-bottom-color: rgba(43,99,119,.4); }
.contact-card--light a.plain:hover { color: var(--gold-600); border-bottom-color: var(--gold-600); }

/* --- Pagination ---------------------------------------------------------- */
.pagination { margin-top: var(--sp-5); display: flex; justify-content: center; }
.nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.page-numbers {
  display: grid; place-items: center; min-width: 2.5rem; height: 2.5rem;
  padding: 0 .75rem; border: 1px solid var(--rule); border-radius: 3px;
  font-family: var(--f-display); font-size: .85rem; font-weight: 600;
  text-decoration: none; color: var(--fg-dim); transition: all .25s;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.page-numbers:hover, .page-numbers.current {
  border-color: var(--gold-400); color: var(--gold-200);
  background: rgba(200,155,74,.07);
}

/* --- Search form --------------------------------------------------------- */
.search-form { display: flex; gap: .5rem; max-width: 26rem; }
.search-form__field {
  flex: 1; font: inherit; font-size: var(--t-sm);
  padding: .7rem .9rem; border-radius: 3px;
  background: rgba(140,188,199,.07);
  border: 1px solid var(--rule); color: var(--fg);
}
.search-form__field::placeholder { color: var(--fg-dim); }

/* --- Comments ------------------------------------------------------------ */
.comment-list { list-style: none; padding: 0; }
.comment-list li { border-top: 1px solid var(--rule); padding: 1.25rem 0; }
.comment-form input:not([type=submit]), .comment-form textarea {
  width: 100%; font: inherit; padding: .7rem .9rem; border-radius: 3px;
  background: rgba(140,188,199,.07); border: 1px solid var(--rule); color: var(--fg);
}
.comment-form label { display: block; font-size: var(--t-sm); margin-bottom: .3rem; }
.comment-form p { margin-bottom: 1rem; }

/* --- Admin bar offset ---------------------------------------------------- */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* --- wp_nav_menu may still emit <ul>/<li> wrappers ----------------------- */
.nav ul { list-style: none; display: contents; margin: 0; padding: 0; }
.nav li { display: block; }

/* --- Accessibility ------------------------------------------------------- */
.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;
}

/* --- 404 ----------------------------------------------------------------- */
.oops__mark { width: clamp(140px,20vw,210px); margin: 0 auto var(--sp-4); opacity: .9; }


/* ==========================================================================
   BOOK RESOURCES — player + track list
   ========================================================================== */

.tag--bonus {
  color: var(--ink-900);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  border-color: transparent;
  text-decoration: none;
  transition: filter 0.25s, transform 0.25s var(--ease-out);
}
a.tag--bonus:hover { filter: brightness(1.1); transform: translateY(-1px); }

.resources {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 7rem;
}
.resources__title { font-size: var(--t-lg); color: var(--ivory-100); margin-bottom: 0.6rem; }
.resources__blurb { color: var(--fg-dim); font-size: var(--t-sm); max-width: 58ch; line-height: 1.65; margin-bottom: var(--sp-3); }

/* ------------------------------- the gate -------------------------------- */

.resources__gate {
  background: linear-gradient(165deg, rgba(29, 75, 92, 0.34), rgba(11, 31, 39, 0.5));
  border: 1px solid rgba(200, 155, 74, 0.28);
  border-radius: 6px;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  position: relative; overflow: hidden;
}
.resources__gate::before {
  content: '';
  position: absolute; inset: -40% 30% auto -20%; height: 16rem;
  background: radial-gradient(closest-side, rgba(200, 155, 74, 0.16), transparent);
  pointer-events: none;
}
.resources__pitch {
  font-size: var(--t-sm); color: var(--teal-300);
  margin: 0 0 1.2rem; letter-spacing: 0.02em;
}
.resources__pitch strong { color: var(--gold-200); font-size: 1.15em; }

.resources__label {
  display: block;
  font-family: var(--f-display);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-300); margin-bottom: 0.55rem;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.resources__row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.resources__input {
  flex: 1 1 16rem; font: inherit; font-size: var(--t-sm);
  padding: 0.85rem 1rem; border-radius: 3px;
  background: rgba(7, 19, 25, 0.5);
  border: 1px solid rgba(140, 188, 199, 0.34);
  color: var(--fg);
}
.resources__input::placeholder { color: rgba(157, 180, 189, 0.6); }
.resources__input:focus { outline: 2px solid var(--gold-300); outline-offset: 1px; border-color: transparent; }
.resources__note { font-size: 0.78rem; color: var(--fg-dim); margin: 1rem 0 0; max-width: 52ch; line-height: 1.55; }

.resources__error, .resources__ok {
  font-size: var(--t-sm); padding: 0.7rem 1rem; border-radius: 3px; margin-bottom: 1rem;
}
.resources__error { background: rgba(176, 71, 43, 0.18); color: #F2B8A6; border: 1px solid rgba(176,71,43,.4); }
.resources__ok    { background: rgba(63, 169, 139, 0.14); color: #9BDAC5; border: 1px solid rgba(63,169,139,.35); }

.resources__hp {
  position: absolute !important; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.resources__peek { margin-top: 1.4rem; border-top: 1px solid rgba(140,188,199,.16); padding-top: 1rem; }
.resources__peek summary {
  cursor: pointer; list-style: none;
  font-family: var(--f-display); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal-300);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
  display: flex; align-items: center; gap: 0.5rem;
}
.resources__peek summary::-webkit-details-marker { display: none; }
.resources__peek summary::before { content: '+'; color: var(--gold-400); font-size: 1.1em; }
.resources__peek[open] summary::before { content: '\2212'; }
.resources__peek summary:hover { color: var(--gold-200); }
.resources__peek ul {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: grid; gap: 0.4rem; max-height: 17rem; overflow-y: auto;
}
.resources__peek li { font-size: var(--t-sm); color: var(--fg-dim); display: flex; align-items: baseline; gap: 0.6rem; }
.resources__peek-kind {
  font-family: var(--f-display); font-size: 0.54rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-300); flex: none; min-width: 2.6rem;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}

/* =============================== THE PLAYER =============================== */

.rez__player {
  position: sticky; top: 5rem; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  border-radius: 6px;
  background: rgba(11, 31, 39, 0.94);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(200, 155, 74, 0.26);
  box-shadow: 0 14px 40px -18px rgba(0, 0, 0, 0.8);
}

.rez__toggle {
  flex: none;
  width: 3rem; height: 3rem;
  border: 0; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--ink-900);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), filter 0.25s, opacity 0.25s;
}
.rez__toggle:hover:not(:disabled) { transform: scale(1.06); filter: brightness(1.08); }
.rez__toggle:disabled { opacity: 0.4; cursor: default; }
.rez__toggle svg { width: 20px; height: 20px; fill: currentColor; }
.rez__toggle .rez__ico-pause { display: none; }
.rez__toggle.is-playing .rez__ico-play { display: none; }
.rez__toggle.is-playing .rez__ico-pause { display: block; }

.rez__now { flex: 1; min-width: 0; }
.rez__nowtitle {
  margin: 0 0 0.4rem;
  font-size: var(--t-sm);
  color: var(--ivory-100);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rez__scrub { display: flex; align-items: center; gap: 0.75rem; }

.rez__seek {
  flex: 1; height: 4px; min-width: 0;
  -webkit-appearance: none; appearance: none;
  background: rgba(140, 188, 199, 0.24);
  border-radius: 2px; cursor: pointer;
}
.rez__seek:disabled { cursor: default; opacity: 0.5; }
.rez__seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold-300); border: 0; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(200, 155, 74, 0.18);
}
.rez__seek::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold-300); border: 0; cursor: pointer;
}
.rez__time {
  flex: none;
  font-size: 0.72rem; color: var(--fg-dim);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.rez__transport { display: flex; align-items: center; gap: 0.35rem; flex: none; }
.rez__step {
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  border: 1px solid rgba(140, 188, 199, 0.24);
  border-radius: 50%;
  background: transparent; color: var(--teal-300);
  cursor: pointer; text-decoration: none;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.rez__step:hover:not(:disabled) { color: var(--gold-200); border-color: var(--gold-400); background: rgba(200,155,74,.08); }
.rez__step:disabled { opacity: 0.35; cursor: default; }
.rez__step svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rez__step--dl svg { stroke-width: 1.8; }

/* ---------------------------- filter + search ---------------------------- */

.rez__controls {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  align-items: center; justify-content: space-between;
  margin-bottom: 0.9rem;
}
.rez__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rez__chip {
  font-family: var(--f-display);
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-dim);
  background: transparent;
  border: 1px solid rgba(140, 188, 199, 0.24);
  border-radius: 100px;
  padding: 0.42rem 0.85rem;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.45rem;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.rez__chip span {
  font-size: 0.9em; opacity: 0.65;
  font-variant-numeric: tabular-nums;
}
.rez__chip:hover { color: var(--ivory-100); border-color: rgba(200,155,74,.4); }
.rez__chip.is-on {
  color: var(--ink-900);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  border-color: transparent;
}
.rez__chip.is-on span { opacity: 0.75; }

.rez__searchwrap { flex: 0 1 14rem; }
.rez__search {
  width: 100%; font: inherit; font-size: var(--t-sm);
  padding: 0.5rem 0.85rem;
  border-radius: 100px;
  background: rgba(140, 188, 199, 0.07);
  border: 1px solid rgba(140, 188, 199, 0.24);
  color: var(--fg);
}
.rez__search::placeholder { color: rgba(157, 180, 189, 0.55); }
.rez__search:focus { outline: 2px solid var(--gold-300); outline-offset: 1px; border-color: transparent; }

.rez__empty { color: var(--fg-dim); font-size: var(--t-sm); font-style: italic; padding: 1.5rem 0; }

/* ------------------------------ track list ------------------------------- */

.rez__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.rez__row {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 4px;
  transition: background 0.25s;
  position: relative;
}
.rez__row:hover { background: rgba(29, 75, 92, 0.28); }
.rez__row.is-current { background: rgba(200, 155, 74, 0.09); }
.rez__row.is-current::before {
  content: ''; position: absolute; left: 0; top: 12%; bottom: 12%;
  width: 2px; border-radius: 2px; background: var(--gold-400);
}

.rez__rowplay {
  flex: none;
  width: 2.1rem; height: 2.1rem;
  border: 1px solid rgba(140, 188, 199, 0.26);
  border-radius: 50%;
  background: transparent; color: var(--teal-300);
  display: grid; place-items: center;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  position: relative;
}
.rez__rowplay:hover { color: var(--gold-200); border-color: var(--gold-400); background: rgba(200,155,74,.08); }
.rez__rowplay svg { width: 13px; height: 13px; fill: currentColor; }
.rez__rowplay .rez__ico-pause { display: none; }
.rez__rowplay.is-playing { color: var(--gold-200); border-color: var(--gold-400); }
.rez__rowplay.is-playing .rez__ico-play { display: none; }
.rez__rowplay.is-playing .rez__ico-pause { display: none; }
.rez__rowplay.is-playing .rez__bars { display: flex; }

/* Three little bars that bounce while a track is playing. */
.rez__bars { display: none; align-items: flex-end; gap: 2px; height: 12px; }
.rez__bars i {
  display: block; width: 2px; background: currentColor; border-radius: 1px;
  animation: rezbar 0.9s ease-in-out infinite;
}
.rez__bars i:nth-child(1) { height: 60%; animation-delay: 0s; }
.rez__bars i:nth-child(2) { height: 100%; animation-delay: 0.15s; }
.rez__bars i:nth-child(3) { height: 45%; animation-delay: 0.3s; }
@keyframes rezbar { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

.rez__rowdoc {
  flex: none;
  width: 2.1rem; height: 2.1rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(200, 155, 74, 0.14);
  color: var(--gold-300);
}
.rez__rowdoc svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }

.rez__num {
  flex: none; width: 1.6rem;
  font-family: var(--f-display); font-size: 0.7rem; font-weight: 600;
  color: var(--fg-dim); font-variant-numeric: tabular-nums;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.rez__row.is-current .rez__num { color: var(--gold-300); }

.rez__label { flex: 1; min-width: 0; cursor: pointer; }
.rez__name {
  display: block; font-size: var(--t-sm); color: var(--ivory-100); line-height: 1.35;
}
.rez__row.is-current .rez__name { color: var(--gold-200); }
.rez__sub {
  display: block; font-size: 0.7rem; color: var(--fg-dim); margin-top: 0.15rem;
  letter-spacing: 0.03em;
}

.rez__get {
  flex: none;
  width: 2.1rem; height: 2.1rem;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--fg-dim); text-decoration: none;
  transition: color 0.25s, background 0.25s;
}
.rez__get:hover { color: var(--gold-200); background: rgba(200,155,74,.1); }
.rez__get svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* The per-row native players are the no-JS fallback; once the script has
   taken over they are removed from the DOM entirely. */
.rez__native { width: 100%; max-width: 20rem; height: 32px; margin-left: auto; filter: invert(0.92) hue-rotate(180deg) saturate(0.6); }
.rez.is-enhanced .rez__native { display: none; }

@media (max-width: 640px) {
  .rez__player {
    flex-wrap: wrap; gap: 0.75rem; top: 4.5rem;
    padding: 0.85rem 0.9rem;
  }
  .rez__now { order: 3; flex-basis: 100%; }
  .rez__transport { margin-left: auto; }
  .rez__row { gap: 0.6rem; padding: 0.65rem 0.5rem; }
  .rez__num { display: none; }
  .rez__controls { gap: 0.6rem; }
  .rez__searchwrap { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .rez__bars i { animation: none; }
  .rez__bars i:nth-child(1),
  .rez__bars i:nth-child(2),
  .rez__bars i:nth-child(3) { height: 80%; }
}

/* ------------------- front-page "Free Resources" list -------------------- */

.reslist { display: grid; gap: 0.75rem; margin-top: var(--sp-5); }

.reslist__item {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(140, 188, 199, 0.16);
  border-radius: 5px;
  background: linear-gradient(170deg, rgba(29, 75, 92, 0.22), transparent);
  text-decoration: none; color: inherit;
  transition: border-color 0.35s, transform 0.45s var(--ease-out), background 0.35s;
}
.reslist__item:hover {
  border-color: rgba(200, 155, 74, 0.45);
  transform: translateX(4px);
  background: linear-gradient(170deg, rgba(29, 75, 92, 0.34), rgba(200, 155, 74, 0.05));
}
.reslist__count {
  flex: none; width: 2.9rem; height: 2.9rem;
  display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--ink-900);
}
.reslist__count strong {
  font-family: var(--f-display); font-size: 1.02rem; font-weight: 700;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
  line-height: 1;
}
.reslist__body { flex: 1; min-width: 0; }
.reslist__body > strong {
  display: block; font-family: var(--f-display); font-size: 1.05rem; font-weight: 600;
  color: var(--ivory-100); margin-bottom: 0.15rem;
}
.reslist__meta {
  display: block;
  font-family: var(--f-display);
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 0.35rem;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.reslist__blurb { display: block; font-size: var(--t-sm); color: var(--fg-dim); line-height: 1.5; }
.reslist__go { flex: none; color: var(--gold-400); display: grid; place-items: center; width: 1.5rem; }
.reslist__go svg { width: 16px; height: 16px; transition: transform 0.35s var(--ease-out); }
.reslist__item:hover .reslist__go svg { transform: translateX(4px); }

@media (max-width: 560px) {
  .reslist__item { gap: 0.9rem; padding: 1rem 1.1rem; }
  .reslist__count { width: 2.4rem; height: 2.4rem; font-size: 0.9rem; }
  .reslist__go { display: none; }
}

/* Service tiles that have an image get it as a banner across the top. */
.offer--img { padding-top: 0; overflow: hidden; }
.offer__media { margin: 0 -1.5rem 1.4rem; aspect-ratio: 16 / 9; overflow: hidden; }
.offer__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.offer--img .offer__num { padding-top: 0; }
.offer__cta { margin: 1.1rem 0 0; }
.offer__cta .btn { padding: 0.55rem 1rem; font-size: 0.7rem; }


/* ==========================================================================
   THE IRRATIONAL BELIEFS SCALE
   ========================================================================== */

.ibs { --ibs-gap: 1.1rem; }
.ibs__title { font-size: var(--t-xl); color: var(--ivory-100); margin-bottom: var(--sp-3); }
.ibs__lede { color: var(--fg-dim); font-size: var(--t-md); font-weight: 300; line-height: 1.55; max-width: 56ch; }
.ibs__lede p { margin-bottom: 0.9em; }

.ibs__facts {
  list-style: none; margin: var(--sp-4) 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}
.ibs__facts li {
  font-family: var(--f-display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-300);
  border: 1px solid rgba(140,188,199,.28); border-radius: 100px;
  padding: 0.5rem 1rem;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.ibs__facts strong { color: var(--gold-200); font-size: 1.25em; margin-right: 0.2em; }

.ibs__privacy {
  font-size: var(--t-sm); color: var(--fg-dim);
  border-left: 2px solid var(--gold-500); padding-left: 1rem;
  max-width: 54ch; line-height: 1.6;
}

/* ------------------------------- progress ------------------------------- */

.ibs__progress { margin-bottom: var(--sp-4); }
.ibs__bar {
  height: 3px; border-radius: 2px;
  background: rgba(140,188,199,.2); overflow: hidden;
}
.ibs__bar span {
  display: block; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--teal-400), var(--gold-400));
  transition: width 0.5s var(--ease-out);
}
.ibs__step {
  margin: 0.55rem 0 0;
  font-family: var(--f-display); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-300);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}

.ibs__prompt { font-size: var(--t-lg); color: var(--ivory-100); margin-bottom: var(--sp-3); }

/* -------------------------------- legend -------------------------------- */

.ibs__legend {
  list-style: none; margin: 0 0 var(--sp-4); padding: 1rem 1.15rem;
  border: 1px solid rgba(140,188,199,.16); border-radius: 5px;
  background: linear-gradient(170deg, rgba(29,75,92,.2), transparent);
  display: grid; gap: 0.5rem;
}
.ibs__legend li {
  display: flex; align-items: flex-start; gap: 0.7rem;
  font-size: var(--t-sm); color: var(--fg-dim); line-height: 1.45;
}
.ibs__legend strong { color: var(--ivory-100); font-weight: 600; }
.ibs__swatch {
  flex: none; width: 1.5rem; height: 1.5rem;
  display: grid; place-items: center; border-radius: 3px;
  background: var(--c); color: #fff;
  font-family: var(--f-display); font-size: 0.72rem; font-weight: 700;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
@media (min-width: 720px) { .ibs__legend { grid-template-columns: 1fr 1fr; gap: 0.5rem 1.5rem; } }

/* ------------------------------- questions ------------------------------ */

.ibs__questions { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ibs-gap); }

.ibs__q {
  border: 1px solid rgba(140,188,199,.14); border-radius: 5px;
  padding: 1rem 1.15rem;
  background: linear-gradient(170deg, rgba(29,75,92,.14), transparent);
  transition: border-color 0.3s;
}
.ibs__q:focus-within { border-color: rgba(200,155,74,.4); }
.ibs__q fieldset { border: 0; margin: 0; padding: 0; }

.ibs__qtext {
  display: flex; align-items: baseline; gap: 0.7rem;
  font-size: var(--t-base); color: var(--ivory-100);
  line-height: 1.45; margin-bottom: 0.85rem; padding: 0;
}
.ibs__qnum {
  flex: none;
  font-family: var(--f-display); font-size: 0.72rem; font-weight: 700;
  color: var(--gold-300); font-variant-numeric: tabular-nums;
  min-width: 1.6rem;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}

/* The heat map. Real radios, visually hidden — keyboard and screen readers
   get correct behaviour for free, no ARIA gymnastics required. */
.ibs__cells { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; max-width: 22rem; }

.ibs__cell { position: relative; cursor: pointer; }
.ibs__cell input {
  position: absolute; opacity: 0; width: 100%; height: 100%;
  margin: 0; cursor: pointer;
}
.ibs__cell > span[aria-hidden] {
  display: grid; place-items: center;
  height: 2.5rem; border-radius: 3px;
  background: var(--c); opacity: 0.34;
  color: #fff; font-family: var(--f-display); font-size: 0.82rem; font-weight: 700;
  transition: opacity 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.ibs__cell:hover > span[aria-hidden] { opacity: 0.7; }
.ibs__cell input:checked ~ span[aria-hidden] {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--ink-900),
              0 0 0 4px var(--c),
              0 6px 16px -6px var(--c);
}
.ibs__cell input:focus-visible ~ span[aria-hidden] {
  outline: 2px solid var(--gold-300); outline-offset: 2px;
}

.ibs__unanswered {
  margin: var(--sp-3) 0 0; padding: 0.7rem 1rem; border-radius: 3px;
  font-size: var(--t-sm);
  background: rgba(200,155,74,.1); color: var(--gold-200);
  border: 1px solid rgba(200,155,74,.3);
}

.ibs__nav {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: space-between; align-items: center;
  margin-top: var(--sp-4);
}

/* -------------------------------- results ------------------------------- */

.ibs__bands { list-style: none; margin: var(--sp-3) 0 var(--sp-5); padding: 0; display: grid; gap: 0.4rem; }
.ibs__band {
  display: flex; align-items: baseline; gap: 0.85rem;
  font-size: var(--t-sm); color: var(--fg-dim); line-height: 1.45;
  padding: 0.5rem 0.85rem; border-radius: 3px;
  border-left: 3px solid var(--teal-500);
  background: rgba(29,75,92,.16);
}
.ibs__band strong {
  flex: none; min-width: 4rem;
  font-family: var(--f-display); font-weight: 700; color: var(--ivory-100);
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.ibs__band.is-high { border-left-color: #BA1A2B; }
.ibs__band.is-mid  { border-left-color: #A0436F; }
.ibs__band.is-low  { border-left-color: #8E5C99; }
.ibs__band.is-none { border-left-color: #6798FC; }

.ibs__results { display: grid; gap: 0.85rem; }

.ibs__result {
  border: 1px solid rgba(140,188,199,.16);
  border-left-width: 3px; border-left-color: rgba(140,188,199,.3);
  border-radius: 5px; padding: 1.1rem 1.25rem;
  background: linear-gradient(170deg, rgba(29,75,92,.2), transparent);
}
.ibs__result.is-high { border-left-color: #BA1A2B; }
.ibs__result.is-mid  { border-left-color: #A0436F; }
.ibs__result.is-low  { border-left-color: #8E5C99; }
.ibs__result.is-none { border-left-color: #6798FC; }

.ibs__rhead { display: flex; align-items: baseline; gap: 0.8rem; }
.ibs__rnum {
  flex: none; font-family: var(--f-display); font-size: 0.72rem; font-weight: 700;
  color: var(--gold-300); min-width: 1.4rem;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.ibs__rtext { margin: 0; font-size: var(--t-sm); color: var(--ivory-100); line-height: 1.5; }

.ibs__rmeta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.75rem; margin: 0.7rem 0 0.55rem 2.2rem; }
.ibs__rscore {
  font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; color: var(--gold-200);
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.ibs__rband {
  font-family: var(--f-display); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}

/* The 25-cell strip from the original. */
.ibs__strip { display: flex; gap: 2px; margin-left: 2.2rem; }
.ibs__strip i {
  flex: 1; height: 9px; border-radius: 1px;
  background: rgba(140,188,199,.14);
}
.ibs__strip i.is-filled {
  background: linear-gradient(90deg, var(--teal-500), var(--gold-500));
}
.ibs__strip i.is-mark {
  background: var(--gold-200);
  box-shadow: 0 0 0 2px rgba(234,211,154,.3);
}

.ibs__after {
  margin-top: var(--sp-5); padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
}
.ibs__after h3 { font-size: var(--t-md); color: var(--ivory-100); margin-bottom: 0.7rem; }
.ibs__after p { color: var(--fg-dim); font-size: var(--t-sm); max-width: 58ch; line-height: 1.65; }
.ibs__actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: var(--sp-3); }

.ibs__noscript {
  background: rgba(200,155,74,.12); border: 1px solid rgba(200,155,74,.35);
  color: var(--gold-200); padding: 1rem 1.25rem; border-radius: 4px;
}

@media (max-width: 560px) {
  .ibs__cells { max-width: none; }
  .ibs__cell > span[aria-hidden] { height: 2.9rem; }
  .ibs__rmeta, .ibs__strip { margin-left: 0; }
  .ibs__nav { flex-direction: column-reverse; align-items: stretch; }
  .ibs__nav .btn { justify-content: center; }
}

/* Printing the results is a first-class feature — the original had a printable
   score sheet, so keep that working. */
@media print {
  .ibs__after .ibs__actions, .ibs__progress { display: none; }
  .ibs__result { break-inside: avoid; border-color: #999; }
  .ibs__strip i.is-filled { background: #666; }
  .ibs__strip i.is-mark { background: #000; }
}



/* ==========================================================================
   THE ASSESSMENT INVITATION
   An ivory band directly under the hero. It deliberately interrupts the dark
   page: this is the one thing on the site that costs a visitor nothing and
   asks nothing, so it should be impossible to scroll past.
   ========================================================================== */

.invite { padding-block: var(--sp-6); }

.invite__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
@media (max-width: 860px) {
  .invite__grid { grid-template-columns: 1fr; gap: var(--sp-4); }
}

.invite__copy .section-title { max-width: 18ch; }
.invite__copy .lede { max-width: 46ch; margin-bottom: var(--sp-3); }

.invite__facts {
  list-style: none; margin: 0 0 var(--sp-4); padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.invite__facts li {
  font-family: var(--f-display);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-on-light-dim);
  background: rgba(43, 99, 119, 0.08);
  border: 1px solid rgba(43, 99, 119, 0.18);
  border-radius: 100px;
  padding: 0.45rem 0.9rem;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.invite__facts strong {
  color: var(--teal-600); font-size: 1.2em; margin-right: 0.25em;
}

.invite__privacy {
  font-size: var(--t-sm);
  color: var(--fg-on-light-dim);
  border-left: 2px solid var(--gold-500);
  padding-left: 0.9rem;
  max-width: 44ch;
  margin: var(--sp-3) 0 0;
  line-height: 1.6;
}

/* ---- the instrument preview ---- */

.invite__demo {
  background: var(--ivory-100);
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 24px 60px -30px rgba(22, 48, 43, 0.4);
}
/* Deliberately NOT tilted. A rotate() on this card slants the heat-scale grid
   inside it by a few pixels across the row, which reads as a misalignment
   rather than as a design flourish. Square card, level grid. */

.invite__demoq {
  font-size: var(--t-md);
  font-style: italic;
  color: var(--ink-800);
  line-height: 1.4;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.invite__scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.invite__scale span {
  display: grid; place-items: center;
  height: 3rem; border-radius: 4px;
  background: var(--c); color: #fff;
  font-family: var(--f-display); font-size: 0.95rem; font-weight: 700;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
/* All five cells are identical. An earlier version ringed the "4" to suggest a
   chosen answer, but out of context it just looked like one cell was wrong.
   The row's job here is only to show that the scale runs cold to hot. */

.invite__demolabel {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 0.85rem 0 0;
  font-family: var(--f-display);
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-on-light-dim);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
.invite__demolabel span {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, #6798FC, #BA1A2B);
}




/* ==========================================================================
   MAILING LIST SIGNUP
   ========================================================================== */

.news { margin-top: var(--sp-4); scroll-margin-top: 7rem; }

.news__label {
  display: block;
  font-family: var(--f-display);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-300); margin-bottom: 0.55rem;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}

.news__row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.news__input {
  flex: 1 1 18rem; font: inherit; font-size: var(--t-sm);
  padding: 0.9rem 1.05rem; border-radius: 3px;
  background: rgba(7, 19, 25, 0.5);
  border: 1px solid rgba(140, 188, 199, 0.34);
  color: var(--fg);
}
.news__input::placeholder { color: rgba(157, 180, 189, 0.6); }
.news__input:focus { outline: 2px solid var(--gold-300); outline-offset: 1px; border-color: transparent; }

/* Consent is a real checkbox, not a pre-ticked assumption. */
.news__consent {
  display: flex; align-items: flex-start; gap: 0.65rem;
  margin-top: 1rem; cursor: pointer;
  font-size: var(--t-sm); color: var(--fg-dim); line-height: 1.5;
  max-width: 52ch;
}
.news__consent input {
  flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.18rem;
  accent-color: var(--gold-500); cursor: pointer;
}

.news__note {
  font-size: 0.78rem; color: var(--fg-dim);
  margin: 0.9rem 0 0; max-width: 52ch; line-height: 1.55;
}

.news__done, .news__error {
  font-size: var(--t-sm); padding: 0.9rem 1.15rem;
  border-radius: 3px; margin: 0 0 1rem;
}
.news__done {
  background: rgba(63, 169, 139, 0.14); color: #9BDAC5;
  border: 1px solid rgba(63, 169, 139, 0.35);
}
.news__done strong { color: var(--ivory-100); }
.news__error {
  background: rgba(176, 71, 43, 0.18); color: #F2B8A6;
  border: 1px solid rgba(176, 71, 43, 0.4);
}

/* Off-screen, not display:none — some bots skip hidden fields. */
.news__hp {
  position: absolute !important; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

@media (max-width: 560px) {
  .news__row .btn { width: 100%; justify-content: center; }
}
