.gptc-home-v8 {
    --gptc-v8-bg: #f4f7fb;
    --gptc-v8-surface: #ffffff;
    --gptc-v8-surface-2: #f8fbff;
    --gptc-v8-text: #0f172a;
    --gptc-v8-text-soft: #5b6b82;
    --gptc-v8-border: rgba(15, 23, 42, 0.08);
    --gptc-v8-primary: #2563eb;
    --gptc-v8-primary-dark: #1d4ed8;
    --gptc-v8-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);

    background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
    color: var(--gptc-v8-text);
    padding-bottom: 72px;
}

.gptc-home-v8__shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.gptc-home-v8__hero {
    padding: 28px 0 16px;
}

.gptc-home-v8__hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 360px);
    gap: 24px;
    align-items: stretch;
}

.gptc-home-v8__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.09);
    color: var(--gptc-v8-primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.gptc-home-v8__title,
.gptc-home-v8__section-head h2,
.gptc-home-v8__promo-content h2,
.gptc-home-v8__add-card h2,
.gptc-home-v8__quick-block h2,
.gptc-home-v8__signal-block h2 {
    letter-spacing: -0.03em;
}

.gptc-home-v8__title {
    margin: 16px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 0.98;
}

.gptc-home-v8__text,
.gptc-home-v8__section-head p,
.gptc-home-v8__promo-content p,
.gptc-home-v8__add-card p,
.gptc-home-v8__card p {
    color: var(--gptc-v8-text-soft);
}

.gptc-home-v8__text {
    max-width: 760px;
    margin: 0;
    font-size: 18px;
    line-height: 1.7;
}

.gptc-home-v8__search {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
}

.gptc-home-v8__search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 58px;
    padding: 0 18px;
    border: 1px solid var(--gptc-v8-border);
    border-radius: 16px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 8px 24px rgba(148, 163, 184, 0.12);
    font-size: 16px;
    outline: none;
}

.gptc-home-v8__search input:focus {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.gptc-home-v8__search button,
.gptc-home-v8__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: 0.22s ease;
}

.gptc-home-v8__search button,
.gptc-home-v8__button--primary {
    background: var(--gptc-v8-primary);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.gptc-home-v8__search button:hover,
.gptc-home-v8__button--primary:hover {
    background: var(--gptc-v8-primary-dark);
    color: #ffffff;
}

.gptc-home-v8__button--ghost {
    background: #ffffff;
    border-color: var(--gptc-v8-border);
    color: var(--gptc-v8-text);
}

.gptc-home-v8__button--ghost:hover {
    border-color: rgba(37, 99, 235, 0.24);
    color: var(--gptc-v8-primary);
}

.gptc-home-v8__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.gptc-home-v8__hero-panel {
    display: grid;
    gap: 14px;
}

.gptc-home-v8__metric-card,
.gptc-home-v8__quick-block,
.gptc-home-v8__signal-block,
.gptc-home-v8__card,
.gptc-home-v8__promo-card,
.gptc-home-v8__add-card {
    border: 1px solid var(--gptc-v8-border);
    border-radius: 22px;
    background: var(--gptc-v8-surface);
    box-shadow: var(--gptc-v8-shadow);
}

.gptc-home-v8__metric-card {
    padding: 20px;
}

.gptc-home-v8__metric-card span {
    display: block;
    font-size: 14px;
    color: var(--gptc-v8-text-soft);
}

.gptc-home-v8__metric-card strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
    line-height: 1;
}

.gptc-home-v8__quick,
.gptc-home-v8__signals,
.gptc-home-v8__catalog,
.gptc-home-v8__promo,
.gptc-home-v8__add {
    padding-top: 22px;
}

.gptc-home-v8__quick-grid,
.gptc-home-v8__signal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.gptc-home-v8__quick-block,
.gptc-home-v8__signal-block {
    padding: 22px;
}

.gptc-home-v8__block-head,
.gptc-home-v8__section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.gptc-home-v8__block-head h2,
.gptc-home-v8__signal-block h2,
.gptc-home-v8__section-head h2,
.gptc-home-v8__promo-content h2,
.gptc-home-v8__add-card h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1.08;
}

