/*
Theme Name: Reboot Child
Template: reboot
Version: 1.0.2
Description: Child theme поверх форкнутого Reboot. Author archive layout A + TOP-1 byline + schema.org/Person.
Text Domain: reboot-child
*/

/* ===== Author archive — Layout A (sidebar 32% + main 68%) ===== */

.ks-author-page__layout {
    display: grid;
    grid-template-columns: 32% 1fr;
    gap: 32px;
    align-items: start;
    margin: 24px 0;
}

@media (max-width: 768px) {
    .ks-author-page__layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Sidebar card */
.ks-author-card {
    background: #fafafa;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

@media (max-width: 768px) {
    .ks-author-card { position: static; }
}

.ks-author-card__photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 14px;
    background: #e2e8f0;
}

.ks-author-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ks-author-card__name {
    font-size: 1.5rem;
    margin: 0 0 4px;
    line-height: 1.2;
}

.ks-author-card__role {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0 0 12px;
}

.ks-author-card__signature {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    color: #78350f;
    padding: 8px 12px;
    margin: 0 0 14px;
    font-style: italic;
    font-size: 0.875rem;
    border-radius: 4px;
}

.ks-author-card__stats {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    color: #475569;
}

.ks-author-card__stats li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
}

.ks-author-card__stats li:last-child { border-bottom: none; }

.ks-author-card__stat-label { color: #64748b; }
.ks-author-card__stat-value { color: #0f172a; font-weight: 500; }

/* Main column */
.ks-author-page__main h2 {
    font-size: 1.25rem;
    margin: 0 0 12px;
    color: #0f172a;
}

.ks-author-page__intro,
.ks-author-page__articles,
.ks-author-page__observations {
    margin-bottom: 28px;
}

.ks-author-page__intro h1 {
    margin: 0 0 14px;
    font-size: 1.625rem;
    line-height: 1.2;
    color: #0f172a;
}

.ks-author-page__tagline {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    color: #78350f;
    padding: 10px 14px;
    margin: 0 0 14px;
    font-style: italic;
    border-radius: 4px;
}

.ks-author-page__intro-line {
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.ks-author-page__post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ks-author-page__post-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.ks-author-page__post-list a {
    color: #0f172a;
    text-decoration: none;
    flex: 1;
}

.ks-author-page__post-list a:hover { text-decoration: underline; }

.ks-author-page__post-list time {
    color: #94a3b8;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.ks-author-page__empty {
    color: #94a3b8;
    font-style: italic;
    padding: 12px 0;
}

.ks-author-page__observations-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ks-author-page__observations-list li {
    background: #fff;
    border-left: 3px solid #f59e0b;
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.5;
}

.ks-author-page__observations-list time {
    display: block;
    font-weight: 600;
    color: #78350f;
    font-size: 0.75rem;
    margin-bottom: 2px;
}

/* ===== Authors index — /city-authors/ ===== */

.ks-authors-index { margin: 24px 0; }

.ks-authors-index__lead { color: #475569; margin: 8px 0 24px; }

.ks-authors-index__section { margin-bottom: 36px; }

.ks-authors-index__fo-title {
    font-size: 1.375rem;
    margin: 0 0 14px;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.ks-authors-index__count { color: #94a3b8; font-weight: 400; font-size: 1rem; }

.ks-authors-index__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.ks-authors-index__card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.ks-authors-index__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.ks-authors-index__photo {
    aspect-ratio: 1 / 1;
    background: #e2e8f0;
    overflow: hidden;
}

.ks-authors-index__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ks-authors-index__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ks-authors-index__name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #0f172a;
    line-height: 1.25;
}

.ks-authors-index__city {
    color: #475569;
    font-size: 0.875rem;
    margin: 0;
}

.ks-authors-index__meta {
    color: #94a3b8;
    font-size: 0.8125rem;
    margin: 0;
}

.ks-authors-index__sig {
    background: #fef3c7;
    color: #78350f;
    font-style: italic;
    font-size: 0.75rem;
    padding: 4px 8px;
    margin: 6px 0 0;
    border-radius: 4px;
    border-left: 2px solid #f59e0b;
    line-height: 1.3;
}

/* ===== TOP-1 byline на single.php ===== */

.ks-byline-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    margin: 0 0 14px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
    color: #64748b;
    flex-wrap: wrap;
}

.ks-byline-top__photo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ks-byline-top__name {
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
}

.ks-byline-top__name:hover { text-decoration: underline; }

.ks-byline-top__sep { color: #cbd5e1; }
.ks-byline-top__role { color: #64748b; }
.ks-byline-top__date { color: #94a3b8; font-variant-numeric: tabular-nums; }

/* ===== Registry-backed promo card (Refs #61) ===== */

.entry-content .ks-promo-code {
    margin: 24px 0;
    padding: 18px;
    border: 2px solid #f05713;
    border-radius: 14px;
    background: #fff8f3;
    color: #0e1e29;
}

.entry-content .ks-promo-code__label {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 700;
}

.entry-content .ks-promo-code__row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.entry-content .ks-promo-code__value {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    min-height: 48px;
    padding: 9px 12px;
    overflow-wrap: anywhere;
    border: 1px dashed #b45309;
    border-radius: 9px;
    background: #fff;
    color: #7c2d12;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: clamp(1.15rem, 4.8vw, 1.55rem);
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.2;
    user-select: all;
}

.entry-content .ks-promo-code__copy {
    min-height: 48px;
    padding: 10px 18px;
    border: 0;
    border-radius: 9px;
    background: #c2410c;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    touch-action: manipulation;
}

.entry-content .ks-promo-code__copy:hover,
.entry-content .ks-promo-code__copy:focus-visible {
    background: #9a3412;
}

.entry-content .ks-promo-code__copy:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

.entry-content .ks-promo-code__status {
    min-height: 1.4em;
    margin: 7px 0 0;
    color: #166534;
    font-size: .9rem;
    font-weight: 600;
}

.ks-home-promos .post-cards--vertical {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

@media (max-width: 480px) {
    .entry-content .ks-promo-code {
        margin: 20px -4px;
        padding: 14px;
    }

    .entry-content .ks-promo-code__row {
        flex-direction: column;
    }

    .entry-content .ks-promo-code__copy {
        width: 100%;
    }
}

/* App-бейджи операторов (ks-articles, issue #8): каждый оператор - отдельная карточка */
.entry-content .ks-app-block {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 14px 0;
    padding: 12px 16px;
    background: #f6f8fa;
    border: 1px solid #e4e8ee;
    border-radius: 10px;
}
.entry-content .ks-app-block .ks-app-name {
    font-weight: 700;
    font-size: 1.05em;
    min-width: 130px;
    flex: 0 0 auto;
}
.entry-content .ks-app-block .ks-app-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.entry-content .ks-app-block .ks-app-badges a { display: inline-block; line-height: 0; }
.entry-content .ks-app-block .ks-app-badges img { height: 40px; width: auto; margin: 0; }

/* --- #12: full-cover hero для постов пилота визуалов (body.ks-has-cover) ---
   Родитель держит .entry-image ratio-боксом ~2.18:1 (фон auto/0%0% → текстовая
   обложка 16:9 режется). Переводим бокс в 16:9 и фон в cover/center — обложка
   видна целиком. Скоуп только на посты с ks_cover_attachment_id. */
body.ks-has-cover .entry-image.post-card__thumbnail { height: auto !important; padding: 0 !important; }
body.ks-has-cover .entry-image.post-card__thumbnail img { width: 100%; height: auto; display: block; }
