/* =====================================================================
   Real Estate Tax Tools - site theme (2026-11)
   "Ledger & blueprint": warm paper, evergreen ink, brass accents,
   serif headings, tabular figures. Loaded last on every page by
   tools/apply_theme.py, so it re-skins the older stylesheets without
   touching their markup.
   ===================================================================== */

/* ---- fonts:start (owner: main) ----
   Self-hosted since 2026-11-29 (was Google Fonts): Inter and Fraunces variable
   fonts, SIL Open Font License 1.1 (css/fonts/OFL-*.txt). Same files and
   unicode ranges Google serves; latin-ext loads only when a page needs it. */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/css/fonts/fraunces-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/css/fonts/fraunces-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/css/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/css/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ---- fonts:end ---- */

:root {
    --paper: #f7f4ee;
    --paper-2: #efeadf;
    --surface: #fffdf9;
    --line: #e3ddd0;
    --line-strong: #cdc6b6;
    --ink: #17211d;
    --ink-2: #36413b;
    --muted: #66706a;

    --green-950: #0d241c;
    --green-900: #112f25;
    --green-800: #173d30;
    --green-700: #1e5240;
    --green-600: #296a53;
    --green-100: #dde8e0;
    --green-50: #edf3ee;

    --brass: #a97a22;
    --brass-ink: #7c5a17;
    --brass-light: #e3bd6c;
    --brass-50: #f7eedb;

    --font-serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-primary: var(--font-sans);

    /* Re-point the tokens the older stylesheets already use */
    --primary-color: var(--green-700);
    --primary-light: var(--green-600);
    --primary-dark: var(--green-800);
    --primary-blue: var(--green-700);
    --primary-blue-light: var(--green-600);
    --primary-blue-dark: var(--green-900);
    --accent-green: var(--green-600);
    --accent-orange: var(--brass);
    --success-color: #2f7a4f;
    --warning-color: var(--brass);
    --white: var(--surface);

    --gray-50: #f7f4ee;
    --gray-100: #efebe2;
    --gray-200: #e3ddd0;
    --gray-300: #cdc6b6;
    --gray-400: #a29d90;
    --gray-500: #646b64;
    --gray-600: #56605a;
    --gray-700: #3b4540;
    --gray-800: #26302b;
    --gray-900: #17211d;

    --shadow-sm: 0 1px 2px rgba(23, 33, 29, 0.05);
    --shadow-md: 0 2px 8px rgba(23, 33, 29, 0.06);
    --shadow-lg: 0 10px 30px -12px rgba(23, 33, 29, 0.18);
    --shadow-xl: 0 18px 40px -16px rgba(23, 33, 29, 0.22);

    --hero-bg:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 28px 28px,
        radial-gradient(ellipse 70% 90% at 92% -10%, rgba(227, 189, 108, 0.20), transparent 60%),
        linear-gradient(160deg, var(--green-800) 0%, var(--green-900) 100%);
}

