/* ============================================================================
 * StudyBits — homepage (Dia-style design system)
 *
 * A self-contained stylesheet for `/` only. Everything is scoped under `.dh`
 * so the rest of the marketing site (public/site/styles.css + home.css +
 * pages.css) is untouched.
 *
 * Design language ported from diabrowser.com:
 *   · off-white #F8F8F8 canvas, near-black ink at 85/60/45/20% alpha
 *   · floating white pill header, 52px tall, 16px radius
 *   · full-bleed near-black hero with an oversized display-serif wordmark
 *   · 12-column 1440 grid, 20px gutters, 12/16/20/24px radii
 *   · fill-tertiary cards (4% black) with 6% hairline borders
 *   · uppercase mono micro-labels, saturated accent gradients
 *
 * Typography stays StudyBits': Fraunces (display), Inter (UI/body),
 * JetBrains Mono (labels), Varela Round (wordmark).
 * ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600;9..144,700&family=JetBrains+Mono:wght@400;500&family=Varela+Round&display=swap');

.dh {
  /* palette ------------------------------------------------------------- */
  /* the page surface — `--true-white` stays a separate token for raised
     chrome (nav pill, mega panels) even though they now match */
  --white: #ffffff;
  --true-white: #fff;
  --ink: #000;
  --primary: rgba(0, 0, 0, 0.85);
  --secondary: rgba(0, 0, 0, 0.6);
  --tertiary: rgba(0, 0, 0, 0.45);
  --quaternary: rgba(0, 0, 0, 0.2);
  --fill-primary: rgba(0, 0, 0, 0.9);
  --fill-secondary: rgba(0, 0, 0, 0.08);
  --fill-tertiary: rgba(0, 0, 0, 0.04);
  --stroke-light: rgba(0, 0, 0, 0.06);
  --stroke-medium: rgba(0, 0, 0, 0.12);

  --red: #fa3d1d;
  --blue: #0358f7;
  --pink: #fd02f5;
  --yellow: #ffb005;
  --brown: #340b05;
  --grey: #d9d9d9;

  --creamsicle: linear-gradient(180deg, #fff1ac 60%, #ff6f3c);
  --grapefruit: linear-gradient(180deg, #ffada0 60%, #96d0ff);
  --cotton-candy: linear-gradient(180deg, #96d0ff 60%, #ffc1fd);
  --sunshine: linear-gradient(180deg, #5092c7 60%, #ffb005);
  --twilight: linear-gradient(180deg, #c679c4 60%, #ffada0);
  --midnight: linear-gradient(180deg, #340b05 60%, #5092c7);
  --chroma: linear-gradient(
    90deg,
    #fd02f5 -10%,
    #fa3d1d 7%,
    #ffb005 35%,
    #e1e1fe 67%,
    #0358f7 96%,
    #340b05 149%
  );

  /* type ---------------------------------------------------------------- */
  --sans: 'Inter', system-ui, -apple-system, Helvetica, sans-serif;
  --display: 'Fraunces', 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --brandf: 'Varela Round', var(--sans);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  background: var(--white);
  color: var(--primary);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.dh-body {
  background: #ffffff;
  /* globals.css sets `body { overflow-x: hidden }`, which turns <body> into a
     scroll container and silently breaks every position:sticky inside it (the
     sticky story nav would just scroll away). `html` already carries
     overflow-x:hidden, and that one propagates to the viewport, so releasing
     body here costs no horizontal clipping — and `.dh` uses overflow-x:clip,
     which contains overflow without creating a scroll container. */
  overflow-x: visible;
  overflow-y: visible;
}

.dh *,
.dh *::before,
.dh *::after {
  box-sizing: border-box;
}
/* Truly zero-specificity reset: `:where()` wraps the scope too, so this scores
   (0,0,0) and ANY class rule outranks it — including the legacy sheets'. With
   `.dh` left unwrapped this tied with single-class rules and won on load order,
   which silently killed things like `.quote-card { margin: 0 auto }`. */
:where(.dh) :where(p, h1, h2, h3, h4, figure, blockquote, ul) {
  margin: 0;
  padding: 0;
}
:where(.dh) :where(ul) {
  list-style: none;
}
/* :where() keeps this at zero specificity so component rules always win */
.dh :where(a) {
  color: inherit;
  text-decoration: none;
}
.dh button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}
.dh img,
.dh svg {
  display: block;
  max-width: 100%;
}
.dh-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- grid ---------------------------------------------------------------- */
.dh-grid {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 20px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 20px;
}
.dh-inner {
  grid-column: 1 / -1;
}
@media (min-width: 900px) {
  .dh-inner {
    grid-column: 2 / span 10;
  }
}

/* ---- type scale ---------------------------------------------------------- */
.dh-display {
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.05em;
  line-height: 1.06;
  color: var(--primary);
  font-size: clamp(34px, 5.2vw, 56px);
  text-wrap: balance;
}
.dh-h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(21px, 2.2vw, 26px);
  line-height: 1.22;
  letter-spacing: -0.04em;
}
.dh-body {
  font-size: 16px;
  line-height: 24px;
  color: var(--primary);
}
.dh-body-lg {
  font-size: 18px;
  line-height: 30px;
  color: var(--secondary);
}
.dh-muted {
  color: var(--secondary);
}
.dh-label {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tertiary);
}
.dh-chroma {
  display: inline-block;
  background: var(--chroma);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
  margin-right: -0.06em;
}

/* ---- buttons ------------------------------------------------------------- */
/* `.dh a { color: inherit }` is (0,1,1); button colours need to out-rank it. */
.dh .dh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding-inline: 28px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  font-size: 18px;
  transition:
    transform 0.2s var(--ease),
    opacity 0.2s var(--ease),
    background 0.2s var(--ease);
}
.dh .dh-btn:hover {
  background: rgba(0, 0, 0, 0.82);
  transform: translateY(-1px);
}
.dh .dh-btn--light {
  background: var(--true-white);
  color: #000;
}
.dh .dh-btn--light:hover {
  background: #fff;
  opacity: 0.92;
}
.dh .dh-btn--ghost {
  height: 44px;
  padding-inline: 24px;
  border-radius: 20px;
  background: var(--fill-secondary);
  color: var(--primary);
  font-size: 16px;
  font-weight: 400;
}
.dh .dh-btn--ghost:hover {
  background: rgba(0, 0, 0, 0.12);
  transform: none;
}
.dh-btn--ghost .dh-arr {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}
.dh-btn--ghost:hover .dh-arr {
  transform: translateX(6px);
}

/* ==========================================================================
 * HEADER — floating white pill
 * ========================================================================== */
.dh-header {
  position: fixed;
  top: 14px;
  left: 10px;
  right: 10px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (min-width: 900px) {
  .dh-header {
    top: 28px;
  }
}
.dh-nav {
  position: relative;
  display: none;
  width: 100%;
  align-items: center;
  justify-content: center;
}
@media (min-width: 900px) {
  .dh-nav {
    display: flex;
  }
}
.dh-navpill {
  display: flex;
  align-items: center;
  height: 52px;
  gap: 18px;
  padding: 0 24px 0 8px;
  border-radius: 16px;
  background: var(--true-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
}
.dh-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  height: 40px;
  font-family: var(--brandf);
  font-size: 17px;
  color: #000;
  transition: opacity 0.2s var(--ease);
}
.dh-mark:hover {
  opacity: 0.7;
}
.dh-navlinks {
  display: flex;
  align-items: center;
  gap: 18px;
}
.dh-navlinks a,
.dh-navbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  color: var(--primary);
  transition: opacity 0.2s var(--ease);
}
.dh-navlinks a:hover,
.dh-navbtn:hover {
  opacity: 0.55;
}
.dh-chev {
  margin-top: 1px;
  opacity: 0.4;
  transition: transform 0.25s var(--ease);
}
/* Docs sits last, set off from the in-site links by a rule + an outbound arrow */
.dh-navdocs {
  margin-left: 4px;
  padding-left: 18px;
  border-left: 1px solid var(--stroke-light);
  gap: 6px !important;
}
.dh-navdocs svg {
  opacity: 0.45;
  transition: transform 0.25s var(--ease);
}
.dh-navdocs:hover svg {
  transform: translate(2px, -2px);
}
.dh-navbtn.on {
  opacity: 0.55;
}
.dh-navbtn.on .dh-chev {
  transform: rotate(180deg);
}

/* ---- mega dropdowns ------------------------------------------------------ */
.dh-megawrap {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 10px;
  display: grid;
  justify-items: center;
}
.dh-mega {
  grid-area: 1 / 1;
  display: grid;
  gap: 26px;
  padding: 22px;
  border-radius: 20px;
  background: var(--true-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.04),
    0 24px 64px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(12px);
  /* open/close is owned by motion.dev (AnimatePresence) — no CSS visibility
     toggle here, or the panel would stay hidden while motion fades it in */
  transform-origin: top center;
  text-align: left;
}
.dh-mega--platform {
  width: min(1080px, calc(100vw - 40px));
  grid-template-columns: 0.95fr 1fr 1fr 1.05fr;
}
.dh-mega--usecases {
  width: min(720px, calc(100vw - 40px));
  grid-template-columns: 1fr;
}
.dh-mega--resources {
  width: min(880px, calc(100vw - 40px));
  grid-template-columns: 1.35fr 1fr;
}
.dh-mcol {
  min-width: 0;
}
.dh-m2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
}
.dh-mh {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tertiary);
  padding: 0 10px 8px;
}
.dh-mitem {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 12px;
  transition: background 0.18s var(--ease);
}
.dh-mitem:hover {
  background: var(--fill-tertiary);
}
.dh-mico {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--fill-tertiary);
  border: 1px solid var(--stroke-light);
  color: var(--primary);
}
.dh-mitem:hover .dh-mico {
  background: #fff;
}
.dh-mcopy {
  min-width: 0;
}
.dh-mt {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--primary);
}
.dh-md {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 17px;
  color: var(--tertiary);
}
.dh-mlink {
  display: inline-block;
  margin-top: 10px;
  padding: 0 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--primary);
  transition: opacity 0.2s var(--ease);
}
.dh-mlink:hover {
  opacity: 0.6;
}

