:root {
    --bg: #EDEDED;
    --card: #FFFFFF;
    --text: #1F3C5C;
    --muted: #5C6E80;
    --pill-bg: #E6E6E6;
    --pill-border: #D4D8DD;
    --chip-bg: #E8E8E8;
    --chip-border: #DADFE5;
    --blue: #0E5B82;
    --blue-dark: #0B4C6C;
    --accent: #77B7E3;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Source Sans Pro', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    overflow-y: scroll;
}
.wrap { max-width: 1600px; margin: 0 auto; padding: 0 16px 40px; }
.layout {
    display: grid;
    grid-template-columns: 288px 1fr 342px;
    column-gap: 18px;
    row-gap: 0;
    align-items: start;
}
@media (max-width: 1400px) { .layout { grid-template-columns: 288px 1fr 288px; } }
@media (max-width: 1200px) { .layout { grid-template-columns: 288px 1fr; } .right-panel-container { display: none; } }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } }

/* Left column */
.left-col {
    position: sticky;
    top: 18px;
    align-self: start;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 12px;
    will-change: transform;
}
.left-col.locked-panel { pointer-events: none; opacity: 0.55; }
@media (max-width: 980px) { .left-col { position: static; } }

/* Summary panel */
.summary-panel {
    background: #D9ECFA;
    color: var(--text);
    border-radius: 18px;
    padding: 12px 12px 12px;
    border: 1px solid #B5D9EE;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
}
.summary-section { margin-top: 6px; }
.summary-section:first-child { margin-top: 2px; }

/* Section nav titles */
.summary-section-title {
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #1F3C5C;
    display: flex;
    align-items: center;
    gap: 12px;
}
.summary-section-title:hover,
.summary-section-title:focus {
    background: rgba(255,255,255,0.7) !important;
}
.summary-section-title.active {
    background: rgba(181, 217, 238, 0.6);
    font-weight: normal;
}

/* Section icon circles */
.section-icon-circle {
    width: 37px;
    height: 37px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid #B0B8C1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.section-icon-circle.completed { background: #fff; border-color: #0E5B82; }
.summary-section-title .section-icon-circle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    width: 2px;
    height: 18px;
    background: #B5D9EE;
}
.section-nav-icon { width: 21px; height: 21px; object-fit: contain; flex-shrink: 0; border-radius: 0; }

