/* ===========================================================
   Reddy Mohith — portfolio
   Brand: Deep Teal / Coral / Butter Yellow / Cream / Warm Gray
   Fonts: Sora (display) + Inter (body)
   =========================================================== */

:root {
  --teal: #0D3B3E;
  --coral: #FF6B5B;
  --butter: #FFD166;
  --cream: #FFF8F0;
  --card: #FFFDF9;
  --placeholder: #F1E7DA;
  --gray: #8C8579;

  --hairline: rgba(13, 59, 62, 0.16);
  --hairline-strong: rgba(13, 59, 62, 0.25);
  --divider-on-teal: rgba(255, 248, 240, 0.24);

  --max: 1440px;
  --max-narrow: 1180px;

  /* Usable page width for full-bleed sections — equal to the viewport
     normally, but narrowed while the admin side panel is open so a
     full-bleed background stops at the panel's edge instead of running
     underneath it. */
  --page-w: 100vw;
}
body.admin-has-chrome { --page-w: calc(100vw - var(--admin-sidepanel-w)); }
body.admin-has-chrome.admin-panel-collapsed { --page-w: calc(100vw - var(--admin-sidepanel-w-collapsed)); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--teal);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--coral); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

::selection { background: var(--butter); color: var(--teal); }

.display {
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

/* -----------------------------------------------------------
   Book cover intro
   ----------------------------------------------------------- */

#cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 44px;
  cursor: pointer;
  background: radial-gradient(120% 90% at 50% 12%, var(--card) 0%, var(--cream) 42%, #F3E6D6 100%);
  perspective: 1700px;
  transition: opacity 700ms ease;
}

#cover.is-opening,
#cover.is-zooming { pointer-events: none; }
#cover.is-hidden { display: none; }
#cover.is-fading { opacity: 0; transition: opacity 450ms ease; }

.book-float {
  animation: om-float 7s ease-in-out infinite;
}

#cover.is-opening .book-float,
#cover.is-zooming .book-float { animation: none; }

.book-wrap {
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(.22, .61, .36, 1);
}

.book {
  position: relative;
  width: 330px;
  height: 452px;
  max-width: 78vw;
  max-height: 62vh;
  transform-style: preserve-3d;
  transform-origin: left center;
  transform: translateX(0) scale(1);
  transition: transform 650ms cubic-bezier(.4, 0, .2, 1);
}

/* Book opens (spine shifts to viewer's center) before it zooms. */
#cover.is-opening .book,
#cover.is-zooming .book { transform: translateX(50%) scale(1); }

/* Once open, it zooms toward the viewer, centered on the now-centered spine. */
#cover.is-zooming .book {
  transform: translateX(50%) scale(7);
  transition: transform 780ms cubic-bezier(.4, 0, .2, 1);
}

.book-page {
  position: absolute;
  inset: 0;
  background: var(--card);
  box-shadow: 0 20px 40px -22px rgba(13, 59, 62, 0.35);
}

/* Right-hand page: sits where the closed book already is. */
.book-page-right {
  border-radius: 4px 9px 9px 4px;
}

/* Left-hand page: mirrored, unfurls from the spine as the book opens. */
.book-page-left {
  left: auto;
  right: 100%;
  width: 100%;
  border-radius: 9px 4px 4px 9px;
  transform-origin: right center;
  transform: scaleX(0);
  opacity: 0;
  transition: transform 650ms cubic-bezier(.4, 0, .2, 1), opacity 500ms ease;
}

#cover.is-opening .book-page-left,
#cover.is-zooming .book-page-left {
  transform: scaleX(1);
  opacity: 1;
}

.book-cover {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform 650ms cubic-bezier(.4, 0, .2, 1), box-shadow 500ms ease;
  border-radius: 4px 10px 10px 4px;
  background: var(--teal);
  box-shadow: inset -1px 0 0 rgba(255, 248, 240, 0.14), 0 30px 60px -26px rgba(13, 59, 62, 0.55);
  overflow: hidden;
  backface-visibility: hidden;
  padding: 40px 34px;
  color: var(--cream);
}

/* Cover swings open on its spine to reveal the blank page underneath. */
#cover.is-opening .book-cover,
#cover.is-zooming .book-cover {
  transform: rotateY(-158deg);
  box-shadow: none;
}

.book-cover .spine {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 16px;
  background: var(--coral);
}

.book-text {
  position: relative;
  height: 100%;
  margin-left: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 1;
  transition: opacity 200ms ease;
}

#cover.is-opening .book-text,
#cover.is-zooming .book-text { opacity: 0; }

.book-cover .eyebrow {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--butter);
}

.book-cover .dot {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--coral);
  margin-bottom: 30px;
}

.book-cover .title {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 46px;
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--cream);
}

.book-cover .tagline {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 248, 240, 0.68);
  max-width: 26ch;
}

.click-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
}

.click-hint .dot-sm {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.click-hint {
  opacity: 1;
  transition: opacity 200ms ease;
}

#cover.is-opening .click-hint { opacity: 0; }

@keyframes om-float {
  0%, 100% { transform: translateY(-10px); }
  50% { transform: translateY(12px); }
}

@keyframes om-fadeup {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .book-float { animation: none; }
  html { scroll-behavior: auto; }
  .book, .book-cover, .book-page-left, .book-text, .click-hint, #cover.is-fading { transition: none !important; }
}

/* -----------------------------------------------------------
   Site shell
   ----------------------------------------------------------- */

#site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#site.is-hidden { display: none; }
#site.is-visible { animation: om-fadeup 600ms ease both; }

/* Keeps the footer pinned to the bottom of the viewport on short pages
   (e.g. the admin sign-in screen) instead of collapsing up under the
   content. Explicit width:100% matters here: main/footer both center
   themselves with margin:0 auto + max-width, and as flex items of #site,
   auto margins on the cross axis override stretch — without a full-width
   basis to center *within*, they'd shrink to fit their own content instead
   of the page, which is what made the footer visually creep to the middle. */
main { flex: 1 0 auto; width: 100%; }
footer.site-footer { width: 100%; }

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 240, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 40px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.wordmark .dot-sm {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--coral);
  flex: none;
}

nav.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  opacity: 0.68;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 3px;
  transition: opacity .2s ease, color .2s ease, border-color .2s ease;
}

.nav-link:hover { opacity: 1; color: var(--coral); }

.nav-link.is-active {
  opacity: 1;
  border-bottom-color: var(--coral);
}

.btn-subscribe {
  display: inline-flex;
  padding: 9px 17px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1.5px solid var(--coral);
  background: var(--coral);
  font-size: 13px;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.btn-subscribe:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--cream);
}

.nav-toggle {
  display: none;
}

main { max-width: var(--max); margin: 0 auto; padding: 0 40px; }
main.narrow { max-width: var(--max-narrow); }
main.tight { max-width: 1000px; }
main.resume-main { max-width: 1100px; }

/* -----------------------------------------------------------
   Buttons / kickers
   ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 15px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.btn-primary {
  background: var(--teal);
  color: var(--cream);
}
.btn-primary:hover { background: var(--coral); color: var(--cream); }

.btn-outline {
  border: 1.5px solid var(--hairline-strong);
  color: var(--teal);
}
.btn-outline:hover { background: var(--butter); border-color: var(--butter); }

/* Editor-driven button-size presets (content.buttonSizes[path]). */
.btn-size-sm { padding: 10px 18px; font-size: 13px; }
.btn-size-lg { padding: 18px 30px; font-size: 17px; }
.btn-size-xl { padding: 22px 38px; font-size: 19px; }

.kicker {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.kicker-on-cream { color: var(--gray); }
.kicker-on-teal { color: var(--butter); }

/* -----------------------------------------------------------
   Home
   ----------------------------------------------------------- */

/* The graphic is taken out of normal flow entirely (positioned, top-right)
   so the text underneath it — eyebrow, headline, then the paragraph+button
   row — stacks with its own tight, fixed spacing regardless of how tall
   the graphic is, and the paragraph+buttons row can still share one
   bottom-aligned line the way the reference shows, rather than the
   buttons being tied to the graphic's own height instead. */
.hero {
  position: relative;
  padding: 68px 0 48px;
}

.hero-visual {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  /* Scales with viewport width (like the headline's own font-size) rather
     than a fixed pixel size — a fixed size that clears the text column
     comfortably on a wide screen ends up big enough, relative to a
     narrower desktop window, to collide with the button row below it. */
  max-width: clamp(260px, 36vw, 600px);
  aspect-ratio: 1 / 1;
}

.hero-visual svg { width: 100%; height: 100%; display: block; }

.hero-headline {
  max-width: 62%;
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 6vw, 92px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-headline mark {
  background: none;
  color: var(--coral);
  display: inline-block;
  background-image: linear-gradient(to top, var(--butter) 0 0.14em, transparent 0.14em);
}

/* Text on the left; the buttons sit in the right-hand column, underneath the
   motion graphic. */
.hero-footer {
  display: grid;
  grid-template-columns: minmax(0, 62%) minmax(0, 1fr);
  align-items: end;
  column-gap: 24px;
  margin-top: 32px;
}

.hero-intro {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 780px;
  font-size: 18px;
  line-height: 1.65;
  opacity: .82;
  text-wrap: pretty;
}
.hero-intro p { margin: 0; }
.hero-intro-copy { display: flex; flex-direction: column; gap: 14px; }

.hero-actions {
  justify-self: start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skills-ticker {
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 64px, black calc(100% - 64px), transparent);
  mask-image: linear-gradient(to right, transparent, black 64px, black calc(100% - 64px), transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 26s linear infinite;
}

.ticker-group {
  display: flex;
  align-items: center;
  flex: none;
}

.ticker-item {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--teal);
  white-space: nowrap;
  padding: 0 26px;
}

.ticker-sep {
  color: var(--gray);
  opacity: .5;
  font-size: 12px;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

.skills-edit-list { display: none; }
.admin-edit-mode .skills-edit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 0 4px;
}
.admin-edit-mode .skills-edit-list [data-edit] {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline);
  font-size: 13px;
  font-weight: 600;
}

.worked-with { margin-top: 56px; margin-bottom: 56px; }

.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}

