:root {
    --ink: #0b0b0b;
    --muted: #7a7772;
    --line: #dedbd5;
    --paper: #ffffff;
    --mist: #efeee9;
    --soft: #f7f6f2;
    --orange: #f07d2d;
    --green: #bfe9dc;
    --mint: #d9f2ea;
    --lavender: #ecebff;
    --sand: #f6e8d4;
    --danger-soft: #fff0ed;
    --shadow: 0 18px 42px rgba(32, 29, 25, 0.07);
}

* {
    box-sizing: border-box;
    border-radius: 0 !important;
    letter-spacing: 0;
}

html {
    scroll-behavior: smooth;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-kerning: normal;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--mist);
    line-height: 1.42;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--mist);
    box-shadow: 0 0 0 rgba(32, 29, 25, 0);
    transition: background 180ms ease, box-shadow 180ms ease, backdrop-filter 180ms ease;
}

.topbar.scrolled {
    background: rgba(239, 238, 233, 0.72);
    box-shadow: 0 12px 34px rgba(32, 29, 25, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav,
.container,
.footer-inner,
.footer-legal {
    width: min(1180px, calc(100% - 32px));
    max-width: 1180px;
    margin: 0 auto;
}

.container {
    padding-left: 0;
    padding-right: 0;
}

.nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    color: var(--ink);
}

.brand-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    background:
        linear-gradient(var(--ink), var(--ink)) 0 0 / 7px 7px no-repeat,
        linear-gradient(var(--ink), var(--ink)) 11px 0 / 7px 7px no-repeat,
        linear-gradient(var(--ink), var(--ink)) 0 11px / 7px 7px no-repeat,
        linear-gradient(var(--ink), var(--ink)) 11px 11px / 7px 7px no-repeat;
}

.nav-links {
    flex: 1;
    align-items: center;
    justify-content: space-between;
}

.nav-left,
.nav-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-left a,
.nav-actions a,
.nav-user {
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.nav-actions a.button-dark,
.nav-actions a.btn-dark {
    color: #fff;
}

.nav-user {
    align-items: center;
    background: transparent;
    border: 0;
    display: inline-flex;
    gap: 10px;
    justify-content: space-between;
    min-height: 38px;
    padding: 0;
    width: 100%;
}

.nav-actions .dropdown {
    min-width: 190px;
}

.nav-user:focus,
.nav-user:focus-visible,
.nav-user.show {
    box-shadow: none;
    outline: 0;
}

.nav-user:focus-visible .nav-avatar {
    box-shadow: 0 0 0 3px rgba(240, 125, 45, 0.18);
}

.nav-avatar {
    align-items: center;
    background: var(--ink);
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    line-height: 1;
    width: 34px;
}

.nav-user-name {
    flex: 1;
    max-width: 170px;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-actions .dropdown-menu {
    min-width: 100%;
    width: 100%;
}

.menu-button {
    display: none;
    background: var(--ink);
    border: 1px solid var(--ink);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 10px 14px;
    text-transform: uppercase;
}

.button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--ink);
    font-weight: 800;
    line-height: 1;
    min-height: 44px;
    padding: 14px 20px;
    text-transform: none;
}

.btn svg,
.button svg,
.dropdown-item svg,
.section-title svg,
.monthly-table-head svg,
.cta-card h2 svg {
    flex: 0 0 auto;
    height: 16px;
    width: 16px;
}

.dropdown-item-icon {
    align-items: center;
    display: flex;
    gap: 10px;
}

.button-small,
.btn-sm {
    min-height: 38px;
    padding: 11px 15px;
}