/* feature tiles */
.dh-mfeature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  border-radius: 14px;
  background: var(--fill-tertiary);
  border: 1px solid var(--stroke-light);
  transition: background 0.2s var(--ease);
}
.dh-mfeature:hover {
  background: rgba(0, 0, 0, 0.06);
}
.dh-mfeature-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--stroke-light);
  margin-bottom: 14px;
}
.dh-mfeature .dh-mt {
  font-size: 15.5px;
  font-weight: 600;
}
.dh-mfeature .dh-mlink {
  padding: 0;
  margin-top: auto;
  padding-top: 14px;
}
.dh-mfeature--wide .dh-mh {
  padding: 0 0 10px;
}
.dh-mfeature-t {
  font-family: var(--display);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--primary);
  margin-bottom: 8px;
}

/* what's new rail */
.dh-mnew {
  padding-left: 22px;
  border-left: 1px solid var(--stroke-light);
}
.dh-mnew-item {
  display: block;
  padding: 8px 10px;
  border-radius: 12px;
  transition: background 0.18s var(--ease);
}
.dh-mnew-item:hover {
  background: var(--fill-tertiary);
}
.dh-mnew-t {
  display: block;
  font-size: 13.5px;
  line-height: 19px;
  color: var(--primary);
}
.dh-mnew-m {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tertiary);
}
.dh-navcta {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding-inline: 22px;
  border-radius: 16px;
  background: var(--true-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s var(--ease);
}
.dh-navcta:hover {
  background: #f1f1f1;
}

/* mobile: the pill expands into a full sheet */
.dh-navm {
  position: relative;
  width: 100%;
  border-radius: 30px;
  background: var(--true-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  padding: 0 20px;
  height: 52px;
  overflow: hidden;
  transition: height 0.42s var(--ease);
}
@media (min-width: 900px) {
  .dh-navm {
    display: none;
  }
}
.dh-navm.open {
  height: min(560px, calc(100svh - 40px));
}
.dh-navm-top {
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dh-navm-sheet {
  padding-top: 72px;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.dh-navm.open .dh-navm-sheet {
  opacity: 1;
  pointer-events: auto;
}
.dh-navm-nav {
  /* take the space left over by the footer and scroll inside it, so a long
     expanded group never slides underneath the Log in / Book a demo buttons */
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 -4px;
  padding: 0 4px;
}
.dh-navm-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  font-size: 22px;
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--primary);
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}
.dh-navm-link::-webkit-details-marker {
  display: none;
}
.dh-navm-link svg {
  opacity: 0.35;
  transition: transform 0.25s var(--ease);
}
.dh-navm-group {
  border-bottom: 1px solid var(--stroke-light);
}
.dh-navm-group[open] > .dh-navm-link svg {
  transform: rotate(180deg);
}
.dh-navm-sub {
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;
}
.dh-navm-sub a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  font-size: 15.5px;
  color: var(--secondary);
}
.dh-navm-sub .dh-mico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.dh-navm-foot {
  flex: none;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dh-navm-foot .dh-btn {
  width: 100%;
  height: 50px;
  border-radius: 20px;
  font-size: 16px;
}

/* ==========================================================================
 * HERO — flat near-black, copy and live demo side by side
 * ========================================================================== */
.dh-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  overflow: hidden;
  /* deliberately flat: no gradient, no colour wash */
  background: #020204;
  color: #fff;
  padding: 116px 0 64px;
}
@media (min-width: 1000px) {
  .dh-hero {
    padding: 140px 0 72px;
  }
}
/* the only texture is a fine noise — keeps the flat black from banding */
.dh-hero-grain {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.35'/></svg>");
}

.dh-hero-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}
@media (min-width: 1000px) {
  .dh-hero-wrap {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    gap: 56px;
  }
}
@media (min-width: 1280px) {
  .dh-hero-wrap {
    gap: 72px;
  }
}

.dh-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
}
.dh-announce {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  margin-bottom: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
  transition: background 0.2s var(--ease);
}
.dh-announce:hover {
  background: rgba(255, 255, 255, 0.1);
}
.dh-announce-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dh-announce svg {
  transition: transform 0.25s var(--ease);
}
.dh-announce:hover svg {
  transform: translateX(4px);
}

/* sized for the ~500px copy column, not full-bleed: at 68px it wrapped to five
   lines and swamped the demo beside it */
.dh-hero-h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 3.9vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.042em;
  color: #fff;
  text-wrap: balance;
}
.dh-hero-h1 em {
  font-style: italic;
  font-weight: 300;
}
.dh-hero-sub {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 17px;
  line-height: 27px;
  color: rgba(255, 255, 255, 0.66);
}
@media (min-width: 1000px) {
  .dh-hero-sub {
    font-size: 18px;
    line-height: 29px;
  }
}
.dh-hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* connector row */
.dh-hero-conn {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.dh-hero-conn > span.dh-hero-note {
  margin-right: 4px;
}
.dh-hero-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}
.dh-cpill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}
.dh-cpill .bm {
  width: 14px;
  height: 14px;
  flex: none;
}
.dh-cpill.more {
  color: rgba(255, 255, 255, 0.5);
}

/* ---- watch pill ---------------------------------------------------------- */
.dh-watch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  padding: 0 22px 0 10px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  transition: background 0.2s var(--ease);
}
.dh-watch:hover {
  background: rgba(255, 255, 255, 0.13);
}
.dh-watch span.dh-play {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.2s var(--ease);
}
.dh-watch:hover span.dh-play {
  background: rgba(255, 255, 255, 0.34);
}

/* ==========================================================================
 * HERO DEMO — browser chrome + composer + the four-stage build
 * ========================================================================== */
.dh-hero-demo {
  position: relative;
  z-index: 4;
  min-width: 0;
}
.dh-mock {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(14, 14, 18, 0.78);
  backdrop-filter: blur(18px);
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.06) inset,
    0 40px 120px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.dh-mock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding-inline: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.dh-mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}
.dh-mock-url {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
}
.dh-mock-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* composer */
.dh-composer {
  flex: none;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 14px 16px;
  overflow: hidden;
}
.dh-composer-text {
  min-height: 42px;
  font-size: 14.5px;
  line-height: 21px;
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
}
.dh-composer-text .dh-dim {
  color: rgba(255, 255, 255, 0.32);
}
.dh-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.16em;
  background: var(--yellow);
  animation: dh-blink 1s steps(2, start) infinite;
}
@keyframes dh-blink {
  50% {
    opacity: 0;
  }
}
.dh-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.dh-composer-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.dh-send {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  color: #000;
}

/* the stage reserves the tallest phase's height so nothing jumps mid-loop */
.dh-stage {
  position: relative;
  min-height: 296px;
}
@media (min-width: 1000px) {
  .dh-stage {
    min-height: 320px;
  }
}
.dh-stage > * {
  width: 100%;
}

/* --- shared demo card --- */
.dh-dcard {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  padding: 15px;
}
.dh-dhead {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}
.dh-dorb {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
  background: rgba(255, 176, 5, 0.16);
  color: var(--yellow);
}
.dh-dhead > span {
  min-width: 0;
}
.dh-dtitle {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}
.dh-dsub {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 2px;
}
.dh-dstatus {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}
.dh-dstatus.done {
  color: #7ee2a8;
}
.dh-pulse {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--yellow);
  animation: dh-blink 1.1s ease-in-out infinite;
}

/* --- stage: idle suggestions --- */
.dh-sug-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  margin-bottom: 10px;
}
.dh-sug {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}
.dh-sug svg {
  flex: none;
  color: rgba(255, 255, 255, 0.45);
}
.dh-sug-arrow {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.28);
}

