/* Minimal calculator workspace. Scoped so public calculator logic and the landing workspace stay independent. */

.calculator-page {
    min-height: 100dvh;
    color: var(--text);
    background: var(--surface);
}

.calculator-hero,
.calculator-workspace {
    width: min(940px, calc(100% - 40px));
}

.calculator-hero {
    padding: 22px 0 12px;
}

.calculator-hero-top {
    margin-bottom: clamp(30px, 6vh, 58px);
}

.calculator-hero .chat-landing-logo-img {
    width: auto;
    height: 34px;
}

.calculator-index-link {
    min-height: 34px;
    padding: 0 13px;
    border-color: var(--stroke);
    border-radius: 9px;
    color: var(--text-secondary);
    background: transparent;
    font-size: 13px;
    font-weight: 650;
}

.calculator-index-link::before {
    margin-right: 7px;
    font-family: bootstrap-icons;
    content: "\f4e1";
}

.calculator-intro {
    gap: 14px;
}

.calculator-copy {
    max-width: 780px;
    margin-inline: auto;
    text-align: center;
}

.calculator-kicker {
    margin-bottom: 7px;
    font-size: 11px;
    letter-spacing: 0.07em;
}

.calculator-copy h1 {
    max-width: 780px;
    margin-inline: auto;
    font-family: var(--font-sans);
    font-size: clamp(29px, 4vw, 42px);
    font-weight: 720;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.calculator-copy p {
    max-width: 700px;
    margin: 10px auto 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.55;
}

.calculator-trust-strip {
    gap: 8px 18px;
    margin-top: 8px;
}

.calculator-trust-strip span {
    color: var(--text-tertiary);
    font-size: 11.5px;
    font-weight: 600;
}

.calculator-context-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--stroke));
    border-radius: 999px;
    background: var(--surface);
    color: var(--accent);
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--secondary) 8%, transparent);
}

.calculator-context-trigger:hover,
.calculator-context-trigger[aria-expanded="true"] {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--stroke));
    color: var(--accent);
}

.calculator-context-trigger i {
    color: currentColor;
}

.calculator-context-trigger small {
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: 650;
}

.calculator-context-trigger-chevron {
    font-size: 10px;
    transition: transform 150ms ease;
}

.calculator-context-trigger[aria-expanded="true"] .calculator-context-trigger-chevron {
    transform: rotate(180deg);
}

.calculator-workspace {
    gap: 18px;
    padding: 12px 0 48px;
    border-top: 0;
}

.ownership-planner {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--stroke);
    border-radius: 16px;
    background: var(--surface);
}

.calculator-chat-shell .decision-tool-intake {
    width: min(100%, 920px);
    margin: 0 auto;
    text-align: left;
}

.calculator-chat-shell .decision-tool-result {
    width: min(100%, 820px);
    margin: 0 auto;
}

.ownership-planner[hidden],
.calculator-chat-shell[hidden],
.ownership-custom-rate[hidden],
.ownership-eligibility[hidden] {
    display: none;
}

.ownership-planner-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--stroke);
}

.ownership-planner-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 11.5px;
    font-weight: 750;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.ownership-planner-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 720;
    letter-spacing: -0.025em;
}

.ownership-planner-header p {
    max-width: 610px;
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.5;
}

.ownership-planner-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--stroke));
    border-radius: 999px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 7%, var(--surface));
    font-size: 11px;
    font-weight: 700;
}

.ownership-form {
    display: grid;
    gap: 18px;
    padding-top: 18px;
}

.ownership-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.ownership-field-grid-primary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ownership-field {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 680;
}

.ownership-field > small {
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 550;
    line-height: 1.35;
}

.ownership-field input,
.ownership-field select {
    width: 100%;
    height: 42px;
    min-width: 0;
    border: 1px solid var(--stroke);
    border-radius: 9px;
    outline: 0;
    color: var(--text);
    background: var(--surface-alt);
    font: inherit;
    font-size: 14px;
    font-weight: 620;
}

.ownership-field input {
    padding: 0 10px;
}

.ownership-field select {
    padding: 0 30px 0 10px;
}

.decision-city-selector {
    position: relative;
    min-width: 0;
}

.decision-city-button {
    width: 100%;
    height: 42px;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 10px;
    border: 1px solid var(--stroke);
    border-radius: 9px;
    color: var(--text-secondary);
    background: var(--surface-alt);
    font: inherit;
    font-size: 14px;
    font-weight: 620;
    text-align: left;
    cursor: pointer;
}