.button-dark,
.btn-dark,
.btn-primary {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.button-dark:hover,
.btn-dark:hover,
.btn-primary:hover {
    background: #252525;
    border-color: #252525;
    color: #fff;
}

.button-accent,
.btn-accent {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

.button-accent:hover,
.btn-accent:hover {
    background: #dc6d21;
    border-color: #dc6d21;
    color: #fff;
}

.btn-outline-dark {
    background: transparent;
    border-color: var(--ink);
    color: var(--ink);
}

.btn-link {
    border: 0;
    color: var(--muted);
    min-height: auto;
    padding-left: 0;
    padding-right: 0;
}

.dropdown-menu,
.card,
.form-control,
.form-select,
.input-group-text,
.badge {
    border-color: var(--line);
}

.dropdown-item {
    text-transform: none;
}

.flash-container {
    padding-top: 18px;
}

.alert {
    border: 0;
    box-shadow: none;
}

.hero-section,
.dashboard-wrap,
.auth-wrap {
    padding: 18px 0 76px;
}

.landing-hero {
    align-items: center;
    display: flex;
    min-height: calc(100svh - 74px);
    padding: clamp(18px, 3vw, 34px) 0 clamp(76px, 8vw, 104px);
    position: relative;
}

.hero-panel,
.feature-card,
.table-preview,
.cta-panel,
.app-card,
.stat-card,
.empty-state,
.cta-card,
.auth-card,
.card {
    background: var(--paper);
    border: 1px solid rgba(32, 29, 25, 0.05);
    box-shadow: none;
}

.hero-panel {
    min-height: 0;
    padding: clamp(34px, 4.2vw, 52px);
    position: relative;
    overflow: hidden;
}

.eyebrow {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 14px;
}

.hero-panel h1 {
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-size: clamp(44px, 4.8vw, 60px);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 0.94;
    margin: 0;
    max-width: 720px;
    text-wrap: balance;
}

.hero-panel h1 .accent,
.text-accent {
    color: var(--orange);
}

.lead {
    color: var(--muted);
    font-size: clamp(17px, 2vw, 20px);
    margin-top: 24px;
}

.calculator-card,
.calculator-preview {
    background: var(--soft);
    box-shadow: var(--shadow);
    padding: 24px;
}

.status-dot {
    background: var(--orange);
    display: inline-block;
    height: 10px;
    width: 10px;
}

.metric-row {
    align-items: center;
    background: var(--paper);
    border: 1px solid rgba(32, 29, 25, 0.04);
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 13px 14px;
}

.metric-row span {
    color: var(--muted);
}

.metric-row strong {
    font-size: 18px;
}

.chart-bars {
    align-items: end;
    display: flex;
    gap: 11px;
    height: 84px;
    margin-top: 18px;
}

.chart-bars span {
    background: #e2dfd9;
    flex: 1;
}

.chart-bars .accent {
    background: var(--orange);
}

.feature-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 236px;
    padding: 28px;
    width: 100%;
}

.hero-feature-grid {
    margin-bottom: clamp(8px, 2vw, 18px);
}

.landing-feature-band {
    padding: clamp(42px, 6vw, 76px) 0 clamp(70px, 8vw, 104px);
}

.feature-icon {
    align-items: center;
    background: var(--sand);
    color: var(--ink);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    height: 44px;
    justify-content: center;
    margin-bottom: 52px;
    width: 44px;
}

.feature-card:nth-child(2n) .feature-icon,
.row > .col-md-4:nth-child(2n) .feature-icon {
    background: var(--lavender);
}

.feature-card:nth-child(3n) .feature-icon,
.row > .col-md-4:nth-child(3n) .feature-icon {
    background: var(--mint);
}

.feature-card h2,
.section-heading h2,
.cta-panel h2,
.page-heading h1,
.empty-state h1 {
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 0.98;
    margin: 0;
}

.feature-card h2 + p,
.cta-card h2 + p,
.auth-card h1 + p,
.empty-state h1 + p,
.page-heading h1 + p,
.section-heading h2 + p {
    margin-top: 18px;
}

.feature-card p,
.cta-card p,
.auth-card p,
.empty-state p,
.page-heading p,
.section-heading p {
    margin-bottom: 0;
}

.feature-card h2,
.section-title h2,
.cta-card h2,
.auth-card h1 {
    font-size: 26px;
    line-height: 1.02;
}

.feature-card p,
.section-heading,
.page-heading p,
.auth-card p {
    color: var(--muted);
}

.hero-panel h1,
.page-heading h1,
.section-heading h2,
.split-section h2,
.pricing-copy h2,
.about-panel h2,
.contact-card h2,
.map-head h2,
.section-title h2,
.cta-panel h2,
.cta-card h2,
.auth-card h1,
.auth-side h2,
.empty-state h1,
.danger-zone h2,
.delete-modal h2,
.app-modal h2,
.tab-panel-head h2 {
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0;
    text-wrap: balance;
}

.content-band,
.cta-section {
    padding: 76px 0;
}

.landing-section {
    align-items: center;
    display: flex;
    min-height: 82svh;
    padding: clamp(76px, 10vw, 128px) 0;
}

.landing-section-tight {
    min-height: 70svh;
}

.landing-section-intro {
    min-height: 74svh;
}

.landing-section-calculator {
    padding: clamp(76px, 10vw, 128px) 0;
}

.soft-band {
    background: rgba(255, 255, 255, 0.32);
}

.section-heading {
    margin: 0 auto clamp(32px, 5vw, 56px);
    max-width: 820px;
    text-align: center;
}

.section-heading > p:last-child {
    color: var(--muted);
    margin: 18px auto 0;
    max-width: 680px;
}

.landing-section .section-heading h2,
.landing-section-calculator .section-heading h2 {
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-size: clamp(36px, 3.9vw, 50px);
    font-style: italic;
    font-weight: 400;
    line-height: 0.96;
    text-wrap: balance;
}

.split-section {
    align-items: center;
    display: grid;
    gap: clamp(32px, 6vw, 88px);
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
}

.split-section h2 {
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-size: clamp(36px, 3.9vw, 50px);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 0.96;
    margin: 0;
    text-wrap: balance;
}

.split-copy {
    color: var(--muted);
    font-size: clamp(17px, 2vw, 20px);
}

.split-copy p {
    margin: 0;
}

.split-copy p + p {
    margin-top: 18px;
}

.process-card,
.impact-card {
    background: var(--paper);
    border: 1px solid rgba(32, 29, 25, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
    padding: 28px;
    width: 100%;
}

.process-card span {
    align-items: center;
    background: var(--sand);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    height: 44px;
    justify-content: center;
    margin-bottom: 46px;
    width: 44px;
}

.row > .col-lg-3:nth-child(2n) .process-card span {
    background: var(--lavender);
}

.row > .col-lg-3:nth-child(3n) .process-card span {
    background: var(--mint);
}

.row > .col-lg-3:nth-child(4n) .process-card span {
    background: var(--sand);
}

.impact-card {
    justify-content: center;
}

.process-card h3,
.impact-card h3 {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    margin: 0;
}

.process-card p,
.impact-card p {
    color: var(--muted);
    margin: 16px 0 0;
}

.process-card p {
    margin-top: auto;
    padding-top: 18px;
}

.formula-stack {
    display: grid;
    gap: 10px;
}

.formula-stack div {
    background: var(--paper);
    border: 1px solid rgba(32, 29, 25, 0.05);
    display: grid;
    gap: 8px;
    padding: 20px;
}

.formula-stack span {
    color: var(--orange);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.formula-stack strong {
    font-size: 18px;
    line-height: 1.25;
}

.table-preview,
.app-card,
.auth-card {
    padding: 28px;
}

.monthly-table-card {
    background: var(--paper);
    border: 1px solid rgba(32, 29, 25, 0.05);
    overflow: hidden;
}

.monthly-table-head {
    align-items: center;
    background: var(--ink);
    color: #fff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 24px 28px;
}

.monthly-table-head span {
    color: rgba(255, 255, 255, 0.62);
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.monthly-table-head strong {
    align-items: center;
    display: inline-flex;
    gap: 10px;
    font-size: 24px;
    line-height: 1;
}

.monthly-table-head h2 {
    align-items: center;
    color: #fff;
    display: inline-flex;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    margin: 0;
}

.monthly-table-head p {
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
    max-width: 360px;
}

.monthly-table-head .btn-outline-dark {
    border-color: rgba(255, 255, 255, 0.68);
    color: #fff;
}

.monthly-table-head .btn-outline-dark:hover {
    background: #fff;
    border-color: #fff;
    color: var(--ink);
}

.dashboard-card-body {
    padding: 28px;
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.table td,
.table th {
    border-color: var(--line);
    padding: 16px 12px;
}

.monthly-table th,
.monthly-table td {
    padding: 20px 24px;
}

.monthly-table tbody tr:last-child td {
    border-bottom: 0;
}

.dashboard-records-card .empty-inline {
    border: 0;
    border-top: 1px dashed var(--line);
}

.dashboard-records-card .table-actions {
    justify-content: flex-end;
}

.monthly-table td:nth-child(3),
.monthly-table td:nth-child(4) {
    font-weight: 800;
}

.signal-badge {
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 10px;
    text-transform: uppercase;
    white-space: nowrap;
}

.signal-watch {
    background: var(--sand);
}

.signal-stable {
    background: var(--mint);
}

.signal-risk {
    background: var(--danger-soft);
}

.signal-muted {
    background: var(--soft);
}

.support-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

.support-detail-grid {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

.support-table td:first-child strong {
    display: block;
    font-size: 16px;
    line-height: 1.25;
}

.ticket-list {
    display: grid;
    gap: 0;
}

.ticket-item {
    border-bottom: 1px solid var(--line);
    padding: 28px;
}

.ticket-item:last-child {
    border-bottom: 0;
}

.ticket-item-head {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ticket-item-head span:first-child {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.ticket-item h3 {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.05;
    margin: 0;
}

.ticket-item p {
    color: var(--muted);
    margin: 0;
}

.ticket-response {
    background: var(--mint);
    margin-top: 22px;
    padding: 22px;
}

.ticket-response strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.ticket-response span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-top: 14px;
    text-transform: uppercase;
}

.ticket-thread {
    display: grid;
    gap: 0;
}

.ticket-message {
    border-bottom: 1px solid var(--line);
    padding: 28px;
}

.ticket-message:last-child {
    border-bottom: 0;
}

.ticket-message > div {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.ticket-message strong {
    font-size: 14px;
    font-weight: 800;
}

.ticket-message span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ticket-message p {
    color: var(--muted);
    margin: 0;
    white-space: pre-wrap;
}

.ticket-message-admin {
    background: var(--mint);
}

.pricing-panel {
    align-items: stretch;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1fr);
    margin-top: 42px;
}

.pricing-card,
.pricing-feature-table {
    border: 1px solid rgba(32, 29, 25, 0.05);
    padding: clamp(28px, 5vw, 54px);
}

.pricing-card {
    background: var(--ink);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
}

.price-line {
    display: grid;
    gap: 14px;
}

.price-line span {
    color: var(--orange);
    font-size: clamp(74px, 9vw, 118px);
    font-weight: 800;
    line-height: 0.88;
}

.price-line strong {
    color: #fff;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 0.98;
    max-width: 420px;
}

.price-line p {
    color: rgba(255, 255, 255, 0.68);
    font-size: 16px;
    line-height: 1.45;
    margin: 0;
    max-width: 430px;
}

.pricing-card .btn {
    margin-top: 34px;
    min-height: 54px;
    width: 100%;
}

.pricing-note-grid {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 34px;
    padding-top: 24px;
}

.pricing-note-grid div {
    background: rgba(255, 255, 255, 0.06);
    display: grid;
    gap: 7px;
    padding: 16px;
}

.pricing-note-grid span {
    color: rgba(255, 255, 255, 0.56);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.pricing-note-grid strong {
    color: #fff;
    font-size: 15px;
}

.pricing-feature-table {
    background: var(--paper);
    display: grid;
    gap: 0;
}

.pricing-feature-head,
.pricing-feature-row {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 92px;
}

.pricing-feature-head {
    border-bottom: 1px solid var(--line);
    grid-template-columns: 1fr;
    padding-bottom: 20px;
}

.pricing-feature-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.pricing-feature-head strong {
    color: var(--ink);
    font-size: 18px;
    justify-self: end;
}

.pricing-feature-row {
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 16px;
    line-height: 1.35;
    min-height: 58px;
    padding: 14px 0;
}

.pricing-feature-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.pricing-feature-row strong {
    display: grid;
    justify-content: end;
}

.checkmark {
    align-items: center;
    background: #d9f2ea;
    color: #167a4a;
    display: inline-flex;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.about-panel,
.contact-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
}

.about-panel > div:first-child,
.contact-card,
.map-card {
    background: var(--paper);
    border: 1px solid rgba(32, 29, 25, 0.05);
    padding: clamp(28px, 5vw, 54px);
}

.about-panel h2,
.contact-card h2,
.map-head h2 {
    font-size: clamp(34px, 4.8vw, 58px);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 0.95;
    margin: 0;
}

.about-panel p:not(.eyebrow) {
    color: var(--muted);
    font-size: clamp(17px, 2vw, 20px);
    margin: 22px 0 0;
    max-width: 680px;
}

.contact-grid {
    align-items: stretch;
}

.contact-card {
    display: flex;
    flex-direction: column;
}

.contact-list {
    display: grid;
    gap: 0;
    margin-top: auto;
    padding-top: 38px;
}

.contact-list div {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
    padding: 20px 0;
}

.contact-list div:last-child {
    padding-bottom: 0;
}

.contact-list span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.contact-list a,
.contact-list strong {
    color: var(--ink);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
}

.map-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0;
}

.map-head {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: clamp(24px, 4vw, 38px) clamp(24px, 4vw, 38px) 0;
}

.map-head h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.contact-map {
    background: var(--soft);
    border-top: 1px solid var(--line);
    height: clamp(340px, 42vw, 480px);
    overflow: hidden;
    position: relative;
    width: 100%;
}

.leaflet-container {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow: hidden;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
    left: 0;
    position: absolute;
    top: 0;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
    user-select: none;
    -webkit-user-drag: none;
}

.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
    max-height: none !important;
    max-width: none !important;
    padding: 0;
    width: auto;
}

.leaflet-tile {
    visibility: hidden;
}

.leaflet-tile-loaded {
    visibility: inherit;
}

.leaflet-pane {
    z-index: 400;
}

.leaflet-tile-pane {
    z-index: 200;
}

.leaflet-overlay-pane {
    z-index: 400;
}

.leaflet-shadow-pane {
    z-index: 500;
}

.leaflet-marker-pane {
    z-index: 600;
}

.leaflet-tooltip-pane {
    z-index: 650;
}

.leaflet-popup-pane {
    z-index: 700;
}

.leaflet-control {
    position: relative;
    z-index: 800;
}

.leaflet-top,
.leaflet-bottom {
    position: absolute;
    z-index: 1000;
}

.leaflet-top {
    top: 0;
}

.leaflet-right {
    right: 0;
}

.leaflet-bottom {
    bottom: 0;
}

.leaflet-left {
    left: 0;
}

.leaflet-left .leaflet-control {
    margin-left: 10px;
}

.leaflet-top .leaflet-control {
    margin-top: 10px;
}

.cta-panel {
    padding: clamp(42px, 7vw, 78px);
}

.footer {
    margin-top: auto;
    padding: 38px 0 32px;
}

.footer-inner {
    border-top: 0;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(120px, 0.5fr));
    gap: 36px;
    padding-top: 32px;
}

.footer-brand {
    margin-bottom: 14px;
}

.footer p {
    color: var(--muted);
    margin: 0;
    max-width: 320px;
}

.footer-column {
    display: grid;
    gap: 10px;
    align-content: start;
}

.footer-column span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.footer-column a {
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.footer-legal {
    color: var(--muted);
    font-size: 12px;
    padding-top: 48px;
}

.heart-icon {
    color: var(--orange);
    font-size: 14px;
    line-height: 1;
}

.dashboard-wrap {
    padding-top: 42px;
}

.page-heading {
    margin-bottom: 28px;
}

.dashboard-wrap .page-heading h1 {
    font-size: clamp(42px, 5vw, 68px);
}

.dashboard-overview-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.overview-card {
    background: var(--paper);
    border: 1px solid rgba(32, 29, 25, 0.05);
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 178px;
    min-width: 0;
    overflow: hidden;
    padding: 26px;
}

.overview-card-primary {
    background: var(--paper);
    grid-column: span 6;
    min-height: 238px;
}

.overview-card-summary,
.overview-card-cta {
    grid-column: span 3;
    min-height: 238px;
}

.overview-card-small {
    grid-column: span 4;
}

.overview-card-summary {
    background: var(--mint);
}

.overview-card-cta {
    background: var(--ink);
    border-color: rgba(240, 125, 45, 0.5);
    box-shadow: inset 0 6px 0 var(--orange), 0 22px 48px rgba(11, 11, 11, 0.16);
    color: #fff;
}

.overview-card-top {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.overview-card-top > span:first-child,
.overview-eyebrow {
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
}

.overview-card .stat-icon {
    flex: 0 0 48px;
}

.overview-card:nth-child(1) .stat-icon {
    background: var(--sand);
}

.overview-card:nth-child(4) .stat-icon {
    background: #ffe3d2;
}

.overview-card:nth-child(5) .stat-icon {
    background: var(--mint);
}

.overview-card:nth-child(6) .stat-icon {
    background: var(--lavender);
}

.overview-card:nth-child(7) .stat-icon {
    background: #e8f4ff;
}

.overview-card:nth-child(8) .stat-icon {
    background: #e8f5d7;
}

.overview-card:nth-child(9) .stat-icon {
    background: #fff0ed;
}

.overview-card strong {
    color: var(--ink);
    display: block;
    font-size: clamp(34px, 14cqw, 58px);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 0.9;
    margin: 22px 0 10px;
    overflow-wrap: anywhere;
}

.overview-card-primary strong {
    color: var(--ink);
    font-size: clamp(48px, 13cqw, 82px);
}

.overview-card-savings strong {
    color: #167a4a;
}

.overview-card-savings .stat-icon {
    background: #d9f2ea !important;
    color: #167a4a;
}

.overview-card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
    margin: 0;
}

.overview-card h2 {
    font-size: clamp(28px, 3.6cqw, 38px);
    font-weight: 800;
    line-height: 0.98;
    margin: 16px 0 0;
}

.overview-summary-list {
    border-top: 1px solid rgba(32, 29, 25, 0.14);
    display: grid;
    gap: 8px;
    margin-top: 20px;
    padding-top: 18px;
}

.overview-summary-list p {
    color: var(--ink);
    font-size: 14px;
}

.overview-summary-list strong {
    display: inline;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

.overview-card-cta .overview-eyebrow,
.overview-card-cta p {
    color: rgba(255, 255, 255, 0.68);
}

.overview-card-cta h2 {
    color: #fff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-style: normal;
    max-width: 300px;
}

.overview-card-cta .btn {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    margin-top: 28px;
    min-height: 50px;
    width: 100%;
}

.overview-card-cta .btn:hover {
    background: #dc6d21;
    border-color: #dc6d21;
    color: #fff;
}

.dashboard-hero-grid {
    align-items: stretch;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
}

.dashboard-hero-grid .metric-grid {
    min-width: 0;
}

.metric-grid {
    display: grid;
    gap: 18px;
    grid-auto-rows: minmax(210px, auto);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-side-stack {
    display: grid;
    gap: 18px;
    grid-template-rows: repeat(2, minmax(210px, auto));
    min-width: 0;
}

.calculator-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.calculator-shell .row.align-items-start {
    align-items: stretch !important;
}

.calculator-shell .col-xl-8,
.calculator-shell .col-xl-4 {
    display: flex;
}

.calculator-heading {
    align-items: center;
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    margin-bottom: 30px;
}

.calculator-heading > .text-muted {
    font-size: 17px;
    max-width: 500px;
    margin: 0;
}

.calculator-heading h1 {
    font-size: clamp(36px, 4.2vw, 52px);
    line-height: 0.98;
    max-width: 780px;
}

.stat-card,
.empty-state,
.cta-card {
    padding: 28px;
}

.stat-card {
    container-type: inline-size;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
}

.metric-grid .stat-card {
    height: auto;
}

.stat-card-top {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 0;
    min-height: 48px;
}

.stat-card-label {
    color: var(--muted);
    display: block;
    min-width: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.32;
    max-width: calc(100% - 64px);
}

.stat-icon {
    align-items: center;
    background: var(--soft);
    color: var(--ink);
    display: grid;
    flex: 0 0 48px;
    height: 48px;
    justify-content: center;
    place-items: center;
    position: relative;
    width: 48px;
}

.stat-icon svg {
    height: 19px;
    stroke-width: 2.2;
    width: 19px;
}

.metric-grid > div:nth-child(1) .stat-icon,
.metric-grid > div:nth-child(4) .stat-icon {
    background: var(--sand);
}

.metric-grid > div:nth-child(2) .stat-icon,
.metric-grid > div:nth-child(5) .stat-icon {
    background: var(--lavender);
}

.metric-grid > div:nth-child(3) .stat-icon,
.metric-grid > div:nth-child(6) .stat-icon {
    background: var(--mint);
}

.stat-card strong {
    align-items: center;
    display: flex;
    font-size: clamp(34px, 3vw, 50px);
    font-size: clamp(34px, 16cqw, 54px);
    font-weight: 800;
    justify-content: center;
    line-height: 0.88;
    max-width: 100%;
    overflow-wrap: normal;
    text-align: center;
    white-space: nowrap;
    word-break: normal;
}

.stat-card strong.metric-value-medium {
    font-size: clamp(30px, 13cqw, 46px);
    line-height: 0.92;
}

.stat-card strong.metric-value-small {
    font-size: clamp(24px, 10cqw, 38px);
    line-height: 0.96;
}

.stat-card strong.money-value {
    overflow: hidden;
    text-overflow: clip;
}

.owner-signal-grid {
    display: grid;
    gap: 18px;
    grid-auto-rows: minmax(210px, auto);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.owner-signal-card {
    align-items: stretch;
    background: var(--paper);
    border: 1px solid rgba(32, 29, 25, 0.05);
    container-type: inline-size;
    display: grid;
    gap: 18px;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
    padding: 28px;
}

.owner-signal-card > div {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.owner-signal-card-top {
    align-items: center;
    display: flex;
    flex-direction: row !important;
    gap: 16px;
    justify-content: space-between;
    min-height: 48px;
}

.owner-signal-card .signal-icon {
    align-items: center;
    background: var(--soft);
    color: var(--ink);
    display: inline-flex;
    flex: 0 0 48px;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.owner-signal-card:nth-child(1) .signal-icon,
.owner-signal-card:nth-child(4) .signal-icon {
    background: var(--sand);
}

.owner-signal-card:nth-child(2) .signal-icon,
.owner-signal-card:nth-child(5) .signal-icon {
    background: var(--mint);
}

.owner-signal-card:nth-child(3) .signal-icon,
.owner-signal-card:nth-child(6) .signal-icon {
    background: var(--lavender);
}

.owner-signal-card .signal-icon svg {
    height: 18px;
    stroke-width: 2.2;
    width: 18px;
}

.owner-signal-card p {
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.32;
    margin: 0;
    max-width: calc(100% - 64px);
    text-transform: none;
}

.owner-signal-card strong {
    display: block;
    font-size: clamp(34px, 3vw, 50px);
    font-size: clamp(34px, 16cqw, 54px);
    font-weight: 800;
    line-height: 0.88;
    margin-bottom: 14px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.owner-signal-card small {
    color: var(--muted);
    display: block;
    font-size: 13px;
    line-height: 1.35;
}

.owner-signal-card-accent {
    background: var(--paper);
    border-color: rgba(32, 29, 25, 0.05);
    box-shadow: none;
}

.owner-signal-card-accent .signal-icon {
    background: var(--sand) !important;
}

.section-title {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title h2 {
    align-items: center;
    display: inline-flex;
    gap: 10px;
    font-weight: 800;
    margin: 0;
}

.summary-list {
    margin: 0;
}

.summary-list div {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
}

.summary-list div:last-child {
    border-bottom: 0;
}

.summary-list dt {
    color: var(--muted);
    font-weight: 500;
}

.summary-list dd {
    font-weight: 800;
    margin: 0;
    text-align: right;
}

.display-metric {
    font-size: clamp(34px, 2.8vw, 50px);
    font-weight: 800;
    line-height: 0.95;
    margin-bottom: 12px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.turnover-chart-card .section-title {
    align-items: flex-start;
}

.turnover-chart-card .section-title p {
    margin-top: 10px;
}

.turnover-chart {
    display: grid;
    gap: 18px;
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 340px;
}

.chart-axis {
    color: var(--muted);
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 800;
    justify-content: space-between;
    padding: 2px 0 50px;
    text-align: right;
}

.chart-bars-wrap {
    min-width: 0;
    overflow-x: auto;
    position: relative;
}

.chart-grid-lines {
    bottom: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 0;
}

.chart-grid-lines span {
    border-top: 1px solid var(--line);
    display: block;
}

.chart-bars-area {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(var(--chart-months, 12), minmax(54px, 1fr));
    min-height: 340px;
    min-width: 640px;
    position: relative;
    z-index: 1;
}

.chart-month {
    display: grid;
    gap: 8px;
    grid-template-rows: 1fr auto auto;
    min-width: 0;
    text-align: center;
}

.chart-bar-shell {
    align-items: end;
    display: flex;
    height: 270px;
    justify-content: center;
}

.chart-bar {
    background: linear-gradient(180deg, var(--orange), #f4a76d);
    min-height: 6px;
    position: relative;
    transition: opacity 160ms ease;
    width: min(100%, 42px);
}

.chart-bar:hover {
    opacity: 0.84;
}

.chart-bar span {
    background: var(--ink);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    left: 50%;
    opacity: 0;
    padding: 7px 9px;
    pointer-events: none;
    position: absolute;
    top: -34px;
    transform: translateX(-50%);
    transition: opacity 160ms ease;
    white-space: nowrap;
}

.chart-bar:hover span {
    opacity: 1;
}

.chart-month strong {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.chart-month small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.ytd-card {
    background: var(--mint);
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 0;
}

.cta-card {
    background: var(--ink);
    color: #fff;
}

.cta-card h2 {
    align-items: flex-start;
    display: inline-flex;
    gap: 10px;
}

.cta-card p {
    color: rgba(255, 255, 255, 0.72);
}

.dashboard-side-stack .cta-card {
    border: 1px solid rgba(240, 125, 45, 0.42);
    box-shadow: inset 0 6px 0 var(--orange), 0 26px 60px rgba(11, 11, 11, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 0;
    min-height: 0;
    padding: 30px;
}

.dashboard-side-stack .cta-card .btn {
    font-size: 15px;
    margin-top: 22px;
    min-height: 50px;
}

.dashboard-side-stack .cta-card h2 {
    color: #fff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(26px, 2vw, 34px);
    font-style: normal;
    font-weight: 800;
    line-height: 0.98;
    max-width: 360px;
}

.dashboard-side-stack .cta-card p {
    font-size: 15px;
    line-height: 1.42;
    margin-top: 16px;
    max-width: 360px;
}

.dashboard-side-stack .cta-card .btn-dark {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

.dashboard-side-stack .cta-card .btn-dark:hover {
    background: #dc6d21;
    border-color: #dc6d21;
    color: #fff;
}

.empty-state {
    margin: 44px auto;
    max-width: 780px;
    padding: clamp(42px, 8vw, 88px);
}

.empty-state p {
    max-width: 560px;
}

.empty-inline {
    background: var(--soft);
    border: 1px dashed var(--line);
    color: var(--muted);
    padding: 34px;
    text-align: center;
}

.form-label {
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
}

.form-control,
.form-select,
.input-group-text {
    background-color: #fff;
    border-color: var(--line);
    min-height: 46px;
}

.form-control:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(240, 125, 45, 0.16);
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 52px;
}

.password-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--muted);
    display: inline-flex;
    height: 44px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 1px;
    top: 1px;
    transition: color 160ms ease, background 160ms ease;
    width: 48px;
    z-index: 3;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--ink);
}

.password-toggle:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 2px rgba(240, 125, 45, 0.28);
}

.password-toggle svg {
    height: 18px;
    width: 18px;
}

input[type="text"]:not(.no-text-capitalize),
textarea:not(.no-text-capitalize) {
    text-transform: capitalize;
}

input[type="email"],
input[type="password"],
input[name="delete_confirmation"] {
    text-transform: none;
}

.form-check-input:checked {
    background-color: var(--ink);
    border-color: var(--ink);
}

.badge.text-bg-success {
    background: var(--mint) !important;
    color: var(--ink) !important;
}

.badge.text-bg-light {
    background: var(--soft) !important;
    color: var(--muted) !important;
}

.alert-success {
    background: var(--mint);
    color: var(--ink);
}

.alert-danger {
    background: var(--danger-soft);
    color: var(--ink);
}

.btn-danger {
    background: #b42318;
    border-color: #b42318;
    color: #fff;
}

.btn-danger:hover {
    background: #961c13;
    border-color: #961c13;
    color: #fff;
}

.btn-outline-danger {
    background: transparent;
    border-color: #b42318;
    color: #b42318;
}

.btn-outline-danger:hover {
    background: #b42318;
    border-color: #b42318;
    color: #fff;
}

.alert-info {
    background: var(--lavender);
    color: var(--ink);
}

.auth-wrap {
    min-height: calc(100vh - 260px);
}

.auth-frame {
    max-width: 1180px;
    margin: 36px auto;
    width: 100%;
}

.auth-frame > [class*="col-"] {
    display: flex;
}

.auth-card {
    flex: 1;
    margin: 0;
    padding: clamp(34px, 4vw, 54px);
    width: 100%;
}

.auth-card h1 {
    font-weight: 800;
    margin-bottom: 16px;
}

.auth-side {
    background: var(--ink);
    color: #fff;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: clamp(34px, 4vw, 54px);
    width: 100%;
}

.auth-side p {
    color: rgba(255, 255, 255, 0.72);
}

.danger-zone {
    align-items: center;
    background: var(--danger-soft);
    border: 1px solid rgba(180, 35, 24, 0.18);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 28px;
}

.danger-zone h2,
.delete-modal h2 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.02;
    margin: 0;
}

.danger-zone p:not(.eyebrow) {
    color: var(--muted);
    margin: 12px 0 0;
    max-width: 680px;
}

.app-modal .modal-header,
.app-modal .modal-footer,
.delete-modal .modal-header,
.delete-modal .modal-footer {
    border-color: var(--line);
    padding: 24px 28px;
}

.app-modal .modal-body,
.delete-modal .modal-body {
    padding: 28px;
}

.app-modal h2 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.02;
    margin: 0;
}

.free-calculator-section {
    background: var(--paper);
    border: 1px solid rgba(222, 219, 213, 0.84);
    box-shadow: var(--shadow);
}

.free-calculator-grid {
    align-items: stretch;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.48fr);
    padding: 28px;
}

.free-calculator-fields {
    background: var(--soft);
    padding: 24px;
}

.free-calculator-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 24px;
    position: relative;
}

.free-calculator-tabs::before {
    background: var(--line);
    content: "";
    height: 1px;
    left: 24px;
    position: absolute;
    right: 24px;
    top: 20px;
}

.free-calculator-tabs button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--muted);
    display: grid;
    font-size: 12px;
    font-weight: 800;
    gap: 10px;
    justify-items: center;
    min-height: 74px;
    padding: 0 8px;
    position: relative;
    text-transform: uppercase;
    z-index: 1;
}

.free-calculator-tabs button span {
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--muted);
    display: inline-flex;
    font-size: 11px;
    height: 40px;
    justify-content: center;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
    width: 40px;
}

.free-calculator-tabs button strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}

.free-calculator-tabs button.active {
    color: var(--ink);
}

.free-calculator-tabs button.active span {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.free-calculator-tabs button.complete {
    color: var(--ink);
}

.free-calculator-tabs button.complete span {
    background: var(--mint);
    border-color: var(--green);
    color: transparent;
    position: relative;
}

.free-calculator-tabs button.complete span::after {
    color: var(--ink);
    content: "✓";
    font-size: 18px;
    font-weight: 900;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -52%);
}

.free-calculator-tab-content {
    min-height: 420px;
}

.free-step-intro {
    background: var(--paper);
    border: 1px solid var(--line);
    margin-bottom: 22px;
    padding: 22px;
}

.free-step-intro span {
    color: var(--orange);
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.free-step-intro h3 {
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 0.98;
    margin: 0;
}

.free-step-intro p {
    color: var(--muted);
    margin: 12px 0 0;
    max-width: 680px;
}

.free-calculator-pane {
    display: none;
}

.free-calculator-pane.active {
    display: block;
}

.free-calculator-results {
    background: var(--ink);
    color: #fff;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100%;
    padding: 28px;
}

.free-calculator-results .eyebrow,
.free-calculator-results .text-muted {
    color: rgba(255, 255, 255, 0.64) !important;
}

.free-calculator-results .eyebrow {
    align-self: start;
    margin-bottom: 18px;
}

.result-stack {
    display: grid;
    gap: 10px;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    min-height: 0;
}

.result-stack div {
    align-content: center;
    background: rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 10px;
    min-height: 0;
    padding: clamp(14px, 2vw, 20px);
}

.result-stack span {
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.result-stack strong {
    color: #fff;
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 800;
    line-height: 0.95;
    white-space: nowrap;
}

.free-calculator-actions {
    align-items: center;
    background: var(--soft);
    border-top: 1px solid var(--line);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 22px 28px;
}

.other-cause-wrapper {
    display: none;
}

.table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    white-space: nowrap;
}

.calculator-preview {
    align-content: stretch;
    background: var(--ink);
    border: 1px solid rgba(32, 29, 25, 0.05);
    box-shadow: var(--shadow);
    color: #fff;
    display: grid;
    gap: 18px;
    grid-template-rows: auto auto auto 1fr;
    min-height: 0;
    padding: 28px;
    position: sticky;
    top: 100px;
    width: 100%;
}

.calculator-preview .big-number {
    font-size: clamp(38px, 4.4vw, 56px);
    font-weight: 800;
    line-height: 0.94;
    margin: 0;
}

.calculator-preview .eyebrow,
.calculator-preview .text-muted {
    color: rgba(255, 255, 255, 0.66) !important;
}

.formula-grid {
    display: grid;
    gap: 8px;
    grid-template-rows: repeat(6, minmax(0, 1fr));
    margin-top: 0;
    min-height: 0;
}

.formula-grid div {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 14px 16px;
}

.formula-grid span {
    color: rgba(255, 255, 255, 0.66);
}

.formula-grid strong {
    color: #fff;
    white-space: nowrap;
}

.calculator-workspace {
    background: var(--paper);
    border: 1px solid rgba(32, 29, 25, 0.05);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    padding: 28px;
    width: 100%;
}

.wizard-progress {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
    padding: 0;
}

.wizard-progress > div:first-child {
    display: block;
}

.wizard-progress span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.wizard-progress strong {
    font-size: 18px;
    font-weight: 800;
}

.wizard-progress-track {
    background: #dedbd5;
    border: 0;
    height: 8px;
    overflow: hidden;
}

.wizard-progress-track span {
    background: var(--orange);
    display: block;
    height: 100%;
    transition: width 180ms ease;
    width: 25%;
}

.calculator-tabs {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 30px;
    position: relative;
}

.calculator-tabs::before {
    background: var(--line);
    content: "";
    height: 1px;
    left: 24px;
    position: absolute;
    right: 24px;
    top: 20px;
}

.calculator-tab {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--muted);
    display: grid;
    font-size: 12px;
    font-weight: 800;
    gap: 10px;
    justify-items: center;
    min-height: 62px;
    padding: 0 8px;
    position: relative;
    text-transform: uppercase;
    z-index: 1;
}

.calculator-tab:disabled {
    cursor: not-allowed;
}

.calculator-tab span {
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--muted);
    display: inline-flex;
    font-size: 11px;
    height: 40px;
    justify-content: center;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
    width: 40px;
}

.calculator-tab strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}

.calculator-tab.active {
    color: var(--ink);
}

.calculator-tab.active span {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.calculator-tab.complete {
    color: var(--ink);
}

.calculator-tab.complete span {
    background: var(--mint);
    border-color: var(--green);
    color: transparent;
    position: relative;
}

.calculator-tab.complete span::after {
    color: var(--ink);
    content: "✓";
    font-size: 18px;
    font-weight: 900;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -52%);
}

.calculator-card-panel {
    display: none;
    min-height: 0;
    padding: 0;
}

.calculator-card-panel.active {
    display: block;
    flex: 1;
}

.tab-panel-head {
    border-bottom: 1px solid var(--line);
    margin-bottom: 28px;
    padding-bottom: 22px;
}

.tab-panel-head h2 {
    font-size: clamp(34px, 3.6vw, 46px);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 0.95;
    margin: 0;
}

.tab-panel-head p:last-child {
    color: var(--muted);
    max-width: 680px;
    margin: 12px 0 0;
}

.calculator-actions {
    background: var(--soft);
    border-top: 1px solid var(--line);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin: 30px -28px -28px;
    padding: 18px 28px;
    margin-top: auto;
}

#wizardSaveButton {
    display: none;
}

.calculator-section {
    background: var(--paper);
    border: 1px solid rgba(32, 29, 25, 0.05);
    margin-bottom: 18px;
    padding: 28px;
}

.calculator-section-head {
    align-items: flex-start;
    display: grid;
    gap: 18px;
    grid-template-columns: 52px 1fr;
    margin-bottom: 26px;
}

.calculator-section-head h2 {
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 0.98;
    margin: 0;
}

.calculator-section-head p:last-child {
    color: var(--muted);
    margin: 8px 0 0;
}

.section-number {
    align-items: center;
    background: var(--sand);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.calculator-section:nth-of-type(2) .section-number {
    background: var(--lavender);
}

.calculator-section:nth-of-type(3) .section-number {
    background: var(--mint);
}

.calculator-section:nth-of-type(4) .section-number {
    background: var(--green);
}

.formula-note {
    background: var(--soft);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    justify-content: center;
    min-height: 76px;
    padding: 14px;
}

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

.formula-note strong {
    font-size: 22px;
    font-weight: 800;
}

.page-heading h1,
.section-heading h2,
.split-section h2,
.pricing-copy h2,
.about-panel h2,
.contact-card h2,
.map-head h2,
.section-title h2,
.cta-panel h2,
.cta-card h2,
.auth-card h1,
.auth-side h2,
.empty-state h1,
.danger-zone h2,
.delete-modal h2,
.app-modal h2,
.tab-panel-head h2 {
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0;
    text-wrap: balance;
}

@media (min-width: 992px) {
    .nav-links.collapse {
        display: flex !important;
    }
}

@media (max-width: 991.98px) {
    .landing-hero,
    .landing-section,
    .landing-section-tight,
    .landing-section-intro {
        min-height: auto;
    }

    .nav {
        flex-wrap: wrap;
        min-height: 68px;
        padding: 14px 0;
    }

    .menu-button {
        display: inline-flex;
    }

    .nav-links {
        flex-basis: 100%;
        padding: 16px 0 4px;
    }

    .nav-left,
    .nav-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .nav-actions {
        margin-top: 14px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .calculator-heading {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .dashboard-overview-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .overview-card-primary,
    .overview-card-summary,
    .overview-card-cta,
    .overview-card-small {
        grid-column: span 3;
    }

    .overview-card-primary {
        grid-column: span 6;
    }

    .dashboard-hero-grid {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-side-stack {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .owner-signal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split-section {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .pricing-panel {
        grid-template-columns: 1fr;
    }

    .free-calculator-grid {
        grid-template-columns: 1fr;
    }

    .support-grid,
    .support-detail-grid {
        grid-template-columns: 1fr;
    }

    .about-panel,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .calculator-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calculator-tabs::before {
        display: none;
    }

    .calculator-preview {
        position: static;
    }

    .calculator-shell .row.align-items-start {
        align-items: flex-start !important;
    }

    .calculator-shell .col-xl-8,
    .calculator-shell .col-xl-4 {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .hero-section,
    .dashboard-wrap,
    .auth-wrap {
        padding-bottom: 52px;
    }

    .hero-panel {
        min-height: auto;
        padding: 34px 24px;
    }

    .hero-panel .calculator-card {
        margin-top: 4px;
        padding: 18px;
    }

    .hero-panel .metric-row {
        margin-bottom: 8px;
        padding: 10px 12px;
    }

    .hero-panel .chart-bars {
        display: none;
    }

    .hero-panel h1 {
        font-size: clamp(40px, 11vw, 50px);
        line-height: 0.98;
    }

    .hero-panel .lead {
        font-size: 16px;
        margin-top: 18px;
    }

    .split-section h2 {
        font-size: clamp(34px, 10vw, 48px);
    }

    .section-heading h2,
    .pricing-copy h2 {
        font-size: clamp(34px, 10vw, 48px);
        line-height: 1;
    }

    .monthly-table-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-overview-grid {
        grid-template-columns: 1fr;
    }

    .overview-card,
    .overview-card-primary,
    .overview-card-summary,
    .overview-card-cta,
    .overview-card-small {
        grid-column: auto;
        min-height: 0;
    }

    .overview-card-primary strong {
        font-size: clamp(42px, 15vw, 64px);
    }

    .dashboard-side-stack {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .owner-signal-grid {
        grid-template-columns: 1fr;
    }

    .map-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .feature-card,
    .process-card,
    .impact-card,
    .app-card,
    .dashboard-card-body,
    .stat-card,
    .empty-state,
    .cta-card,
    .auth-card,
    .table-preview,
    .calculator-section,
    .calculator-preview,
    .calculator-card-panel {
        padding: 22px;
    }

    .calculator-workspace {
        padding: 8px;
    }

    .calculator-tabs {
        grid-template-columns: 1fr 1fr;
    }

    .calculator-tab {
        align-items: center;
        background: var(--paper);
        border: 1px solid var(--line);
        display: flex;
        justify-content: flex-start;
        min-height: 54px;
        padding: 10px;
    }

    .calculator-tab span {
        flex: 0 0 34px;
        height: 34px;
        width: 34px;
    }

    .calculator-tab strong {
        text-align: left;
    }

    .calculator-tab.active {
        border-color: var(--ink);
    }

    .calculator-tab.complete {
        background: rgba(217, 242, 234, 0.52);
        border-color: var(--green);
    }

    .free-calculator-tabs {
        grid-template-columns: 1fr 1fr;
    }

    .free-calculator-tabs::before {
        display: none;
    }

    .free-calculator-tabs button {
        align-items: center;
        background: var(--paper);
        border: 1px solid var(--line);
        display: flex;
        justify-content: flex-start;
        min-height: 54px;
        padding: 10px;
    }

    .free-calculator-tabs button span {
        flex: 0 0 34px;
        height: 34px;
        width: 34px;
    }

    .free-calculator-tabs button strong {
        text-align: left;
    }

    .free-calculator-tabs button.active {
        border-color: var(--ink);
    }

    .free-calculator-tabs button.complete {
        background: rgba(217, 242, 234, 0.52);
        border-color: var(--green);
    }

    .free-calculator-grid {
        padding: 18px;
    }

    .free-calculator-fields,
    .free-calculator-results {
        padding: 20px;
    }

    .free-calculator-actions {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
    }

    .calculator-actions {
        flex-direction: column;
        margin: 0 -8px -8px;
    }

    .section-title,
    .summary-list div,
    .calculator-section-head,
    .danger-zone {
        align-items: flex-start;
        flex-direction: column;
    }

    .turnover-chart {
        grid-template-columns: 1fr;
    }

    .chart-axis {
        display: none;
    }

    .table-actions {
        justify-content: flex-start;
    }

    .calculator-section-head {
        display: flex;
    }

    .summary-list div {
        gap: 4px;
    }

    .summary-list dd {
        text-align: left;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-legal {
        padding-top: 28px;
    }
}