/* --- stage: grounding --- */
.dh-srcs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dh-src {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(126, 226, 168, 0.28);
  background: rgba(126, 226, 168, 0.1);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
}
.dh-src svg {
  color: #7ee2a8;
  flex: none;
}
.dh-scan {
  margin-top: 14px;
  display: grid;
  gap: 7px;
}
.dh-scanline {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}
.dh-scanline::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 38%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.22),
    transparent
  );
  animation: dh-sweep 1.4s linear infinite;
}
@keyframes dh-sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(360%);
  }
}

/* --- stage: outline --- */
.dh-mod {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  margin-bottom: 7px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.84);
}
.dh-mod i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.34);
  flex: none;
}
.dh-mbar {
  margin-left: auto;
  width: 78px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  flex: none;
}
.dh-mbar > b {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb005, #fa3d1d);
}

/* --- stage: the presentation editor --- */
.dh-ed {
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 296px;
}
@media (min-width: 1000px) {
  .dh-ed {
    min-height: 320px;
  }
}
.dh-ed-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding-inline: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.dh-ed-file {
  color: rgba(255, 255, 255, 0.4);
  display: inline-flex;
}
.dh-ed-title {
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}
.dh-ed-bar-r {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
}
.dh-ed-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.66);
}
.dh-ed-pill.ai {
  border-color: rgba(255, 176, 5, 0.3);
  background: rgba(255, 176, 5, 0.12);
  color: var(--yellow);
}
.dh-ed-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  background: #fff;
  color: #000;
  font-size: 11.5px;
  font-weight: 500;
}
.dh-ed-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 40px;
}
@media (min-width: 1100px) {
  .dh-ed-body {
    grid-template-columns: 122px minmax(0, 1fr) 44px;
  }
}
.dh-ed-rail {
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  padding: 11px 9px;
  overflow: hidden;
}
.dh-ed-railh,
.dh-ed-unit {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.34);
}
.dh-ed-unit {
  margin: 9px 0 8px;
  color: rgba(255, 255, 255, 0.5);
}
.dh-ed-thumb {
  position: relative;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  padding: 7px 7px 7px 20px;
  margin-bottom: 6px;
  height: 38px;
}
.dh-ed-thumb.on {
  border-color: rgba(255, 176, 5, 0.5);
  background: rgba(255, 176, 5, 0.1);
}
.dh-ed-tnum {
  position: absolute;
  left: 6px;
  top: 6px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.35);
}
.dh-ed-tline {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  margin-bottom: 4px;
}
.dh-ed-tline.t2 {
  width: 76%;
  background: rgba(255, 255, 255, 0.1);
}
.dh-ed-tline.t3 {
  width: 54%;
  background: rgba(255, 255, 255, 0.1);
}
.dh-ed-canvas {
  padding: 14px;
  display: grid;
  place-items: center;
  min-width: 0;
}
.dh-ed-slide {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dh-ed-kick {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.36);
  margin-bottom: 9px;
}
.dh-ed-stitle {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(19px, 2.1vw, 25px);
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: #fff;
  margin-bottom: 12px;
  min-height: 1.12em;
}
.dh-ed-bullets {
  display: grid;
  gap: 7px;
}
.dh-ed-bullets li {
  position: relative;
  padding-left: 15px;
  font-size: 12.5px;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.66);
}
.dh-ed-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--yellow);
}
.dh-ed-tools {
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  padding: 11px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dh-ed-tool {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.4);
}
.dh-ed-tool.on {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}
.dh-ed-zoom {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.3);
  writing-mode: vertical-rl;
}

/* ==========================================================================
 * HERO — mobile
 *
 * Measured at 375×812 the hero ran 1357px (1.67 screens): the CTAs wrapped to
 * two rows, the connector pills wrapped to two rows, the demo stage reserved
 * its desktop height, and the composer grew mid-typing which shifted the whole
 * stage. This block tightens the rhythm and makes the demo fit a phone.
 * ========================================================================== */
@media (max-width: 640px) {
  .dh-hero {
    /* header sits at 14px + 52px tall, so 96px clears it with room to spare */
    padding: 96px 0 44px;
  }
  .dh-hero-wrap {
    gap: 28px;
  }

  /* tighter vertical rhythm through the copy block */
  .dh-announce {
    margin-bottom: 18px;
    font-size: 12.5px;
    padding: 5px 12px 5px 5px;
  }
  .dh-hero-sub {
    margin-top: 18px;
    font-size: 16.5px;
    line-height: 25px;
  }
  .dh-hero-actions {
    margin-top: 22px;
    /* both CTAs go full-width rather than wrapping raggedly — same height,
       far better touch targets */
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }
  .dh-hero-actions .dh-btn,
  .dh-hero-actions .dh-watch {
    width: 100%;
    justify-content: center;
  }

  /* connectors become one full-bleed scroller instead of wrapping to 2 rows */
  .dh-hero-conn {
    margin-top: 24px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-inline: -20px;
    padding-inline: 20px;
  }
  .dh-hero-conn::-webkit-scrollbar {
    display: none;
  }
  .dh-cpill {
    flex: none;
  }

  /* ---- the demo ---- */
  .dh-mock-body {
    padding: 13px;
    gap: 12px;
  }
  .dh-composer {
    padding: 12px 13px;
  }
  /* reserve the prompt's full wrapped height up front, so typing fills the
     box instead of pushing the stage down line by line */
  .dh-composer-text {
    font-size: 13.5px;
    line-height: 20px;
    min-height: 60px;
  }
  .dh-stage,
  .dh-ed {
    min-height: 248px;
  }

  /* the editor: drop the tool rail and narrow the slide rail so the canvas
     isn't squeezed to ~157px */
  .dh-ed-tools {
    display: none;
  }
  .dh-ed-body {
    grid-template-columns: 62px minmax(0, 1fr);
  }
  .dh-ed-slide {
    padding: 12px 13px;
  }
  .dh-ed-thumb {
    height: 30px;
  }
}

/* Only on genuinely tiny screens does the slide rail cost more than it
   communicates. At 375–390px (iPhone SE/12/13/14) a narrow rail is worth
   keeping — it's what makes the mock read as a presentation editor. */
@media (max-width: 359px) {
  .dh-ed-rail {
    display: none;
  }
  .dh-ed-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
 * STAT STRIP
 * ========================================================================== */
.dh-stats {
  margin-top: 80px;
}
.dh-statgrid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--stroke-light);
  border: 1px solid var(--stroke-light);
  border-radius: 12px;
  overflow: hidden;
}
@media (min-width: 900px) {
  .dh-statgrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-column: 2 / span 10;
  }
}
.dh-stat {
  background: var(--white);
  padding: 28px 24px;
}
.dh-stat-n {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(38px, 4.4vw, 54px);
  line-height: 1;
  letter-spacing: -0.05em;
}
.dh-stat-n sup {
  font-size: 0.42em;
  vertical-align: 0.9em;
  letter-spacing: 0;
  font-family: var(--sans);
  font-weight: 500;
  margin-left: 2px;
}
.dh-stat-l {
  margin-top: 12px;
  font-size: 14px;
  line-height: 20px;
  color: var(--secondary);
  max-width: 22ch;
}

/* ---- logo marquee -------------------------------------------------------- */
.dh-logos {
  margin-top: 48px;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
}
.dh-logos-track {
  display: flex;
  width: max-content;
  gap: 56px;
  animation: dh-scroll 42s linear infinite;
}
.dh-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--quaternary);
  white-space: nowrap;
}
@keyframes dh-scroll {
  to {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
 * STICKY STORY
 * ========================================================================== */
.dh-section {
  margin-block: 88px;
}
@media (min-width: 900px) {
  .dh-section {
    margin-block: 132px;
  }
}
.dh-sec-head {
  text-align: center;
  padding-inline: 20px;
  margin-bottom: 44px;
}
@media (min-width: 900px) {
  .dh-sec-head {
    margin-bottom: 56px;
  }
}
.dh-sec-head .dh-display {
  max-width: 20ch;
  margin-inline: auto;
}
.dh-sec-head p {
  max-width: 52ch;
  margin: 18px auto 0;
  color: var(--secondary);
  font-size: 17px;
  line-height: 27px;
}

.dh-story-cols {
  display: none;
}
@media (min-width: 900px) {
  .dh-story-cols {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 20px;
  }
}
.dh-story-nav {
  grid-column: span 4;
}
.dh-story-nav > nav {
  position: sticky;
  top: 20vh;
  display: flex;
  flex-direction: column;
}
.dh-storybtn {
  position: relative;
  text-align: left;
  padding: 15px 20px;
  border-radius: 14px;
  background: transparent;
}
/* the active pill is a shared-layout element, so it slides between items */
.dh-storybtn-bg {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.06);
  z-index: 0;
}
.dh-storybtn-in {
  position: relative;
  z-index: 1;
  display: block;
}
.dh-storybtn .dh-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
}
.dh-storybtn h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  line-height: 23px;
  letter-spacing: -0.035em;
  margin-bottom: 5px;
  color: var(--primary);
}
.dh-storybtn p {
  font-size: 13px;
  line-height: 19px;
  color: var(--secondary);
  max-width: 38ch;
  opacity: 0.55;
  transition: opacity 0.3s var(--ease);
}
.dh-storybtn.on p {
  opacity: 1;
}
.dh-story-panels {
  grid-column: span 8;
  display: flex;
  flex-direction: column;
  row-gap: 20px;
}
.dh-story-slot {
  min-height: 60vh;
  display: flex;
  align-items: flex-start;
  padding-bottom: 40px;
}
/* Matches diabrowser.com exactly: the panel is a bare `rounded-24
   overflow-hidden` wrapper — no background, no border, no shadow. The theme
   colour lives inside the browser window's own chrome, not behind it. */
