/* =====================================================
   AI Lab — Components & Sections
   Header · Navigation · Sections · Cards · Footer
   ===================================================== */

/* =========================================
   HEADER · NAV v3
   - Compact top bar w/ command-palette search
   - Full-width mega panels (drop below header)
   - Fullscreen mobile overlay
   ========================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-row {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: var(--header-h);
    justify-content: space-between;
}

/* ----- Brand ----- */
.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
}

.nav-brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), #1e40af);
    color: var(--bg);
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: -0.02em;
    box-shadow: var(--shadow-sm);
}

.nav-brand__text {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

/* ----- Primary nav (desktop) ----- */
.nav-primary {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 12px;
    border: 0;
    background: transparent;
    text-decoration: none;
    color: var(--text-2);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link--trigger[aria-expanded="true"] {
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-link__caret {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.nav-link--trigger[aria-expanded="true"] .nav-link__caret {
    transform: rotate(180deg);
    opacity: 1;
}

/* ----- Actions (right) ----- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Command-palette style search trigger */
.nav-cmdk {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 0 14px;
    height: 38px;
    border-radius: var(--radius-pill);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--muted-strong);
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav-cmdk:hover {
    background: var(--bg);
    border-color: var(--border-strong);
    color: var(--text);
}

.nav-cmdk__icon {
    color: var(--muted);
    font-size: 0.88rem;
}

.nav-cmdk__label {
    min-width: 60px;
    text-align: left;
}

.nav-cmdk__kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--muted-strong);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
}

/* Sign in link */
.nav-signin {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    border-radius: var(--radius);
    background: var(--primary);
    color: var(--bg);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.18s ease;
    white-space: nowrap;
}

.nav-signin:hover {
    background: var(--primary-hover);
    color: var(--bg);
}

/* ----- User profile dropdown ----- */
.nav-profile {
    position: relative;
    flex-shrink: 0;
}

.nav-profile__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 10px 3px 3px;
    height: 38px;
    border-radius: var(--radius-pill);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.nav-profile__btn:hover {
    background: var(--bg-soft);
    border-color: var(--border-strong);
}

.nav-profile[data-state="open"] .nav-profile__btn {
    background: var(--primary-soft);
    border-color: var(--primary-soft-border);
}

.nav-profile__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.nav-profile__name {
    color: var(--text);
}

.nav-profile__caret {
    font-size: 0.7rem;
    color: var(--muted);
    transition: transform 0.22s ease;
}

.nav-profile[data-state="open"] .nav-profile__caret {
    transform: rotate(180deg);
    color: var(--primary);
}

/* ----- Profile dropdown menu ----- */
.nav-profile__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 280px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.18s ease;
    z-index: 1090;
}

.nav-profile[data-state="open"] .nav-profile__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.nav-profile__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}

.nav-profile__header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 700;
    flex-shrink: 0;
}

.nav-profile__header-info {
    min-width: 0;
    flex: 1;
}

.nav-profile__header-name {
    font-family: var(--font-body);
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 2px;
}

.nav-profile__header-email {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-profile__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-profile__list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--radius);
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.14s ease, color 0.14s ease;
}

.nav-profile__list a:hover {
    background: var(--primary-soft);
    color: var(--primary-hover);
}

.nav-profile__list a>.bi {
    width: 18px;
    color: var(--muted);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.nav-profile__list a:hover>.bi {
    color: var(--primary);
}

.nav-profile__count {
    margin-left: auto;
    background: var(--bg-soft);
    color: var(--muted-strong);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.nav-profile__list a:hover .nav-profile__count {
    background: var(--bg);
    color: var(--primary);
}

.nav-profile__divider {
    height: 1px;
    background: var(--border);
    margin: 6px 4px;
}

.nav-profile__signout {
    color: var(--danger) !important;
}

.nav-profile__signout>.bi {
    color: var(--danger) !important;
}

.nav-profile__signout:hover {
    background: var(--danger-soft) !important;
    color: var(--danger) !important;
}

/* ----- Mobile (≤480px): collapse profile button to just the avatar ----- */
@media (max-width: 480px) {
    .nav-profile__btn {
        padding: 3px;
        gap: 0;
    }

    .nav-profile__name,
    .nav-profile__caret {
        display: none;
    }

    .nav-profile__menu {
        right: -8px;
        min-width: min(300px, calc(100vw - 24px));
    }
}

/* Mobile toggle (3 bars → x) */
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: transparent;
    border: 1px solid var(--border);
    cursor: pointer;
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.nav-toggle:hover {
    background: var(--bg-soft);
    border-color: var(--border-strong);
}

.nav-toggle__bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

/* ----- Mega panels (desktop, full-width strip below nav row) ----- */
.nav-panels {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    pointer-events: none;
}

.nav-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 28px 0 32px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.nav-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-panel__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 1.2fr;
    gap: 32px;
}

.nav-panel--three-col .nav-panel__grid,
.nav-panel:not(:has(.nav-panel__feature)) .nav-panel__grid {
    grid-template-columns: repeat(3, 1fr);
}

.nav-panel__col {
    min-width: 0;
}

.nav-panel__title {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.nav-panel__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-panel__col li {
    margin-bottom: 2px;
}

.nav-panel__col a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: background-color 0.16s ease, color 0.16s ease;
}

.nav-panel__col a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.nav-panel__col a>i {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--bg-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    margin-top: 1px;
}

.nav-panel__col a:hover>i {
    background: var(--bg);
    color: var(--primary-hover);
}

.nav-panel__col a>span {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.nav-panel__col strong {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.nav-panel__col small {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
}

.nav-panel__col a:hover strong {
    color: var(--primary-hover);
}

/* Feature tile inside mega panel */
.nav-panel__feature {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--bg);
    text-decoration: none;
    min-height: 200px;
    transition: transform 0.18s ease;
}

.nav-panel__feature:hover {
    color: var(--bg);
}

.nav-panel__feature-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.nav-panel__feature h4 {
    font-family: var(--font-body);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--bg);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.nav-panel__feature p {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
}

.nav-panel__feature-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--bg);
    margin-top: auto;
}

.nav-panel__feature-cta .bi {
    transition: transform 0.18s ease;
}

.nav-panel__feature:hover .nav-panel__feature-cta .bi {
    transform: translateX(3px);
}

/* ----- Mobile-only: hide desktop nav, show toggle ----- */
@media (max-width: 1023px) {
    .nav-primary {
        display: none;
    }

    .nav-cmdk__label,
    .nav-cmdk__kbd {
        display: none;
    }

    .nav-cmdk {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: var(--radius);
    }

    .nav-cmdk__icon {
        font-size: 1rem;
        color: var(--text);
    }

    .nav-signin {
        padding: 0 14px;
        height: 38px;
        font-size: 0.84rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-panels {
        display: none;
    }
}

@media (max-width: 540px) {
    .nav-row {
        gap: 8px;
    }

    /* On very narrow screens, the Sign in button shrinks; both stay visible */
    .nav-signin {
        padding: 0 12px;
        font-size: 0.82rem;
    }
}

/* ============================================
   MOBILE NAV (fullscreen overlay)
   ============================================ */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.24s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mobile-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    min-height: var(--header-h);
    flex-shrink: 0;
}

.mobile-nav__close {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background-color 0.18s ease;
}

.mobile-nav__close:hover {
    background: var(--bg-muted);
}

.mobile-nav__search {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px;
    padding: 14px 18px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted-strong);
    font-size: 0.94rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.mobile-nav__search:hover {
    border-color: var(--primary-soft-border);
    background: var(--bg);
}

.mobile-nav__search>i {
    color: var(--muted);
    font-size: 1rem;
}

.mobile-nav__list {
    padding: 6px 18px 18px;
    flex: 1;
}

/* Top-level nav item (both leaf link & expandable summary use the same styles) */
.mobile-nav__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 14px;
    background: var(--bg);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.06rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background-color 0.16s ease, color 0.16s ease;
    list-style: none;
    /* hide native <summary> marker */
}

.mobile-nav__item::-webkit-details-marker {
    display: none;
}

.mobile-nav__item::marker {
    content: "";
}

.mobile-nav__item:hover,
.mobile-nav__group[open]>.mobile-nav__item {
    background: var(--primary-soft);
    color: var(--primary-hover);
}

.mobile-nav__item .bi {
    color: var(--muted);
    font-size: 0.86rem;
}

.mobile-nav__item:hover .bi,
.mobile-nav__group[open]>.mobile-nav__item .bi {
    color: var(--primary);
}

.mobile-nav__caret {
    transition: transform 0.22s ease;
}

.mobile-nav__group[open]>.mobile-nav__item .mobile-nav__caret {
    transform: rotate(180deg);
}

.mobile-nav__group {
    margin-bottom: 2px;
}

.mobile-nav__sub {
    display: flex;
    flex-direction: column;
    padding: 6px 0 10px 14px;
    margin: 0 0 4px 6px;
    border-left: 2px solid var(--primary-soft-border);
}

.mobile-nav__sub a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    color: var(--text-2);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background-color 0.16s ease, color 0.16s ease;
}