/* Nav text */
.section-nav-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.section-nav-label { font-size: 16.2px; font-weight: 700; color: #1F3C5C; text-transform: uppercase; letter-spacing: 0.06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-nav-sub { font-size: 15.2px; font-style: italic; color: #5C6E80; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 1.3; min-height: 1.3em; }
.section-nav-sub:empty::after { content: '\00a0'; }

/* Locked nav */
.section-nav-locked { opacity: 0.35; cursor: not-allowed !important; pointer-events: none !important; }
.section-nav-locked * { pointer-events: none !important; }

/* Compliance toggle in nav */
.compliance-toggle {
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1F3C5C;
}
.compliance-toggle:hover,
.compliance-toggle:focus { background: rgba(255,255,255,0.7) !important; }
.compliance-toggle.active { background: rgba(181, 217, 238, 0.6); color: #1F3C5C; }

/* Right panel */
.right-panel-container { position: sticky; top: 0; align-self: start; margin: 0; padding: 0; }
.video-panel { background: #D9ECFA; color: var(--text); border-radius: 18px; padding: 8px 16px; border: 1px solid #B5D9EE; box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28); }
.video-container { position: relative; width: 100%; padding-bottom: 56.25%; background: #0E5B82; border-radius: 12px; overflow: hidden; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Tooltip panel */
.tooltip-panel { background: #D9ECFA; color: var(--text); border-radius: 18px; padding: 10px 14px 12px; border: 1px solid #B5D9EE; box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28); margin-top: 12px; max-height: 55vh; overflow-y: auto; }
.tooltip-header { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 10px; padding: 0 0 8px; border-bottom: 2px solid #B5D9EE; }
.tooltip-content { font-size: 14px; line-height: 1.6; color: var(--text); }
.tooltip-description { margin-bottom: 12px; }
.tooltip-tiers { display: flex; flex-direction: column; gap: 8px; }
.tooltip-tier { padding: 8px 12px; background: rgba(255, 255, 255, 0.5); border-radius: 8px; border: 1px solid #B5D9EE; }
.tooltip-tier strong { color: #0B4C6C; font-weight: 700; }

/* Center card */
.card {
    position: relative;
    z-index: 1;
    background: var(--card);
    border: 1px solid #E3E7EB;
    border-radius: 16px;
    padding: 6px 18px 6px;
    box-shadow: 0 12px 30px rgba(15, 34, 53, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    contain: layout;
}
.section-visible { flex: 1; min-height: 0; display: flex !important; flex-direction: column; }
.section-visible .details-body { flex: 1; min-height: 0; overflow-y: auto; }
.details-body { padding: 0 14px 4px; overflow-y: auto; scrollbar-gutter: stable; }
.compliance-container { background: #FAFAFA; border-radius: 8px; padding: 4px 16px; margin-top: 6px; color: var(--text); }

/* Service matrix table */
.service-matrix {
    margin-top: 6px;
    margin-left: -30px;
    margin-right: -30px;
    width: calc(100% + 60px);
    border-collapse: collapse;
    background: #FAFAFA;
    border-radius: 0;
    overflow: hidden;
    table-layout: fixed;
}
.service-matrix th:first-child, .service-matrix td:first-child { width: 52%; }
.service-matrix th:nth-child(2), .service-matrix td:nth-child(2),
.service-matrix th:nth-child(3), .service-matrix td:nth-child(3),
.service-matrix th:nth-child(4), .service-matrix td:nth-child(4) { width: 16%; }
.service-matrix th, .service-matrix td { padding: 6px 10px; text-align: left; border-bottom: 1px solid #D9D9D9; color: var(--text); font-size: 16px; transition: background-color 200ms ease; }
.service-matrix th { background: #F5F5F5; font-weight: 700; text-align: center; font-size: 17px; vertical-align: middle; padding: 2px 10px; }
.service-matrix td { background: #FAFAFA; text-align: center; }
.service-matrix th:first-child { text-align: left; background: #FAFAFA; }
.service-matrix td:first-child { text-align: left; font-weight: 600; }
.service-matrix tbody tr { transition: background-color 0.2s ease; }
.service-matrix tbody tr:hover { background-color: #B3E5FC !important; }
.service-matrix tbody tr:hover td { background-color: #B3E5FC !important; }
.service-matrix tr:last-child td { border-bottom: none; }
.service-matrix .check-icon { color: #2A7DB5; font-size: 18px; font-weight: 800; }
.service-matrix .cross-icon { color: #F87171; font-size: 20px; font-weight: 800; }
.service-matrix .note { font-size: 12px; opacity: 0.85; }

/* Header label buttons */
.service-matrix th label {
    display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; border-radius: 10px;
    background: #E8E8E8; border: 1px solid #CCCCCC; color: var(--text); cursor: pointer; user-select: none;
    font-weight: 700; font-size: 13px; min-width: 80px; transition: all 0.2s ease;
}
.service-matrix th label:hover { background: #4F97C6; border-color: #3E86B6; color: #F5FAFF; }
.service-matrix th label.selected { background: #0E5B82; border-color: #0B4C6C; color: #F5FAFF; }
.service-matrix th label.selected::before { content: "✓ "; margin-right: 4px; font-weight: 700; }

/* Column states */
.service-matrix th[data-col="1"], .service-matrix th[data-col="2"], .service-matrix th[data-col="3"] { background: #FAFAFA; }
.service-matrix [data-col].col-hover { background: #D9ECFA !important; }
.service-matrix [data-col].col-selected { background: #D9ECFA !important; }

/* Toggle indicators */
.toggle-indicator {
    display: inline-block; width: 36px; height: 18px; background: #999;
    border-radius: 9px; position: relative; transition: background 0.2s ease;
}
.toggle-indicator::after {
    content: ''; position: absolute; width: 14px; height: 14px; background: white;
    border-radius: 50%; top: 2px; left: 2px; transition: left 0.2s ease;
}
.compliance-option-toggle {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; background: #F5F5F5; border: 1px solid #D4D8DD;
    border-radius: 6px; cursor: pointer; transition: all 0.2s ease; margin: 4px 0;
}
.compliance-option-toggle:hover:not(.disabled):not(.locked) { background: #E8E8E8; border-color: #CBD3DA; }
.compliance-option-toggle.locked { cursor: default; }
.compliance-option-toggle.disabled { opacity: 0.45; cursor: not-allowed !important; }
.compliance-option-toggle.enabled { background: #C0E0F5; border-color: #A8D4F0; font-weight: 600; }
.compliance-option-toggle.enabled .toggle-indicator { background: #00BFFF; }
.compliance-option-toggle.enabled .toggle-indicator::after { left: 20px; }
.compliance-option-toggle strong { font-size: 16px; }

/* Business env row labels */
.biz-row-label {
    flex: 1; background: #EAF4FB; border: 1px solid #B5D9EE; border-radius: 10px;
    padding: 4px 20px; display: flex; align-items: center; line-height: 1.2; cursor: pointer;
}
.biz-row-label:hover { background: #D9EDF7; border-color: #90C4E0; }

/* Step dots */
.step-dot { width: 20px; height: 10px; border-radius: 5px; background: #D4D8DD; display: inline-block; transition: background 0.2s ease, transform 0.2s ease; }
.step-dot.active { background: #0E5B82; transform: scale(1.35); }
.step-dot.visited { background: #4F97C6; }

/* Term cards */
.term-card-container { width: 98%; max-width: 960px; }
.term-selector { display: flex; gap: 12px; margin-bottom: 14px; }
.term-option { flex: 1; min-width: 0; border: 1px solid #c0d4e3; background: white; border-radius: 12px; padding: 14px 12px; cursor: pointer; text-align: center; transition: all .18s ease; box-sizing: border-box; }
.term-option:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.term-option.selected { background: #D9ECFA; border-color: #0E5B82; border-width: 2px; }
.term-option.disabled-term { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.term-badge { display: inline-block; font-size: 11px; padding: 4px 14px; background: #0E5B82; color: white; border-radius: 30px; margin-bottom: 6px; font-weight: bold; }
.term-main { font-size: 20px; font-weight: 700; margin-bottom: 3px; color: #134e6f; }
.term-desc { font-size: 15px; color: #6d7f8a; line-height: 1.4; }
.term-details-box { background: #f5f9fc; border: 1px solid #c0d4e3; padding: 16px 18px; border-radius: 10px; font-size: 15px; color: #0B4C6C; line-height: 1.5; margin-top: 4px; }
.term-details-box strong { color: #0E5B82; }

/* Summary section */
.summary-title { font-size: 20px; font-weight: 800; color: #0E5B82; margin-bottom: 4px; }
.summary-subtitle { font-size: 16px; color: #5C6E80; margin-bottom: 4px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 16px; }
.summary-optional-compliance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 16px 0 4px 0; border-top: 2px solid #DDD; margin-top: 8px; }
.summary-box-title { font-size: 16px; font-weight: 700; color: #0E5B82; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid #0E5B82; padding-bottom: 8px; }
.summary-box-items { font-size: 13px; color: #333; line-height: 1.6; list-style: none; padding-left: 0; margin-left: 0; }
.summary-box-items li { margin-bottom: 4px; padding-left: 12px; text-indent: -12px; }
.summary-box-items li::before { content: "• "; color: #0E5B82; font-size: 8px; margin-right: 4px; }

/* Navigation buttons */
.section-nav-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 1px; gap: 12px; flex-shrink: 0; }
.section-back-btn, .section-next-btn {
    min-width: 120px; padding: 10px 22px; font-size: 15px; font-weight: 700; border-radius: 10px;
    cursor: pointer; transition: background 160ms ease, color 160ms ease;
    background: linear-gradient(90deg, var(--blue-dark), var(--blue)); color: #fff; border: none;
    box-shadow: 0 6px 18px rgba(8, 70, 104, 0.18);
}
.section-back-btn:hover, .section-next-btn:hover { background: #4F97C6; }
.cta {
    background: linear-gradient(90deg, var(--blue-dark), var(--blue)); color: white;
    padding: 12px 20px; border-radius: 12px; border: 0; font-weight: 700; font-size: 16px; cursor: pointer;
    box-shadow: 0 6px 18px rgba(8, 70, 104, 0.18); transition: background 160ms ease;
}
.cta:hover { background: #4F97C6 !important; }

/* Contact form */
.contact-section { background: #ffffff; border: 1px solid #E3E7EB; border-radius: 14px; overflow: hidden; }
.contact-section label { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin: 6px 0; }
.text-input {
    width: 50%; display: inline-block; box-sizing: border-box; padding: 10px 12px; border-radius: 8px;
    border: 1px solid #CBD3DA; background: #F2F4F6; color: var(--text); font-size: 15px; font-weight: 700;
}
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Modals */
.error-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); display: none; justify-content: center; align-items: center;
    z-index: 10000; backdrop-filter: blur(4px);
}
.error-modal-overlay.show { display: flex; }
.error-modal-content {
    background: white; border-radius: 16px; padding: 32px; max-width: 500px; width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); text-align: center;
    animation: modalSlideIn 0.3s ease-out;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
.error-modal-icon { font-size: 48px; margin-bottom: 16px; }
.error-modal-title { font-size: 24px; font-weight: 700; color: #1F3C5C; margin-bottom: 16px; }
.error-modal-message { font-size: 16px; color: #555; line-height: 1.6; margin-bottom: 24px; }
.error-modal-button {
    background: linear-gradient(90deg, #0E5B82, #4F97C6); color: white; padding: 14px 32px;
    border-radius: 12px; border: none; font-weight: 700; font-size: 16px; cursor: pointer;
    box-shadow: 0 6px 18px rgba(14, 91, 130, 0.25); transition: all 0.2s ease;
}
.error-modal-button:hover { background: #4F97C6; transform: translateY(-2px); }
.confirm-modal-actions { display: flex; gap: 12px; justify-content: center; margin-top: 4px; }
.confirm-modal-btn-yes {
    background: linear-gradient(90deg, #0E5B82, #4F97C6); color: white; padding: 12px 28px;
    border-radius: 12px; border: none; font-weight: 700; font-size: 15px; cursor: pointer;
    box-shadow: 0 6px 18px rgba(14, 91, 130, 0.25); transition: all 0.2s ease;
}
.confirm-modal-btn-yes:hover { background: #4F97C6; transform: translateY(-2px); }
.confirm-modal-btn-no {
    background: #e8edf2; color: #1F3C5C; padding: 12px 28px; border-radius: 12px; border: none;
    font-weight: 700; font-size: 15px; cursor: pointer; transition: all 0.2s ease;
}
.confirm-modal-btn-no:hover { background: #d0dae3; transform: translateY(-2px); }

/* Mass tier change modal */
.mass-tier-btn {
    position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start;
    justify-content: flex-start; padding: 14px 14px 13px; border-radius: 12px; border: none; cursor: pointer;
    font-family: inherit; min-height: 80px; transition: transform 0.15s, box-shadow 0.15s; text-align: left;
}
.mass-tier-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.28); }
.mass-tier-btn .mtn { font-size: 22px; font-weight: 900; color: #fff; line-height: 1; }
.mass-tier-btn .mtd { font-size: 11px; margin-top: 4px; color: rgba(255,255,255,0.78); font-style: italic; line-height: 1.3; }
.mass-tier-core { background: linear-gradient(135deg, #3a3a3a 0%, #5c5c5c 100%); }
.mass-tier-plus { background: linear-gradient(135deg, #1272a8 0%, #3fa0d8 100%); }
.mass-tier-elite { background: linear-gradient(135deg, #0B4C6C 0%, #1272a8 100%); }
.mass-tier-custom { background: linear-gradient(135deg, #7a4a10 0%, #c07a1a 100%); }
.mass-tier-bubble1 { position:absolute; top:-18px; right:-18px; width:70px; height:70px; background:rgba(255,255,255,0.07); border-radius:50%; pointer-events:none; }
.mass-tier-bubble2 { position:absolute; bottom:-16px; right:10px; width:48px; height:48px; background:rgba(255,255,255,0.05); border-radius:50%; pointer-events:none; }

/* Service pillars landing page */
#servicePillarsHeader { text-align: center; padding: 20px 20px 10px; background: #fff; }
#servicePillarsHeader h1 { font-size: 28px; font-weight: 700; color: #1F3C5C; margin: 0 0 6px 0; }
#servicePillarsHeader .subtitle { font-size: 16px; color: #666; margin: 0; }
#servicePillars { max-width: 847px; margin: 0 auto; padding: 20px 20px; }
.pillars-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1024px) { .pillars-container { grid-template-columns: 1fr; gap: 24px; } }
.pillar-card { background: #fff; border: 2px solid #DDD; border-radius: 8px; padding: 16px; display: flex; flex-direction: column; transition: all 0.3s ease; cursor: pointer; }
.pillar-card:hover { border-color: #4F97C6; box-shadow: 0 8px 24px rgba(14, 91, 130, 0.15); transform: translateY(-4px); }
.pillar-card.core { border-color: #0E5B82; }
.pillar-card.plus { border-color: #4F97C6; }
.pillar-card.elite { border-color: #1F3C5C; }
.pillar-header { text-align: center; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #E8E8E8; }
.pillar-name { font-size: 20px; font-weight: 700; color: #1F3C5C; margin-bottom: 4px; }
.pillar-tagline { font-size: 12px; color: #666; font-style: italic; }
.pillar-features { list-style: none; padding: 0; margin: 0; }
.pillar-features li { padding: 3px 0; padding-left: 18px; position: relative; font-size: 11px; color: #333; line-height: 1.4; }
.pillar-features li::before { content: "✓"; position: absolute; left: 0; color: #0E5B82; font-weight: 700; }
.pillar-button-container { margin-top: auto; padding-top: 12px; }
.pillar-button {
    width: 100%; padding: 10px 20px; font-size: 14px; font-weight: 700; color: #fff;
    background: linear-gradient(90deg, #0B4C6C, #0E5B82); border: none; border-radius: 6px;
    cursor: pointer; transition: all 0.2s ease; text-transform: uppercase; letter-spacing: 0.05em;
}
.pillar-button:hover { background: #4F97C6; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(14, 91, 130, 0.25); }
.custom-plan-btn-wrap { text-align: center; margin: 14px 0; }
.custom-plan-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 32px; font-size: 14px; font-weight: 700;
    color: #0B4C6C; background: #fff; border: 2px dashed #0B4C6C; border-radius: 8px; cursor: pointer;
    letter-spacing: 0.06em; text-transform: uppercase; transition: all 0.2s ease;
}
.custom-plan-btn:hover { background: #e8f4fb; border-color: #0E5B82; color: #0E5B82; transform: translateY(-2px); }

/* Responsive adjustments */
@media (max-width: 768px) {
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .contact-section label { flex-direction: column; align-items: stretch; }
    .text-input { width: 100%; }
    .summary-grid { grid-template-columns: 1fr; }
}

/* Hide number input spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
