/* ---- Calculator-page specific styles ---- */
        .calc-layout {
            display: grid;
            grid-template-columns: 1fr 380px;
            gap: 28px;
            max-width: 1100px;
            margin: 0 auto;
            padding: 40px 24px;
            align-items: start;
        }

        @media (max-width: 860px) {
            .calc-layout { grid-template-columns: 1fr; }
        }

        /* --- Calculator Card --- */
        .calc-card {
            background: #fff;
            border-radius: 20px;
            box-shadow: 0 8px 40px rgba(102,126,234,0.15);
            padding: 36px;
            animation: fadeUp 0.5s ease-out both;
        }

        .calc-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .calc-header h2 {
            font-size: 24px;
            color: var(--text-dark);
            margin-bottom: 6px;
        }

        .calc-header p { font-size: 13px; color: var(--text-light); }

        .form-group { margin-bottom: 24px; }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: var(--text-dark);
            font-weight: 600;
            font-size: 14px;
        }

        /* Toggle button groups */
        .toggle-group {
            display: flex;
            gap: 10px;
        }

        .toggle-btn {
            flex: 1;
            padding: 11px 8px;
            border: 2px solid var(--border);
            background: #fff;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.25s ease;
            font-family: inherit;
        }

        .toggle-btn:hover { border-color: var(--primary); background: var(--primary-light); }
        .toggle-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

        /* Inputs */
        input[type="number"],
        input[type="text"],
        select {
            width: 100%;
            padding: 12px 14px;
            border: 2px solid var(--border);
            border-radius: 8px;
            font-size: 14px;
            font-family: inherit;
            transition: border-color 0.25s, box-shadow 0.25s;
            outline: none;
        }

        input[type="number"]:focus,
        input[type="text"]:focus,
        select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
        }

        .input-pair {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
        }

        /* Slider */
        .slider-wrap { margin-top: 8px; }

        input[type="range"] {
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: var(--border);
            outline: none;
            -webkit-appearance: none;
            cursor: pointer;
        }

        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--primary);
            cursor: pointer;
            border: 2px solid #fff;
            box-shadow: 0 2px 8px rgba(102,126,234,0.4);
        }

        input[type="range"]::-moz-range-thumb {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--primary);
            cursor: pointer;
            border: 2px solid #fff;
        }

        .slider-label {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 6px;
            font-size: 13px;
            color: var(--text-light);
        }

        .slider-label strong { color: var(--primary); font-size: 15px; }

        /* Tooltip */
        .tooltip-wrap {
            position: relative;
            display: inline-block;
            margin-left: 6px;
            vertical-align: middle;
        }

        .tooltip-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 17px;
            height: 17px;
            background: var(--primary);
            color: #fff;
            border-radius: 50%;
            font-size: 11px;
            font-weight: 700;
            cursor: help;
        }

        .tooltip-text {
            visibility: hidden;
            opacity: 0;
            width: 210px;
            background: #333;
            color: #fff;
            text-align: center;
            border-radius: 7px;
            padding: 8px 10px;
            position: absolute;
            z-index: 99;
            bottom: 130%;
            left: 50%;
            transform: translateX(-50%);
            font-size: 12px;
            font-weight: 400;
            line-height: 1.5;
            transition: opacity 0.2s;
            pointer-events: none;
        }

        .tooltip-text::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: #333;
        }

        .tooltip-wrap:hover .tooltip-text,
        .tooltip-wrap:focus-within .tooltip-text {
            visibility: visible;
            opacity: 1;
        }

        /* Error */
        .field-error {
            display: none;
            color: #c62828;
            font-size: 12px;
            margin-top: 5px;
        }

        .field-error.show { display: block; }

        /* Buttons */
        .btn-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
            margin-top: 28px;
        }

        .btn {
            padding: 13px 24px;
            border: none;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.25s ease;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: #fff;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(102,126,234,0.35);
        }

        .btn-secondary { background: #f0f0f0; color: #444; }
        .btn-secondary:hover { background: #e0e0e0; }

        /* Results Panel */
        .results-panel {
            display: none;
            margin-top: 28px;
            animation: fadeUp 0.4s ease-out;
        }

        .results-panel.show { display: block; }

        .bac-display {
            text-align: center;
            padding: 24px 16px;
            background: linear-gradient(135deg, #f8f9ff 0%, #eef1ff 100%);
            border-radius: 14px;
            margin-bottom: 18px;
        }

        .bac-display .label {
            font-size: 13px;
            color: var(--text-light);
            margin-bottom: 4px;
        }

        .bac-display .value {
            font-size: 56px;
            font-weight: 800;
            color: var(--primary-dark);
            line-height: 1;
            margin-bottom: 4px;
            letter-spacing: -1px;
        }

        .bac-display .unit { font-size: 15px; color: var(--text-light); }

        /* Gauge */
        .gauge-bar {
            width: 100%;
            height: 28px;
            background: linear-gradient(to right, #00d084 0%, #ffd700 40%, #ff9f1c 65%, #ff6b6b 85%, #c1121f 100%);
            border-radius: 14px;
            position: relative;
            overflow: visible;
            margin-bottom: 6px;
        }

        .gauge-needle {
            position: absolute;
            top: -4px;
            width: 4px;
            height: 36px;
            background: var(--text-dark);
            border-radius: 2px;
            transform: translateX(-50%);
            transition: left 0.6s cubic-bezier(0.34,1.56,0.64,1);
            left: 0%;
        }

        .gauge-needle::before {
            content: '';
            position: absolute;
            top: -5px;
            left: 50%;
            transform: translateX(-50%);
            width: 12px;
            height: 12px;
            background: var(--text-dark);
            border-radius: 50%;
        }

        .gauge-ticks {
            display: flex;
            justify-content: space-between;
            font-size: 11px;
            color: var(--text-light);
            margin-top: 4px;
        }

        /* Legal indicator */
        .legal-pill {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            margin: 14px 0;
        }

        .legal-pill.legal   { background: #f0fdf4; color: #1b5e20; }
        .legal-pill.illegal { background: #ffe0e0; color: #c62828; }

        .legal-dot {
            width: 11px;
            height: 11px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .legal-pill.legal   .legal-dot { background: #22c55e; }
        .legal-pill.illegal .legal-dot { background: #ef4444; }

        /* Status card */
        .status-result {
            padding: 14px 18px;
            border-radius: 10px;
            border-left: 5px solid;
            margin-bottom: 12px;
        }

        .status-result.safe     { border-color: #00d084; background: #f0fdf4; }
        .status-result.mild     { border-color: #ffd700; background: #fffbf0; }
        .status-result.impaired { border-color: #ff9f1c; background: #fff5f0; }
        .status-result.serious  { border-color: #ff6b6b; background: #fff0f0; }
        .status-result.critical { border-color: #c1121f; background: #ffe0e0; }

        .status-result .s-title {
            font-weight: 700;
            font-size: 14px;
            margin-bottom: 4px;
        }

        .status-result .s-desc { font-size: 13px; color: var(--text-mid); }

        /* Sobriety info */
        .sober-info {
            padding: 14px 18px;
            background: var(--primary-light);
            border-radius: 10px;
            border-left: 5px solid var(--primary);
        }

        .sober-info .s-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
        .sober-info .s-desc  { font-size: 13px; color: var(--text-mid); }

        /* Disclaimer */
        .calc-disclaimer {
            background: #fff8e1;
            border: 2px solid #ffc107;
            border-radius: 10px;
            padding: 14px 18px;
            margin-top: 24px;
            font-size: 12px;
            color: #856404;
            text-align: center;
            line-height: 1.7;
        }

        /* --- Sidebar --- */
        .sidebar { display: flex; flex-direction: column; gap: 20px; }

        .sidebar-card {
            background: #fff;
            border-radius: 16px;
            box-shadow: var(--shadow);
            padding: 24px;
            animation: fadeUp 0.5s ease-out both;
        }

        .sidebar-card h3 {
            font-size: 15px;
            font-weight: 700;
            color: var(--text-dark);
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* BAC Scale */
        .bac-scale { display: flex; flex-direction: column; gap: 8px; }

        .bac-row {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 8px;
            font-size: 13px;
        }

        .bac-row .dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            flex-shrink: 0;
            margin-top: 2px;
        }

        .bac-row .range { font-weight: 700; color: var(--text-dark); min-width: 70px; }
        .bac-row .effect { color: var(--text-mid); line-height: 1.5; }
        .bac-row.s0 { background: #f0fdf4; } .bac-row.s0 .dot { background: #00d084; }
        .bac-row.s1 { background: #fffbf0; } .bac-row.s1 .dot { background: #ffd700; }
        .bac-row.s2 { background: #fff5f0; } .bac-row.s2 .dot { background: #ff9f1c; }
        .bac-row.s3 { background: #fff0f0; } .bac-row.s3 .dot { background: #ff6b6b; }
        .bac-row.s4 { background: #ffe0e0; } .bac-row.s4 .dot { background: #c1121f; }

        /* Quick links */
        .quick-links { display: flex; flex-direction: column; gap: 8px; }

        .quick-link {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 11px 14px;
            border-radius: 9px;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-dark);
            border: 1.5px solid var(--border);
            transition: all 0.22s ease;
        }

        .quick-link:hover {
            background: var(--primary-light);
            border-color: var(--primary);
            color: var(--primary);
        }

        .quick-link span:first-child { font-size: 18px; }

        /* Features strip */
        .features-strip {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: #fff;
            padding: 36px 24px;
        }

        .features-grid {
            max-width: 1100px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 24px;
            text-align: center;
        }

        .feature-item { padding: 8px; }
        .feature-item .fi-icon { font-size: 36px; margin-bottom: 10px; }
        .feature-item h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
        .feature-item p  { font-size: 13px; opacity: 0.85; line-height: 1.6; }

        @media (max-width: 480px) {
            .input-pair { grid-template-columns: 1fr; }
            .btn-row    { grid-template-columns: 1fr; }
            .bac-display .value { font-size: 42px; }
        }

/* ---- Page-specific styles ---- */
        .how-layout {
            max-width: 900px;
            margin: 0 auto;
            padding: 48px 24px;
        }

        /* Formula box */
        .formula-box {
            background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
            border: 2px solid var(--primary);
            border-radius: 16px;
            padding: 32px;
            text-align: center;
            margin: 28px 0;
        }

        .formula-box .formula-title {
            font-size: 13px;
            font-weight: 600;
            color: var(--primary);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 14px;
        }

        .formula {
            font-size: clamp(18px, 4vw, 28px);
            font-weight: 700;
            color: var(--text-dark);
            font-family: 'Courier New', Courier, monospace;
            margin-bottom: 16px;
            line-height: 1.5;
        }

        .formula span { color: var(--primary); }

        .formula-legend {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 10px;
            margin-top: 18px;
            text-align: left;
        }

        .legend-item {
            background: #fff;
            border-radius: 8px;
            padding: 10px 14px;
            font-size: 13px;
            border: 1px solid rgba(102,126,234,0.15);
        }

        .legend-item strong { color: var(--primary); font-family: monospace; font-size: 15px; }

        /* Steps */
        .steps { display: flex; flex-direction: column; gap: 0; margin: 28px 0; }

        .step {
            display: flex;
            gap: 20px;
            align-items: flex-start;
            padding: 24px 0;
            border-bottom: 1px solid var(--border);
        }

        .step:last-child { border-bottom: none; }

        .step-num {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: #fff;
            font-size: 18px;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .step-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--text-dark); }
        .step-body p  { font-size: 14px; color: var(--text-mid); line-height: 1.7; }

        /* Factor cards */
        .factor-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
            gap: 18px;
            margin-top: 16px;
        }

        .factor-card {
            background: #fff;
            border-radius: 14px;
            padding: 22px;
            box-shadow: var(--shadow);
            border: 1px solid rgba(102,126,234,0.08);
        }

        .factor-card .fc-icon { font-size: 32px; margin-bottom: 10px; }
        .factor-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--text-dark); }
        .factor-card p  { font-size: 13px; color: var(--text-mid); line-height: 1.65; }

        /* Comparison table */
        .compare-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14px;
            margin: 16px 0;
        }

        .compare-table th {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: #fff;
            padding: 12px 16px;
            text-align: left;
            font-weight: 600;
        }

        .compare-table th:first-child { border-radius: 10px 0 0 0; }
        .compare-table th:last-child  { border-radius: 0 10px 0 0; }

        .compare-table td {
            padding: 11px 16px;
            border-bottom: 1px solid var(--border);
            color: var(--text-mid);
        }

        .compare-table tr:nth-child(even) td { background: #f8f9ff; }
        .compare-table tr:last-child td:first-child { border-radius: 0 0 0 10px; }
        .compare-table tr:last-child td:last-child  { border-radius: 0 0 10px 0; }
        .compare-table tr:last-child td { border-bottom: none; }

        .highlight-row td { background: #fff3f3 !important; color: #c62828; font-weight: 600; }

        .section-sep { margin: 44px 0 36px; }

        @media (max-width: 560px) {
            .compare-table { font-size: 12px; }
            .compare-table th, .compare-table td { padding: 9px 10px; }
        }

.safety-layout {
            max-width: 900px;
            margin: 0 auto;
            padding: 48px 24px;
        }

        /* Country table */
        .country-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14px;
            margin: 16px 0;
        }

        .country-table th {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: #fff;
            padding: 13px 16px;
            text-align: left;
            font-weight: 600;
        }

        .country-table th:first-child { border-radius: 10px 0 0 0; }
        .country-table th:last-child  { border-radius: 0 10px 0 0; }

        .country-table td {
            padding: 11px 16px;
            border-bottom: 1px solid var(--border);
            color: var(--text-mid);
        }

        .country-table tr:nth-child(even) td { background: #f8f9ff; }

        .limit-pill {
            display: inline-block;
            padding: 3px 10px;
            border-radius: 99px;
            font-size: 12px;
            font-weight: 700;
        }

        .limit-zero   { background: #f0fdf4; color: #1b5e20; }
        .limit-low    { background: #fff8e1; color: #7c4f00; }
        .limit-medium { background: #fff3e0; color: #c55a00; }
        .limit-high   { background: #ffe0e0; color: #c62828; }

        /* Poison signs */
        .sign-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 14px;
            margin-top: 16px;
        }

        .sign-item {
            background: #fff0f0;
            border: 1.5px solid #ffb3b3;
            border-radius: 12px;
            padding: 16px;
            text-align: center;
        }

        .sign-item .si-icon { font-size: 30px; margin-bottom: 8px; }
        .sign-item p { font-size: 13px; color: #c62828; font-weight: 600; }

        /* Tips */
        .tip-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }

        .tip-item {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            background: #fff;
            border-radius: 10px;
            padding: 16px;
            box-shadow: var(--shadow);
            border: 1px solid rgba(102,126,234,0.08);
        }

        .tip-item .ti-icon { font-size: 24px; flex-shrink: 0; margin-top: 1px; }
        .tip-item h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text-dark); }
        .tip-item p  { font-size: 13px; color: var(--text-mid); line-height: 1.65; }

        /* Myth vs Fact */
        .myth-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin-top: 16px;
        }

        @media (max-width: 600px) {
            .myth-grid { grid-template-columns: 1fr; }
            .country-table { font-size: 12px; }
            .country-table th, .country-table td { padding: 9px 10px; }
        }

        .myth-box {
            border-radius: 12px;
            padding: 18px;
        }

        .myth-box.myth { background: #ffe0e0; border: 1.5px solid #ffb3b3; }
        .myth-box.fact { background: #f0fdf4; border: 1.5px solid #86efac; }

        .myth-box .mb-label {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 6px;
        }

        .myth-box.myth .mb-label { color: #c62828; }
        .myth-box.fact .mb-label { color: #1b5e20; }

        .myth-box p { font-size: 13px; line-height: 1.65; }
        .myth-box.myth p { color: #7f1d1d; }
        .myth-box.fact p { color: #14532d; }

        .myth-pair { margin-bottom: 22px; }
        .myth-pair h4 { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 10px; }

        .section-sep { margin: 44px 0; }

.faq-layout {
            max-width: 820px;
            margin: 0 auto;
            padding: 48px 24px;
        }

        /* Accordion / FAQ Items */
        .faq-group { margin-bottom: 36px; }

        .faq-group-title {
            font-size: 18px;
            font-weight: 800;
            color: var(--text-dark);
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 10px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--border);
        }

        .faq-item {
            border: 1.5px solid var(--border);
            border-radius: 12px;
            margin-bottom: 10px;
            overflow: hidden;
            transition: box-shadow 0.25s;
        }

        .faq-item:hover { box-shadow: var(--shadow); }

        .faq-question {
            width: 100%;
            background: #fff;
            border: none;
            padding: 18px 20px;
            text-align: left;
            font-size: 15px;
            font-weight: 600;
            color: var(--text-dark);
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            font-family: inherit;
            transition: background 0.2s;
            line-height: 1.5;
        }

        .faq-question:hover { background: var(--primary-light); }
        .faq-question.open  { background: var(--primary-light); color: var(--primary); }

        .faq-chevron {
            flex-shrink: 0;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 700;
            transition: transform 0.3s, background 0.2s;
            color: var(--text-mid);
        }

        .faq-question.open .faq-chevron {
            transform: rotate(180deg);
            background: var(--primary);
            color: #fff;
        }

        .faq-answer {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.35s ease, padding 0.25s;
            background: #fafbff;
        }

        .faq-answer.open {
            max-height: 600px;
        }

        .faq-answer-inner {
            padding: 0 20px 20px;
            font-size: 14px;
            color: var(--text-mid);
            line-height: 1.8;
        }

        .faq-answer-inner a { color: var(--primary); font-weight: 600; }
        .faq-answer-inner strong { color: var(--text-dark); }
        .faq-answer-inner ul { padding-left: 20px; list-style: disc; }
        .faq-answer-inner li { margin-bottom: 6px; }

        /* Search */
        .faq-search-wrap {
            position: relative;
            margin-bottom: 36px;
        }

        .faq-search-wrap input {
            width: 100%;
            padding: 14px 20px 14px 46px;
            border: 2px solid var(--border);
            border-radius: 12px;
            font-size: 15px;
            font-family: inherit;
            outline: none;
            transition: border-color 0.25s, box-shadow 0.25s;
        }

        .faq-search-wrap input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
        }

        .search-icon {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 18px;
            pointer-events: none;
        }

        .no-results {
            display: none;
            text-align: center;
            padding: 32px;
            color: var(--text-light);
            font-size: 15px;
        }

        .no-results.show { display: block; }

        /* Contact CTA */
        .cta-box {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            border-radius: 16px;
            padding: 36px;
            text-align: center;
            color: #fff;
            margin-top: 40px;
        }

        .cta-box h3 { font-size: 22px; margin-bottom: 10px; }
        .cta-box p  { opacity: 0.88; font-size: 15px; margin-bottom: 22px; line-height: 1.6; }

        .cta-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

        .cta-btn {
            padding: 12px 28px;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            border: none;
            font-family: inherit;
            text-decoration: none;
            display: inline-block;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .cta-btn-primary {
            background: #fff;
            color: var(--primary-dark);
        }

        .cta-btn-secondary {
            background: rgba(255,255,255,0.18);
            color: #fff;
            border: 2px solid rgba(255,255,255,0.5);
        }

        .cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }