/* ============================================================
   UpdateTaxCodes.com — Design System
   Think Tank Legitimate: Brookings / Tax Foundation inspired
   Palette: Slate blue, warm gray, muted navy, data-accent red
   ============================================================ */

:root {
    --slate-900: #0F172A;
    --slate-800: #1E293B;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748B;
    --slate-400: #94A3B8;
    --slate-300: #CBD5E1;
    --slate-200: #E2E8F0;
    --slate-100: #F1F5F9;
    --slate-50: #F8FAFC;
    --navy: #1B2E4B;
    --navy-light: #2A4365;
    --accent: #B91C1C;
    --accent-light: #DC2626;
    --accent-bg: #FEF2F2;
    --gold: #92400E;
    --gold-light: #D97706;
    --green: #166534;
    --green-light: #16A34A;
    --bg: #FFFFFF;
    --bg-alt: #F8FAFC;
    --border: #E2E8F0;
    --text: #1E293B;
    --text-secondary: #64748B;
    --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', 'Courier New', monospace;
    --max-w: 1080px;
    --radius: 6px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

[id] {
    scroll-margin-top: 80px;
}

/* ============================================================
   RULES / DIVIDERS
   ============================================================ */
.rule {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 0;
}

.rule-accent {
    height: 3px;
    background: linear-gradient(to right, var(--navy), var(--slate-400), var(--navy));
    border: none;
    margin: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-text {
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -0.3px;
}

.brand-text span {
    color: var(--slate-500);
    font-weight: 400;
}

/* Desktop nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-600);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: all 0.15s;
    white-space: nowrap;
}

.site-nav a:hover {
    color: var(--text);
    background: var(--slate-100);
}

.site-nav a.active {
    color: var(--navy);
    background: var(--slate-100);
}

/* Mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 10px;
    font-size: 20px;
    cursor: pointer;
    color: var(--text);
    line-height: 1;
}

.mobile-nav {
    display: none;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 16px;
}

.mobile-nav.open {
    display: block;
}

.mobile-nav a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--slate-600);
    text-decoration: none;
    border-bottom: 1px solid var(--slate-100);
}

.mobile-nav a:last-child {
    border: none;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    padding: 56px 24px 48px;
    text-align: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--navy);
    border-radius: 2px;
}

.hero .eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--accent);
    margin-bottom: 20px;
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(28px, 4.5vw, 46px);
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.2;
    max-width: 780px;
    margin: 0 auto 20px;
    letter-spacing: -0.5px;
}

.hero .subtitle {
    font-family: var(--serif);
    font-size: clamp(16px, 2vw, 19px);
    font-style: italic;
    color: var(--slate-500);
    max-width: 640px;
    margin: 0 auto 32px;
    line-height: 1.5;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    margin-top: 36px;
}

.stat-number {
    font-family: var(--mono);
    font-size: 36px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--slate-500);
    max-width: 140px;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    padding: 48px 24px;
}

.section-alt {
    background: var(--bg-alt);
}

.section-dark {
    background: var(--slate-900);
    color: white;
}

.section-header {
    max-width: var(--max-w);
    margin: 0 auto 28px;
}

.section-header .eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--accent);
    margin-bottom: 10px;
}

.section-dark .section-header .eyebrow {
    color: var(--gold-light);
}

.section-header h2 {
    font-family: var(--serif);
    font-size: clamp(24px, 3.5vw, 34px);
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.section-dark .section-header h2 {
    color: white;
}

.section-header p {
    font-size: 17px;
    color: var(--slate-500);
    max-width: 600px;
    line-height: 1.6;
}

.section-dark .section-header p {
    color: var(--slate-400);
}

/* ============================================================
   CALCULATOR CARD
   ============================================================ */
.calc-card {
    max-width: var(--max-w);
    margin: 0 auto;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.calc-header {
    background: var(--navy);
    padding: 24px 32px;
    color: white;
}

.calc-header h3 {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.calc-header p {
    font-size: 14px;
    color: var(--slate-300);
}

.calc-body {
    padding: 32px;
}

.calc-form-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr 0.8fr;
    gap: 16px;
    align-items: start;
}

.calc-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--slate-600);
    margin-bottom: 6px;
    min-height: 34px;
    line-height: 1.3;
}

.calc-field input,
.calc-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 15px;
    color: var(--text);
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
    height: 48px;
}