.dh-panel {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: transparent;
  border: 0;
}

/* mobile story: stacked */
.dh-story-stack {
  display: flex;
  flex-direction: column;
  row-gap: 60px;
  padding-inline: 20px;
}
@media (min-width: 900px) {
  .dh-story-stack {
    display: none;
  }
}
.dh-story-stack .dh-panel {
  border-radius: 20px;
}
.dh-story-stack h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -0.04em;
  margin: 10px 0;
}
.dh-story-stack p {
  font-size: 16px;
  line-height: 24px;
  color: var(--secondary);
  max-width: 38ch;
}

/* ==========================================================================
 * BROWSER-WINDOW MOCKS (sticky story panels)
 *
 * Each story panel holds a full browser window rendering a real StudyBits
 * screen. The chrome follows the Dia site's product shots — traffic lights, a
 * tab strip with a grouped-app pill, a toolbar with nav arrows + breadcrumb +
 * actions — and the page inside mirrors the actual Studio UI:
 *   · the 64px icon rail + 72px topbar from src/app/studio/_components
 *   · the `.steps` reasoning timeline + `.srcchip` source chips from
 *     src/app/studio/ask/_design/AssistantChatLive.tsx
 * ========================================================================== */
.dh-bw {
  --bw-ink: rgba(0, 0, 0, 0.85);
  --bw-ink-2: rgba(0, 0, 0, 0.55);
  --bw-ink-3: rgba(0, 0, 0, 0.38);
  --bw-line: rgba(0, 0, 0, 0.08);
  --bw-line-soft: rgba(0, 0, 0, 0.05);
  --bw-fill: rgba(0, 0, 0, 0.04);
  width: 100%;
  /* the window *is* the panel now, so it takes the panel's radius */
  border-radius: 24px;
  overflow: hidden;
  /* the theme colour washes the whole window — chrome deeper, page lighter */
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  color: var(--bw-ink);
  font-size: 12px;
  line-height: 1.45;
  container-type: inline-size;
}

/* ---- tab strip ---- */
.dh-bw-tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px 0;
  background: var(--bw-tint, #f2f0ee);
}
.dh-bw-lights {
  display: flex;
  gap: 5px;
  padding: 0 6px 8px 2px;
}
.dh-bw-lights i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: block;
}
.dh-bw-lights i:nth-child(1) {
  background: #ff5f57;
}
.dh-bw-lights i:nth-child(2) {
  background: #febc2e;
}
.dh-bw-lights i:nth-child(3) {
  background: #28c840;
}
.dh-bw-group,
.dh-bw-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 27px;
  padding: 0 11px;
  margin-bottom: 6px;
  border-radius: 7px;
  font-size: 11.5px;
  color: var(--bw-ink-2);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.045);
}
.dh-bw-group .bm,
.dh-bw-tab .bm {
  width: 13px;
  height: 13px;
  flex: none;
}
.dh-bw-tab.on {
  background: #ffffff;
  color: var(--bw-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
  margin-bottom: 0;
  height: 33px;
  border-radius: 7px 7px 0 0;
}
.dh-bw-plus {
  color: var(--bw-ink-3);
  padding: 0 4px 6px;
}
.dh-bw-tabs-r {
  margin-left: auto;
  display: flex;
  gap: 10px;
  color: var(--bw-ink-3);
  padding-bottom: 6px;
}

/* ---- toolbar + breadcrumb ---- */
.dh-bw-tool {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 38px;
  padding-inline: 12px;
  border-bottom: 1px solid var(--bw-line-soft);
  background: var(--bw-tint, #f2f0ee);
  color: var(--bw-ink-3);
}
.dh-bw-nav {
  display: flex;
  align-items: center;
  gap: 9px;
}
.dh-bw-crumb {
  font-size: 12px;
  color: var(--bw-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dh-bw-crumb b {
  font-weight: 400;
  color: var(--bw-ink);
}
.dh-bw-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dh-bw-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--bw-ink);
  border: 1px solid var(--bw-line);
}
.dh-bw-btn.accent {
  background: var(--bw-accent, #1f8a4c);
  border-color: transparent;
  color: #fff;
}

/* ---- the page ---- */
.dh-bw-view {
  display: flex;
  min-height: 0;
  background: transparent;
}

/* Studio icon rail — mirrors src/app/studio/_components/Sidebar.tsx */
.dh-bw-rail {
  flex: none;
  width: 42px;
  border-right: 1px solid var(--bw-line-soft);
  background: rgba(0, 0, 0, 0.025);
  padding: 9px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.dh-bw-rail i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 26px;
  border-radius: 7px;
  color: var(--bw-ink-3);
}
.dh-bw-rail i.on {
  background: rgba(0, 0, 0, 0.07);
  color: var(--bw-ink);
}
.dh-bw-rail .sp {
  margin-top: auto;
}

.dh-bw-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Studio topbar — mirrors src/app/studio/_components/Topbar.tsx */
.dh-bw-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding-inline: 13px;
  border-bottom: 1px solid var(--bw-line-soft);
}
.dh-bw-ws {
  font-family: var(--brandf);
  font-size: 12.5px;
  letter-spacing: -0.01em;
  color: var(--bw-ink);
}
.dh-bw-search {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 23px;
  min-width: 148px;
  padding: 0 6px 0 9px;
  border-radius: 999px;
  background: var(--bw-fill);
  font-size: 11px;
  color: var(--bw-ink-3);
}
.dh-bw-kbd {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--bw-ink-2);
}
.dh-bw-new {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bw-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
}

.dh-bw-page {
  flex: 1;
  min-height: 0;
  padding: 15px 17px;
  overflow: hidden;
}
.dh-bw-eyebrow {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bw-ink-3);
}
.dh-bw-h {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 7px 0 3px;
}
.dh-bw-lede {
  font-size: 11.5px;
  line-height: 17px;
  color: var(--bw-ink-2);
  max-width: 52ch;
}

/* ---- 01 · connectors ---- */
.dh-bw-conns {
  margin-top: 13px;
  border: 1px solid var(--bw-line-soft);
  border-radius: 9px;
  overflow: hidden;
}
.dh-bw-conn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  font-size: 11.5px;
}
.dh-bw-conn + .dh-bw-conn {
  border-top: 1px solid var(--bw-line-soft);
}
.dh-bw-conn .bm {
  width: 15px;
  height: 15px;
  flex: none;
}
.dh-bw-conn span.meta {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bw-ink-3);
}
.dh-bw-sync {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(31, 138, 76, 0.1);
  color: #1f8a4c;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.dh-bw-sync.wait {
  background: rgba(0, 0, 0, 0.05);
  color: var(--bw-ink-3);
}
.dh-bw-foot {
  margin-top: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--bw-ink-3);
}
.dh-bw-track {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--bw-fill);
  overflow: hidden;
}
.dh-bw-track > b {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--bw-ink);
}

/* ---- 02 · authoring outline ---- */
.dh-bw-mods {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}
.dh-bw-mod {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--bw-line-soft);
  border-radius: 9px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.62);
}
.dh-bw-mod i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 9.5px;
  color: var(--bw-ink-3);
  flex: none;
}
.dh-bw-mod .tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bw-ink-3);
  white-space: nowrap;
}
.dh-bw-tiles {
  display: flex;
  gap: 4px;
  margin-left: 8px;
  flex: none;
}
.dh-bw-tiles span {
  width: 15px;
  height: 11px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.1);
}
.dh-bw-tiles span.gen {
  background: repeating-linear-gradient(
    -45deg,
    rgba(0, 0, 0, 0.08) 0 3px,
    rgba(0, 0, 0, 0.03) 3px 6px
  );
}

