/* Case study templates: Keynote, Editorial, Chapters. Values from design_handoff_portfolio_v2. */
:root {
  --black: #000;
  --ink: #1d1d1f;
  --grey-bg: #f5f5f7;
  --white: #fff;
  --text-2: #424245;
  --text-3: #6e6e73;
  --text-4: #86868b;
  --on-dark: #f5f5f7;
  --on-dark-2: #a1a1a6;
  --line: #e8e8ed;
  --line-grey: #d2d2d7;
  --link: #0066cc;
  --link-hover: #0077ed;
  --link-dark: #2997ff;
  --button: #0071e3;
  --wip: #b64400;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --page-width: 1160px;
}

* { box-sizing: border-box; }
html, body { margin: 0; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter Tight", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; }
html, body.cs { background: var(--grey-bg); }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--link-dark); outline-offset: 3px; border-radius: 4px; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Shared hero */
.hero { background: var(--black); color: var(--on-dark); overflow: hidden; position: relative; }
.topbar { margin: 0 auto; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; position: relative; z-index: 2; }
.topbar-name { color: var(--on-dark); font-weight: 600; }
.topbar-back { color: var(--on-dark-2); }
.eyebrow { color: var(--accent); font-weight: 600; }
.meta-k, .meta-v { display: block; }

.dev-laptop { position: relative; }
.dev-laptop > img:first-child { width: 100%; height: auto; display: block; }
.dev-phone, .dev-tablet { position: absolute; height: auto; }
.dev-phones { display: flex; justify-content: center; align-items: flex-end; }
.dev-phones img { height: auto; }

/* Shared footer buttons */
.close { background: var(--black); color: var(--on-dark); }
.close-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-next { padding: 13px 24px; border-radius: 999px; background: var(--button); color: var(--white); font-size: 17px; white-space: nowrap; }
.btn-next:hover { background: var(--link-hover); color: var(--white); }
.btn-touch { padding: 13px 24px; border-radius: 999px; border: 1px solid var(--link-dark); color: var(--link-dark); font-size: 17px; white-space: nowrap; }
.btn-touch:hover { color: var(--on-dark); border-color: var(--on-dark); }
.copyright { font-size: 13px; color: var(--text-4); }

.b-img { width: min(100%, 260px); height: auto; display: block; }
.sec-meta-k { color: var(--text-3); }

/* ------------------------------ Keynote ------------------------------ */
.cs-keynote .topbar { max-width: var(--page-width); }
.cs-keynote .hero-glow { position: absolute; left: 50%; top: 70%; width: min(1200px, 130vw); height: 800px; transform: translate(-50%, -50%); pointer-events: none; background: radial-gradient(50% 50% at 50% 50%, var(--glow), rgba(0, 0, 0, 0) 70%); }
.cs-keynote .hero-text { position: relative; max-width: 980px; margin: 0 auto; padding: clamp(48px, 8vh, 88px) 24px 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cs-keynote .eyebrow { font-size: clamp(15px, 1.5vw, 17px); }
.cs-keynote h1 { font-size: clamp(48px, 8vw, 104px); line-height: 1; font-weight: 600; letter-spacing: -.045em; }
.cs-keynote .summary { max-width: 640px; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.45; color: var(--on-dark-2); text-wrap: pretty; }
.cs-keynote .hero-devices { position: relative; max-width: var(--page-width); margin: clamp(40px, 6vh, 64px) auto 0; padding: 0 24px; }
.cs-keynote .hero-devices .dev-phone { right: -3%; bottom: -6%; width: 19%; transform: rotate(4deg); }
.cs-keynote .hero-devices .dev-phones { gap: clamp(12px, 2vw, 28px); }
.cs-keynote .hero-devices .dev-phones img { width: clamp(100px, 22vw, 250px); }
.cs-keynote .hero-meta { position: relative; max-width: 980px; margin: clamp(40px, 6vh, 64px) auto 0; padding: 28px 24px 36px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; justify-content: center; gap: 16px clamp(28px, 5vw, 64px); flex-wrap: wrap; }
.cs-keynote .hero-meta > div { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; max-width: 260px; }
.cs-keynote .meta-k { font-size: 13px; color: var(--text-4); }
.cs-keynote .meta-v { font-size: 15px; font-weight: 500; color: var(--on-dark); }
.cs-keynote .hero-end { height: 48px; }

.cs-keynote .chapters { position: sticky; top: 0; z-index: 10; display: flex; justify-content: center; padding: 12px 16px; background: rgba(245, 245, 247, .82); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid rgba(0, 0, 0, .06); }
.cs-keynote .chapters-pills { position: relative; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--white); box-shadow: 0 1px 3px rgba(0, 0, 0, .06); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.cs-keynote .chapters-pills::-webkit-scrollbar { display: none; }
.cs-keynote .chapters-pills a { flex: none; padding: 8px 15px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--text-2); transition: background .3s, color .3s; }
.cs-keynote .chapters-pills a.is-active { background: var(--ink); color: var(--white); }