.mobile-nav__sub a:hover {
    background: var(--bg-soft);
    color: var(--primary);
}

.mobile-nav__sub-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--accent-soft);
    color: var(--accent-hover);
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-right: 4px;
    flex-shrink: 0;
}

.mobile-nav__footer {
    padding: 18px;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-shrink: 0;
}

.mobile-nav__social {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.mobile-nav__social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: color 0.18s ease, border-color 0.18s ease;
    text-decoration: none;
}

.mobile-nav__social a:hover {
    color: var(--primary);
    border-color: var(--primary-soft-border);
}

/* Desktop: hide mobile overlay entirely */
@media (min-width: 1024px) {
    .mobile-nav {
        display: none;
    }

    .nav-toggle {
        display: none;
    }
}

/* ============================================
   SHARED UI BACKDROP (mobile-nav + search popup)
   ============================================ */
.ui-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1070;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.ui-backdrop.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ============================================
   SEARCH POPUP (command palette)
   ============================================ */
.search-popup {
    position: fixed;
    inset: 0;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    overflow-y: auto;
    padding: 16px;
}

.search-popup.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: #000000a6;
}

.search-popup__dialog {
    position: relative;
    width: min(640px, 100%);
    margin: clamp(40px, 12vh, 110px) auto 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px 22px 22px;
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px) scale(0.98);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.22s ease;
}

.search-popup.is-active .search-popup__dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.search-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.search-popup__header h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted-strong);
    font-weight: 600;
}

.search-popup__close {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    color: var(--text-2);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, color 0.18s ease;
    flex-shrink: 0;
}

.search-popup__close:hover {
    background: var(--bg-muted);
    color: var(--text);
}

.search-popup__form {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.search-popup__field {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-soft);
    padding: 0 16px;
    min-width: 0;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.search-popup__field:focus-within {
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.search-popup__field .bi {
    color: var(--muted);
    font-size: 1.05rem;
}

.search-popup__field input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    min-width: 0;
}

.search-popup__field input::placeholder {
    color: var(--muted);
}

.search-popup__submit {
    min-height: 52px;
    padding: 0 22px;
    border-radius: var(--radius);
    background: var(--primary);
    color: var(--bg);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.18s ease;
    white-space: nowrap;
}

.search-popup__submit:hover {
    background: var(--primary-hover);
}

.search-popup__suggest {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.search-popup__suggest-label {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.search-popup__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-popup__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius-pill);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    font-size: 0.84rem;
    color: var(--text-2);
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.search-popup__chip:hover {
    background: var(--primary-soft);
    border-color: var(--primary-soft-border);
    color: var(--primary-hover);
}

.search-popup__chip .bi {
    font-size: 0.78rem;
    color: var(--muted);
}

.search-popup__chip:hover .bi {
    color: var(--primary);
}

@media (max-width: 575px) {
    .search-popup {
        padding: 0;
    }

    .search-popup__dialog {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        padding: 18px 16px;
    }

    .search-popup__submit {
        padding: 0 16px;
        font-size: 0.85rem;
    }
}

/* =========================================
   SHARED ICON BUTTON
   (used for share rows, social links, etc.)
   ========================================= */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    cursor: pointer;
}

.icon-btn:hover {
    background: var(--bg);
    border-color: var(--primary-soft-border);
    color: var(--primary);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1;
    padding: 12px 22px;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--bg);
}

.btn-secondary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.btn-secondary:hover {
    background: #1e293b;
    color: var(--bg);
}

.btn-outline {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-outline:hover {
    border-color: var(--text);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border-color: transparent;
}

.btn-ghost:hover {
    color: var(--text);
    background: var(--bg-soft);
}

.btn-lg {
    padding: 14px 26px;
    font-size: 0.98rem;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.84rem;
}

.btn-block {
    width: 100%;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    padding: 60px 0 24px;
    margin-top: 60px;
}

.footer__top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer__col {
    min-width: 0;
}

.footer__brand .brand-mark {
    margin-bottom: 4px;
}

.footer__brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer__desc {
    font-size: 0.92rem;
    color: var(--muted-strong);
    line-height: 1.65;
    margin-bottom: 18px;
    max-width: 360px;
}

.footer__socials {
    display: flex;
    gap: 8px;
}

.footer__socials a {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 1rem;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.footer__socials a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-soft);
}

.footer__title {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text);
    margin-bottom: 14px;
}

.footer__col ul {
    list-style: none;
}

.footer__col li {
    margin-bottom: 10px;
}

.footer__col a {
    text-decoration: none;
    color: var(--muted-strong);
    font-size: 0.9rem;
    transition: color 0.18s ease;
}

.footer__col a:hover {
    color: var(--primary);
}

.newsletter-mini {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.newsletter-mini input {
    flex: 1;
    min-width: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--text);
    font-size: 0.86rem;
    outline: none;
}

.newsletter-mini input:focus {
    border-color: var(--primary);
}

.newsletter-mini input::placeholder {
    color: var(--muted);
}

.newsletter-mini button {
    padding: 10px 16px;
    border-radius: var(--radius);
    background: var(--primary);
    color: var(--bg);
    font-size: 0.86rem;
    font-weight: 600;
    transition: background-color 0.18s ease;
}

.newsletter-mini button:hover {
    background: var(--primary-hover);
}

