/* ==========================================================================
   /take_calculation — калькулятор стоимости ошибки найма
   Визуальный язык сайта: PT Mono, #f5f5f5, чёрные рамки 2–3px, тёмные
   заголовки секций #3e3e3e, акцент #d5ffe3, тени 6px 6px 0 #000.
   ========================================================================== */

@font-face {
    font-family: 'Intro Demo Black Caps';
    src: url('/static/fonts/intro-demo-black-caps.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'PT Mono';
    src: url('/static/fonts/pt-mono_regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: #f5f5f5;
    color: #111;
    font-family: 'PT Mono', monospace;
    line-height: 1.4;
    -webkit-text-size-adjust: 100%;
}

/* ── Шапка ─────────────────────────────────────────────────────────────── */
.tc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 24px;
    background: #fff;
    border-bottom: 3px solid #000;
}
.tc-logo { display: block; line-height: 0; }
.tc-logo img { display: block; height: 30px; width: auto; }
.tc-nav {
    display: flex;
    align-items: center;
    gap: 8px 18px;
    flex-wrap: wrap;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.tc-nav a { color: #555; text-decoration: none; }
.tc-nav a:hover { color: #000; }
.tc-nav-btn {
    border: 2px solid #000;
    padding: 5px 12px;
    color: #000 !important;
    background: #d5ffe3;
}
.tc-nav-btn:hover { background: #000; color: #d5ffe3 !important; }

/* ── Каркас ────────────────────────────────────────────────────────────── */
.tc-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px 72px;
}

/* ── Заголовок страницы ────────────────────────────────────────────────── */
.tc-hero { margin-bottom: 28px; }
.tc-eyebrow {
    margin: 0 0 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #888;
}
.tc-h1 {
    margin: 0 0 14px;
    font-size: clamp(26px, 4.4vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}
.tc-lead {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
}
.tc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tc-badges li {
    border: 2px solid #000;
    background: #fff;
    padding: 4px 10px;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #333;
}
.tc-badges li::before { content: '■ '; color: #2a6e2a; }

/* ── Сетка: форма + результаты ─────────────────────────────────────────── */
.tc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 28px;
    align-items: start;
}

/* ── Блоки формы ───────────────────────────────────────────────────────── */
.tc-block {
    margin-bottom: 14px;
    background: #fff;
    border: 2px solid #3e3e3e;
}
.tc-block-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 18px;
    background: #3e3e3e;
    color: #fff;
}
.tc-block-num {
    flex-shrink: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    color: #d5ffe3;
}
.tc-block-title {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.tc-block-body { padding: 18px 20px 6px; }

/* ── Пресеты роли ──────────────────────────────────────────────────────── */
.tc-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.tc-preset {
    font-family: 'PT Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 7px 12px;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    cursor: pointer;
}
.tc-preset:hover { background: #f0f0f0; }
.tc-preset.is-active { background: #000; color: #d5ffe3; }

/* ── Поля ──────────────────────────────────────────────────────────────── */
.tc-field { margin-bottom: 18px; }
.tc-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.tc-field label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #222;
}
.tc-num {
    display: flex;
    align-items: stretch;
    border: 2px solid #000;
    background: #fff;
}
.tc-num input {
    width: 118px;
    padding: 6px 8px;
    border: 0;
    background: transparent;
    font-family: 'PT Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    color: #000;
    outline: none;
    -moz-appearance: textfield;
}
.tc-num input::-webkit-outer-spin-button,
.tc-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tc-num input:focus { background: #f7fff9; }
.tc-num .tc-unit {
    display: flex;
    align-items: center;
    padding: 0 8px;
    border-left: 2px solid #000;
    background: #f0f0f0;
    font-size: 11px;
    color: #444;
    white-space: nowrap;
}
.tc-num .tc-unit--w { padding: 0 10px; }

/* Ползунок */
.tc-range {
    display: block;
    width: 100%;
    height: 22px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.tc-range::-webkit-slider-runnable-track {
    height: 6px;
    background: #fff;
    border: 2px solid #000;
}
.tc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -8px;
    background: #d5ffe3;
    border: 2px solid #000;
    border-radius: 0;
}
.tc-range:focus-visible::-webkit-slider-thumb { background: #000; }
.tc-range::-moz-range-track {
    height: 6px;
    background: #fff;
    border: 2px solid #000;
}
.tc-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #d5ffe3;
    border: 2px solid #000;
    border-radius: 0;
}

.tc-hint {
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.55;
    color: #777;
}

/* ── Действия формы ────────────────────────────────────────────────────── */
.tc-form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 4px 0 0;
}
.tc-reset {
    font-family: 'PT Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 14px;
    border: 2px solid #000;
    background: #fff;
    cursor: pointer;
}
.tc-reset:hover { background: #000; color: #fff; }
.tc-form-note { font-size: 11px; color: #888; }

/* ── Правая колонка ────────────────────────────────────────────────────── */
.tc-side-inner { position: sticky; top: 18px; }

.tc-total {
    margin-bottom: 14px;
    padding: 20px 22px 18px;
    background: #000;
    border: 3px solid #000;
    box-shadow: 6px 6px 0 #d5ffe3;
    color: #fff;
}
.tc-total-label {
    margin: 0 0 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #bbb;
}
.tc-total-value {
    margin: 0 0 6px;
    font-size: clamp(30px, 4.4vw, 44px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -1px;
    color: #d5ffe3;
    overflow-wrap: anywhere;
}
.tc-total-value .tc-rub { font-size: 0.55em; letter-spacing: 0; }
.tc-total-sub {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #bbb;
}
.tc-total-sub b { color: #fff; font-weight: 700; }
.tc-total-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #333;
}
.tc-copy {
    font-family: 'PT Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 10px;
    border: 1px solid #555;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.tc-copy:hover { border-color: #d5ffe3; color: #d5ffe3; }

/* ── KPI ───────────────────────────────────────────────────────────────── */
.tc-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.tc-kpi {
    padding: 12px 12px 10px;
    background: #fff;
    border: 2px solid #000;
    box-shadow: 3px 3px 0 #000;
}
.tc-kpi-label {
    margin: 0 0 6px;
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #777;
    line-height: 1.4;
}
.tc-kpi-value {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.3px;
    overflow-wrap: anywhere;
}
.tc-kpi-value small { font-size: 10px; color: #777; font-weight: 400; }

/* ── Детализация ───────────────────────────────────────────────────────── */
.tc-card {
    margin-bottom: 14px;
    background: #fff;
    border: 2px solid #000;
}
.tc-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 2px solid #000;
    background: #f0f0f0;
}
.tc-card-title {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.tc-card-note { font-size: 10px; color: #777; }
.tc-card-body { padding: 14px; }

.tc-bar-row { margin-bottom: 12px; }
.tc-bar-row:last-child { margin-bottom: 0; }
.tc-bar-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}
.tc-bar-name { font-size: 11px; letter-spacing: 0.3px; color: #333; }
.tc-bar-sum { font-size: 11px; font-weight: 700; white-space: nowrap; }
.tc-bar-track {
    position: relative;
    height: 10px;
    background: #eee;
    border: 1px solid #ccc;
    overflow: hidden;
}
.tc-bar-fill {
    height: 100%;
    width: 0;
    background: #3e3e3e;
    transition: width 0.18s ease-out;
}
.tc-bar-row--indirect .tc-bar-fill { background: #8a8a8a; }
.tc-bar-row--total .tc-bar-fill { background: #2a6e2a; }
.tc-bar-row--total .tc-bar-name { font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.tc-bar-pct { color: #888; font-size: 10px; }

/* ── Сценарии ──────────────────────────────────────────────────────────── */
.tc-scenarios { margin-bottom: 14px; }
.tc-scenario-control { margin-bottom: 12px; }
.tc-scenario-control .tc-field-head { margin-bottom: 6px; }
.tc-scenario-control .tc-field label { font-size: 11px; letter-spacing: 0.5px; }
.tc-scenario-control .tc-num input { width: 76px; }
.tc-table-wrap { overflow-x: auto; }
.tc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
    white-space: nowrap;
}
.tc-table th {
    padding: 7px 8px;
    background: #000;
    color: #d5ffe3;
    font-weight: 400;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 9px;
}
.tc-table th:first-child,
.tc-table td:first-child { text-align: left; }
.tc-table td {
    padding: 7px 8px;
    border-top: 1px solid #ddd;
    text-align: right;
}
.tc-table tr.is-base td { background: #f5f5f5; font-weight: 700; }
.tc-table tr.is-target td { background: #d5ffe3; font-weight: 700; }

/* ── Мини-CTA ──────────────────────────────────────────────────────────── */
.tc-cta-mini {
    padding: 16px;
    background: #fff;
    border: 2px solid #000;
    box-shadow: 4px 4px 0 #000;
}
.tc-cta-mini p {
    margin: 0 0 10px;
    font-size: 11px;
    line-height: 1.6;
    color: #444;
}
.tc-btn {
    display: inline-block;
    padding: 9px 16px;
    border: 2px solid #000;
    background: #d5ffe3;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}
.tc-btn:hover { background: #000; color: #d5ffe3; }
.tc-btn--block { display: block; text-align: center; }

/* ── Пояснения ─────────────────────────────────────────────────────────── */
.tc-explain { margin-top: 48px; }
.tc-section-title {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid #000;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.tc-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.tc-info-card {
    padding: 16px;
    background: #fff;
    border: 2px solid #3e3e3e;
}
.tc-info-card h3 {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.tc-info-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
    color: #333;
}

.tc-details {
    margin-bottom: 10px;
    background: #fff;
    border: 2px solid #000;
}
.tc-details summary {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.tc-details summary::-webkit-details-marker { display: none; }
.tc-details summary::after { content: '+'; font-size: 15px; line-height: 1; }
.tc-details[open] summary::after { content: '−'; }
.tc-details-body {
    padding: 0 16px 16px;
    font-size: 12px;
    line-height: 1.7;
    color: #333;
}
.tc-details-body p { margin: 0 0 10px; }
.tc-details-body p:last-child { margin-bottom: 0; }
.tc-details-body ul { margin: 0 0 10px; padding-left: 18px; }
.tc-details-body li { margin-bottom: 5px; }
.tc-formula {
    display: block;
    margin: 10px 0;
    padding: 12px 14px;
    background: #f5f5f5;
    border-left: 4px solid #3e3e3e;
    font-family: 'PT Mono', monospace;
    font-size: 11.5px;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ── Финальный CTA ─────────────────────────────────────────────────────── */
.tc-cta {
    margin-top: 32px;
    padding: 28px 24px;
    background: #000;
    border: 3px solid #000;
    color: #fff;
}
.tc-cta h2 {
    margin: 0 0 10px;
    font-size: clamp(18px, 3vw, 26px);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}
.tc-cta p {
    max-width: 720px;
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.7;
    color: #bbb;
}
.tc-cta-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.tc-cta .tc-btn--ghost {
    background: transparent;
    color: #fff;
    border-color: #555;
}
.tc-cta .tc-btn--ghost:hover { border-color: #d5ffe3; color: #d5ffe3; background: transparent; }

.tc-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 20px;
    padding: 18px 24px 28px;
    border-top: 3px solid #000;
    font-size: 11px;
    color: #777;
}
.tc-foot a { color: #555; text-decoration: none; }
.tc-foot a:hover { color: #000; text-decoration: underline; }

/* ── Мобильная плашка с итогом ─────────────────────────────────────────── */
.tc-mobile-bar { display: none; }

/* ── Адаптив ───────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
    .tc-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .tc-side-inner { position: static; }
    body { padding-bottom: 64px; }
    .tc-mobile-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        padding: 12px 16px;
        background: #000;
        border-top: 3px solid #d5ffe3;
        color: #fff;
        text-decoration: none;
    }
    .tc-mobile-bar-label {
        font-size: 10px;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: #bbb;
    }
    .tc-mobile-bar-value {
        margin-left: auto;
        font-size: 18px;
        font-weight: 700;
        color: #d5ffe3;
        white-space: nowrap;
    }
    .tc-mobile-bar-arrow { font-size: 14px; color: #d5ffe3; }
}
@media (max-width: 640px) {
    .tc-head { padding: 12px 16px; }
    .tc-nav { gap: 6px 12px; font-size: 11px; letter-spacing: 0.5px; }
    .tc-nav a:not(.tc-nav-btn) { display: none; }
    .tc-main { padding: 24px 14px 48px; }
    .tc-h1 { font-size: 26px; }
    .tc-lead { font-size: 13px; }
    .tc-block-body { padding: 14px 14px 2px; }
    .tc-field-head { align-items: flex-start; flex-direction: column; gap: 6px; }
    .tc-num { width: 100%; }
    .tc-num input { flex: 1; width: auto; text-align: left; }
    .tc-kpis { grid-template-columns: 1fr; }
    .tc-total { padding: 18px 16px; box-shadow: 4px 4px 0 #d5ffe3; }
    .tc-cta { padding: 22px 16px; }
    .tc-cta-buttons { flex-direction: column; }
    .tc-cta .tc-btn { text-align: center; }
    .tc-foot { padding: 16px 16px 24px; }
}