.logo-placeholder {
  flex: 1 1 160px;
  min-width: 140px;
  height: 72px;
  border-radius: 12px;
  background-color: var(--placeholder);
  background-image: repeating-linear-gradient(135deg, rgba(140, 133, 121, 0.16) 0 10px, transparent 10px 20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.currently-band {
  background: var(--teal);
  color: var(--cream);
  border-radius: 32px;
  padding: 56px 48px;
}

.currently-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.currently-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--divider-on-teal);
}

.currently-item .label {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.currently-item .body { font-size: 15px; line-height: 1.65; opacity: .74; text-wrap: pretty; }

.link-underline {
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1.5px solid var(--hairline-strong);
  padding-bottom: 2px;
  transition: color .2s ease, border-color .2s ease;
}
.link-underline:hover { color: var(--coral); border-color: var(--coral); }

.projects-panel-wrap { padding: 96px 0 8px; }

.projects-panel {
  background: var(--butter);
  border-radius: 32px;
  padding: 56px 48px;
}

.projects-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.projects-panel-head h2 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 56px);
  letter-spacing: -0.045em;
}

.projects-panel-note {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: 34ch;
  text-align: right;
}

.projects-panel-note p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  opacity: .75;
}

.projects-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.projects-panel-card {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card);
  border-radius: 20px;
  padding: 32px 28px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.projects-panel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -24px rgba(13, 59, 62, 0.35);
}

.kicker-mini {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
}

.projects-panel-card .card-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.025em;
}

.projects-panel-card .card-body { font-size: 15px; line-height: 1.6; opacity: .78; text-wrap: pretty; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
}

.about-panel-wrap { padding: 96px 0 0; }

.about-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
  /* The text beside the photo is long, so the photo sits at the top and
     stays in view while it is read. */
  align-items: start;
}
.about-panel-media { position: sticky; top: 100px; }

/* A little short of the column's true right edge — filling it completely
   (the previous change) left the text and facts running flush against it
   with no breathing room at all. */
.about-panel-text { max-width: 94%; }


.about-panel-headline {
  margin: 18px 0 0;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.035em;
  max-width: 20ch;
  text-wrap: pretty;
}

.about-panel-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.7;
  opacity: .82;
  /* Fill the column's real width instead of an arbitrary character cap —
     the column is already sized sensibly by the surrounding grid. */
  max-width: 100%;
  text-wrap: pretty;
}

.about-panel-copy p { margin: 0; }

.about-panel-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 36px;
}

.testimonials-wrap { padding: 96px 0 0; }

.newsletter-embed-wrap { padding: 72px 0 0; }

/* max-width was in `ch`, a unit relative to *this element's own* font size
   — not the much larger heading's — so it was being measured against plain
   body-text sizing and came out far narrower than intended, wrapping the
   heading onto two lines. A plain pixel value, generous enough for the
   heading alone now that there's no subheading under it to keep narrow for
   readability, fixes that regardless of either element's font size. */
.newsletter-embed-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.newsletter-embed-head h2 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -0.03em;
}

.newsletter-embed-frame {
  display: flex;
  justify-content: center;
  width: 100%;
  /* Sized close to the actual form's own natural width (not a much wider
     guess) so there's no leftover blank space beside it; centering
     whatever's actually mounted inside turns any small remaining mismatch
     into an even margin on both sides rather than a one-sided gap, since
     the exact width of a pasted third-party embed isn't something this can
     know in advance. Scaled up slightly as its own visual size after that —
     zoom (unlike transform:scale) grows the element's real layout footprint
     along with its appearance, so nothing needs to be re-measured to avoid
     it overlapping what follows. */
  max-width: 460px;
  margin: 0 auto;
  border: none;
  border-radius: 18px;
  zoom: 1.12;
  /* min-height (set inline) only reserves space before the embed's script
     loads — real injected content (not a fixed-size iframe any more) needs
     to be able to grow taller than that without getting clipped. */
  overflow: visible;
}
.newsletter-embed-frame.placeholder-img {
  aspect-ratio: auto;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.testimonial-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 40px 36px 30px;
  background: var(--card);
  border: 1.5px solid var(--hairline);
  border-radius: 28px;
  box-shadow: 0 28px 48px -40px rgba(13, 59, 62, 0.45);
}
.testimonial-card { background: color-mix(in srgb, var(--butter) 22%, var(--card)); }

.testimonial-quote-mark { display: block; width: 34px; height: 26px; color: var(--coral); flex: none; }

.testimonial-card blockquote {
  margin: 0;
  flex: 1;
  font-family: 'Sora', sans-serif;
  font-weight: 500;
  font-size: 17.5px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.testimonial-card figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}

.testimonial-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--cream);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.testimonial-who { font-size: 14px; line-height: 1.45; color: var(--gray); min-width: 0; }
.testimonial-who a { color: var(--teal); font-weight: 700; }
.testimonial-who a:hover { color: var(--coral); }

/* -----------------------------------------------------------
   Home: newsletter card (before Projects)
   ----------------------------------------------------------- */

.home-newsletter-wrap { padding: 56px 0 0; }

.newsletter-widget.home-newsletter {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  padding: 44px;
  border-radius: 32px;
}

.home-newsletter-feedhead {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: .6;
  padding-bottom: 6px;
}

.home-newsletter .newsletter-name { font-size: 20px; }
.home-newsletter-btn { align-self: flex-start; margin-top: 10px; }
.home-newsletter-btn.is-hidden-preview { opacity: .35; }
.home-newsletter .newsletter-desc { font-size: 14px; }

/* Each issue: date | title, with its short description under the title. */
.newsletter-item.has-desc {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 4px;
  align-items: baseline;
}
.newsletter-item.has-desc .date { grid-column: 1; grid-row: 1; }
.newsletter-item.has-desc .title { grid-column: 2; grid-row: 1; font-size: 16px; }
.newsletter-item.has-desc .desc {
  grid-column: 2;
  grid-row: 2;
  font-size: 14px;
  line-height: 1.55;
  opacity: .72;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-newsletter .newsletter-item:hover .title { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.home-newsletter-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: auto;
  padding-top: 28px;
}
.home-newsletter-cta .newsletter-more { margin-top: 0; align-self: center; color: inherit; border-bottom: 1.5px solid color-mix(in srgb, currentColor 35%, transparent); padding-bottom: 2px; }
.home-newsletter-cta .newsletter-more:hover { opacity: 1; border-color: currentColor; color: inherit; }
/* Nothing published yet: one friendly line, centred in the space beside the
   cover instead of a lone tiny sentence floating above a big gap. */
.home-newsletter .newsletter-widget-main.is-empty { justify-content: center; gap: 0; }
.home-newsletter .is-empty .home-newsletter-feedhead { display: none; }
.admin-edit-mode .home-newsletter .is-empty .home-newsletter-feedhead { display: block; }
.home-newsletter .is-empty .newsletter-status {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.03em;
  opacity: 1;
  padding: 0;
  max-width: 22ch;
}
.home-newsletter .is-empty .home-newsletter-cta { margin-top: 0; padding-top: 28px; }
.home-newsletter-btn:hover { filter: brightness(1.08); color: inherit; }
/* The pasted Beehiiv form lives in the left column, between the description
   and the button, so that column gets a bit more room when a form is there. */
.home-newsletter-embed { width: 100%; max-width: 100%; margin-top: 6px; }
.home-newsletter-embed iframe { max-width: 100%; display: block; }

/* Desktop and tablet (701px and wider): the home card matches the newsletter boxes on the Content page
   (28px padding, 220px left column, same overall height). When a form is
   pasted in, the left column widens to 300px for the form. At 700px and
   below it stacks like those boxes do. */
@media (min-width: 701px) {
  .newsletter-widget.home-newsletter { padding: 28px; min-height: 536px; grid-template-columns: 220px minmax(0, 1fr); }
  .newsletter-widget.home-newsletter:has(.has-embed) { grid-template-columns: 300px minmax(0, 1fr); }
  .home-newsletter-btn { padding: 12px 12px; font-size: 14px; white-space: normal; text-align: center; justify-content: center; max-width: 100%; }
  /* The logo stays exactly as on the Content page's newsletter boxes (a 220px
     square above the name); only the column widens for the form. */
  .has-embed .newsletter-cover { width: 220px; }
}

/* -----------------------------------------------------------
   Home: "What brings you here?"
   ----------------------------------------------------------- */

/* The four "what brings you here" boxes, sitting under the About text. */
.wby-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.wby-card {
  --accent: #2F6FDB;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 24px 24px 20px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--accent) 12%, var(--cream));
  border: 1.5px solid color-mix(in srgb, var(--accent) 24%, transparent);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.wby-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 22px 40px -28px color-mix(in srgb, var(--accent) 70%, transparent);
}

.wby-no {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.wby-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-top: 4px;
}
.wby-body { font-size: 14px; line-height: 1.5; opacity: .75; }
.wby-cta {
  margin-top: auto;
  padding-top: 14px;
  font-weight: 600;
  font-size: 15px;
  color: color-mix(in srgb, var(--accent) 82%, black);
}
.wby-arrow { display: inline-block; transition: transform .2s ease; }
.wby-card:hover .wby-arrow { transform: translate(3px, -3px); }

/* -----------------------------------------------------------
   Home: Decision Room + Explore (Marketing Patterns Index)
   ----------------------------------------------------------- */

.pi-wrap { padding: 96px 0 0; }
.pi-panel {
  background: color-mix(in srgb, var(--teal) 6%, var(--cream));
  border: 1.5px solid var(--hairline);
  border-radius: 32px;
  padding: 52px 48px 48px;
}
.pi-head h2 {
  margin: 14px 0 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.pi-intro { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; font-size: 17px; line-height: 1.65; opacity: .8; max-width: none; text-wrap: pretty; }
.pi-intro p { margin: 0; }

/* Text and buttons on the left, a data visual on the right. */
.pi-top {
  display: grid;
  /* The text ends about three fifths of the way across; the chart fills the rest. */
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  grid-template-areas: "head side" "actions side";
  grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 3.9vw, 56px);
}
.pi-head { grid-area: head; }
.pi-actions { grid-area: actions; align-self: start; }
.pi-side {
  grid-area: side;
  align-self: center;
  min-width: 0;
  padding: 28px 30px;
  border-radius: 24px;
  background: var(--card);
  border: 1.5px solid var(--hairline);
}
.pi-side-skel { min-height: 220px; }
.pi-side-title { margin-bottom: 20px; font-family: 'Sora', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; opacity: .6; }
.pi-side .pi-bars { gap: 16px; }
.pi-side .pi-bar { grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 38px; gap: 14px; font-size: 15px; }

.pi-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.pi-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--cream);
  border: 1.5px solid var(--teal);
  font-weight: 600;
  font-size: 15px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pi-toggle:hover { background: var(--coral); border-color: var(--coral); }