/* ---- 03 · ask (reasoning timeline) ---- */
.dh-bw-ask {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.dh-bw-q {
  align-self: flex-end;
  max-width: 82%;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bw-q, rgba(0, 0, 0, 0.06));
  font-size: 11.5px;
}
.dh-bw-steps {
  margin: 12px 0 0;
  padding-left: 3px;
  display: grid;
  gap: 9px;
}
.dh-bw-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 11.5px;
  color: var(--bw-ink-2);
  padding-left: 2px;
}
/* the connecting hairline between steps */
.dh-bw-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 19px;
  bottom: -11px;
  width: 1px;
  background: var(--bw-line);
}
.dh-bw-step .ico {
  position: relative;
  z-index: 1;
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--bw-ink-3);
}
.dh-bw-step .ico .bm {
  width: 13px;
  height: 13px;
}
.dh-bw-step.muted {
  color: var(--bw-ink-3);
}
.dh-bw-a {
  margin-top: 13px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 11.5px;
  line-height: 17.5px;
}
.dh-bw-a .orb {
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--bw-fill);
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.dh-bw-a b {
  font-weight: 600;
}
.dh-bw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.dh-bw-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--bw-fill);
  font-size: 10px;
  color: var(--bw-ink-2);
  white-space: nowrap;
}
.dh-bw-chip .bm {
  width: 11px;
  height: 11px;
  flex: none;
}
.dh-bw-composer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 6px 0 13px;
  border-radius: 999px;
  border: 1px solid var(--bw-line);
  background: rgba(255, 255, 255, 0.7);
  font-size: 11.5px;
  color: var(--bw-ink-3);
}
.dh-bw-composer .send {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--bw-accent, #1f8a4c);
  color: #fff;
}

/* the panels get a touch more room now that they hold a whole browser */
@container (max-width: 460px) {
  .dh-bw-rail {
    display: none;
  }
}

/* ==========================================================================
 * BENTO
 * ========================================================================== */
.dh-bento {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 900px) {
  .dh-bento {
    gap: 20px;
  }
}
.dh-bento-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 900px) {
  .dh-bento-row {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 20px;
  }
}
.dh-bcard {
  grid-column: span 12;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 340px;
  border-radius: 12px;
  border: 1px solid var(--stroke-light);
  background: var(--fill-tertiary);
  overflow: hidden;
  transform: translateZ(0);
}
@media (min-width: 900px) {
  .dh-bcard.w6 {
    grid-column: span 6;
  }
  .dh-bcard.w4 {
    grid-column: span 4;
  }
  .dh-bcard {
    min-height: 400px;
  }
}
.dh-bcard-top {
  flex: none;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (min-width: 900px) {
  .dh-bcard-top {
    padding: 24px;
    gap: 10px;
  }
}
@media (min-width: 1100px) {
  .dh-bcard-top {
    padding: 30px;
    gap: 16px;
  }
}
.dh-bcard-top p {
  font-size: 15.5px;
  line-height: 23px;
  color: var(--secondary);
  max-width: 40ch;
}
.dh-bcard-media {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  padding-inline: 30px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1))
    drop-shadow(0 18px 24px rgba(0, 0, 0, 0.1))
    drop-shadow(0 40px 64px rgba(0, 0, 0, 0.08));
}
@media (min-width: 1100px) {
  .dh-bcard-media {
    padding-inline: 56px;
  }
}
.dh-vis {
  width: 100%;
  border-radius: 12px 12px 0 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 0;
  padding: 14px;
  display: grid;
  gap: 8px;
}
/* "Live sources" bento visual: connector pills with brand marks. The brand
   SVGs (from BRAND in index.tsx) carry inline width:100%/height:100%, so
   without an explicit box here they inflate to fill whatever they're in. */
.dh-vis .dh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.dh-vis .dh-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.045);
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 12.5px;
  color: var(--primary);
  white-space: nowrap;
}
.dh-vis .dh-chip .bm {
  display: block;
  width: 14px;
  height: 14px;
  flex: none;
}
.dh-vis-strip {
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.07);
}
.dh-vis-strip.acc {
  background: var(--accent, var(--primary));
  opacity: 0.75;
}
.dh-slidepv {
  border-radius: 8px;
  aspect-ratio: 16/9;
  background: var(--pv, var(--creamsicle));
  display: flex;
  align-items: flex-end;
  padding: 10px;
}
.dh-slidepv em {
  font-style: normal;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.03em;
  color: rgba(0, 0, 0, 0.75);
}
.dh-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--secondary);
}
.dh-kv b {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--primary);
}
.dh-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 66px;
}
.dh-bars > span {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--primary);
  opacity: 0.82;
}

/* ==========================================================================
 * TEAMS LIST
 * ========================================================================== */
.dh-teams {
  border-top: 1px solid var(--stroke-light);
}
.dh-team {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 26px 8px;
  border-bottom: 1px solid var(--stroke-light);
  transition: background 0.25s var(--ease);
}
.dh-team:hover {
  background: var(--fill-tertiary);
}
.dh-team .dh-label {
  width: 3ch;
}
.dh-team-c h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.04em;
  line-height: 1.2;
}
.dh-team-c p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 23px;
  color: var(--secondary);
  max-width: 62ch;
}
.dh-team-k {
  display: none;
}
@media (min-width: 900px) {
  .dh-team-k {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--tertiary);
    white-space: nowrap;
  }
}
.dh-team:hover .dh-team-k {
  color: var(--primary);
}
.dh-team-k .dh-arr {
  transition: transform 0.3s var(--ease);
}
.dh-team:hover .dh-team-k .dh-arr {
  transform: translateX(5px);
}

/* ==========================================================================
 * COMPARE
 * ========================================================================== */
.dh-compare {
  border-radius: 12px;
  border: 1px solid var(--stroke-light);
  background: var(--fill-tertiary);
  overflow: hidden;
}
.dh-crow {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .dh-crow {
    grid-template-columns: 1fr 1fr;
  }
}
.dh-crow + .dh-crow {
  border-top: 1px solid var(--stroke-light);
}
.dh-cell {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 20px 24px;
  font-size: 15.5px;
  line-height: 23px;
}
@media (min-width: 800px) {
  .dh-cell + .dh-cell {
    border-left: 1px solid var(--stroke-light);
  }
}
.dh-cell.them {
  color: var(--tertiary);
}
.dh-cell .dh-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  margin-top: 1px;
}
.dh-cell.us .dh-ic {
  background: var(--primary);
  color: #fff;
}
.dh-cell.them .dh-ic {
  background: rgba(0, 0, 0, 0.08);
  color: var(--tertiary);
}
.dh-chead {
  display: none;
}
@media (min-width: 800px) {
  .dh-chead {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--stroke-medium);
  }
  .dh-chead > div {
    padding: 16px 24px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tertiary);
  }
  .dh-chead > div:first-child {
    color: var(--primary);
  }
  .dh-chead > div + div {
    border-left: 1px solid var(--stroke-light);
  }
}

/* ==========================================================================
 * SECURITY (dashed panel)
 * ========================================================================== */
.dh-dashed {
  grid-column: 1 / -1;
  position: relative;
  border-radius: 12px;
  border: 1px dashed rgba(0, 0, 0, 0.16);
  padding: 70px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* No clipping here on purpose. The lock/hood badges straddle the top and
     bottom borders, so any clip slices them in half — iOS Safari doesn't
     honour `overflow-x: clip` + `overflow-y: visible` and clips both axes,
     which is exactly how they got cut off on iPhone. Nothing here needs the
     panel to clip: the only wide child is .dh-marquee, which already has its
     own `overflow: hidden` plus an edge mask. */
  overflow: visible;
}
/* lock (top) / hood (bottom) glyphs straddling the dashed border, matching
   the little line-icons on diabrowser.com's privacy panel — bare linework on
   the page background, no badge/circle behind them */
.dh-dashed-badge {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: var(--white);
  color: var(--quaternary);
}
.dh-dashed-badge.top {
  top: 0;
}
.dh-dashed-badge.bottom {
  top: 100%;
}
@media (min-width: 900px) {
  .dh-dashed {
    grid-column: 2 / span 10;
  }
}
.dh-dashed .dh-display {
  text-align: center;
  padding-inline: 20px;
}
.dh-marquee {
  width: 100%;
  margin-block: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 10%,
    #000 90%,
    transparent
  );
}
.dh-mq-track {
  display: flex;
  width: max-content;
  gap: 10px;
  animation: dh-scroll 36s linear infinite;
}
.dh-mq-track.rev {
  animation-direction: reverse;
  animation-duration: 44s;
}
.dh-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--stroke-light);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  font-size: 14.5px;
  white-space: nowrap;
}
.dh-sw {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  flex: none;
}
.dh-sw::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--ease);
}
.dh-sw.on {
  background: var(--blue);
}
.dh-sw.on::after {
  transform: translateX(14px);
}
.dh-toggle b {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tertiary);
}
.dh-dashed-copy {
  max-width: 50ch;
  margin: 40px auto 0;
  padding-inline: 20px;
  text-align: center;
  color: var(--secondary);
  font-size: 17px;
  line-height: 28px;
}
.dh-dashed-copy p + p {
  margin-top: 14px;
}

/* ==========================================================================
 * QUOTE
 * ========================================================================== */
.dh-quote {
  text-align: center;
  max-width: 900px;
  margin-inline: auto;
  padding-inline: 20px;
}
.dh-quote blockquote {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.24;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.dh-quote figcaption {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tertiary);
}
.dh-quote figcaption strong {
  color: var(--primary);
  font-weight: 500;
}

/* ==========================================================================
 * CTA
 * ========================================================================== */
