.rpc-wrap {
    font-family: Arial, Helvetica, sans-serif;
    color: #0b0c0c;
    max-width: 980px;
    margin: 0 auto;
    box-sizing: border-box;
}
.rpc-wrap *, .rpc-wrap *::before, .rpc-wrap *::after { box-sizing: border-box; }
.rpc-route-main { padding: 20px; background: #f3f2f1; min-height: 100vh; }
.rpc-container {
    background: #ffffff;
    padding: 40px;
    border: 1px solid #b1b4b6;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.rpc-container h1 {
    font-size: 36px;
    margin: 0 0 24px;
    border-bottom: 4px solid #1d70b8;
    padding-bottom: 15px;
    line-height: 1.15;
}
.rpc-meta-info {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 30px;
    font-size: 17px;
}
.rpc-info-box {
    background-color: #f8f8f8;
    padding: 12px 15px;
    border-left: 4px solid #1d70b8;
    font-size: 16px;
    line-height: 1.5;
}
.rpc-address-box { width: 58%; }
.rpc-date-box { width: 42%; text-align: right; line-height: 1.5; }
.rpc-section-header {
    background-color: #1d70b8;
    color: #ffffff;
    padding: 12px 20px;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
}
.rpc-section-body { margin-bottom: 40px; }
.rpc-action-heading { color: #1d70b8; font-size: 20px; margin-top: 25px; margin-bottom: 10px; }
.rpc-epc-chart { width: 100%; position: relative; margin-bottom: 30px; }
.rpc-bar-row { display: flex; align-items: stretch; margin-bottom: 1px; position: relative; min-height: 55px; }
.rpc-stage-icon { width: 85px; margin-right: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: transparent; overflow: hidden; }
.rpc-stage-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rpc-bar { padding: 10px 15px; color: #fff; font-weight: bold; font-size: 18px; display: flex; justify-content: space-between; align-items: center; box-sizing: border-box; min-width: 170px; }
.rpc-rating-letter { font-size: 22px; margin-right: 15px; }
.rpc-tier-a { background-color: #2874AE; width: 25%; }
.rpc-tier-b { background-color: #319B42; width: 33%; }
.rpc-tier-c { background-color: #F8D316; width: 41%; color: #0b0c0c; }
.rpc-tier-d { background-color: #F39200; width: 49%; color: #0b0c0c; }
.rpc-tier-e { background-color: #E2681E; width: 57%; }
.rpc-tier-f { background-color: #DA291C; width: 65%; }
.rpc-tier-g { background-color: #7A2273; width: 73%; }
.rpc-indicator-arrow-box {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 10px;
    font-weight: bold;
    font-size: 15px;
    clip-path: polygon(15px 0, 100% 0, 100% 100%, 15px 100%, 0 50%);
    width: 132px;
    text-align: center;
    border: 1px solid #0b0c0c;
    z-index: 2;
}
.rpc-arrow-current { background-color: #DA291C; color: #fff; }
.rpc-arrow-potential { background-color: #F8D316; color: #0b0c0c; }
.rpc-scale-indicators { display: flex; width: 100%; text-align: center; margin-bottom: 8px; font-weight: bold; font-size: 15px; min-height: 54px; }
.rpc-indicator-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.rpc-indicator-text { padding: 4px 8px; border-radius: 4px; margin-bottom: 4px; border: 2px solid currentColor; background: #fff; }
.rpc-indicator-text.rpc-current { color: #F39200; }
.rpc-indicator-text.rpc-potential { color: #319B42; }
.rpc-indicator-arrow { font-size: 20px; line-height: 1; }
.rpc-consumption-scale { display: flex; align-items: flex-end; height: 120px; width: 100%; }
.rpc-scale-segment { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; color: #fff; border-right: 2px solid #fff; box-sizing: border-box; padding: 0 6px 10px; text-align: center; }
.rpc-scale-segment:last-child { border-right: none; }
.rpc-seg-title { font-size: 15px; font-weight: bold; margin-bottom: 4px; }
.rpc-seg-baths { font-size: 13px; }
.vol-exc { height: 45%; background-color: #319B42; }
.vol-good { height: 58%; background-color: #8cc63f; color: #0b0c0c; }
.vol-okay { height: 72%; background-color: #F8D316; color: #0b0c0c; }
.vol-bad { height: 86%; background-color: #F39200; color: #0b0c0c; }
.vol-terr { height: 100%; background-color: #DA291C; }
.rpc-profile-row { display: flex; width: 100%; margin-top: 10px; margin-bottom: 25px; }
.rpc-profile-col { flex: 1; text-align: center; font-size: 13px; padding: 0 8px; color: #505a5f; line-height: 1.4; }
.rpc-profile-col strong { color: #0b0c0c; display: block; margin-bottom: 3px; }
.rpc-scale-subtitle { text-align: center; font-size: 16px; color: #505a5f; margin-top: 15px; margin-bottom: 30px; font-style: italic; }
.rpc-action-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 15px; }
.rpc-action-table th, .rpc-action-table td { border: 1px solid #b1b4b6; padding: 12px; text-align: left; vertical-align: top; }
.rpc-action-table th { background-color: #f3f2f1; font-weight: bold; }
.rpc-rating-badge { display: inline-block; font-weight: bold; padding: 3px 8px; border-radius: 4px; margin-right: 8px; font-size: 13px; color: #fff; text-align: center; min-width: 22px; }
.rpc-badge-a, .rpc-badge-excellent { background-color: #2874AE; }
.rpc-badge-b, .rpc-badge-good { background-color: #319B42; }
.rpc-badge-c, .rpc-badge-okay { background-color: #F8D316; color: #0b0c0c; }
.rpc-badge-d { background-color: #F39200; color: #0b0c0c; }
.rpc-badge-e, .rpc-badge-bad { background-color: #E2681E; }
.rpc-badge-f, .rpc-badge-terrible { background-color: #DA291C; }
.rpc-badge-g { background-color: #7A2273; }
.rpc-grant-status { border-top: 2px solid #b1b4b6; padding-top: 15px; margin-bottom: 30px; font-size: 16px; color: #505a5f; }
.rpc-footer { position: relative; text-align: center; font-size: 14px; color: #505a5f; margin-top: 40px; border-top: 1px dashed #b1b4b6; padding-top: 15px; padding-bottom: 10px; }
.rpc-footer span { display: inline-block; margin-top: 8px; font-weight: bold; color: #b1b4b6; }
.rpc-alert { padding: 12px 15px; margin: 0 0 18px; border-left: 4px solid #1d70b8; background: #eef7ff; }
.rpc-alert-success { border-color: #319B42; background: #eff8f0; }
.rpc-alert-warning { border-color: #F39200; background: #fff5e5; }
.rpc-alert-error { border-color: #DA291C; background: #fff0f0; }
.rpc-alert-info { border-color: #1d70b8; background: #eef7ff; }
.rpc-disclaimer { font-size: 13px; color: #505a5f; margin: 10px 0 0; }
.rpc-notes-box { margin-top: 16px; }
.rpc-form-wrap, .rpc-search-wrap { background: #fff; padding: 28px; border: 1px solid #d6d8da; box-shadow: 0 2px 5px rgba(0,0,0,0.04); }
.rpc-form-wrap h2 { margin-top: 0; font-size: 30px; color: #0b0c0c; }
.rpc-lede { font-size: 17px; color: #505a5f; line-height: 1.5; }
.rpc-step { border: 1px solid #b1b4b6; padding: 18px; margin: 22px 0; }
.rpc-step legend { font-weight: bold; color: #1d70b8; font-size: 20px; padding: 0 8px; }
.rpc-grid { display: grid; gap: 16px; }
.rpc-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rpc-wrap label { display: block; font-weight: bold; margin-bottom: 14px; line-height: 1.35; }
.rpc-wrap input[type="text"], .rpc-wrap input[type="email"], .rpc-wrap input[type="url"], .rpc-wrap select, .rpc-wrap textarea {
    width: 100%;
    display: block;
    padding: 10px;
    border: 1px solid #8a8d90;
    border-radius: 2px;
    font-size: 16px;
    margin-top: 5px;
    background: #fff;
    color: #0b0c0c;
}
.rpc-checkbox { font-weight: normal !important; display: flex !important; align-items: flex-start; gap: 8px; }
.rpc-checkbox input { margin-top: 3px; }
.rpc-help { display: inline-block; font-size: 13px; color: #505a5f; font-weight: normal; margin-top: 4px; }
.rpc-conditional { display: none; }
.rpc-conditional.is-visible { display: block; }
.rpc-ai-panel { padding: 12px; border-left: 4px solid #1d70b8; background: #f8f8f8; margin-bottom: 18px; }
.rpc-ai-status { margin-top: 8px; font-size: 14px; color: #505a5f; }
.rpc-button, .rpc-wrap button, .rpc-wrap input[type="submit"] {
    display: inline-block;
    border: 0;
    border-radius: 3px;
    padding: 11px 18px;
    background: #1d70b8;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}
.rpc-button:hover, .rpc-wrap button:hover, .rpc-wrap input[type="submit"]:hover { background: #003078; color: #fff; }
.rpc-button.secondary { background: #505a5f; }
.rpc-button.secondary:hover { background: #2f3437; }
.rpc-button:disabled { opacity: .6; cursor: not-allowed; }
.rpc-result-list { list-style: none; padding-left: 0; margin-left: 0; }
.rpc-result-list li { padding: 12px 0; border-bottom: 1px solid #b1b4b6; }
.rpc-result-list a { font-weight: bold; display: block; }
.rpc-result-list span { color: #505a5f; font-size: 14px; }
@media (max-width: 760px) {
    .rpc-container, .rpc-form-wrap, .rpc-search-wrap { padding: 18px; }
    .rpc-container h1 { font-size: 28px; }
    .rpc-meta-info { display: block; }
    .rpc-address-box, .rpc-date-box { width: 100%; text-align: left; margin-bottom: 12px; }
    .rpc-grid.two { grid-template-columns: 1fr; }
    .rpc-bar-row { min-height: 48px; }
    .rpc-stage-icon { width: 54px; margin-right: 8px; }
    .rpc-bar { font-size: 13px; min-width: 0; padding: 8px; }
    .rpc-rating-letter { font-size: 16px; margin-right: 8px; }
    .rpc-indicator-arrow-box { position: static; transform: none; clip-path: none; width: auto; margin-left: 6px; padding: 6px; font-size: 12px; }
    .rpc-profile-row { display: none; }
    .rpc-action-table, .rpc-action-table thead, .rpc-action-table tbody, .rpc-action-table th, .rpc-action-table td, .rpc-action-table tr { display: block; width: 100%; }
    .rpc-action-table thead { display: none; }
    .rpc-action-table td { border-top: 0; }
    .rpc-action-table tr { border: 1px solid #b1b4b6; margin-bottom: 12px; }
}
@media print {
    .rpc-route-main { padding: 0; background: #fff; }
    .rpc-alert { display: none; }
    .rpc-container { border: none; box-shadow: none; padding: 0; }
    .rpc-wrap { max-width: none; }
}

/* v1.1: mobile-friendly option buttons and stronger conditional display */
.rpc-assessment-form .rpc-select-enhanced {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}
.rpc-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
}
.rpc-choice-button {
    border: 2px solid #b1b4b6;
    border-radius: 8px;
    background: #fff;
    color: #0b0c0c;
    padding: 11px 14px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    text-align: left;
    min-height: 44px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.rpc-choice-button:hover,
.rpc-choice-button:focus {
    border-color: #1d70b8;
    outline: 3px solid rgba(29,112,184,0.18);
}
.rpc-choice-button.is-selected {
    background: #1d70b8;
    color: #fff;
    border-color: #1d70b8;
}
.rpc-choice-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.rpc-choice-muted {
    color: #505a5f;
    font-weight: 600;
}
.rpc-conditional {
    display: none !important;
}
.rpc-conditional.is-visible {
    display: block !important;
}
.rpc-form-wrap .rpc-step > label,
.rpc-form-wrap .rpc-grid > label {
    margin-bottom: 8px;
}
@media (max-width: 760px) {
    .rpc-choice-group {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .rpc-choice-button {
        width: 100%;
        font-size: 16px;
        padding: 13px 14px;
    }
}

/* v1.2: guided assessment, stronger selected answers and tidier follow-ups */
.rpc-assessment-form .rpc-step {
    display: none;
    border-radius: 10px;
    background: #fff;
}
.rpc-assessment-form .rpc-step.is-active {
    display: block;
}
.rpc-step-intro {
    margin-top: 0;
    color: #505a5f;
    line-height: 1.5;
}
.rpc-wizard-progress {
    margin: 22px 0 18px;
}
.rpc-wizard-progress-text {
    font-size: 15px;
    color: #505a5f;
    margin-bottom: 8px;
}
.rpc-wizard-progress-text strong {
    color: #0b0c0c;
}
.rpc-wizard-progress-bar {
    width: 100%;
    height: 8px;
    background: #e7eaec;
    border-radius: 999px;
    overflow: hidden;
}
.rpc-wizard-progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    background: #1d70b8;
    transition: width .22s ease;
}
.rpc-wizard-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}
.rpc-submit-button {
    margin-top: 18px;
}
.rpc-grid.two {
    align-items: start;
}
.rpc-question-card {
    border: 1px solid #d6d8da;
    border-radius: 10px;
    padding: 14px;
    background: #fff;
    min-width: 0;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.rpc-question-card:focus-within,
.rpc-question-card.has-visible-followup {
    border-color: #1d70b8;
    box-shadow: 0 2px 8px rgba(29,112,184,0.12);
}
.rpc-question-card > label {
    margin-bottom: 0 !important;
}
.rpc-question-card label {
    font-weight: 700;
}
.rpc-followups {
    margin-top: 12px;
}
.rpc-followup-panel {
    border-left: 4px solid #1d70b8;
    background: #f4f8fb;
    padding: 12px;
    border-radius: 0 8px 8px 0;
    margin-top: 10px;
}
.rpc-followup-panel label,
.rpc-followup-panel {
    font-weight: 700;
}
.rpc-wrap .rpc-choice-button {
    background: #fff !important;
    color: #0b0c0c !important;
    border: 2px solid #9aa0a6 !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    min-height: 46px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08) !important;
    position: relative;
}
.rpc-wrap .rpc-choice-button:hover,
.rpc-wrap .rpc-choice-button:focus {
    background: #eef7ff !important;
    border-color: #1d70b8 !important;
    color: #0b0c0c !important;
}
.rpc-wrap .rpc-choice-button.is-selected {
    background: #003078 !important;
    color: #fff !important;
    border-color: #003078 !important;
    box-shadow: 0 0 0 3px rgba(0,48,120,0.22) !important;
    padding-left: 36px !important;
}
.rpc-wrap .rpc-choice-button.is-selected::before {
    content: "✓";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 900;
}
.rpc-wrap .rpc-choice-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.rpc-lookup-status {
    min-height: 22px;
    margin-top: 12px;
    font-size: 14px;
    color: #505a5f;
}
.rpc-lookup-status.is-loading {
    color: #1d70b8;
    font-weight: 700;
}
.rpc-lookup-status.is-success {
    color: #1b7f35;
    font-weight: 700;
}
.rpc-lookup-status.is-error {
    color: #b10e1e;
    font-weight: 700;
}
.rpc-suggestion-panel {
    padding: 12px 14px;
    border-left: 4px solid #1d70b8;
    background: #f4f8fb;
    color: #0b0c0c;
    margin: 0 0 16px;
    line-height: 1.45;
}
.rpc-suggestion-panel.is-success {
    border-left-color: #319B42;
    background: #eff8f0;
}
.rpc-suggestion-panel.is-error {
    border-left-color: #DA291C;
    background: #fff0f0;
}
@media (max-width: 760px) {
    .rpc-wizard-nav {
        display: grid;
        grid-template-columns: 1fr;
    }
    .rpc-wizard-nav .rpc-button,
    .rpc-submit-button {
        width: 100%;
        text-align: center;
    }
    .rpc-question-card {
        padding: 12px;
    }
}
.rpc-choice-group.has-error .rpc-choice-button {
    border-color: #DA291C !important;
}
.rpc-field-error {
    color: #DA291C;
    font-weight: 700;
    font-size: 14px;
    margin-top: 6px;
}

/* v1.3: AI/property-lookup suggestion markers */
.rpc-ai-suggested {
    border-color: #319B42 !important;
    background: #f7fcf8 !important;
}
.rpc-suggested-badge {
    display: inline-block;
    margin: 0 0 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #319B42;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}
.rpc-suggested-note {
    margin-top: 8px;
    color: #505a5f;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 400;
}


/* v1.4: confidence-aware suggestion badges */
.rpc-ai-suggested.is-high {
    border-color: #2b8a3e !important;
    background: #f4fbf5 !important;
}
.rpc-ai-suggested.is-medium {
    border-color: #c17d00 !important;
    background: #fff8eb !important;
}
.rpc-ai-suggested.is-low {
    border-color: #b10e1e !important;
    background: #fff5f5 !important;
}
.rpc-suggested-badge.is-high {
    background: #2b8a3e;
}
.rpc-suggested-badge.is-medium {
    background: #c17d00;
}
.rpc-suggested-badge.is-low {
    background: #b10e1e;
}
.rpc-question-card .rpc-help {
    display: block;
    margin-top: 8px;
    font-weight: 400;
    color: #505a5f;
    line-height: 1.35;
}


/* v1.7: candidate lists for suggested local facilities */
.rpc-ai-candidate-list {
    margin-top: 12px;
    border-top: 1px solid #d6d8da;
    padding-top: 12px;
}
.rpc-ai-candidate-title {
    font-size: 13px;
    font-weight: 700;
    color: #505a5f;
    margin-bottom: 8px;
}
.rpc-ai-candidate-button {
    display: block;
    width: 100%;
    text-align: left;
    background: #ffffff;
    border: 1px solid #b1b4b6;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 0 8px;
    cursor: pointer;
    color: #0b0c0c;
}
.rpc-ai-candidate-button:hover,
.rpc-ai-candidate-button:focus {
    border-color: #1d70b8;
    outline: 3px solid rgba(29,112,184,0.18);
}
.rpc-ai-candidate-button.is-selected {
    border-color: #003078;
    box-shadow: 0 0 0 3px rgba(0,48,120,0.18);
}
.rpc-ai-candidate-name {
    display: block;
    font-weight: 800;
}
.rpc-ai-candidate-confidence {
    display: inline-block;
    margin: 6px 0 2px;
    padding: 3px 7px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.rpc-ai-candidate-confidence.is-high { background: #2b8a3e; }
.rpc-ai-candidate-confidence.is-medium { background: #c17d00; }
.rpc-ai-candidate-confidence.is-low { background: #b10e1e; }
.rpc-ai-candidate-note {
    display: block;
    font-size: 13px;
    color: #505a5f;
    line-height: 1.35;
    margin-top: 4px;
}

/* v1.8: compact candidate selector for local facility suggestions */
.rpc-ai-candidate-compact {
    margin-top: 10px;
    border-top: 0;
    padding-top: 0;
}
.rpc-ai-candidate-toggle {
    border: 0;
    background: transparent;
    color: #1d70b8;
    text-decoration: underline;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
    font-size: 14px;
}
.rpc-ai-candidate-toggle:hover,
.rpc-ai-candidate-toggle:focus {
    color: #003078;
    outline: 3px solid rgba(29,112,184,0.18);
}
.rpc-ai-candidate-panel {
    margin-top: 8px;
    padding: 10px 12px;
    border-left: 4px solid #1d70b8;
    background: #f4f8fb;
    border-radius: 0 8px 8px 0;
}
.rpc-ai-candidate-select-label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: #0b0c0c;
    margin-bottom: 6px;
}
.rpc-ai-candidate-select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    margin-top: 6px;
}
.rpc-ai-candidate-panel .rpc-ai-candidate-selected-note {
    margin-top: 8px;
    font-size: 13px;
    color: #505a5f;
    line-height: 1.35;
}