.footer__divider {
    height: 1px;
    background: var(--border);
    margin: 40px 0 20px;
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer__bottom p {
    font-size: 0.86rem;
    color: var(--muted-strong);
    margin: 0;
}

.footer__legal {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer__legal a {
    font-size: 0.86rem;
    color: var(--muted-strong);
    text-decoration: none;
}

.footer__legal a:hover {
    color: var(--text);
}

@media (max-width: 1199px) {
    .footer__top {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
    }

    .footer__col--news {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer__top {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .footer__col--brand {
        grid-column: 1 / -1;
    }

    .footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .footer__top {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   PAGE HERO (used on inner pages)
   ========================================= */
.page-hero {
    padding: 72px 0 56px;
    background: linear-gradient(180deg, #2563eb26 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}

.page-hero__inner {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--primary);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-weight: 600;
}

.eyebrow::before {
    content: '';
    display: block;
    width: 22px;
    height: 1px;
    background: var(--primary);
}

.page-hero h1 .accent {
    color: var(--primary);
}

.page-hero p {
    font-size: 1.05rem;
    color: var(--muted-strong);
    line-height: 1.7;
    margin-top: 14px;
}

/* =========================================
   HOMEPAGE HERO
   ========================================= */
.home-hero {
    padding: 84px 0 72px;
    background:
        radial-gradient(60% 50% at 80% 0%, rgba(15, 118, 110, 0.06), transparent 70%),
        radial-gradient(40% 40% at 10% 80%, rgba(37, 99, 235, 0.05), transparent 70%),
        var(--bg);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.home-hero__inner {
    max-width: 820px;
}

.home-hero h1 {
    margin-bottom: 22px;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.home-hero h1 .accent {
    color: var(--primary);
}

.home-hero p {
    font-size: 1.08rem;
    color: var(--muted-strong);
    max-width: 600px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg);
    max-width: 700px;
}

.hero-stat {
    padding: 20px 22px;
    border-right: 1px solid var(--border);
}

.hero-stat:last-child {
    border-right: 0;
}

.hero-stat__num {
    font-family: var(--font-body);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.hero-stat__label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .hero-stat:nth-child(2) {
        border-right: 0;
    }

    .hero-stat:nth-child(1),
    .hero-stat:nth-child(2) {
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-stat {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .hero-stat:last-child {
        border-bottom: 0;
    }
}

/* =========================================
   SECTIONS
   ========================================= */
.section {
    padding: 64px 0;
}

.section--alt {
    background: var(--bg-soft);
}

.section__head {
    margin-bottom: 36px;
}

.section__head .eyebrow {
    margin-bottom: 12px;
}

.section__head h2 {
    margin-bottom: 12px;
}

.section__desc {
    font-size: 1rem;
    color: var(--muted-strong);
    line-height: 1.7;
    max-width: 640px;
}

/* =========================================
   GENERIC CARD
   ========================================= */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card--soft {
    background: var(--bg-soft);
}

/* =========================================
   LOGO MARQUEE
   ========================================= */
.marquee-wrap {
    overflow: hidden;
    padding: 18px 0;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.marquee-track {
    display: flex;
    gap: 0;
    white-space: nowrap;
    animation: marquee 32s linear infinite;
    width: max-content;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 32px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
}

.marquee-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }
}

/* =========================================
   TOOL/REVIEW CARDS GRID
   ========================================= */
.reviews-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-card);
}

@media (min-width: 640px) {
    .reviews-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .reviews-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.tool-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.tool-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.tool-card__icon img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

.tool-card__score {
    font-family: var(--font-body);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

.tool-card__score span {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
}

.tool-card__name {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.tool-card__cat {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    font-weight: 500;
}

.tool-card__desc {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 18px;
    flex: 1;
}

.tool-card__bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.tool-card__bar-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--muted-strong);
    width: 80px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.tool-card__bar {
    flex: 1;
    height: 5px;
    background: var(--bg-muted);
    border-radius: 3px;
    overflow: hidden;
}

.tool-card__bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
}

.tool-card__bar-value {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text);
    font-weight: 600;
    width: 36px;
    text-align: right;
}

.tool-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.tool-card__updated {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.tool-card__arrow {
    font-size: 0.88rem;
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* =========================================
   CATEGORY TILES
   ========================================= */
.cat-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-card-sm);
}

@media (min-width: 540px) {
    .cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .cat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .cat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.cat-tile {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.cat-tile:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.cat-tile__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.cat-tile:hover .cat-tile__icon {
    background: var(--bg);
    border-color: var(--primary-soft-border);
}

.cat-tile__name {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.cat-tile__count {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

/* =========================================
   METHODOLOGY STRIP
   ========================================= */
.method-strip {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(241px, 1fr));
    gap: 28px;
}

.ms-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.ms-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--primary-soft-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.ms-title {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.ms-desc {
    font-size: 0.86rem;
    color: var(--muted-strong);
    line-height: 1.55;
}

@media (max-width: 768px) {
    .method-strip {
        padding: 24px;
    }
}

/* =========================================
   NEWSLETTER BANNER (homepage – split layout)
   ========================================= */
.newsletter-wrap {
    background: linear-gradient(135deg, var(--primary), #1e40af);
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    color: var(--bg);
}

.newsletter-wrap h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--bg);
}

.newsletter-wrap p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.96rem;
    max-width: 460px;
    margin: 0;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter-form input {
    background: var(--bg);
    border: 1px solid var(--bg);
    color: var(--text);
    font-size: 0.92rem;
    padding: 12px 16px;
    border-radius: var(--radius);
    outline: none;
    min-width: 260px;
}

.newsletter-form input::placeholder {
    color: var(--muted);
}

.newsletter-form button {
    padding: 12px 22px;
    border-radius: var(--radius);
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
    font-size: 0.92rem;
    transition: background-color 0.18s ease;
}

.newsletter-form button:hover {
    background: #1e293b;
}

@media (max-width: 768px) {
    .newsletter-wrap {
        padding: 32px 24px;
    }

    .newsletter-form input {
        min-width: 100%;
    }

    .newsletter-form {
        width: 100%;
    }
}

/* =========================================
   CTA BAND (centered, end-of-page CTA)
   Used on about, careers, methodology pages
   ========================================= */
.cta-band {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 64px 40px;
    text-align: center;
    color: var(--bg);
    overflow: hidden;
    isolation: isolate;
}

.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(249, 115, 22, 0.18) 0%, transparent 55%);
    z-index: -1;
}

.cta-band .eyebrow {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 14px;
}

.cta-band h2 {
    color: var(--bg);
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 16px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.025em;
}

.cta-band p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.04rem;
    max-width: 580px;
    margin: 0 auto 30px;
    line-height: 1.65;
}

.cta-band__actions {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-band__actions .btn-primary {
    background: var(--bg);
    color: var(--primary);
}

.cta-band__actions .btn-primary:hover {
    background: var(--primary-soft);
    color: var(--primary-hover);
}

.cta-band__actions .btn-outline {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--bg);
    background: transparent;
}

.cta-band__actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--bg);
}

.cta-band__small {
    display: block;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.84rem;
}

@media (max-width: 640px) {
    .cta-band {
        padding: 48px 24px;
    }
}

/* =========================================
   FEATURES / FINDING CARDS
   ========================================= */
.feature-card,
.finding-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: border-color 0.18s ease;
}

.feature-card:hover,
.finding-card:hover {
    border-color: var(--border-strong);
}

.feature-card__icon,
.finding-card__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.feature-card h3,
.finding-card h3 {
    font-size: 1.04rem;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-card p,
.finding-card p {
    font-size: 0.9rem;
    color: var(--muted-strong);
    line-height: 1.6;
}

/* =========================================
   STAT/META BOX (tool page)
   ========================================= */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg);
    margin-top: 32px;
    max-width: fit-content;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 22px;
    border-right: 1px solid var(--border);
}

.meta-item:last-child {
    border-right: 0;
}

.meta-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.meta-value {
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.01em;
}

@media (max-width: 768px) {
    .meta-grid {
        grid-template-columns: 1fr 1fr;
    }

    .meta-item:nth-child(2) {
        border-right: 0;
    }

    .meta-item:nth-child(1),
    .meta-item:nth-child(2) {
        border-bottom: 1px solid var(--border);
    }
}

/* =========================================
   TEAM CARDS (compact strip used on tool review)
   ========================================= */
.team-strip {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
    margin-bottom: 24px;
}

.team-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 14px 8px 8px;
}

.team-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.team-avatar--purple {
    background: var(--purple);
}

.team-avatar--blue {
    background: #3b82f6;
}

.team-avatar--success {
    background: var(--success);
}

.team-avatar--warning {
    background: var(--warning);
}

.team-avatar--danger {
    background: var(--danger);
}

.team-avatar--amber {
    background: var(--accent);
}

.team-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
}

.team-role {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* =========================================
   VERDICT BOX
   ========================================= */
.verdict-box {
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--bg) 100%);
    border: 1px solid var(--primary-soft-border);
    border-radius: var(--radius-lg);
    padding: 36px;
}

.verdict-top {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.verdict-score {
    font-family: var(--font-body);
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.04em;
}

.verdict-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.verdict-title {
    font-family: var(--font-body);
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--text);
}

.verdict-sub {
    font-size: 0.88rem;
    color: var(--muted-strong);
    font-family: var(--font-mono);
}

.verdict-text {
    font-size: 0.96rem;
    color: var(--text-2);
    line-height: 1.7;
    border-top: 1px solid var(--primary-soft-border);
    padding-top: 22px;
}

.best-for-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.best-for-tag {
    background: var(--bg);
    border: 1px solid var(--primary-soft-border);
    color: var(--primary);
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    font-weight: 500;
}

@media (max-width: 640px) {
    .verdict-box {
        padding: 24px;
    }

    .verdict-score {
        font-size: 3rem;
    }
}

/* =========================================
   SCORECARD TABLE
   ========================================= */
.score-table-wrap {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

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

.score-table th {
    text-align: left;
    padding: 14px 18px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    background: var(--bg-soft);
}

.score-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 0.94rem;
    vertical-align: middle;
}

.score-table tr:last-child td {
    border-bottom: 0;
}

.score-table tr td:first-child {
    min-width: 200px;
    color: var(--text);
}

.score-table td strong {
    font-weight: 600;
    color: var(--text);
}

.score-table .tableText {
    font-size: 0.84rem;
    color: var(--muted-strong);
    font-weight: 400;
}

.score-val {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
}

.score-val.good {
    color: var(--success);
}

.score-val.mid {
    color: var(--warning);
}

.score-val.low {
    color: var(--danger);
}

.score-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-muted);
    border-radius: 3px;
    overflow: hidden;
    min-width: 100px;
}

.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-bar-fill.good {
    background: var(--success);
}

.score-bar-fill.mid {
    background: var(--warning);
}

.score-bar-fill.low {
    background: var(--danger);
}

.barPercent {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--muted-strong);
    font-weight: 600;
    min-width: 38px;
    text-align: right;
}

/* Pill / Badge */
.pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    font-weight: 600;
    text-transform: uppercase;
}

.pill-good,
.pill-excellent {
    background: var(--success-soft);
    color: var(--success);
}

.pill-moderate {
    background: var(--warning-soft);
    color: var(--warning);
}

.pill-weak {
    background: var(--danger-soft);
    color: var(--danger);
}

/* badges used in tool listings */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-green {
    background: var(--success-soft);
    color: var(--success);
}

.badge-blue {
    background: var(--primary-soft);
    color: var(--primary);
}

.badge-purple {
    background: var(--purple-soft);
    color: var(--purple);
}

.badge-amber {
    background: var(--accent-soft);
    color: var(--accent-hover);
}

/* =========================================
   PRAISE / PAIN BARS (What People Talk About)
   ========================================= */
.wpta-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    height: 100%;
}

.wpta-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.wpta-divider {
    height: 1px;
    background: var(--border);
    margin: 14px 0 20px;
}

.wpta-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.wpta-item:last-child {
    margin-bottom: 0;
}

.wpta-label {
    font-size: 0.86rem;
    color: var(--text);
    flex: 1;
    min-width: 0;
    /* overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; */
}

.wpta-bar-wrap {
    flex: 0 0 140px;
    height: 6px;
    background: var(--bg-muted);
    border-radius: 3px;
    overflow: hidden;
}

.wpta-bar-fill {
    height: 100%;
    border-radius: 3px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpta-bar-fill.praise {
    background: var(--success);
}

.wpta-bar-fill.pain {
    background: var(--danger);
}

.wpta-num {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 700;
    min-width: 28px;
    text-align: right;
}

.wpta-num.praise {
    color: var(--success);
}

.wpta-num.pain {
    color: var(--danger);
}

/* =========================================
   FORM ELEMENTS
   ========================================= */
.form-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.form-input,
.form-textarea,
.form-select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 14px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.94rem;
    outline: none;
    transition: border-color 0.18s ease;
    width: 100%;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--muted);
}