.calc-field input:focus,
.calc-field select:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(27, 46, 75, 0.1);
}

/* Tooltip ? icon */
.tip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--slate-200);
    color: var(--slate-500);
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    cursor: help;
    flex-shrink: 0;
    position: relative;
    text-transform: none;
    letter-spacing: 0;
    transition: background 0.15s;
}

.tip-icon:hover {
    background: var(--navy);
    color: white;
}

.tip-icon .tip-text {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--slate-800);
    color: white;
    font-size: 12px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    padding: 8px 12px;
    border-radius: var(--radius);
    white-space: nowrap;
    z-index: 20;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tip-icon .tip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--slate-800);
}

.tip-icon:hover .tip-text {
    display: block;
}

.input-prefix {
    position: relative;
}

.input-prefix::before {
    content: '$';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    font-size: 15px;
    pointer-events: none;
}

.input-prefix input {
    padding-left: 28px;
}

.calc-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-calc {
    padding: 14px 36px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-calc:hover {
    background: var(--accent-light);
}

/* Action CTA — disabled by default, enabled after calculation */
.btn-action-cta {
    padding: 14px 28px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    cursor: not-allowed;
    transition: all 0.3s;
    white-space: nowrap;
    background: var(--slate-50);
    color: var(--slate-400);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-action-cta .cta-lock {
    font-size: 14px;
}

.btn-action-cta .cta-arrow {
    display: none;
    font-size: 14px;
}

.btn-action-cta.enabled {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
    cursor: pointer;
    animation: ctaPulse 2s ease-in-out 0.5s 2;
}

.btn-action-cta.enabled:hover {
    background: var(--navy-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 46, 75, 0.3);
}

.btn-action-cta.enabled .cta-lock {
    display: none;
}

.btn-action-cta.enabled .cta-arrow {
    display: inline;
}

@keyframes ctaPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(27, 46, 75, 0);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(27, 46, 75, 0.15);
    }
}

.calc-privacy {
    font-size: 12px;
    color: var(--slate-400);
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   CALCULATOR RESULTS
   ============================================================ */
.calc-results {
    display: none;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.calc-results.visible {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 28px;
    padding: 28px 32px;
    background: var(--accent-bg);
    border-radius: 8px;
    border: 1px solid #FECACA;
}

.rh-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 2px;
}

.rh-value {
    font-family: var(--mono);
    font-size: 44px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.1;
}

.rh-sub {
    font-size: 14px;
    color: var(--slate-600);
    margin-top: 6px;
    line-height: 1.4;
}

.rh-side {
    text-align: right;
}

.rh-side .rh-value {
    font-size: 28px;
    color: var(--slate-700);
}

.rh-side .rh-label {
    color: var(--slate-500);
}

.result-breakdown {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 24px;
}

.rb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--slate-50);
    border: 1px solid var(--slate-100);
}

.rb-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.rb-detail {
    font-size: 12px;
    color: var(--slate-500);
}

.rb-amount {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

/* ============================================================
   REPRESENTATIVE CARD
   ============================================================ */
.rep-card {
    display: none;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.rep-card.visible {
    display: block;
    animation: fadeIn 0.5s ease 0.2s both;
}

.rep-card-header {
    background: var(--slate-800);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rep-card-header .rch-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--slate-400);
}

.rep-card-header .rch-district {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-300);
}

.rep-card-body {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.rep-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--slate-200);
    background: var(--slate-100);
    flex-shrink: 0;
}

.rep-photo-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--slate-100);
    border: 3px solid var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--slate-400);
    flex-shrink: 0;
}

.rep-info {
    flex: 1;
    min-width: 200px;
}

.rep-name {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 2px;
}

.rep-party {
    font-size: 14px;
    color: var(--slate-500);
    margin-bottom: 8px;
}

