.pcbb-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
}

.pcbb-header { text-align: center; margin-bottom: 2rem; }
.pcbb-header h2 { font-size: 2rem; margin: 0 0 0.5rem; color: #1a1a1a; }
.pcbb-header p { color: #6b7280; margin: 0; }

.pcbb-progress {
    display: flex; justify-content: space-between;
    margin-bottom: 2rem; border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1rem;
}
.pcbb-step {
    color: #9ca3af; font-size: 0.9rem; font-weight: 500;
    flex: 1; text-align: center;
}
.pcbb-step.active { color: #2271b1; font-weight: 600; }
.pcbb-step.complete { color: #00a32a; }
.pcbb-step.complete::before { content: '✓ '; }

.pcbb-step-content { display: none; }
.pcbb-step-content.active { display: block; }

.pcbb-step-content h3 { font-size: 1.4rem; margin: 0 0 1.5rem; color: #1a1a1a; }
.pcbb-step-intro {
    margin-bottom: 1.5rem; color: #6b7280; font-size: 0.95rem; line-height: 1.5;
}
.pcbb-step-intro code {
    background: #f3f4f6; padding: 2px 6px; border-radius: 4px;
    font-size: 0.85em; font-family: ui-monospace, monospace;
}

.pcbb-type-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.pcbb-type-btn {
    display: flex; flex-direction: column; align-items: center;
    padding: 2rem 1rem; background: #fff;
    border: 2px solid #e5e7eb; border-radius: 12px;
    cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.pcbb-type-btn:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(34,113,177,0.15);
    transform: translateY(-2px);
}
.pcbb-type-btn .pcbb-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.pcbb-type-btn .pcbb-label { font-weight: 600; font-size: 1.1rem; color: #1a1a1a; }
.pcbb-type-btn .pcbb-desc {
    font-size: 0.85rem; color: #6b7280;
    margin-top: 0.25rem; text-align: center;
}

.pcbb-field { margin-bottom: 1.25rem; }
.pcbb-field label {
    display: block; font-weight: 500;
    margin-bottom: 0.5rem; color: #374151;
}
.pcbb-field select, .pcbb-field input[type="number"], .pcbb-field input[type="text"] {
    width: 100%; padding: 0.75rem;
    border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 1rem; background: #fff; box-sizing: border-box;
}
.pcbb-field select:focus, .pcbb-field input:focus {
    outline: none; border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34,113,177,0.1);
}
.pcbb-field-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}

.pcbb-notice {
    padding: 0.75rem 1rem; background: #eff6ff;
    border-left: 3px solid #2271b1; color: #1e40af;
    border-radius: 4px; font-size: 0.9rem; margin-top: 1rem;
}

.pcbb-condition-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.pcbb-condition-card {
    display: block; padding: 1.25rem;
    background: #fff; border: 2px solid #e5e7eb; border-radius: 12px;
    cursor: pointer; transition: all 0.2s;
}
.pcbb-condition-card:hover { border-color: #d1d5db; }
.pcbb-condition-card input { margin-bottom: 0.5rem; }
.pcbb-condition-card input:checked + strong { color: #2271b1; }
.pcbb-condition-card:has(input:checked),
.pcbb-condition-card.pcbb-card-selected {
    border-color: #2271b1; background: #eff6ff;
}
.pcbb-condition-card.pcbb-card-selected strong { color: #2271b1; }
.pcbb-condition-card strong {
    display: block; font-size: 1.1rem; margin-bottom: 0.5rem;
}
.pcbb-condition-card span {
    font-size: 0.875rem; color: #6b7280; line-height: 1.4;
}

.pcbb-nav {
    display: flex; justify-content: space-between;
    margin-top: 2rem; gap: 1rem;
}
.pcbb-btn {
    padding: 0.875rem 1.75rem; border-radius: 8px;
    font-size: 1rem; font-weight: 600;
    cursor: pointer; border: none; font-family: inherit;
    transition: all 0.15s;
}
.pcbb-btn-primary { background: #2271b1; color: #fff; }
.pcbb-btn-primary:hover { background: #135e96; }
.pcbb-btn-secondary { background: #f3f4f6; color: #374151; }
.pcbb-btn-secondary:hover { background: #e5e7eb; }

.pcbb-result-card {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 16px; padding: 2rem;
}
.pcbb-result-header { text-align: center; margin-bottom: 1.5rem; }
.pcbb-result-header h3 {
    font-size: 1.25rem; color: #6b7280;
    margin: 0 0 0.5rem; font-weight: 500;
}
.pcbb-condition-tag {
    display: inline-block; padding: 0.25rem 0.75rem;
    background: #fff; border-radius: 999px;
    font-size: 0.875rem; color: #6b7280; margin: 0;
}

.pcbb-value-display {
    text-align: center; padding: 2rem 0;
    border-bottom: 1px solid #e5e7eb;
}
.pcbb-value-main {
    font-size: 4rem; font-weight: 700;
    color: #00a32a; line-height: 1;
}
.pcbb-value-range {
    margin-top: 0.5rem; color: #6b7280; font-size: 1rem;
}

/* v1.1: Value categories */
.pcbb-categories {
    margin-top: 1.5rem; padding-top: 1.5rem;
}
.pcbb-categories h4 {
    margin: 0 0 1rem; color: #374151; font-size: 1.05rem;
}
.pcbb-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}
.pcbb-category {
    background: #fff; padding: 1rem; border-radius: 10px;
    border: 1px solid #e5e7eb; text-align: center;
}
.pcbb-category.pcbb-cat-highlight {
    border-color: #2271b1; border-width: 2px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}
.pcbb-cat-label {
    font-size: 0.8rem; color: #6b7280;
    margin-bottom: 0.5rem; text-transform: uppercase;
    letter-spacing: 0.5px; font-weight: 600;
}
.pcbb-cat-value {
    font-size: 1.5rem; font-weight: 700;
    color: #0c4a6e; margin-bottom: 0.5rem;
}
.pcbb-category.pcbb-cat-highlight .pcbb-cat-value { color: #2271b1; }
.pcbb-cat-desc {
    font-size: 0.75rem; color: #6b7280;
    line-height: 1.3;
}

/* v1.1: Adjustments breakdown */
.pcbb-adjustments {
    margin-top: 1.5rem; padding: 1rem;
    background: #fffbeb; border-left: 3px solid #f59e0b;
    border-radius: 6px;
}
.pcbb-adjustments h4 {
    margin: 0 0 0.5rem; color: #78350f; font-size: 0.95rem;
}
.pcbb-adjustments ul {
    list-style: disc; margin: 0; padding-left: 1.25rem;
    font-size: 0.9rem; color: #92400e;
}
.pcbb-adjustments li { margin-bottom: 0.25rem; }

/* v1.1: Internal links - emphasized over external */
.pcbb-internal-links {
    margin-top: 1.5rem; padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}
.pcbb-internal-links h4 {
    margin: 0 0 1rem; color: #374151; font-size: 1.05rem;
}
.pcbb-internal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}
.pcbb-internal-link {
    display: flex; align-items: center;
    padding: 0.875rem 1rem; background: #2271b1;
    color: #fff; text-decoration: none;
    border-radius: 8px; transition: all 0.15s;
    font-weight: 500; font-size: 0.95rem;
}
.pcbb-internal-link:hover {
    background: #135e96; transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34,113,177,0.25);
    color: #fff;
}

.pcbb-sell-actions { margin-top: 2rem; }
.pcbb-sell-actions h4 {
    margin: 0 0 1rem; color: #374151; font-size: 1rem;
}
.pcbb-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}
.pcbb-action {
    display: flex; flex-direction: column;
    padding: 1rem; background: #fff;
    border: 1px solid #e5e7eb; border-radius: 8px;
    text-decoration: none; color: #1a1a1a;
    transition: all 0.15s;
}
.pcbb-action:hover {
    border-color: #2271b1; transform: translateY(-2px);
}
.pcbb-action strong { font-size: 0.95rem; margin-bottom: 0.25rem; }
.pcbb-action span { font-size: 0.85rem; color: #6b7280; }

.pcbb-disclaimer {
    margin-top: 2rem; padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.8rem; color: #6b7280;
    line-height: 1.5; font-style: italic;
}

/* v1.2: System info header */
.pcbb-system-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}
.pcbb-system-title {
    font-size: 1.6rem;
    color: #1a1a1a;
    margin: 0 0 0.4rem;
    font-weight: 700;
    line-height: 1.2;
}
.pcbb-system-subtitle {
    font-size: 1rem;
    color: #2271b1;
    margin: 0 0 0.3rem;
    font-weight: 500;
}
.pcbb-system-specs {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}
.pcbb-result-header-row {
    text-align: center;
    margin-bottom: 1rem;
}
.pcbb-result-header-row h3 {
    font-size: 1.1rem;
    color: #6b7280;
    margin: 0 0 0.5rem;
    font-weight: 500;
}

/* v1.2: Tax depreciation section in details step */
.pcbb-tax-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}
.pcbb-tax-toggle {
    width: 100%;
    text-align: left;
    padding: 0.875rem 1rem;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.15s;
}
.pcbb-tax-toggle:hover {
    background: #f3f4f6;
    border-color: #2271b1;
}
.pcbb-tax-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2271b1;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}
.pcbb-tax-fields {
    margin-top: 1rem;
    padding: 1.25rem;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
}
.pcbb-tax-intro {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: #78350f;
    line-height: 1.5;
}
.pcbb-tax-note {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: #92400e;
    font-style: italic;
}

/* v1.2: IRS book value card */
.pcbb-irs-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}
.pcbb-irs-section h4 {
    margin: 0 0 1rem;
    color: #374151;
    font-size: 1.05rem;
}
.pcbb-irs-card {
    background: #fff;
    border: 2px solid #78350f;
    border-radius: 12px;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}
.pcbb-irs-main {
    text-align: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(120, 53, 15, 0.2);
}
.pcbb-irs-label {
    font-size: 0.8rem;
    color: #78350f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.pcbb-irs-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #78350f;
    line-height: 1;
}
.pcbb-irs-note {
    font-size: 0.85rem;
    color: #92400e;
    margin-top: 0.5rem;
    font-style: italic;
}
.pcbb-irs-detail {
    background: rgba(255, 255, 255, 0.6);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #78350f;
}
.pcbb-irs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px dotted rgba(120, 53, 15, 0.15);
}
.pcbb-irs-row:last-child {
    border-bottom: none;
}
.pcbb-irs-row strong {
    color: #1a1a1a;
}
.pcbb-irs-disclaimer {
    margin-top: 1rem;
    padding: 0.875rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #991b1b;
    line-height: 1.5;
}

/* v1.2: Calculation breakdown */
.pcbb-breakdown-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}
.pcbb-breakdown-section h4 {
    margin: 0 0 1rem;
    color: #374151;
    font-size: 1.05rem;
}
.pcbb-breakdown-table {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}
.pcbb-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}
.pcbb-breakdown-row:last-child {
    border-bottom: none;
}
.pcbb-row-starting {
    background: #f9fafb;
}
.pcbb-row-final {
    background: #ecfdf5;
    border-top: 2px solid #00a32a;
}
.pcbb-row-final .pcbb-breakdown-label {
    font-weight: 700;
    color: #00a32a;
}
.pcbb-row-final .pcbb-breakdown-amount {
    color: #00a32a;
    font-size: 1.1rem;
    font-weight: 700;
}
.pcbb-row-subtotal {
    background: #f9fafb;
    font-weight: 600;
}
.pcbb-breakdown-main {
    flex: 1;
    padding-right: 1rem;
}
.pcbb-breakdown-label {
    font-weight: 500;
    color: #1a1a1a;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}
.pcbb-breakdown-detail {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.4;
}
.pcbb-breakdown-amount {
    font-weight: 600;
    color: #1a1a1a;
    text-align: right;
    white-space: nowrap;
    font-size: 0.95rem;
}
.pcbb-change {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.15rem;
}
.pcbb-change-down {
    color: #d63638;
}
.pcbb-change-up {
    color: #00a32a;
}

/* v1.2: Print button row */
.pcbb-print-row {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}
.pcbb-print-btn {
    font-size: 0.9rem;
    padding: 0.625rem 1.25rem;
}

/* v1.2: Print styles - clean printable result */
@media print {
    /* Hide everything except the result card */
    body * {
        visibility: hidden;
    }
    .pcbb-result-card,
    .pcbb-result-card * {
        visibility: visible;
    }
    .pcbb-result-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #fff !important;
        padding: 1rem !important;
        box-shadow: none !important;
    }

    /* Hide elements within result card that don't print well */
    .pcbb-internal-links,
    .pcbb-sell-actions,
    .pcbb-print-row,
    .pcbb-nav {
        display: none !important;
    }

    /* Optimize for print */
    .pcbb-system-title {
        font-size: 1.4rem !important;
    }
    .pcbb-value-main {
        font-size: 2.5rem !important;
    }
    .pcbb-irs-value {
        font-size: 2rem !important;
    }
    .pcbb-category, .pcbb-irs-card, .pcbb-breakdown-table {
        page-break-inside: avoid;
    }
    a[href]:after {
        content: '';
    }
}

.pcbb-loading {
    text-align: center; padding: 3rem;
    color: #6b7280; font-size: 1.1rem;
}
.pcbb-error {
    padding: 1rem; background: #fef2f2;
    border-left: 3px solid #d63638;
    color: #991b1b; border-radius: 4px;
}

@media (max-width: 600px) {
    .pcbb-container { padding: 1rem; margin: 1rem; }
    .pcbb-value-main { font-size: 2.75rem; }
    .pcbb-field-row { grid-template-columns: 1fr; }
    .pcbb-progress { flex-wrap: wrap; gap: 0.5rem; }
    .pcbb-step { flex-basis: 30%; font-size: 0.75rem; }
    .pcbb-category-grid, .pcbb-internal-grid {
        grid-template-columns: 1fr;
    }
}
