/* Tighter Golf shared article styles */
* {
    box-sizing: border-box;
}

html {
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    max-width: 52rem;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 4.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.62;
    color: #1a1a1a;
    background: #fff;
}

body > header,
body > main,
body > article,
.container,
.page-wrapper,
.wrap,
.article-container,
.breadcrumb-container,
.content,
.hero {
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
}

body > header,
header,
.hero {
    margin-bottom: 1rem;
}

nav,
.breadcrumb,
.breadcrumbs,
.breadcrumb-container,
.breadcrumb-wrapper,
.article-meta,
.meta,
.meta-info,
.subtitle,
.lede,
.intro,
.tagline {
    color: #555;
}

nav,
.breadcrumb,
.breadcrumbs,
.breadcrumb-container {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.breadcrumb,
.breadcrumb-container ol {
    list-style: none;
    padding-left: 0;
    margin-top: 0;
}

.breadcrumb-container {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.breadcrumb li,
.breadcrumb-item {
    display: inline;
    margin-bottom: 0;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #999;
}

.breadcrumb-item.active {
    color: #555;
}

.breadcrumb-container a {
    color: #666;
    text-decoration: none;
}

.breadcrumb-container a:hover {
    color: #111;
    text-decoration: underline;
}

a {
    color: #005ea8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.brand,
.brand a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #111;
    font-weight: 700;
    text-decoration: none;
}

.subtitle,
.lede,
.intro,
.meta,
.meta-info,
.article-meta {
    margin-bottom: 0.75rem;
}

header .subtitle,
header .meta,
header .meta-info,
header .article-meta {
    margin-bottom: 0.35rem;
}

h1,
h2,
h3,
h4,
h5 {
    color: #111;
    line-height: 1.25;
}

h1 {
    margin: 0 0 0.5rem;
    font-size: 2.4rem;
}

h2 {
    margin: 1.5rem 0 0.6rem;
    font-size: 1.65rem;
}

h3 {
    margin: 1.25rem 0 0.45rem;
    font-size: 1.3rem;
}

h4,
h5 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.1rem;
}

p,
ul,
ol,
table,
blockquote {
    margin-top: 0;
    margin-bottom: 0.85rem;
}

ul,
ol {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.35rem;
}

strong {
    color: #000;
}

blockquote,
.emphasis-box,
.highlight,
.highlight-box,
.comparison-box,
.example-box,
.achievement-box,
.physics-box,
.revelation-box,
.proof-box,
.theorem-box,
.objection-box,
.problem,
.solution,
.callout,
.cta-box,
.closing-note,
.bottom-line,
.reference,
.status-box,
.axiom-box,
.algorithm-box,
.pullquote,
.example {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid #111;
    background: #f6f6f6;
}

blockquote {
    font-style: italic;
}

.cta,
.cta-section,
.article-links,
.read-next,
.conclusion {
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

.toc,
nav.toc {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: #f6f6f6;
    border: 1px solid #e5e5e5;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    padding: 0.75rem;
    border-bottom: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f2f2f2;
    font-weight: 700;
}

code,
.formula {
    font-family: "SF Mono", Monaco, Consolas, "Liberation Mono", monospace;
    background: #f2f2f2;
    border-radius: 4px;
}

code {
    padding: 0.15rem 0.35rem;
    font-size: 0.9em;
}

.formula {
    display: block;
    padding: 1rem;
    overflow-x: auto;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
}

hr,
.section-divider {
    margin: 1.25rem 0;
    border: 0;
    border-top: 1px solid #ddd;
}

.row,
.props-grid,
.intrigue-grid,
.comparison-grid,
.articles-grid,
.callouts,
.philosophy-stack {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.comparison-card,
.article-card {
    height: 100%;
    padding: 1.25rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.col-md-4 {
    min-width: 0;
}

.card-title,
.card h5,
.article-card h3 {
    margin-top: 0;
}

.card-text {
    color: #555;
}

.section-header {
    grid-column: 1 / -1;
    margin: 2.5rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

.section-header:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.scrollytelling-page {
    --scrolly-chrome-height: 9rem;
    --scrolly-footer-height: 3.25rem;
    max-width: none;
    padding: var(--scrolly-chrome-height) 0 var(--scrolly-footer-height);
    scroll-snap-type: y proximity;
}

.scrollytelling-page > .container {
    max-width: none;
    margin: 0;
}

.scrollytelling-page .breadcrumb-container,
.scrollytelling-page > footer,
.scrollytelling-page .container > header,
.scrollytelling-page .article-container > header,
.scrollytelling-page .scrolly-chrome {
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.scrollytelling-page .container > header,
.scrollytelling-page .article-container > header {
    margin-bottom: 0;
    padding-top: 0.25rem;
    padding-bottom: 1rem;
}

.scrollytelling-page .scrolly-chrome {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 200;
    width: min(100%, 52rem);
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
    transform: translateX(-50%);
}

.scrollytelling-page .scrolly-chrome .breadcrumb-container,
.scrollytelling-page .scrolly-chrome header,
.scrollytelling-page .scrolly-chrome .article-header {
    position: static;
    width: auto;
    max-width: none;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    background: transparent;
    transform: none;
}

.scrollytelling-page .scrolly-chrome .breadcrumb-container {
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0.5rem;
}

.scrollytelling-page .scrolly-chrome header,
.scrollytelling-page .scrolly-chrome .article-header {
    padding-top: 0;
    padding-bottom: 0;
}

.scrollytelling-article {
    max-width: none;
}

.scrolly-panel {
    position: sticky;
    top: var(--scrolly-chrome-height);
    z-index: 1;
    display: grid;
    min-height: 100svh;
    padding: 0 1.5rem;
    place-items: start center;
    background: #fff;
    scroll-snap-align: start;
    scroll-margin-top: var(--scrolly-chrome-height);
    scroll-snap-stop: normal;
}

.scrolly-copy {
    display: flex;
    min-height: calc(100svh - var(--scrolly-chrome-height) - var(--scrolly-footer-height));
    flex-direction: column;
    justify-content: center;
    width: min(100%, 44rem);
    margin: 0 auto;
    padding: clamp(2rem, 6svh, 4rem) 0;
}

.scrolly-copy h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: clamp(1.65rem, 3vw, 2.3rem);
}

.scrolly-copy p {
    max-width: 40rem;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.scrolly-next {
    position: fixed;
    right: max(1.25rem, calc((100vw - 52rem) / 2));
    bottom: 4.25rem;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid #111;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font: inherit;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.16);
}

.scrolly-next:hover {
    background: #333;
}

.scrolly-next:focus-visible {
    outline: 3px solid #c60000;
    outline-offset: 3px;
}

.scrolly-next[hidden] {
    display: none;
}

.article-list {
    padding-left: 1.25rem;
}

.article-list a {
    font-weight: 700;
}

.btn,
.cta-button,
p a[href*="book"],
p a[href*="articles"],
p a[href*="fivebar"] {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.7rem 1rem;
    border: 1px solid #111;
    border-radius: 5px;
    color: #fff;
    background: #111;
    font-weight: 700;
    text-decoration: none;
}

.preorder-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    min-width: 14rem;
    margin-top: 0.5rem;
    padding: 0.85rem 1.25rem;
    border: 0;
    border-radius: 8px;
    background: #b6b6b6;
    color: #fff;
    font: inherit;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn:hover,
.cta-button:hover,
p a[href*="book"]:hover,
p a[href*="articles"]:hover,
p a[href*="fivebar"]:hover {
    background: #333;
    text-decoration: none;
}

.preorder-button:disabled {
    cursor: not-allowed;
    background: linear-gradient(180deg, #b8b8b8 0%, #999 100%);
    color: #fff;
    opacity: 0.82;
    -webkit-tap-highlight-color: transparent;
}

footer,
.footer,
.author-bio {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 25;
    width: 100%;
    max-width: none;
    margin-top: 0;
    padding: 0.7rem max(1.5rem, calc((100vw - 52rem) / 2 + 1.5rem));
    border-top: 1px solid #ddd;
    background: #fff;
    color: #666;
    font-size: 0.9rem;
}

footer p,
.footer p,
.author-bio p {
    margin-bottom: 0;
}

.scrollytelling-page > footer {
    left: 0;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: max(1.5rem, calc((100vw - 52rem) / 2 + 1.5rem));
    padding-right: max(1.5rem, calc((100vw - 52rem) / 2 + 1.5rem));
}

@media (max-width: 1020px) {
    .row,
    .props-grid,
    .intrigue-grid,
    .comparison-grid,
    .articles-grid,
    .callouts,
    .philosophy-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    html {
        font-size: 16px;
    }

    body {
        padding: 1.25rem 1rem 4.5rem;
    }

    body.scrollytelling-page {
        padding: var(--scrolly-chrome-height) 0 var(--scrolly-footer-height);
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.45rem;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    .preorder-button {
        width: 100%;
        min-width: 0;
        min-height: 3.25rem;
        border-radius: 10px;
        font-size: 1rem;
    }

    .row,
    .props-grid,
    .intrigue-grid,
    .comparison-grid,
    .articles-grid,
    .callouts,
    .philosophy-stack {
        grid-template-columns: 1fr;
    }

    .scrollytelling-page .breadcrumb-container,
    .scrollytelling-page > footer,
    .scrollytelling-page .container > header,
    .scrollytelling-page .article-container > header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .scrolly-panel {
        align-items: start;
        min-height: auto;
        padding: 4rem 1rem;
        position: relative;
        scroll-snap-align: none;
        scroll-margin-top: 0;
    }

    .scrolly-next {
        right: 1rem;
        bottom: 4.25rem;
        width: 3.25rem;
        height: 3.25rem;
    }

    footer,
    .footer,
    .author-bio {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
