/* ============================================================
 * Cue Use Cases — /use-cases
 * Editorial product library. White, type-led, border-driven.
 * Palette is fixed: no purple, no gradients, no glow.
 * ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f2;
  --ink: #171717;
  --ink-2: #696969;
  --ink-3: #9c9c94;
  --blue: #2563eb;
  --blue-ink: #1d4ed8;
  --line: #e5e5df;
  --line-strong: #d6d6cd;
  --pill: #111111;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --speed: 180ms;
  --ease: cubic-bezier(0.2, 0, 0.2, 1);
  --shadow-1: 0 1px 2px rgba(23, 23, 23, 0.04);
  --shadow-2: 0 10px 30px rgba(23, 23, 23, 0.07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(37, 99, 235, 0.14); }

a { color: inherit; }

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

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-64px);
}
.skip-link:focus { transform: translateY(0); }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Nav ───────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--speed) var(--ease);
}
.site-nav.scrolled { border-bottom-color: var(--line); }

/* Direct child only — .mobile-nav nests its own .wrap which must stay block */
.site-nav > .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.nav-logo img { width: 26px; height: 26px; display: block; }
.nav-logo span {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--speed) var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current='page'] { color: var(--ink); font-weight: 600; }

.btn-nav {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity var(--speed) var(--ease);
  white-space: nowrap;
}
.btn-nav:hover { opacity: 0.85; }

.nav-right { display: flex; align-items: center; gap: 10px; }

.nav-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
}