.dh-cta {
  max-width: 760px;
  margin: 100px auto 80px;
  padding-inline: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
@media (min-width: 900px) {
  .dh-cta {
    margin: 150px auto 100px;
  }
}
.dh-cta .dh-display {
  font-size: clamp(38px, 6vw, 68px);
  max-width: none;
}
.dh-cta-note {
  margin-top: 18px;
  font-size: 15px;
  color: rgba(0, 0, 0, 0.5);
}
.dh-cta-fine {
  margin-top: 50px;
  font-size: 15px;
  color: rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
 * FOOTER
 * ========================================================================== */
.dh-footer {
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.dh-fnav {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--stroke-light);
}
@media (min-width: 900px) {
  .dh-fnav {
    display: flex;
    justify-content: space-between;
    gap: 60px;
  }
}
.dh-fcol h4 {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tertiary);
  margin-bottom: 14px;
}
.dh-fcol a {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 0;
  color: var(--primary);
  transition: opacity 0.2s var(--ease);
}
.dh-fcol a:hover {
  opacity: 0.5;
}
.dh-fmeta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  justify-content: center;
  align-items: baseline;
  padding-block: 22px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tertiary);
}
@media (min-width: 900px) {
  .dh-fmeta {
    justify-content: space-between;
  }
}
.dh-fwordmark {
  margin-top: 20px;
  line-height: 0.74;
  overflow: hidden;
  height: clamp(70px, 15vw, 210px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.dh-fwordmark span {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(74px, 19.5vw, 300px);
  letter-spacing: -0.05em;
  color: rgba(0, 0, 0, 0.07);
  white-space: nowrap;
  user-select: none;
}

/* ==========================================================================
 * VIDEO LIGHTBOX
 * ========================================================================== */
.dh-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 2, 4, 0.86);
  backdrop-filter: blur(8px);
  animation: dh-fade 0.25s var(--ease);
}
@keyframes dh-fade {
  from {
    opacity: 0;
  }
}
.dh-lightbox-inner {
  width: min(1080px, 100%);
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}
.dh-lightbox iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.dh-lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.dh-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* ==========================================================================
 * VIDEO SECTION
 * ========================================================================== */
.dh-videosec {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #020204;
  color: #fff;
  padding-block: 96px;
  margin-block: 96px;
}
@media (min-width: 900px) {
  .dh-videosec {
    padding-block: 130px;
    margin-block: 132px;
  }
}
.dh-videosec-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
/* the hero is deliberately flat, so this soft wash lives only here */
.dh-videosec-bg .dh-blob {
  position: absolute;
  top: 10%;
  right: -20vw;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  background: radial-gradient(circle, #0358f7 0%, transparent 66%);
}
.dh-sec-head--dark .dh-display {
  color: #fff;
}
.dh-sec-head--dark .dh-label {
  display: block;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.45);
}
.dh-videoframe {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0b0b0f;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
}
.dh-videoframe iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.dh-videoposter {
  display: block;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}
.dh-videoposter::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(2, 2, 4, 0.65),
    rgba(2, 2, 4, 0.1) 55%
  );
}
.dh-videoplay {
  position: absolute;
  inset: 0;
  margin: auto;
  z-index: 2;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #000;
  padding-left: 5px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.dh-videocap {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
.dh-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(250, 61, 29, 0.6);
  animation: dh-pulse 2s var(--ease) infinite;
}
@keyframes dh-pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(250, 61, 29, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(250, 61, 29, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dh *,
  .dh *::before,
  .dh *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
 * LEGACY TOKEN RESKIN
 *
 * The public pages (about, pricing, platform, faq, blog, docs, use-cases,
 * legal…) were authored against public/site/styles.css + pages.css, which
 * DiaLayout still loads for structure — grids, the docs/prose layouts, all the
 * responsive breakpoints. Those sheets are fully tokenised, so redefining
 * their :root variables here re-skins every one of those pages into Dia's
 * palette without touching a line of page markup.
 *
 * This replaced an earlier hand-written bridge that guessed at class
 * semantics and got several wrong (it styled .vstrip — a three-column card
 * grid — as a 6px progress bar, which is why those pages collapsed into a
 * single full-width column).
 * ========================================================================== */
:root {
  --bg: #f8f8f8;
  --bg-2: #f2f2f2;
  --chrome: rgba(248, 248, 248, 0.72);
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --surface-3: #e9e9e9;
  --border-subtle: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.13);
  --text-primary: rgba(0, 0, 0, 0.85);
  --text-secondary: rgba(0, 0, 0, 0.6);
  --text-tertiary: rgba(0, 0, 0, 0.45);
  /* Dia is near-monochrome: the "brand" accent becomes ink, and its soft
     tint becomes a neutral fill, so icon tiles read as grey-on-grey */
  --brand: rgba(0, 0, 0, 0.85);
  --brand-soft: rgba(0, 0, 0, 0.05);
  /* Dia is flat — collapse the old elevation ramp */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-pop: 0 2px 10px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

/* ==========================================================================
 * LEGACY COMPONENT POLISH
 * Scoped to `.dh` so it can never leak into the gated app. Only the pieces
 * where Dia's language differs structurally from the old system.
 * ========================================================================== */

/* The old SiteLayout faded these in with a scroll hook. DiaLayout has no such
   hook, so anything still marked `.reveal` must render visible or the page
   comes up blank. */
.dh .reveal {
  opacity: 1 !important;
  transform: none !important;
}

/* clear the fixed pill header (66px tall incl. its 28px offset) */
.dh .page-hero {
  padding: 136px 0 60px;
}
@media (min-width: 900px) {
  .dh .page-hero {
    padding: 172px 0 76px;
  }
}
.dh .page-hero .glow {
  display: none;
}

/* display type — Fraunces, Dia's tight tracking */
.dh .display,
.dh .sec-title,
.dh .page-hero h1 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.06;
  text-wrap: balance;
}
.dh .eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tertiary);
}
.dh .lead {
  font-size: 18px;
  line-height: 1.62;
  color: var(--secondary);
}

