/* Dave Reads - Shared Styles */
/* Substack-inspired. Charter + Inter. Clean white. */

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: Charter, 'Georgia', serif;
    color: #242424;
    line-height: 1.7;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

/* Top nav bar */
.topnav {
    border-bottom: 1px solid #e6e6e6;
    padding: 12px 0;
}
.topnav-inner {
    max-width: 728px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: Inter, -apple-system, sans-serif;
    font-size: 0.85rem;
}
.topnav-title {
    font-weight: 600;
    color: #242424;
    text-decoration: none;
}
.topnav-links a {
    color: #757575;
    text-decoration: none;
    margin-left: 20px;
}
.topnav-links a:hover { color: #242424; }

/* Header / masthead */
.masthead {
    max-width: 728px;
    margin: 0 auto;
    padding: 48px 20px 40px;
    text-align: center;
    border-bottom: 1px solid #e6e6e6;
}
.masthead img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
}
.masthead h1 {
    font-family: Inter, -apple-system, sans-serif;
    font-size: 1.65rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.masthead .tagline {
    font-size: 1.05rem;
    color: #757575;
    max-width: 480px;
    margin: 0 auto 20px;
    line-height: 1.5;
}
.masthead .author-line {
    font-family: Inter, -apple-system, sans-serif;
    font-size: 0.85rem;
    color: #757575;
}
.masthead .author-line a { color: #242424; text-decoration: none; }

/* Post list (archive page) */
.posts {
    max-width: 728px;
    margin: 0 auto;
    padding: 0 20px;
}
.post-item {
    padding: 32px 0;
    border-bottom: 1px solid #e6e6e6;
}
.post-meta {
    font-family: Inter, -apple-system, sans-serif;
    font-size: 0.8rem;
    color: #757575;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.post-item h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.post-item h2 a { color: #242424; text-decoration: none; }
.post-item h2 a:hover { color: #757575; }
.post-subtitle {
    font-size: 1.05rem;
    color: #757575;
    margin-bottom: 16px;
    line-height: 1.5;
}
.post-item .read-more {
    font-family: Inter, -apple-system, sans-serif;
    font-size: 0.85rem;
    color: #757575;
    text-decoration: none;
}
.post-item .read-more:hover { color: #242424; }

/* Full post */
.post-full {
    max-width: 728px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}
.post-full .post-header {
    margin-bottom: 32px;
}
.post-full .post-header h1 {
    font-size: clamp(1.7rem, 4vw, 2.2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.post-full .post-header .subtitle {
    font-size: 1.15rem;
    color: #757575;
    margin-bottom: 16px;
}
.post-full .post-header .meta-line {
    font-family: Inter, -apple-system, sans-serif;
    font-size: 0.85rem;
    color: #757575;
    display: flex;
    align-items: center;
    gap: 12px;
}
.post-full .post-header .meta-line img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.post-full .post-header .meta-line a { color: #242424; text-decoration: none; }
.post-full .hero-img {
    width: 100%;
    border-radius: 0;
    margin-bottom: 32px;
}
.post-full p {
    font-size: 1.125rem;
    margin-bottom: 1.5em;
    color: #242424;
}
.post-full h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 2.5em;
    margin-bottom: 0.8em;
    letter-spacing: -0.01em;
}
.post-full h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.6em;
}
.post-full a { color: #242424; text-decoration: underline; text-underline-offset: 2px; }
.post-full a:hover { color: #757575; }
.post-full blockquote {
    border-left: 3px solid #242424;
    margin: 1.5em 0;
    padding: 0.2em 0 0.2em 1.2em;
    font-style: italic;
}
.post-full blockquote cite {
    font-style: normal;
    font-size: 0.9rem;
    color: #757575;
    display: block;
    margin-top: 0.5em;
}
.post-full table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
}
.post-full th, .post-full td {
    border: 1px solid #e6e6e6;
    padding: 10px 14px;
    text-align: left;
}
.post-full th {
    background: #f7f7f7;
    font-family: Inter, -apple-system, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #757575;
}
.post-full tr.pick { background: #fffbeb; }
.post-full sup {
    font-size: 0.7em;
    color: #757575;
}
.post-full sup a { text-decoration: none; color: #757575; }

/* CTA box */
.cta-box {
    background: #f7f7f7;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 24px 28px;
    margin: 2em 0;
    text-align: center;
}
.cta-box p { font-size: 1rem; margin-bottom: 0.8em; }
.cta-box a.cta {
    display: inline-block;
    background: #242424;
    color: #fff;
    padding: 10px 24px;
    border-radius: 100px;
    text-decoration: none;
    font-family: Inter, -apple-system, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
}
.cta-box a.cta:hover { background: #444; color: #fff; }

/* Footnotes */
.footnotes {
    margin-top: 3em;
    padding-top: 1.5em;
    border-top: 1px solid #e6e6e6;
    font-size: 0.9rem;
    color: #757575;
}
.footnotes ol { padding-left: 1.5em; }
.footnotes li { margin-bottom: 0.5em; }

/* Footer */
.site-footer {
    max-width: 728px;
    margin: 0 auto;
    padding: 40px 20px;
    border-top: 1px solid #e6e6e6;
    font-family: Inter, -apple-system, sans-serif;
    font-size: 0.8rem;
    color: #999;
    text-align: center;
}

/* Divider */
.section-divider {
    text-align: center;
    margin: 2em 0;
    color: #ccc;
    font-size: 1.2rem;
    letter-spacing: 0.5em;
}

/* Sticky bottom bar */
.sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f7f7f7;
    border-top: 1px solid #e6e6e6;
    padding: 12px 20px;
    z-index: 9999;
    font-family: Inter, -apple-system, sans-serif;
    font-size: 0.85rem;
    color: #242424;
}
.sticky-bar-inner {
    max-width: 728px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.sticky-bar-text { flex: 1; line-height: 1.4; }
.sticky-bar-text a {
    color: #242424;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.sticky-bar-text a:hover { color: #757575; }
.sticky-bar-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.sticky-bar-close:hover { color: #242424; }

/* Email subscribe widget */
.dr-sub-box {
    background: #f7f7f7;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 24px 28px;
    margin: 2em 0;
}
.dr-sub-heading {
    font-family: Inter, -apple-system, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #242424;
    margin-bottom: 6px !important;
}
.dr-sub-text {
    font-size: 0.9rem;
    color: #757575;
    margin-bottom: 16px !important;
    line-height: 1.5;
}
.dr-sub-row {
    display: flex;
    gap: 8px;
}
.dr-sub-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    font-family: Inter, -apple-system, sans-serif;
    font-size: 0.9rem;
    color: #242424;
    background: #fff;
    outline: none;
}
.dr-sub-input:focus {
    border-color: #242424;
}
.dr-sub-btn {
    padding: 10px 20px;
    background: #242424;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: Inter, -apple-system, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
.dr-sub-btn:hover {
    background: #444;
}
.dr-sub-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.dr-sub-fine {
    font-size: 0.75rem;
    color: #999;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}
.dr-sub-thanks {
    font-family: Inter, -apple-system, sans-serif;
    font-size: 0.95rem;
    color: #242424;
    font-weight: 500;
    margin: 0 !important;
}

@media (max-width: 600px) {
    .masthead { padding: 32px 20px 28px; }
    .post-full p { font-size: 1.05rem; }
    .topnav-links a { margin-left: 12px; font-size: 0.8rem; }
    .dr-sub-row { flex-direction: column; }
    .dr-sub-btn { width: 100%; }
}