.decision-city-button > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.decision-city-button > i {
    flex: 0 0 auto;
    font-size: 12px;
    transition: transform 0.15s ease;
}

.decision-city-button.has-city {
    color: var(--text);
}

.decision-city-button:focus,
.decision-city-button[aria-expanded="true"] {
    border-color: var(--accent);
    outline: 0;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.decision-city-button[aria-expanded="true"] > i {
    transform: rotate(180deg);
}

.calculator-chat-shell .decision-city-dropdown,
.calculator-chat-shell .decision-city-dropdown.open {
    position: absolute;
    inset: calc(100% + 6px) auto auto 0;
    width: max(100%, 260px);
    max-height: 320px;
    z-index: 200;
}

.decision-city-dropdown .chat-city-item {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: left;
}

.decision-city-dropdown .chat-city-item:hover,
.decision-city-dropdown .chat-city-item.active,
.decision-city-dropdown .chat-city-item.kb-focus {
    background: var(--accent-soft);
}

.decision-city-dropdown .chat-city-item.active {
    color: var(--accent);
}

.ownership-field input:focus,
.ownership-field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.ownership-money-input,
.ownership-percent-input {
    position: relative;
    display: block;
}

.ownership-money-input > span,
.ownership-percent-input > span {
    position: absolute;
    top: 50%;
    color: var(--text-tertiary);
    font-size: 13px;
    pointer-events: none;
    transform: translateY(-50%);
}

.ownership-money-input > span {
    left: 10px;
}

.ownership-percent-input > span {
    right: 10px;
}

.ownership-money-input input {
    padding-left: 22px;
}

.ownership-percent-input input {
    padding-right: 24px;
}

.ownership-rate-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
    padding: 0;
    border: 0;
}

.ownership-rate-options legend {
    grid-column: 1 / -1;
    margin-bottom: -1px;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 680;
}

.ownership-rate-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    min-height: 61px;
    padding: 11px;
    border: 1px solid var(--stroke);
    border-radius: 11px;
    background: var(--surface-alt);
    cursor: pointer;
}

.ownership-rate-option:has(input:checked) {
    border-color: color-mix(in srgb, var(--accent) 62%, var(--stroke));
    background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.ownership-rate-option input {
    margin-top: 2px;
    accent-color: var(--accent);
}

.ownership-rate-option span {
    display: grid;
    gap: 3px;
}

.ownership-rate-option strong {
    color: var(--text);
    font-size: 13px;
}

.ownership-rate-option small {
    color: var(--text-tertiary);
    font-size: 11.5px;
    font-weight: 540;
    line-height: 1.4;
}

.ownership-custom-rate {
    grid-column: 1 / -1;
    max-width: 220px;
}

.ownership-eligibility {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 10px 11px;
    border: 1px solid var(--stroke);
    border-radius: 9px;
    color: var(--text-secondary);
    background: var(--surface-alt);
    font-size: 12px;
    line-height: 1.45;
}

.ownership-eligibility input {
    margin-top: 2px;
    accent-color: var(--accent);
}

.ownership-optional-costs {
    border-top: 1px solid var(--stroke);
    border-bottom: 1px solid var(--stroke);
}

.ownership-optional-costs summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 2px;
    list-style: none;
    cursor: pointer;
}

.ownership-optional-costs summary::-webkit-details-marker {
    display: none;
}

.ownership-optional-costs summary > span {
    display: grid;
    gap: 2px;
}

.ownership-optional-costs summary strong {
    color: var(--text);
    font-size: 13px;
}

.ownership-optional-costs summary small {
    color: var(--text-tertiary);
    font-size: 11.5px;
}

.ownership-optional-costs summary i {
    color: var(--text-tertiary);
    font-size: 13px;
    transition: transform 160ms ease;
}

.ownership-optional-costs[open] summary i {
    transform: rotate(180deg);
}

.ownership-optional-costs .ownership-field-grid {
    padding: 2px 0 14px;
}

.ownership-form-error {
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--red) 48%, var(--stroke));
    border-radius: 9px;
    color: var(--red);
    background: var(--red-soft);
    font-size: 12.5px;
    line-height: 1.5;
}

.ownership-form-actions,
.ownership-result-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ownership-form-actions small {
    max-width: 420px;
    color: var(--text-tertiary);
    font-size: 11px;
    line-height: 1.4;
}

.ownership-calculate,
.ownership-edit,
.ownership-explain {
    min-height: 38px;
    padding: 0 13px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 720;
    cursor: pointer;
}

