/* ============================================================
   Simple Warranty Tracker — Legal Pages Stylesheet
   Clean, professional, document-focused design
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    --bg:           #f8f9fa;
    --surface:      #ffffff;
    --border:       #e2e8f0;
    --border-light: #f1f5f9;
    --accent:       #1a56db;
    --accent-light: #eff6ff;
    --accent-hover: #1e40af;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted:   #9ca3af;
    --badge-bg:     #f0fdf4;
    --badge-text:   #15803d;
    --badge-border: #bbf7d0;
    --warning-bg:   #fffbeb;
    --warning-text: #92400e;
    --warning-border: #fde68a;
    --radius:       8px;
    --shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ── Layout ─────────────────────────────────────────── */

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-body {
    display: flex;
    flex: 1;
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
    padding: 0 24px;
    gap: 40px;
}

/* ── Top Header ─────────────────────────────────────── */

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.site-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}
.breadcrumb a:hover { color: var(--accent-hover); text-decoration: underline; }

.breadcrumb .sep { color: var(--border); }

.breadcrumb .current {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── Sidebar ─────────────────────────────────────────── */

.sidebar {
    width: 220px;
    flex-shrink: 0;
    padding-top: 32px;
}

.sidebar-sticky {
    position: sticky;
    top: 72px;
}

.sidebar-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background .15s, color .15s;
}

.sidebar-nav a:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.sidebar-nav a.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.sidebar-nav .nav-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
}

.sidebar-divider {
    margin: 16px 0;
    border: none;
    border-top: 1px solid var(--border);
}

.sidebar-back {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: var(--radius);
    transition: background .15s, color .15s;
}
.sidebar-back:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

/* ── Main Content ────────────────────────────────────── */

.content {
    flex: 1;
    min-width: 0;
    padding: 32px 0 64px;
}

/* ── Document Header ─────────────────────────────────── */

.doc-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.doc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--badge-bg);
    color: var(--badge-text);
    border: 1px solid var(--badge-border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.doc-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 8px;
}

.doc-meta {
    font-size: 13.5px;
    color: var(--text-muted);
}

.doc-meta strong {
    color: var(--text-secondary);
}

/* ── Sections ────────────────────────────────────────── */

.doc-section {
    margin-bottom: 36px;
}

.doc-section h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-section h2 .section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.doc-section h3 {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 16px 0 8px;
}

.doc-section p {
    font-size: 14.5px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.doc-section ul, .doc-section ol {
    padding-left: 20px;
    margin-bottom: 10px;
}

.doc-section li {
    font-size: 14.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.doc-section a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.doc-section a:hover { text-decoration: underline; }

/* ── Alert / Callout ─────────────────────────────────── */

.callout {
    border-left: 3px solid var(--accent);
    background: var(--accent-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 14px 16px;
    margin: 16px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.callout.warning {
    border-color: #f59e0b;
    background: var(--warning-bg);
    color: var(--warning-text);
}

.callout strong { color: var(--text-primary); }

/* ── Tables ──────────────────────────────────────────── */

.table-wrap {
    overflow-x: auto;
    margin: 16px 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: var(--bg);
}

th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 11px 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

/* ── Consent Signature Block ─────────────────────────── */

.consent-box {
    background: var(--surface);
    border: 1.5px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 32px;
    box-shadow: var(--shadow-md);
}

.consent-box h2 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.consent-box p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ── App Hub Cards (index.html) ─────────────────────── */

.hub-hero {
    text-align: center;
    padding: 48px 24px 40px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.hub-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.hub-hero h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.hub-hero p {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 440px;
    margin: 0 auto;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    padding: 40px 24px;
    max-width: 960px;
    margin: 0 auto;
}

.hub-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    display: block;
    transition: box-shadow .2s, border-color .2s, transform .2s;
    box-shadow: var(--shadow);
}

.hub-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.hub-card-icon {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
}

.hub-card h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.hub-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.hub-card .card-arrow {
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Footer ──────────────────────────────────────────── */

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-muted);
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 768px) {
    .page-body {
        flex-direction: column;
        padding: 0 16px;
        gap: 0;
    }

    .sidebar {
        width: 100%;
        padding-top: 20px;
    }

    .sidebar-sticky {
        position: static;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .sidebar-nav a {
        font-size: 12px;
        padding: 6px 10px;
    }

    .content {
        padding: 24px 0 40px;
    }

    .doc-title {
        font-size: 22px;
    }

    .hub-grid {
        padding: 24px 0;
    }
}
