/* Shared styling for all Koda Properties legal pages.
   Keeps the same palette + typography as the landing page so policy
   pages feel like part of the same product, not bolted on. */

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

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --secondary: #1e3a5f;
    --accent: #f59e0b;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --warn-bg: #fef3c7;
    --warn-border: #f59e0b;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--dark);
    background: var(--light);
}

/* Top nav */
.legal-nav {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
}
.legal-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.legal-nav .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.1rem;
}
.legal-nav .logo-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.legal-nav .logo small {
    color: var(--gray);
    font-weight: 500;
    font-size: 0.85rem;
}
.legal-nav .back-link {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}
.legal-nav .back-link:hover { text-decoration: underline; }

/* Main content */
.legal-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.legal-wrap h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}
.legal-wrap .updated {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}
.legal-wrap h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--secondary);
}
.legal-wrap h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}
.legal-wrap p { margin-bottom: 1rem; }
.legal-wrap ul, .legal-wrap ol {
    margin: 0 0 1rem 1.5rem;
}
.legal-wrap li { margin-bottom: 0.5rem; }
.legal-wrap a {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.legal-wrap strong { color: var(--dark); }
.legal-wrap table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.95rem;
}
.legal-wrap th, .legal-wrap td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.legal-wrap th { background: #f1f5f9; font-weight: 700; }
.legal-wrap tr:last-child td { border-bottom: none; }

/* Template notice — clearly mark these docs as pre-legal-review drafts */
.template-banner {
    background: var(--warn-bg);
    border-left: 4px solid var(--warn-border);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #92400e;
}
.template-banner strong { color: #78350f; }

/* Section index */
.toc {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 2.5rem;
}
.toc h3 {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
}
.toc ol { margin: 0 0 0 1.25rem; }
.toc li { margin-bottom: 0.25rem; font-size: 0.95rem; }

/* Footer */
.legal-footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 2rem 5% 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}
.legal-footer a {
    color: #cbd5e1;
    text-decoration: none;
    margin: 0 0.75rem;
}
.legal-footer a:hover { color: white; text-decoration: underline; }
.legal-footer .row {
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.legal-footer .copyright {
    margin-top: 0.5rem;
    color: #64748b;
    font-size: 0.85rem;
}

/* Print-friendly */
@media print {
    .legal-nav, .legal-footer { display: none; }
    .legal-wrap { padding: 0; }
    body { background: white; }
}