.pi-toggle.is-secondary { background: transparent; color: var(--teal); border-color: var(--hairline-strong); }
.pi-toggle.is-secondary:hover { background: var(--butter); border-color: var(--butter); color: var(--teal); }
.pi-caret { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .25s ease; }
.pi-toggle.is-open .pi-caret { transform: rotate(-135deg) translate(-2px, 0); }
.pi-mount { margin-top: 0; }
.pi-body { margin-top: 30px; }
.pi-body[hidden], .pi-explore-panel[hidden] { display: none; }
.pi-explore-panel { position: relative; margin-top: 28px; }
.pi-close { position: absolute; top: 20px; right: 26px; font-size: 14px; font-weight: 600; opacity: .6; transition: opacity .2s ease, color .2s ease; }
.pi-close:hover { opacity: 1; color: var(--coral); }
.pi-loading, .pi-note { margin: 0; font-size: 14.5px; opacity: .7; }
.pi-note { margin-top: 18px; }
.pi-retry { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* The nine problems */
.pi-problems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pi-problem {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  min-height: 136px;
  padding: 22px 22px 16px;
  text-align: left;
  border-radius: 20px;
  background: var(--card);
  border: 1.5px solid var(--hairline);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}
.pi-problem:hover { transform: translateY(-3px); border-color: var(--hairline-strong); box-shadow: 0 18px 34px -26px rgba(13, 59, 62, 0.5); }
.pi-problem.is-active { background: var(--teal); color: var(--cream); border-color: var(--teal); }
.pi-problem-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pi-problem-label { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 19px; line-height: 1.25; letter-spacing: -0.02em; }
.pi-problem-no { flex: none; padding: 3px 9px; border: 1px solid currentColor; border-radius: 999px; font-family: 'Sora', sans-serif; font-size: 12px; font-weight: 600; opacity: .45; }
.pi-problem-foot { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent); font-size: 13.5px; }
.pi-problem-foot > span:first-child { opacity: .7; }
.pi-problem-go { font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity .2s ease; }
.pi-problem:hover .pi-problem-go, .pi-problem:focus-visible .pi-problem-go, .pi-problem.is-active .pi-problem-go { opacity: 1; }

/* A problem's answer */
.pi-result:empty { display: none; }
.pi-result { margin-top: 28px; }
.pi-result-inner {
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 38px;
  border-radius: 26px;
  background: var(--card);
  border: 1.5px solid var(--hairline);
}
.pi-result-kicker { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral); }
.pi-result-head h3 { margin: 8px 0 0; font-family: 'Sora', sans-serif; font-weight: 800; font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -0.035em; }
.pi-result-head p { margin: 10px 0 0; font-size: 16.5px; opacity: .75; }
.pi-block h4 { margin: 0 0 14px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.pi-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }

.pi-bars { display: flex; flex-direction: column; gap: 10px; }
.pi-bars-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; row-gap: 10px; }
.pi-bar {
  display: grid;
  grid-template-columns: minmax(110px, 190px) minmax(0, 1fr) 40px;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  font-size: 14.5px;
}
.pi-bar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .2s ease; }
.pi-bar-track { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 10%, transparent); overflow: hidden; }
.pi-bar-track i { display: block; height: 100%; border-radius: 999px; background: var(--teal); transition: background .2s ease; }
.pi-bar-n { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.pi-bar.is-link { cursor: pointer; }
.pi-bar.is-link:hover .pi-bar-label { color: var(--coral); }
.pi-bar.is-link:hover .pi-bar-track i { background: var(--coral); }

.pi-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pi-pill { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--hairline); font-size: 14px; font-weight: 600; transition: border-color .2s ease, background .2s ease; }
.pi-pill b { margin-left: 4px; font-weight: 600; opacity: .55; }
.pi-pill:hover { border-color: var(--teal); background: var(--butter); }

.pi-questions { padding: 30px 32px; border-radius: 22px; background: var(--teal); color: var(--cream); }
.pi-questions h4 { margin: 0 0 16px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--butter); }
.pi-questions ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 17px; line-height: 1.55; }
.pi-questions li::marker { color: var(--butter); }

.pi-evidence-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.pi-evidence-head h4 { margin: 0; }
.pi-link { font-weight: 600; font-size: 14.5px; border-bottom: 1.5px solid var(--hairline-strong); padding-bottom: 2px; transition: color .2s ease, border-color .2s ease; }
.pi-link:hover { color: var(--coral); border-color: var(--coral); }

/* Case cards (Decision Room evidence and Explore) */
.pi-cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pi-case {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
  border-radius: 20px;
  background: var(--card);
  border: 1.5px solid var(--hairline);
}
.pi-result-inner .pi-case { background: var(--cream); }
.pi-case-no { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral); }
.pi-case-name { margin: 6px 0 16px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 20px; line-height: 1.25; letter-spacing: -0.02em; text-align: left; }
.pi-case-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; font-size: 13.5px; }
.pi-case-meta > div { min-width: 0; }
.pi-case-meta span { display: block; margin-bottom: 2px; font-size: 12px; opacity: .55; }
.pi-case-meta b { display: block; font-weight: 500; line-height: 1.45; }
.pi-case-label { margin-bottom: 6px; font-size: 12px; opacity: .55; }
.pi-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.pi-tag { padding: 4px 11px; border-radius: 999px; border: 1.5px solid var(--hairline); font-size: 12px; font-weight: 600; color: color-mix(in srgb, var(--teal) 70%, var(--cream)); transition: border-color .2s ease, color .2s ease; }
button.pi-tag:hover { border-color: var(--teal); color: var(--teal); }
.pi-tag.is-static { cursor: default; }
.pi-case-principle { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--hairline); }
.pi-case-principle span { display: block; margin-bottom: 4px; font-size: 12px; opacity: .55; }
.pi-case-principle p { margin: 0; font-size: 14.5px; line-height: 1.6; opacity: .85; text-wrap: pretty; }

/* Explore */

.pi-controls { display: flex; flex-direction: column; gap: 14px; padding-bottom: 28px; border-bottom: 1px solid var(--hairline); }
.pi-search {
  width: 100%;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline-strong);
  background: var(--card);
  font: inherit;
  font-size: 15px;
  color: var(--teal);
}
.pi-search::placeholder { color: color-mix(in srgb, var(--teal) 50%, var(--cream)); }
.pi-search:focus, .pi-select select:focus-visible { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--butter) 60%, transparent); }
.pi-selects { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
/* The six filters share the row, so it ends exactly where the search bar does. */
.pi-select { flex: 1 1 130px; min-width: 0; }
.pi-select select { width: 100%; }
.pi-clear { flex: none; }
.pi-select select {
  appearance: none;
  -webkit-appearance: none;
  max-width: 100%;
  padding: 11px 38px 11px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline-strong);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230D3B3E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 15px center;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
}
.pi-clear { padding: 8px 10px; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; opacity: .7; }
.pi-clear:hover { opacity: 1; color: var(--coral); }
.pi-clear[hidden] { display: none; }
.pi-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pi-chips:empty { display: none; }
.pi-chip { padding: 7px 14px; border-radius: 999px; background: var(--butter); font-size: 13.5px; font-weight: 600; }
.pi-chip:hover { background: var(--coral); color: var(--cream); }

.pi-results { display: flex; flex-direction: column; gap: 30px; padding-top: 28px; }
.pi-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.pi-summary-n { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -0.04em; }
.pi-summary-t { font-size: 15px; opacity: .75; }
.pi-summary-t em { font-style: normal; opacity: .7; }
.pi-details { border-top: 1px solid var(--hairline); padding-top: 18px; }
.pi-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.pi-details summary::-webkit-details-marker { display: none; }
.pi-details summary::after { content: ""; width: 9px; height: 9px; flex: none; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .25s ease; }
.pi-details[open] summary::after { transform: rotate(-135deg) translate(-2px, 0); }
.pi-details .pi-bars { margin-top: 18px; }
.pi-empty { padding: 40px 24px; border: 1.5px dashed var(--hairline-strong); border-radius: 20px; text-align: center; opacity: .75; }

/* The sliding strip of cases */
.pi-slider-wrap { position: relative; }
.pi-slider {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  outline: none;
}
.pi-slider::-webkit-scrollbar { display: none; }
.pi-slider:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--butter) 70%, transparent); border-radius: 20px; }
.pi-slider.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.pi-track { display: flex; align-items: stretch; gap: 20px; width: max-content; }
.pi-slider .pi-case { flex: 0 0 340px; }
.pi-more { justify-content: center; text-align: center; background: transparent; border-style: dashed; }
.pi-more p { margin: 0 0 8px; font-size: 15px; line-height: 1.55; opacity: .75; }
.pi-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding-bottom: 3px;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--hairline-strong);
  box-shadow: 0 10px 24px -12px rgba(13, 59, 62, 0.5);
  font-size: 26px;
  line-height: 1;
  transition: background .2s ease;
}
.pi-arrow:hover { background: var(--butter); }
.pi-arrow.is-prev { left: -16px; }
.pi-arrow.is-next { right: -16px; }

.cta-slab-wrap { padding: 96px 0 96px; }