.form-textarea {
    resize: vertical;
    min-height: 110px;
    font-family: var(--font-body);
}

.form-success {
    display: none;
    background: var(--success-soft);
    border: 1px solid #86efac;
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--success);
    margin-top: 14px;
}

.form-success.is-visible {
    display: block;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 22px;
    }
}

/* =========================================
   STAR RATING (review form)
   ========================================= */
.star-row {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.star {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--bg-muted);
    transition: color 0.15s ease;
    user-select: none;
}

.star.active,
.star:hover {
    color: var(--warning);
}

/* =========================================
   REVIEW LIST (community)
   ========================================= */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.review-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--bg);
    background: var(--primary);
}

.reviewer-name {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.reviewer-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted-strong);
}

.review-stars {
    color: var(--warning);
    font-size: 0.92rem;
    letter-spacing: 1px;
}

.review-text {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.65;
}

/* =========================================
   CATEGORY LISTINGS
   ========================================= */
.filter-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 36px;
}

.search-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.94rem;
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.18s ease;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted-strong);
    cursor: pointer;
    font-weight: 600;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.filter-pill.is-active,
.filter-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.cat-section-title {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
}

.cat-section-title span {
    color: var(--muted-strong);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tools-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 40px;
}

.tool-row {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.tool-row:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.tool-row__icon img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

.tool-row__name {
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
}

.tool-row__cat {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

.tool-row__info {
    flex: 1;
    min-width: 0;
}

.tool-row__score {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.tool-row__arrow {
    color: var(--muted);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* =========================================
   ABOUT PAGE COMPONENTS
   ========================================= */
/* .mission-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: start;
}

.mission-text h3 {
    font-size: 1.18rem;
    margin-bottom: 12px;
    color: var(--text);
}

.mission-text p {
    font-size: 0.96rem;
    color: var(--text-2);
    line-height: 1.75;
    margin-bottom: 16px;
}

.stat-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.stat-item {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.stat-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.stat-num {
    font-family: var(--font-body);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.025em;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.86rem;
    color: var(--muted-strong);
}

.principles-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-card);
}

@media (min-width: 640px) {
    .principles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .principles-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.principle-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    height: 100%;
}

.pc-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--primary);
    letter-spacing: 0.1em;
    margin-bottom: 14px;
    font-weight: 600;
}

.pc-title {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.pc-desc {
    font-size: 0.9rem;
    color: var(--muted-strong);
    line-height: 1.65;
}

.team-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-card);
}

@media (min-width: 540px) {
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.member-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    text-align: center;
    transition: border-color 0.18s ease;
}

.member-card:hover {
    border-color: var(--border-strong);
}

.member-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--bg);
    background: var(--primary);
}

.member-name {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.member-role {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    font-weight: 600;
}

.member-bio {
    font-size: 0.84rem;
    color: var(--muted-strong);
    line-height: 1.6;
}

.timeline {
    max-width: 720px;
}

.tl-item {
    display: flex;
    gap: 24px;
    padding-bottom: 36px;
    position: relative;
}

.tl-item::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 36px;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.tl-item:last-child::before {
    display: none;
}

.tl-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    z-index: 1;
}

.tl-item.is-active .tl-dot {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.tl-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
    font-weight: 600;
}

.tl-title {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.tl-desc {
    font-size: 0.9rem;
    color: var(--muted-strong);
    line-height: 1.65;
}

@media (max-width: 768px) {
    .mission-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
} */

/* ====== Old About Page CSS End ======  */

/* =========================================
   METHODOLOGY PAGE COMPONENTS
   ========================================= */
.dim-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-card);
}

@media (min-width: 768px) {
    .dim-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .dim-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.dim-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.dim-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 6px;
}

.dim-name {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.dim-weight {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
}

.dim-desc {
    font-size: 0.9rem;
    color: var(--muted-strong);
    line-height: 1.65;
    margin-bottom: 16px;
}

.dim-bar {
    height: 6px;
    background: var(--bg-muted);
    border-radius: 3px;
    overflow: hidden;
}

.dim-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
}

.formula-box {
    background: var(--text);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: var(--bg);
    text-align: center;
}

.formula-box p {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.06em;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.formula {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--bg);
    line-height: 1.85;
}

.formula .accent {
    color: #fdba74;
    font-weight: 700;
}

.formula .dim {
    color: #93c5fd;
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ps-item {
    display: flex;
    gap: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
}

.ps-num {
    font-family: var(--font-body);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.ps-title {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.ps-desc {
    font-size: 0.9rem;
    color: var(--muted-strong);
    line-height: 1.65;
    margin-bottom: 12px;
}

.ps-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ps-tag {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.04em;
    font-weight: 500;
}

/* Sources & integrity */
.sources-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-card);
}

@media (min-width: 540px) {
    .sources-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .sources-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.src-card,
.int-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.src-icon,
.int-icon {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.src-name,
.int-title {
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.src-desc,
.int-desc {
    font-size: 0.86rem;
    color: var(--muted-strong);
    line-height: 1.6;
}

.int-card {
    display: flex;
    gap: 16px;
}

.int-card>.int-icon {
    flex-shrink: 0;
    margin-bottom: 0;
}

.integrity-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-card);
}

@media (min-width: 768px) {
    .integrity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .integrity-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =========================================
   CAREER PAGE
   ========================================= */
.values-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-card);
}

@media (min-width: 768px) {
    .values-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.value-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.value-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary);
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    font-weight: 600;
}

.value-title {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.value-desc {
    font-size: 0.9rem;
    color: var(--muted-strong);
    line-height: 1.65;
}

.perks-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-card);
}

@media (min-width: 540px) {
    .perks-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .perks-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.perk-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.perk-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.perk-title {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.perk-desc {
    font-size: 0.88rem;
    color: var(--muted-strong);
    line-height: 1.65;
}

.dept-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 28px 0 12px;
    font-weight: 600;
}

.dept-label:first-of-type {
    margin-top: 8px;
}

.job-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 18px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.job-card:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.job-title {
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.job-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.job-tag {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.06em;
    font-weight: 600;
    text-transform: uppercase;
}

.jt-remote {
    background: var(--accent-soft);
    color: var(--accent);
}

.jt-type {
    background: var(--bg-soft);
    color: var(--text-2);
    border: 1px solid var(--border);
}

.jt-new {
    background: var(--success-soft);
    color: var(--success);
}

.job-arrow {
    color: var(--muted);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* =========================================
   CONTACT PAGE
   ========================================= */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
}

.contact-option {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 14px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.co-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.co-title {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.co-desc {
    font-size: 0.86rem;
    color: var(--muted-strong);
    line-height: 1.6;
    margin-bottom: 8px;
}

.co-link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.co-link:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   BLOG PAGE
   ========================================= */
.blog-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-card);
}

@media (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.blog-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.blog-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.blog-card__cover img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: center;
    border-bottom: 1px solid var(--border);
}

.blog-card__body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.blog-card__tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 2px;
}

.blog-card__title {
    font-family: var(--font-body);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 4px;
}

.blog-card__excerpt {
    font-size: 0.9rem;
    color: var(--muted-strong);
    line-height: 1.6;
    flex: 1;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--muted-strong);
}

/* ----- Single Blog Post ----- */
.post-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.post-article {
    min-width: 0;
}

.post-header {
    margin-bottom: 32px;
}

.post-title {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    line-height: 1.2;
    margin-bottom: 16px;
}

.post-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted-strong);
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-cover img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.post-body p {
    font-size: 1.04rem;
    line-height: 1.8;
    color: var(--text-2);
    margin-bottom: 20px;
}

.post-body h2 {
    font-size: 1.5rem;
    margin: 32px 0 14px;
    color: var(--text);
}

.post-body h3 {
    font-size: 1.2rem;
    margin: 26px 0 10px;
    color: var(--text);
}

.post-body ul,
.post-body ol {
    margin: 0 0 22px 22px;
    padding: 0;
    color: var(--text-2);
}

.post-body li {
    margin-bottom: 8px;
    line-height: 1.75;
    font-size: 1rem;
}

.post-body blockquote {
    border-left: 4px solid var(--primary);
    background: var(--primary-soft);
    padding: 16px 22px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 24px 0;
    color: var(--text);
    font-size: 1rem;
    font-style: italic;
}

.post-body code {
    background: var(--bg-muted);
    color: var(--accent);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.post-body img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.post-aside {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 22px;
    max-height: calc(100vh - var(--header-h) - 40px);
    overflow-y: auto;
}

.post-aside__mobile-toggle {
    display: none;
}

.post-aside__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.post-aside h4 {
    font-family: var(--font-body);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted-strong);
    margin: 0;
    font-weight: 600;
}