.cs-keynote .body { max-width: var(--page-width); margin: 0 auto; padding: clamp(40px, 7vh, 72px) 24px clamp(56px, 9vh, 96px); display: flex; flex-direction: column; gap: 20px; }
.cs-keynote .wip { border-radius: 20px; background: var(--white); padding: 22px 28px; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cs-keynote .wip-tag { flex: none; padding: 6px 12px; border-radius: 999px; background: #fff1e6; color: var(--wip); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.cs-keynote .wip p { flex: 1; min-width: 240px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.cs-keynote .sec { scroll-margin-top: 80px; background: var(--white); border-radius: 28px; padding: clamp(28px, 4.5vw, 56px); display: flex; flex-wrap: wrap; gap: 20px clamp(24px, 4vw, 48px); }
.cs-keynote .sec-side { display: flex; flex-direction: column; gap: 6px; flex: 0 0 200px; }
.cs-keynote .sec-n { font-size: 13px; font-weight: 600; color: var(--text-3); }
.cs-keynote .sec-k { font-size: 17px; font-weight: 600; color: var(--link); }
.cs-keynote .sec-eyebrow { font-size: 14px; color: var(--text-3); }
.cs-keynote .sec-body { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.cs-keynote .sec-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-keynote .sec-meta > span { padding: 6px 12px; border-radius: 999px; background: var(--grey-bg); font-size: 13px; color: var(--text-2); }
.cs-keynote .b-lead { font-size: clamp(21px, 2.4vw, 28px); line-height: 1.28; font-weight: 600; letter-spacing: -.02em; text-wrap: pretty; }
.cs-keynote .b-note { font-size: clamp(19px, 2vw, 23px); line-height: 1.35; font-weight: 500; letter-spacing: -.01em; text-wrap: pretty; }
.cs-keynote .b-h { margin-top: 8px; font-size: 21px; font-weight: 600; }
.cs-keynote .b-p { font-size: 17px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.cs-keynote .b-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 32px; }
.cs-keynote .b-list li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.5; }
.cs-keynote .b-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.cs-keynote .card { background: var(--grey-bg); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.cs-keynote .card-n { font-size: 13px; font-weight: 600; color: var(--text-3); }
.cs-keynote .card-h { font-size: 18px; line-height: 1.3; font-weight: 600; }
.cs-keynote .card-p { font-size: 15px; line-height: 1.5; color: var(--text-3); }
.cs-keynote .b-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.cs-keynote .step-n { width: 32px; height: 32px; border-radius: 50%; background: var(--button); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.cs-keynote .step-body { display: flex; flex-direction: column; gap: 4px; }
.cs-keynote .step-h { font-size: 18px; font-weight: 600; }
.cs-keynote .step-p { font-size: 15px; line-height: 1.5; color: var(--text-3); }
.cs-keynote .media-band { background: var(--black); border-radius: 28px; padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 56px); display: flex; justify-content: center; overflow: hidden; }
.cs-keynote .media-band .dev-laptop { width: 100%; max-width: 820px; }
.cs-keynote .media-band .dev-phone { right: -2%; bottom: -6%; width: 19%; }
.cs-keynote .media-band .dev-tablet { right: -3%; bottom: -6%; width: 36%; }
.cs-keynote .media-band .dev-phones { gap: clamp(12px, 3vw, 40px); flex-wrap: wrap; }
.cs-keynote .media-band .dev-phones img { width: clamp(140px, 20vw, 230px); }

.cs-keynote .close { padding: clamp(64px, 10vh, 104px) 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cs-keynote .close-h { max-width: 820px; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
.cs-keynote .close-p { max-width: 640px; font-size: 17px; line-height: 1.55; color: var(--on-dark-2); }
.cs-keynote .close-actions { justify-content: center; margin-top: 12px; }
.cs-keynote .copyright { margin-top: 40px; }

/* ------------------------------ Editorial ------------------------------ */
html:has(.cs-editorial), body.cs-editorial { background: #fbfbfd; }
.cs-editorial .topbar { max-width: var(--page-width); }
.cs-editorial .hero-split { max-width: var(--page-width); margin: 0 auto; padding: clamp(40px, 7vh, 80px) 24px clamp(56px, 9vh, 96px); display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.cs-editorial .hero-text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cs-editorial .eyebrow { font-size: 15px; }
.cs-editorial h1 { font-size: clamp(48px, 7vw, 88px); line-height: .98; font-weight: 600; letter-spacing: -.045em; }
.cs-editorial .tagline { font-size: clamp(19px, 2vw, 23px); font-weight: 600; letter-spacing: -.015em; }
.cs-editorial .summary { font-size: clamp(17px, 1.7vw, 20px); line-height: 1.5; color: var(--on-dark-2); text-wrap: pretty; }
.cs-editorial .hero-meta { display: grid; grid-template-columns: auto 1fr; gap: 10px 28px; font-size: 15px; margin-top: 6px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); }
.cs-editorial .hero-meta > div { display: contents; }
.cs-editorial .meta-k { color: var(--text-4); }
.cs-editorial .hero-devices { flex: 1.2 1 420px; min-width: 0; }
.cs-editorial .hero-devices .dev-phone { left: -6%; bottom: -8%; width: 22%; transform: rotate(-4deg); }
.cs-editorial .hero-devices .dev-phones { gap: clamp(10px, 1.6vw, 22px); }
.cs-editorial .hero-devices .dev-phones img { width: 31%; max-width: 220px; }

.cs-editorial .layout { max-width: var(--page-width); margin: 0 auto; padding: clamp(56px, 9vh, 96px) 24px; display: flex; flex-wrap: wrap; gap: clamp(32px, 6vw, 80px); align-items: flex-start; }
.cs-editorial .chapters { position: sticky; top: 32px; flex: 0 0 210px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.cs-editorial .chapters-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.cs-editorial .chapters a { display: grid; grid-template-columns: 24px 1fr; gap: 10px; line-height: 1.35; padding: 8px 0 8px 14px; border-left: 2px solid var(--line); color: var(--text-3); transition: color .3s, border-color .3s; }
.cs-editorial .chapters a.is-active { border-left-color: var(--button); color: var(--ink); font-weight: 600; }
.cs-editorial .chap-n { color: var(--text-3); font-variant-numeric: tabular-nums; }
.cs-editorial .body { flex: 1 1 520px; min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: clamp(48px, 7vh, 72px); }
.cs-editorial .wip { font-size: 15px; line-height: 1.6; color: var(--text-3); padding: 18px 22px; border-radius: 16px; background: #f2f2f5; }
.cs-editorial .wip-tag { font-weight: 600; color: var(--wip); }
.cs-editorial .sec { scroll-margin-top: 32px; display: flex; flex-direction: column; gap: 18px; }
.cs-editorial .sec-k { font-size: 14px; font-weight: 600; color: var(--link); }
.cs-editorial .sec-eyebrow { font-size: 14px; color: var(--text-3); margin-top: -10px; }
.cs-editorial .sec-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-editorial .sec-meta > span { padding: 6px 12px; border-radius: 999px; background: #f2f2f5; font-size: 13px; color: var(--text-2); }
.cs-editorial .b-lead { font-size: clamp(23px, 2.6vw, 30px); line-height: 1.3; font-weight: 600; letter-spacing: -.02em; text-wrap: pretty; }
.cs-editorial .b-note { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.4; font-weight: 500; font-style: italic; padding-left: 20px; border-left: 2px solid var(--line-grey); text-wrap: pretty; }
.cs-editorial .b-h { margin-top: 6px; font-size: 21px; font-weight: 600; }
.cs-editorial .b-p { font-size: 18px; line-height: 1.7; color: var(--text-2); text-wrap: pretty; }
.cs-editorial .b-list { display: flex; flex-direction: column; gap: 10px; }
.cs-editorial .b-list li { display: grid; grid-template-columns: 32px 1fr; gap: 8px; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.cs-editorial .list-n { color: var(--text-3); font-size: 14px; line-height: 1.95; font-variant-numeric: tabular-nums; }
.cs-editorial .b-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.cs-editorial .card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.cs-editorial .card-n { font-size: 13px; color: var(--text-3); }
.cs-editorial .card-h { font-size: 19px; line-height: 1.35; font-weight: 600; }
.cs-editorial .card-p { font-size: 15px; line-height: 1.55; color: var(--text-3); }
.cs-editorial .b-steps li { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; border-top: 1px solid var(--line); }
.cs-editorial .step-h { font-size: 18px; font-weight: 600; }
.cs-editorial .step-p { font-size: 16px; line-height: 1.6; color: var(--text-3); }
.cs-editorial .b-img { width: min(100%, 240px); }
.cs-editorial .media-band { background: var(--black); border-radius: 24px; padding: clamp(28px, 4vw, 48px); display: flex; justify-content: center; overflow: hidden; }
.cs-editorial .media-band .dev-laptop { width: 100%; max-width: 680px; }
.cs-editorial .media-band .dev-phone { right: -2%; bottom: -6%; width: 20%; }
.cs-editorial .media-band .dev-tablet { right: -3%; bottom: -6%; width: 36%; }
.cs-editorial .media-band .dev-phones { gap: clamp(10px, 2.5vw, 32px); width: 100%; }
.cs-editorial .media-band .dev-phones img { width: 30%; max-width: 200px; }

.cs-editorial .close { padding: clamp(56px, 9vh, 88px) 24px; }
.cs-editorial .close-inner { max-width: var(--page-width); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; }
.cs-editorial .close-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; }
.cs-editorial .close-h { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
.cs-editorial .close-p { font-size: 16px; line-height: 1.55; color: var(--on-dark-2); max-width: 560px; }
.cs-editorial .copyright { max-width: var(--page-width); margin: 48px auto 0; }

@media (max-width: 860px) {
  .cs-editorial .chapters { position: static; flex: 1 1 100%; }
}

/* ------------------------------ Chapters ------------------------------ */
.cs-chapters .topbar { max-width: var(--page-width); }
.cs-chapters .hero-title { max-width: var(--page-width); margin: 0 auto; padding: clamp(48px, 9vh, 96px) 24px 0; display: flex; flex-direction: column; gap: 14px; }
.cs-chapters .eyebrow { font-size: 17px; }
.cs-chapters h1 { font-size: clamp(56px, 11vw, 148px); line-height: .9; font-weight: 700; letter-spacing: -.055em; }
.cs-chapters .hero-split { max-width: var(--page-width); margin: clamp(28px, 4vh, 44px) auto 0; padding: 0 24px; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end; }
.cs-chapters .hero-text { flex: 1 1 360px; display: flex; flex-direction: column; gap: 14px; padding-bottom: clamp(40px, 8vh, 88px); }
.cs-chapters .tagline { font-size: clamp(19px, 2vw, 23px); font-weight: 600; }
.cs-chapters .summary { max-width: 480px; font-size: clamp(18px, 2vw, 24px); line-height: 1.4; color: var(--on-dark-2); text-wrap: pretty; }
.cs-chapters .hero-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.cs-chapters .hero-devices { flex: 1.3 1 460px; min-width: 0; margin-bottom: -2px; }
.cs-chapters .hero-devices .dev-laptop { margin-bottom: 40px; }
.cs-chapters .hero-devices .dev-phone { right: -2%; bottom: -8%; width: 20%; transform: rotate(5deg); }
.cs-chapters .hero-devices .dev-phones { align-items: flex-start; gap: clamp(10px, 2vw, 24px); padding: 28px 0 clamp(32px, 5vh, 56px); }
.cs-chapters .hero-devices .dev-phones img { width: 31%; max-width: 240px; }

.cs-chapters .meta-strip { background: var(--white); border-bottom: 1px solid var(--line); }
.cs-chapters .meta-grid { max-width: var(--page-width); margin: 0 auto; padding: clamp(32px, 5vh, 52px) 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; }
.cs-chapters .meta-grid > div { display: flex; flex-direction: column; gap: 6px; }
.cs-chapters .meta-k { font-size: 13px; color: var(--text-3); }
.cs-chapters .meta-v { font-size: 18px; font-weight: 600; line-height: 1.35; }
.cs-chapters .wip { background: var(--white); }
.cs-chapters .wip p { max-width: var(--page-width); margin: 0 auto; padding: 22px 24px; font-size: 15px; line-height: 1.6; color: var(--text-3); }
.cs-chapters .wip-tag { font-weight: 600; color: var(--wip); }

.cs-chapters .sec { --tone-fg: var(--ink); --tone-sub: var(--text-2); --tone-line: var(--line-grey); --tone-card: var(--white); --tone-key: var(--link); background: var(--grey-bg); color: var(--tone-fg); }
.cs-chapters .tone-white { --tone-line: var(--line); --tone-card: var(--grey-bg); background: var(--white); }
.cs-chapters .tone-dark { --tone-fg: var(--on-dark); --tone-sub: var(--on-dark-2); --tone-line: var(--accent); --tone-card: var(--ink); --tone-key: var(--accent); background: var(--black); }
.cs-chapters .sec-inner { max-width: var(--page-width); margin: 0 auto; padding: clamp(64px, 11vh, 112px) 24px; display: flex; flex-wrap: wrap; gap: 24px clamp(32px, 6vw, 88px); }
.cs-chapters .sec-side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 12px; }
.cs-chapters .sec-k { font-size: 15px; font-weight: 600; color: var(--tone-key); }
.cs-chapters .sec-eyebrow { font-size: 15px; color: var(--tone-sub); }
.cs-chapters .sec-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cs-chapters .sec-meta > span { font-size: 14px; }
.cs-chapters .sec-meta-k { color: var(--tone-sub); }
.cs-chapters .sec-meta-k::after { content: " ·"; }
.cs-chapters .sec-meta-v { color: var(--tone-fg); }
.cs-chapters .sec-body { flex: 2.2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cs-chapters .b-lead { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.18; font-weight: 600; letter-spacing: -.025em; text-wrap: pretty; }
.cs-chapters .b-note { font-size: clamp(21px, 2.4vw, 28px); line-height: 1.3; font-weight: 600; letter-spacing: -.015em; color: var(--tone-key); text-wrap: pretty; }
.cs-chapters .b-h { margin-top: 6px; font-size: 22px; font-weight: 600; }
.cs-chapters .b-p { font-size: 18px; line-height: 1.65; color: var(--tone-sub); text-wrap: pretty; }
.cs-chapters .b-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 28px; }
.cs-chapters .b-list li { padding: 16px 0; border-top: 2px solid var(--tone-line); font-size: 17px; line-height: 1.45; font-weight: 500; }
.cs-chapters .b-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.cs-chapters .card { background: var(--tone-card); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; min-height: 180px; }
.cs-chapters .card-n { font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -.04em; color: var(--tone-key); }
.cs-chapters .card-h { font-size: 19px; line-height: 1.3; font-weight: 600; }
.cs-chapters .card-p { font-size: 15px; line-height: 1.5; color: var(--tone-sub); }
.cs-chapters .b-steps li { display: grid; grid-template-columns: 52px 1fr; padding: 16px 0; border-top: 1px solid var(--tone-line); }
.cs-chapters .step-n { font-size: 15px; font-weight: 600; color: var(--tone-key); }
.cs-chapters .step-body { font-size: 18px; line-height: 1.45; }
.cs-chapters .step-h { font-weight: 600; }
.cs-chapters .step-p { color: var(--tone-sub); }
.cs-chapters .media-band { background: var(--line); padding: clamp(48px, 8vh, 88px) 24px; display: flex; justify-content: center; overflow: hidden; }
.cs-chapters .media-band .dev-laptop { width: 100%; max-width: 1000px; }
.cs-chapters .media-band .dev-laptop > img:first-child { }
.cs-chapters .media-band .dev-phone { right: -2%; bottom: -6%; width: 19%; }
.cs-chapters .media-band .dev-tablet { right: -3%; bottom: -6%; width: 36%; }
.cs-chapters .media-band .dev-phones { align-items: center; gap: clamp(12px, 3vw, 48px); max-width: 1000px; width: 100%; }
.cs-chapters .media-band .dev-phones img { width: 30%; max-width: 260px; }

.cs-chapters .close { padding: clamp(72px, 11vh, 112px) 24px 140px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cs-chapters .close-h { max-width: 820px; font-size: clamp(34px, 5vw, 60px); line-height: 1.05; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
.cs-chapters .close-p { max-width: 620px; font-size: 17px; line-height: 1.55; color: var(--on-dark-2); }
.cs-chapters .link-next { margin-top: 12px; font-size: 21px; color: var(--link-dark); }
.cs-chapters .link-touch { font-size: 17px; color: var(--on-dark-2); }
.cs-chapters .copyright { margin-top: 36px; }

.chapter-bar { position: fixed; left: 50%; bottom: 22px; z-index: 20; transform: translateX(-50%); max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px; background: rgba(29, 29, 31, .84); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.chapter-links { position: relative; display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.chapter-links::-webkit-scrollbar { display: none; }
.chapter-links a { flex: none; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--on-dark-2); transition: background .3s, color .3s; }
.chapter-links a.is-active { background: var(--on-dark); color: var(--ink); }
.chapter-div { flex: none; width: 1px; height: 18px; background: rgba(255, 255, 255, .2); margin: 0 4px; }
.chapter-next { flex: none; padding: 8px 14px; font-size: 13px; color: var(--link-dark); white-space: nowrap; }

/* Fan of phones, used in heroes */
.hero-devices .dev-phones[data-count="3"] img:nth-child(1) { transform: rotate(-5deg); }
.hero-devices .dev-phones[data-count="3"] img:nth-child(2) { transform: translateY(-24px); }
.hero-devices .dev-phones[data-count="3"] img:nth-child(3) { transform: rotate(5deg); }

/* Media bands: Keynote and Chapters tilt phones, Editorial keeps them straight */
.cs-keynote .media-band .dev-phones[data-count="3"] img:nth-child(1), .cs-chapters .media-band .dev-phones[data-count="3"] img:nth-child(1) { transform: rotate(-5deg); }
.cs-keynote .media-band .dev-phones[data-count="3"] img:nth-child(3), .cs-chapters .media-band .dev-phones[data-count="3"] img:nth-child(3) { transform: rotate(5deg); }
.cs-chapters .media-band .dev-phones[data-count="3"] img:nth-child(2) { transform: translateY(-24px); }
.cs-keynote .media-band .dev-phones[data-count="2"] img:nth-child(1), .cs-chapters .media-band .dev-phones[data-count="2"] img:nth-child(1) { transform: rotate(-3deg); }
.cs-keynote .media-band .dev-phones[data-count="2"] img:nth-child(2), .cs-chapters .media-band .dev-phones[data-count="2"] img:nth-child(2) { transform: rotate(3deg); }

/* Hero entrance */
@keyframes cs-rise { from { opacity: 0; transform: translateY(var(--rise, 40px)); } to { opacity: 1; transform: none; } }
@keyframes cs-slide { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes cs-phone-in { from { transform: translateY(30%) rotate(12deg); } to { transform: rotate(4deg); } }

@media (prefers-reduced-motion: no-preference) {
  .cs-keynote .hero-devices { animation: cs-rise 1.2s var(--ease-out) both; }
  .cs-chapters .hero-devices { --rise: 60px; animation: cs-rise 1.3s var(--ease-out) both; }
  .cs-editorial .hero-devices { animation: cs-slide 1.2s var(--ease-out) both; }
  .cs-keynote .hero-devices .dev-phone { animation: cs-phone-in 1.3s var(--ease-out) .2s both; }
}
.b-video { width: 100%; height: auto; display: block; border-radius: 16px; background: #000; }
.b-video-phone { width: min(100%, 320px); margin-inline: auto; border-radius: 32px; }
.cs-chapters .hero-devices .dev-tablet { right: -2%; bottom: -8%; width: 34%; }
.tabs-hero .hero-title { padding-bottom: clamp(24px, 4vh, 40px); }
.tabs-hero .summary { max-width: 640px; }
.tab-bar-wrap { position: sticky; top: 12px; z-index: 20; display: flex; justify-content: center; padding: 0 16px; margin: 0 0 -60px; pointer-events: none; }
.tab-bar { pointer-events: auto; display: flex; gap: 4px; max-width: 100%; padding: 6px; overflow-x: auto; scrollbar-width: none; border-radius: 999px; background: rgba(29, 29, 31, .86); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.tab-bar::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 44px; padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--on-dark-2); cursor: pointer; transition: background .3s, color .3s; }
.tab:hover { color: var(--on-dark); }
.tab.is-active { background: var(--on-dark); color: var(--ink); }
.tab:focus-visible { outline: 2px solid var(--link-dark); outline-offset: 2px; }
.tab-panel:focus-visible { outline: none; }
.panel-hero { background: var(--black); color: var(--on-dark); padding-top: 72px; }
.panel-title { font-size: clamp(34px, 5vw, 60px); line-height: 1.05; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
.cs-tabs .sec-inner { padding: clamp(36px, 6vh, 56px) 24px; }
.panel-close { background: var(--black); color: var(--on-dark); padding: clamp(48px, 8vh, 72px) 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.panel-close .close-h { max-width: 820px; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
.panel-close .close-p { max-width: 620px; font-size: 17px; line-height: 1.55; color: var(--on-dark-2); }
.cs-tabs .close { padding-top: clamp(48px, 8vh, 72px); padding-bottom: clamp(48px, 8vh, 72px); }
.hero-video-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 17px; font-weight: 600; color: var(--accent); }
.hero-video-link:hover { color: var(--on-dark); }
/* Shadows sit beside the images, never as a filter on them, so browsers keep the images at full resolution */
.dev-phone, .dev-phones img { border-radius: 15% / 7.2%; box-shadow: 0 20px 40px rgba(0, 0, 0, .3); }
.dev-tablet { border-radius: 3%; box-shadow: 0 20px 40px rgba(0, 0, 0, .3); }