/* ---------- Base ---------- */
html { background: var(--paper); }
body {
    background: var(--paper) !important;
    color: var(--ink-2);
    font-family: var(--font-sans);
    font-feature-settings: "cv11", "ss01";
}
h1, h2, h3 {
    font-family: var(--font-serif);
    font-optical-sizing: auto;
    font-weight: 600;
    letter-spacing: -0.012em;
    color: var(--ink);
}
h4, h5, h6 { color: var(--ink); }
p { color: var(--ink-2); }
a { color: var(--green-700); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green-900); }
::selection { background: var(--brass-50); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

table, .result-value, .calculation-step .value, [class*="dr-line"], [class*="amount"], .stat-number, .fact-number {
    font-variant-numeric: tabular-nums;
}

/* ---------- Header (site-header.js, every page that uses it) ---------- */
.site-header {
    background: rgba(255, 253, 249, 0.94) !important;
    color: var(--ink) !important;
    box-shadow: none !important;
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    padding: 0.85rem 0 !important;
}
.site-header .logo .logo-text,
.site-header .logo h1,
.site-header .logo h2 {
    color: var(--green-800) !important;
    text-shadow: none !important;
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 650;
    letter-spacing: -0.015em;
}
.site-header .logo a { color: var(--green-800) !important; }
.site-header .main-nav a {
    color: var(--ink-2);
    border-radius: 6px;
    font-weight: 500;
}
.site-header .main-nav a:hover {
    color: var(--green-800);
    background: var(--green-50);
    transform: none;
}
.site-header .main-nav a.active {
    color: var(--green-800);
    background: transparent;
    box-shadow: none;
    font-weight: 600;
}
.site-header .main-nav a.active::after {
    width: calc(100% - 1.2rem);
    height: 2px;
    border-radius: 2px;
    bottom: -0.2rem;
    background: var(--brass);
}
.site-header .mobile-menu-toggle span { background: var(--green-800) !important; }

@media (max-width: 768px) {
    .site-header {
        background: rgba(255, 253, 249, 0.97) !important;
        padding: 0.7rem 0 !important;
    }
    .site-header .logo .logo-text { font-size: 1.15rem; }
    .site-header .mobile-menu-toggle {
        background: transparent !important;
        border: 1px solid var(--line-strong) !important;
    }
    .site-header .main-nav { background: var(--surface) !important; }
    .site-header .main-nav a { color: var(--ink) !important; }
    .site-header .main-nav a::after { display: none; }
    .site-header .main-nav a:hover {
        background: var(--green-50) !important;
        color: var(--green-800) !important;
        border-color: transparent !important;
        transform: none !important;
    }
    .site-header .main-nav a.active {
        background: var(--green-800) !important;
        color: #fff !important;
        border-color: transparent !important;
    }
    .site-header .main-nav a.active::before { background: var(--brass-light) !important; }
    .site-header .main-nav a::before { background: var(--brass) !important; }
}

/* Older article template header (blog.css uses `all: initial` + !important) */
body .navbar {
    background: rgba(255, 253, 249, 0.96) !important;
    border-bottom: 1px solid var(--line) !important;
    box-shadow: none !important;
}
body .navbar .nav-logo {
    color: var(--green-800) !important;
    font-family: var(--font-serif) !important;
    font-size: 21px !important;
    font-weight: 650 !important;
    letter-spacing: -0.015em !important;
}
body .navbar .nav-menu,
body .navbar .nav-menu li { list-style: none !important; }
body .navbar .nav-menu li::marker { content: none !important; }
body .navbar .nav-link { color: var(--ink-2) !important; }
body .navbar .nav-link:hover,
body .navbar .nav-link.active { color: var(--green-800) !important; background-color: var(--green-50) !important; }
body .navbar .hamburger span { background: var(--green-800) !important; }

/* ---------- Heroes: one look for every template ---------- */
.hero,
.dr-hero,
.guide-hero,
.hero-section,
.article-header,
.page-hero,
.blog-hero {
    background: var(--hero-bg) !important;
    color: #fff;
    border-bottom: 3px solid var(--brass);
    position: relative;
}
.article-header::before { display: none !important; }
.hero h1, .hero .hero-title,
.dr-hero h1,
.guide-hero h1,
.hero-section h1,
.article-header h1,
.page-hero h1,
.blog-hero h1 {
    color: #fff !important;
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-shadow: none;
}
.hero .hero-title {
    font-size: clamp(2.2rem, 4.6vw, 3.4rem);
    line-height: 1.08;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}
.hero .hero-title::before,
.guide-hero h1::before {
    content: "2026 tax year";
    display: block;
    width: max-content;
    margin: 0 auto 1.1rem;
    padding: 0.28rem 0.75rem;
    border: 1px solid rgba(227, 189, 108, 0.55);
    border-radius: 999px;
    color: var(--brass-light);
    font: 600 0.72rem/1.2 var(--font-sans);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.hero p, .hero .hero-subtitle,
.dr-hero .dr-lede,
.guide-hero .hero-subtitle, .guide-hero p,
.hero-section p,
.article-header p {
    color: rgba(247, 244, 238, 0.86) !important;
}
.hero-features {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}
.hero .feature {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    backdrop-filter: none;
    padding: 0.8rem 0.9rem;
    gap: 0.55rem;
}
.hero .feature-text { color: #fff; font-size: 0.92rem; font-weight: 500; }
.hero .feature-icon { font-size: 1.15rem; }
@media (max-width: 760px) {
    .hero-features { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

.dr-hero__facts li {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(227, 189, 108, 0.45) !important;
    color: #fff;
}
.dr-breadcrumb, .dr-breadcrumb a { color: rgba(247, 244, 238, 0.8) !important; }

.guide-hero .stat-number, .guide-hero .stat strong, .hero-stats .stat-number { color: var(--brass-light) !important; font-family: var(--font-serif); }
.guide-hero .stat-label, .hero-stats .stat-label { color: rgba(247, 244, 238, 0.75) !important; }

.article-header .breadcrumb { background: transparent !important; border: 0 !important; }
.article-header .breadcrumb a { color: rgba(247, 244, 238, 0.85) !important; }
.article-header .breadcrumb span { color: rgba(247, 244, 238, 0.6) !important; }
.article-meta > * {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: rgba(247, 244, 238, 0.9) !important;
}

/* Breadcrumb strip used by the guide template */
.breadcrumb { background: var(--paper) !important; border-bottom-color: var(--line) !important; }
.breadcrumb a { color: var(--green-700) !important; }

/* ---------- Buttons ---------- */
.btn, .cta-button, .sidebar-cta-btn, .newsletter-form button, .dr-btn {
    border-radius: 8px !important;
    box-shadow: none !important;
    transform: none !important;
    font-weight: 600;
}
.btn-primary, .cta-button, .sidebar-cta-btn, .newsletter-form button, .dr-btn, button[type="submit"].btn {
    background: var(--green-700) !important;
    border-color: var(--green-700) !important;
    color: #fff !important;
}
.btn-primary:hover, .cta-button:hover, .sidebar-cta-btn:hover, .newsletter-form button:hover, .dr-btn:hover {
    background: var(--green-900) !important;
    border-color: var(--green-900) !important;
    color: #fff !important;
}
.btn-secondary {
    background: transparent !important;
    color: var(--ink) !important;
    border: 1px solid var(--line-strong) !important;
}
.btn-secondary:hover { background: var(--paper-2) !important; color: var(--ink) !important; }
.guide-hero .btn-primary, .hero .btn-primary, .cta-box .cta-button {
    background: var(--brass-light) !important;
    border-color: var(--brass-light) !important;
    color: var(--green-950) !important;
}
.guide-hero .btn-primary:hover, .hero .btn-primary:hover, .cta-box .cta-button:hover {
    background: #f0cf86 !important;
    color: var(--green-950) !important;
}
.guide-hero .btn-secondary, .hero .btn-secondary {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}
.guide-hero .btn-secondary:hover, .hero .btn-secondary:hover { background: rgba(255, 255, 255, 0.08) !important; }

/* ---------- Home calculator ---------- */
.calculator-section { background: var(--paper) !important; }
.calculator-container {
    background: var(--surface) !important;
    border: 1px solid var(--line);
    border-radius: 14px !important;
    box-shadow: var(--shadow-lg) !important;
}
.calculator-section .calculator-container { margin-top: -3.5rem; position: relative; z-index: 2; }
.calculator-header h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.calculator-subtitle { color: var(--muted) !important; }
.interactive-guide {
    background: var(--paper) !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}
.interactive-guide .progress-bar { background: var(--line) !important; }
.interactive-guide .progress-fill { background: linear-gradient(90deg, var(--green-700), var(--brass)) !important; }
.interactive-guide .progress-text { color: var(--green-800) !important; }
.section-title { font-family: var(--font-serif); color: var(--ink) !important; border-bottom-color: var(--line) !important; }
.section-title::before { background: var(--brass) !important; }
.form-section::before, .form-section.active::before { background: var(--brass) !important; }
.input-group label, .dr-field label { color: var(--ink) !important; }
.input-help, .dr-field small { color: var(--muted) !important; }
.input-group input,
.input-group select,
.dr-field input[type="text"], .dr-field input[type="number"], .dr-field input[type="month"], .dr-field select,
.calculator-form input, .calculator-form select {
    background: #fff !important;
    border: 1px solid var(--line-strong) !important;
    border-radius: 8px !important;
    color: var(--ink) !important;
    font-family: var(--font-sans) !important;
    font-variant-numeric: tabular-nums;
}
.input-group input:hover, .input-group select:hover { border-color: var(--gray-400) !important; }
.input-group input:focus, .input-group select:focus,
.dr-field input:focus, .dr-field select:focus,
.calculator-form input:focus, .calculator-form select:focus {
    outline: none !important;
    border-color: var(--green-700) !important;
    box-shadow: 0 0 0 3px rgba(30, 82, 64, 0.14) !important;
}
.input-group .input-prefix { color: var(--muted) !important; }
.required { color: var(--brass) !important; }
.gain-preview { background: var(--green-50) !important; color: var(--green-800) !important; border-color: var(--green-100) !important; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--green-700); }

/* Results panel */
.results-container {
    background: var(--hero-bg) !important;
    border: 0 !important;
    border-radius: 14px !important;
    border-top: 3px solid var(--brass) !important;
}
.results-container h3, .results-header h3 { color: #fff !important; font-family: var(--font-serif); }
.result-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    transform: none !important;
}
.result-card::before { display: none !important; }
.result-card .result-value, .results-container .result-value {
    color: #fff !important;
    font-family: var(--font-serif);
    font-weight: 600;
}
.result-card.tax-owed .result-value { color: var(--brass-light) !important; }
.results-container .result-label { color: rgba(247, 244, 238, 0.72) !important; letter-spacing: 0.06em; }
.calculation-step.highlight { background: rgba(227, 189, 108, 0.10) !important; border-color: rgba(227, 189, 108, 0.35) !important; }
.calculation-note { color: rgba(247, 244, 238, 0.85) !important; font-size: 0.9rem; margin-top: 1rem; }
.professional-disclaimer {
    background: var(--brass-50) !important;
    border: 1px solid #e8d6ac !important;
    border-radius: 10px !important;
}
.professional-disclaimer h4, .professional-disclaimer p, .professional-disclaimer strong { color: var(--brass-ink) !important; }

/* ---------- Content sections & cards ---------- */
.how-to-section, .features-section, .faq-section, .blog-section, .professional-standards,
.content-section, .dr-content, .dr-calc {
    background: transparent !important;
}
.how-to-section { background: var(--surface) !important; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-header h2, .standards-content h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.section-subtitle { color: var(--muted) !important; }

.step-card, .feature-card, .faq-item, .blog-highlight-card, .standard-item, .blog-card, .article-card,
.resource-card, .tool-card, .sidebar-widget, .toc-section, .dr-form, .dr-results, .content-card,
.related-tools__grid a {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.step-card:hover, .feature-card:hover, .blog-highlight-card:hover, .standard-item:hover, .blog-card:hover,
.article-card:hover, .resource-card:hover, .tool-card:hover, .sidebar-widget:hover, .related-tools__grid a:hover,
.related-tools__grid a:focus {
    border-color: var(--line-strong) !important;
    box-shadow: var(--shadow-lg) !important;
    transform: none !important;
}
.step-number {
    background: transparent !important;
    color: var(--brass) !important;
    border: 1px solid var(--brass) !important;
    font-family: var(--font-serif);
    font-weight: 600;
}
.step-content h3, .feature-card h3, .faq-item h3, .blog-card-header h3, .blog-card-header h3 a {
    color: var(--ink) !important;
}
.blog-highlight-card.featured { border-color: var(--brass) !important; }
.blog-highlight-card.featured::before { background: var(--brass) !important; color: #fff !important; }
.category, .blog-card-header .category, .article-category {
    background: var(--green-50) !important;
    color: var(--green-800) !important;
    border-radius: 999px !important;
}
.read-more { color: var(--green-700) !important; }
.blog-cta, .cta-box {
    background: var(--hero-bg) !important;
    color: #fff !important;
    border-radius: 14px !important;
    border-bottom: 3px solid var(--brass);
}
.cta-box::before { display: none !important; }
.blog-cta h2, .blog-cta h3, .cta-box h2, .cta-box h3 { color: #fff !important; }
.blog-cta p, .cta-box p { color: rgba(247, 244, 238, 0.86) !important; }

/* Related tools / guide callouts (tools/site_links.py) */
.related-tools { background: var(--paper-2) !important; border-top: 1px solid var(--line) !important; }
.related-tools h2 { font-size: 1.45rem; }
.related-tools__name { color: var(--green-800) !important; }
.related-tools__desc { color: var(--muted) !important; }
.guide-links {
    background: var(--brass-50) !important;
    border-left: 3px solid var(--brass) !important;
    border-radius: 0 10px 10px 0 !important;
}

/* ---------- Depreciation & 1031 calculators ---------- */
.dr-form legend { color: var(--brass-ink) !important; }
.dr-line, .dr-result { border-color: var(--line) !important; background: var(--surface); }
.dr-line--total, .dr-result--total {
    background: var(--green-50) !important;
    border-color: var(--green-100) !important;
}
.dr-line__num, .dr-step, .dr-badge {
    background: var(--brass-50) !important;
    color: var(--brass-ink) !important;
}
.dr-line--total strong, .dr-result--total .dr-amount, .dr-line--total .dr-line__value { color: var(--green-800) !important; }

/* ---------- Article / long-form content ---------- */
.main-content h2, .article-content h2, .content-section h2, .dr-content h2 {
    font-size: clamp(1.5rem, 2.6vw, 1.95rem);
    color: var(--ink) !important;
}
.main-content h2::before { background: var(--brass) !important; }
.main-content h3, .article-content h3, .content-section h3 { color: var(--ink) !important; }
.article-intro, .main-content .lead {
    background: var(--surface) !important;
    border-left: 3px solid var(--brass) !important;
    color: var(--ink-2) !important;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 1.6;
}
.table-of-contents {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
}
.table-of-contents::before { background: var(--brass) !important; }
.table-of-contents li::before { color: var(--brass) !important; background: var(--brass) !important; }

.content-box, .highlight-box, .info-box, .tip-box {
    background: var(--green-50) !important;
    border: 1px solid var(--green-100) !important;
    border-left: 3px solid var(--green-700) !important;
    border-radius: 0 10px 10px 0 !important;
}
.warning-box, .alert-box, .important-box {
    background: var(--brass-50) !important;
    border: 1px solid #ead9b1 !important;
    border-left: 3px solid var(--brass) !important;
    border-radius: 0 10px 10px 0 !important;
}
.formula-box, .example-box, .calculation-example {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-left: 3px solid var(--ink-2) !important;
    border-radius: 0 10px 10px 0 !important;
}
.error-box { background: #fbeeea !important; border-left: 3px solid #a4442f !important; }

/* Tables */
.main-content table, .article-content table, .content-section table, .dr-table, .tax-table, .rates-table,
main table {
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--line) !important;
    border-radius: 10px;
    overflow: hidden;
}
main th, .main-content th, .article-content th, .dr-table th, .tax-table th {
    background: var(--green-50) !important;
    color: var(--green-900) !important;
    font-weight: 600;
    border-bottom: 1px solid var(--green-100) !important;
    text-align: left;
}
main td, .main-content td, .article-content td { border-color: var(--line) !important; }
main tbody tr:hover, .main-content tbody tr:hover { background: var(--paper) !important; }

/* FAQ details */
.dr-faq__item, details {
    border-color: var(--line) !important;
}
.dr-faq__item summary, details > summary { color: var(--ink); }
.dr-faq__item[open] summary, details[open] > summary { color: var(--green-800); }

/* ---------- Footer & site directory ---------- */
.site-directory {
    background: var(--green-900) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(247, 244, 238, 0.75) !important;
}
.site-directory__title {
    color: var(--brass-light) !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.site-directory a { color: rgba(247, 244, 238, 0.82) !important; }
.site-directory a:hover, .site-directory a:focus { color: #fff !important; }

.site-footer, footer.footer {
    background: var(--green-950) !important;
    color: rgba(247, 244, 238, 0.75) !important;
}
.site-footer h3, .site-footer h4, footer.footer h3, footer.footer h4 {
    color: #fff !important;
    font-family: var(--font-serif);
}
.site-footer p, .site-footer a, footer.footer p, footer.footer a,
.footer-section p, .footer-section ul a { color: rgba(247, 244, 238, 0.7) !important; }
.site-footer a:hover, footer.footer a:hover, .footer-section ul a:hover { color: #fff !important; }
.footer-bottom { border-top-color: rgba(255, 255, 255, 0.1) !important; }
.disclaimer-notice { background: rgba(255, 255, 255, 0.04) !important; border: 1px solid rgba(255, 255, 255, 0.08); }
.disclaimer-notice p { color: rgba(247, 244, 238, 0.7) !important; }
.copyright p { color: rgba(247, 244, 238, 0.5) !important; }

/* ---------- Small screens ---------- */
@media (max-width: 768px) {
    .calculator-section .calculator-container { margin-top: -2rem; }
    .hero .hero-title::before, .guide-hero h1::before { margin-bottom: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Template-specific touch-ups ---------- */
h1, h2, h3 { text-wrap: balance; }
.btn { gap: 0.5rem; }
.btn:not(.btn-secondary) { background-color: var(--green-700); }

/* Blog index sections are styled inline */
section[style*="gradient"] {
    background: var(--hero-bg) !important;
    border-bottom: 3px solid var(--brass);
}
section[style*="gradient"] h1, section[style*="gradient"] h2 { color: #fff !important; font-family: var(--font-serif); }
section[style*="gradient"] p, section[style*="gradient"] .section-subtitle { color: rgba(247, 244, 238, 0.86) !important; }
section[style*="gradient"] .btn {
    background: var(--brass-light) !important;
    color: var(--green-950) !important;
    border-color: var(--brass-light) !important;
}
section[style*="background: white"] { background: var(--paper) !important; }
.category.strategies { background: var(--brass-50) !important; color: var(--brass-ink) !important; }
.category.case-studies, .category.case-study { background: var(--paper-2) !important; color: var(--ink-2) !important; }

.article-header .category {
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(247, 244, 238, 0.9) !important;
    border-radius: 8px !important;
}
.article-intro, .main-content .lead { font-weight: 400; }

.toc-column h3 { border-bottom: 1px solid var(--line-strong) !important; }
.content-section h2 { border-bottom: 1px solid var(--line) !important; position: relative; }
.content-section h2::after {
    content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 2px; background: var(--brass);
}

@media (min-width: 1000px) {
    .standards-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
.calculation-step .label, .calculation-step .value { font-family: var(--font-sans) !important; }
.calculation-step .value { font-weight: 600; }
.calculation-preview { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: 10px !important; }
.calculation-preview .preview-value { color: var(--green-700) !important; font-variant-numeric: tabular-nums; }

/* ---------- Mobile fixes for the article template ---------- */
@media (max-width: 768px) {
    body .navbar { position: sticky !important; }
    body .navbar .nav-menu {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 8px 16px 16px !important;
        background: var(--surface) !important;
        border-bottom: 1px solid var(--line) !important;
        box-shadow: var(--shadow-lg) !important;
    }
    body .navbar .nav-menu.active { display: flex !important; }
    body .navbar .nav-menu li { display: block !important; margin: 0 !important; }
    body .navbar .nav-link { display: block !important; padding: 12px 8px !important; }

    /* Wide tables scroll inside their own box instead of widening the page */
    main table, .main-content table, .article-content table, .content-section table, .tax-rates-table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Guide template details */
.comparison-item { background: var(--surface) !important; border-width: 1px !important; border-radius: 12px !important; transform: none !important; }
.comparison-item.short-term { border-color: #e4c7bd !important; border-top: 3px solid #b0543b !important; }
.comparison-item.long-term { border-color: var(--green-100) !important; border-top: 3px solid var(--green-700) !important; }
.example-box h3, .example-box h4 { color: var(--ink) !important; }
.concept-card p { color: var(--muted) !important; }
.sidebar .result-label, .sidebar-widget .result-label { color: var(--muted) !important; }
.newsletter-form input, .sidebar input[type="email"], .sidebar input[type="number"], .sidebar input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.75rem !important;
    border: 1px solid var(--line-strong) !important;
    border-radius: 8px !important;
    background: #fff !important;
    font: inherit;
}
.date, .post-date, .article-date { color: var(--muted) !important; opacity: 1 !important; }
.tax-tables { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important; gap: 1.25rem !important; }
.tax-table h3 { font-size: 1.2rem; }

/* ---------- Heading levels corrected 2026-11-28 ----------
   Card titles moved H4 -> H3 and the callout at the top of each article
   H3 -> H2 so headings no longer skip a level. These rules keep the
   previous look (values taken from the computed styles before the change). */
.standard-item h3, .benefit-card h3, .example-box h3,
.reference-item h3, .term-card h3, .formula-box h3 {
    font-family: var(--font-sans) !important;
    letter-spacing: normal !important;
}
.benefit-card h3, .reference-item h3, .term-card h3, .formula-box h3 {
    font-size: 20px !important;
    line-height: 1.25 !important;
}
.highlight-box h2.callout-title {
    font-size: 24px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.012em !important;
    margin: 48px 0 16px !important;
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
}
.highlight-box h2.callout-title::before,
.highlight-box h2.callout-title::after { content: none !important; display: none !important; }
.highlight-box h2.callout-title--flush { margin-top: 0 !important; line-height: 1.25 !important; }
@media (max-width: 768px) {
    .benefit-card h3, .reference-item h3, .term-card h3, .formula-box h3,
    .example-box h3 { line-height: 1.5 !important; }
    .highlight-box h2.callout-title { font-size: 20px !important; margin: 32px 0 12px !important; }
    .highlight-box h2.callout-title--flush { font-size: 18px !important; line-height: 1.4 !important; margin: 0 0 8px !important; }
}

/* =====================================================================
   2026-11-29 visual pass. Four marked blocks; each workstream edits only
   its own block (see docs/VISUAL_STYLE_2026-11-29.md).
   ===================================================================== */

/* ---- viz-tokens:start (owner: main) ----
   Data-viz palette, validated with the dataviz skill's validate_palette.js on
   the light surface #fffdf9 (the site has no dark mode):
   categorical in this order passes (worst adjacent CVD dE 11.2, normal 22.4;
   keep darkened 2026-11-29 from #0f8a59 so white labels reach 4.78:1):
   recapture, capgain, other, keep. The 1031 order recapture, capgain, keep
   also passes. "other" (brass) is 2.83:1 on the surface, so it always ships
   with a visible label or legend. neutral is a deliberate gray for costs.
   tier-1..3 is an ordinal ramp (0% / 15% / 20%), passes --ordinal. */
:root {
    --viz-recapture: #b04a2a;
    --viz-capgain: #3769c2;
    --viz-other: #c98d17;
    --viz-keep: #0d8355;
    --viz-neutral: #a8a294;
    --viz-tier-1: #86b89d;
    --viz-tier-2: #3f8f6a;
    --viz-tier-3: #1e5240;
    --viz-grid: #ebe6da;
    --viz-axis: #cdc6b6;
    --viz-surface: var(--surface);
    --viz-yes: #2f7a4f;
    --viz-no: #a33b26;
}
/* ---- viz-tokens:end ---- */



/* ---- icons:start (owner: emoji workstream) ---- */
.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.14em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* A card icon that used to be an emoji: soft square badge, icon in brand green */
.icon-badge {
    display: inline-grid !important;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: var(--green-50) !important;
    border: 1px solid var(--green-100);
    color: var(--green-700) !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    flex: none; /* keep the square when it sits in a flex row next to long text */
}
.icon-badge .icon { width: 1.4rem; height: 1.4rem; }
.icon-badge--lg { width: 3.5rem; height: 3.5rem; border-radius: 14px; }
.icon-badge--lg .icon { width: 1.75rem; height: 1.75rem; }
.icon-badge--brass { background: var(--brass-50) !important; border-color: #ecdcb8; color: var(--brass-ink) !important; }
/* Badges on the dark hero chips and dark result cards: translucent tile, brass icon */
.hero .feature-icon.icon-badge,
.result-card .result-icon.icon-badge {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--brass-light) !important;
}
.hero .feature-icon.icon-badge { width: 2rem; height: 2rem; border-radius: 8px; }
.hero .feature-icon.icon-badge .icon { width: 1.1rem; height: 1.1rem; }
@media (max-width: 767px) {
    /* Mobile result cards are one row (icon, label, value): keep the tile small so the amounts have room */
    .result-card .result-icon.icon-badge { width: 2rem; height: 2rem; border-radius: 8px; }
    .result-card .result-icon.icon-badge .icon { width: 1.1rem; height: 1.1rem; }
}
/* The results panel is dark; its outline buttons were readable only through their emoji */
.results-container .results-actions .btn-secondary {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}
.results-container .results-actions .btn-secondary:hover { background: rgba(255, 255, 255, 0.08) !important; }
/* Lists that used a check or cross emoji on every item */
ul.list-check, ul.list-cross { list-style: none !important; padding-left: 0 !important; }
ul.list-check > li, ul.list-cross > li { position: relative; padding-left: 1.75rem !important; }
ul.list-check > li::before, ul.list-cross > li::before {
    content: "" !important;
    position: absolute;
    left: 0;
    top: 0.25em;
    width: 1.15em;
    height: 1.15em;
    background: currentColor;
    -webkit-mask: var(--mark-icon) center / contain no-repeat;
    mask: var(--mark-icon) center / contain no-repeat;
}
ul.list-check > li::before {
    color: var(--viz-yes);
    --mark-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
ul.list-cross > li::before {
    color: var(--viz-no);
    --mark-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
}
/* Yes / no marks inside table cells and text: icon + word, never color alone */
.mark { display: inline-flex; align-items: center; gap: 0.35em; font-weight: 600; white-space: nowrap; }
.mark::before {
    content: "";
    width: 1em;
    height: 1em;
    flex: none;
    background: currentColor;
    -webkit-mask: var(--mark-icon) center / contain no-repeat;
    mask: var(--mark-icon) center / contain no-repeat;
}
.mark-yes { color: var(--viz-yes); --mark-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.mark-no { color: var(--viz-no); --mark-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E"); }
/* ---- icons:end ---- */



/* ---- diagrams:start (owner: guides workstream) ---- */
.viz-figure {
    margin: 2rem 0;
    padding: 1.25rem 1.25rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.viz-figure svg { display: block; width: 100%; height: auto; max-width: 100%; overflow: visible; }
.viz-figure figcaption { margin-top: 0.75rem; font-size: 0.9rem; line-height: 1.5; color: var(--muted); }
.viz-svg text { font-family: var(--font-sans); font-feature-settings: "tnum"; }
.viz-fill-recapture { fill: var(--viz-recapture); }
.viz-fill-capgain { fill: var(--viz-capgain); }
.viz-fill-other { fill: var(--viz-other); }
.viz-fill-keep { fill: var(--viz-keep); }
.viz-fill-neutral { fill: var(--viz-neutral); }
.viz-fill-tier-1 { fill: var(--viz-tier-1); }
.viz-fill-tier-2 { fill: var(--viz-tier-2); }
.viz-fill-tier-3 { fill: var(--viz-tier-3); }
.viz-fill-surface { fill: var(--viz-surface); }
.viz-stroke-axis { stroke: var(--viz-axis); }
.viz-stroke-grid { stroke: var(--viz-grid); }
.viz-stroke-ink { stroke: var(--ink-2); }
.viz-t { fill: var(--ink); }
.viz-t2 { fill: var(--ink-2); }
.viz-tm { fill: var(--muted); }
.viz-ton { fill: #ffffff; }
/* Guide figures are drawn in a 360-unit viewBox with 13-14 unit text. Capping the figure
   width keeps that text near body size on desktop; the smaller mobile padding keeps it
   at 12px or more on a 390px screen. */
.viz-figure { max-width: 520px; }
.viz-figure--center { margin-left: auto; margin-right: auto; }
.viz-fill-track { fill: var(--viz-grid); }
.viz-stroke-axis, .viz-stroke-grid, .viz-stroke-ink { fill: none; stroke-width: 1px; vector-effect: non-scaling-stroke; }
@media (max-width: 480px) {
    .viz-figure { padding: 1rem 0.75rem 0.875rem; }
}
/* tax-rates requirements list: its items carry top padding, so the check mark moves down with the text */
.requirements-list.list-check > li::before { top: calc(var(--space-3) + 0.25em); }
/* ---- diagrams:end ---- */



/* ---- charts:start (owner: main; js/rett-charts.js) ---- */
.viz-part--recapture { background: var(--viz-recapture); }
.viz-part--capgain { background: var(--viz-capgain); }
.viz-part--other { background: var(--viz-other); }
.viz-part--keep { background: var(--viz-keep); }
.viz-part--neutral { background: var(--viz-neutral); }
.viz-chart { position: relative; margin: 1.25rem 0 0.25rem; }
.viz-chart[hidden] { display: none; }
.viz-chart__title { margin: 0 0 0.15rem; font: 600 0.95rem/1.35 var(--font-sans); color: var(--ink); }
.viz-chart__sub { margin: 0 0 0.6rem; font-size: 0.85rem; color: var(--muted); }
.viz-chart__title + .viz-seg__bar, .viz-chart__title + .viz-tl, .viz-chart__title + .viz-area { margin-top: 0.6rem; }
.viz-chart__note { margin: 0.6rem 0 0; font-size: 0.82rem; line-height: 1.45; color: var(--muted); }
/* Tall segmented bar: one whole split into parts */
.viz-seg__bar { display: flex; gap: 2px; height: 28px; }
.viz-seg__part {
    position: relative;
    min-width: 2px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 6px;
    cursor: default;
    transition: filter 0.12s ease;
}
.viz-seg__part:hover { filter: brightness(1.1) saturate(1.05); }
.viz-seg__part:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.viz-seg__lbl { font: 600 12px/1 var(--font-sans); color: #fff; white-space: nowrap; font-variant-numeric: normal; }
.viz-part--other .viz-seg__lbl, .viz-part--neutral .viz-seg__lbl { color: var(--ink); }
.viz-legend {
    list-style: none;
    margin: 0.7rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.35rem 1.25rem;
}
.viz-legend li { display: flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0; font-size: 0.85rem; line-height: 1.35; color: var(--ink-2); }
.viz-legend li::before { content: none !important; }
.viz-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.viz-legend__val { margin-left: auto; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
/* Tooltip: value first, series as a short line key */
.viz-tip {
    position: absolute;
    z-index: 20;
    pointer-events: none;
    min-width: 7rem;
    max-width: 16rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-md);
    font-family: var(--font-sans);
}
.viz-tip[hidden] { display: none; }
.viz-tip__value { display: block; font-size: 0.95rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.viz-tip__name { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.1rem; font-size: 0.8rem; color: var(--ink-2); }
.viz-tip__key { width: 12px; height: 3px; border-radius: 2px; flex: none; }
/* Area line */
.viz-area { display: block; width: 100%; height: auto; overflow: visible; }
.viz-area:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; border-radius: 4px; }
.viz-area .viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-area .viz-axis { stroke: var(--viz-axis); stroke-width: 1; }
.viz-area .viz-tick { fill: var(--muted); font: 500 12px var(--font-sans); font-variant-numeric: tabular-nums; }
.viz-area__fill { fill: var(--viz-recapture); fill-opacity: 0.1; }
.viz-area__line { fill: none; stroke: var(--viz-recapture); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-area__dot { fill: var(--viz-recapture); stroke: var(--viz-surface); stroke-width: 2; }
.viz-area .viz-cross { stroke: var(--ink-2); stroke-width: 1; }
.viz-area .viz-hit { fill: transparent; cursor: crosshair; }
/* Deadline timeline */
.viz-tl { position: relative; height: 150px; margin: 0.25rem 0.25rem 0; }
.viz-tl__track { position: absolute; left: 0; right: 0; top: 74px; height: 2px; background: var(--viz-axis); border-radius: 2px; }
.viz-tl__mark { position: absolute; top: -6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--green-700); box-shadow: 0 0 0 2px var(--viz-surface); }
.viz-tl__mark--muted { background: var(--viz-surface); border: 2px solid var(--viz-axis); width: 12px; height: 12px; margin-left: -6px; top: -5px; box-shadow: none; }
.viz-tl__label { position: absolute; display: flex; flex-direction: column; gap: 1px; width: max-content; max-width: 8.5rem; font-family: var(--font-sans); line-height: 1.25; }
.viz-tl__label--below { top: 92px; }
.viz-tl__label--above { bottom: 92px; }
.viz-tl__label--start { transform: none; text-align: left; }
.viz-tl__label--middle { transform: translateX(-50%); text-align: center; }
.viz-tl__label--end { transform: translateX(-100%); text-align: right; }
.viz-tl__day { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brass-ink); }
.viz-tl__what { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.viz-tl__date { font-size: 0.82rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.viz-tl__label--muted .viz-tl__what, .viz-tl__label--muted .viz-tl__day { color: var(--muted); }
.dr-results--stale .viz-chart, .dr-results--stale .dr-callout-mini { opacity: 0.45; }
.dr-details > div[hidden] { display: none !important; }
/* The home results panel is dark green: the chart sits on its own light card, the
   surface the palette was validated on, so marks and text keep their contrast. */
.results-container .viz-chart { margin: 1.25rem 0; padding: 1rem 1.1rem 0.9rem; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); }
.results-container .viz-chart__title { color: var(--ink) !important; }
.results-container .viz-legend li, .results-container .viz-chart__note { color: var(--ink-2) !important; }
.results-container .viz-legend__val { color: var(--ink) !important; }
/* Calculator copy added with the charts */
.dr-free { margin: 0.9rem 0 0; font-size: 0.95rem; color: rgba(247, 244, 238, 0.92); }
.dr-free strong { color: var(--brass-light); font-weight: 600; }
.dr-callout-mini { margin: 0.9rem 0 0; padding: 0.7rem 0.85rem; border-radius: 10px; background: var(--green-50); border: 1px solid var(--green-100); font-size: 0.88rem; line-height: 1.5; color: var(--ink-2); }
.dr-callout-mini strong { color: var(--ink); }
/* ---- charts:end ---- */



/* ---- brand:start (owner: main) ----
   Logo mark in the header (tools/apply_nav.py), same drawing as the favicon. */
.site-header .logo .logo-text a { display: inline-flex; align-items: center; gap: 0.55rem; }
.navbar .nav-logo { display: inline-flex; align-items: center; gap: 0.55rem !important; } /* blog.css resets .nav-logo with all: initial !important */
.logo-mark { width: 1.75rem; height: 1.75rem; flex: none; }
.logo-mark rect { fill: var(--green-800); }
.logo-mark path { fill: none; stroke: var(--brass-light); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
/* Home calculator results: an amount never breaks inside the number on phones
   (was "$240,00" / "0"); the size steps down with the screen instead. */
@media (max-width: 600px) {
    .results-container .result-value { white-space: nowrap; font-size: clamp(0.95rem, 4.6vw, 1.3rem) !important; }
}
/* "Illustrative example" label on worked examples (case study pages) */
.example-note { margin: 0 0 1.25rem; padding: 0.75rem 1rem; border-left: 3px solid var(--brass); border-radius: 0 8px 8px 0; background: var(--brass-50); color: var(--ink-2); font-size: 0.95rem; }
/* Contact page: the reply note sits on a dark green panel */
.response-time p { color: rgba(247, 244, 238, 0.88) !important; }
.contact-form-container ul + p { margin-top: 1rem; }
/* ---- brand:end ---- */