.post-aside__progress {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 600;
    padding: 3px 8px;
    background: var(--primary-soft);
    border-radius: var(--radius-pill);
    min-width: 38px;
    text-align: center;
}

.post-toc {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.post-toc::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border);
    border-radius: 1px;
}

.post-toc li {
    margin-bottom: 2px;
    position: relative;
}

.post-toc a {
    color: var(--muted-strong);
    font-size: 0.88rem;
    text-decoration: none;
    display: block;
    padding: 7px 0 7px 14px;
    line-height: 1.4;
    border-left: 2px solid transparent;
    margin-left: 0;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.post-toc a:hover {
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Hierarchy: nested h3 entries indent */
.post-toc .post-toc__sub {
    list-style: none;
    padding-left: 14px;
    margin: 0;
}

.post-toc .post-toc__sub a {
    font-size: 0.82rem;
    color: var(--muted);
    padding: 5px 0 5px 14px;
}

/* Active section state (scroll-spy) */
.post-toc a.is-active {
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
    background: var(--primary-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post-toc .post-toc__sub a.is-active {
    color: var(--primary-hover);
}

/* Reading progress bar */
.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    z-index: 1200;
    transition: width 0.12s linear;
    pointer-events: none;
}

@media (max-width: 1023px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .post-aside {
        position: static;
        max-height: none;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        overflow: visible;
    }

    .post-aside__mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 14px 18px;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        font-family: var(--font-body);
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text);
        cursor: pointer;
    }

    .post-aside__mobile-toggle .bi {
        transition: transform 0.22s ease;
        color: var(--primary);
    }

    .post-aside.is-mobile-open .post-aside__mobile-toggle .bi-chevron-down {
        transform: rotate(180deg);
    }

    .post-aside__head {
        display: none;
    }

    .post-toc {
        display: none;
        background: var(--bg);
        border: 1px solid var(--border);
        border-top: 0;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        margin-top: -1px;
        padding: 16px 22px 18px;
    }

    .post-aside.is-mobile-open .post-toc {
        display: block;
    }

    .read-progress {
        display: none;
    }
}

/* =========================================
   FAQ accordion (shared)
   ========================================= */
.faq {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: 0;
}

.faq-q {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.faq-q .bi {
    color: var(--primary);
    transition: transform 0.2s ease;
}

.faq-item.is-open .faq-q .bi {
    transform: rotate(180deg);
}

.faq-a {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
}

.faq-item.is-open .faq-a {
    padding: 0 24px 22px;
    max-height: 400px;
}

.faq-a p {
    font-size: 0.95rem;
    color: var(--muted-strong);
    line-height: 1.7;
}

/* =========================================
   404 PAGE
   ========================================= */
.errorpage {
    min-height: calc(100vh - var(--header-h) - 200px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 16px;
}

.errorpage__num {
    font-family: var(--font-body);
    font-size: clamp(6rem, 18vw, 10rem);
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
}

.errorpage h1 {
    margin-bottom: 12px;
    font-size: clamp(1.6rem, 3vw, 2rem);
}

.errorpage p {
    color: var(--muted-strong);
    margin-bottom: 28px;
}

.errorpage__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* =========================================
   FADE-IN (kept light; no scroll-triggered required)
   The bars use IntersectionObserver in main.js
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* =========================================
   BREADCRUMBS (shared, e.g. author + post pages)
   ========================================= */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--muted);
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--muted-strong);
    font-weight: 500;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs .bi {
    font-size: 0.66rem;
    color: var(--accent);
}

.breadcrumbs span[aria-current="page"] {
    color: var(--text);
    font-weight: 600;
}

/* =========================================
   AUTHOR ARCHIVE PAGE
   ========================================= */
.author-hero {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 32px;
    /* align-items: center; */
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--bg) 100%);
    border: 1px solid var(--primary-soft-border);
    border-radius: var(--radius-xl);
    padding: 36px 36px;
}

.author-hero__avatar img {
    width: 132px;
    height: 132px;
    border-radius: 50%;
}

.author-hero__content h1 {
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    margin: 6px 0 14px;
}

.author-hero__bio {
    font-size: 1rem;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 18px;
}

.author-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.author-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-2);
    font-weight: 500;
}

.author-meta-pill .bi {
    color: var(--primary);
    font-size: 0.82rem;
}

.author-hero__social {
    display: flex;
    gap: 8px;
}

.author-hero__social .icon-btn {
    background: var(--bg);
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .author-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 28px 22px;
        gap: 22px;
    }

    .author-hero__avatar {
        margin: 0 auto;
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }

    .author-hero__bio {
        margin-left: auto;
        margin-right: auto;
    }

    .author-hero__meta,
    .author-hero__social {
        justify-content: center;
    }
}

.author-featured {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.author-featured:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.author-featured__cover {
    height: 200px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-soft-2), var(--bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary);
}

.author-featured__body h3 {
    font-size: 1.5rem;
    margin: 8px 0 12px;
    line-height: 1.3;
}

.author-featured__body p {
    color: var(--text-2);
    margin-bottom: 14px;
}

.author-featured__meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted-strong);
    font-size: 0.86rem;
    font-family: var(--font-mono);
}

.author-featured__meta span:last-child {
    color: var(--primary);
    font-weight: 600;
}

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

    .author-featured__cover {
        height: 160px;
        font-size: 3rem;
    }
}

/* Other authors grid (related) */
.other-authors-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-card);
}

@media (min-width: 768px) {
    .other-authors-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.other-author-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.other-author-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.other-author-card .member-avatar {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    margin: 0;
    font-size: 1rem;
}

.other-author-card .member-name {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.other-author-card .member-role {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    font-weight: 600;
}

.other-author-card .member-bio {
    font-size: 0.86rem;
    color: var(--muted-strong);
    line-height: 1.55;
}

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination__page,
.pagination__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    justify-content: center;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.pagination__page:hover,
.pagination__btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.pagination__page.is-active {
    background: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
}

.pagination__page.is-active:hover {
    background: var(--primary-hover);
    color: var(--bg);
    border-color: var(--primary-hover);
}

.pagination__btn--disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* =========================================
   LEGAL / POLICY PAGE (terms, privacy, etc.)
   Generic prose layout for boilerplate content
   ========================================= */
.legal-layout {
    /*display: grid;*/
    /*grid-template-columns: 240px minmax(0, 1fr);*/
    /*gap: 48px;*/
    /*align-items: start;*/
}

.legal-aside {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.legal-aside h4 {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted-strong);
    margin-bottom: 12px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.legal-aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-aside li {
    margin-bottom: 2px;
}

.legal-aside a {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 0.86rem;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.legal-aside a:hover,
.legal-aside a.is-active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.legal-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 44px;
    /*max-width: 760px;*/
}

.legal-content h1 {
    font-size: clamp(1.8rem, 3.4vw, 2.4rem);
    margin-bottom: 8px;
}

.legal-content>.updated {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 28px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.legal-content h2 {
    font-size: 1.4rem;
    margin: 36px 0 14px;
    padding-top: 8px;
    color: var(--text);
}

.legal-content h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
}

.legal-content h3 {
    font-size: 1.1rem;
    margin: 22px 0 10px;
    color: var(--text);
}

.legal-content p {
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--text-2);
    margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 18px 22px;
    padding: 0;
    color: var(--text-2);
}

.legal-content li {
    margin-bottom: 8px;
    font-size: 0.98rem;
    line-height: 1.7;
}

.legal-content strong {
    color: var(--text);
    font-weight: 600;
}

.legal-content blockquote {
    border-left: 3px solid var(--primary);
    background: var(--primary-soft);
    padding: 14px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 20px 0;
    font-size: 0.94rem;
    color: var(--text);
}

.legal-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.legal-content a:hover {
    color: var(--primary-hover);
}

@media (max-width: 992px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .legal-aside {
        position: static;
    }

    .legal-content {
        padding: 28px 24px;
    }
}

/* DISCUSSION SECTION */
.comments {
    margin: 56px 0 0;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.comments__head {
    margin-bottom: 28px;
}

.comments__title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(1.4rem, 2.4vw, 1.75rem);
    margin: 6px 0 8px;
    color: var(--text);
    letter-spacing: -0.025em;
}

.comments__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 26px;
    padding: 0 10px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
}

.comments__lede {
    color: var(--muted-strong);
    font-size: 0.96rem;
    line-height: 1.6;
}

/* ----- Composer ----- */
.comments__composer {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 32px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.comments__composer:focus-within {
    border-color: var(--primary-soft-border);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.comments__textarea {
    width: 100%;
    min-height: 84px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-soft);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    outline: 0;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.comments__textarea::placeholder {
    color: var(--muted);
}

.comments__textarea:focus {
    border-color: var(--primary);
    background: #fff;
}

.comments__composer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.comments__hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.comments__hint .bi {
    color: var(--muted);
    font-size: 0.86rem;
}

/* Composer — guest variant (sign-in CTA) */
.comments__composer--guest {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, var(--primary-soft) 0%, #fff 100%);
    border-color: var(--primary-soft-border);
    padding: 22px;
}

.comments__composer--guest:focus-within {
    box-shadow: none;
}

.comments__composer-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 1px solid var(--primary-soft-border);
}

.comments__composer-msg {
    flex: 1;
    min-width: 0;
}

.comments__composer-msg strong {
    display: block;
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.comments__composer-msg p {
    color: var(--muted-strong);
    font-size: 0.86rem;
    line-height: 1.5;
    margin: 0;
}

/* ----- Comment list ----- */
.comments__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: border-color 0.18s ease;
}

.comment:hover {
    border-color: var(--border-strong);
}

.comment__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* Avatar */
.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--bg-muted);
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border);
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comment-avatar--sm {
    width: 36px;
    height: 36px;
}