.ownership-calculate,
.ownership-explain {
    border: 1px solid var(--accent);
    color: var(--surface);
    background: var(--accent);
}

.ownership-edit {
    border: 1px solid var(--stroke);
    color: var(--text-secondary);
    background: var(--surface);
}

.ownership-calculate:disabled,
.ownership-explain:disabled {
    opacity: 0.62;
    cursor: wait;
}

.ownership-calculate:focus-visible,
.ownership-edit:focus-visible,
.ownership-explain:focus-visible,
.ownership-rate-option:focus-within {
    outline: 3px solid color-mix(in srgb, var(--accent) 22%, transparent);
    outline-offset: 2px;
}

.ownership-result {
    display: grid;
    grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.28fr);
    gap: 17px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--stroke);
}

.ownership-result[hidden] {
    display: none;
}

.calculator-chat-shell .ownership-result {
    width: min(100%, 820px);
    margin: 0 auto;
    padding: 24px 20px;
    border-top: 0;
}

.ownership-result-total {
    display: grid;
    align-content: center;
    min-height: 154px;
    padding: 17px;
    border-radius: 13px;
    color: var(--text);
    background: color-mix(in srgb, var(--accent) 9%, var(--surface-alt));
}

.ownership-result-total > span {
    color: var(--accent);
    font-size: 11px;
    font-weight: 760;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.ownership-result-total strong {
    margin: 6px 0 4px;
    font-size: clamp(31px, 4vw, 43px);
    font-weight: 760;
    line-height: 1;
    letter-spacing: -0.05em;
}

.ownership-result-total small {
    color: var(--text-secondary);
    font-size: 11.5px;
    line-height: 1.4;
}

.ownership-ledger {
    display: grid;
    align-content: start;
}

.ownership-ledger-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 8px 1px;
    border-bottom: 1px solid var(--stroke);
}

.ownership-ledger-row > span {
    display: grid;
    gap: 2px;
    color: var(--text-secondary);
    font-size: 12.5px;
}

.ownership-ledger-row small {
    color: var(--text-tertiary);
    font-size: 11px;
}

.ownership-ledger-row strong {
    align-self: center;
    color: var(--text);
    font-size: 13px;
}

.ownership-financing-notes {
    grid-column: 1 / -1;
    display: grid;
    gap: 5px;
    padding: 11px 12px;
    border: 1px solid var(--stroke);
    border-radius: 9px;
    background: var(--surface-alt);
}

.ownership-financing-notes p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 11.5px;
    line-height: 1.45;
}

.ownership-financing-notes a {
    color: var(--accent);
    font-weight: 680;
}

.ownership-rate-warning {
    display: block;
    margin-top: 6px;
    color: var(--yellow);
    font-weight: 650;
}

.ownership-result-actions {
    grid-column: 1 / -1;
}

.calculator-chat-shell #chat-widget {
    height: max(580px, calc(100dvh - 380px));
    min-height: 580px;
    max-height: none;
    border: 1px solid var(--stroke);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: none;
}

.calculator-chat-shell .chat-city-bg {
    display: none;
}

.calculator-chat-shell .chat-header {
    min-height: 52px;
    padding: 10px 14px;
    border-bottom-color: var(--stroke);
    background: var(--surface);
}

.calculator-chat-shell .chat-header-icon {
    display: none;
}

.calculator-chat-shell .chat-header-left {
    gap: 0;
}

.calculator-chat-shell .chat-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 680;
}

.calculator-chat-shell .chat-subtitle {
    color: var(--text-tertiary);
    font-size: 9.5px;
}

.calculator-chat-shell .chat-messages {
    order: 1;
    min-height: 0;
    gap: 26px;
    overflow-y: auto;
    padding: 24px 20px;
    background: var(--surface);
}

.calculator-chat-shell .chat-msg {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.calculator-chat-shell .chat-bubble {
    max-width: min(100%, 760px);
    font-size: 15px;
    line-height: 1.65;
    overflow-wrap: break-word;
    word-break: normal;
}

.calculator-chat-shell .chat-bubble-user {
    width: fit-content;
    max-width: min(78%, 620px);
    padding: 9px 14px;
    border: 1px solid var(--stroke);
    border-radius: 17px;
    color: var(--text);
    background: var(--surface-alt);
}

.calculator-chat-shell .chat-bubble-assistant {
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--text);
    background: transparent;
}

.calculator-chat-shell .chat-message-actions {
    justify-content: flex-start;
    gap: 4px;
    margin-top: 12px;
    opacity: 0.72;
}

