/* Your Brand App — Article styles (extends main brand) */

:root {
    --paper: #ede2cd;
    --paper-deep: #e3d4b6;
    --paper-pale: #f5ecda;
    --cream: #fbf5e7;
    --ink: #1a110a;
    --ink-soft: #2a1d12;
    --muted: #6f5c47;
    --rule: #2a1d12;
    --rule-soft: rgba(42, 29, 18, 0.18);
    --copper: #b8651f;
    --copper-deep: #8a4811;
    --copper-pale: #e8b97a;
    --grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.07 0 0 0 0 0.04 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
*::selection { background: var(--ink); color: var(--copper-pale); }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Inter Tight", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: var(--grain);
    background-size: 220px 220px;
    opacity: 0.28;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 100;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.container { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }

/* Top strip + Nav (matches main site) */
.topstrip {
    background: var(--ink);
    color: var(--paper-pale);
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.topstrip-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    gap: 24px;
}
.topstrip span { display: inline-flex; align-items: center; gap: 9px; }
.topstrip .dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--copper);
    box-shadow: 0 0 8px var(--copper);
}

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(237, 226, 205, 0.92);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--rule);
}
.nav-inner {
    min-height: 60px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
}
.wordmark {
    font-family: "Fraunces", Georgia, serif;
    font-variation-settings: "opsz" 14, "SOFT" 80, "WONK" 1;
    font-weight: 500;
    font-size: 22px;
    letter-spacing: -0.018em;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}
.wordmark em {
    font-style: italic;
    font-variation-settings: "opsz" 14, "SOFT" 100, "WONK" 1;
    color: var(--copper-deep);
}
.wordmark sup {
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    color: var(--copper-deep);
    transform: translateY(-8px);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    justify-content: center;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.nav-links a {
    position: relative;
    padding: 6px 2px;
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 320ms cubic-bezier(.4,0,.2,1);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px 11px 18px;
    background: var(--ink);
    color: var(--paper-pale);
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid var(--ink);
    transition: background 220ms, color 220ms;
}
.nav-cta::after { content: "→"; font-size: 13px; transition: transform 220ms; }
.nav-cta:hover { background: var(--copper); color: var(--ink); }
.nav-cta:hover::after { transform: translateX(3px); }

/* Article masthead */
.article-mast {
    border-bottom: 1px solid var(--rule);
    padding: 28px 0 24px;
}
.article-mast .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--copper-deep);
    margin-bottom: 18px;
}
.article-mast .meta span { display: inline-flex; align-items: center; gap: 7px; }
.article-mast .meta span::before {
    content: "";
    width: 14px; height: 1px;
    background: var(--copper-deep);
}

/* Article body */
.article {
    width: min(720px, calc(100% - 48px));
    margin: 0 auto;
    padding: 56px 0 80px;
}

.article h1 {
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1;
    font-weight: 460;
    font-size: clamp(40px, 5.8vw, 78px);
    line-height: 0.96;
    letter-spacing: -0.028em;
    margin: 0 0 28px;
    color: var(--ink);
}
.article h1 em {
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
    color: var(--copper-deep);
}

.article .lede {
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 14, "SOFT" 30, "WONK" 1;
    font-weight: 460;
    font-size: clamp(20px, 1.6vw, 24px);
    line-height: 1.45;
    color: var(--ink-soft);
    margin: 0 0 48px;
    padding-top: 24px;
    border-top: 1px solid var(--rule-soft);
}
.article .lede em {
    font-style: italic;
    font-variation-settings: "opsz" 14, "SOFT" 100, "WONK" 1;
    color: var(--copper-deep);
}

.article h2 {
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1;
    font-weight: 500;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.05;
    letter-spacing: -0.018em;
    margin: 64px 0 18px;
    position: relative;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
}
.article h2 em {
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
    color: var(--copper-deep);
}
.article h2::before {
    content: attr(data-num);
    position: absolute;
    top: 24px;
    right: 0;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--copper-deep);
    font-weight: 400;
}

