/* ====================================================================
   LEGAL-HUB-PAGE - TickerChats legal home

   BEM block: legal-hub-page__*
   Consumes shared design tokens from shared/browser/design_tokens.css.
   Buttons use the shared .btn / .btn--ghost system from buttons.css.
   ==================================================================== */

/* Floating theme toggle slot - mounted by /legal/legal-page-init.js.
   The ThemeToggle component adds `.theme-toggle` which carries
   `position: relative` from theme_toggle.css. We need `position: fixed`
   to win, so the selector below combines both classes for higher
   specificity (0,2,0 beats `.theme-toggle` at 0,1,0) regardless of which
   stylesheet loads later. */
.legal-page__theme-slot.legal-page__theme-slot {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 50;
    background: var(--surface);
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-soft);
}

body.legal-hub-page {
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.16), transparent 28%),
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.18), transparent 24%),
        var(--canvas);
}

.legal-hub-page__shell {
    min-height: 100vh;
    padding: 28px 16px 44px;
}

.legal-hub-page__card {
    max-width: 1160px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 24px;
    box-shadow: var(--shadow-pop);
    overflow: hidden;
}

.legal-hub-page__hero {
    padding: 34px 34px 28px;
    background: linear-gradient(135deg, var(--iris-2) 0%, var(--iris) 48%, var(--violet) 100%);
    color: #ffffff;
}

.legal-hub-page__hero-top,
.legal-hub-page__meta,
.legal-hub-page__footer,
.legal-hub-page__footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.legal-hub-page__hero-top {
    gap: 16px;
}

.legal-hub-page__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.24rem;
    color: inherit;
    text-decoration: none;
}

.legal-hub-page__logo-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
}
.legal-hub-page__logo-img {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
}

.legal-hub-page__eyebrow,
.legal-hub-page__meta-item,
.legal-hub-page__doc-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

/* Page-local icon sizing for inline SVGs that replaced the prior FontAwesome
   <i> tags. Width/height match the rendered FA icon size at the page base
   font, and `currentColor` is inherited from the parent badge text color. */
.legal-hub-page__icon {
    display: inline-block;
    flex: none;
    width: 14px;
    height: 14px;
    vertical-align: -2px;
}

.legal-hub-page__eyebrow {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.14);
}

.legal-hub-page__title {
    max-width: 760px;
    margin: 18px 0 12px;
    font-size: clamp(32px, 4.5vw, 48px);
    line-height: 1.04;
    letter-spacing: -0.01em;
}

.legal-hub-page__intro {
    max-width: 780px;
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
}

.legal-hub-page__meta {
    gap: 12px;
    margin-top: 24px;
}

.legal-hub-page__meta-item {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.12);
}

.legal-hub-page__content {
    padding: 30px 34px 34px;
}

.legal-hub-page__highlight-grid,
.legal-hub-page__grid {
    display: grid;
    gap: 18px;
}

.legal-hub-page__highlight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 34px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--hairline);
}

.legal-hub-page__highlight-card,
.legal-hub-page__doc-card,
.legal-hub-page__note {
    border: 1px solid var(--hairline);
    border-radius: 20px;
    background: var(--surface);
}

.legal-hub-page__highlight-card {
    padding: 20px;
    background: var(--surface-2);
}

.legal-hub-page__highlight-card h2,
.legal-hub-page__note h2,
.legal-hub-page__section-head h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.legal-hub-page__highlight-card p,
.legal-hub-page__section-head p,
.legal-hub-page__note p {
    margin: 0;
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-2);
}

.legal-hub-page__section + .legal-hub-page__section,
.legal-hub-page__note {
    margin-top: 28px;
}

.legal-hub-page__section-head {
    margin-bottom: 16px;
}

.legal-hub-page__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.legal-hub-page__doc-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    will-change: transform;
    backface-visibility: hidden;
}

.legal-hub-page__doc-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--iris) 40%, var(--hairline));
    box-shadow: var(--shadow-soft);
}

.legal-hub-page__doc-tag {
    width: fit-content;
    padding: 7px 10px;
    background: var(--iris-tint);
    color: var(--iris);
}

.legal-hub-page__doc-card h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
    color: var(--text);
    letter-spacing: -0.01em;
}

.legal-hub-page__doc-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-2);
}

.legal-hub-page__doc-meta {
    margin-top: auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-3);
}

.legal-hub-page__footer {
    justify-content: space-between;
    gap: 14px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--hairline);
    font-size: 14px;
    color: var(--text-2);
}

.legal-hub-page__footer-links {
    gap: 14px;
}

.legal-hub-page__footer a {
    color: var(--iris);
    text-decoration: none;
}

.legal-hub-page__footer a:hover {
    text-decoration: underline;
}

@media (max-width: 960px) {
    .legal-hub-page__highlight-grid,
    .legal-hub-page__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .legal-hub-page__hero,
    .legal-hub-page__content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .legal-hub-page__shell {
        padding-top: 16px;
        padding-bottom: 24px;
    }

    .legal-hub-page__card {
        border-radius: 20px;
    }
}
