/* Shared narrative pages. The existing stylesheet owns navigation, themes and forms. */
.story-page { --story-accent: #62d8bd; --story-line: rgba(145, 165, 185, .22); }
.ps-light .story-page { --story-accent: #087765; --story-line: rgba(35, 60, 80, .18); }
.story-page main { overflow: clip; }
.story-container, .story-section { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.story-hero { padding-top: 158px; padding-bottom: 72px; }
.story-hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 70px; align-items: start; }
.story-page h1 { font-size: clamp(2.7rem, 4.5vw, 4.4rem); line-height: 1.08; font-weight: 650; letter-spacing: -.045em; max-width: 18ch; margin: 22px 0 28px; }
.story-page h2 { font-size: clamp(2rem, 3vw, 2.9rem); line-height: 1.16; letter-spacing: -.035em; font-weight: 600; margin: 0 0 24px; }
.story-page h3 { font-size: 1.4rem; line-height: 1.35; letter-spacing: -.02em; margin: 12px 0; }
.story-page main p { font-size: 1.0625rem; line-height: 1.8; color: var(--color-text-secondary); margin: 0 0 22px; }
.story-page main .story-lead { font-size: 1.2rem; line-height: 1.75; max-width: 52ch; }
.story-page main .story-kicker { color: var(--story-accent); font-size: .875rem; font-weight: 600; letter-spacing: .035em; margin-bottom: 22px; }
.story-status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: currentColor; vertical-align: 2px; }
.story-hero-signup { border-left: 1px solid var(--story-line); padding: 20px 0 4px 38px; }
.story-hero-signup h2 { font-size: 1.9rem; margin-bottom: 12px; }
.story-hero-signup .newsletter-form-row { flex-direction: column; align-items: stretch; gap: 12px; }
.story-page .newsletter-field label { display: block; font-size: .875rem; margin-bottom: 8px; }
.story-page .newsletter-field { min-width: 0; width: 100%; }
.story-page .newsletter-input { width: 100%; min-width: 0; }
.story-page .newsletter-form-row { align-items: end; }
.story-page .newsletter-consent { margin-top: 16px; align-items: flex-start; }
.story-page .newsletter-consent input { flex-shrink: 0; margin-top: 5px; }
.story-page .newsletter-consent span { font-size: .875rem; line-height: 1.65; }
.story-page main .newsletter-provider, .story-page main .story-note { font-size: .875rem; line-height: 1.65; margin-top: 14px; }
.story-page .btn-primary { box-shadow: none; border: 1px solid transparent; }
.story-page .btn-primary:hover { transform: translateY(-1px); }
.story-page main a:not(.btn) { color: var(--story-accent); text-underline-offset: 5px; }
.story-page main a:not(.btn):hover { text-decoration: underline; }
.story-page .story-text-link { font-size: 1rem; display: inline-block; margin-top: 6px; }
.story-product { margin: 58px 0 0; }
.story-product img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--story-line); display: block; }
.story-product .screenshot-light { display: none; }
.ps-light .story-product .screenshot-dark { display: none; }
.ps-light .story-product .screenshot-light { display: block; }
.story-product figcaption { font-size: .875rem; color: var(--color-text-secondary); line-height: 1.65; margin-top: 14px; }
.story-section { border-top: 1px solid var(--story-line); padding: 82px 0; }
.story-split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 110px; }
.story-prose { max-width: 66ch; }
.story-chapters article + article { margin-top: 34px; padding-top: 34px; border-top: 1px solid var(--story-line); }
.story-label { color: var(--story-accent); font-size: .875rem; }
.story-signup { padding-bottom: 92px; }
.story-signup .newsletter-form-row { flex-wrap: wrap; }
.story-signup .newsletter-field { flex: 1 1 220px; }
.story-signup .newsletter-submit { flex: 0 1 auto; }
.story-page .newsletter-form { min-width: 0; width: 100%; }
.story-page .newsletter-status { font-size: 1rem; }
.story-intro { max-width: 760px; padding-bottom: 52px; }
.story-intro h1 { max-width: 22ch; }
.story-reading { max-width: 760px; }
.story-reading h2 { margin-top: 52px; }
.story-reading h3 { margin-top: 30px; }
.story-reading figure { margin-block: 32px; }
.story-reading img { width: 100%; height: auto; }
.story-directory { border-top: 1px solid var(--story-line); }
.story-directory article { padding: 32px 0; border-bottom: 1px solid var(--story-line); }
.story-directory h2 { font-size: 1.6rem; margin-bottom: 12px; }
.story-directory p { max-width: 68ch; }
.story-reading dl { margin: 28px 0; }
.story-reading dt { font-size: 1.125rem; font-weight: 600; margin-top: 24px; }
.story-reading dd { margin: 8px 0 26px; color: var(--color-text-secondary); line-height: 1.8; }
.story-table-wrap { overflow-x: auto; margin: 30px 0; }
.story-page table { width: 100%; border-collapse: collapse; font-size: 1rem; text-align: left; }
.story-page th, .story-page td { padding: 18px 14px; border-bottom: 1px solid var(--story-line); line-height: 1.6; }
.story-page th { color: var(--color-text-primary); font-weight: 600; }
.story-page td { color: var(--color-text-secondary); }
.story-page .story-meta { font-size: .875rem; }
.story-skip { position: fixed; top: -100px; left: 16px; z-index: 10000; padding: 12px 20px; background: var(--color-bg-primary); color: var(--color-text-primary); }
.story-skip:focus { top: 12px; }
.story-page :focus-visible { outline: 2px solid var(--story-accent); outline-offset: 5px; }
.story-page [id] { scroll-margin-top: 110px; }
@media (max-width: 950px) {
 .story-hero-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
 .story-split { gap: 48px; }
 .story-hero-signup { padding-left: 24px; }
 .story-page h1 { font-size: 3rem; }
}
@media (max-width: 700px) {
 .story-container, .story-section { width: calc(100% - 40px); }
 .story-hero { padding-top: 112px; padding-bottom: 45px; }
 .story-hero-grid, .story-split { grid-template-columns: 1fr; gap: 28px; }
 .story-page h1 { font-size: clamp(2.4rem, 9.5vw, 3.5rem); }
 .story-page h1 br, .story-page h2 br { display: none; }
 .story-hero-signup { border-left: 0; border-top: 1px solid var(--story-line); padding: 28px 0 0; }
 .story-section { padding-block: 48px; }
 .story-product { margin-top: 36px; }
 .story-page .newsletter-form-row { flex-direction: column; align-items: stretch; }
 .story-signup .newsletter-field { flex-basis: auto; }
 .story-page table { min-width: 540px; }
}
@media (prefers-reduced-motion: reduce) { .story-page .btn { transition: none; transform: none; } }
/* Column signup forms must not inherit the row form's 320px flex basis. */
.story-page .story-hero-signup .newsletter-form-row { align-items: stretch; }
.story-page .story-hero-signup .newsletter-field { flex: none; }
@media (max-width: 700px) { .story-page .newsletter-field { flex: none; } }
.story-page .story-mobile-cta { display: none; }
.story-actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
@media (max-width: 700px) { .story-page .story-mobile-cta { display: inline-flex; } }

/* Inline links remain identifiable without relying on their color. */
.story-page main p a:not(.btn), .story-page main dd a, .story-page main td a, .story-page .newsletter-consent a { text-decoration: underline; }

/* Keep the theme control from covering signup fields or mobile links. */
.story-page .theme-toggle-pill { position: relative; inset: auto; width: max-content; margin: 16px auto 28px; }