.cta-slab {
  background: var(--teal);
  color: var(--cream);
  border-radius: 32px;
  padding: 64px 56px;
  position: relative;
  overflow: hidden;
}

/* Tucked into the bottom-left corner, under the headline column, so they
   never sit behind the form on the right. */
.cta-slab .circle-a {
  position: absolute; left: -80px; bottom: -214px;
  width: 260px; height: 260px; border-radius: 50%;
  background: var(--coral); opacity: .92;
}
.cta-slab .circle-b {
  position: absolute; left: 110px; bottom: -200px;
  width: 220px; height: 220px; border-radius: 50%;
  background: var(--butter); opacity: .92;
}

.cta-slab-grid {
  position: relative;
  display: grid;
  /* The text column ends where the gap before the form begins; the gap is
     generous on a wide screen and tightens as the window narrows. */
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  gap: clamp(32px, 10.3vw, 148px);
  /* The text block is centred against the form's fields (name down to the
     message box), not including the Send button underneath them. */
  align-items: stretch;
}
.cta-slab .inner { position: relative; display: flex; flex-direction: column; justify-content: center; padding-bottom: 70px; }
/* The text fills its column rather than stopping at a character count. */
.cta-slab .inner p { max-width: none; }
.cta-slab h2 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.0;
  letter-spacing: -0.045em;
  color: var(--cream);
}
.cta-slab p { margin: 20px 0 0; font-size: 17px; line-height: 1.6; opacity: .72; max-width: 40ch; color: var(--cream); }
.cta-slab .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cta-slab .btn-primary { background: var(--cream); color: var(--teal); }
.cta-slab .btn-primary:hover { background: var(--butter); color: var(--teal); }
.cta-slab .btn-outline { border-color: rgba(255, 248, 240, 0.35); color: var(--cream); }
.cta-slab .btn-outline:hover { border-color: var(--cream); background: rgba(255, 248, 240, 0.12); }

/* Guestbook form inside the banner. */
/* The banner is one message with one action: the invitation on the left, the
   form on the right, and the email address as plain text, no second button. */
.cta-slab .cta-email { margin-top: 16px; opacity: 1; font-size: 17px; color: var(--cream); }
.cta-slab .cta-email a {
  color: var(--cream);
  font-weight: 600;
  border-bottom: 1.5px solid rgba(255, 248, 240, 0.45);
  padding-bottom: 1px;
  transition: color .2s ease, border-color .2s ease;
}
.cta-slab .cta-email a:hover { color: var(--butter); border-color: var(--butter); }
.cta-slab .cta-email span { opacity: .72; }

.guestbook {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gb-label { font-size: 14px; font-weight: 600; margin-bottom: 7px; color: var(--cream); }
.gb-input {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border: 1.5px solid rgba(255, 248, 240, 0.28);
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.05);
  color: var(--cream);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.gb-textarea { border-radius: 18px; min-height: 116px; resize: vertical; }
.gb-input::placeholder { color: rgba(255, 248, 240, 0.5); }
.gb-input:focus { outline: none; border-color: var(--butter); box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.25); }
.gb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gb-submit {
  height: 56px;
  width: 100%;
  padding: 15px 24px;
  border-radius: 999px;
  background: var(--butter);
  color: var(--teal);
  font-weight: 700;
  font-size: 15px;
  transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.gb-submit:hover { background: var(--coral); color: var(--cream); }
.gb-submit:disabled { opacity: .6; cursor: default; }
.guestbook .gb-status { position: absolute; left: 0; right: 0; top: calc(100% + 10px); margin: 0; min-height: 1.4em; font-size: 14px; line-height: 1.5; max-width: none; color: var(--butter); opacity: 1; }
.guestbook .gb-status.is-error { color: #FFB4A8; }

/* -----------------------------------------------------------
   Page intros (Projects / Lab / Writing / Now)
   ----------------------------------------------------------- */

.page-intro { padding: 96px 0 0; }

.page-intro h1 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 84px);
  letter-spacing: -0.045em;
}

.page-intro .lede {
  margin: 22px 0 0;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.025em;
  max-width: 30ch;
}

.page-intro .body {
  margin: 20px 0 0;
  font-size: 17px;
  line-height: 1.7;
  opacity: .8;
  max-width: 62ch;
  text-wrap: pretty;
}

.eyebrow-date {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}

/* -----------------------------------------------------------
   Projects grid + filters
   ----------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--hairline);
}

.filter-btn {
  padding: 9px 17px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline-strong);
  background: transparent;
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.filter-btn:hover { border-color: var(--teal); }
.filter-btn.is-active { background: var(--teal); color: var(--cream); border-color: var(--teal); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 28px;
  margin-top: 40px;
  padding-bottom: 40px;
}

.project-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--hairline);
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  transition: border-color .25s ease, transform .25s ease;
  width: 100%;
}
.project-card:hover { border-color: var(--teal); transform: translateY(-4px); }

.placeholder-img {
  aspect-ratio: 16 / 10;
  background-color: var(--placeholder);
  background-image: repeating-linear-gradient(135deg, rgba(140, 133, 121, 0.16) 0 10px, transparent 10px 20px);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.placeholder-img.large { aspect-ratio: 16 / 9; border-radius: 22px; padding: 22px; }
.placeholder-img.portrait { aspect-ratio: 4 / 5; border-radius: 20px; padding: 18px; background-color: var(--gray);
  background-image: repeating-linear-gradient(135deg, rgba(255, 248, 240, 0.2) 0 10px, transparent 10px 20px); }

.placeholder-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--gray);
  background: var(--cream);
  padding: 6px 9px;
  border-radius: 7px;
}

.placeholder-img.large .placeholder-tag { font-size: 12px; padding: 8px 11px; border-radius: 8px; }
.placeholder-img.portrait .placeholder-tag { color: var(--cream); background: rgba(13, 59, 62, 0.75); }

.project-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px 24px;
}

.project-body .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-body .name {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.status-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--butter);
  white-space: nowrap;
}

.project-body .blurb { font-size: 15px; line-height: 1.6; opacity: .78; text-wrap: pretty; }
.project-body .stack { font-size: 13px; color: var(--gray); }
.project-body .cta { font-weight: 600; font-size: 14px; color: var(--coral); margin-top: 4px; }

.empty-state {
  padding: 60px 0;
  color: var(--gray);
  font-size: 15px;
}

/* -----------------------------------------------------------
   Case study
   ----------------------------------------------------------- */

.back-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray);
  transition: color .2s ease;
}
.back-link:hover { color: var(--coral); }

.case-header h1 {
  margin: 28px 0 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 80px);
  letter-spacing: -0.045em;
}

.case-header .lede {
  margin: 20px 0 0;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1.3;
  letter-spacing: -0.025em;
  max-width: 30ch;
}

/* ---- Documents (PRDs, specs...) — sits above everything else ---- */
.case-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.case-doc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--hairline-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
}
.case-doc::before { content: "📄"; font-size: 13px; }
.case-doc a { color: inherit; }
.case-add-doc-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px dashed var(--hairline-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
}
.case-add-doc-btn:hover { border-color: var(--coral); color: var(--coral); }

/* ---- Categories — same treatment as the /projects filter pills, so the
   two stay visually tied to each other. ---- */
.case-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.case-cat-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline-strong);
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
}

/* ---- Meta badges (went live / updated / stack / links) — outlined, no fill ---- */
.case-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.case-meta-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--hairline-strong);
  min-width: 100px;
}
.case-meta-badge .k { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray); }
.case-meta-badge .v { font-size: 14px; font-weight: 600; color: var(--teal); }
.case-meta-badge .v a, .case-meta-badge a.v { color: var(--teal); border-bottom: 1.5px solid var(--hairline-strong); }
.case-meta-badge .v a:hover, .case-meta-badge a.v:hover { color: var(--coral); border-color: var(--coral); }

/* ---- Image carousel ---- */
.case-carousel {
  width: var(--page-w);
  margin-left: calc(50% - (var(--page-w) / 2));
  margin-right: calc(50% - (var(--page-w) / 2));
  margin-top: 48px;
  display: grid;
  grid-template-columns: minmax(40px, 1fr) minmax(0, 1100px) minmax(40px, 1fr);
  align-items: center;
  gap: 22px;
}
.case-carousel-peek {
  grid-row: 1;
  height: 260px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--placeholder) center / cover no-repeat;
  opacity: .55;
  cursor: pointer;
  transition: opacity .2s ease;
  border: none;
  padding: 0;
}
.case-carousel-peek:hover { opacity: .85; }
.case-carousel-peek.left { grid-column: 1; justify-self: end; width: 100%; }
.case-carousel-peek.right { grid-column: 3; justify-self: start; width: 100%; }
.case-carousel-main {
  grid-column: 2;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: var(--placeholder);
}
.case-carousel-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.case-carousel-slide.is-active { opacity: 1; pointer-events: auto; }
.case-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 248, 240, 0.9);
  color: var(--teal);
  font-size: 18px;
  z-index: 2;
  box-shadow: 0 6px 18px -8px rgba(13, 59, 62, 0.4);
}
.case-carousel-arrow:hover { background: var(--cream); }
.case-carousel-arrow.prev { left: 16px; }
.case-carousel-arrow.next { right: 16px; }
.case-carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.case-carousel-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hairline-strong); }
.case-carousel-dot.is-active { background: var(--coral); }

/* The Content page's media mosaic. Up to five tiles show: a large feature
   tile plus smaller ones, laid out by how many there are (data-n). The fifth
   tile carries a "+N more" badge while the rest are tucked away. */
.media-grid-wrap {
  max-width: 92%;
  margin: 48px auto 0;
}
.media-grid {
  --g: 10px;
  display: grid;
  gap: var(--g);
  grid-template-columns: repeat(4, 1fr);
}

.media-tile {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background-color: var(--placeholder);
  background-size: cover;
  background-position: center;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: filter .2s ease;
}
.media-tile:hover { filter: brightness(1.06); }
.media-grid[data-n="1"] .media-tile { aspect-ratio: 2 / 1; }
.media-grid[data-n="2"] .media-tile,
.media-grid[data-n="4"] .media-tile { aspect-ratio: 16 / 10; }

