/*
Theme Name: LottoTax
Theme URI: https://example.com/lottotax
Author: LottoTax
Author URI: https://example.com
Description: State lottery tax calculator theme. Ships with an interactive lump-sum vs annuity calculator, 50 auto-created state calculator pages (+DC), guides, About, Contact form, starter blog and full SEO schema. Tax year 2026 federal & state brackets built in.
Version: 1.1.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lottotax
Tags: calculator, finance, seo, responsive, custom-menu, custom-colors, featured-images, threaded-comments
*/

/* ============ Reset & tokens ============ */
:root {
        --navy: #0d1b2e;
        --navy-2: #13233c;
        --ink: #1c2b3a;
        --muted: #5b6b7c;
        --line: #e3e8ef;
        --bg: #f7f9fc;
        --card: #ffffff;
        --accent: #f5b400;
        --accent-dark: #d99e00;
        --green: #0e9f6e;
        --red: #d64545;
        --radius: 14px;
        --radius-sm: 9px;
        --shadow: 0 1px 2px rgba(13, 27, 46, 0.06), 0 8px 24px rgba(13, 27, 46, 0.07);
        --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
        margin: 0;
        font-family: var(--font);
        font-size: 17px;
        line-height: 1.65;
        color: var(--ink);
        background: var(--bg);
        -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: #1453a8; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 860px; }
.screen-reader-text {
        border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
        height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
}
.skip-link:focus {
        clip: auto; clip-path: none; height: auto; width: auto; position: fixed;
        top: 8px; left: 8px; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 1000; border-radius: 8px;
}

/* ============ Header ============ */
.site-header {
        background: var(--navy);
        color: #fff;
        position: sticky;
        top: 0;
        z-index: 100;
        box-shadow: 0 2px 12px rgba(13, 27, 46, 0.25);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 66px; }
.site-branding { display: flex; align-items: baseline; gap: 12px; }
.site-logo a { color: #fff; font-weight: 800; font-size: 21px; letter-spacing: -0.2px; display: inline-flex; align-items: center; gap: 8px; }
.site-logo a:hover { text-decoration: none; color: var(--accent); }
.logo-mark { color: var(--accent); font-size: 18px; }
.site-tagline { color: rgba(255, 255, 255, 0.62); font-size: 12.5px; text-transform: uppercase; letter-spacing: 1.2px; }
.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.primary-nav li { position: relative; }
.primary-nav a {
        color: rgba(255, 255, 255, 0.88); padding: 10px 13px; display: block;
        border-radius: 8px; font-size: 15px; font-weight: 600;
}
.primary-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.primary-nav ul ul {
        display: none; position: absolute; top: 100%; left: 0; background: var(--navy-2);
        min-width: 220px; border-radius: 10px; padding: 6px; box-shadow: var(--shadow); flex-direction: column;
}
.primary-nav li:hover > ul, .primary-nav li:focus-within > ul { display: flex; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; margin-left: auto; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2.5px; background: #fff; margin: 4px 0; border-radius: 2px; }

/* Breadcrumb */
.breadcrumb {
        max-width: 1180px; margin: 14px auto 0; padding: 0 20px; font-size: 13.5px; color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb .sep { margin: 0 7px; color: #b6c1cd; }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* ============ Hero ============ */
.hero {
        background:
                radial-gradient(1000px 420px at 85% -10%, rgba(245, 180, 0, 0.16), transparent 60%),
                linear-gradient(160deg, #0d1b2e 0%, #142a47 60%, #16325a 100%);
        color: #fff;
        padding: 64px 0 56px;
}
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.5px; max-width: 780px; }
.hero-sub { font-size: 18.5px; color: rgba(255, 255, 255, 0.82); max-width: 720px; margin: 0; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-points .point {
        background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.16);
        padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #ffe9ad;
}

/* ============ Sections ============ */
.section { padding: 54px 0; }
.section.no-margin, .section-calc.no-margin { padding-top: 34px; }
.section-alt { background: #eef2f8; }
.section-calc { padding: 10px 0 40px; }
.section-title { font-size: 27px; letter-spacing: -0.3px; margin: 0 0 6px; color: var(--navy); }
.section-sub { color: var(--muted); margin: 0 0 26px; font-size: 15.5px; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 44px; }

/* ============ Calculator ============ */
.calc {
        background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
        box-shadow: var(--shadow); overflow: hidden;
}
.calc-head { background: linear-gradient(150deg, var(--navy) 0%, #173055 100%); color: #fff; padding: 26px 30px 22px; }
.calc-title { margin: 0 0 4px; font-size: 23px; letter-spacing: -0.2px; }
.calc-sub { margin: 0; color: rgba(255, 255, 255, 0.68); font-size: 13.5px; }
.calc-grid { display: grid; grid-template-columns: 380px 1fr; gap: 0; }
.calc-inputs { padding: 26px 28px; border-right: 1px solid var(--line); background: #fbfcfe; }
.calc-inputs .form-row { margin-bottom: 20px; }
.calc-results { padding: 26px 30px; min-height: 420px; }
.calc-empty { color: var(--muted); text-align: center; padding-top: 90px; font-size: 15px; }
.calc-empty .big { font-size: 19px; color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.calc-disclaimer { padding: 14px 30px; margin: 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.8px; background: #fbfcfe; }

.calc label, .calc .label-text { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; color: var(--navy); }
.calc .req { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.field-help { margin: 6px 0 0; font-size: 12.8px; color: var(--muted); }
.amount-wrap { position: relative; }
.amount-prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--navy); font-size: 18px; }
.calc input[type="text"], .calc input[type="number"], .calc select {
        width: 100%; padding: 12px 14px; font-size: 16.5px; font-family: var(--font);
        border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
.calc input[type="text"]#ltt-jackpot { padding-left: 30px; font-weight: 800; letter-spacing: 0.3px; }
.calc input:focus, .calc select:focus { outline: 2px solid rgba(245, 180, 0, 0.55); border-color: var(--accent); }
.calc select:disabled { background: #eef2f8; color: var(--muted); }

.radio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.radio-card { position: relative; display: block; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card span {
        display: block; text-align: center; padding: 10px 6px; font-size: 13.8px; font-weight: 700;
        border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--muted);
        transition: all 0.15s ease;
}
.radio-card input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.radio-card input:focus-visible + span { outline: 2px solid var(--accent); }

.calc-advanced { margin-bottom: 18px; font-size: 14px; }
.calc-advanced summary { cursor: pointer; font-weight: 700; color: var(--navy); font-size: 13.5px; }
.calc-advanced .form-row { margin-top: 14px; }

.calc-actions { display: flex; gap: 10px; }
.btn {
        display: inline-block; border: 0; cursor: pointer; font-family: var(--font); font-weight: 800;
        font-size: 15.5px; padding: 13px 22px; border-radius: var(--radius-sm); transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #241a00; box-shadow: 0 2px 8px rgba(245, 180, 0, 0.35); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { font-size: 13px; padding: 9px 14px; margin-top: 10px; }

/* Results */
.result-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; margin-bottom: 16px; background: #fff; }
.result-card h3 { margin: 0 0 12px; font-size: 16px; color: var(--navy); border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 5px; }
.r-row { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; font-size: 15px; }
.r-row span { color: var(--muted); }
.r-row strong { font-variant-numeric: tabular-nums; text-align: right; }
.r-row.neg strong { color: var(--red); }
.r-row.muted strong { color: var(--muted); font-weight: 600; }
.r-net { border-top: 2px dashed var(--line); margin-top: 8px; padding-top: 8px; }
.r-row.net strong { color: var(--green); font-size: 19px; }
.calc-compare-bar { height: 10px; background: #edf1f7; border-radius: 999px; overflow: hidden; margin: 6px 0 16px; }
.bar-lump { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffd76a); }
.calc-note { background: #fff8e2; border: 1px solid #f3df9b; border-radius: var(--radius-sm); padding: 14px 18px; font-size: 14px; margin-bottom: 16px; }
.calc-note p { margin: 0 0 8px; }
.calc-note p:last-child { margin-bottom: 0; }

/* Schedule */
.sched-wrap h4 { margin: 0 0 10px; color: var(--navy); font-size: 15.5px; }
.sched-table th, .sched-table td { font-variant-numeric: tabular-nums; padding: 8px 12px; }
.sched-hidden { display: none; }

/* ============ State grid ============ */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
.state-card {
        background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
        padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 2px; transition: all 0.15s ease;
}
.state-card:hover { border-color: var(--navy); box-shadow: var(--shadow); text-decoration: none; transform: translateY(-2px); }
.state-abbr { font-size: 12px; font-weight: 800; color: var(--accent-dark); letter-spacing: 1px; }
.state-name { font-weight: 700; color: var(--navy); font-size: 15px; }
.state-rate { font-size: 12.5px; color: var(--muted); }
.state-card.is-taxfree .state-rate { color: var(--green); font-weight: 700; }
.state-grid-compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.state-chip {
        background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
        font-size: 13.5px; font-weight: 600; color: var(--navy);
}
.state-chip:hover { border-color: var(--accent); text-decoration: none; background: #fffdf4; }

/* ============ Tables & facts ============ */
.table-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 18px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.data-table caption { text-align: left; font-weight: 700; color: var(--navy); padding: 14px 16px 6px; font-size: 15px; }
.data-table th { text-align: left; background: #f2f5fa; color: var(--navy); font-size: 12.8px; text-transform: uppercase; letter-spacing: 0.4px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 11px 16px; border-bottom: 1px solid #eef1f6; font-variant-numeric: tabular-nums; }
.data-table tr:last-child td { border-bottom: 0; }
.cell-net { color: var(--green); font-weight: 800; }

.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 22px; }
.fact-card h3 { margin: 0 0 6px; font-size: 15px; color: var(--navy); }
.fact-big { font-size: 24px; font-weight: 800; color: var(--navy); margin: 0 0 10px; letter-spacing: -0.3px; }
.fact-card p { font-size: 14px; color: var(--muted); margin: 0; }

/* ============ Steps ============ */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; position: relative; }
.step-num {
        display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
        background: var(--navy); color: var(--accent); font-weight: 800; border-radius: 10px; margin-bottom: 12px;
}
.step-card h3 { margin: 0 0 8px; font-size: 16.5px; color: var(--navy); }
.step-card p { margin: 0; font-size: 14px; color: var(--muted); }

/* ============ FAQ ============ */
.faq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 12px; }
.faq summary { font-weight: 700; color: var(--navy); cursor: pointer; font-size: 15.5px; }
.faq p { margin: 10px 0 0; font-size: 14.5px; color: var(--muted); }

/* ============ Prose ============ */
.prose { font-size: 16.5px; }
.prose h2 { color: var(--navy); font-size: 24px; margin: 34px 0 12px; letter-spacing: -0.3px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { color: var(--navy); font-size: 19px; margin: 26px 0 10px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin-bottom: 6px; }

/* ============ Pages ============ */
.page-wrap { padding: 44px 20px 60px; }
.page-header { margin-bottom: 24px; }
.page-title { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.18; color: var(--navy); letter-spacing: -0.5px; margin: 0 0 10px; }
.page-standfirst { font-size: 17.5px; color: var(--muted); margin: 0; max-width: 760px; }
.page-content { max-width: 820px; }
.examples, .facts, .states-crosslink { padding: 40px 0 10px; }
.examples h2, .facts h2 { font-size: 23px; color: var(--navy); margin: 0 0 6px; }
.guide-cta {
        background: linear-gradient(150deg, var(--navy), #173055); color: #fff; border-radius: var(--radius);
        padding: 30px 34px; margin-top: 34px;
}
.guide-cta h2 { margin: 0 0 8px; color: #fff; font-size: 21px; }
.guide-cta p { color: rgba(255, 255, 255, 0.8); margin: 0 0 18px; }

/* ============ Blog ============ */
.content-with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 44px; }
.post-list { display: flex; flex-direction: column; gap: 18px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 24px 28px; }
.post-card-title { margin: 0 0 6px; font-size: 21px; }
.post-card-title a { color: var(--navy); }
.post-meta { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.post-excerpt { color: var(--muted); margin: 0 0 12px; font-size: 15px; }
.read-more { font-weight: 700; font-size: 14.5px; }
.pagination { margin-top: 28px; }
.pagination .page-numbers { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; margin-right: 6px; background: #fff; color: var(--ink); }
.pagination .page-numbers.current { background: var(--navy); color: #fff; border-color: var(--navy); }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.recent-item a { display: block; font-weight: 700; color: var(--navy); margin-bottom: 3px; font-size: 15.5px; }
.recent-item time { font-size: 12.8px; color: var(--muted); }
.post-thumb img { border-radius: var(--radius-sm); }
.post-footer { margin-top: 30px; }

/* Sidebar */
.widget-area .widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 22px; margin-bottom: 18px; }
.widget-title { margin: 0 0 10px; font-size: 16px; color: var(--navy); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 7px 0; border-bottom: 1px solid #eef1f6; font-size: 14.5px; }
.widget ul li:last-child { border-bottom: 0; }
.widget-calc-cta p { font-size: 14px; color: var(--muted); margin: 0 0 14px; }

/* ============ Contact form ============ */
.contact-form-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 34px; box-shadow: var(--shadow); max-width: 720px; }
.contact-form .form-row { margin-bottom: 18px; }
.contact-form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--navy); }
.contact-form .req { color: var(--red); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
        width: 100%; padding: 12px 14px; font-size: 15.5px; font-family: var(--font);
        border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid rgba(245, 180, 0, 0.55); border-color: var(--accent); }
.contact-form textarea { resize: vertical; }
.hp-field { position: absolute; left: -9999px; }
.form-privacy { font-size: 12.8px; color: var(--muted); margin: 12px 0 0; }
.notice-success { background: #e7f7ef; border: 1px solid #b3e6cf; color: #0b6e4b; border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; font-size: 15px; }
.notice-error { background: #fdeeee; border: 1px solid #f3c1c1; color: #a03030; border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; font-size: 15px; }

/* ============ Comments ============ */
.comments-area { margin-top: 40px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 26px 30px; }
.comments-title { font-size: 20px; color: var(--navy); margin: 0 0 16px; }
.comment-list { list-style: none; margin: 0 0 20px; padding: 0; }
.comment-list li { border-bottom: 1px solid #eef1f6; padding: 14px 0; }
.comment-list .children { list-style: none; padding-left: 32px; }
.comment-list .comment-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.comment-form p { margin: 0 0 14px; }
.comment-form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--navy); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
        width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font); font-size: 15px;
}
.no-comments { color: var(--muted); }

/* ============ Ad slots ============ */
.ad-slot { margin: 26px 0; text-align: center; min-height: 90px; }

/* ============ Footer ============ */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, 0.78); margin-top: 60px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding: 48px 20px 40px; }
.footer-logo { color: #fff; font-weight: 800; font-size: 19px; margin: 0 0 12px; }
.footer-about p { font-size: 14px; margin: 0 0 10px; }
.footer-updated { color: rgba(255, 255, 255, 0.5); font-size: 12.5px; }
.footer-title { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; font-size: 14.5px; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 18px 0; }
.footer-legal p { margin: 0; font-size: 12.8px; color: rgba(255, 255, 255, 0.55); }

/* ============ Search form ============ */
.search-form { display: flex; gap: 8px; max-width: 460px; }
.search-form input[type="search"] { flex: 1; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; font-family: var(--font); }

/* ============ Responsive ============ */
@media (max-width: 1020px) {
        .calc-grid { grid-template-columns: 1fr; }
        .calc-inputs { border-right: 0; border-bottom: 1px solid var(--line); }
        .steps-grid { grid-template-columns: repeat(2, 1fr); }
        .split { grid-template-columns: 1fr; }
        .facts-grid { grid-template-columns: 1fr; }
        .content-with-sidebar { grid-template-columns: 1fr; }
        .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
        .site-tagline { display: none; }
        .nav-toggle { display: block; }
        .primary-nav {
                display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-2);
                padding: 10px 20px 16px; box-shadow: 0 14px 22px rgba(13, 27, 46, 0.3);
        }
        .primary-nav.is-open { display: block; }
        .primary-nav ul { flex-direction: column; }
        .primary-nav ul ul { position: static; box-shadow: none; padding-left: 16px; }
        .steps-grid { grid-template-columns: 1fr; }
        .hero { padding: 44px 0 40px; }
        .section { padding: 40px 0; }
        .footer-grid { grid-template-columns: 1fr; gap: 26px; }
        .r-row { flex-direction: column; gap: 2px; }
        .r-row strong { text-align: left; }
        .calc-head, .calc-inputs, .calc-results { padding-left: 20px; padding-right: 20px; }
}

@media print {
        .site-header, .site-footer, .nav-toggle, .calc-actions, .btn { display: none !important; }
        body { background: #fff; }
}
