/* Project narratives share the portfolio's type, neutral palette and glass controls. */
.story-page::before { height: 90px; }
.story-page::after { display:none; }
.story-page .case-study-page { width:min(1120px,calc(100% - 144px)); padding-bottom:80px; }
.story-page .case-study-video { height:min(72svh,640px); }
.story-page .case-study-media > .story-home-preview { width:100%; max-width:100%; height:min(72svh,640px)!important; padding:48px 10%!important; background:transparent; }
.story-content { margin:0 48px; }
.story-impact { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:32px; padding:36px 0; margin:40px 0 0; border-top:1px solid var(--theme-line); }
.story-impact dt { font-size:var(--story-title-size); font-weight:500; line-height:1.2; letter-spacing:-.035em; color:var(--theme-text); font-variant-numeric:lining-nums proportional-nums; font-kerning:normal; white-space:nowrap; }
.story-impact > div { min-width:0; }
/* Outcomes expressed in words are supporting headings, not display figures. */
:is([data-project-story="faire-for-teams"], [data-project-story="ad-formats"]) .story-impact dt,
[data-project-story="one-click-merchant-offers"] .story-impact > div:last-child dt { font-size:var(--story-heading-size); line-height:var(--story-heading-line-height); letter-spacing:-.02em; text-wrap:wrap; white-space:normal; }
.story-impact dd { margin:10px 0 0; max-width:none; font-size:var(--story-body-size); line-height:1.5; color:var(--theme-muted); }
.story-attribution { margin:14px 0 0; max-width:none; color:var(--theme-muted); font-size:var(--story-body-size); line-height:1.5; }
.story-section { padding:var(--story-section-space) 0 0; }
.story-section-header { max-width:none; margin:0 0 32px; }
.story-page .story-eyebrow,.story-page .ads-principles-eyebrow { display:none; }
.story-section h2 { margin:0; font-weight:500; font-size:var(--story-heading-size); line-height:var(--story-heading-line-height); letter-spacing:-.02em; text-wrap:wrap; }
.story-section-header > p { margin:18px 0 0; color:var(--theme-muted); font-size:var(--story-body-size); line-height:1.6; }
.story-section h3 { margin:0; font-size:var(--story-heading-size); line-height:var(--story-heading-line-height); font-weight:500; letter-spacing:-.02em; text-wrap:wrap; }
.story-section :is(p, dd), .story-impact dd, .story-attribution { text-wrap:wrap; }
.story-section figure { margin:0; min-width:0; }
.story-section figcaption { margin-top:18px; font-size:16px; line-height:1.5; }
.story-section figcaption p { margin:7px 0 0; color:var(--theme-muted); font-size:var(--story-body-size); line-height:1.6; }
.story-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.story-grid-two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.story-stage { position:relative; display:flex; align-items:center; justify-content:center; width:100%; aspect-ratio:4/3; overflow:hidden; border-radius:24px; background:var(--theme-surface); }
.story-stage img { display:block; width:100%; height:100%; object-fit:contain; }
.story-stage video { display:block; width:100%; height:100%; object-fit:contain; }
.story-stage.story-stage-tall { aspect-ratio:3/4; }
.story-stage.story-stage-wide { aspect-ratio:16/9; }
.story-stage.story-stage-clear { background:transparent; }
.story-caption-tag { display:inline-block; margin-top:10px; color:var(--theme-muted); font-size:var(--story-body-size); }
.story-note { margin:28px 0 0; padding-left:20px; border-left:1px solid var(--theme-line); color:var(--theme-muted); font-size:16px; line-height:1.6; max-width:none; }
.story-note strong { color:var(--theme-text); font-weight:500; }
.story-controls { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:24px 0 0; }
.story-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:11px 18px; border:1px solid var(--theme-line); border-radius:999px; background:var(--theme-glass); color:var(--theme-text); text-decoration:none; font:inherit; font-size:var(--story-body-size); line-height:1.4; cursor:pointer!important; transition:background .2s,transform .2s; }
.story-button:hover { background:var(--theme-selected); transform:translateY(-1px); }
.story-button:focus-visible { outline:2px solid var(--theme-text); outline-offset:4px; }
.story-button[aria-pressed="true"] { color:var(--theme-background); background:var(--theme-text); }
.story-button:disabled { opacity:.5; cursor:default!important; }
.story-button-link { padding:0; min-height:44px; background:transparent; border:0; border-radius:0; text-decoration:underline; text-underline-offset:5px; }
.story-controls-label { color:var(--theme-muted); font-size:var(--story-body-size); }
.story-reveal-gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.story-reveal-gallery .story-stage { aspect-ratio:3/4; }
.story-reveal-gallery .story-stage video { object-fit:contain; }
.story-media-control { position:absolute; bottom:14px; right:14px; min-height:40px; padding:9px 14px; font-size:var(--story-body-size); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); }
.story-journey { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px; }
.story-journey-step { padding:28px 0 0; border-top:1px solid var(--theme-line); }
.story-journey-step p { margin:10px 0 0; color:var(--theme-muted); font-size:var(--story-body-size); line-height:1.6; }
.story-journey-icon { display:flex; align-items:center; gap:5px; height:42px; margin-bottom:18px; }
.story-journey-icon i { display:block; width:10px; height:20px; border-radius:5px; background:var(--theme-text); opacity:.45; }
.story-journey-icon i:nth-child(2) { height:32px; opacity:.75; }
.story-journey-icon i:nth-child(3) { height:42px; opacity:1; }
.story-journey-icon.entry i { border-radius:50%; width:26px;height:26px; }
.story-journey-icon.entry i+ i { margin-left:-14px; }
.story-journey-icon.reveal i { transform:rotate(20deg); height:36px; width:22px; border-radius:5px; }
.story-architecture { padding:36px; background:var(--theme-surface); border-radius:24px; }
.story-architecture > p { margin:0 0 20px; font-size:14px; color:var(--theme-muted); }
.story-draw-window { padding:24px; border:1px solid var(--theme-line); border-radius:16px; background:var(--theme-background); }
.story-draw-window .draw-time { font-size:32px; letter-spacing:-.04em; margin:12px 0 4px; }
.story-draw-window .draw-result { padding-top:20px; margin-top:20px; border-top:1px solid var(--theme-line); font-size:15px; }
.story-draw-window small { color:var(--theme-muted); font-size:13px; }
.story-draw-window h3 { font-size:18px; line-height:1.3; }
.story-tabrow { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:22px; }
.story-tabrow span { font-size:13px; padding:6px 12px; border-radius:99px; }
.story-tabrow span:first-child { background:var(--theme-selected); }
.story-outcome-row { display:flex; gap:24px; align-items:start; justify-content:space-between; margin-top:24px; }
.story-outcome-row p { margin:0; font-size:16px; color:var(--theme-muted); line-height:1.6; }
.story-next { display:flex; justify-content:space-between; gap:24px; align-items:end; margin-top:var(--story-section-space); padding:32px 0; border-top:1px solid var(--theme-line); }
.story-next p { margin:0 0 8px; color:var(--theme-muted); font-size:var(--story-body-size); }
.story-next a { font-size:var(--story-heading-size); line-height:1.35; color:var(--theme-text); letter-spacing:-.02em; text-decoration:none; }
.story-next a:hover { text-decoration:underline; text-underline-offset:6px; }
.story-next .story-all-projects { color:var(--theme-muted); font-size:var(--story-body-size); white-space:nowrap; letter-spacing:0; }
.story-comparison { position:relative; padding:36px; border-radius:24px; background:var(--theme-surface); }
.story-comparison-track { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.story-comparison figure { opacity:.85; transition:opacity .4s,transform .4s; }
.story-comparison figure.is-active { opacity:1; transform:translateY(-6px); }
.story-comparison figure img { width:100%; height:340px; object-fit:contain; }
.story-comparison figcaption { color:var(--theme-text); font-size:var(--story-body-size); }
.story-comparison figcaption p { font-size:var(--story-body-size); }
.story-experiment-detail { margin-top:24px; display:grid; grid-template-columns:1fr 1fr; gap:24px; padding-top:24px; border-top:1px solid var(--theme-line); }
.story-experiment-detail p { margin:0; color:var(--theme-muted); font-size:16px; line-height:1.6; }
.story-experiment-detail strong { display:block; color:var(--theme-text); font-weight:500; margin-bottom:8px; }
.story-workflow { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.story-workflow span { padding:24px 16px; border-top:1px solid var(--theme-line); font-size:16px; line-height:1.5; }
.story-workflow small { display:block; margin-top:8px; font-size:var(--story-body-size); color:var(--theme-muted); }
.story-roles { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.story-role { padding:30px; border-radius:20px; background:var(--theme-surface); }
.story-role p { margin:14px 0 0; color:var(--theme-muted); font-size:16px; line-height:1.6; }
.story-builder { display:grid; grid-template-columns:1fr 1fr; overflow:hidden; border-radius:24px; background:var(--theme-surface); border:1px solid var(--theme-line); }
.story-builder-editor { padding:32px; }
.story-builder-editor label { display:block; margin:20px 0 8px; font-size:14px; }
.story-builder-editor label:first-child { margin-top:0; }
.story-builder-editor input,.story-builder-editor textarea { width:100%; border:1px solid var(--theme-line); border-radius:10px; padding:12px; background:var(--theme-background); color:var(--theme-text); font:inherit; font-size:16px; line-height:1.5; }
.story-builder-editor textarea { min-height:100px; resize:vertical; }
.story-builder-preview { padding:32px; display:flex; flex-direction:column; justify-content:center; gap:20px; border-left:1px solid var(--theme-line); }
.story-message { padding:24px; background:var(--theme-background); border-radius:18px; min-width:0; overflow-wrap:anywhere; }
.story-message .message-art { height:95px; border-radius:12px; background:var(--theme-selected); position:relative; overflow:hidden; margin-bottom:24px; }
.story-message .message-art::before,.story-message .message-art::after { content:"";position:absolute;width:78px;height:78px;border-radius:50%;background:var(--theme-text);opacity:.1;left:30%;top:12px; }
.story-message .message-art::after { left:46%;top:-6px;opacity:.25; }
.story-message h3 { font-size:22px; }
.story-message p { font-size:16px;line-height:1.5;color:var(--theme-muted);margin:12px 0 20px; }
.story-message .message-cta { display:inline-block;background:var(--theme-text);color:var(--theme-background);padding:10px 16px;border-radius:99px;font-size:14px;max-width:100%; }
.story-builder-preview > p { color:var(--theme-muted);font-size:var(--story-body-size);margin:0; }
.story-code { max-height:280px; overflow:auto; padding:24px; border:1px solid var(--theme-line); border-radius:16px; color:var(--theme-muted);font-size:13px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere; }
.story-home-preview { display:flex;align-items:center;justify-content:center;gap:5%;height:100%;padding:10%;background:var(--theme-surface); }
.story-home-preview-lines { display:grid;gap:12px;width:38%; }
.story-home-preview-lines i { height:12px;border-radius:5px;background:var(--theme-muted);opacity:.35; }
.story-home-preview-lines i:nth-child(2) { width:75%; }
.story-home-preview-lines i:last-child { height:32px;margin-top:12px;width:55%; }
.story-home-preview-card { width:44%;border-radius:12px;background:var(--theme-background);padding:9%;display:grid;gap:12px; }
.story-home-preview-card i { display:block;background:var(--theme-selected);height:28px;border-radius:4px; }
.story-home-preview-card i:first-child { height:64px; }
.story-home-preview-card i:last-child { height:16px;width:60%; }
body:has(.story-button:hover) .site-cursor,body:has(.story-builder:hover) .site-cursor { opacity:0; }
/* Narrative labels around interactive studies share the same three sizes.
   Diagram lettering, the message-builder demo, and actual product UI keep
   their authored type so the examples remain faithful to the projects. */
.story-page .ads-principles-intro h2 { font-size:var(--story-heading-size); line-height:1.35; }
.story-page .ads-principles-study h3 { font-size:var(--story-heading-size); line-height:var(--story-heading-line-height); letter-spacing:-.02em; }
.story-page .story-reveal-tab-title { font-size:var(--story-body-size); line-height:1.5; letter-spacing:0; }
.story-page .mm-results .mm-results-card h3 { font-size:var(--story-heading-size); line-height:var(--story-heading-line-height); font-weight:500; letter-spacing:-.02em; }
.story-page .ads-principles-description,
.story-page .ads-principles-control,
.story-page .ads-principles-footnote,
.story-page .ads-principles-study figcaption p,
.story-page .story-reveal-tab-description { font-size:var(--story-body-size); }
@media(max-width:899px) {
 .story-page .case-study-page { width:calc(100% - 64px); }
 .story-page .case-study-video { height:min(68svh,560px); }
 .story-page .case-study-media > .story-home-preview { height:min(68svh,560px)!important; }
 .story-content { margin:0 24px; }
 .story-journey,.story-workflow { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .story-grid,.story-reveal-gallery,.story-comparison-track { gap:16px; }
 .story-comparison { padding:24px; }
 .story-comparison figure img { height:260px; }
}
@media(max-width:599px) {
 .story-page .case-study-page { width:calc(100% - 32px); padding-top:48px; }
 .story-page .case-study-video { height:auto; max-height:60svh; }
 .story-page .case-study-media > .story-home-preview { height:auto!important; min-height:240px; aspect-ratio:4/3; padding:32px 10%!important; }
 .story-content { margin:0 8px; }
 .story-impact { gap:20px; grid-template-columns:1fr; padding:28px 0; margin-top:32px; }
 .story-impact > div { display:grid;grid-template-columns:.9fr 1.1fr;gap:20px;align-items:center; }
 .story-impact dd { margin:0; }
 .story-section-header { margin-bottom:24px; }
 .story-grid,.story-grid-two,.story-reveal-gallery,.story-roles { grid-template-columns:1fr;gap:32px; }
 .story-reveal-gallery .story-stage { aspect-ratio:1; }
 .story-stage,.story-comparison,.story-architecture { border-radius:18px; }
 .story-comparison { padding:20px 16px; }
 .story-comparison-track { grid-template-columns:1fr;gap:8px; }
 .story-comparison figure:not(.is-active) { display:none; }
 .story-comparison figure img { height:420px; }
 .story-experiment-detail,.story-builder { grid-template-columns:1fr; }
 .story-builder-editor,.story-builder-preview { padding:24px; }
 .story-builder-preview { border-left:0;border-top:1px solid var(--theme-line); }
 .story-architecture { padding:24px; }
 .story-next { align-items:start;flex-direction:column; }
 .story-workflow { gap:12px; }
 .story-workflow span { padding:20px 0; }
}
@media(prefers-reduced-motion:reduce) {
 .story-button,.story-comparison figure { transition:none; }
 .story-comparison figure { opacity:1;transform:none!important; }
}
.story-polish { display:flex; align-items:center; gap:40px; margin-top:32px; padding:32px; border-radius:24px; background:var(--theme-surface); }
.story-polish img { width:160px; max-height:310px; object-fit:contain; flex:0 0 auto; }
.story-polish > div { flex:1; min-width:0; }
.story-polish > div > p:last-child { color:var(--theme-muted); font-size:16px; line-height:1.6; }
@media(max-width:599px) { .story-polish { gap:24px;padding:24px;flex-direction:column;align-items:flex-start; } .story-polish img { align-self:center; } }

.story-button[hidden] { display:none; }


/* Project identity stays secondary to the story headline. */
.story-page .case-study-project-label { margin:0 0 12px; color:var(--theme-muted); font-size:14px; line-height:1.5; }

/* Coinbase's three decisions lead into the experiment evidence and tier launch. */
[data-project-story="coinbase-one-basic"] { --story-section-space:96px; }
.coinbase-strategies { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:32px; padding-top:64px; }
.coinbase-strategy { min-width:0; }
.coinbase-strategy h2 { margin:0; color:var(--theme-text); font-size:var(--story-heading-size); font-weight:500; line-height:1.35; letter-spacing:-.02em; }
.coinbase-strategy p { margin:14px 0 0; color:var(--theme-muted); font-size:var(--story-body-size); line-height:1.6; }
.coinbase-basic-launch .story-section-header { margin-bottom:0; }
@media(max-width:999px) {
 .coinbase-strategies { grid-template-columns:1fr; gap:28px; padding-top:48px; }
}
@media(max-width:599px) {
 [data-project-story="coinbase-one-basic"] { --story-section-space:64px; }
 [data-project-story="coinbase-one-basic"] .story-impact > div { grid-template-columns:clamp(88px,20vw,104px) minmax(0,1fr); gap:20px; }
}

.story-brief .story-my-role { grid-column:1 / -1; }
.story-my-role a { color:var(--theme-text); text-underline-offset:3px; }
.story-my-role a:focus-visible { outline:2px solid var(--theme-text); outline-offset:3px; }