/* buttons — Dia's flat, squarer pills */
.dh .btn {
  border-radius: 12px;
  font-weight: 500;
  box-shadow: none;
  transition:
    background 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.dh .btn:hover {
  transform: translateY(-1px);
  box-shadow: none;
}
.dh .btn-primary {
  background: var(--ink);
  color: #fff;
  border: 0;
}
.dh .btn-primary:hover {
  background: rgba(0, 0, 0, 0.82);
}
.dh .btn-ghost {
  background: transparent;
  border: 1px solid var(--stroke-medium);
  color: var(--primary);
}
.dh .btn-ghost:hover {
  background: var(--fill-tertiary);
}
.dh .btn-lg {
  height: 56px;
  border-radius: 14px;
}

/* surfaces — flat fill + hairline instead of white cards on shadows */
/* NB: .faq-cat is deliberately absent — it's a plain grouping wrapper
   (margin-bottom only), not a surface. Giving it a card treatment left the
   category heading flush against a border that shouldn't exist. */
.dh .card,
.dh .price-card,
.dh .post-card {
  background: var(--fill-tertiary);
  border: 1px solid var(--stroke-light);
  border-radius: 12px;
  box-shadow: none;
}
.dh .card:hover,
.dh .post-card:hover {
  box-shadow: none;
  border-color: var(--stroke-medium);
}
.dh .card h3,
.dh .vcard h3,
.dh .price-name {
  letter-spacing: -0.02em;
}
.dh .faq-cat-title {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* icon tiles: keep the original 42px box, restyled grey-on-grey */
.dh .vico,
.dh .ap-ico {
  background: var(--brand-soft);
  color: var(--primary);
  border-radius: 11px;
}

/* the old iridescent gradient washes don't belong in Dia's flat palette */
.dh .ai-grad-soft,
.dh .sec-glow,
.dh .hero-glow {
  background: var(--fill-tertiary);
}

/* The legacy sheets use a fixed 110px/72px section rhythm that was tuned for
   the old desktop-first design. It leaves a cavernous gap under the centred
   page-hero, especially on phones — scale it down. */
.dh .page-hero {
  padding-bottom: 40px;
}
@media (min-width: 900px) {
  .dh .page-hero {
    padding-bottom: 56px;
  }
}
@media (max-width: 900px) {
  /* :not(.page-hero) matters — several pages stack `page-hero section-sm` on
     one element, and a `padding` shorthand here would reset the hero's top
     padding and slide its first line under the fixed header. */
  .dh .section:not(.page-hero) {
    padding: 64px 0;
  }
  .dh .section-sm:not(.page-hero) {
    padding: 48px 0;
  }
  .dh .container {
    padding-inline: 20px;
  }
}

/* /demo has no .page-hero — it opens straight onto .demo-split, whose 64px
   top padding sits under the fixed pill header (~94px to its bottom edge).
   The sticky aside needs the same clearance or it slides beneath the nav. */
.dh .demo-split {
  padding-top: 132px;
}
@media (min-width: 900px) {
  .dh .demo-split {
    padding-top: 156px;
  }
}
.dh .demo-aside {
  top: 118px;
}
/* same guard for the legal/blog prose pages, which open on .prose-wrap */
.dh .prose-wrap {
  padding-top: 132px;
}
@media (min-width: 900px) {
  .dh .prose-wrap {
    padding-top: 156px;
  }
}
.dh .toc {
  top: 118px;
}

/* ---- header clearance for the docs / article layouts --------------------
 * These sheets were written for a static header. The Dia pill nav is fixed,
 * with its bottom edge ~94px down, so every sticky offset and top padding
 * tuned to 34/84/92px sat underneath it — the nav visibly covered the docs
 * sidebar and the top of each article. */
.dh .docs-layout {
  padding-top: 124px;
}
@media (min-width: 900px) {
  .dh .docs-layout {
    padding-top: 140px;
  }
}
.dh .docs-side,
.dh .docs-toc,
.dh .toc,
.dh .article-aside,
.dh .demo-aside {
  top: 118px;
}
.dh .docs-side-inner,
.dh .docs-toc-inner {
  max-height: calc(100vh - 150px);
}

/* ---- story panel 03 · the course editor ---------------------------------
 * Mirrors the shipped presentation editor: slide rail, canvas, and the
 * right-hand edit panel whose sections come from
 * src/course-editor/components/presentation/edit-panel/sections. */
.dh-bw-edit {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 96px;
  gap: 12px;
  height: 100%;
  min-height: 0;
}
.dh-bw-slides {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.dh-bw-thumb {
  position: relative;
  flex: none;
  height: 34px;
  border-radius: 5px;
  border: 1px solid var(--bw-line);
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 6px 6px 17px;
}
.dh-bw-thumb.on {
  border-color: var(--bw-accent, #5b5bd6);
  box-shadow: 0 0 0 1.5px var(--bw-accent, #5b5bd6) inset;
}
.dh-bw-thumb i {
  position: absolute;
  left: 5px;
  top: 5px;
  font-family: var(--mono);
  font-style: normal;
  font-size: 7.5px;
  color: var(--bw-ink-3);
}
.dh-bw-thumb .l {
  display: block;
  height: 2.5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  margin-bottom: 3px;
}
.dh-bw-thumb .l.s {
  width: 62%;
  background: rgba(0, 0, 0, 0.1);
}
.dh-bw-canvas {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.dh-bw-slide {
  flex: 1;
  min-height: 0;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--bw-line);
  background: #fff;
  padding: 12px 15px 9px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.dh-bw-slide-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dh-bw-badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bw-accent, #5b5bd6) 12%, transparent);
  color: var(--bw-accent, #5b5bd6);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* short accent rule under the title — the deck's one flash of colour */
.dh-bw-rule {
  display: block;
  width: 26px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--bw-accent, #5b5bd6);
  margin-bottom: 11px;
}
.dh-bw-slide .kick {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bw-ink-3);
}
.dh-bw-slide h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.038em;
  line-height: 1.12;
  margin: 7px 0 8px;
  color: var(--bw-ink);
  text-wrap: balance;
}
.dh-bw-slide h4 em {
  font-style: italic;
  font-weight: 400;
  color: var(--bw-ink-3);
}
.dh-bw-slide-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 14px;
  align-items: start;
}
.dh-bw-slide-body ul {
  display: grid;
  gap: 5px;
  align-content: start;
}
.dh-bw-slide-body li {
  position: relative;
  padding-left: 11px;
  font-size: 10px;
  line-height: 14.5px;
  color: var(--bw-ink-3);
}
.dh-bw-slide-body li b {
  font-weight: 600;
  color: var(--bw-ink);
}
.dh-bw-slide-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--bw-accent, #5b5bd6);
}
/* right-hand aside: headline stat over a small segment chart */
.dh-bw-aside {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dh-bw-stat {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--bw-line-soft);
}
.dh-bw-stat .n {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--bw-accent, #5b5bd6);
}
.dh-bw-stat .l {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  line-height: 12px;
  color: var(--bw-ink-3);
}
.dh-bw-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
}
.dh-bw-chart > span {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: var(--bw-accent, #5b5bd6);
}
.dh-bw-legend {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bw-ink-3);
}

/* slide footer — brand lockup + page number, like a real deck master */
.dh-bw-slide-foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--bw-line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bw-ink-3);
}
.dh-bw-slide-foot .brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dh-bw-panel {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-left: 1px solid var(--bw-line-soft);
  padding-left: 10px;
  overflow: hidden;
}
.dh-bw-panel-h {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bw-ink-3);
  margin-bottom: 4px;
}
.dh-bw-ptab {
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 10px;
  color: var(--bw-ink-2);
  white-space: nowrap;
}
.dh-bw-ptab.on {
  background: var(--bw-fill);
  color: var(--bw-ink);
  font-weight: 500;
}
.dh-bw-swatches {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.dh-bw-swatches > span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

@container (max-width: 460px) {
  .dh-bw-panel {
    display: none;
  }
  .dh-bw-edit {
    grid-template-columns: 52px minmax(0, 1fr);
  }
}

/* ---- editor panel bits that had markup but no styles -------------------- */
.dh-bw-panel-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--bw-line-soft);
}
/* stack these — inline they ran together as "LayoutTextImage" and clipped */
.dh-bw-plist {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dh-bw-plist > span {
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--bw-line-soft);
  font-size: 9px;
  color: var(--bw-ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dh-bw-swatches > span.on {
  box-shadow: 0 0 0 1.5px #fff inset, 0 0 0 2.5px currentColor;
}
/* slide count sits under the rail as a quiet footer */
.dh-bw-slidecount {
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bw-ink-3);
  white-space: nowrap;
}

/* ==========================================================================
 * BROWSER FRAME — scale with the figure, not the viewport
 *
 * The mock's type was authored at ~10–12px, which is right when the frame is
 * ~450px wide but reads tiny once it's 850px+ on a large display. `.dh-bw`
 * declares container-type: inline-size, so these query the frame itself —
 * the stacked mobile panels keep the small sizes, wide desktop ones scale up.
 * (Only descendants: an element can't answer its own container query.)
 * ========================================================================== */
@container (min-width: 620px) {
  /* chrome */
  .dh-bw-tabs {
    padding: 9px 12px 0;
  }
  .dh-bw-group,
  .dh-bw-tab {
    height: 30px;
    font-size: 12.5px;
    padding: 0 13px;
  }
  .dh-bw-tab.on {
    height: 37px;
  }
  .dh-bw-lights i {
    width: 10px;
    height: 10px;
  }
  .dh-bw-tool {
    height: 43px;
  }
  .dh-bw-crumb {
    font-size: 13px;
  }
  .dh-bw-btn {
    height: 27px;
    font-size: 12.5px;
    padding: 0 12px;
  }

  /* studio shell */
  .dh-bw-rail {
    width: 48px;
  }
  .dh-bw-rail i {
    width: 32px;
    height: 30px;
  }
  .dh-bw-top {
    height: 44px;
  }
  .dh-bw-ws {
    font-size: 14px;
  }
  .dh-bw-search {
    height: 26px;
    min-width: 178px;
    font-size: 12px;
  }
  .dh-bw-new {
    height: 26px;
    font-size: 12px;
  }
  .dh-bw-page {
    padding: 19px 22px;
  }

  /* page content */
  .dh-bw-eyebrow {
    font-size: 10.5px;
  }
  .dh-bw-h {
    font-size: 23px;
  }
  .dh-bw-lede {
    font-size: 13px;
    line-height: 19px;
  }
  .dh-bw-conn,
  .dh-bw-mod {
    font-size: 13px;
    padding: 11px 13px;
  }
  .dh-bw-step,
  .dh-bw-a,
  .dh-bw-q {
    font-size: 13px;
  }
  .dh-bw-a {
    line-height: 19.5px;
  }
  .dh-bw-chip {
    font-size: 11px;
  }
  .dh-bw-composer {
    height: 38px;
    font-size: 13px;
  }

  /* the slide */
  .dh-bw-slide {
    padding: 15px 18px 11px;
  }
  .dh-bw-slide h4 {
    font-size: 22px;
  }
  .dh-bw-slide-body {
    grid-template-columns: minmax(0, 1fr) 104px;
  }
  .dh-bw-slide-body li {
    font-size: 11.5px;
    line-height: 17px;
  }
  .dh-bw-stat .n {
    font-size: 25px;
  }
  .dh-bw-stat .l {
    font-size: 10px;
  }
  .dh-bw-chart {
    height: 50px;
  }
  .dh-bw-edit {
    grid-template-columns: 74px minmax(0, 1fr) 112px;
  }
  .dh-bw-thumb {
    height: 40px;
  }
  .dh-bw-ptab {
    font-size: 11px;
    padding: 5px 8px;
  }
  .dh-bw-plist > span {
    font-size: 10px;
  }
}

@container (min-width: 800px) {
  .dh-bw-h {
    font-size: 26px;
  }
  .dh-bw-lede {
    font-size: 14px;
    line-height: 21px;
  }
  .dh-bw-conn,
  .dh-bw-mod {
    font-size: 14px;
    padding: 13px 15px;
  }
  .dh-bw-step,
  .dh-bw-a,
  .dh-bw-q {
    font-size: 14px;
  }
  .dh-bw-a {
    line-height: 21px;
  }
  .dh-bw-chip {
    font-size: 11.5px;
  }
  .dh-bw-page {
    padding: 22px 26px;
  }
  .dh-bw-slide h4 {
    font-size: 26px;
  }
  .dh-bw-slide-body li {
    font-size: 12.5px;
    line-height: 18.5px;
  }
  .dh-bw-stat .n {
    font-size: 29px;
  }
  .dh-bw-chart {
    height: 58px;
  }
  .dh-bw-rail {
    width: 52px;
  }
}

/* ==========================================================================
 * EDITOR — light variant
 *
 * The story panel 03 reuses the hero animation's editor verbatim: same
 * .dh-ed-* structure, same dimensions, same layout. The hero sits on a
 * near-black stage so its palette is white-alpha; here it sits inside a white
 * browser window, so this modifier only repaints it. No geometry is touched.
 * ========================================================================== */
.dh-ed--light {
  border-color: rgba(0, 0, 0, 0.08);
  background: #fff;
  min-height: 0;
  height: 100%;
}
.dh-ed--light .dh-ed-bar {
  border-bottom-color: rgba(0, 0, 0, 0.07);
  background: rgba(0, 0, 0, 0.02);
}
.dh-ed--light .dh-ed-file {
  color: rgba(0, 0, 0, 0.4);
}
.dh-ed--light .dh-ed-title {
  color: rgba(0, 0, 0, 0.85);
}
.dh-ed--light .dh-ed-pill {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
  color: rgba(0, 0, 0, 0.6);
}
/* the Agent pill carries the panel's own accent rather than the hero's amber,
   so the editor stays coherent with the periwinkle browser chrome */
.dh-ed--light .dh-ed-pill.ai {
  border-color: color-mix(in srgb, var(--bw-accent, #5b5bd6) 32%, transparent);
  background: color-mix(in srgb, var(--bw-accent, #5b5bd6) 11%, transparent);
  color: var(--bw-accent, #5b5bd6);
}
.dh-ed--light .dh-ed-share {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
}
.dh-ed--light .dh-ed-rail {
  border-right-color: rgba(0, 0, 0, 0.07);
}
.dh-ed--light .dh-ed-railh,
.dh-ed--light .dh-ed-unit {
  color: rgba(0, 0, 0, 0.38);
}
.dh-ed--light .dh-ed-unit {
  color: rgba(0, 0, 0, 0.5);
}
.dh-ed--light .dh-ed-thumb {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.025);
}
.dh-ed--light .dh-ed-thumb.on {
  border-color: color-mix(in srgb, var(--bw-accent, #5b5bd6) 55%, transparent);
  background: color-mix(in srgb, var(--bw-accent, #5b5bd6) 9%, transparent);
}
.dh-ed--light .dh-ed-tnum {
  color: rgba(0, 0, 0, 0.35);
}
.dh-ed--light .dh-ed-tline {
  background: rgba(0, 0, 0, 0.16);
}
.dh-ed--light .dh-ed-tline.t2,
.dh-ed--light .dh-ed-tline.t3 {
  background: rgba(0, 0, 0, 0.1);
}
.dh-ed--light .dh-ed-slide {
  border-color: rgba(0, 0, 0, 0.07);
  background: rgba(0, 0, 0, 0.02);
}
.dh-ed--light .dh-ed-kick {
  color: rgba(0, 0, 0, 0.38);
}
.dh-ed--light .dh-ed-stitle {
  color: rgba(0, 0, 0, 0.85);
}
.dh-ed--light .dh-ed-bullets li {
  color: rgba(0, 0, 0, 0.6);
}
.dh-ed--light .dh-ed-bullets li::before {
  background: var(--bw-accent, #5b5bd6);
}
.dh-ed--light .dh-ed-tools {
  border-left-color: rgba(0, 0, 0, 0.07);
}
.dh-ed--light .dh-ed-tool {
  color: rgba(0, 0, 0, 0.4);
}
.dh-ed--light .dh-ed-tool.on {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.85);
}
.dh-ed--light .dh-ed-zoom {
  color: rgba(0, 0, 0, 0.32);
}

/* bare frame: the editor fills the window, no Studio rail/topbar above it */
.dh-bw-view--bare {
  display: block;
  padding: 13px;
  min-height: 268px;
}
@container (min-width: 620px) {
  .dh-bw-view--bare {
    padding: 16px;
    min-height: 320px;
  }
  /* match the hero's roomier editor proportions once there's width for it */
  .dh-ed--light .dh-ed-stitle {
    font-size: 26px;
  }
  .dh-ed--light .dh-ed-bullets li {
    font-size: 13px;
  }
}

/* ==========================================================================
 * AUTH (login / register / forgot-password)
 *
 * Styles the shell and the plain markup those pages already pass in
 * (h1, .sub, .field, .oauth-btn, .auth-alt, .auth-foot, .hint), so all three
 * adopt the Dia language without each page being rewritten.
 * ========================================================================== */
.dh-auth {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 128px 20px 64px;
}
@media (min-width: 900px) {
  .dh-auth {
    padding: 152px 20px 80px;
  }
}
.dh-auth-inner {
  width: 100%;
  max-width: 1060px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}
@media (min-width: 900px) {
  .dh-auth-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    gap: 64px;
  }
}

/* ---- the form card ---- */
.dh-authcard {
  border-radius: 16px;
  border: 1px solid var(--stroke-light);
  background: #fff;
  padding: 30px 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
@media (min-width: 900px) {
  .dh-authcard {
    padding: 38px 36px;
  }
}
.dh-authcard h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--primary);
  margin: 0;
}
.dh-authcard .sub {
  margin: 9px 0 26px;
  font-size: 15px;
  line-height: 22px;
  color: var(--secondary);
}
.dh-authcard form {
  display: block;
}

/* fields */
.dh-authcard .field {
  display: block;
  margin-bottom: 15px;
}
.dh-authcard .field label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tertiary);
}
.dh-authcard .field input,
.dh-authcard .field select {
  display: block;
  width: 100%;
  height: 46px;
  padding-inline: 14px;
  border-radius: 11px;
  border: 1px solid var(--stroke-medium);
  background: #fff;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--primary);
  transition:
    border-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}
.dh-authcard .field input::placeholder {
  color: var(--quaternary);
}
.dh-authcard .field input:focus,
.dh-authcard .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

/* buttons — the primary action is Dia's flat black pill */
.dh-authcard .btn {
  border-radius: 12px;
  font-weight: 500;
  box-shadow: none;
}
.dh-authcard .btn-lg {
  height: 50px;
  font-size: 16px;
}
.dh-authcard .btn-primary {
  background: var(--ink);
  color: #fff;
  border: 0;
}
.dh-authcard .btn-primary:hover {
  background: rgba(0, 0, 0, 0.82);
}
.dh-authcard .btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Google / OAuth button */
.dh-authcard .oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--stroke-medium);
  background: #fff;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: background 0.18s var(--ease);
}
.dh-authcard .oauth-btn:hover {
  background: var(--fill-tertiary);
}

/* "or" divider between OAuth and the email form */
.dh-authcard .auth-alt {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tertiary);
}
.dh-authcard .auth-alt::before,
.dh-authcard .auth-alt::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--stroke-light);
}

