/* ============================================================
   Справочник комиссий маркетплейсов (публичные SEO-страницы).
   Канон OneFill: без solid-обводок и теней, иерархия — фоном.
   ============================================================ */

.tf-page {
    padding: clamp(24px, 3vw, 44px);
    max-width: 1180px;
}

/* ── Hero ── */
.tf-hero {
    margin-bottom: clamp(24px, 3vw, 36px);
    max-width: 78ch;
}

.tf-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94A3B8;
    margin: 0 0 14px;
}

.tf-hero h1 {
    font-size: clamp(26px, 3.2vw, 40px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #0F172A;
    margin: 0 0 14px;
}

.tf-lead {
    font-size: clamp(15px, 1.1vw, 17px);
    line-height: 1.65;
    color: #64748B;
    margin: 0;
}

.tf-lead strong { color: #0F172A; font-weight: 600; }

/* ── Поиск ── */
.tf-search {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tf-search-input {
    flex: 1;
    min-width: 260px;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    background: #F1F5F9;
    font-size: 15px;
    font-weight: 500;
    color: #0F172A;
    font-family: inherit;
    caret-color: #2D5A66;
    outline: none;
    transition: background 0.18s ease;
    box-sizing: border-box;
}

.tf-search-input::placeholder { color: #94A3B8; font-weight: 400; }
.tf-search-input:hover { background: #E8EDF3; }
.tf-search-input:focus { background: #E2E8F0; }

.tf-search-result {
    font-size: 14px;
    color: #64748B;
    margin: 0 0 24px;
}

/* ── Кнопки ── */
.tf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.tf-btn--dark { background: #0F172A; color: #FFFFFF !important; }
.tf-btn--dark:hover { background: #1E293B; }
.tf-btn--ghost { background: transparent; color: #4A90A4 !important; font-weight: 500; }
.tf-btn--ghost:hover { background: rgba(74, 144, 164, 0.08); }
.tf-btn--light { background: #FFFFFF; color: #0F172A !important; }
.tf-btn--light:hover { background: #E2E8F0; }
.tf-btn--ghost-light { background: transparent; color: #7FB3C4 !important; font-weight: 500; }
.tf-btn--ghost-light:hover { background: rgba(127, 179, 196, 0.12); }

/* ── Блоки ── */
.tf-block { margin-bottom: clamp(32px, 4vw, 52px); }

.tf-block h2 {
    font-size: clamp(20px, 2.2vw, 27px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0F172A;
    margin: 0 0 8px;
}

.tf-block-sub, .tf-empty {
    font-size: 14px;
    line-height: 1.6;
    color: #64748B;
    margin: 0 0 18px;
}

.tf-explain p {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    margin: 0 0 14px;
    max-width: 80ch;
}

.tf-explain strong { color: #0F172A; font-weight: 600; }

/* ── Сетка категорий ── */
.tf-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.tf-cat-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #F8FAFC;
    border-radius: 14px;
    padding: 16px 18px;
    text-decoration: none !important;
    transition: background-color 0.15s ease;
}

.tf-cat-card:hover { background: #E8EDF3; }

.tf-cat-name {
    font-size: 14.5px;
    font-weight: 600;
    color: #0F172A;
    line-height: 1.35;
    letter-spacing: -0.005em;
}

.tf-cat-meta { font-size: 12.5px; color: #94A3B8; }

.tf-cat-rate {
    font-size: 12.5px;
    font-weight: 600;
    color: #2D5A66;
    font-variant-numeric: tabular-nums;
}

/* ── Найденные типы товаров ── */
.tf-types-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tf-type-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    background: #F8FAFC;
    border-radius: 12px;
    padding: 13px 16px;
    text-decoration: none !important;
    transition: background-color 0.15s ease;
}

.tf-type-row:hover { background: #E8EDF3; }

.tf-type-name { font-size: 14px; font-weight: 600; color: #0F172A; }
.tf-type-cat { font-size: 13px; color: #64748B; }

.tf-type-rate {
    font-size: 13px;
    font-weight: 700;
    color: #9C2727;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ── Ценовые диапазоны ── */
.tf-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 20px;
}

.tf-tier-chip {
    background: #F1F5F9;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    font-variant-numeric: tabular-nums;
}

/* ── Калькулятор ── */
.tf-calc {
    background: #F8FAFC;
    border-radius: 20px;
    padding: clamp(20px, 2.4vw, 32px);
    margin-bottom: clamp(32px, 4vw, 52px);
}

.tf-calc-head { margin-bottom: 18px; }

.tf-calc-head h2 {
    font-size: clamp(19px, 2vw, 24px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0F172A;
    margin: 0 0 6px;
}

.tf-calc-sub { margin: 0; font-size: 14px; line-height: 1.6; color: #64748B; }

.tf-calc-form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.tf-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.tf-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94A3B8;
    padding-left: 4px;
}

.tf-input {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    background: #FFFFFF;
    font-size: 15px;
    font-weight: 500;
    color: #0F172A;
    font-family: inherit;
    caret-color: #2D5A66;
    outline: none;
    transition: background 0.18s ease;
    box-sizing: border-box;
}

.tf-input:hover { background: #F1F5F9; }
.tf-input:focus { background: #E2E8F0; }
select.tf-input { cursor: pointer; }

.tf-calc-result {
    background: #0F172A;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tf-res-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.tf-res-label { font-size: 13.5px; color: #94A3B8; }

.tf-res-value {
    font-size: 15px;
    font-weight: 600;
    color: #E2E8F0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tf-res-row--minus .tf-res-value { color: #F0A0A0; }

.tf-res-divider { height: 1px; background: rgba(255, 255, 255, 0.12); }

.tf-res-row--total .tf-res-label { color: #FFFFFF; font-weight: 600; font-size: 14px; }

.tf-res-row--total .tf-res-value {
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 700;
    color: #7FB3C4;
}

.tf-calc-note {
    margin: 16px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: #64748B;
}

/* ── Таблица ставок ── */
.tf-table-wrap {
    background: #FFFFFF;
    border-radius: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tf-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.tf-th {
    padding: 16px 14px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    background: #F8FAFC;
}

.tf-th--num { text-align: right; }
.tf-th--name { min-width: 220px; }

.tf-tr { transition: background-color 0.12s ease; }
.tf-tr:hover { background: rgba(15, 23, 42, 0.02); }
.tf-tr td { border-bottom: 1px solid rgba(15, 23, 42, 0.04); }
.tf-tr:last-child td { border-bottom: none; }

.tf-td {
    padding: 13px 14px;
    font-size: 13.5px;
    color: #0F172A;
}

.tf-td--name { font-weight: 500; }

.tf-td--num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #475569;
    white-space: nowrap;
}

.tf-source {
    margin: 14px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: #94A3B8;
}

/* ── FAQ ── */
.tf-faq { display: flex; flex-direction: column; gap: 8px; }

.tf-faq-item {
    background: #F8FAFC;
    border-radius: 12px;
    overflow: hidden;
}

.tf-faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 15px 18px;
    font-size: 14.5px;
    font-weight: 600;
    color: #0F172A;
    transition: background-color 0.15s ease;
}

.tf-faq-item summary::-webkit-details-marker { display: none; }
.tf-faq-item summary:hover { background: #F1F5F9; }

.tf-faq-item p {
    margin: 0;
    padding: 0 18px 16px;
    font-size: 14px;
    line-height: 1.65;
    color: #475569;
}

/* ── Перелинковка ── */
.tf-sib-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tf-sib {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F1F5F9;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: #0F172A !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease;
}

.tf-sib:hover { background: #E2E8F0; }

.tf-sib-rate {
    font-size: 12px;
    font-weight: 600;
    color: #2D5A66;
    font-variant-numeric: tabular-nums;
}

.tf-all-link { margin: 16px 0 0; font-size: 14px; }
.tf-all-link a { color: #2D5A66; font-weight: 500; }

/* ── CTA ── */
.tf-cta {
    background: #0F172A;
    border-radius: 20px;
    padding: clamp(28px, 3.2vw, 44px);
}

.tf-cta-body { max-width: 68ch; }

.tf-cta h2 {
    font-size: clamp(21px, 2.4vw, 28px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    margin: 0 0 12px;
}

.tf-cta p {
    font-size: 14.5px;
    line-height: 1.65;
    color: #94A3B8;
    margin: 0 0 22px;
}

.tf-cta-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Мобильный ── */
@media (max-width: 768px) {
    .tf-calc-form { grid-template-columns: 1fr; }
    .tf-type-row { grid-template-columns: 1fr auto; }
    .tf-type-cat { display: none; }
    .tf-cat-grid { grid-template-columns: 1fr; }
}

/* ── Табы калькулятора ── */
.tf-tabs {
    display: inline-flex;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.tf-tab {
    padding: 10px 18px;
    border: none;
    border-radius: 9px;
    background: transparent;
    font-size: 13.5px;
    font-weight: 500;
    color: #475569;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.tf-tab:hover { background: #F1F5F9; }
.tf-tab.active { background: #0F172A; color: #FFFFFF; font-weight: 600; }

/* Сетка полей: авто-раскладка под 7 полей */
.tf-calc-form {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.tf-field--wide { grid-column: 1 / -1; }
.tf-field[hidden] { display: none; }

.tf-label-opt {
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: #CBD5E1;
}

/* Строки результата */
.tf-res-hint {
    font-size: 12px;
    font-weight: 600;
    color: #7FB3C4;
    margin-left: 6px;
    font-variant-numeric: tabular-nums;
}

.tf-res-row[hidden] { display: none; }

.tf-res-row--sum {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tf-res-row--sum .tf-res-label { color: #CBD5E1; font-weight: 600; }
.tf-res-row--sum .tf-res-value { color: #F0A0A0; font-weight: 700; }

.tf-res-error {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #F0A0A0;
    background: rgba(240, 160, 160, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
}

.tf-res-error[hidden] { display: none; }

.tf-calc-note[hidden] { display: none; }

.tf-calc-note code {
    background: #F1F5F9;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    color: #2D5A66;
}

/* ── Выравнивание полей калькулятора + подсказки ── */
.tf-calc-form {
    align-items: start;
}

/* Лейбл в одну строку фиксированной высоты — инпуты встают в один ряд */
.tf-label {
    min-height: 14px;
    line-height: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tf-field { justify-content: flex-start; }

.tf-hint {
    margin: 2px 0 0;
    padding-left: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #94A3B8;
}

.tf-field--wide .tf-hint { max-width: 70ch; }
