/* ============================================================
   Rivioo — Oatmeal & Ink shared stylesheet (blog + legal pages)
   Tokens mirror public/index.html :root. Homepage keeps its own
   inline styles; every other page links this file.
   ============================================================ */
:root {
    --oat: #F3EDE2;
    --paper: #FBF8F1;
    --sand: #EAE3D5;
    --tgray: #D8D1C7;
    --border: #DED6C6;
    --ink: #2B2B2B;
    --ink-warm: #26231F;
    --muted: #7A746A;
    --on-ink: #F3EDE2;
    --on-ink-mut: rgba(243, 237, 226, .6);
    --accent: #B0543E;
    --accent-h: #9A4834;
    --danger: #C0564A;
    --sage: #6B8455;
    --pill: 999px; --rxl: 26px; --rlg: 18px; --rmd: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--oat);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    line-height: 1.65;
}
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; letter-spacing: -.01em; line-height: 1.15; }
a { color: inherit; }
img { max-width: 100%; }

/* ============ NAV (shared .header on all pages) ============ */
.header {
    background: rgba(243, 237, 226, .85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
}
.header-content {
    max-width: 1180px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 68px;
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 24px; width: auto; display: block; }
.nav-link {
    font-size: 14.5px; font-weight: 500; text-decoration: none;
    background: var(--accent); color: #fff;
    padding: 9px 18px; border-radius: var(--pill);
    transition: background .2s ease;
}
.nav-link:hover { background: var(--accent-h); }

/* ============ BLOG LISTING ============ */
.blog-container { max-width: 1180px; margin: 0 auto; padding: 56px 24px 72px; }
.blog-header { max-width: 720px; margin-bottom: 44px; }
.blog-header h1 { font-size: 44px; margin-bottom: 12px; }
.blog-header p { font-size: 17px; color: var(--muted); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.blog-card {
    display: flex; flex-direction: column; text-decoration: none; color: inherit;
    background: var(--paper); border: 1px solid var(--border); border-radius: var(--rlg);
    overflow: hidden;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s cubic-bezier(.2, .8, .2, 1), border-color .3s;
}
.blog-card:hover {
    transform: translateY(-5px) scale(1.012);
    box-shadow: 0 28px 52px -26px rgba(43, 43, 43, .42);
    border-color: var(--muted);
}
.blog-card-image {
    min-height: 160px; display: flex; align-items: center; justify-content: center;
    background: var(--sand); color: var(--ink); font-size: 2.6rem;
    border-bottom: 1px solid var(--border);
}
.blog-card-image.dark { background: var(--ink-warm); color: var(--oat); border-bottom: none; }
.blog-card-content { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }
.blog-card-meta-item { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.blog-card-meta-item.tag { background: var(--sand); color: var(--ink); padding: 4px 10px; border-radius: 7px; font-weight: 500; }
.blog-card-title { font-size: 21px; margin-bottom: 10px; }
.blog-card-excerpt { font-size: 14.5px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.blog-card-link { margin-top: auto; font-size: 14px; font-weight: 500; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }

/* ============ ARTICLE (blog posts) ============ */
.article-container { max-width: 780px; margin: 0 auto; padding: 48px 24px 72px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.article-header { margin-bottom: 36px; }
.article-header h1 { font-size: 40px; margin: 14px 0 18px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; }
.article-meta-item { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.article-intro { font-size: 17.5px; color: var(--muted); line-height: 1.65; margin-top: 4px; }
.article-intro a, .article-content a, .article-footer a, .faq-answer a { color: var(--ink); text-decoration: underline; }
.hero-image { width: 100%; border-radius: 14px; border: 1px solid var(--border); margin-top: 24px; }

.toc { background: var(--paper); border: 1px solid var(--border); border-radius: var(--rlg); padding: 22px 26px; margin-bottom: 40px; }
.toc h2 { font-size: 17px; margin-bottom: 12px; font-family: 'Inter', sans-serif; font-weight: 500; }
.toc ul { list-style: none; }
.toc li { margin: 7px 0; }
.toc a { color: var(--muted); text-decoration: none; font-size: 14.5px; }
.toc a:hover { color: var(--ink); text-decoration: underline; }

.article-content h2 { font-size: 29px; margin: 44px 0 16px; }
.article-content h3 { font-size: 22px; margin: 32px 0 12px; }
.article-content h4 { font-size: 17.5px; margin: 24px 0 10px; }
.article-content p { margin: 0 0 18px; color: #45413B; }
.article-content ul, .article-content ol { margin: 0 0 20px; padding-left: 24px; color: #45413B; }
.article-content li { margin: 7px 0; }
.article-content strong { color: var(--ink); font-weight: 600; }

/* ---- callout boxes ---- */
.highlight-box, .info-box, .technical-box, .success-box, .example, .step-box, .use-case-card {
    background: var(--paper); border: 1px solid var(--border); border-radius: var(--rlg);
    padding: 24px 26px; margin: 24px 0;
}
/* warning = semantic danger cue, never the accent (accent is reserved for conversion) */
.warning-box {
    background: var(--paper); border: 1px solid var(--border); border-left: 3px solid var(--danger);
    border-radius: var(--rmd); padding: 24px 26px; margin: 24px 0;
}
.highlight-box h3, .info-box h3, .warning-box h3, .technical-box h3, .success-box h3,
.highlight-box h4, .info-box h4, .warning-box h4, .technical-box h4, .success-box h4, .use-case-card h4 { margin-top: 0; }
/* callouts hug their content — the article's paragraph/list margins stop at the card edge */
.highlight-box > :last-child, .info-box > :last-child, .warning-box > :last-child,
.technical-box > :last-child, .success-box > :last-child, .example > :last-child,
.step-box > :last-child, .use-case-card > :last-child, .tool-card > :last-child { margin-bottom: 0; }
.disclaimer, .pricing-disclaimer { font-size: 13px; color: var(--muted); background: var(--sand); border-radius: var(--rmd); padding: 14px 18px; margin: 24px 0; }

/* ---- steps ---- */
.steps { margin: 24px 0; }
.step-item { display: flex; gap: 16px; margin: 18px 0; }
.step-number {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    background: var(--ink); color: var(--oat);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Fraunces', serif; font-size: 15px;
}
.step-title { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.step-content { color: #45413B; }

/* ---- tables ----
   .comparison-table / .data-table are wrapper DIVs around a bare <table> in post markup;
   the wrapper is the card (border, radius, horizontal scroll), the inner table collapses. */
.comparison-table, .data-table { margin: 24px 0; background: var(--paper); border: 1px solid var(--border); border-radius: var(--rmd); overflow: hidden; overflow-x: auto; }
.comparison-table table, .data-table table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.comparison-table th, .data-table th { background: var(--sand); color: var(--muted); font-weight: 500; text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.comparison-table td, .data-table td { padding: 12px 14px; border-bottom: 1px solid #EFE9DD; color: #45413B; vertical-align: top; }
.comparison-table tr:last-child td, .data-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: rgba(43, 43, 43, .025); }
.highlight-row td { background: var(--sand) !important; }
.check-icon { color: var(--sage); }
.cross-icon { color: var(--danger); }
.partial-icon { color: var(--muted); }
.warn-icon { color: var(--muted); }

/* ---- tool / pricing cards ---- */
.tool-card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--rlg); padding: 24px; margin: 20px 0; }
.tool-card h4 { margin-top: 0; font-size: 20px; }
.tool-card ul { list-style: none; padding-left: 0; }
.tool-card li { display: flex; gap: 9px; align-items: flex-start; margin: 8px 0; }
.price { font-family: 'Fraunces', serif; font-size: 19px; color: var(--ink); margin: 6px 0 14px; }
.pro { color: var(--sage); font-weight: 600; }
.con { color: var(--danger); font-weight: 600; }

/* ---- CTA ---- */
.cta-box {
    background: radial-gradient(480px 180px at 50% -10%, rgba(176, 84, 62, .2), transparent 64%), var(--ink-warm);
    border-radius: var(--rlg); padding: 36px 32px; margin: 44px 0; text-align: center;
    color: var(--on-ink);
}
.cta-box h2, .cta-box h3 { color: var(--on-ink); margin: 0 0 10px; }
.cta-box p { color: var(--on-ink-mut) !important; margin-bottom: 22px; }
.cta-box a:not(.cta-button) { color: var(--on-ink); }
.cta-button {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent); color: #fff !important;
    font-size: 15px; font-weight: 500; text-decoration: none !important;
    padding: 13px 26px; border-radius: var(--pill);
    transition: background .2s ease;
}
.cta-button:hover { background: var(--accent-h); }

/* ---- in-article FAQ ---- */
.faq-section { margin: 36px 0; }
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item:first-of-type { border-top: 1px solid var(--border); }
.faq-question { font-size: 16.5px; font-weight: 500; color: var(--ink); margin-bottom: 8px; font-family: 'Inter', sans-serif; }
.faq-answer { font-size: 14.5px; color: #45413B; line-height: 1.65; }

/* ---- editorial quote + emphasis (design doc: italic Fraunces, hairline — never accent) ---- */
.article-container blockquote {
    font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 19px;
    color: var(--ink); line-height: 1.5;
    border-left: 2px solid var(--tgray); padding: 4px 0 4px 22px; margin: 28px 0;
}
.article-container blockquote p { color: var(--ink); font-size: inherit; margin-bottom: 8px; }
.article-container blockquote cite, .article-container blockquote footer,
.article-container blockquote + p em { font-family: 'Inter', sans-serif; font-style: normal; font-size: 13px; color: var(--muted); }
.article-content em { font-family: 'Fraunces', Georgia, serif; font-style: italic; }

.article-footer { border-top: 1px solid var(--border); margin-top: 48px; padding-top: 22px; font-size: 13.5px; color: var(--muted); }

/* ============ LEGAL PAGES ============ */
.page-container { max-width: 720px; margin: 0 auto; padding: 48px 24px 72px; }
.page-container h1 { font-size: 38px; margin: 14px 0 8px; }
.page-container h2 { font-size: 22px; margin: 34px 0 10px; }
.page-container p, .page-container li { color: #45413B; font-size: 15px; }
.page-container p { margin: 0 0 14px; }
.page-container ul { margin: 0 0 16px; padding-left: 22px; }
.page-container a { color: var(--ink); text-decoration: underline; }
.updated { font-size: 13px; color: var(--muted); margin-bottom: 26px; }
.page-container table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--rmd); overflow: hidden; }
.page-container th { background: var(--sand); color: var(--muted); font-weight: 500; text-align: left; padding: 10px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); }
.page-container td { padding: 10px 14px; border-bottom: 1px solid #EFE9DD; }
.page-container tr:last-child td { border-bottom: none; }


/* ============ SITE FOOTER (ink slab, mirrors homepage) ============ */
.foot { background: var(--ink-warm); color: var(--on-ink); border-radius: var(--rxl) var(--rxl) 0 0; margin-top: 48px; }
.foot .wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.foot .cta { padding: 64px 0 56px; text-align: center; border-bottom: 1px solid rgba(243, 237, 226, .1); }
.foot .cta h2 { font-size: 38px; line-height: 1.08; margin: 0 auto 14px; max-width: 720px; color: var(--on-ink); }
.foot .cta h2 em { font-style: italic; }
.foot .cta p { font-size: 16px; color: var(--on-ink-mut); margin-bottom: 26px; }
.foot-grid { display: flex; justify-content: space-between; gap: 40px; padding: 52px 0 26px; flex-wrap: wrap; }
.foot-brand { max-width: 300px; }
.foot-brand img { height: 24px; width: auto; display: block; }
.foot-brand p { font-size: 14px; color: var(--on-ink-mut); margin-top: 14px; }
.foot-col h4 { font-size: 13px; font-weight: 500; color: var(--on-ink-mut); margin-bottom: 14px; font-family: 'Inter', sans-serif; letter-spacing: 0; }
.foot-col a { display: block; font-size: 14px; color: var(--on-ink); margin-bottom: 10px; opacity: .85; text-decoration: none; transition: opacity .2s; }
.foot-col a:hover { opacity: 1; }
.foot-bottom { display: flex; justify-content: space-between; font-size: 13px; color: var(--on-ink-mut); padding: 22px 0 38px; border-top: 1px solid rgba(243, 237, 226, .1); flex-wrap: wrap; gap: 10px; }
.foot-bottom a { color: var(--on-ink); opacity: .85; text-decoration: none; }
.foot-bottom a:hover { opacity: 1; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .blog-header h1 { font-size: 32px; }
    .article-header h1 { font-size: 30px; }
    .article-content h2 { font-size: 24px; }
    .page-container h1 { font-size: 30px; }
    .blog-grid { grid-template-columns: 1fr; }
    .comparison-table table, .data-table table { min-width: 560px; }
    .cta-box { padding: 28px 20px; }
    .foot .cta h2 { font-size: 28px; }
    .foot .cta { padding: 48px 0 44px; }
}