/* Tablet and up: the feature tile spans two rows (and, with three or more
   tiles, two columns), so its height comes from the rows it covers rather
   than its own ratio. Phones get their own, simpler layout further down. */
@media (min-width: 701px) {
  .media-grid[data-n="1"] { grid-template-columns: 1fr; }
  .media-grid[data-n="2"], .media-grid[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
  .media-grid[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
  .media-grid:not([data-n="1"]):not([data-n="2"]):not([data-n="4"]) .media-tile.is-feature {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
  }
}

.media-off { display: none; }

.media-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 25, 26, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 22px;
}

.media-toggle {
  display: block;
  margin: 14px auto 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--teal);
  border-bottom: 1.5px solid var(--hairline-strong);
}
.media-toggle[hidden] { display: none; }
.media-toggle:hover { color: var(--coral); border-color: var(--coral); }

.media-video { background-color: #0f2a2c; }
.media-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(255, 248, 240, 0.92);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
.media-tile.is-feature .media-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
.media-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -5px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--teal);
}
.media-tile.is-feature .media-play::before { margin: -11px 0 0 -7px; border-width: 11px 0 11px 18px; }
.media-video:hover .media-play { background: var(--cream); }

.image-lightbox-video {
  width: min(60vw, 106vh);
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5);
}
.media-player { display: block; width: 100%; height: 100%; border: 0; }

/* Phones: two columns. With three or five tiles the first runs the full
   width and the rest sit two to a row beneath it; one, two and four tiles
   just fill the columns evenly. */
@media (max-width: 700px) {
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .media-grid[data-n="1"] { grid-template-columns: 1fr; }
  .media-grid[data-n="3"] .media-tile.is-feature,
  .media-grid[data-n="5"] .media-tile.is-feature { grid-column: span 2; aspect-ratio: 16 / 10; }
  .media-more { font-size: 18px; }
}

/* ---- Sections, boxed with a light brand tint ---- */
.case-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 56px;
  padding-bottom: 40px;
}

.case-section {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 28px 28px;
  border-radius: 18px;
}

.case-section.case-tint-1 { background: rgba(13, 59, 62, 0.05); }
.case-section.case-tint-2 { background: rgba(255, 107, 91, 0.07); }
.case-section.case-tint-3 { background: rgba(255, 209, 102, 0.16); }

/* The trailing notes box: heading stacks above its body full-width, rather
   than sitting beside it the way every other section does. */
.case-section.case-notes {
  grid-template-columns: 1fr;
  gap: 12px;
}

.case-section h2 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.case-section .body { font-size: 17px; line-height: 1.75; opacity: .82; max-width: 100%; text-wrap: pretty; }

.case-flows { display: flex; flex-direction: column; gap: 22px; }
.case-flow-block { display: flex; flex-direction: column; gap: 10px; }
.case-flow-label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); }

.flow-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.flow-chip {
  padding: 11px 16px;
  border-radius: 11px;
  background: var(--teal);
  color: var(--cream);
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 14px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 26px;
}

.tech-item { display: flex; flex-direction: column; gap: 7px; }
.tech-item .label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); }
.tech-item .items { font-size: 15px; line-height: 1.6; opacity: .8; }

/* -----------------------------------------------------------
   Lab
   ----------------------------------------------------------- */

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 22px;
  margin-top: 56px;
  padding-bottom: 40px;
}

.lab-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 28px;
  border-radius: 20px;
  background: var(--card);
  border: 1.5px solid var(--hairline);
  min-height: 290px;
}

.lab-card .tag { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); }
.lab-card .title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 22px; line-height: 1.25; letter-spacing: -0.025em; text-wrap: pretty; }
.lab-card p.body { margin: 0; font-size: 15px; line-height: 1.65; opacity: .78; text-wrap: pretty; }
.lab-card .foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(13, 59, 62, 0.14);
}
.lab-card .result { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 15px; color: var(--teal); }
.lab-card .cta { font-weight: 600; font-size: 14px; color: var(--coral); }

/* -----------------------------------------------------------
   Writing
   ----------------------------------------------------------- */

.newsletter-widgets {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 48px;
  /* Room to breathe before whatever comes after — the site footer, on a
     Writing page with nothing else below the widgets. */
  margin-bottom: 56px;
  /* Inset from the page's full content width on both sides — the heading
     and intro above stay at the full width, only the widgets themselves
     are narrower. */
  max-width: 92%;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-widget {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  padding: 28px;
  border-radius: 20px;
  background: var(--teal);
  color: var(--cream);
}

.newsletter-widget-side { display: flex; flex-direction: column; gap: 10px; }

.newsletter-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  margin-bottom: 4px;
}
/* currentColor tracks whatever text color a widget's background picked
   (see contrastTextColor() in admin.js), so these overlays stay visible
   whether the widget ends up dark or light. */
.newsletter-cover.placeholder-img { background-color: color-mix(in srgb, currentColor 14%, transparent); }
.newsletter-cover .placeholder-tag { color: currentColor; background: color-mix(in srgb, currentColor 14%, transparent); }

.newsletter-name { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 17px; }
.newsletter-publisher { font-size: 13px; opacity: .65; }
.newsletter-desc { font-size: 13px; line-height: 1.6; opacity: .8; }

.newsletter-widget-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  padding-left: 32px;
}

.newsletter-items { display: flex; flex-direction: column; }

.newsletter-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  color: inherit;
}
.newsletter-item:hover .title { color: var(--coral); }
.newsletter-item .date { font-size: 12px; opacity: .6; white-space: nowrap; }
.newsletter-item .title { font-size: 15px; font-weight: 600; transition: color .2s ease; }

.newsletter-status { font-size: 13px; opacity: .65; padding: 14px 0; }

/* The feed URL is a real editable field (so the admin can change it), but
   it's an implementation detail — hidden from regular visitors, and only
   shown while actively editing the page. */
.newsletter-rss-input {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  font-size: 11px;
  opacity: .55;
}
.admin-edit-mode .newsletter-rss-input { display: flex; }
.newsletter-rss-input .v { font-size: 12px; word-break: break-all; }

.newsletter-more {
  align-self: flex-start;
  margin-top: 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--coral);
}
.newsletter-more:hover { opacity: .8; }

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.image-lightbox-img {
  display: block;
  max-width: 60vw;
  max-height: 60vh;
  width: auto;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5);
}

@media (max-width: 700px) {
  .newsletter-widget { grid-template-columns: 1fr; }
  .newsletter-widget-main { border-left: none; padding-left: 0; border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent); padding-top: 24px; }
}

.article-list { margin-top: 56px; border-top: 1px solid var(--hairline); padding-bottom: 40px; }

.article-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 90px;
  gap: 32px;
  align-items: baseline;
  padding: 26px 6px;
  border-bottom: 1px solid var(--hairline);
  transition: color .2s ease;
}
.article-row:hover { color: var(--coral); }

.article-row .cat { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); }
.article-row .title { font-family: 'Sora', sans-serif; font-weight: 600; font-size: clamp(18px, 2vw, 23px); line-height: 1.32; letter-spacing: -0.025em; text-wrap: pretty; }
.article-row .date { font-size: 13px; color: var(--gray); text-align: right; }

/* -----------------------------------------------------------
   About
   ----------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 76px;
  align-items: start;
  padding: 96px 0 40px;
}

.about-grid h1 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(38px, 5.4vw, 74px);
  letter-spacing: -0.045em;
}

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 34px;
  font-size: 18px;
  line-height: 1.75;
  opacity: .84;
  max-width: 62ch;
  text-wrap: pretty;
}

.about-copy p { margin: 0; }
.about-copy p.emphasis {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  opacity: 1;
}

.about-side { display: flex; flex-direction: column; gap: 16px; }

.about-fact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}
.about-fact .label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); }
.about-fact .items {
  font-size: 15px;
  line-height: 1.7;
  opacity: .8;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* -----------------------------------------------------------
   Resume
   ----------------------------------------------------------- */

.resume-page {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  padding: 96px 0 60px;
  align-items: start;
  position: relative;
}

.resume-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 32px 28px;
}

.resume-card h2 {
  margin: 0 0 20px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
}

.resume-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  position: sticky;
  top: 24px;
}

.resume-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 12px;
}

.resume-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--butter), var(--coral));
  margin-bottom: 18px;
}
.resume-photo.placeholder-img { border-radius: 50%; padding: 0; display: flex; align-items: center; justify-content: center; }

.resume-profile h1 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
}

.resume-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--coral);
  margin-top: 4px;
}

.resume-tagline {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray);
  max-width: 30ch;
}

.resume-location-pill {
  margin-top: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--placeholder);
  font-size: 12px;
  font-weight: 600;
}

.resume-profile-section {
  width: 100%;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  text-align: left;
}

.resume-profile-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 12px;
}

