.fc-calc {
    width: min(calc(100% - 40px), 1180px);
    margin: 0 auto;
    padding: 72px 0 96px;
    color: var(--fc-text, #111827);
}

.fc-calc__intro {
    max-width: 760px;
    margin-bottom: 38px;
}

.fc-calc__eyebrow,
.fc-calc__chart-kicker,
.fc-calc__verdict-label {
    display: block;
    margin: 0 0 8px;
    color: var(--fc-muted, #667085);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fc-calc__intro h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1;
    letter-spacing: -.05em;
}

.fc-calc__lead {
    max-width: 700px;
    margin: 18px 0 0;
    color: var(--fc-muted, #667085);
    font-size: 18px;
}

.fc-calc__layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.fc-calc__controls,
.fc-calc__results > * {
    border: 1px solid var(--fc-border, rgba(17,24,39,.09));
    background: var(--fc-surface, #fff);
    box-shadow: 0 12px 36px rgba(17, 24, 39, .045);
}

.fc-calc__controls {
    position: sticky;
    top: 94px;
    padding: 22px;
    border-radius: 18px;
}

.fc-calc__mode {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--fc-accent-soft, rgba(169,120,47,.09));
    color: var(--fc-accent-strong, #8b6226);
    font-size: 12px;
    font-weight: 720;
}

.fc-calc__mode-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.fc-field {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
    color: var(--fc-muted, #667085);
    font-size: 13px;
    font-weight: 650;
}

.fc-field__control {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--fc-border-strong, rgba(17,24,39,.15));
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.fc-field__control:focus-within {
    border-color: rgba(22, 50, 79, .42);
    box-shadow: 0 0 0 3px rgba(22, 50, 79, .07);
}

.fc-field input,
.fc-field select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 11px 12px;
    background: transparent;
    color: var(--fc-text, #111827);
    font-weight: 700;
}

.fc-field select {
    appearance: none;
    cursor: pointer;
}

.fc-field__prefix {
    padding-left: 12px;
    color: var(--fc-muted, #667085);
}

.fc-field__prefix + input {
    padding-left: 0;
}

.fc-field__suffix {
    padding-right: 12px;
    color: var(--fc-subtle, #98a2b3);
    white-space: nowrap;
    font-weight: 600;
}

.fc-calc__share {
    width: 100%;
    min-height: 44px;
    margin-top: 4px;
    border: 1px solid var(--fc-border-strong, rgba(17,24,39,.15));
    border-radius: 999px;
    background: var(--fc-navy, #16324f);
    color: #fff;
    font-weight: 720;
    cursor: pointer;
}

.fc-calc__share-status {
    min-height: 18px;
    margin: 7px 0 0;
    color: var(--fc-muted, #667085);
    text-align: center;
    font-size: 11px;
}

.fc-calc__results {
    display: grid;
    gap: 18px;
}

.fc-calc__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 18px;
    overflow: hidden;
}

.fc-stat {
    padding: 22px;
    border-left: 1px solid var(--fc-border, rgba(17,24,39,.09));
}

.fc-stat:first-child {
    border-left: 0;
}

.fc-stat span {
    display: block;
    margin-bottom: 8px;
    color: var(--fc-muted, #667085);
    font-size: 12px;
}

.fc-stat strong {
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -.04em;
}

.fc-stat--primary {
    background: linear-gradient(145deg, #fffaf2, #fff);
}

.fc-calc__verdict {
    padding: 22px 24px;
    border-radius: 18px;
}

.fc-calc__verdict strong {
    display: block;
    margin: 0 0 4px;
    font-size: 23px;
    letter-spacing: -.025em;
}

.fc-calc__verdict p {
    margin: 0;
    color: var(--fc-muted, #667085);
    font-size: 14px;
}

.fc-calc__chart-card {
    padding: 22px 24px 18px;
    border-radius: 18px;
}

.fc-calc__chart-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.fc-calc__chart-head strong {
    font-size: 18px;
}

.fc-calc__legend {
    display: flex;
    gap: 16px;
    color: var(--fc-muted, #667085);
    font-size: 12px;
}

.fc-calc__legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.fc-calc__legend-line {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--fc-accent, #a9782f);
}

.fc-calc__legend-line--dca {
    background: #718096;
}

.fc-calc__chart-wrap {
    min-width: 0;
}

.fc-calc__chart {
    display: block;
    width: 100%;
    min-height: 260px;
    overflow: visible;
}

.fc-calc__grid line {
    stroke: var(--fc-border, rgba(17,24,39,.09));
    stroke-width: 1;
}

.fc-calc__line {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fc-calc__line--lump {
    stroke: var(--fc-accent, #a9782f);
}

.fc-calc__line--dca {
    stroke: #718096;
    stroke-width: 3;
    stroke-dasharray: 8 8;
}

.fc-calc__axis {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--fc-subtle, #98a2b3);
    font-size: 11px;
}

.fc-calc__details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 18px;
    overflow: hidden;
}

.fc-calc__details > div {
    padding: 20px 22px;
    border-left: 1px solid var(--fc-border, rgba(17,24,39,.09));
}

.fc-calc__details > div:first-child {
    border-left: 0;
}

.fc-calc__details span {
    display: block;
    margin-bottom: 5px;
    color: var(--fc-muted, #667085);
    font-size: 12px;
}

.fc-calc__details strong {
    font-size: 18px;
}

.fc-calc__method {
    padding: 24px;
    border-radius: 18px;
    background: #fbfcfd !important;
}

.fc-calc__method > strong {
    display: block;
    margin-bottom: 7px;
}

.fc-calc__method p {
    margin: 8px 0 0;
    color: var(--fc-muted, #667085);
    font-size: 13px;
}

@media (max-width: 900px) {
    .fc-calc__layout {
        grid-template-columns: 1fr;
    }

    .fc-calc__controls {
        position: static;
    }
}

@media (max-width: 680px) {
    .fc-calc {
        width: min(calc(100% - 28px), 1180px);
        padding-top: 52px;
    }

    .fc-calc__summary,
    .fc-calc__details {
        grid-template-columns: 1fr;
    }

    .fc-stat,
    .fc-calc__details > div {
        border-left: 0;
        border-top: 1px solid var(--fc-border, rgba(17,24,39,.09));
    }

    .fc-stat:first-child,
    .fc-calc__details > div:first-child {
        border-top: 0;
    }

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

    .fc-calc__legend {
        flex-wrap: wrap;
    }

    .fc-calc__chart {
        min-height: 210px;
    }
}


.fc-tool-page {
    min-height: 100vh;
}

.fc-tool-page__shell {
    width: min(calc(100% - 40px), 1180px);
    margin: 0 auto;
}

.fc-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 28px;
    color: var(--fc-subtle, #98a2b3);
    font-size: 12px;
}

.fc-breadcrumbs a {
    color: var(--fc-muted, #667085);
}

.fc-breadcrumbs a:hover {
    color: var(--fc-text, #111827);
}

.fc-seo-section {
    padding: 76px 0;
    border-top: 1px solid var(--fc-border, rgba(17,24,39,.09));
}

.fc-seo-section--soft {
    background: rgba(255, 255, 255, .52);
}

.fc-seo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px;
}

.fc-seo-grid article,
.fc-seo-heading {
    max-width: 720px;
}

.fc-seo-kicker {
    margin: 0 0 10px;
    color: var(--fc-accent-strong, #8b6226);
    font-size: 12px;
    font-weight: 760;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fc-seo-section h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.06;
    letter-spacing: -.04em;
}

.fc-seo-section p {
    margin: 14px 0 0;
    color: var(--fc-muted, #667085);
}

.fc-seo-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.fc-seo-points > div {
    padding: 20px;
    border: 1px solid var(--fc-border, rgba(17,24,39,.09));
    border-radius: 14px;
    background: #fff;
}

.fc-seo-points strong,
.fc-seo-points span {
    display: block;
}

.fc-seo-points strong {
    margin-bottom: 5px;
}

.fc-seo-points span {
    color: var(--fc-muted, #667085);
    font-size: 13px;
}

.fc-seo-note {
    align-self: start;
    padding: 24px;
    border: 1px solid rgba(169, 120, 47, .2);
    border-radius: 16px;
    background: linear-gradient(145deg, #fffaf2, #fff);
}

.fc-seo-note strong {
    font-size: 15px;
}

.fc-faq {
    display: grid;
    gap: 10px;
    margin-top: 30px;
}

.fc-faq details {
    border: 1px solid var(--fc-border, rgba(17,24,39,.09));
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.fc-faq summary {
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 700;
}

.fc-faq details p {
    margin: 0;
    padding: 0 20px 18px;
    font-size: 14px;
}

.fc-next-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.fc-next-tools > div {
    max-width: 720px;
}

@media (max-width: 800px) {
    .fc-seo-grid,
    .fc-seo-points {
        grid-template-columns: 1fr;
    }

    .fc-next-tools {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    .fc-tool-page__shell {
        width: min(calc(100% - 28px), 1180px);
    }

    .fc-seo-section {
        padding: 56px 0;
    }
}


.fc-formula-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 30px;
}

.fc-formula-grid > div {
    padding: 20px;
    border: 1px solid var(--fc-border, rgba(17,24,39,.09));
    border-radius: 14px;
    background: #fff;
}

.fc-formula-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--fc-muted, #667085);
    font-size: 12px;
    font-weight: 700;
}

.fc-formula-grid code {
    display: block;
    overflow-wrap: anywhere;
    color: var(--fc-text, #111827);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
}

@media (max-width: 680px) {
    .fc-formula-grid {
        grid-template-columns: 1fr;
    }
}


/* Historical development mode */
.fc-calc__mode-switch {
    display: inline-flex;
    gap: 4px;
    margin: 0 0 24px;
    padding: 4px;
    border: 1px solid var(--fc-border, rgba(17,24,39,.09));
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(17,24,39,.04);
}

.fc-calc__mode-switch button {
    min-height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--fc-muted, #667085);
    font: inherit;
    font-size: 13px;
    font-weight: 720;
    cursor: pointer;
}

.fc-calc__mode-switch button.is-active {
    background: var(--fc-navy, #16324f);
    color: #fff;
}

.fc-calc__mode--development {
    background: rgba(22, 50, 79, .08);
    color: var(--fc-navy, #16324f);
}

.fc-calc__dev-warning {
    display: grid;
    gap: 3px;
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid rgba(169,120,47,.22);
    border-radius: 12px;
    background: #fffaf2;
}

.fc-calc__dev-warning strong {
    color: var(--fc-accent-strong, #8b6226);
    font-size: 12px;
}

.fc-calc__dev-warning span {
    color: var(--fc-muted, #667085);
    font-size: 11px;
    line-height: 1.45;
}

.fc-field__control--disabled {
    background: #f6f7f8;
}

.fc-field__control--disabled input {
    color: var(--fc-muted, #667085);
    cursor: not-allowed;
}

.fc-calc__chart-head small {
    display: block;
    margin-top: 4px;
    color: var(--fc-subtle, #98a2b3);
    font-size: 11px;
    font-weight: 600;
}

.fc-calc__history-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--fc-border, rgba(17,24,39,.09));
    border-radius: 18px;
    background: var(--fc-surface, #fff);
    box-shadow: 0 12px 36px rgba(17,24,39,.045);
    overflow: hidden;
}

.fc-calc__history-values > div {
    padding: 20px 22px;
    border-top: 1px solid var(--fc-border, rgba(17,24,39,.09));
    border-left: 1px solid var(--fc-border, rgba(17,24,39,.09));
}

.fc-calc__history-values > div:nth-child(-n+2) {
    border-top: 0;
}

.fc-calc__history-values > div:nth-child(odd) {
    border-left: 0;
}

.fc-calc__history-values span,
.fc-calc__history-values strong {
    display: block;
}

.fc-calc__history-values span {
    margin-bottom: 5px;
    color: var(--fc-muted, #667085);
    font-size: 12px;
}

.fc-calc__history-values strong {
    font-size: 16px;
    line-height: 1.35;
}

.fc-calc__method--development {
    border-color: rgba(22, 50, 79, .14) !important;
    background: #f7f9fb !important;
}

[data-mode-panel][hidden] {
    display: none !important;
}

@media (max-width: 680px) {
    .fc-calc__mode-switch {
        width: 100%;
    }

    .fc-calc__mode-switch button {
        flex: 1;
        padding-inline: 10px;
        font-size: 12px;
    }

    .fc-calc__history-values {
        grid-template-columns: 1fr;
    }

    .fc-calc__history-values > div,
    .fc-calc__history-values > div:nth-child(-n+2),
    .fc-calc__history-values > div:nth-child(odd) {
        border-left: 0;
        border-top: 1px solid var(--fc-border, rgba(17,24,39,.09));
    }

    .fc-calc__history-values > div:first-child {
        border-top: 0;
    }
}
