/* Public legal pages share the login palette and typography. */
:root { color-scheme: light; font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif; color: #243a2c; background: #f8faf8; }
* { box-sizing: border-box; }
body { margin: 0; }
.public-legal-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.public-legal-nav, .public-legal-main, .public-legal-footer { width: min(100% - 64px, 1180px); margin: 0 auto; }
.public-legal-nav { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #dce4dd; padding: 20px 0; }
.public-legal-brand { display: flex; align-items: center; gap: 16px; }
.public-legal-brand img { width: 80px; height: 48px; object-fit: contain; }
.public-legal-brand span { display: grid; gap: 5px; font-weight: 600; font-size: 15px; }
.public-legal-brand small { color: #65715f; font-size: 12px; font-weight: 400; }
.public-legal-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
a { color: #396d3f; font-size: 13px; font-weight: 500; text-decoration: none; text-underline-offset: 4px; }
a:hover { color: #245b2e; text-decoration: underline; }
a:focus-visible { outline: 3px solid #347f3d; outline-offset: 5px; border-radius: 3px; }
.public-legal-main { flex: 1; display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: start; gap: 40px; padding: 48px 0 64px; }
.public-legal-panel { background: #fff; border: 1px solid #dce4dd; border-radius: 20px; overflow: hidden; }
.public-legal-head { padding: 40px 48px 32px; background: #f0f5ef; border-bottom: 1px solid #dce4dd; }
h1 { margin: 0; color: #24392b; font-size: clamp(30px, 4vw, 42px); line-height: 1.2; font-weight: 600; letter-spacing: -.04em; }
.public-legal-head p { max-width: 680px; margin: 16px 0 0; }
p, li { color: #58685d; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.public-legal-content { padding: 8px 48px 16px; }
.public-legal-section { padding: 28px 0; }
.public-legal-section + .public-legal-section { border-top: 1px solid #e7ece7; }
h2 { margin: 0 0 10px; color: #2e4935; font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.public-legal-section p { margin: 0; }
.public-legal-section p + p { margin-top: 14px; }
.public-legal-head .legal-document-meta { font-size: 12px; color: #65715f; margin-top: 20px; }
.legal-sidebar { max-height: calc(100dvh - 64px); overflow-y: auto; scrollbar-width: thin; }
.legal-eyebrow { display: block; margin-bottom: 20px; color: #58745d; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.legal-sidebar { position: sticky; top: 32px; padding-top: 20px; }
.legal-toc { display: grid; gap: 4px; }
.legal-toc a { display: flex; align-items: baseline; gap: 12px; padding: 12px; border-radius: 8px; color: #4d6053; line-height: 1.5; }
.legal-toc a span { color: #7d9081; font-size: 11px; font-variant-numeric: tabular-nums; }
.legal-toc a:hover { background: #eaf1e9; text-decoration: none; color: #245b2e; }
.legal-sidebar-note { border-top: 1px solid #dce4dd; margin-top: 28px; padding-top: 24px; }
.legal-sidebar-note strong { font-size: 12px; font-weight: 600; }
.legal-sidebar-note p { font-size: 12px; line-height: 1.7; margin: 8px 0 0; }
.legal-section-number { display: inline-block; margin-right: 12px; color: #7a9180; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.public-legal-section h2 { scroll-margin-top: 32px; }
.legal-return-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 11px 18px; background: #32753e; border: 1px solid #32753e; border-radius: 9px; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.5; text-align: center; }
.legal-return-button:hover { background: #286333; border-color: #286333; color: #fff; text-decoration: none; }
.legal-document-end { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding: 24px 48px; border-top: 1px solid #dce4dd; background: #f7faf6; }
.legal-document-end > span { color: #748578; font-size: 11px; }
@media (max-width: 900px) {
    .public-legal-main { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .legal-sidebar { position: static; padding: 0; max-height: none; overflow: visible; }
    .legal-toc { display: flex; flex-wrap: wrap; gap: 4px 8px; }
    .legal-toc a { padding: 8px 12px; background: #eef3ed; }
    .legal-sidebar-note { display: none; }
    .legal-sidebar .legal-eyebrow { margin-bottom: 12px; }
}
.public-legal-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0 32px; border-top: 1px solid #dce4dd; color: #65715f; font-size: 11px; line-height: 1.7; }
@media (max-width: 640px) {
    .public-legal-nav, .public-legal-main, .public-legal-footer { width: calc(100% - 40px); }
    .public-legal-nav { align-items: flex-start; flex-direction: column; gap: 20px; }
    .public-legal-main { padding: 24px 0; }
    .public-legal-head { padding: 28px 24px; }
    .public-legal-content { padding: 0 24px 4px; }
    .public-legal-section { padding: 24px 0; }
    .public-legal-panel { border-radius: 14px; }
    .legal-document-end { padding: 20px 24px; }
    .public-legal-footer { flex-direction: column; align-items: flex-start; }
}
@media print {
    :root { background: #fff; }
    .public-legal-links, .legal-sidebar, .legal-return-button { display: none; }
    .public-legal-main { display: block; }
    .public-legal-nav, .public-legal-main, .public-legal-footer { width: 100%; }
    .public-legal-panel { border: 0; }
    .public-legal-head { background: #fff; }
    .public-legal-head, .public-legal-content { padding-left: 0; padding-right: 0; }
}