.resume-skill-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.resume-skill-pill {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.resume-skill-pill.tint-1 { background: rgba(13, 59, 62, 0.1); color: var(--teal); }
.resume-skill-pill.tint-2 { background: rgba(255, 107, 91, 0.14); color: var(--coral); }
.resume-skill-pill.tint-3 { background: rgba(255, 209, 102, 0.28); color: var(--teal); }

.resume-links { display: flex; flex-direction: column; gap: 8px; }
.resume-link-row {
  padding: 10px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: border-color .2s ease, color .2s ease;
}
.resume-link-row:hover { border-color: var(--coral); color: var(--coral); }

.resume-stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.resume-about { display: flex; flex-direction: column; gap: 14px; }
.resume-about p { margin: 0; font-size: 15px; line-height: 1.75; opacity: .85; }

.resume-exp { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; align-items: start; }

.resume-exp-nav { display: flex; flex-direction: column; gap: 4px; }
.resume-exp-nav-btn {
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
  background: none;
}
.resume-exp-nav-btn:hover { color: var(--teal); }
.resume-exp-nav-btn.is-active { color: var(--coral); border-left-color: var(--coral); background: rgba(255, 107, 91, 0.06); }

/* A connected timeline (dot + line per entry) rather than separate boxes —
   only the visible ~1.5 entries show at once, the rest scroll within this
   box instead of pushing the rest of the page down. */
.resume-roles { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.resume-role-card { display: flex; gap: 14px; }
.resume-role-rail { display: flex; flex-direction: column; align-items: center; width: 14px; flex-shrink: 0; }
.resume-role-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.resume-role-rail::after { content: ""; flex: 1; width: 2px; background: var(--hairline-strong); margin-top: 4px; }
.resume-role-card:last-child .resume-role-rail::after { display: none; }
.resume-role-body { flex: 1; min-width: 0; padding-bottom: 26px; }
.resume-role-card:last-child .resume-role-body { padding-bottom: 4px; }

.resume-exp-role { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 18px; }
.resume-exp-meta { margin-top: 4px; font-size: 13px; color: var(--gray); }
.resume-exp-bullets { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.resume-exp-bullets li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.65; opacity: .85; }
.resume-exp-bullets li::before { content: "▸"; position: absolute; left: 0; color: var(--coral); }

.resume-quests { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.resume-quest-card { position: relative; padding: 28px; border-radius: 20px; }
/* Soft default cycling background, same idea as .case-tint-N on case-study
   sections — used only while a quest has no color of its own; picking one
   via the panel's "Box color" control switches it to that color mixed into
   cream instead (see the inline style branch in app.js). */
.resume-quest-tint-1 { background: #E7EEDC; }
.resume-quest-tint-2 { background: #DCE8F5; }
.resume-quest-tint-3 { background: #F5E6D6; }
.resume-quest-link {
  position: absolute; top: 18px; right: 18px;
  font-size: 14px; color: var(--gray);
  transition: color .2s ease;
}
.resume-quest-link:hover { color: var(--coral); }
.resume-quest-no { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.06em; color: var(--gray); margin-bottom: 10px; }
.resume-quest-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin-bottom: 8px; }
.resume-quest-body { font-size: 15px; line-height: 1.55; opacity: .74; }

.resume-education { display: flex; flex-direction: column; gap: 14px; }
.resume-edu-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; border-radius: 16px; }
.resume-edu-school { font-weight: 700; font-size: 15px; }
/* One school can list several degrees/certs — each its own row within the
   same card, addable/duplicable/reorderable independently of the school
   entry itself (matching how a company's roles work within Experience). */
.resume-edu-degrees { display: flex; flex-direction: column; gap: 4px; }
.resume-edu-degree-row { display: flex; flex-direction: column; gap: 2px; }
.resume-edu-degree { font-size: 14px; opacity: .85; }
/* A degree can list more than one date range (e.g. non-contiguous terms) —
   each its own duplicable/removable line, independent of the degree name. */
.resume-edu-dates-list { display: flex; flex-direction: column; gap: 2px; }
.resume-edu-dates { font-size: 13px; color: var(--gray); }

/* -----------------------------------------------------------
   Now
   ----------------------------------------------------------- */

.now-list { display: flex; flex-direction: column; margin-top: 52px; border-top: 1px solid var(--hairline); padding-bottom: 40px; }

.now-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 36px;
  align-items: baseline;
  padding: 26px 4px;
  border-bottom: 1px solid var(--hairline);
}

.now-row .label { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--coral); }
.now-row .body { font-size: 17px; line-height: 1.7; opacity: .82; text-wrap: pretty; }

/* -----------------------------------------------------------
   Footer
   ----------------------------------------------------------- */

footer.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 40px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-copy { font-size: 14px; color: var(--gray); }

.footer-social { display: flex; flex-wrap: wrap; gap: 26px; font-size: 14px; color: var(--gray); }
.footer-social a { color: var(--gray); transition: color .2s ease; }
.footer-social a:hover { color: var(--coral); }

/* -----------------------------------------------------------
   Responsive
   ----------------------------------------------------------- */

@media (max-width: 900px) {
  .header-inner { padding: 16px 24px; }
  main, main.narrow, main.tight, main.resume-main { padding-left: 24px; padding-right: 24px; }
  .currently-band { padding: 40px 28px; border-radius: 24px; }
  footer.site-footer { padding-left: 24px; padding-right: 24px; }

  /* No room to float the graphic beside the text at this width — it drops
     into the normal flow instead, reordered to sit after the copy rather
     than wherever it happens to fall as the first element in markup. */
  .hero { padding-top: 44px; display: flex; flex-direction: column; }
  /* Tablet and phone only (desktop is left as it was): the heading runs as
     four lines and the paragraph as five. The hero's own width is what both
     are sized against (cqw = 1% of it). --hero-h-fit is the largest the
     heading can be before its widest line ("What Matters.", about 6.8 times
     the font size) would stop fitting; the heading's coloured words each
     take a line of their own so the lines fall as Building / What's Next. /
     Growing / What Matters.; and the paragraph's narrow ~32-character column
     is what lands it on five lines at any font size. */
  .hero { container-type: inline-size; --hero-h-fit: 13.4cqw; --hero-p-fit: 4.9cqw; }
  .hero-headline { max-width: none; order: 1; font-size: min(92px, var(--hero-h-fit)); }
  .hero-headline > span { display: block; }
  /* The footer dissolves into the hero's own column so the order can be:
     headline, text, graphic, then the buttons underneath it. */
  .hero-footer { display: contents; }
  .hero-intro { order: 2; max-width: none; margin-top: 24px; font-size: 16px; }
  .hero-actions { order: 4; margin-top: 28px; }
  .hero-visual { position: static; order: 3; max-width: 420px; margin: 36px auto 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 64px; }
  .case-section, .now-row { grid-template-columns: 1fr; gap: 12px; }
  /* Single column. The carousel's main frame is explicitly placed in the
     middle column of its three-column desktop grid; with only one column
     left it landed in a zero-width implicit column and the screenshots
     vanished. Inset to the page gutters too, rather than edge to edge. */
  .case-carousel { grid-template-columns: 1fr; width: auto; margin-left: 0; margin-right: 0; margin-top: 32px; }
  .case-carousel-main { grid-column: 1; border-radius: 16px; }
  .case-carousel-peek { display: none; }
  /* A scroll box inside a scrolling page is awkward with a finger — let the
     role list just run its full length once the layout is single-column. */
  .resume-roles { max-height: none; overflow-y: visible; padding-right: 0; }
  /* The lightbox's 60%-of-screen cap suits a desktop; on a phone it would
     leave an image barely 200px wide, which defeats opening it. */
  .image-lightbox { padding: 12px; }
  .image-lightbox-img { max-width: 92vw; max-height: 80vh; }
  .image-lightbox-video { width: min(92vw, 142vh); }
  .image-lightbox.is-pan { overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; justify-content: flex-start; align-items: flex-start; }
  .image-lightbox.is-pan .image-lightbox-img { flex: none; max-width: none; max-height: none; margin: auto; }
  .case-carousel-arrow.prev { left: 8px; }
  .case-carousel-arrow.next { right: 8px; }
  /* No rule between the filters and the projects below them. */
  .filters { border-bottom: 0; }

  .home-newsletter-wrap { padding-top: 40px; }
  .testimonials-wrap, .pi-wrap { padding-top: 72px; }
  .pi-panel { padding: 36px 28px 30px; border-radius: 28px; }
  .pi-body { margin-top: 24px; }
  .pi-explore-panel { margin-top: 20px; }
  .pi-actions { margin-top: 22px; }
  .pi-intro { font-size: 16px; }
  .pi-top { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "side" "actions"; grid-template-rows: auto; }
  .pi-side { margin-top: 24px; padding: 22px 20px; }
  .pi-side-skel { min-height: 120px; }
  .pi-problems { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pi-problem-go { opacity: 1; }
  .pi-result-inner { padding: 28px 22px; gap: 28px; }
  .pi-two { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .pi-bars-2 { grid-template-columns: minmax(0, 1fr); }
  .pi-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pi-questions { padding: 24px 22px; }
  .wby-grid { margin-top: 28px; }
  .testimonials-grid { grid-template-columns: 1fr; gap: 20px; }
  .testimonial-card { padding: 32px 28px 26px; }
  .cta-slab-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .cta-slab .inner { max-width: none; padding-bottom: 0; }

  /* Project pages: the desktop type sizes (an 80px-scale title at a 1.7
     line height, 17px body text) are far too big on a phone. Sizes scale
     with the screen between a phone and a tablet and are never larger than
     on desktop; the title also gets a tight line height instead of the
     page's loose body one. */
  .case-header h1 { font-size: clamp(26px, 5.4vw, 40px); line-height: 1.12; margin-top: 20px; }
  .case-header .lede { font-size: clamp(15px, 2.4vw, 18px); margin-top: 14px; }
  .case-section h2 { font-size: clamp(17px, 2.6vw, 19px); line-height: 1.3; }
  .case-section .body { font-size: clamp(15px, 2.1vw, 16.5px); line-height: 1.65; }
  .case-meta-badge .v { font-size: 13px; }
  .case-cat-chip { font-size: 12px; }
  .flow-chip { font-size: 13px; padding: 9px 13px; }
  .tech-item .items { font-size: 14px; }

  /* Newsletter feed rows (dates and post titles): smaller type on tablet
     and phone, and slimmer rows. */
  /* Everything between the card and the title has to be allowed to shrink,
     or a no-wrap title stretches the whole page instead of being cut off. */
  .newsletter-widget-main, .newsletter-items { min-width: 0; }
  .newsletter-item { padding: 12px 0; min-width: 0; max-width: 100%; }
  .newsletter-item .date { font-size: 11px; }
  .newsletter-item .title {
    font-size: 14px;
    line-height: 1.4;
    /* One line only; a long title is cut off with an ellipsis. */
    min-width: 0;
    max-width: 100%;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .article-row { grid-template-columns: 1fr; gap: 6px; }
  .article-row .date { text-align: left; }
  .cta-slab { padding: 40px 28px; border-radius: 24px; }
  .page-intro { padding-top: 64px; }
  .resume-page { grid-template-columns: 1fr; padding-top: 64px; }
  .resume-profile { position: static; }
  .resume-exp { grid-template-columns: 1fr; }
  .resume-exp-nav { flex-direction: row; flex-wrap: wrap; }
  .resume-quests { grid-template-columns: 1fr; }

  .projects-panel { padding: 40px 28px; border-radius: 24px; }
  .projects-panel-head { flex-direction: column; align-items: flex-start; }
  .projects-panel-note { align-items: flex-start; text-align: left; }
  .projects-panel-grid { grid-template-columns: 1fr; }
  /* The "view all" link comes after the three project cards rather than
     under the heading: the header's wrapper steps out of the way so the
     heading, cards and link can be ordered as siblings. */
  .projects-panel { display: flex; flex-direction: column; }
  .projects-panel-head { display: contents; }
  .projects-panel-head h2 { order: 0; }
  .projects-panel-grid { order: 1; margin-top: 28px; }
  .projects-panel-note { order: 2; margin-top: 28px; }

  /* "Currently" band: no rule or extra space above the first row of stats
     (06+ and whatever sits beside it); the rules between rows stay. The
     columns are auto-fit, so how many are in the first row depends on the
     width: 1 below 584px, 2 up to 843px, 3 from there. */
  .currently-item:first-child { border-top: 0; padding-top: 0; }

  .about-panel-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-panel-media { position: static; }
  .about-panel-facts { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

@media (min-width: 584px) and (max-width: 900px) {
  .currently-item:nth-child(-n+2) { border-top: 0; padding-top: 0; }
}
@media (min-width: 844px) and (max-width: 900px) {
  .currently-item:nth-child(-n+3) { border-top: 0; padding-top: 0; }
}

@media (max-width: 720px) {
  nav.site-nav { gap: 14px; }
  .nav-links { display: none; gap: 16px; }
  .btn-subscribe { display: none; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  /* The header stays sticky while the menu is open (it used to flip to
     position: relative, which sent it back to the top of the page whenever
     the menu was opened from further down). A sticky header is already a
     positioning context for the menu panel beneath it. */
  header.site-header.is-menu-open nav.site-nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--hairline);
  }
  header.site-header.is-menu-open .nav-links,
  header.site-header.is-menu-open .btn-subscribe {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  /* With the links hidden the (empty) nav still took a slot in the header's
     space-between row and pushed MENU to the middle; push it to the edge. */
  .nav-toggle { margin-left: auto; min-height: 44px; padding: 0 2px; }
  /* Closed, the nav holds nothing visible but still took a flex slot (plus
     the header's gap), leaving MENU 24px short of the right margin. */
  header.site-header:not(.is-menu-open) nav.site-nav { display: none; }
  /* Finger-sized rows in the open menu (the desktop links are ~28px tall). */
  header.site-header.is-menu-open nav.site-nav { gap: 8px; }
  header.site-header.is-menu-open .nav-links { gap: 0; width: 100%; }
  header.site-header.is-menu-open .nav-link { padding: 13px 0; width: 100%; text-align: left; }
  header.site-header.is-menu-open .nav-link.is-active { border-bottom-color: transparent; color: var(--coral); }
  header.site-header.is-menu-open .btn-subscribe { margin: 8px 0 0; padding: 13px 22px; }
}

/* Tablet-sized screens that use the MENU button (481-720px): the open menu
   is a panel on the right half of the screen rather than a full-width
   sheet, so the page stays visible beside it. Phones keep the full width. */
@media (min-width: 481px) and (max-width: 720px) {
  header.site-header.is-menu-open nav.site-nav {
    left: auto;
    right: 0;
    width: 50%;
    border-left: 1px solid var(--hairline);
    border-bottom-left-radius: 18px;
    box-shadow: -14px 18px 40px -24px rgba(13, 59, 62, 0.35);
  }
}

/* Phones: keep the content column on the same 24px gutters as everything
   else rather than the extra inset the desktop widgets use, calm the
   decorative circles so they stop running behind the call-to-action text,
   and let a pasted newsletter form use its natural size. */
@media (max-width: 700px) {
  .newsletter-widgets, .media-grid-wrap { max-width: 100%; }
  /* The form is Beehiiv's own iframe (input and Subscribe button side by
     side), so the only lever is how much room it gets: let it run a little
     past the page gutters so the email field has space for its placeholder,
     and drop the desktop zoom. */
  .newsletter-embed-wrap { padding-top: 56px; }
  .newsletter-embed-head { margin-bottom: 24px; }
  .newsletter-embed-head h2 { font-size: clamp(24px, 7vw, 30px); line-height: 1.2; text-wrap: balance; }
  .newsletter-embed-frame { zoom: 1; max-width: none; width: calc(100% + 24px); margin-left: -12px; margin-right: -12px; }

  /* Filters: one row you swipe sideways, running to the screen edge so it's
     obvious there's more, instead of five wrapped rows. */
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
    margin: 32px -24px 0;
    padding: 0 24px 28px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  }
  .filters::-webkit-scrollbar { display: none; }
  .filters::after { content: ""; flex: none; width: 24px; }
  .filter-btn { flex: none; white-space: nowrap; padding: 11px 18px; }

  /* Newsletter cards: a full-width square logo pushed the actual posts a
     whole screen down. Keep it small beside the name, description below. */
  .newsletter-widget { padding: 22px; gap: 20px; grid-template-columns: minmax(0, 1fr); }
  /* On a phone the date column took a third of the row and squeezed each
     title into 2-3 lines; put the date above the title instead so the title
     has the full width. */
  .newsletter-item { flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 0; }
  .newsletter-widget-side {
    display: grid;
    grid-template-columns: 88px 1fr;
    grid-template-rows: 44px 44px auto;
    column-gap: 16px;
    row-gap: 4px;
  }
  .newsletter-cover { grid-column: 1; grid-row: 1 / span 2; width: 88px; margin-bottom: 0; border-radius: 12px; align-self: center; }
  .newsletter-name { grid-column: 2; grid-row: 1; align-self: end; }
  .newsletter-publisher { grid-column: 2; grid-row: 2; align-self: start; }
  .newsletter-desc { grid-column: 1 / -1; grid-row: 3; margin-top: 8px; }
  .cta-slab { padding: 64px 24px 44px; }
  .newsletter-widget.home-newsletter, .newsletter-widget.home-newsletter:has(.has-embed) { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 22px; border-radius: 28px; min-height: 0; }
  /* The name can wrap to two lines here, so the fixed 44px rows used for the
     Content page's cards would clip it. */
  .home-newsletter .newsletter-widget-side { grid-template-rows: auto auto auto auto; align-content: start; }
  .home-newsletter .newsletter-name { grid-row: 1 / span 2; align-self: center; font-size: 18px; line-height: 1.25; }
  .home-newsletter .newsletter-cover { align-self: center; }
  .home-newsletter-btn { grid-column: 1 / -1; grid-row: 4; justify-self: start; margin-top: 14px; }
  .home-newsletter .newsletter-widget-side.has-embed { grid-template-rows: auto auto auto auto auto; }
  .home-newsletter-embed { grid-column: 1 / -1; grid-row: 4; margin-top: 14px; }
  .has-embed .home-newsletter-btn { grid-row: 5; }
  .newsletter-item.has-desc { grid-template-columns: minmax(0, 1fr); }
  .newsletter-item.has-desc .date, .newsletter-item.has-desc .title, .newsletter-item.has-desc .desc { grid-column: 1; }
  .newsletter-item.has-desc .date { grid-row: 1; }
  .newsletter-item.has-desc .title { grid-row: 2; }
  .newsletter-item.has-desc .desc { grid-row: 3; }
  .home-newsletter-cta { padding-top: 22px; }
  .wby-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .wby-card { padding: 24px 22px 20px; }
  .testimonial-card { padding: 28px 22px 22px; gap: 20px; }
  .testimonial-card blockquote { font-size: 16px; line-height: 1.65; }
  .pi-panel { padding: 26px 16px 18px; }
  .pi-problems { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pi-problem { min-height: 0; padding: 18px 18px 14px; gap: 14px; }
  .pi-problem-label { font-size: 17px; }
  .pi-cases { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  /* Label above its bar so no name gets cut short. */
  .pi-bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label n" "track track"; gap: 5px 10px; font-size: 14px; }
  .pi-bar-label { grid-area: label; white-space: normal; }
  .pi-bar-track { grid-area: track; }
  .pi-bar-n { grid-area: n; }
  .pi-bars, .pi-bars-2 { row-gap: 14px; }
  .pi-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pi-select select { width: 100%; font-size: 13px; padding: 11px 26px 11px 12px; background-position: right 10px center; text-overflow: ellipsis; }
  .pi-clear { grid-column: 1 / -1; justify-self: start; }
  .pi-summary-n { font-size: 36px; }
  .pi-actions { flex-direction: column; align-items: stretch; }
  .pi-toggle { justify-content: space-between; }
  .pi-slider .pi-case { flex-basis: min(300px, 80vw); }
  .pi-arrow { width: 38px; height: 38px; margin-top: -19px; font-size: 22px; }
  .pi-arrow.is-prev { left: -8px; }
  .pi-arrow.is-next { right: -8px; }
  .pi-close { top: 14px; right: 16px; }
  .pi-explore-panel { padding-top: 48px; }
  .pi-evidence-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pi-result-inner { padding: 22px 14px; }
  .cta-slab .circle-a { width: 150px; height: 150px; left: auto; right: -50px; top: -70px; bottom: auto; }
  .cta-slab .circle-b { width: 130px; height: 130px; left: auto; right: 70px; top: -90px; bottom: auto; }
  .cta-slab .actions { margin-top: 28px; }
}

/* -----------------------------------------------------------
   Admin editor (desktop only — see js/admin.js)
   ----------------------------------------------------------- */

.admin-editable {
  outline: 1.5px dashed transparent;
  outline-offset: 3px;
  border-radius: 4px;
  transition: outline-color .15s ease, background-color .15s ease;
  cursor: text;
}
.admin-edit-mode .admin-editable:hover { outline-color: rgba(255, 107, 91, 0.45); }
.admin-edit-mode .admin-editable:focus {
  outline-color: var(--coral);
  outline-style: solid;
  background: rgba(255, 209, 102, 0.16);
}

.admin-list-item { position: relative; }
/* A carousel slide needs to stay absolutely positioned (stacked on top of
   its siblings) even once admin.js also marks it as a list item — the two
   classes have equal specificity, so without this the later admin-list-item
   rule above would win and collapse the carousel's layout while editing. */
.case-carousel-slide.admin-list-item { position: absolute; }

/* decorateLists() appends the generic "+ Add" button as a plain, normally-
   positioned child of the images list container — everywhere else that's
   fine, but here every slide is absolutely positioned and fills the whole
   box, so a statically-positioned sibling paints *underneath* all of them
   regardless of DOM order, making the button both invisible and
   unclickable (this is what actually blocked adding more than one image,
   not a missing feature). Pull it out to a fixed, visible spot above
   every slide instead. */
.case-carousel-main [data-edit-images] > .admin-add-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 6;
  background: var(--cream);
  box-shadow: 0 6px 18px -6px rgba(13, 59, 62, 0.4);
}

.admin-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--cream);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s ease, background .15s ease;
}
.admin-list-item:hover .admin-remove-btn { opacity: 1; }
.admin-remove-btn:hover { background: var(--coral); }

.admin-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1.5px dashed var(--hairline-strong);
  color: var(--gray);
  font-weight: 600;
  font-size: 14px;
  min-height: 48px;
}
.admin-add-btn:hover { border-color: var(--coral); color: var(--coral); }

.admin-drop-target { outline: 2px dashed var(--coral) !important; outline-offset: 3px; }

[draggable="true"].admin-list-item { cursor: grab; }

.admin-editable-image { position: relative; }
.admin-edit-mode .admin-editable-image { cursor: pointer; }
.admin-edit-mode .admin-editable-image:hover::after {
  content: "Click to change image";
  position: absolute;
  inset: 0;
  background: rgba(13, 59, 62, 0.55);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  padding: 12px;
  border-radius: inherit;
}

.admin-edit-mode [data-video-slide].admin-editable-image:hover::after { content: "Select to set the video link in the side panel"; }
.admin-edit-mode .admin-editable-image-draggable { cursor: grab; }
.admin-edit-mode .admin-editable-image-draggable:active { cursor: grabbing; }
.admin-edit-mode .admin-editable-image-draggable:hover::after { content: "Drag to reposition · click to change image"; }

.admin-list-item-handled { padding-top: 30px; }
.admin-drag-handle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  background: rgba(13, 59, 62, 0.06);
  border-radius: 8px 8px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gray);
  cursor: grab;
  z-index: 4;
}
.admin-drag-handle:hover { background: rgba(255, 107, 91, 0.12); color: var(--coral); }
.admin-list-item.admin-dragging { opacity: .4; }

.admin-btn:disabled { opacity: .35; cursor: default; }
.admin-btn:disabled:hover { background: rgba(255, 248, 240, 0.12); }

:root {
  --admin-sidepanel-w: 320px;
  --admin-sidepanel-w-collapsed: 56px;
}

.admin-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 248, 240, 0.12);
  color: var(--cream);
  font-weight: 600;
  font-size: 13px;
  transition: background .15s ease;
  white-space: nowrap;
}
.admin-btn:hover { background: rgba(255, 248, 240, 0.22); }
.admin-btn-primary { background: var(--coral); }
.admin-btn-primary:hover { background: var(--butter); color: var(--teal); }
.admin-btn-ghost { opacity: .75; }
.admin-btn-danger { background: rgba(255, 107, 91, 0.85); }
.admin-btn-danger:hover { background: var(--coral); }

