/* ============================================================
   OVERTIMELOG SITE — shared stylesheet for legal/support pages
   Mirrors the design tokens from templates/base.html so the
   marketing site and the in-app UI share a look.
   Dark default, light via [data-theme="light"].
   site/index.html keeps its CSS inlined (hero + landing-specific
   components) — this file covers the simpler "document" pages.
   ============================================================ */

:root, [data-theme="dark"] {
    --bg: #0b0d10;
    --bg-elev: #12151a;
    --bg-elev-2: #171b21;
    --bg-hover: #1c2128;
    --border: #232830;
    --border-strong: #2e343d;
    --text: #e6e9ef;
    --text-muted: #8b94a3;
    --text-dim: #5b6472;

    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --accent-border: rgba(59, 130, 246, 0.35);

    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.14);
    --success-border: rgba(34, 197, 94, 0.3);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.14);
    --warning-border: rgba(245, 158, 11, 0.3);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.14);
    --danger-border: rgba(239, 68, 68, 0.3);
    --info: #06b6d4;
    --info-soft: rgba(6, 182, 212, 0.14);
    --info-border: rgba(6, 182, 212, 0.3);

    --radius-sm: 4px;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

[data-theme="light"] {
    --bg: #f7f8fa;
    --bg-elev: #ffffff;
    --bg-elev-2: #f1f3f6;
    --bg-hover: #eef1f5;
    --border: #e2e6ec;
    --border-strong: #cbd1da;
    --text: #1a1f29;
    --text-muted: #5b6472;
    --text-dim: #8b94a3;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.1);
    --accent-border: rgba(37, 99, 235, 0.3);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
}

/* ---------- RESET + BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5 {
    margin: 0 0 0.75rem 0;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text);
}
h1 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); line-height: 1.2; }
h2 { font-size: 1.35rem; line-height: 1.3; margin-top: 2.25rem; }
h3 { font-size: 1.05rem; margin-top: 1.5rem; }
h4 { font-size: 0.95rem; margin-top: 1rem; }
p { margin: 0 0 1rem 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
ul, ol { margin: 0 0 1rem 0; padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}
code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.85em;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    color: var(--text);
}
strong { color: var(--text); font-weight: 600; }
em { color: var(--text-muted); }

/* ---------- TOP NAV (same as index.html) ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); text-decoration: none; }
.logo-mark {
    width: 28px; height: 28px; border-radius: var(--radius-sm);
    background: var(--accent);
    display: inline-flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 0.95rem;
}
.nav-links { display: flex; gap: 1.4rem; align-items: center; }
.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
    background: var(--accent);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
}
.nav-cta:hover { background: var(--accent-hover); color: white; text-decoration: none; }
.theme-toggle {
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 34px; height: 34px;
    border-radius: var(--radius);
    font-size: 1rem;
    padding: 0;
    transition: background 0.1s, color 0.1s;
}
.theme-toggle:hover { background: var(--bg-hover); color: var(--text); }

@media (max-width: 640px) {
    .nav-links { display: none; }
}

/* ---------- LEGAL / DOC PAGE LAYOUT ---------- */
.legal {
    max-width: 780px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}
.page-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}
.page-header h1 { margin-bottom: 0.4rem; }
.page-header .meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.page-header .eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.9rem;
}

.legal .callout {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    margin: 1.5rem 0;
    font-size: 0.93rem;
    color: var(--text-muted);
}
.legal .callout.warning { border-left-color: var(--warning); }
.legal .callout.danger  { border-left-color: var(--danger);  }
.legal .callout.success { border-left-color: var(--success); }
.legal .callout strong { color: var(--text); }

.legal table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.9rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.legal th, .legal td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.legal th {
    background: var(--bg-elev-2);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.legal tr:last-child td { border-bottom: none; }

.legal .toc {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}
.legal .toc h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
}
.legal .toc ol {
    margin: 0;
    padding-left: 1.25rem;
    columns: 2;
    column-gap: 1.5rem;
}
.legal .toc li { margin-bottom: 0.25rem; }
@media (max-width: 640px) {
    .legal .toc ol { columns: 1; }
}

.legal .section-num {
    color: var(--text-dim);
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    margin-right: 0.35rem;
}

/* ---------- FOOTER (same as index.html) ---------- */
footer {
    background: var(--bg-elev);
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 2rem;
}
.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.footer-brand p { color: var(--text-muted); font-size: 0.85rem; max-width: 280px; }
.footer-col h4 {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 0.75rem;
    margin-top: 0;
}
.footer-col a {
    display: block;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 0.2rem 0;
}
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
    max-width: 1120px;
    margin: 0 auto;
    padding-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-dim);
}
@media (max-width: 860px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; gap: 0.35rem; text-align: center; }
}
@media (max-width: 520px) {
    .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- FAQ (for faq.html) ---------- */
.faq-group {
    margin-bottom: 2rem;
}
.faq-group h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}
.faq-item {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.6rem;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--text);
    list-style: none;
    padding: 0.25rem 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
    transition: transform 0.12s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body {
    color: var(--text-muted);
    font-size: 0.92rem;
    padding: 0.5rem 0 0.25rem;
    line-height: 1.55;
}

/* ---------- CONTACT cards (for contact.html) ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.contact-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}
.contact-card h3 {
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.contact-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.contact-card .value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    color: var(--text);
    word-break: break-all;
}