.comment__meta {
    min-width: 0;
    flex: 1;
}

.comment__name {
    font-family: var(--font-display);
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment__date {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--muted);
    margin-top: 2px;
    letter-spacing: 0.01em;
}

.comment__body {
    color: var(--text-2);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 12px;
}

.comment__body p {
    margin: 0;
    color: var(--text-2);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* Actions row */
.comment__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment__reply-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius);
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted-strong);
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.comment__reply-toggle:hover,
.comment__reply-toggle[aria-expanded="true"] {
    background: var(--primary-soft);
    color: var(--primary-hover);
    border-color: var(--primary-soft-border);
}

.comment__reply-toggle .bi {
    font-size: 0.86rem;
}

.comment__guest-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius);
    color: var(--muted-strong);
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.16s ease, background-color 0.16s ease;
}

.comment__guest-link:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

/* ----- Reply form (collapsible) ----- */
.comment__reply-form {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.28s ease, opacity 0.2s ease, margin-top 0.28s ease;
    margin-top: 0;
}

.comment__reply-form.is-open {
    max-height: 600px;
    opacity: 1;
    margin-top: 14px;
}

.comment__reply-form-inner {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

.comment__reply-form-inner .comments__textarea {
    background: #fff;
    min-height: 64px;
}

.comment__reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

/* ----- Replies thread ----- */
.comment__replies {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    border-left: 2px solid var(--primary-soft-border);
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-reply {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.comment-reply .comment__head {
    margin-bottom: 10px;
}

.comment-reply .comment__body {
    margin-bottom: 0;
    font-size: 0.92rem;
}

/* ----- Empty state ----- */
.comments__empty {
    background: var(--bg-soft);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
}

.comments__empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 14px;
}

.comments__empty h3 {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 4px;
}

.comments__empty p {
    color: var(--muted-strong);
    font-size: 0.9rem;
    margin: 0;
}

/* ----- Ghost button (used by Cancel) ----- */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    text-decoration: none;
}

.btn-ghost:hover {
    background: var(--bg-soft);
    border-color: var(--border-strong);
    color: var(--text);
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
    .comments {
        margin-top: 40px;
        padding-top: 32px;
    }

    .comment {
        padding: 18px;
    }

    .comment-avatar {
        width: 38px;
        height: 38px;
    }

    .comment-avatar--sm {
        width: 32px;
        height: 32px;
    }

    .comment__replies {
        padding-left: 12px;
        margin-top: 14px;
        gap: 12px;
    }

    .comment-reply {
        padding: 14px;
    }

    .comments__composer {
        padding: 14px;
    }

    .comments__composer--guest {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 20px;
    }

    .comments__composer--guest .btn {
        width: 100%;
        justify-content: center;
    }

    .comments__composer-actions {
        gap: 10px;
    }

    .comments__composer-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .comments__hint {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .comment__reply-form-actions {
        flex-direction: column-reverse;
    }

    .comment__reply-form-actions .btn,
    .comment__reply-form-actions .btn-ghost {
        width: 100%;
        justify-content: center;
    }
}

.insights-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-card);
}

@media (min-width: 768px) {
    .insights-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.insight-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    position: relative;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.insight-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.insight-card__label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    margin-bottom: 12px;
}

.insight-card--liked .insight-card__label {
    color: var(--success);
}

.insight-card--issue .insight-card__label {
    color: var(--danger);
}

.insight-card__text {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text);
    font-size: 0.96rem;
    line-height: 1.55;
    font-weight: 500;
    margin: 0;
}

.insight-card__emoji {
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .insight-card {
        padding: 18px 20px;
    }
}

/* =========================================
   PRINT
   ========================================= */
@media print {

    .site-header,
    .site-footer,
    .nav-toggle,
    .mobile-nav,
    .search-popup,
    .ui-backdrop,
    .read-progress,
    .newsletter-wrap,
    .cta-band {
        display: none !important;
    }

    body {
        background: var(--bg);
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* ========== Review CSS ==========  */

.ureview {
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.ureview__head {
    margin-bottom: 28px;
}

.ureview__head h2 {
    margin: -10px 0 0;
    letter-spacing: -0.025em;
}

.ureview__flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.ureview__flash--ok {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid var(--success);
}

.ureview__flash--err {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.ureview-summary {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 1.4fr 1.4fr;
    gap: 32px;
    align-items: start;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 28px;
}

.ureview-summary__score {
    text-align: center;
}

.ureview-summary__num {
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 6px;
}

.ureview-summary__stars {
    color: var(--accent);
    font-size: 1.15rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.ureview-summary__stars .bi-star {
    color: var(--border-strong);
}

.ureview-summary__total {
    font-size: 0.84rem;
    color: var(--muted);
}

.ureview-summary__rec {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--success-soft);
    color: var(--success);
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 10px;
}

.ureview-summary__dist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ureview-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
}

.ureview-bar-row__label {
    color: var(--muted-strong);
    min-width: 36px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.ureview-bar-row__label .bi {
    color: var(--accent);
    font-size: 0.74rem;
}

.ureview-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-muted);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.ureview-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    border-radius: var(--radius-pill);
}

.ureview-bar-row__count {
    color: var(--muted);
    min-width: 24px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.ureview-summary__dims {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 28px;
    border-left: 1px solid var(--border);
}

.ureview-dim {
    display: grid;
    grid-template-columns: 80px 1fr 30px;
    gap: 10px;
    align-items: center;
    font-size: 0.84rem;
}

.ureview-dim__name {
    color: var(--muted-strong);
    font-weight: 500;
}

.ureview-dim__bar {
    height: 6px;
    background: var(--bg-muted);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.ureview-dim__fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-pill);
}

.ureview-dim__num {
    color: var(--text);
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    text-align: right;
}

@media (max-width: 820px) {
    .ureview-summary {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 22px;
    }

    .ureview-summary__dims {
        padding-left: 0;
        border-left: 0;
        padding-top: 22px;
        border-top: 1px solid var(--border);
    }
}

.ureview-cta,
.ureview-notice {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, var(--primary-soft), #fff);
    border: 1px solid var(--primary-soft-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 32px;
}

.ureview-cta__icon,
.ureview-notice .bi {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary-soft-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ureview-cta__msg,
.ureview-notice>div {
    flex: 1;
}

.ureview-cta__msg strong,
.ureview-notice strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.ureview-cta__msg p,
.ureview-notice p {
    color: var(--muted-strong);
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 540px) {

    .ureview-cta,
    .ureview-notice {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .ureview-cta .btn {
        width: 100%;
        justify-content: center;
    }
}

.ureview-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 32px;
}

.ureview-form__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0 0 4px;
    color: var(--text);
}

.ureview-form__sub {
    color: var(--muted-strong);
    font-size: 0.92rem;
    margin: 0 0 22px;
}

.ureview-form__field {
    margin-bottom: 22px;
    border: 0;
    padding: 0;
}

.ureview-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ureview-form__row .ureview-form__field {
    margin-bottom: 22px;
}

.ureview-form__label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.ureview-form__label small {
    font-weight: 400;
    color: var(--muted);
    margin-left: 4px;
}

.ureview-form__req {
    color: var(--danger);
    margin-left: 2px;
}

.ureview-form__input,
.ureview-form__textarea,
.ureview-form__select {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.94rem;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
    outline: 0;
}

.ureview-form__textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.55;
}

.ureview-form__input::placeholder,
.ureview-form__textarea::placeholder {
    color: var(--muted);
}

.ureview-form__input:focus,
.ureview-form__textarea:focus,
.ureview-form__select:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.ureview-form__count {
    display: block;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--muted);
    margin-top: 6px;
}

.ureview-form__count.is-near {
    color: var(--warning);
}

.ureview-form__count.is-over {
    color: var(--danger);
}

.ureview-stars {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ureview-star {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 4px;
    color: var(--border-strong);
    font-size: 1.55rem;
    line-height: 1;
    transition: color 0.12s ease, transform 0.12s ease;
}

.ureview-star:hover,
.ureview-star:focus-visible {
    color: var(--accent);
    transform: scale(1.06);
    outline: 0;
}

.ureview-star.is-active {
    color: var(--accent);
}

.ureview-stars--sm .ureview-star {
    font-size: 1.05rem;
    padding: 2px;
}

.ureview-stars__hint {
    font-size: 0.82rem;
    color: var(--muted);
    margin-left: 10px;
    font-style: italic;
}

.ureview-stars[data-set="true"] .ureview-stars__hint {
    display: none;
}

.ureview-form__subratings {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
}

.ureview-subrating {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.ureview-subrating+.ureview-subrating {
    border-top: 1px dashed var(--border);
}

.ureview-subrating__label {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
}

.ureview-toggle-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ureview-toggle {
    flex: 1;
    min-width: 160px;
    cursor: pointer;
}

.ureview-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ureview-toggle span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.16s ease;
}

.ureview-toggle:hover span {
    border-color: var(--border-strong);
    background: #fff;
}

.ureview-toggle input:checked+span {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-hover);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.ureview-toggle input:focus-visible+span {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.ureview-form__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    margin-top: 22px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.ureview-form__hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.82rem;
}

.ureview-form__hint .bi {
    color: var(--muted);
}

@media (max-width: 640px) {
    .ureview-form {
        padding: 22px 18px;
    }

    .ureview-form__row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ureview-form__actions .btn {
        width: 100%;
        justify-content: center;
        order: -1;
    }

    .ureview-form__hint {
        width: 100%;
    }
}

.ureview-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.ureview-controls__count {
    font-size: 0.88rem;
    color: var(--muted-strong);
    font-weight: 500;
}

.ureview-controls__sort {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
}

.ureview-controls__sort label {
    color: var(--muted-strong);
    font-weight: 500;
}

.ureview-controls__sort select {
    padding: 7px 30px 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2364748b'><path d='M4 6l4 4 4-4z'/></svg>") no-repeat right 8px center;
    appearance: none;
    -webkit-appearance: none;
    font-size: 0.86rem;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}

.ureview-controls__sort select:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.ureview-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ureview-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color 0.18s ease;
}

.ureview-card:hover {
    border-color: var(--border-strong);
}

.ureview-card--own {
    background: var(--primary-soft);
    border-color: var(--primary-soft-border);
}

.ureview-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.ureview-card__user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.ureview-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    flex-shrink: 0;
    overflow: hidden;
}

