/* Titan germanium pro forma */

.titan-page {
    padding: 0;
    --titan-blue: #245f8f;
    --titan-green: #15803d;
    --titan-gold: #b7791f;
    --titan-red: #b42318;
    --titan-cyan: #0e7490;
    --titan-ink-soft: color-mix(in srgb, var(--fg) 72%, var(--muted));
    --titan-surface: color-mix(in srgb, var(--fg) 4%, var(--bg));
    --titan-surface-strong: color-mix(in srgb, var(--fg) 7%, var(--bg));
    --titan-border: color-mix(in srgb, var(--fg) 11%, var(--border));
    --titan-shadow: 0 0.65rem 1.8rem rgba(15, 23, 42, 0.06);
}

.titan-page .ev-header,
.titan-page .ev-main {
    box-sizing: border-box;
    width: min(100%, 1320px);
    max-width: none;
    padding-left: clamp(1rem, 2.8vw, 2rem);
    padding-right: clamp(1rem, 2.8vw, 2rem);
}

.titan-kicker {
    margin-top: 1rem;
    color: var(--titan-blue);
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.titan-header h1 {
    max-width: 18ch;
}

.titan-section {
    margin-top: clamp(3.2rem, 6vw, 5rem);
}

.titan-lead-section {
    margin-top: clamp(2.2rem, 4vw, 3.2rem);
}

.titan-section-header {
    display: grid;
    gap: 0.35rem;
    max-width: 84ch;
    margin-bottom: 1.2rem;
}

.titan-section-header-with-action {
    grid-template-columns: minmax(0, 84ch) auto;
    max-width: none;
    gap: 1rem;
    align-items: end;
}

.titan-section-header-copy {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.titan-section-step {
    color: var(--titan-blue);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.titan-page .ev-section-title {
    margin: 0;
    padding: 0;
    border-bottom: 0;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.2;
}

.titan-section-copy {
    max-width: 80ch;
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.titan-development-grid,
.titan-executive-grid,
.titan-model-layout,
.titan-method-grid,
.titan-source-grid {
    display: grid;
    gap: clamp(1rem, 1.8vw, 1.35rem);
    align-items: start;
}

.titan-development-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.titan-executive-grid,
.titan-model-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
    margin-top: 1.1rem;
}

.titan-method-grid,
.titan-source-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.titan-development-card,
.titan-summary-panel,
.titan-chart-card,
.titan-output-panel,
.titan-assumptions,
.titan-method-panel,
.titan-source-panel {
    border: 1px solid var(--titan-border);
    border-radius: 8px;
    background: var(--titan-surface);
    box-shadow: var(--titan-shadow);
}

.titan-development-card,
.titan-summary-panel,
.titan-output-panel,
.titan-method-panel,
.titan-source-panel {
    padding: 1.15rem 1.2rem;
}

.titan-card-date {
    color: var(--titan-blue);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.titan-development-card h3,
.titan-summary-panel h3,
.titan-output-panel h3,
.titan-method-panel h3,
.titan-source-panel h3 {
    margin-top: 0.25rem;
    font-size: 1rem;
    font-weight: 700;
}

.titan-development-card p:not(.titan-card-date),
.titan-summary-panel p,
.titan-risk-panel li,
.titan-method-panel p,
.titan-source-panel li {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.titan-development-card p:not(.titan-card-date),
.titan-method-panel p {
    margin-top: 0.45rem;
}

.titan-development-card a,
.titan-source-panel a {
    display: inline-block;
    margin-top: 0.8rem;
    font-size: 0.88rem;
    font-weight: 650;
}

.titan-source-panel li a {
    margin-top: 0;
}

.titan-source-panel ul,
.titan-risk-panel ul {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.65rem;
    list-style: none;
}

.titan-cards {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(0.75rem, 1.35vw, 1rem);
    margin-top: 1.5rem;
}

.titan-cards .ev-card {
    min-height: 8.2rem;
    padding: 1.05rem 1.1rem;
    border-color: var(--titan-border);
    background: color-mix(in srgb, var(--fg) 3%, var(--bg));
    box-shadow: var(--titan-shadow);
}

.titan-cards .ev-card-value {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    letter-spacing: 0;
}

.titan-cards .ev-card-detail {
    line-height: 1.4;
}

.titan-summary-panel {
    min-height: 100%;
}

.titan-summary-panel strong {
    color: var(--fg);
}

.titan-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.titan-pill {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--titan-border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--titan-ink-soft);
    font-size: 0.8rem;
    font-weight: 650;
}

.titan-chart-card {
    overflow: hidden;
}

.titan-card-head {
    padding: 1.2rem 1.35rem 0.5rem;
}

.titan-card-head-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: start;
    justify-content: space-between;
}

.titan-card-head h3 {
    font-size: 1rem;
    font-weight: 700;
}

.titan-card-head p {
    margin-top: 0.2rem;
    max-width: 72ch;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.titan-scenario-readout {
    padding: 0.42rem 0.65rem;
    border: 1px solid var(--titan-border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--titan-blue);
    font-size: 0.78rem;
    font-weight: 800;
}

.titan-download-button {
    display: inline-flex;
    min-height: 2.55rem;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.85rem;
    border: 1px solid color-mix(in srgb, var(--titan-blue) 38%, var(--titan-border));
    border-radius: 8px;
    background: var(--titan-blue);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    box-shadow: var(--titan-shadow);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.titan-download-button:hover,
.titan-download-button:focus-visible {
    background: color-mix(in srgb, var(--titan-blue) 86%, var(--fg));
    border-color: var(--titan-blue);
    color: #fff;
    transform: translateY(-1px);
}

.titan-waterfall {
    display: grid;
    gap: 0.75rem;
    padding: 0.95rem 1.35rem 1.35rem;
}

.titan-waterfall-row {
    display: grid;
    grid-template-columns: minmax(9rem, 0.28fr) minmax(0, 1fr) minmax(6.5rem, auto);
    gap: 0.85rem;
    align-items: center;
    color: var(--muted);
    font-size: 0.87rem;
}

.titan-waterfall-label {
    min-width: 0;
}

.titan-waterfall-label strong {
    display: block;
    color: var(--fg);
    font-size: 0.9rem;
    line-height: 1.25;
}

.titan-waterfall-label span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

.titan-waterfall-track {
    height: 0.85rem;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--fg) 8%, var(--bg));
}

.titan-waterfall-fill {
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: var(--titan-cyan);
}

.titan-waterfall-fill.is-cost {
    background: var(--titan-red);
}

.titan-waterfall-fill.is-total {
    background: var(--titan-green);
}

.titan-waterfall-value {
    text-align: right;
    color: var(--fg);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.titan-waterfall-row.is-total {
    margin-top: 0.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--titan-border);
}

.titan-side-panel {
    display: grid;
    gap: 1rem;
}

.titan-output-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.85rem;
}

.titan-output-row {
    display: grid;
    gap: 0.15rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--titan-border);
}

.titan-output-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.titan-output-value {
    color: var(--fg);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.titan-output-label {
    color: var(--muted);
    font-size: 0.82rem;
}

.titan-assumptions {
    overflow: hidden;
}

.titan-assumptions summary {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 800;
}

.titan-assumptions summary span:last-child {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.titan-scenarios {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0 1.15rem 1rem;
}

.titan-scenarios button,
.titan-segmented button {
    border: 1px solid var(--titan-border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--fg) 4%, var(--bg));
    color: var(--fg);
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 750;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.titan-scenarios button {
    padding: 0.62rem 0.5rem;
}

.titan-scenarios button:hover,
.titan-segmented button:hover {
    background: var(--titan-surface-strong);
}

.titan-scenarios button.active,
.titan-segmented button.active {
    background: var(--fg);
    color: var(--bg);
}

.titan-control-groups {
    display: grid;
    gap: 1rem;
    padding: 0 1.15rem 1.15rem;
}

.titan-control-group {
    display: grid;
    gap: 0.55rem;
    padding-top: 1rem;
    border-top: 1px solid var(--titan-border);
}

.titan-control-group h4 {
    color: var(--titan-blue);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.titan-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(4.8rem, auto);
    gap: 0.55rem 0.8rem;
    align-items: center;
}

.titan-control label {
    color: var(--titan-ink-soft);
    font-size: 0.86rem;
    font-weight: 650;
}

.titan-control-value {
    text-align: right;
    color: var(--fg);
    font-size: 0.82rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.titan-control input[type="range"] {
    grid-column: 1 / -1;
    width: 100%;
    accent-color: var(--titan-blue);
}

.titan-segmented {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--titan-border);
    border-radius: 8px;
}

.titan-segmented button {
    border: 0;
    border-radius: 0;
    padding: 0.55rem 0.7rem;
}

.titan-table-wrap {
    overflow-x: auto;
    padding: 0.8rem 1.35rem 1.35rem;
}

.titan-sensitivity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.titan-sensitivity-table th,
.titan-sensitivity-table td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--titan-border);
    text-align: right;
    white-space: nowrap;
}

.titan-sensitivity-table th:first-child,
.titan-sensitivity-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--titan-surface);
    text-align: left;
}

.titan-sensitivity-table th {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.titan-sensitivity-table td {
    color: var(--fg);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.titan-sensitivity-table .is-base-cell {
    background: color-mix(in srgb, var(--titan-green) 13%, var(--bg));
    color: var(--fg);
}

.titan-method-panel,
.titan-source-panel {
    min-height: 100%;
}

.titan-footer {
    margin-top: 3rem;
    padding-bottom: 3rem;
    color: var(--muted);
    font-size: 0.86rem;
}

@media (max-width: 1120px) {
    .titan-development-grid,
    .titan-method-grid,
    .titan-source-grid,
    .titan-model-layout,
    .titan-executive-grid {
        grid-template-columns: 1fr;
    }

    .titan-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .titan-section-header-with-action {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .titan-download-button {
        width: 100%;
    }

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

    .titan-waterfall-row {
        grid-template-columns: minmax(0, 1fr) minmax(5.5rem, auto);
        gap: 0.45rem 0.75rem;
    }

    .titan-waterfall-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .titan-scenarios {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .titan-cards {
        grid-template-columns: 1fr;
    }

    .titan-card-head,
    .titan-table-wrap,
    .titan-waterfall {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