/* Body/site layout shift so the fixed sidepanel never covers content. */
body.admin-has-chrome #site { margin-right: var(--admin-sidepanel-w); transition: margin-right .15s ease; }
body.admin-has-chrome.admin-panel-collapsed #site { margin-right: var(--admin-sidepanel-w-collapsed); }

.admin-topbar-brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  padding: 0 4px;
}

.admin-topbar-status {
  font-size: 12px;
  color: var(--cream);
  opacity: .8;
  min-width: 60px;
  text-align: right;
}

/* ---- Side panel ---- */
.admin-sidepanel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--admin-sidepanel-w);
  z-index: 390;
  background: var(--card);
  border-left: 1px solid var(--hairline-strong);
  box-shadow: -8px 0 24px -16px rgba(13, 59, 62, 0.4);
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'Inter', sans-serif;
  transition: width .15s ease;
}
body.admin-panel-collapsed .admin-sidepanel { width: var(--admin-sidepanel-w-collapsed); }
body.admin-panel-collapsed .admin-sidepanel .admin-panel-actions-row,
body.admin-panel-collapsed .admin-sidepanel .admin-page-select,
body.admin-panel-collapsed .admin-sidepanel .admin-topbar-brand,
body.admin-panel-collapsed .admin-sidepanel .admin-panel-body {
  display: none;
}