.ureview-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--radius);
}

.ureview-card__user-meta {
    min-width: 0;
    flex: 1;
}

.ureview-card__name {
    font-family: var(--font-display);
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ureview-card__you {
    background: var(--primary);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ureview-card__date {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--muted);
    margin-top: 2px;
    text-transform: lowercase;
}

.ureview-card__rating {
    text-align: right;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ureview-card__stars {
    color: var(--accent);
    font-size: 0.96rem;
    letter-spacing: 1px;
}

.ureview-card__stars .bi-star {
    color: var(--border-strong);
}

.ureview-card__rating-num {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    color: var(--text);
    font-weight: 700;
}

.ureview-card__title {
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.ureview-card__content {
    color: var(--text-2);
    font-size: 0.94rem;
    line-height: 1.65;
    margin: 0 0 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ureview-card__pc {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.ureview-card__pc-block {
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid;
}

.ureview-card__pc-block--pros {
    background: var(--success-soft);
    border-color: #bbf7d0;
}

.ureview-card__pc-block--cons {
    background: var(--danger-soft);
    border-color: #fecaca;
}

.ureview-card__pc-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin-bottom: 6px;
}

.ureview-card__pc-block--pros .ureview-card__pc-label {
    color: var(--success);
}

.ureview-card__pc-block--cons .ureview-card__pc-label {
    color: var(--danger);
}

.ureview-card__pc-block p {
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 560px) {
    .ureview-card__pc {
        grid-template-columns: 1fr;
    }
}

.ureview-card__subs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.ureview-card__sub {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--muted-strong);
}

.ureview-card__sub strong {
    color: var(--text);
    font-family: var(--font-mono);
    font-weight: 700;
}

.ureview-card__sub span {
    color: var(--muted);
}

.ureview-card__foot {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.ureview-card--own .ureview-card__foot {
    border-top-color: var(--primary-soft-border);
}

.ureview-card__rec {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
}

.ureview-card__rec--yes {
    background: var(--success-soft);
    color: var(--success);
}

.ureview-card__rec--no {
    background: var(--danger-soft);
    color: var(--danger);
}

@media (max-width: 540px) {
    .ureview-card {
        padding: 18px;
    }

    .ureview-card__head {
        gap: 10px;
    }

    .ureview-card__avatar {
        width: 38px;
        height: 38px;
    }
}

/* ----- Empty state ----- */
.ureview-empty {
    background: var(--bg-soft);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 50px 24px;
    text-align: center;
}

.ureview-empty__icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.ureview-empty h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.ureview-empty p {
    color: var(--muted-strong);
    font-size: 0.92rem;
    margin: 0;
}

/* ======= Profile Settings ======  */

.settings {
    max-width: 760px;
    margin: 0 auto;
}

.settings__head {
    margin-bottom: 32px;
}

.settings__head h1 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin: 6px 0 8px;
    letter-spacing: -0.025em;
}

.settings__lede {
    color: var(--muted-strong);
    font-size: 0.96rem;
    line-height: 1.6;
}

/* Flash messages */
.settings-flash {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.settings-flash--ok {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.settings-flash--err {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.settings-flash .bi {
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.settings-flash ul {
    margin: 6px 0 0 18px;
    padding: 0;
}

.settings-flash li {
    margin-bottom: 2px;
}

.settings-flash strong {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}

/* Cards */
.settings__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.settings-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-card__head {
    padding: 22px 26px 0;
    margin-bottom: 18px;
}

.settings-card__head h2 {
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.settings-card__head p {
    color: var(--muted-strong);
    font-size: 0.88rem;
    margin: 0;
}

.settings-card__body {
    padding: 0 26px 26px;
}

/* Fields */
.settings-field {
    margin-bottom: 18px;
}

.settings-field:last-child {
    margin-bottom: 0;
}

.settings-field label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.settings-req {
    color: var(--danger);
    margin-left: 2px;
}

.settings-input,
.settings-textarea,
.settings-input-prefixed input,
.settings-input-iconed input,
.settings-input-toggle input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.94rem;
    outline: 0;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.settings-textarea {
    min-height: 88px;
    resize: vertical;
    line-height: 1.55;
}

.settings-input::placeholder,
.settings-textarea::placeholder,
.settings-input-prefixed input::placeholder,
.settings-input-iconed input::placeholder,
.settings-input-toggle input::placeholder {
    color: var(--muted);
}

.settings-input:focus,
.settings-textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.settings-input:disabled,
.settings-textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Two-column grid (collapses on mobile) */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.settings-grid>.settings-field {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Input with @ prefix */
.settings-input-prefixed {
    display: flex;
    align-items: stretch;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.settings-input-prefixed:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.settings-input-prefixed__prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: transparent;
    color: var(--muted-strong);
    font-family: var(--font-mono);
    font-size: 0.96rem;
    font-weight: 600;
    border-right: 1px solid var(--border);
}

.settings-input-prefixed:focus-within .settings-input-prefixed__prefix {
    color: var(--primary);
    border-right-color: var(--primary-soft-border);
}

.settings-input-prefixed input {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.settings-input-prefixed input:focus {
    background: transparent;
    box-shadow: none;
}

/* Input with leading icon */
.settings-input-iconed {
    display: flex;
    align-items: center;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding-left: 14px;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.settings-input-iconed:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.settings-input-iconed .bi {
    color: var(--muted-strong);
    font-size: 1rem;
    flex-shrink: 0;
}

.settings-input-iconed:focus-within .bi {
    color: var(--primary);
}

.settings-input-iconed input {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding-left: 10px;
}

.settings-input-iconed input:focus {
    background: transparent;
    box-shadow: none;
}

/* Password input with show/hide toggle */
.settings-input-toggle {
    position: relative;
    display: flex;
    align-items: stretch;
}

.settings-input-toggle input {
    padding-right: 44px;
}

.settings-input-toggle button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--muted-strong);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.settings-input-toggle button:hover {
    background: var(--bg-muted);
    color: var(--text);
}

/* Hint + counter */
.settings-hint,
.settings-counter {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-top: 6px;
    line-height: 1.5;
}

.settings-counter {
    text-align: right;
    font-family: var(--font-mono);
}

.settings-counter.is-near {
    color: var(--warning);
}

.settings-counter.is-over {
    color: var(--danger);
}

/* Profile picture upload */
.pic-upload {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.pic-upload__preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
}

.pic-upload__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pic-upload__controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.pic-upload__controls .btn {
    cursor: pointer;
}

.pic-upload__controls>.btn+.btn {
    margin-left: 0;
}

.pic-upload__controls>.settings-hint {
    margin-top: 4px;
}

@media (max-width: 540px) {
    .pic-upload {
        gap: 16px;
    }

    .pic-upload__preview {
        width: 80px;
        height: 80px;
    }

    .pic-upload__controls .btn {
        width: auto;
    }
}

/* Submit row */
.settings-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

@media (max-width: 540px) {
    .settings-card__head {
        padding: 18px 18px 0;
        margin-bottom: 14px;
    }

    .settings-card__body {
        padding: 0 18px 18px;
    }

    .settings-actions {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 8px;
    }

    .settings-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ======= Auth Pages CSS ========  */

/* =========================================
   AUTH PAGES — Login, Signup, Reset
   ========================================= */
.auth-page {
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    background: var(--bg-soft);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    box-shadow: var(--shadow-sm);
}

/* Heading area */
.auth-head {
    text-align: center;
    margin-bottom: 26px;
}

.auth-head h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 6px;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

.auth-head p {
    color: var(--muted-strong);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0;
}

/* Flash messages */
.auth-flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 0.86rem;
    line-height: 1.5;
}

.auth-flash--ok {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.auth-flash--err {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.auth-flash .bi {
    font-size: 1rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.auth-flash p {
    margin: 0;
}

.auth-flash strong {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    margin: 0;
}

.auth-field__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-field__label-link {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-field__label-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.auth-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.94rem;
    outline: 0;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-input::placeholder {
    color: var(--muted);
}

.auth-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.auth-field__hint {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-top: 6px;
    line-height: 1.5;
}

/* Password input with show/hide */
.auth-input-toggle {
    position: relative;
}

.auth-input-toggle .auth-input {
    padding-right: 44px;
}

.auth-input-toggle button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--muted-strong);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.auth-input-toggle button:hover {
    background: var(--bg-muted);
    color: var(--text);
}

/* Submit */
.auth-submit {
    width: 100%;
    padding: 12px 16px;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.94rem;
    cursor: pointer;
    transition: background-color 0.18s ease, opacity 0.18s ease;
    margin-top: 6px;
}

.auth-submit:hover {
    background: var(--primary-hover);
}

.auth-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

/* Footer links */
.auth-meta {
    text-align: center;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted-strong);
    font-size: 0.88rem;
    line-height: 1.5;
}

.auth-meta a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-meta a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.auth-meta__row+.auth-meta__row {
    margin-top: 4px;
}

/* Mobile */
@media (max-width: 480px) {
    .auth-page {
        padding: 24px 12px;
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: var(--radius-lg);
    }

    .auth-head h1 {
        font-size: 1.35rem;
    }
}

.version-dropdown {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-family: var(--font-body);
    color: var(--text-2);
    font-size: 0.95rem;
    min-width: 200px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.version-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-soft);
}

.version-dropdown option {
    padding: 6px 10px;
    font-family: var(--font-body);
    color: var(--text-2);
}

/* ======== Timeline CSS =======  */

.vtl {
    position: relative;
    padding: 0;
    margin: 0;
}

/* The spine */
.vtl::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
    border-radius: 1px;
}

.vtl__item {
    position: relative;
    padding-left: 36px;
    padding-bottom: 40px;
}

.vtl__item:last-child {
    padding-bottom: 0;
}

/* Dot marker */
.vtl__dot {
    position: absolute;
    left: 0;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border-strong);
    box-shadow: 0 0 0 4px #fff;
    /* punches a hole through the spine */
    z-index: 1;
}

/* Latest entry — pulsing blue dot */
.vtl__item--latest .vtl__dot {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--primary-soft);
    animation: vtl-pulse 2.4s ease-in-out infinite;
}

@keyframes vtl-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--primary-soft);
    }

    50% {
        box-shadow: 0 0 0 4px #fff, 0 0 0 10px var(--primary-soft);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vtl__item--latest .vtl__dot {
        animation: none;
    }
}

/* Date + badge row */
.vtl__head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.vtl__date {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    font-weight: 700;
}

.vtl__item--latest .vtl__date {
    color: var(--primary-hover);
}

/* Title */
.vtl__title {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

/* Rich content area (prose styles) */
.vtl__content {
    color: var(--text-2);
    font-size: 0.94rem;
    line-height: 1.7;
}

.vtl__content>*:first-child {
    margin-top: 0;
}

.vtl__content>*:last-child {
    margin-bottom: 0;
}

.vtl__content p {
    margin: 0 0 14px;
    color: var(--text-2);
    line-height: 1.7;
}

.vtl__content h4 {
    font-family: var(--font-display);
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text);
    margin: 22px 0 10px;
    letter-spacing: -0.005em;
}

.vtl__content h5 {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted-strong);
    margin: 18px 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.vtl__content ul,
.vtl__content ol {
    margin: 0 0 14px 22px;
    padding: 0;
}

.vtl__content li {
    margin-bottom: 6px;
    color: var(--text-2);
    line-height: 1.65;
}

.vtl__content li::marker {
    color: var(--muted);
}

.vtl__content strong {
    color: var(--text);
    font-weight: 600;
}

.vtl__content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.vtl__content a:hover {
    color: var(--primary-hover);
}

/* Images & figures */
.vtl__content figure {
    margin: 16px 0;
}

.vtl__content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    /* margin: 0 auto; */
}

.vtl__content>img {
    margin: 16px 0;
}

.vtl__content figcaption {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 8px;
    text-align: center;
    line-height: 1.5;
}

/* Blockquote */
.vtl__content blockquote {
    border-left: 3px solid var(--primary);
    background: var(--primary-soft);
    padding: 14px 18px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 16px 0;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.6;
}

.vtl__content blockquote p:last-child {
    margin-bottom: 0;
}

/* Inline code & pre */
.vtl__content code {
    font-family: var(--font-mono);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.86em;
    color: var(--text);
}

.vtl__content pre {
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    overflow-x: auto;
    margin: 16px 0;
    font-size: 0.86rem;
    line-height: 1.55;
}

.vtl__content pre code {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 1em;
}

.vtl__content hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* Mobile */
@media (max-width: 640px) {
    .vtl::before {
        left: 5px;
    }

    .vtl__item {
        padding-left: 28px;
        padding-bottom: 32px;
    }

    .vtl__dot {
        width: 12px;
        height: 12px;
        top: 8px;
    }

    .vtl__title {
        font-size: 1.05rem;
    }

    .vtl__content {
        font-size: 0.92rem;
    }

    .vtl__content figure,
    .vtl__content>img {
        margin: 12px 0;
    }
}

/* ======== Change Log Table ========== */

.clog {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.clog:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.clog__table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 0.92rem;
}

.clog__table thead th {
    background: var(--bg-soft);
    color: var(--muted-strong);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: left;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.clog__table tbody tr {
    transition: background-color 0.16s ease;
}

.clog__table tbody tr:hover {
    background: var(--bg-soft);
}

.clog__table tbody td {
    padding: 16px 18px;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    line-height: 1.5;
    vertical-align: top;
}

.clog__table tbody tr:last-child td {
    border-bottom: 0;
}

.clog__row--latest {
    background: var(--primary-soft);
}

.clog__row--latest:hover {
    background: var(--primary-soft);
}

.clog__row--latest td:first-child {
    box-shadow: inset 3px 0 0 var(--primary);
}

.clog__table time {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.clog__version {
    display: inline-block;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.clog__row--latest .clog__version {
    background: #fff;
    border-color: var(--primary-soft-border);
    color: var(--primary-hover);
}

.clog__table td strong {
    color: var(--text);
    font-weight: 700;
}

.clog__table td a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.clog__table td a:hover {
    color: var(--primary-hover);
}

.clog__footnote {
    margin-top: 14px;
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clog__footnote .bi {
    color: var(--muted);
    font-size: 0.94rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.clog__footnote a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.clog__footnote a:hover {
    color: var(--primary-hover);
}

.clog__badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4px 10px 2px 10px;
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 2px 8px 2px 0;
    vertical-align: middle;
    white-space: nowrap;
}

.clog__badge--initial {
    background: var(--success-soft);
    color: var(--success);
}

@media (max-width: 768px) {
    .clog {
        border: 0;
        background: transparent;
        overflow: visible;
    }

    .clog__table {
        min-width: 0;
    }

    .clog__table thead {
        display: none;
    }

    .clog__table tbody {
        display: block;
    }

    .clog__table tr {
        display: block;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 6px 16px;
        margin-bottom: 12px;
    }

    .clog__row--latest {
        background: var(--primary-soft);
        border-color: var(--primary-soft-border);
    }

    .clog__row--latest td:first-child {
        box-shadow: none;
    }

    .clog__table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 14px;
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
        vertical-align: baseline;
    }

    .clog__row--latest td {
        border-bottom-color: var(--primary-soft-border);
    }

    .clog__table td:last-child {
        border-bottom: 0;
    }

    .clog__table td::before {
        content: attr(data-label);
        font-family: var(--font-mono);
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--muted-strong);
        flex-shrink: 0;
        padding-top: 2px;
    }

    .clog__table td>* {
        text-align: right;
    }

    .clog__table td[data-label="Remarks"] {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .clog__table td[data-label="Remarks"]>* {
        text-align: left;
    }

    .clog__footnote {
        padding: 0 4px;
    }
}

@media (max-width: 480px) {
    .clog__table tr {
        padding: 4px 14px;
    }

    .clog__table td {
        padding: 10px 0;
    }
}