.dh-authcard .hint {
  font-size: 12.5px;
  line-height: 18px;
  color: var(--tertiary);
  margin-top: 10px;
}
.dh-authcard .auth-foot {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--stroke-light);
  font-size: 14px;
  color: var(--secondary);
  text-align: center;
}
.dh-authcard .auth-foot a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- proof panel ---- */
.dh-auth-side {
  display: none;
}
@media (min-width: 900px) {
  .dh-auth-side {
    display: block;
  }
}
.dh-auth-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tertiary);
}
.dh-auth-quote {
  margin: 16px 0 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--primary);
  text-wrap: balance;
}
.dh-auth-by {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tertiary);
}
.dh-auth-points {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--stroke-light);
  display: grid;
  gap: 18px;
}
.dh-auth-point {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.dh-auth-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--fill-secondary);
  color: var(--primary);
}
.dh-auth-pt {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--primary);
}
.dh-auth-pd {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  line-height: 19px;
  color: var(--secondary);
}

/* ---- nav: Log in ----
 * Sits inside the pill, set off from the section links by a rule. It can't go
 * next to the demo CTA: that's absolutely positioned at the right edge while
 * the pill is viewport-centred, so a second control out there overlaps the
 * pill on any viewport under ~1164px. */
.dh-navlogin {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  padding-left: 16px;
  border-left: 1px solid var(--stroke-light);
  font-size: 15px;
  font-weight: 500;
  color: var(--primary);
  transition: opacity 0.2s var(--ease);
}
.dh-navlogin:hover {
  opacity: 0.55;
}
