/* ============================================================
   EVAP CHECKER — page-specific styles
   Extracted from evap-checker.html inline <style> block
   to use the immutable 1-year cache on returning visits.
   ============================================================ */

html { scroll-behavior: smooth; }
    body { font-family: var(--font-body); background: var(--cream); color: var(--slate); min-height: 100vh; height: 100dvh; min-height: 100dvh; }

    .page-header p { max-width: 620px; }

    /* TOOL LAYOUT */
    .evap-section { padding: var(--sp-7) 0 var(--sp-8); background: var(--white); }
    .evap-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--sp-6); max-width: 1060px; margin: 0 auto; align-items: start; }

    /* FORM CARD */
    .evap-form-card { background: var(--white); border-radius: var(--radius-xl); padding: 36px var(--sp-6); box-shadow: var(--shadow-card); border: 1px solid var(--border); /* round 9 — safety hairline so card stays visible on white sections */ }
    .evap-form-card h2 { font-family: var(--font-heading); font-size: var(--fs-lg); color: var(--slate); margin-bottom: var(--sp-1); }
    .evap-form-card .form-desc { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.6; margin-bottom: var(--sp-5); }

    .step-label { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange-text); margin-bottom: var(--sp-3); display: flex; align-items: center; gap: var(--sp-2); }
    .step-label .step-num { width: 22px; height: 22px; border-radius: var(--radius-circle); background: var(--orange); color: var(--slate); display: flex; align-items: center; justify-content: center; font-size: var(--fs-2xs); font-weight: 700; }

    .step-divider { height: 1px; background: var(--border); margin: var(--card-pad-lg) 0; }

    /* field-group base → tools.css */
    .field-group .hint { line-height: 1.5; }

    select, input[type="text"], input[type="number"] {
      width: 100%; padding: var(--sp-3) 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
      font-family: var(--font-body); font-size: var(--fs-sm-plus); color: var(--slate); background: var(--white);
      transition: border-color var(--duration-fast), box-shadow var(--duration-fast); -webkit-appearance: none; appearance: none;
    }
    select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }
    /* input focus → tools.css */

    .dollar-input-wrap { position: relative; }
    .dollar-input-wrap::before { content: '$'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-family: var(--font-body); font-size: var(--fs-sm-plus); color: var(--ink-2); pointer-events: none; z-index: var(--z-base); }
    .dollar-input-wrap input { padding-left: var(--card-pad-lg); }

    .canadian-badge { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); font-weight: 600; color: var(--danger-deep); background: var(--danger-alpha-10); padding: var(--sp-1) 10px; border-radius: var(--radius-pill); margin-top: var(--sp-2); }

    .type-badge { display: inline-flex; align-items: center; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 10px; border-radius: var(--radius-pill); }
    /* Was raw rgba — now token-disciplined to ok/warn families. */
    .type-badge-bev { background: var(--ok-alpha-10); color: var(--ok-deep); }
    .type-badge-phev { background: var(--warn-tint); color: var(--warn-ink); }

    .info-note { font-size: var(--fs-sm); color: var(--ink-2); background: var(--cream); border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4); margin-top: var(--sp-4); line-height: 1.6; border-left: 3px solid var(--border); }

    /* Custom vehicle fields */
    .custom-fields { display: none; margin-top: var(--sp-4); }
    .custom-fields.visible { display: block; animation: fadeIn 0.3s ease; }

    .type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: var(--sp-4); }
    .toggle-btn { padding: var(--sp-3) var(--sp-2); border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--white); font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); cursor: pointer; transition: var(--transition); text-align: center; }
    .toggle-btn:hover { border-color: var(--orange); color: var(--orange-text); }
    .toggle-btn.selected { border-color: var(--orange); background: var(--accent-alpha-5); color: var(--orange-text); font-weight: 600; }

    .checkbox-wrap { display: flex; align-items: center; gap: 10px; margin-top: var(--sp-3); }
    .checkbox-wrap input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--orange); cursor: pointer; flex-shrink: 0; }
    .checkbox-wrap label { font-size: var(--fs-sm); font-weight: 500; color: var(--slate); margin-bottom: 0; cursor: pointer; }

    /* Purchase / Lease toggle */
    .purchase-lease-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

    .lease-term-wrap { display: none; margin-top: var(--sp-4); }
    .lease-term-wrap.visible { display: block; animation: fadeIn 0.3s ease; }

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

    /* RESULTS PANEL */
    .results-panel { background: var(--white); border-radius: var(--radius-xl); padding: var(--sp-6) 28px; box-shadow: var(--shadow-card); position: sticky; top: 100px; transition: var(--transition); border: 1px solid var(--border); /* round 9 — safety hairline so card stays visible on white sections */ }

    /* results-placeholder base → tools.css */
    .results-placeholder { padding: 40px var(--sp-4); }
    .results-placeholder svg { opacity: 0.25; }
    .results-placeholder p { line-height: 1.6; }

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

    .result-vehicle-name { font-family: var(--font-heading); font-size: var(--fs-md); color: var(--slate); margin-bottom: var(--sp-1half); line-height: 1.3; }
    .result-badges { display: flex; flex-wrap: wrap; gap: var(--sp-1half); margin-bottom: var(--sp-5); }

    .result-row { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
    .result-row:last-of-type { border-bottom: none; }
    .result-label { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; }
    .result-value { font-family: var(--font-heading); font-size: var(--fs-md); color: var(--slate); font-weight: 700; text-align: right; }

    .eligibility-status { display: flex; align-items: center; gap: var(--sp-2); padding: 14px var(--sp-4); border-radius: var(--radius-md); margin: var(--sp-4) 0; font-weight: 700; font-size: var(--fs-sm); }
    .status-eligible { background: var(--ok-alpha-10); color: var(--ok-deep); }
    .status-ineligible { background: var(--danger-alpha-10); color: var(--danger-deep); }
    .status-icon { font-size: var(--fs-md); flex-shrink: 0; }

    .rebate-amount-box { text-align: center; padding: 20px var(--sp-4); background: var(--cream); border-radius: var(--radius-md); margin: var(--sp-4) 0; }
    .rebate-label { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin-bottom: var(--sp-1); }
    .rebate-value { font-family: var(--font-heading); font-size: var(--fs-2xl); color: var(--ok-deep); line-height: 1.1; }
    .rebate-zero { color: var(--danger-deep); }
    .rebate-sub { font-size: var(--fs-sm); color: var(--ink-2); margin-top: var(--sp-1); }

    .after-rebate-box { text-align: center; padding: var(--sp-4); background: var(--slate); border-radius: var(--radius-md); margin: var(--sp-4) 0; }
    .after-rebate-label { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--orange); margin-bottom: var(--sp-1); }
    .after-rebate-value { font-family: var(--font-heading); font-size: var(--fs-xl); color: var(--white); line-height: 1.1; }
    .after-rebate-note { font-size: var(--fs-xs); color: var(--on-dark-muted); margin-top: var(--sp-1); }

    /* Declining schedule */
    .decline-schedule { margin: 20px 0 var(--sp-4); }
    .decline-title { font-size: var(--fs-sm); font-weight: 700; color: var(--slate); margin-bottom: 10px; }
    .decline-row { display: flex; align-items: center; justify-content: space-between; padding: 7px var(--sp-3); font-size: var(--fs-sm); border-radius: var(--radius-sm); }
    .decline-row.current { background: var(--accent-alpha-8); font-weight: 600; color: var(--orange-text); }
    .decline-row:not(.current) { color: var(--ink-2); }
    .decline-year { min-width: 44px; }
    .decline-amount { font-weight: 600; }
    .decline-tag { font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: var(--orange); color: var(--slate); padding: 2px var(--sp-2); border-radius: var(--radius-md); margin-left: var(--sp-2); }

    .one-rebate-note { font-size: var(--fs-sm); color: var(--ink-2); background: var(--accent-alpha-5); border-radius: var(--radius-md); padding: 10px 14px; margin: var(--sp-3) 0 20px; line-height: 1.5; border-left: 3px solid var(--orange); }

    .result-cta { display: block; width: 100%; text-align: center; background: var(--orange); color: var(--slate); text-decoration: none; border-radius: var(--radius-md); padding: 14px 20px; font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700; transition: var(--transition); }
    .result-cta:hover { background: var(--orange-dark); transform: translateY(-1px); }

    /* INFO CARDS SECTION */
    .info-section { padding: var(--section-pad); background: var(--cream); }
    .info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); max-width: 1060px; margin: 0 auto; }
    .info-card { background: var(--white); border-radius: var(--radius-xl); padding: var(--sp-6) 28px; box-shadow: var(--shadow-card); border: 1px solid var(--border); /* round 9 — safety hairline so card stays visible on white sections */ }
    .info-card-icon { width: 48px; height: 48px; border-radius: var(--radius-circle); display: flex; align-items: center; justify-content: center; font-size: var(--fs-md); margin-bottom: var(--sp-4); }
    .info-card h3 { font-family: var(--font-heading); font-size: var(--fs-md); color: var(--slate); margin-bottom: 10px; }
    .info-card p { font-size: var(--fs-sm); color: var(--ink-2); line-height: var(--lh-relaxed); margin-bottom: 0; }
    .info-card ul { margin: 10px 0 0; padding-left: var(--sp-4); }
    .info-card ul li { font-size: var(--fs-sm); color: var(--ink-2); line-height: var(--lh-relaxed); margin-bottom: var(--sp-1); }
    .info-card ul li strong { color: var(--slate); }

    /* CTA trust badges → tools.css */

    /* RESPONSIVE */
    @media (max-width: 768px) {
      .evap-grid { grid-template-columns: 1fr; }
      .results-panel { position: static; }
      .evap-form-card, .results-panel { padding: var(--sp-5) var(--sp-4); }
      .info-grid { grid-template-columns: 1fr; }
      .info-card { padding: var(--sp-5) 20px; }
    }

    @media (max-width: 640px) {
      .type-toggle, .purchase-lease-toggle { grid-template-columns: 1fr; }
    }

    /* SHARE + EMAIL */
    .result-actions { display: flex; gap: 10px; margin-top: var(--sp-3); }
    .result-action-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: var(--sp-1half); padding: var(--sp-3) var(--sp-3); border-radius: var(--radius-md); font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: var(--transition); border: 1.5px solid var(--border); background: var(--white); color: var(--slate); text-decoration: none; }
    .result-action-btn:hover { border-color: var(--orange); color: var(--orange-text); }
    .result-action-btn.copied { border-color: var(--success); color: var(--ok-text); background: rgba(16,185,129,0.06); }
    .result-action-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

    .email-capture { margin-top: var(--sp-4); padding: var(--sp-4); background: var(--cream); border-radius: var(--radius-md); display: none; }
    .email-capture.visible { display: block; animation: fadeIn 0.3s ease; }
    .email-capture p { font-size: var(--fs-sm); font-weight: 600; color: var(--slate); margin-bottom: var(--sp-2); }
    .email-capture-form { display: flex; gap: var(--sp-2); }
    .email-capture-form input { flex: 1; padding: 10px var(--sp-3); border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: var(--fs-sm); }
    .email-capture-form input:focus { outline: none; border-color: var(--orange); box-shadow: var(--shadow-focus-sm); }
    .email-capture-form button { padding: 10px var(--sp-4); background: var(--orange); color: var(--slate); border: none; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: background var(--duration-fast); white-space: nowrap; }
    .email-capture-form button:hover { background: var(--orange-dark); }
    .email-success { display: none; text-align: center; padding: var(--sp-3); color: var(--success); font-size: var(--fs-sm); font-weight: 600; }
    .email-success.visible { display: block; }

    /* SEO CONTENT SECTIONS */
    .seo-section { padding: var(--section-pad); }
    .seo-section.bg-white { background: var(--white); }
    .seo-section.bg-cream { background: var(--cream); }
    .seo-content { max-width: 800px; margin: 0 auto; }
    .seo-content h2 { font-family: var(--font-heading); font-size: clamp(1.75rem, 3.5vw, 2.6rem); color: var(--slate); margin-bottom: var(--sp-3); }
    .seo-content p { font-size: var(--fs-sm-plus); color: var(--ink-2); line-height: 1.8; margin-bottom: var(--sp-4); }
    .seo-content ul, .seo-content ol { margin: 0 0 20px; padding-left: var(--sp-5); }
    .seo-content li { font-size: var(--fs-sm-plus); color: var(--ink-2); line-height: 1.8; margin-bottom: var(--sp-1half); }
    .seo-content li strong { color: var(--slate); }

    .steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); margin: var(--card-pad-lg) 0; }
    .step-card { text-align: center; padding: var(--sp-5) var(--sp-4); background: var(--cream); border-radius: var(--radius-lg); }
    .step-card-num { width: 36px; height: 36px; border-radius: var(--radius-circle); background: var(--orange); color: var(--slate); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-size: var(--fs-base); margin: 0 auto var(--sp-3); }
    .step-card h4 { font-family: var(--font-heading); font-size: var(--fs-base); color: var(--slate); margin-bottom: var(--sp-1half); }
    .step-card p { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6; margin: 0; }

    .decline-table { width: 100%; border-collapse: collapse; margin: var(--sp-5) 0; }
    .decline-table th { text-align: left; padding: var(--sp-3) var(--sp-4); background: var(--slate); color: var(--white); font-size: var(--fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
    .decline-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
    .decline-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
    .decline-table td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); color: var(--ink-2); }
    .decline-table tr.highlight td { background: var(--accent-alpha-5); color: var(--orange-text); font-weight: 600; }

    .evap-faq-list { max-width: var(--container-prose-md); margin: 0 auto; }

    @media (max-width: 768px) {
      .steps-grid { grid-template-columns: 1fr; }
      .result-actions { flex-direction: column; }
    }

    /* Print */
    @media print {
      .nav, .mobile-nav, .mobile-cta-bar { display: none !important; }
      .results-panel { position: static; box-shadow: none !important; border: 1px solid #ddd; }
    }