.mobile-nav {
  display: none;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.mobile-nav:not([hidden]) { display: block; }
.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a[aria-current='page'] { color: var(--ink); font-weight: 600; }

/* ── Studio banner ─────────────────────────────────────── */

.studio-banner {
  display: none;
  background: var(--pill);
  color: #fff;
}
body.studio .studio-banner { display: block; }

.studio-banner .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.studio-banner .studio-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.studio-banner .studio-count {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.studio-progress {
  flex: 1;
  min-width: 160px;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
}
.studio-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--blue);
  border-radius: 999px;
  transition: width 220ms var(--ease);
}
.studio-exit {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  white-space: nowrap;
}
.studio-exit:hover { color: #fff; }

/* ── Hero ──────────────────────────────────────────────── */

.hero { padding: 96px 0 72px; }

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

.hero h1 {
  font-size: clamp(46px, 7vw, 82px);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.01;
  max-width: 820px;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  color: var(--blue);
}

.hero-sub {
  margin-top: 26px;
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity var(--speed) var(--ease), border-color var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { opacity: 0.85; }
.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover { border-color: var(--ink-3); }

.hero-search {
  position: relative;
  margin-top: 40px;
  max-width: 620px;
}
.hero-search svg {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.hero-search input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 17px 64px 17px 52px;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.hero-search input::placeholder { color: var(--ink-3); }
.hero-search input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.hero-search kbd {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 9px;
  pointer-events: none;
}

/* ── Sections ──────────────────────────────────────────── */

.section { padding: 72px 0; }
.section.alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head { margin-bottom: 40px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 730;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}
.section-head p {
  margin-top: 12px;
  font-size: 16px;
  color: var(--ink-2);
  max-width: 520px;
}

/* ── Collections ───────────────────────────────────────── */

.collections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.collection-tile {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  transition: border-color var(--speed) var(--ease), transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.collection-tile:hover {
  border-color: var(--ink-3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.collection-glyph {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.collection-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.collection-count {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-2);
}

/* ── Demo stage (shared: featured card / grid card / drawer) ── */

.stage {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stage-app {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.app-mark {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stage-app-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-dots { display: flex; gap: 5px; flex: none; }
.stage-dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.stage-pill {
  align-self: flex-start;
  display: flex;
  align-items: baseline;
  gap: 10px;
  max-width: 100%;
  background: var(--pill);
  color: #fff;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  padding: 11px 16px;
}
.stage-pill .mic {
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  transform: translateY(-1px);
}
.stage-pill p {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  display: -webkit-box;
  -webkit-line-clamp: 3; /* the pill's job is proving a natural sentence works — don't cut it mid-thought */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stage-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.stage-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.stage-state svg { flex: none; }
.stage-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.stage video {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--pill);
}

/* Featured stage is roomier */
.featured-card .stage { padding: 20px; gap: 16px; min-height: 190px; }
.featured-card .stage-pill p { -webkit-line-clamp: 3; font-size: 14px; }

.stage-open {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}

/* ── Cards ─────────────────────────────────────────────── */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 16px 22px;
  box-shadow: var(--shadow-1);
  transition: border-color var(--speed) var(--ease), transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.card:hover {
  border-color: var(--ink-3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
/* Card's stretched link suppresses its own outline; the ring lives on the card */
.card:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35), var(--shadow-1);
}

.card-body { padding: 0 8px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  background: var(--bg);
}
.chip.mode-agent { color: var(--blue-ink); border-color: rgba(37, 99, 235, 0.35); }
.chip.mode-fast { color: var(--ink); border-color: var(--line-strong); }

.card h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.featured-card h3 { font-size: 22px; }

.card h3 a {
  text-decoration: none;
  color: inherit;
  outline: none;
}
/* Stretched link — whole card clickable, single tab stop */
.card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
}

.card-summary {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  flex: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.card-cta {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue);
}

.studio-flag {
  display: none;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
body.studio .studio-flag { display: inline-flex; }
.studio-flag.todo { color: var(--ink-2); border: 1px dashed var(--line-strong); background: var(--bg); }
.studio-flag.done { color: #fff; background: var(--blue); border: 1px solid var(--blue); }

/* ── All use cases layout ──────────────────────────────── */

.browse {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.filter-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2); /* WCAG AA: ink-3 (2.8:1) reserved for decorative marks only */
  margin-bottom: 10px;
}

.filter-list { display: flex; flex-direction: column; gap: 2px; }

.filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: 9px;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.filter-btn:hover { background: var(--bg-alt); color: var(--ink); }
.filter-btn[aria-checked='true'] {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--blue);
}
.filter-btn .n {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}

/* Toolbar */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}

.result-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink-2);
}
.result-line strong { color: var(--ink); font-weight: 700; }

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 7px 4px 12px;
}
.active-filter button {
  display: grid;
  place-items: center;
  width: 24px; height: 24px; /* WCAG 2.5.8 minimum target size */
  border-radius: 50%;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.active-filter button:hover { background: var(--line); color: var(--ink); }

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.sort-wrap select {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 7px 10px;
  cursor: pointer;
}

.view-toggle {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  overflow: hidden;
}
.view-toggle button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 32px;
  color: var(--ink-2); /* UI components need 3:1 — ink-3 is 2.8:1 */
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.view-toggle button + button { border-left: 1px solid var(--line-strong); }
.view-toggle button[aria-pressed='true'] { background: var(--bg-alt); color: var(--ink); }
.view-toggle button:hover { color: var(--ink); }

/* Grid / list */

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cases-grid.list-view { grid-template-columns: 1fr; gap: 12px; }

.list-view .card {
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding: 14px 20px 14px 14px;
}
.list-view .card .stage {
  flex: none;
  width: 210px;
  align-self: stretch;
  justify-content: center;
}
.list-view .card .stage-pill { display: none; }
.list-view .card .stage-status { margin-top: 2px; }
.list-view .card-body { padding: 0; }
.list-view .card-summary { flex: initial; }
.list-view .card-foot { margin-top: 2px; }

/* Empty state */

.empty {
  display: none;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 72px 32px;
}
.empty.show { display: block; }
.empty h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.empty p { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }
.empty button {
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

/* ── Drawer ────────────────────────────────────────────── */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(23, 23, 23, 0.34);
  opacity: 0;
  transition: opacity 200ms var(--ease);
}
.drawer-overlay.open { opacity: 1; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 120;
  width: min(500px, 94vw);
  background: var(--bg);
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  transition: transform 220ms var(--ease);
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.drawer-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.drawer-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-2);
  transition: border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}
.drawer-close:hover { border-color: var(--ink-3); color: var(--ink); }

.drawer-body {
  overflow-y: auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overscroll-behavior: contain;
}

.drawer-body h2 {
  font-size: 27px;
  font-weight: 730;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.drawer-desc { font-size: 15.5px; color: var(--ink-2); margin-top: 10px; }

.drawer-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2); /* WCAG AA: ink-3 fails 4.5:1 for text */
  margin-bottom: 10px;
}

.drawer-scene {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.drawer-say {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: var(--pill);
  color: #fff;
  /* Same corner geometry as .stage-pill — one signature component, two sizes */
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  padding: 14px 18px;
}
.drawer-say .mic {
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
}
.drawer-say p { font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, 0.94); }

.drawer-steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; }
.drawer-steps li {
  counter-increment: step;
  position: relative;
  display: flex;
  gap: 14px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  padding: 12px 0;
}
.drawer-steps li + li { border-top: 1px solid var(--line); }
.drawer-steps li::before {
  content: counter(step);
  flex: none;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-ink);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 50%;
  margin-top: 1px;
}

.drawer-result {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
  line-height: 1.65;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.drawer-result svg { flex: none; margin-top: 3px; }

.drawer-try,
.drawer-guide {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 12px 24px;
  text-decoration: none;
  transition: opacity var(--speed) var(--ease);
}
.drawer-try { color: #fff; background: var(--ink); }
.drawer-guide { color: var(--ink); border: 1px solid var(--line-strong); }
.drawer-try:hover,
.drawer-guide:hover { opacity: 0.85; }

/* Studio block inside drawer */

.drawer-studio { display: none; border-top: 1px solid var(--line); padding-top: 24px; }
body.studio .drawer-studio { display: block; }

.drawer-studio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.drawer-studio-head .drawer-section-label { margin-bottom: 0; }

.mark-recorded {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 16px;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.mark-recorded[aria-pressed='true'] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.script-beats { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.script-beats li {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.script-beats .beat-time {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-ink);
  margin-bottom: 4px;
}
.script-beats p { font-size: 13.5px; line-height: 1.6; color: var(--ink); }

/* ── Footer ────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 44px;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer p { font-size: 13px; color: var(--ink-2); }
.footer-links { display: flex; gap: 22px; list-style: none; }
.footer-links a {
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
}
.footer-links a:hover { color: var(--ink); }

/* ── No-JS fallback ────────────────────────────────────── */

/* <html class="no-js"> is removed by the first inline script;
   when it stays, the JS-rendered shells hide and the noscript note leads. */
.no-js .js-only { display: none; }

/* Inverse gate — server-rendered fallback library (gen-use-cases-static.mjs):
   visible without JS, hidden as soon as the runtime takes over. */
html:not(.no-js) .no-js-only { display: none; }
.static-library .static-case { border-top: 1px solid #e8e6e1; padding: 26px 0 8px; max-width: 720px; }
.static-library .static-case h3 { font-size: 19px; margin: 0 0 6px; }
.static-case-meta { color: #85837c; font-size: 13px; margin: 0 0 10px; }
.static-case-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #9c9a92; margin: 16px 0 4px; }
.static-case-say { margin: 0; padding: 10px 14px; border-left: 3px solid #2563eb; background: #f6f5f2; font-style: italic; }
.static-case ol { padding-left: 20px; }
.static-case-guide, .static-case-back { color: #2563eb; text-decoration: none; }


.nojs-note {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 32px 0;
  font-size: 15px;
  line-height: 1.7;
}
.nojs-note a { color: var(--blue); }

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 1080px) {
  .wrap { padding: 0 28px; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .collections-grid { grid-template-columns: repeat(2, 1fr); }
  .browse { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: grid; }
  .browse { grid-template-columns: 1fr; }
  .filters {
    position: static;
    flex-direction: row;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .filter-list { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .filter-btn {
    width: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13.5px;
    white-space: nowrap;
  }
  .filter-btn[aria-checked='true'] {
    box-shadow: none;
    background: var(--ink);
    color: #fff;
  }
  .filter-btn[aria-checked='true'] .n { color: rgba(255, 255, 255, 0.6); }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 64px 0 52px; }
  .section { padding: 52px 0; }
  .featured-grid,
  .cases-grid { grid-template-columns: 1fr; }
  .collections-grid { grid-template-columns: 1fr; gap: 10px; }
  .collection-tile { padding: 16px 18px; }

  .list-view .card { flex-direction: column; align-items: stretch; }
  .list-view .card .stage { width: auto; }
  .list-view .card-body { padding: 0 8px; }

  /* Drawer becomes a bottom sheet */
  .drawer {
    top: auto;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 92vh;
    height: 92dvh;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    transform: translateY(103%);
  }
  .drawer.open { transform: translateY(0); }
  .drawer-head { padding: 16px 20px; }
  .drawer-body { padding: 22px 20px 40px; }

  .studio-banner .wrap { gap: 12px; }
  .studio-progress { order: 3; flex-basis: 100%; }
}

/* ── Touch ergonomics ──────────────────────────────────── */

@media (pointer: coarse) {
  .drawer-close { width: 44px; height: 44px; }
  .view-toggle button { width: 44px; height: 40px; }
  .filter-btn { min-height: 44px; }
  .active-filter button { width: 26px; height: 26px; }
  .mark-recorded { min-height: 44px; }
}

/* ── Motion preferences ────────────────────────────────── */

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