.cc {
    --cc-base: #f5f7fb;
    --cc-card: #fff;
    --cc-input: #fff;
    --cc-line: #d9e2ef;
    --cc-text: #0b1a30;
    --cc-muted: #4d6079;
    --cc-active: #103964;
    --cc-accent: #1766a9;
    --cc-soft: #eaf2fc;
    --cc-ok: #145b39;
    --cc-ok-bg: #e9f6ee;
    --cc-warn: #7c3909;
    --cc-warn-bg: #fff3de;
    background: var(--cc-base);
    color: var(--cc-text);
    padding: clamp(22px, 4vw, 54px) 0 clamp(32px, 6vw, 76px);
}
.cc, #ket-qua { scroll-margin-top: 96px; }
.cc-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.cc-tabs a {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 68px;
    gap: 11px;
    padding: 10px 13px;
    background: var(--cc-card);
    color: var(--cc-text);
    border: 1px solid var(--cc-line);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    line-height: 1.26;
    overflow-wrap: anywhere;
}
.cc-tabs a:hover { border-color: var(--cc-accent); color: var(--cc-active); }
.cc-tabs a[aria-current="page"] { color: #fff; background: #103964; border-color: #103964; }
.cc-tabs__icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 38px;
    height: 38px;
    border-radius: 6px;
    background: var(--cc-soft);
    color: var(--cc-active);
}
.cc-tabs a[aria-current="page"] .cc-tabs__icon { background: #28527c; color: #fff; }
.cc-tabs__icon .ic { width: 20px; height: 20px; }
.cc-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 20px; align-items: start; }
.cc-card { min-width: 0; background: var(--cc-card); border: 1px solid var(--cc-line); border-radius: 10px; padding: clamp(16px, 3vw, 29px); }
.cc-card h2 { color: var(--cc-text); font-size: clamp(1.24rem, 2.4vw, 1.6rem); line-height: 1.24; margin: 0 0 7px; }
.cc-card__dau { margin-bottom: 18px; }
.cc-card__dau p, .cc-empty { color: var(--cc-muted); margin: 0; line-height: 1.55; }
.cc-result { border-top: 3px solid var(--cc-accent); }
.cc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 15px; }
.cc-fields + .cc-fields { margin-top: 12px; }
.cc-field { display: grid; align-content: start; gap: 4px; min-width: 0; color: var(--cc-text); font-weight: 700; }
.cc-field > span { line-height: 1.34; }
.cc-field small { font-weight: 400; font-size: .86rem; color: var(--cc-muted); line-height: 1.38; }
.cc-field input, .cc-field select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 43px;
    padding: 7px 10px;
    border: 1px solid var(--cc-line);
    border-radius: 6px;
    color: var(--cc-text);
    background: var(--cc-input);
    font: inherit;
    font-weight: 400;
}
.cc-field input::placeholder { color: var(--cc-muted); opacity: .75; }
.cc-field [aria-invalid="true"] { border-color: var(--red); }
.cc :focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 3px; }
.cc-model { padding: 11px 12px; background: var(--cc-soft); border-radius: 6px; }
.cc-details { min-width: 0; margin: 15px 0 0; padding: 9px 11px; border: 1px solid var(--cc-line); border-radius: 6px; }
.cc-details summary { cursor: pointer; font-weight: 700; color: var(--cc-text); }
.cc-details[open] summary { margin-bottom: 8px; }
.cc-details p { margin: 0 0 8px; color: var(--cc-muted); }
.cc-details ul { margin: 0; padding-left: 1.2em; }
.cc-details a, .cc-textlink { color: var(--cc-active); text-decoration: underline; text-underline-offset: .16em; overflow-wrap: anywhere; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 9px 16px; align-items: center; margin-top: 17px; }
.cc-actions .btn { min-height: 44px; }
.cc-textlink { font-weight: 700; }
.cc-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 13px 0; }
.cc-metrics > div { padding: 10px 12px; min-width: 0; background: var(--cc-base); border: 1px solid var(--cc-line); border-radius: 6px; }
.cc-metrics > div:first-child { grid-column: 1 / -1; border-color: transparent; background: var(--cc-soft); }
.cc-metrics dt { font-size: .88rem; color: var(--cc-muted); line-height: 1.35; }
.cc-metrics dd { margin: 3px 0 0; line-height: 1.25; font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cc-metrics > div:first-child dd { font-size: clamp(1.25rem, 3vw, 1.8rem); color: var(--cc-active); }
.cc-note { padding: 9px 11px; margin: 9px 0; color: var(--cc-muted); background: var(--cc-base); border-radius: 6px; line-height: 1.5; }
.cc-note--warn, .cc-state--warn { color: var(--cc-warn); background: var(--cc-warn-bg); }
.cc-note--ok, .cc-state--ok { color: var(--cc-ok); background: var(--cc-ok-bg); }
.cc-checks { margin: 12px 0; padding: 0; list-style: none; }
.cc-checks li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 8px; padding: 6px 0; border-bottom: 1px solid var(--cc-line); }
.cc-state { border-radius: 4px; padding: 2px 7px; font-size: .88em; }
.cc-state--unknown { color: var(--cc-muted); background: var(--cc-base); }
.cc-table { overflow: auto; }
.cc-table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cc-table th, .cc-table td { text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--cc-line); }
.cc-table th:first-child { text-align: left; }
.cc [hidden] { display: none !important; }
@media (max-width: 820px) {
    .cc-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .cc-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 470px) {
    .cc-fields { grid-template-columns: minmax(0, 1fr); }
    .cc-tabs a { min-height: 60px; gap: 7px; padding: 7px 8px; font-size: .92rem; }
    .cc-tabs__icon { flex-basis: 28px; height: 30px; }
    .cc-tabs__icon .ic { width: 16px; height: 16px; }
}
@media (prefers-color-scheme: dark) {
    .cc {
        color-scheme: dark;
        --cc-base: #0d1522;
        --cc-card: #141e30;
        --cc-input: #101827;
        --cc-line: #38465c;
        --cc-text: #f5f7fb;
        --cc-muted: #bac8db;
        --cc-active: #b4d8ff;
        --cc-accent: #8bc2f7;
        --cc-soft: #213653;
        --cc-ok: #a8ecc4;
        --cc-ok-bg: #17382d;
        --cc-warn: #ffdaa0;
        --cc-warn-bg: #432e1d;
    }
    .cc-tabs a[aria-current="page"] { background: #1e4b7c; border-color: #8bc2f7; }
}
