/* Audience pages: For agencies, For founders. Shares the product hero (.phero), workroom (.how),
   draft (work.css) and takeover; adds the client switcher, the comparison, the outcome library and the proof. */

.phero .doors .after { font-weight: 700; }
.phero .doors .after a { color: var(--on-dark); }

/* promise with a client switcher */
.promise .grid { grid-template-columns: 1.1fr .9fr; align-items: start; }
.clients { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.clients .chip { cursor: pointer; background: var(--card); min-height: 44px; font-family: var(--ui); font-size: .9rem; }
.clients .chip.is-on { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.client-record { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; min-height: 280px; }
.client-record .cr-name { font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.05; }
.client-record .cr-sw { display: flex; gap: 6px; }
.client-record .cr-sw i { width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(21,23,28,.12); }
.client-record p { margin: 0; }
.client-record .small { margin-top: auto; }
@media (max-width: 860px) { .promise .grid { grid-template-columns: 1fr; } }

/* the comparison (founders anchor) */
.compare .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.compare .pane { display: grid; gap: 12px; align-content: start; }
.compare .pane .label { font-family: var(--ui); font-size: .78rem; color: var(--muted); }
.compare .pane.generic .line { color: var(--ink-2); }
.compare .line { font-family: var(--serif-accent); font-style: italic; font-size: 1.15rem; line-height: 1.35; margin: 0; }
.compare .pane.generic .line::before { content: ""; }
.compare .why { font-size: .95rem; color: var(--muted); margin: 0; }
.compare .draft-copy { margin-top: 4px; }
.compare .rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.compare .rule-card { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.compare .rule-card .uwee { width: 120px; }
/* SR-r2 (rule 7): Filler's base still here is the portrait shared/cast/filler.webp (the square assets/cast one stays for chips and the Uwees page); a square box keeps both cards the same size (rule 9) */
.compare .rule-card .uwee { aspect-ratio: 1; }
.compare .rule-card .uwee img { height: 100%; object-fit: contain; object-position: 50% 100%; }
.compare .rule-card .said { font-family: var(--serif-accent); font-style: italic; font-size: 1.15rem; line-height: 1.3; margin: 0 0 6px; color: var(--amber-ink); }
.compare .rule-card p { margin: 0; font-size: .95rem; }
@media (max-width: 860px) { .compare .pair, .compare .rules { grid-template-columns: 1fr; } .compare .rule-card { grid-template-columns: 96px 1fr; } }

/* the caught draft beside the plate */
.how .side .draft { margin-top: 6px; }
.how .side .caught-cap { font-size: .92rem; color: var(--muted); margin: 8px 0 0; }

/* roles, approvals, hand-off */
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.three .card h3 { margin: 0 0 8px; }
.three .card p { margin: 0; }
.three .card .uwee { width: 110px; display: block; margin-top: 14px; }
@media (max-width: 860px) { .three { grid-template-columns: 1fr; } }

/* outcome library */
.lib-filters { display: grid; gap: 10px; margin-bottom: 24px; }
.lib-filters .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lib-filters .label { min-width: 60px; }
.lib-filters .chip { cursor: pointer; background: var(--card); min-height: 44px; font-family: var(--ui); font-size: .88rem; }
.lib-filters .chip.is-on { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.lib-filters .count { font-family: var(--ui); font-size: .8rem; color: var(--muted); }
.lib { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.lib li { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto 1fr; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.lib li.is-hot, .lib li:focus-within { transform: translateY(-4px); box-shadow: var(--shadow); }
.lib .art { aspect-ratio: 4 / 3; background: var(--studio-2); overflow: hidden; }
.lib .art img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.lib .meta { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.lib .meta b { font-family: var(--head); font-size: 1.1rem; }
.lib .made { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.lib .made .label { font-family: var(--ui); font-size: .8rem; color: var(--muted); }
.lib .made .uwee { width: 54px; }
.lib .made .who { font-size: .9rem; }

/* proof */
.proof .grid { grid-template-columns: .9fr 1.1fr; align-items: center; }
.proof h2 { color: var(--paper); }
.proof .pockets-stage { display: grid; justify-items: center; }
.proof .pockets-stage .uwee { width: min(300px, 100%); }
.proof .said { font-family: var(--display); font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.15; margin: 10px 0 16px; color: var(--paper); display: inline-block; }
.proof .proof-row { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.proof .proof-row li { background: #fff; border-radius: 10px; padding: 6px; }
.proof .proof-row img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-radius: 6px; display: block; }
.proof .proof-row figcaption { font-family: var(--ui); font-size: .8rem; color: var(--ink-2); padding: 6px 4px 2px; }
@media (max-width: 860px) { .proof .grid { grid-template-columns: 1fr; } .proof .proof-row { grid-template-columns: 1fr 1fr; } }

/* two ways in (founders) */
.ways .grid { grid-template-columns: 1fr 1fr; }
.ways .card { display: grid; gap: 10px; align-content: start; }
.ways .card .soon { font-family: var(--ui); font-size: .8rem; color: var(--muted); }
@media (max-width: 860px) { .ways .grid { grid-template-columns: 1fr; } }

.close h2 { color: var(--paper); }
.close .lede { color: var(--on-dark); }
.close .after a { color: var(--on-dark); font-weight: 700; }

/* the draft inside a side column or a card fits its column */
.how .stage-grid > *, .compare .pair > * { min-width: 0; }
.how .side .draft, .compare .draft { width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.lib-more { margin-top: 20px; }
@media (max-width: 860px) {
  .how .side .draft, .compare .draft { max-width: 100%; }
  .lib { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lib .meta { padding: 10px 10px 12px; gap: 4px; }
  .lib .meta b { font-size: .95rem; }
  .lib .made .uwee { width: 40px; }
  .lib .made .who { font-size: .8rem; }
  .lib .meta .chip { font-size: .8rem; min-height: 24px; padding: 0 8px; white-space: normal; }
}
.lib li { min-width: 0; }
.lib .made { flex-wrap: wrap; }
.lib .meta b, .lib .meta .who { overflow-wrap: anywhere; }

/* ---------- P2 (v3-v4): For agencies, For founders. Scoped to body.aud so how-it-works (which also loads this file) is untouched ---------- */

/* F08, F20: less empty space on both pages */
.aud .band { padding-block: clamp(44px, 6vw, 84px); }
.aud .band .section-head { margin-bottom: 20px; }

/* R08: "A whole campaign" holds one line */
.aud .promise h2 { white-space: nowrap; }

/* rule 6: role lines and catchphrases larger and heavier, text from the Sheet */
.aud .role { font-family: var(--ui); font-weight: 700; font-size: .95rem; margin: 0 0 4px; color: var(--ink-2); }
.aud .proof .role { color: var(--on-dark-2); }
.aud .compare .rule-card .said { font-size: clamp(1.25rem, 1.7vw, 1.45rem); font-weight: 600; color: var(--amber-ink); }
.aud .proof .said { font-weight: 700; }

/* rule 11: a Uwee named in a card stands in it (Fold, Pip, Wire) */
.aud .fig { display: block; margin-bottom: 4px; }
.aud .crew-card { display: grid; gap: 10px; align-content: start; }

/* F04: the generic pane gets the same draft card as the record pane, its problems marked */
.aud .compare .pair { align-items: stretch; }
.aud .gen-draft { background: #fbfaf7; border: 1px solid var(--rule); border-radius: 10px; padding: 22px 24px; box-shadow: var(--shadow); max-width: 420px; display: grid; gap: 10px; }
.aud .gen-dh { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: var(--ui); font-size: .8rem; color: var(--ink-3); }
.aud .gen-chip { border: 1px solid #c8322b; color: #c8322b; border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.aud .gen-line { margin: 0; font-family: var(--serif-accent); font-style: italic; font-size: 1.08rem; line-height: 1.4; color: var(--ink-2); }
.aud .gen-line mark { background: linear-gradient(transparent 58%, rgba(232,147,12,.35) 58%); color: inherit; padding: 0 1px; }
.aud .gen-line .flag { display: block; font-family: var(--ui); font-style: normal; font-size: .78rem; font-weight: 700; color: #c8322b; margin-top: 2px; }
.aud .gen-line .flag::before { content: "\2715  "; }
.aud .gen-src { border-top: 1px dashed rgba(21,23,28,.2); padding-top: 10px; font-family: var(--ui); font-size: .82rem; color: var(--ink-3); }
.aud .gen-src b { color: #c8322b; }

/* F05: real outputs slide in over the plate; F07: room before the crew caption; F10: In / Out / Goes to as a right column */
.aud .how .plate-wrap { position: relative; }
.aud .how .po-stage { position: absolute; right: 3%; top: 5%; bottom: 5%; width: 36%; display: flex; flex-direction: column; gap: 10px; }
.aud .how .po-view { position: relative; flex: 1 1 auto; min-height: 0; }
.aud .how .po { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateX(36px); transition: opacity .45s var(--ease), transform .55s var(--ease), visibility 0s .55s; }
.aud .how .po.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .45s var(--ease), transform .55s var(--ease), visibility 0s; }
.aud .how .po > img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 14px 34px rgba(17,22,39,.32); background: #fff; display: block; }
.aud .how .po-tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.aud .how .po-tab { cursor: pointer; min-height: 44px; background: rgba(255,255,255,.94); font-family: var(--ui); font-size: .85rem; box-shadow: 0 4px 14px rgba(17,22,39,.18); }
.aud .how .po-tab.is-on { background: var(--navy); border-color: var(--navy); color: var(--paper); }
@media (prefers-reduced-motion: reduce) { .aud .how .po, .aud .how .po.is-on { transition: none; transform: none; } }

/* an email as the inbox shows it */
.aud .em { width: 100%; max-height: 100%; overflow: hidden; background: #fff; border-radius: 10px; box-shadow: 0 14px 34px rgba(17,22,39,.32); padding: 18px 20px; display: grid; gap: 10px; align-content: start; font-size: .98rem; line-height: 1.45; color: var(--ink); }
.aud .em p { margin: 0; }
.aud .em-top { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.aud .em-top b { display: block; font-family: var(--ui); font-size: .92rem; }
.aud .em-top div span { font-family: var(--ui); font-size: .78rem; color: var(--ink-3); }
.aud .em-av { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #034638; color: #fff6ea; display: grid; place-items: center; font-family: var(--ui); font-weight: 700; font-size: .9rem; }
.aud .em-subj { font-family: var(--head); font-weight: 700; font-size: 1.2rem; line-height: 1.2; color: #034638; }
.aud .em-kicker { font-family: var(--ui); font-size: .8rem; color: var(--ink-3); }
.aud .em-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.aud .em-list li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; background: #fbfaf7; }
.aud .em-list span { font-family: var(--ui); font-size: .75rem; color: var(--ink-3); }
.aud .em-list b { font-family: var(--head); font-size: 1rem; color: #034638; }
.aud .em-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.aud .em-tags li { font-family: var(--ui); font-size: .74rem; font-weight: 700; color: #1d7a52; border: 1px solid rgba(29,122,82,.4); border-radius: 999px; padding: 2px 9px; }

.aud .how .plate-cap { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.aud .how .plate-cap .mini-crew { margin: 0; }
.aud .how .plate-cap p.crew-line { margin: 0; font-family: var(--head); font-weight: 600; font-size: 1.08rem; line-height: 1.35; flex: 1 1 340px; }
.aud .how .plate-cap .po-quiet { flex: 0 0 100%; margin: 0; color: var(--ink-3); }
.aud .how .side { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 28px 40px; align-items: start; margin-top: 22px; }
.aud .how .side .draft { max-width: 100%; margin-top: 0; }
.aud .how .side .io { margin: 0; gap: 10px; }
.aud .how .side .io div { grid-template-columns: 1fr; gap: 4px; padding: 14px 16px; background: #fff; border: 1px solid var(--rule); }
.aud .how .side .io dt { padding-top: 0; font-weight: 700; color: var(--ink-3); }
.aud .how .side .io dd { font-size: 1.02rem; line-height: 1.4; }
.aud .how .vt-row { margin-top: 14px; }

/* A09: Pockets larger in the proof */
.aud .proof .pockets-stage .uwee { width: min(440px, 100%); }

/* F25: the line and its link read as one sentence */
.aud .proof .yes-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--on-dark); font-weight: 600; }

@media (max-width: 860px) {
  .aud .how .po-stage { position: static; width: 100%; height: 470px; margin-top: 12px; }
  /* r4 (fixes 31/33/34/41): the waiting outputs sat 36px to the right of a full-width column, so the page scrolled to 410px.
     On a phone they wait in place and cut in; the column holds them, nothing is clipped */
  .aud .how .po, .aud .how .po.is-on { transform: none; }
  .aud .how .po-tab { background: var(--card); box-shadow: none; }
  .aud .how .side { grid-template-columns: 1fr; }
  .aud .proof .pockets-stage .uwee { width: min(300px, 80%); }
  .aud .promise h2 { font-size: clamp(1.9rem, 8.6vw, 2.4rem); }
}
/* rule 9 (FIX-P2 r1): in the pinned run (desktop, 100vh) the record room and the piece were width-bound and stopped ~240px above
   the bottom of the view. Here the room picture and the piece take more of the width, so each panel fills the view top to bottom
   (whole pictures, nothing cropped); the side column keeps the caption, crew and the return doors. */
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
  .aud .to-run { --per: 55vh; } /* two panels here: a shorter pinned scroll, so the run holds the screen ~270px less (and no tall band) */
  /* a piece whose room still the page already shows (R07) has no picture in the side column: the crew is shown there at a real size */
  .aud .to-panel .to-side:not(:has(.to-room)) .mini-crew { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 12px; }
  .aud .to-panel .to-side:not(:has(.to-room)) .mini-crew li { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 1rem; font-weight: 600; }
  .aud .to-panel .to-side:not(:has(.to-room)) .mini-crew .uwee { width: 104px !important; } /* overrides JINN.figure's inline 36px */
  .aud .to-panel .to-side:not(:has(.to-room)) .to-room-cap b { font-size: 1.15rem; }
  .aud .to-panel:not(.to-panel-record) .to-panel-in:not(:has(.dlv-lines)) { grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr); }
  .aud .to-panel:not(.to-panel-record) .to-panel-in:not(:has(.dlv-lines)) .to-art,
  .aud .to-panel:not(.to-panel-record) .to-panel-in:not(:has(.dlv-lines)) .to-art img { max-height: calc(100vh - 300px); }
}
/* the record panel: a narrower card, a wider room and the crew under it, only where the view is tall enough for the
   narrower (taller) card; a short laptop view (e.g. 1280x720) keeps the takeover.css layout so nothing clips */
@media (min-width: 861px) and (min-height: 840px) and (prefers-reduced-motion: no-preference) {
  .aud .to-panel-record .to-panel-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.95fr); grid-template-rows: auto auto; }
  .aud .to-panel-record .to-record { grid-row: 1 / span 2; } /* the crew line sits right under the room picture, no gap */
  .aud .to-panel-record .to-room-cap { align-self: start; }
  .aud .to-panel-record .to-room-cap .mini-crew { gap: 8px 22px; }
  .aud .to-panel-record .to-room-cap .mini-crew li { font-size: 1rem; font-weight: 600; }
  .aud .to-panel-record .to-room-cap .mini-crew .uwee { width: 76px !important; } /* the crew read at a glance (rule 11); overrides the inline 36px */
  .aud .to-panel-record .to-sw.is-named { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); } /* every swatch on one row */
}

/* SR (deviation): the audience heroes carry no host, so the h1 takes the host column too (their lede wrapper now carries .lede-block like the product heroes) */
.aud .phero .wrap > h1 { grid-column: 1 / -1; }

/* rule 3 (FIX-P2 r1): the agencies proof shows two client deliverables side by side at one height, each as wide as its own shape
   (a 4:5 landing page beside a square ad), so neither leaves empty space beside it; a phone stacks them full width */
.aud .dlv-proof-wrap--pair .dlv-proof { display: flex; align-items: flex-start; gap: clamp(24px, 3vw, 44px); }
.aud .dlv-proof-wrap--pair .dlv-proof .dlv-card { flex: var(--r) 1 0; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.aud .dlv-proof-wrap--pair .dlv-proof .dlv-meta { order: 0; }
@media (max-width: 860px) {
  .aud .dlv-proof-wrap--pair .dlv-proof { flex-direction: column; gap: 40px; }
  .aud .dlv-proof-wrap--pair .dlv-proof .dlv-card { flex: none; width: 100%; }
}