.article h3 {
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 14, "SOFT" 30, "WONK" 1;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 36px 0 12px;
}

.article p {
    font-size: 17px;
    line-height: 1.65;
    margin: 0 0 18px;
    color: var(--ink-soft);
}

.article p strong { color: var(--ink); font-weight: 600; }

.article a {
    color: var(--copper-deep);
    border-bottom: 1px solid var(--copper-deep);
    transition: background 220ms, color 220ms;
}
.article a:hover { background: var(--copper-deep); color: var(--cream); }

.article ul, .article ol {
    padding-left: 22px;
    margin: 0 0 24px;
}
.article li {
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink-soft);
    margin-bottom: 10px;
}
.article ul li::marker { color: var(--copper); content: "✦  "; }
.article ol li::marker {
    color: var(--copper-deep);
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
}

.article blockquote {
    margin: 36px 0;
    padding: 0 0 0 28px;
    border-left: 2px solid var(--copper);
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 14, "SOFT" 100, "WONK" 1;
    font-style: italic;
    font-weight: 500;
    font-size: clamp(20px, 1.6vw, 26px);
    line-height: 1.4;
    color: var(--ink);
}
.article blockquote cite {
    display: block;
    margin-top: 14px;
    font-family: "JetBrains Mono", monospace;
    font-style: normal;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--copper-deep);
}

/* Drop cap */
.article > p:first-of-type::first-letter {
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
    font-style: italic;
    font-weight: 500;
    font-size: 76px;
    line-height: 0.85;
    float: left;
    color: var(--copper-deep);
    margin: 6px 12px -6px 0;
}

/* Table of contents */
.toc {
    background: var(--cream);
    border: 1px solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    padding: 22px 26px;
    margin: 48px 0;
}
.toc .toc-head {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--copper-deep);
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule-soft);
}
.toc ol {
    padding-left: 0;
    margin: 0;
    list-style: none;
    counter-reset: toc-num;
}
.toc li {
    counter-increment: toc-num;
    margin: 0;
    padding: 8px 0;
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 15px;
    border-bottom: 1px dashed var(--rule-soft);
}
.toc li:last-child { border-bottom: 0; padding-bottom: 0; }
.toc li::before {
    content: counter(toc-num, decimal-leading-zero);
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    color: var(--copper-deep);
    letter-spacing: 0.04em;
}
.toc a {
    border-bottom: 0;
    color: var(--ink);
    flex: 1;
}
.toc a:hover { color: var(--copper-deep); background: transparent; }

/* Inline callout — editorial sidebar */
.callout {
    margin: 40px 0;
    padding: 28px 28px 30px;
    background: var(--ink);
    color: var(--paper-pale);
    border-left: 6px solid var(--copper);
    position: relative;
}
.callout .label {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--copper-pale);
    margin-bottom: 14px;
}
.callout h3 {
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1;
    font-weight: 500;
    font-size: 26px;
    line-height: 1.1;
    margin: 0 0 12px;
    color: var(--paper-pale);
}
.callout h3 em {
    font-style: italic;
    color: var(--copper-pale);
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.callout p {
    color: rgba(245, 236, 218, 0.85);
    font-size: 16px;
    margin: 0 0 18px;
}
.callout .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: var(--copper);
    color: var(--ink);
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 500;
    border: 0;
    transition: background 220ms;
}
.callout .btn::after { content: "→"; transition: transform 220ms; }
.callout .btn:hover { background: var(--copper-pale); }
.callout .btn:hover::after { transform: translateX(3px); }

/* Data tables in articles */
.article table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    background: var(--cream);
    margin: 36px 0;
    font-size: 14px;
}
.article table th, .article table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--rule-soft);
    border-right: 1px solid var(--rule-soft);
    vertical-align: top;
}
.article table th:last-child, .article table td:last-child { border-right: 0; }
.article table tr:last-child td { border-bottom: 0; }
.article table thead th {
    background: var(--paper-deep);
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
}

