@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/roboto-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    src: url('/fonts/roboto-bold.woff2') format('woff2');
}

:root {
    --ci-header: #1a2527;
    --ci-bg: #2b3e40;
    --ci-panel: #243537;
    --ci-panel-2: #1f2e30;
    --ci-border: rgba(255, 255, 255, 0.12);
    --ci-text: #ecf2f1;
    --ci-muted: #cfe3e0;
    --ci-line: rgba(255, 255, 255, 0.25);
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--ci-bg);
    color: var(--ci-text);
    display: flex;
    flex-direction: column;
}

.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: inherit;
}

.header-bar {
    background-color: var(--ci-header);
}

.header-bar__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header-bar__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.header-bar__brand img {
    height: 32px;
    width: auto;
}

.header-bar__nav {
    display: none;
    gap: 24px;
    font-size: 0.9rem;
    color: rgba(236, 242, 241, 0.8);
}

.header-bar__nav a {
    opacity: 0.8;
}

.header-bar__nav a:hover {
    opacity: 1;
}

@media (min-width: 640px) {
    .header-bar__nav {
        display: inline-flex;
    }
}

.ci-main {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    flex: 1;
}

.ci-intro {
    text-align: center;
    margin-bottom: 48px;
}

.ci-intro h1 {
    margin: 0;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
}

.ci-intro p {
    margin: 16px 0 0;
    color: var(--ci-muted);
    font-size: clamp(1rem, 2.4vw, 1.125rem);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

@media (min-width: 640px) {
    .summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.summary-card {
    padding: 24px;
    border-radius: 20px;
    text-align: center;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--ci-border);
}

.summary-card h3 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: var(--ci-muted);
    font-weight: 500;
}

.summary-card p {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    word-break: break-word;
}

.layout-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.layout-grid__controls,
.layout-grid__chart {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.layout-grid__chart {
    height: 100%;
}

@media (min-width: 1024px) {
    .layout-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 32px;
    }

    .layout-grid__controls {
        grid-column: span 2;
    }

    .layout-grid__chart {
        grid-column: span 3;
    }
}

.calc-panel {
    border-radius: 20px;
    padding: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
    border: 1px solid var(--ci-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.calc-panel__title {
    margin: 0 0 16px;
    padding-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    border-bottom: 1px solid var(--ci-border);
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.calc-form label {
    display: block;
    font-size: 0.95rem;
    color: var(--ci-muted);
    margin-bottom: 6px;
}

.ci-input {
    background-color: var(--ci-panel-2);
    border: 1px solid var(--ci-border);
    color: var(--ci-text);
    border-radius: 12px;
    padding: 12px;
    width: 100%;
    font-size: 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ci-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.ci-btn {
    background-color: var(--ci-header);
    color: var(--ci-text);
    font-weight: 700;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid var(--ci-border);
    font-size: 1.125rem;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.ci-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.ci-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.ci-btn--full {
    width: 100%;
}

.chart-card {
    border-radius: 20px;
    padding: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
    border: 1px solid var(--ci-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 100%;
    min-height: 320px;
}

@media (min-width: 768px) {
    .chart-card {
        min-height: 380px;
    }
}

.table-section {
    margin-top: 32px;
}

.table-card {
    border-radius: 20px;
    padding: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
    border: 1px solid var(--ci-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.table-card h2 {
    margin: 0 0 16px;
    font-size: 1.35rem;
    font-weight: 700;
}

.table-card p {
    margin: 0;
    color: var(--ci-muted);
}

.table-scroll {
    max-height: 390px;
    overflow-y: auto;
    overflow-x: auto;
}

.ci-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

.ci-table thead th {
    background-color: var(--ci-panel);
    color: var(--ci-muted);
    font-weight: 600;
    padding: 12px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.ci-table td {
    padding: 12px;
    border-bottom: 1px solid var(--ci-border);
}

.ci-table td:last-child,
.ci-table th:last-child {
    text-align: right;
}

.ci-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.ci-cell-right {
    text-align: right;
}

.ci-cell-highlight {
    color: #b6f0c6;
}

.ci-cell-strong {
    font-weight: 600;
}

.ci-cell-year {
    font-weight: 500;
}

@media (min-width: 768px) {
    .ci-main {
        padding: 48px 32px 80px;
    }

    .calc-panel,
    .chart-card,
    .table-card,
    .summary-card {
        padding: 28px 32px;
    }
}

@media (max-width: 480px) {
    .header-bar__inner {
        padding: 12px 16px;
    }

    .ci-main {
        padding: 28px 16px 60px;
    }
}