.calculator-chat-shell .chat-message-action {
    border-color: transparent;
    background: transparent;
}

.calculator-chat-shell .chat-message-action:hover {
    border-color: var(--stroke);
    background: var(--surface-alt);
}

.calculator-chat-shell .chat-input-bar {
    order: 2;
    width: calc(100% - 28px);
    max-width: 820px;
    margin: 0 auto 14px;
    padding: 8px 10px;
    border: 1px solid var(--stroke);
    border-radius: 19px;
    background: var(--surface);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--text) 8%, transparent);
}

.calculator-chat-shell .chat-input {
    min-height: 38px;
    padding-inline: 8px;
    border: 0;
    background: transparent;
    font-size: 13px;
    box-shadow: none;
}

.calculator-chat-shell .chat-input:focus {
    border: 0;
    outline: 0;
    box-shadow: none;
}

.calculator-chat-shell .chat-city-btn,
.calculator-chat-shell .chat-image-btn,
.calculator-chat-shell .chat-send,
.calculator-chat-shell .chat-reset-btn,
.calculator-chat-shell .chat-message-action {
    width: 32px;
    height: 32px;
    min-height: 32px;
    border-radius: 50%;
}

.calculator-chat-shell .chat-city-btn.has-city {
    width: auto;
    max-width: 180px;
    padding-inline: 10px;
    border-radius: 999px;
}

.calculator-chat-shell .chat-city-btn.has-region {
    width: auto;
    max-width: 180px;
    padding-inline: 10px;
    border-radius: 999px;
}

.calculator-chat-shell .chat-option,
.calculator-chat-shell .chat-reply-option,
.calculator-chat-shell .chat-suggestion {
    min-height: 31px;
    padding: 6px 11px;
    border-color: color-mix(in srgb, var(--accent) 48%, var(--stroke));
    border-radius: 999px;
    color: var(--accent);
    background: transparent;
    font-size: 11px;
}

.calculator-page {
    --calculator-context-width: clamp(480px, 42vw, 640px);
    transition: padding-right 220ms ease;
}

.calculator-page.calculator-context-docked {
    padding-right: var(--calculator-context-width);
}

body.calculator-context-overlay-open {
    overflow: hidden;
}

.calculator-context-backdrop {
    position: fixed;
    z-index: 44;
    inset: 0;
    border: 0;
    background: rgba(16, 19, 34, 0.34);
    backdrop-filter: blur(2px);
}

.calculator-context-backdrop[hidden] {
    display: none;
}

.calculator-context-canvas {
    position: fixed;
    z-index: 45;
    inset: 0 0 0 auto;
    display: grid;
    width: var(--calculator-context-width);
    max-width: 100vw;
    grid-template-rows: auto minmax(0, 1fr);
    border-left: 1px solid var(--stroke);
    background: var(--surface);
    box-shadow: none;
    transform: translateX(102%);
    transition: transform 220ms ease;
}

.calculator-page.calculator-context-open .calculator-context-canvas {
    transform: translateX(0);
}

.calculator-page.calculator-context-docked .calculator-context-canvas {
    box-shadow: none;
}

.calculator-context-resizer {
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    left: -6px;
    width: 12px;
    cursor: ew-resize;
    touch-action: none;
}

.calculator-context-resizer::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 5px;
    width: 1px;
    background: var(--stroke);
    content: "";
    transition: width 140ms ease, background-color 140ms ease;
}

.calculator-context-resizer span {
    position: absolute;
    top: 50%;
    left: 1px;
    width: 10px;
    height: 44px;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--text) 8%, transparent);
    transform: translateY(-50%);
}

.calculator-context-resizer:hover::before,
.calculator-context-resizer:focus-visible::before,
.calculator-context-resizer.is-dragging::before {
    width: 2px;
    background: var(--accent);
}

.calculator-context-resizer:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 38%, transparent);
    outline-offset: -2px;
}

.calculator-page.calculator-context-resizing,
.calculator-page.calculator-context-resizing * {
    cursor: ew-resize !important;
    user-select: none !important;
}

.calculator-context-header {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--stroke);
    background: var(--surface);
}

.calculator-context-header > div:first-child {
    display: grid;
    gap: 2px;
}

