/* =========================================
   Social Circle — Shared Styling (Branded)
   Used for Privacy Policy, EULA, Support, Manual pages
   ========================================= */

:root {
    color-scheme: light dark;

    /* === Brand Palette === */
    --brand-color: #3366CC;          /* Primary Social Circle blue */
    --brand-accent: #5A7DFF;         /* Hover/accent blue */
    --brand-bg-light: #FAFAFA;       /* Light background */
    --brand-bg-tint: #E8EDFF;        /* Soft blue tint */
    --brand-dark: #1C1C1C;           /* Dark text */
    --brand-darkmode-bg: #1E2B4D;    /* Deep blue for dark mode */
    --brand-darkmode-text: #FAFAFA;  /* Light text for dark mode */

    /* === Derived Theme Colors === */
    --accent-color: var(--brand-color);
    /* alias for older inline styles using var(--accent) */
    --accent: var(--brand-color);

    --accent-gradient: linear-gradient(135deg, var(--brand-color), var(--brand-accent));
    --link-color: var(--brand-accent);
    --text-color: var(--brand-dark);
    --bg-color: var(--brand-bg-light);
    --card-bg: #FFFFFF;
    --card-bg-dark: var(--brand-darkmode-bg);
    --gray-text: #777;
    --radius: 16px;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: var(--brand-darkmode-bg);
        --text-color: var(--brand-darkmode-text);
        --card-bg: var(--card-bg-dark);
        --link-color: var(--brand-accent);
    }
}

/* === Layout === */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Header Bar === */
header {
    background: var(--accent-gradient);
    color: white;
    width: 100%;
    padding: 1.2rem 0.75rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

/* --- Brand (logo + title) row inside header --- */
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

header .logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* --- Header Navigation --- */
.navbar {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar a:hover,
.navbar a:focus {
    color: #FFD966; /* warm highlight for accessibility */
    text-decoration: underline;
}

/* === Main Content Card === */
main {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 900px;
    width: calc(100% - 2rem);
    flex: 1;
}

h2, h3 {
    color: var(--accent-color);
    margin-top: 1.5em;
}

/* === Links and Buttons === */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
input[type="submit"],
a.button {
    display: inline-block;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.7em 1.4em;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease-in-out, opacity 0.2s;
}

button:hover,
a.button:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* === Breadcrumb or Back Link === */
nav.breadcrumb {
    font-size: 0.9em;
    margin-bottom: 1rem;
    color: var(--gray-text);
}

nav.breadcrumb a {
    color: var(--link-color);
    text-decoration: none;
}

nav.breadcrumb a:hover {
    text-decoration: underline;
}

/* =====================================
   Manual layout: nav + content split
   Use on manual pages like:

   <main class="manual-layout">
     <aside class="manual-nav">…links…</aside>
     <article class="manual-content">…text…</article>
   </main>
   ===================================== */

.manual-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* left nav on desktop / tablet */
.manual-nav {
    flex: 0 0 220px;
    font-size: 0.95rem;
    position: sticky;
    top: 1rem;
}

.manual-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.manual-nav li + li {
    margin-top: 0.4rem;
}

.manual-nav a {
    color: var(--link-color);
    text-decoration: none;
}

.manual-nav a:hover {
    text-decoration: underline;
}

/* main article */
.manual-content {
    flex: 1 1 auto;
    min-width: 0;
}

/* === Footer === */
footer {
    text-align: center;
    font-size: 0.9em;
    color: var(--gray-text);
    margin: 2rem 0 1rem;
}

footer a {
    color: var(--link-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* === Responsive === */
@media (max-width: 800px) {
    main {
        margin: 1rem;
        padding: 1.3rem;
        box-shadow: none;        /* flatter look on phones */
        border-radius: 0.75rem;
    }

    header h1 {
        font-size: 1.4rem;
        text-align: center;
    }

    /* manual layout stacks vertically on small screens */
    .manual-layout {
        flex-direction: column;
    }

    .manual-nav {
        position: static;
        width: 100%;
        flex: none;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid rgba(0,0,0,0.08);
    }

    .manual-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.6rem 1rem;
    }

    .manual-nav li + li {
        margin-top: 0;
    }
}