.admin-panel-header {
  position: sticky;
  top: 0;
  padding: 14px 20px;
  font-family: 'Sora', sans-serif;
  background: var(--teal);
  color: var(--cream);
  border-bottom: 1px solid var(--hairline-strong);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.admin-panel-collapsed .admin-panel-header { padding: 14px 10px; align-items: center; }

.admin-panel-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-collapse-btn {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(255, 248, 240, 0.12);
  color: var(--cream);
  font-size: 13px;
}
.admin-collapse-btn:hover { background: rgba(255, 248, 240, 0.22); }

.admin-panel-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-page-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 248, 240, 0.3);
  background: rgba(255, 248, 240, 0.1);
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
}
.admin-page-select option { color: var(--teal); }

.admin-panel-body {
  padding: 6px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-panel-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-panel-section:last-child { border-bottom: none; }
details.admin-panel-section > summary { cursor: pointer; }
details.admin-panel-section > summary::-webkit-details-marker { display: none; }

.admin-panel-hint { font-size: 12px; line-height: 1.5; color: var(--gray); margin: 0 0 12px; }
.admin-guestbook-list { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.admin-guestbook-item { padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--card); }
.admin-guestbook-meta { font-size: 11px; color: var(--gray); margin-bottom: 4px; }
.admin-guestbook-text { line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.admin-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
}

.admin-panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--teal);
}
.admin-panel-row input[type="text"],
.admin-panel-row input[type="number"],
.admin-panel-row select {
  width: 130px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  background: var(--cream);
  font-size: 13px;
  color: var(--teal);
}
.admin-panel-row input[type="color"] {
  width: 36px;
  height: 30px;
  border: none;
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  background: none;
}
.admin-panel-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--coral);
  cursor: pointer;
}
.admin-panel-row-stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.admin-panel-row-stacked input { width: 100%; }

.admin-embed-textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  background: var(--cream);
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

.admin-stepper { display: flex; align-items: center; gap: 4px; }
.admin-stepper input[type="number"] { width: 64px; text-align: center; }
.admin-stepper-btn {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  background: var(--cream);
  color: var(--teal);
  font-size: 14px;
  line-height: 1;
}
.admin-stepper-btn:hover { border-color: var(--coral); color: var(--coral); }

.admin-align-group { display: flex; gap: 4px; }
.admin-align-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  background: var(--cream);
  color: var(--teal);
  font-size: 13px;
}
.admin-align-btn:hover { border-color: var(--coral); }
.admin-align-btn.is-active { background: var(--coral); border-color: var(--coral); color: var(--cream); }

.admin-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-panel-actions .admin-btn {
  color: var(--teal);
  background: var(--cream);
  border: 1px solid var(--hairline-strong);
}
.admin-panel-actions .admin-btn:hover { border-color: var(--coral); }
.admin-panel-actions .admin-btn-danger {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--cream);
}
.admin-panel-actions .admin-btn-danger:hover { background: #e5493a; }

.admin-color-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.admin-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  text-transform: capitalize;
}
.admin-color-row input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
}
/* Browsers draw the swatch as an inset rectangle by default — clipping the
   outer input to a circle alone leaves its corners showing through, so the
   swatch itself (and its wrapper) need the same radius applied directly. */
.admin-color-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; border-radius: 50%; }
.admin-color-row input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }
.admin-color-row input[type="color"]::-moz-color-swatch { border: none; border-radius: 50%; }

.admin-favicon-row { display: flex; align-items: center; gap: 12px; }
.admin-favicon-preview {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid var(--hairline-strong);
}
.admin-favicon-preview.placeholder-img { aspect-ratio: auto; padding: 0; }

@media (max-width: 899px) {
  .admin-sidepanel { display: none !important; }
  body.admin-has-chrome #site { margin-right: 0; }
}

/* -----------------------------------------------------------
   Subscribe popups (js/popups.js)
   ----------------------------------------------------------- */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: color-mix(in srgb, var(--teal) 52%, transparent);
  opacity: 0;
  transition: opacity .22s ease;
}
.popup-overlay.is-in { opacity: 1; }
.popup-card {
  position: relative;
  width: min(100%, 460px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 36px 32px 30px;
  border-radius: 24px;
  background: var(--cream);
  color: var(--teal);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45);
  transform: translateY(14px) scale(.98);
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  outline: none;
}
.popup-overlay.is-in .popup-card { transform: none; }
.popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: .6;
}
.popup-close:hover, .popup-close:focus-visible { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
.popup-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 28px 10px 0;
}
.popup-text { margin: 0 0 20px; font-size: 15px; line-height: 1.6; opacity: .8; }
.popup-embed { width: 100%; }
.popup-embed iframe { max-width: 100%; display: block; }
@media (max-width: 700px) {
  .popup-overlay { align-items: flex-end; padding: 12px; }
  .popup-card { padding: 30px 22px 24px; border-radius: 22px; max-height: calc(100vh - 24px); }
  .popup-title { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .popup-overlay, .popup-card { transition: none; }
}

.admin-popup-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--teal) 3%, transparent);
}
.admin-popup-card select, .admin-popup-card input[type="number"], .admin-popup-card input[type="text"] { min-width: 0; }
