/* ============================================================
   Legal pages — Privacy Policy, Terms of Use
   ============================================================ */

.legal-hero {
    padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) var(--pad) clamp(40px, 6vw, 72px);
    position: relative;
}

.legal-hero .wrap {
    max-width: 920px;
}

.legal-hero h1.display {
    font-size: clamp(2rem, 5vw, 3.4rem);
    margin-top: 1rem;
    text-transform: none;
    letter-spacing: -0.02em;
    line-height: 1.08;
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    margin-top: 1.25rem;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.legal-meta strong {
    color: var(--ink);
    font-weight: 600;
}

.legal-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(32px, 5vw, 56px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--pad) clamp(80px, 10vw, 140px);
}

@media (min-width: 1024px) {
    .legal-shell {
        grid-template-columns: 240px minmax(0, 1fr);
        align-items: start;
    }
}

.legal-toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    padding: 20px 18px;
    border: 1px solid var(--border);
    border-radius: var(--glass-radius);
    background: var(--glass-fill);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
}

.legal-toc__label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
}

.legal-toc ol {
    list-style: none;
    counter-reset: legal-toc;
}

.legal-toc li {
    counter-increment: legal-toc;
    margin-bottom: 2px;
}

.legal-toc a {
    display: block;
    padding: 7px 0;
    font-size: 0.84rem;
    line-height: 1.35;
    color: var(--ink-soft);
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
    color: var(--gold);
}

.legal-toc a.is-active {
    color: var(--gold);
    font-weight: 600;
}

.legal-body {
    max-width: 760px;
}

.legal-intro {
    font-size: 1.05rem;
    line-height: 1.72;
    color: var(--ink-soft);
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.legal-intro p + p {
    margin-top: 1rem;
}

.legal-section {
    padding-bottom: 2.25rem;
    margin-bottom: 2.25rem;
    border-bottom: 1px solid var(--border);
}

.legal-section:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.legal-section h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 1.5rem 0 0.75rem;
}

.legal-section p {
    font-size: 0.98rem;
    line-height: 1.72;
    color: var(--ink-soft);
    margin-bottom: 0.85rem;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul {
    margin: 0.5rem 0 1rem;
    padding-left: 0;
    list-style: none;
}

.legal-section ul li {
    position: relative;
    padding-left: 1.35rem;
    margin-bottom: 0.45rem;
    font-size: 0.96rem;
    line-height: 1.65;
    color: var(--ink-soft);
}

.legal-section ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.75;
}

.legal-section a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.legal-section a:hover {
    color: var(--hover);
}

.legal-contact-block {
    margin-top: 1rem;
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(47, 111, 173, 0.04);
}

.legal-contact-block p {
    margin-bottom: 0.5rem;
}

.legal-contact-block p:last-child {
    margin-bottom: 0;
}

.legal-signoff {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.legal-signoff strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--ink);
    margin-bottom: 0.35rem;
}

.legal-signoff em {
    font-style: italic;
    font-size: 0.95rem;
    color: var(--ink-mute);
}

/* Dark theme */
html.theme-dark .legal-meta,
html.theme-dark .legal-meta strong {
    color: rgba(245, 242, 234, 0.72);
}

html.theme-dark .legal-meta strong {
    color: #F5F2EA;
}

html.theme-dark .legal-toc {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

html.theme-dark .legal-toc a {
    color: rgba(245, 242, 234, 0.58);
}

html.theme-dark .legal-toc a:hover,
html.theme-dark .legal-toc a.is-active {
    color: #D4AF37;
}

html.theme-dark .legal-section h2 {
    color: #F5F2EA;
}

html.theme-dark .legal-section p,
html.theme-dark .legal-section ul li {
    color: rgba(245, 242, 234, 0.64);
}

html.theme-dark .legal-contact-block {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

html.theme-dark .legal-signoff strong {
    color: #F5F2EA;
}

html.theme-dark .legal-signoff em {
    color: rgba(245, 242, 234, 0.5);
}

@media (max-width: 1023px) {
    .legal-toc {
        position: static;
        max-height: none;
    }

    .legal-toc ol {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 12px;
    }
}

@media (max-width: 600px) {
    .legal-toc ol {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   HTML Sitemap page
   ============================================================ */

.sitemap-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--pad) clamp(80px, 10vw, 140px);
}

.sitemap-intro {
    max-width: 720px;
    margin-bottom: clamp(40px, 6vw, 64px);
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.sitemap-intro p {
    font-size: 0.98rem;
    line-height: 1.72;
    color: var(--ink-soft);
    margin-bottom: 0.85rem;
}

.sitemap-intro p:last-child {
    margin-bottom: 0;
}

.sitemap-xml-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.sitemap-xml-link:hover {
    color: var(--hover);
    border-bottom-color: var(--hover);
}

.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 48px);
}

@media (min-width: 900px) {
    .sitemap-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.sitemap-group {
    padding: 1.35rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--glass-radius);
    background: var(--glass-fill);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
}

.sitemap-group h2 {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border);
}

.sitemap-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sitemap-list li {
    margin-bottom: 0.35rem;
}

.sitemap-list a {
    display: block;
    padding: 5px 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--ink-soft);
    transition: color 0.2s ease;
}

.sitemap-list a:hover,
.sitemap-list a:focus-visible {
    color: var(--gold);
}

.sitemap-list .sitemap-path {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-mute);
    margin-top: 1px;
}

.sitemap-subgroup {
    margin-top: 0.85rem;
}

.sitemap-subgroup:first-of-type {
    margin-top: 0;
}

.sitemap-subgroup h3 {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 0.45rem;
}

.sitemap-projects {
    margin-top: clamp(40px, 6vw, 64px);
    padding-top: clamp(32px, 5vw, 48px);
    border-top: 1px solid var(--border);
}

.sitemap-projects h2 {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.sitemap-projects .sitemap-lede {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--ink-soft);
    margin-bottom: 1.5rem;
    max-width: 640px;
}

.sitemap-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.sitemap-project-card {
    padding: 1.1rem 1.15rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(47, 111, 173, 0.04);
}

.sitemap-project-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.25rem;
}

.sitemap-project-card .sitemap-project-meta {
    font-size: 0.78rem;
    color: var(--ink-mute);
    margin-bottom: 0.65rem;
}

.sitemap-project-card a {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gold);
    text-decoration: none;
}

.sitemap-project-card a:hover {
    color: var(--hover);
}

html.theme-dark .sitemap-group {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

html.theme-dark .sitemap-group h2,
html.theme-dark .sitemap-projects h2,
html.theme-dark .sitemap-project-card h3 {
    color: #F5F2EA;
}

html.theme-dark .sitemap-intro p,
html.theme-dark .sitemap-projects .sitemap-lede,
html.theme-dark .sitemap-list a {
    color: rgba(245, 242, 234, 0.64);
}

html.theme-dark .sitemap-list .sitemap-path,
html.theme-dark .sitemap-subgroup h3,
html.theme-dark .sitemap-project-card .sitemap-project-meta {
    color: rgba(245, 242, 234, 0.45);
}

html.theme-dark .sitemap-project-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
    .sitemap-grid {
        grid-template-columns: 1fr;
    }
}