.rep-party .party-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.party-R {
    background: #FEE2E2;
    color: #991B1B;
}

.party-D {
    background: #DBEAFE;
    color: #1E40AF;
}

.party-I {
    background: #E5E7EB;
    color: #374151;
}

.party-unknown {
    background: #F3F4F6;
    color: #6B7280;
}

.rep-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rep-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text);
    transition: all 0.15s;
    background: white;
    cursor: pointer;
}

.rep-link:hover {
    background: var(--slate-50);
    border-color: var(--slate-400);
}

.rep-link-primary {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

.rep-link-primary:hover {
    background: var(--navy-light);
}

.rep-card-loading {
    padding: 20px;
    text-align: center;
    color: var(--slate-500);
    font-size: 14px;
}

.rep-card-loading .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--slate-200);
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.rep-card-fallback {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.rep-card-fallback p {
    font-size: 14px;
    color: var(--slate-600);
    flex: 1;
    min-width: 200px;
}

/* Share buttons */
.result-share-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
}

.btn-share:hover {
    background: var(--slate-50);
    border-color: var(--slate-400);
}

.btn-share-dark {
    background: var(--slate-800);
    color: white;
    border-color: var(--slate-800);
}

.btn-share-dark:hover {
    background: var(--slate-700);
}

/* ============================================================
   ACTION SECTION
   ============================================================ */
.action-panel {
    max-width: var(--max-w);
    margin: 0 auto;
}

.action-top-bar {
    background: var(--accent-bg);
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 20px 28px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.atb-text {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.atb-text span {
    font-family: var(--mono);
    font-size: 22px;
}

.atb-sub {
    font-size: 14px;
    color: var(--slate-600);
    margin-top: 2px;
}

/* Ways & Means explainer */
.wm-card {
    background: var(--slate-700);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.wm-card .wm-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.wm-card .wm-info {
    flex: 1;
    min-width: 250px;
}

.wm-card .wm-title {
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.wm-card .wm-detail {
    font-size: 13px;
    color: var(--slate-400);
    line-height: 1.6;
}

.wm-card .wm-detail strong {
    color: var(--slate-300);
}

.action-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 32px;
    align-items: start;
}

.action-form-card {
    background: var(--slate-800);
    border-radius: 8px;
    padding: 32px;
}

.action-form-card h3 {
    font-family: var(--serif);
    font-size: 20px;
    color: white;
    margin-bottom: 4px;
}

.action-form-card .afc-sub {
    font-size: 14px;
    color: var(--slate-400);
    margin-bottom: 24px;
}

.action-name-field {
    margin-bottom: 16px;
}

.action-name-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--slate-300);
    margin-bottom: 6px;
}

.action-name-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--slate-600);
    border-radius: var(--radius);
    background: var(--slate-700);
    color: white;
    font-family: var(--sans);
    font-size: 15px;
}

.action-name-field input::placeholder {
    color: var(--slate-400);
}