.calculator-context-header > div:first-child > span {
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.calculator-context-header h2 {
    margin: 0;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: -0.02em;
}

.calculator-context-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.calculator-context-pin,
.calculator-context-close {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
}

.calculator-context-pin:hover,
.calculator-context-close:hover,
.calculator-context-pin[aria-pressed="true"] {
    background: var(--surface-alt);
    color: var(--accent);
}

.calculator-context-pin:disabled {
    cursor: not-allowed;
    opacity: 0.38;
}

.calculator-context-body {
    min-height: 0;
    overflow-y: auto;
    padding: 0 20px 30px;
}

.calculator-context-body .calculator-decision-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.calculator-context-body .calculator-verdict,
.calculator-context-body .calculator-source-panel {
    padding: 22px 0;
    border: 0;
    border-bottom: 1px solid var(--stroke);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.calculator-context-body .calculator-verdict {
    gap: 10px;
}

.calculator-context-body .calculator-verdict-label i,
.calculator-context-body .calculator-verdict-label span,
.calculator-context-body .calculator-source-heading span,
.calculator-context-body .calculator-source-disclosure summary > span > i {
    color: var(--text-secondary);
}

.calculator-context-body .calculator-verdict h2,
.calculator-context-body .calculator-source-heading h2 {
    font-family: var(--font-display);
    font-size: 18px;
}

.calculator-context-body .calculator-verdict p {
    margin-top: 0;
    padding-top: 11px;
}

.calculator-context-body .calculator-verdict-meta span {
    min-height: 22px;
    padding-inline: 8px;
    font-size: 10px;
}

.calculator-context-body .calculator-source-list {
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.calculator-context-body .calculator-source-list a {
    padding: 12px 0;
}

.calculator-context-body .calculator-source-list b {
    font-size: 12.5px;
}

.calculator-context-body .calculator-source-list small {
    padding-left: 24px;
    font-size: 10.5px;
}

[data-theme="dark"] .calculator-chat-shell .chat-input-bar {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

@media (max-width: 760px) {
    .calculator-hero,
    .calculator-workspace {
        width: min(100% - 22px, 940px);
    }

    .calculator-hero {
        padding-top: 12px;
    }

    .calculator-hero-top {
        margin-bottom: 34px;
    }

    .calculator-copy h1 {
        font-size: clamp(27px, 8.2vw, 36px);
    }

    .calculator-trust-strip span:nth-child(3) {
        display: none;
    }

    .calculator-context-trigger small {
        display: none;
    }

    .calculator-page {
        --calculator-context-width: 100vw;
    }

    .calculator-page.calculator-context-docked {
        padding-right: 0;
    }

    .calculator-context-resizer {
        display: none;
    }

    .calculator-context-header {
        padding-inline: 14px;
    }

    .calculator-context-body {
        padding-inline: 14px;
    }

    .calculator-chat-shell #chat-widget {
        height: max(560px, calc(100dvh - 190px));
        min-height: 560px;
        border-radius: 13px;
    }

    .ownership-planner {
        padding: 15px;
        border-radius: 13px;
    }

    .ownership-planner-header {
        display: grid;
    }

    .ownership-planner-status {
        justify-self: start;
    }

    .ownership-field-grid,
    .ownership-field-grid-primary,
    .ownership-rate-options,
    .ownership-result {
        grid-template-columns: minmax(0, 1fr);
    }

    .ownership-custom-rate,
    .ownership-financing-notes,
    .ownership-result-actions {
        grid-column: 1;
    }

    .ownership-form-actions,
    .ownership-result-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ownership-calculate,
    .ownership-edit,
    .ownership-explain {
        width: 100%;
    }

    .calculator-chat-shell .chat-messages {
        padding: 19px 12px;
    }

    .calculator-chat-shell .chat-bubble-user {
        max-width: 90%;
    }

    .calculator-chat-shell .chat-input-bar {
        width: calc(100% - 16px);
        margin-bottom: 8px;
    }

    .calculator-decision-panel {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .calculator-page *,
    .calculator-page *::before,
    .calculator-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Intake state. The panel is taller than any fixed widget height worth setting, so the widget
   takes its height from the form and the page keeps the only scrollbar. Two scrollbars, one
   inside the other, made the form look shorter than it is. */
.calculator-page.calculator-intake-open .calculator-chat-shell #chat-widget {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

.calculator-page.calculator-intake-open .calculator-chat-shell .chat-messages {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
}

/* Answer state. Once the inputs are captured the conversation is the page, the same way it is on
   the main chat surface: the headline and the side panel step aside and the widget owns the
   viewport. Edit assumptions puts the intake, and everything around it, straight back. */
.calculator-page.calculator-immersive {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.calculator-page.calculator-immersive .calculator-hero {
    flex: 0 0 auto;
    padding: 12px 0 6px;
}

.calculator-page.calculator-immersive .calculator-hero-top {
    margin-bottom: 0;
}

.calculator-page.calculator-immersive .calculator-intro {
    display: none;
}

/* The trust strip stays: it carries the only trigger for the context canvas, and the canvas
   itself is fixed-position and closed until asked for, so neither competes with the answer for
   room the way a permanent side column did. */
.calculator-page.calculator-immersive .calculator-trust-strip {
    flex: 0 0 auto;
    align-items: center;
    min-height: 38px;
    margin-top: 0;
    padding-top: 6px;
}

.calculator-page.calculator-immersive .calculator-workspace {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 0 10px;
}

.calculator-page.calculator-immersive .calculator-work-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.calculator-page.calculator-immersive .calculator-chat-shell {
    flex: 1 1 auto;
    min-height: 0;
}

.calculator-page.calculator-immersive .calculator-chat-shell #chat-widget {
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow: hidden;
}

.calculator-page.calculator-immersive .calculator-chat-shell .chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* Horizon projection. Sits under the monthly ledger inside the result card, so it inherits the
   card grid and has to claim the full width back. */
.decision-projection {
    grid-column: 1 / -1;
    display: grid;
    gap: 14px;
    margin-top: 4px;
    padding: 18px 17px 16px;
    border: 1px solid var(--stroke);
    border-radius: 13px;
    background: var(--surface-alt);
}

.decision-projection-head {
    display: grid;
    gap: 3px;
}

.decision-projection-head > span {
    color: var(--accent);
    font-size: 11.5px;
    font-weight: 760;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.decision-projection-head strong {
    font-size: clamp(21px, 2.6vw, 28px);
    font-weight: 760;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.decision-projection-head small {
    color: var(--text-secondary);
    font-size: 11.5px;
    line-height: 1.45;
}

.decision-projection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.decision-projection-column {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
    padding: 13px 13px 8px;
    border: 1px solid var(--stroke);
    border-radius: 11px;
    background: var(--surface);
}

.decision-projection-column h4 {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.decision-projection-column .ownership-ledger-row:last-child {
    border-bottom: 0;
}

.decision-projection-total {
    margin-top: 2px;
    border-top: 1px solid var(--stroke);
}

.decision-projection-total > span,
.decision-projection-total strong {
    color: var(--text);
    font-weight: 700;
}

.decision-projection-breakeven {
    display: grid;
    gap: 4px;
    padding: 12px 13px;
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--stroke));
    border-radius: 11px;
    background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.decision-projection-breakeven > span {
    color: var(--accent);
    font-size: 11.5px;
    font-weight: 760;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.decision-projection-breakeven p {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
}

.decision-projection-scenarios {
    display: grid;
    gap: 8px;
}

.decision-projection-scenarios h4,
.decision-projection-assumptions h4 {
    margin: 0;
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 760;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.decision-scenario-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.decision-scenario {
    display: grid;
    gap: 2px;
    padding: 10px 11px;
    border: 1px solid var(--stroke);
    border-radius: 10px;
    background: var(--surface);
}

.decision-scenario.is-base {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--stroke));
}

.decision-scenario > span {
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 700;
}

.decision-scenario strong {
    color: var(--text);
    font-size: 13.5px;
    letter-spacing: -0.02em;
}

.decision-scenario small {
    color: var(--text-tertiary);
    font-size: 11px;
}

.decision-projection-assumptions {
    display: grid;
    gap: 8px;
}

.decision-projection-assumptions dl {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 6px 12px;
    margin: 0;
}

.decision-projection-assumptions dt {
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 650;
}

.decision-projection-assumptions dd {
    display: grid;
    gap: 1px;
    margin: 0;
    min-width: 0;
}

.decision-projection-assumptions dd strong {
    color: var(--text);
    font-size: 13px;
}

.decision-projection-assumptions dd small {
    color: var(--text-tertiary);
    font-size: 11px;
    line-height: 1.45;
}

.decision-projection-note {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 11px;
    line-height: 1.5;
}

@media (max-width: 860px) {
    .decision-projection-grid,
    .decision-scenario-row,
    .decision-projection-assumptions dl {
        grid-template-columns: minmax(0, 1fr);
    }

    .calculator-page.calculator-immersive {
        height: auto;
        overflow: visible;
    }

    .calculator-page.calculator-immersive .calculator-chat-shell #chat-widget {
        height: calc(100dvh - 96px);
    }
}
