/* Shared styles for legal/policy pages (/privacy/, /sms-terms/).
   Mirrors the design tokens and components in /index.html so the pages match. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #ffffff;
    --bg-soft: #f5f5f7;
    --ink: #1d1d1f;
    --slate: #6e6e73;
    --slate-light: #86868b;
    --line: #d2d2d7;
    --navy: #1f3a68;
    --navy-deep: #16294a;
    --navy-bright: #2f5aa8;
    --radius: 18px;
    --nav-h: 60px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 20px); }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 200;
    background: var(--navy); color: #fff; padding: .6em 1em; border-radius: 10px;
    font-size: .9rem; font-weight: 500; transition: top .2s;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--navy-bright); outline-offset: 3px; border-radius: 4px; }

/* ── NAV (same as homepage) ── */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    max-width: 1080px; margin: 0 auto; padding: 0 24px; height: var(--nav-h);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; }
.brand-name { font-size: .95rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-link, .nav-phone {
    font-size: .9rem; font-weight: 500; color: var(--ink);
    display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover, .nav-phone:hover { color: var(--navy-bright); }

/* ── BUTTONS ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-size: .94rem; font-weight: 500; letter-spacing: -.01em;
    padding: .72em 1.5em; border-radius: 980px; border: 1px solid transparent;
    cursor: pointer; white-space: nowrap;
    transition: background .25s, color .25s, border-color .25s, transform .15s;
}
.btn-sm { padding: .5em 1.1em; font-size: .85rem; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); background: rgba(31,58,104,.04); }
.btn:active { transform: scale(.98); }

/* ── PAGE HERO ── */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 3.5rem 0 3rem; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: .85rem; color: var(--slate); margin-bottom: 1.4rem; }
.crumbs a { color: var(--navy); font-weight: 500; }
.crumbs a:hover { color: var(--navy-bright); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .sep { color: var(--slate-light); }
.eyebrow {
    font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    color: var(--navy-bright); margin-bottom: .8rem;
}
.page-hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 600;
    letter-spacing: -.03em; line-height: 1.07; margin-bottom: 1rem;
}
.lede { font-size: clamp(1.02rem, 2vw, 1.18rem); color: var(--slate); max-width: 680px; line-height: 1.55; }
.meta { margin-top: 1.4rem; font-size: .85rem; color: var(--slate-light); }

/* ── AT-A-GLANCE CARDS ── */
.glance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 2.2rem; }
.glance-item { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.15rem 1.2rem; }
.glance-item .k { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-light); margin-bottom: .35rem; }
.glance-item .v { font-size: .98rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.glance-item .v code { font-family: inherit; color: var(--navy); }

/* ── LAYOUT: TOC + ARTICLE ── */
.legal { padding: 3.5rem 0 5rem; }
.legal-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; }

.toc { position: sticky; top: calc(var(--nav-h) + 24px); }
.toc-title { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-light); margin-bottom: .8rem; }
.toc ol { list-style: none; border-left: 1px solid var(--line); }
.toc li a {
    display: block; padding: .38rem 0 .38rem 1rem; margin-left: -1px;
    border-left: 2px solid transparent; font-size: .88rem; color: var(--slate); line-height: 1.35;
}
.toc li a:hover { color: var(--navy); border-left-color: var(--navy); }

.prose { max-width: 720px; }
.prose section { padding: 0; }
.prose section + section { margin-top: 2.6rem; padding-top: 2.6rem; border-top: 1px solid var(--line); }
.prose h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 1rem; }
.prose h3 { font-size: 1.02rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
.prose p, .prose li { font-size: 1rem; color: #3a3a3c; line-height: 1.7; }
.prose p + p, .prose ul + p, .prose .callout + p, .prose .keywords + p { margin-top: .9rem; }
.prose ul { margin: .8rem 0 0 1.25rem; }
.prose li + li { margin-top: .45rem; }
.prose li::marker { color: var(--navy-bright); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--navy-bright); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(47,90,168,.35); text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose a:hover { text-decoration-color: var(--navy-bright); }
.prose a.btn { text-decoration: none; color: var(--navy); font-weight: 500; }

.callout {
    margin-top: 1.2rem; padding: 1.2rem 1.3rem; border-radius: 14px;
    background: rgba(31,58,104,.05); border: 1px solid rgba(31,58,104,.14);
}
.callout p { color: var(--ink); }

.keywords { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 1.1rem; }
.keyword { border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; background: #fff; }
.keyword .word { display: inline-block; font-weight: 700; letter-spacing: .04em; color: #fff; background: var(--navy); border-radius: 8px; padding: .15em .6em; font-size: .9rem; margin-bottom: .55rem; }
.keyword p { font-size: .93rem; line-height: 1.55; }

.contact-card { margin-top: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: 1px; background: var(--line); }
.prose .contact-card a { overflow-wrap: normal; }
@media (max-width: 1100px) and (min-width: 769px) { .contact-card { grid-template-columns: 1fr 1fr; } .contact-card > div:first-child { grid-column: 1 / -1; } }
.contact-card > div { background: #fff; padding: 1.2rem 1.2rem; }
.contact-card .k { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-light); margin-bottom: .4rem; }
.contact-card .v { font-size: .95rem; font-weight: 500; color: var(--ink); line-height: 1.45; }
.prose .contact-card a { color: var(--ink); text-decoration: none; font-weight: 500; }
.prose .contact-card a:hover { color: var(--navy-bright); }

.related { margin-top: 3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.5rem 1.6rem; border-radius: var(--radius); background: var(--bg-soft); }
.related p { font-size: .95rem; color: var(--slate); }
.related p strong { display: block; color: var(--ink); font-size: 1.02rem; margin-bottom: .15rem; }

/* ── FOOTER (homepage footer + policy links) ── */
footer { border-top: 1px solid var(--line); padding: 2.5rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 40px; width: auto; }
.footer-brand span { font-size: .85rem; color: var(--slate); }
.footer-meta { font-size: .82rem; color: var(--slate-light); display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; }
.footer-meta a:hover { color: var(--navy-bright); }
.footer-links { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; justify-content: flex-end; }
.footer-links a { color: var(--slate); font-weight: 500; }
.footer-links a[aria-current="page"] { color: var(--navy); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
    .legal-grid { grid-template-columns: 1fr; gap: 2rem; }
    .toc { position: static; background: var(--bg-soft); border-radius: 16px; padding: 1.1rem 1.2rem; }
    .toc ol { border-left: 0; columns: 2; column-gap: 1.5rem; }
    .toc li a { padding: .3rem 0; margin-left: 0; border-left: 0; }
    .prose { max-width: none; }
    .glance { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .brand-name { display: none; }
    .nav-phone span { display: none; }
    .nav-right { gap: 16px; }
    .page-hero { padding: 2.5rem 0 2.2rem; }
    .legal { padding: 2.5rem 0 4rem; }
    .contact-card { grid-template-columns: 1fr; }
    .footer-meta { align-items: flex-start; }
    .footer-links { justify-content: flex-start; }
}
@media (max-width: 560px) {
    .toc ol { columns: 1; }
    .keywords { grid-template-columns: 1fr; }
    .related .btn { width: 100%; }
}
@media (max-width: 380px) {
    .glance { grid-template-columns: 1fr; }
    .nav-link { display: none; }
}

@media print {
    .nav, .toc, .related, footer, .skip-link { display: none !important; }
    .page-hero { background: none; border: 0; padding: 0 0 1rem; }
    .legal-grid { display: block; }
    .prose a { color: inherit; text-decoration: none; }
}