.action-name-field input:focus {
    outline: none;
    border-color: var(--gold-light);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

.action-name-field .field-hint {
    font-size: 11px;
    color: var(--slate-500);
    margin-top: 4px;
}

.btn-generate-letter {
    width: 100%;
    padding: 14px 24px;
    background: white;
    color: var(--slate-900);
    border: none;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-generate-letter:hover {
    background: var(--slate-100);
}

/* Send steps */
/* Send Flow (replaces old send-steps) */
.send-flow {
    margin-top: 24px;
    display: none;
}

.send-flow.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.send-flow-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.send-flow-check {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green);
    color: white;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.send-flow-header h4 {
    font-family: var(--serif);
    font-size: 18px;
    color: var(--green);
    margin: 0;
}

.send-flow-header p {
    font-size: 13px;
    color: var(--slate-400);
    margin: 2px 0 0;
}

/* Big CTA button */
.btn-send-now {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 18px 24px;
    background: var(--crimson);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    margin-bottom: 12px;
}

.btn-send-now:hover {
    background: #991B1B;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(185, 28, 28, 0.3);
}

.btn-send-now:active {
    transform: translateY(0);
}

.btn-send-now.sent {
    background: var(--green);
}

.btn-send-now .btn-send-icon {
    font-size: 28px;
}

.btn-send-now .btn-send-text {
    display: flex;
    flex-direction: column;
}

.btn-send-now .btn-send-text strong {
    color: white;
    font-size: 16px;
    font-family: var(--sans);
}

.btn-send-now .btn-send-text small {
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    margin-top: 2px;
}

.send-confirm {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(22, 101, 52, 0.15);
    border: 1px solid rgba(22, 101, 52, 0.3);
    border-radius: 8px;
    color: var(--green);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Visual Steps */
.send-steps-visual {
    padding: 20px 0;
    border-top: 1px solid var(--slate-700);
    margin-top: 8px;
}

.ssv-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.ssv-step.done {
    opacity: 0.5;
}

.ssv-step.active {
    background: rgba(22, 101, 52, 0.1);
    border: 1px solid rgba(22, 101, 52, 0.2);
}

.ssv-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--slate-600);
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.ssv-step.done .ssv-num {
    background: var(--green);
}

.ssv-step.active .ssv-num {
    background: var(--gold);
    color: var(--slate-900);
}

.ssv-content strong {
    color: white;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.ssv-content p {
    color: var(--slate-400);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.ssv-content kbd {
    display: inline-block;
    padding: 2px 6px;
    background: var(--slate-700);
    border: 1px solid var(--slate-500);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--slate-200);
}

.ssv-connector {
    width: 2px;
    height: 16px;
    background: var(--slate-700);
    margin-left: 29px;
}

.ssv-tips {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ssv-tip {
    font-size: 12px;
    color: var(--slate-400);
    padding: 6px 10px;
    background: var(--slate-800);
    border-radius: 6px;
    line-height: 1.4;
}

.ssv-tip strong {
    color: var(--gold-light);
}

/* Extras row */
.send-extras {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--slate-700);
}

.btn-extra {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border: 1px solid var(--slate-600);
    background: transparent;
    color: var(--slate-400);
}

.btn-extra:hover {
    border-color: var(--slate-400);
    color: white;
}

/* Bonus tip */
.send-bonus {
    margin-top: 16px;
    padding: 14px 16px;
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: 8px;
    font-size: 13px;
    color: var(--slate-400);
    line-height: 1.5;
}

.send-bonus strong {
    color: var(--gold-light);
}

.send-bonus a {
    color: var(--gold-light);
    text-decoration: underline;
}

.privacy-note {
    margin-top: 20px;
    font-size: 12px;
    color: var(--slate-400);
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.privacy-note svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* ============================================================
   LETTER DISPLAY
   ============================================================ */
.letter-preview {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 32px;
    font-family: var(--serif);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    position: relative;
}

.letter-preview .lp-badge {
    position: absolute;
    top: 12px;
    right: 16px;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--slate-400);
    text-transform: uppercase;
}

.letter-to {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--slate-500);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    line-height: 1.6;
}

.letter-body p {
    margin-bottom: 14px;
}

.letter-body p:last-child {
    margin-bottom: 0;
}

.letter-placeholder {
    text-align: center;
    padding: 60px 32px;
    color: var(--slate-400);
    font-family: var(--sans);
}

.letter-placeholder .lp-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.letter-placeholder p {
    font-size: 15px;
    line-height: 1.6;
}

.letter-output {
    display: none;
}

.letter-output.visible {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Letter output has no separate button row - buttons are in send-flow */

/* ============================================================
   RECEIPTS TABLE
   ============================================================ */
.receipts-wrapper {
    max-width: var(--max-w);
    margin: 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--slate-200);
}

.receipts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 700px;
    background: white;
}

.receipts-table thead th {
    background: var(--slate-800);
    color: white;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
}

.receipts-table thead th:first-child {
    border-radius: 0;
}

.receipts-table thead th:last-child {
    border-radius: 0;
}

.receipts-table tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--slate-100);
    vertical-align: top;
}

.receipts-table tbody tr:hover td {
    background: var(--slate-50);
}