/* End-of-article CTA */
.end-cta {
    background: var(--cream);
    border: 1px solid var(--ink);
    box-shadow: 12px 12px 0 var(--ink);
    padding: 40px 36px 44px;
    margin: 72px 0 0;
    text-align: left;
}
.end-cta .eyebrow {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--copper-deep);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.end-cta .eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--copper-deep); }
.end-cta h3 {
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1;
    font-weight: 460;
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.02;
    letter-spacing: -0.022em;
    margin: 0 0 14px;
}
.end-cta h3 em {
    font-style: italic;
    color: var(--copper-deep);
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.end-cta p {
    margin: 0 0 22px;
    color: var(--ink-soft);
    font-size: 17px;
    max-width: 560px;
}
.end-cta .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.end-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: var(--ink);
    color: var(--paper-pale);
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid var(--ink);
    transition: background 220ms, color 220ms;
}
.end-cta .btn::after { content: "→"; transition: transform 220ms; }
.end-cta .btn:hover { background: var(--copper); color: var(--ink); }
.end-cta .btn:hover::after { transform: translateX(3px); }
.end-cta .btn-alt {
    background: transparent;
    color: var(--ink);
}
.end-cta .btn-alt:hover { background: var(--ink); color: var(--paper-pale); }

/* FAQ */
.faq {
    margin: 56px 0 0;
    border-top: 1px solid var(--rule);
    padding-top: 28px;
}
.faq summary {
    cursor: pointer;
    padding: 18px 0;
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 14, "SOFT" 30, "WONK" 1;
    font-weight: 600;
    font-size: 19px;
    line-height: 1.3;
    color: var(--ink);
    border-bottom: 1px dashed var(--rule-soft);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-family: "JetBrains Mono", monospace;
    color: var(--copper-deep);
    font-size: 20px;
    transition: transform 220ms;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
    padding: 16px 0 24px;
    color: var(--ink-soft);
    border-bottom: 1px dashed var(--rule-soft);
    margin: 0;
}

/* Blog index */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 48px;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.blog-card {
    padding: 36px 32px 40px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
    transition: background 240ms;
    display: block;
    position: relative;
}
.blog-card:nth-child(2n) { border-right: 0; }
.blog-card:nth-last-child(-n+2) { border-bottom: 0; }
.blog-card:hover { background: var(--paper-pale); }
.blog-card .blog-meta {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--copper-deep);
    margin-bottom: 18px;
    display: flex;
    gap: 14px;
}
.blog-card h2 {
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1;
    font-weight: 500;
    font-size: clamp(24px, 2.4vw, 32px);
    line-height: 1.05;
    letter-spacing: -0.018em;
    margin: 0 0 14px;
}
.blog-card h2 em {
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
    color: var(--copper-deep);
}
.blog-card p {
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 1.55;
    margin: 0;
}
.blog-card .read {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--copper-deep);
    transition: gap 240ms;
}
.blog-card:hover .read { gap: 14px; }
.blog-card .read::after { content: "→"; }

/* Footer (shared) */
footer {
    background: var(--ink);
    color: var(--paper-pale);
    padding: 60px 0 32px;
    position: relative;
}
footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--copper-pale) 0 6px, transparent 6px 14px);
    opacity: 0.4;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(245, 236, 218, 0.7);
}
.footer-inner a { color: var(--copper-pale); }
.footer-inner a:hover { color: var(--paper-pale); }

/* Responsive */
@media (max-width: 920px) {
    .nav-links { display: none; }
    .nav-inner { grid-template-columns: 1fr auto; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-card { border-right: 0; }
    .blog-card:nth-last-child(-n+2) { border-bottom: 1px solid var(--rule); }
    .blog-card:last-child { border-bottom: 0; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
    .container { width: min(100% - 28px, 1240px); }
    .article { padding: 36px 0 56px; }
    .topstrip span:nth-child(n+3) { display: none; }
    .article h2::before { display: none; }
    .end-cta { padding: 28px 22px; box-shadow: 6px 6px 0 var(--ink); }
    .toc { padding: 18px 20px; box-shadow: 6px 6px 0 var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