.gptc-home-v8__block-head a {
    color: var(--gptc-v8-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.gptc-home-v8__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.gptc-home-v8__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--gptc-v8-border);
    background: #ffffff;
    color: var(--gptc-v8-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: 0.22s ease;
}

.gptc-home-v8__chip:hover {
    border-color: rgba(37, 99, 235, 0.25);
    color: var(--gptc-v8-primary);
}

.gptc-home-v8__chip.is-featured {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.16);
}

.gptc-home-v8__chip em {
    font-style: normal;
    font-size: 12px;
    color: #6b7280;
}

.gptc-home-v8__section-head {
    margin-bottom: 18px;
}

.gptc-home-v8__section-head p {
    margin: 10px 0 0;
    max-width: 760px;
    font-size: 16px;
    line-height: 1.7;
}

.gptc-home-v8__cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.gptc-home-v8__card {
    overflow: hidden;
}

.gptc-home-v8__card-media {
    aspect-ratio: 16 / 10;
    background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
}

.gptc-home-v8__card-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.gptc-home-v8__card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 30px;
    font-weight: 800;
    color: var(--gptc-v8-primary);
}

.gptc-home-v8__card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.gptc-home-v8__card-terms,
.gptc-home-v8__card-meta,
.gptc-home-v8__card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gptc-home-v8__card-terms span,
.gptc-home-v8__card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.gptc-home-v8__card h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
}

.gptc-home-v8__card h3 a {
    color: inherit;
    text-decoration: none;
}

.gptc-home-v8__card h3 a:hover {
    color: var(--gptc-v8-primary);
}

.gptc-home-v8__card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
}

.gptc-home-v8__card-actions {
    margin-top: auto;
}

.gptc-home-v8__promo-card,
.gptc-home-v8__add-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.gptc-home-v8__promo-content ul {
    margin: 14px 0 0;
    padding-left: 18px;
    color: var(--gptc-v8-text-soft);
    line-height: 1.8;
}

.gptc-home-v8__promo-action,
.gptc-home-v8__add-card > a {
    flex: 0 0 auto;
}

.gptc-home-v8__empty {
    padding: 28px;
    border-radius: 22px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    background: rgba(255,255,255,0.78);
    text-align: center;
}

.gptc-home-v8__modal[hidden] {
    display: none;
}

.gptc-home-v8__modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.gptc-home-v8__modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.66);
    backdrop-filter: blur(8px);
}

.gptc-home-v8__modal-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1280px, calc(100% - 32px));
    height: min(88vh, 920px);
    margin: min(6vh, 40px) auto 0;
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 40px 120px rgba(15, 23, 42, 0.3);
}

.gptc-home-v8__modal-top,
.gptc-home-v8__modal-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--gptc-v8-border);
    background: #ffffff;
}

.gptc-home-v8__modal-bottom {
    border-top: 1px solid var(--gptc-v8-border);
    border-bottom: 0;
}

.gptc-home-v8__modal-top h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.gptc-home-v8__modal-close {
    width: 42px;
    height: 42px;
    border: 1px solid var(--gptc-v8-border);
    border-radius: 12px;
    background: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.gptc-home-v8__modal-frame-wrap {
    flex: 1 1 auto;
    min-height: 0;
    background: #eef2ff;
}

.gptc-home-v8__modal-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #ffffff;
}

@media (max-width: 1180px) {
    .gptc-home-v8__hero-grid,
    .gptc-home-v8__quick-grid,
    .gptc-home-v8__signal-grid,
    .gptc-home-v8__cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gptc-home-v8__hero-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .gptc-home-v8__shell {
        width: min(100% - 24px, 1280px);
    }

    .gptc-home-v8__search,
    .gptc-home-v8__promo-card,
    .gptc-home-v8__add-card,
    .gptc-home-v8__modal-bottom,
    .gptc-home-v8__section-head,
    .gptc-home-v8__block-head,
    .gptc-home-v8__cards-grid,
    .gptc-home-v8__quick-grid,
    .gptc-home-v8__signal-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .gptc-home-v8__cards-grid {
        display: grid;
    }

    .gptc-home-v8__search {
        display: flex;
    }

    .gptc-home-v8__modal-dialog {
        width: calc(100% - 16px);
        height: calc(100vh - 16px);
        margin-top: 8px;
        border-radius: 18px;
    }
}