.receipts-table .code-name {
    font-weight: 600;
}

.receipts-table .frozen-val {
    font-family: var(--mono);
    font-weight: 500;
    color: var(--accent);
}

.receipts-table .adjusted-val {
    font-family: var(--mono);
    font-weight: 500;
    color: var(--green);
}

.receipts-table .loss-val {
    font-family: var(--mono);
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-bg);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

.receipts-table .yr {
    color: var(--slate-500);
    font-size: 13px;
}

.table-footnote {
    max-width: var(--max-w);
    margin: 16px auto 0;
    font-size: 13px;
    color: var(--slate-500);
    line-height: 1.6;
}

/* ============================================================
   METHODOLOGY
   ============================================================ */
.methodology {
    max-width: 760px;
    margin: 0 auto;
}

.methodology h3 {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--slate-900);
    margin-top: 36px;
    margin-bottom: 12px;
}

.methodology h3:first-child {
    margin-top: 0;
}

.methodology p {
    font-size: 16px;
    color: var(--slate-600);
    line-height: 1.7;
    margin-bottom: 14px;
}

.methodology .formula-block {
    background: var(--slate-900);
    color: var(--gold-light);
    font-family: var(--mono);
    font-size: 13px;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin: 16px 0;
    overflow-x: auto;
    line-height: 1.7;
}

.methodology ul {
    margin: 12px 0 16px 20px;
    color: var(--slate-600);
    font-size: 15px;
    line-height: 1.7;
}

.methodology li {
    margin-bottom: 4px;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--slate-800);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--sans);
    gap: 16px;
    transition: background 0.15s;
}

.faq-question:hover {
    background: var(--slate-50);
}

.faq-arrow {
    font-size: 14px;
    color: var(--slate-400);
    transition: transform 0.25s;
    flex-shrink: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-answer-inner {
    padding: 0 20px 18px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--slate-600);
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.faq-answer-inner a {
    color: var(--navy);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--slate-900);
    color: var(--slate-400);
    padding: 48px 24px 36px;
    font-size: 13px;
    line-height: 1.7;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-col {
    max-width: 400px;
}

.footer-col h4 {
    font-family: var(--serif);
    color: white;
    font-size: 15px;
    margin-bottom: 8px;
}

.footer-col a {
    color: var(--slate-400);
    text-decoration: none;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    max-width: var(--max-w);
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--slate-700);
    text-align: center;
    font-size: 12px;
    color: var(--slate-500);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .site-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 36px 20px 40px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 28px;
    }

    .section {
        padding: 36px 20px;
    }

    .calc-form-row {
        grid-template-columns: 1fr 1fr;
    }

    .calc-body {
        padding: 20px;
    }

    .calc-header {
        padding: 20px;
    }

    .result-hero-row {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .rh-side {
        text-align: center;
    }

    .rh-value {
        font-size: 36px !important;
    }

    .footer-inner {
        flex-direction: column;
        gap: 24px;
    }

    .rep-card-body {
        justify-content: center;
        text-align: center;
    }

    .rep-links {
        justify-content: center;
    }

    .wm-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .calc-form-row {
        grid-template-columns: 1fr;
    }

    .calc-btn-row {
        flex-direction: column;
    }

    .btn-action-cta {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {

    .site-header,
    .site-footer,
    .btn-share,
    .btn-calc,
    .btn-action-cta,
    .btn-generate-letter,
    .mobile-menu-btn,
    .calc-privacy,
    .result-share-row,
    .letter-btn-row,
    .action-email-row,
    .rep-links,
    .send-steps {
        display: none !important;
    }

    .section {
        padding: 24px 0;
    }
}

/* Hidden canvas for share image */
#shareCanvas {
    display: none;
}

/* Provision status badges */
.prov-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

.prov-fixed {
    background: #dcfce7;
    color: #166534;
}

.prov-temp {
    background: #fef9c3;
    color: #854d0e;
}

.prov-ended {
    background: #fee2e2;
    color: #991b1b;
}

.row-resolved {
    opacity: 0.65;
}