/* Shared styling for Finworthly's static content pages (privacy, terms, about,
   guides index, 404). Mirrors the design tokens used by the SPA and the guide
   templates: slate-900 ground, indigo accent, Inter. */

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

:root {
    --bg: #0f172a;
    --card: #1e293b;
    --border: #334155;
    --text: #e2e8f0;
    --text-muted: #cbd5e1;
    --text-faint: #94a3b8;
    --heading: #f8fafc;
    --accent: #6366f1;
    --link: #818cf8;
    --link-hover: #a5b4fc;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

a:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---- Top bar ---- */
.top-bar {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
}

.top-bar-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.top-bar a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-faint);
    /* 44px min tap target */
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.top-bar a:hover {
    color: var(--text);
    text-decoration: none;
}

.top-bar .arrow {
    margin-right: 6px;
}

.top-bar nav {
    display: flex;
    gap: 20px;
}

/* ---- Layout ---- */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

/* ---- Typography ---- */
article h1, .page h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--heading);
    line-height: 1.25;
    margin-bottom: 16px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-faint);
    margin-bottom: 40px;
    line-height: 1.6;
}

article h2, .page h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading);
    margin-top: 48px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

article h3, .page h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #c7d2fe;
    margin-top: 28px;
    margin-bottom: 10px;
}

article p, .page p {
    margin-bottom: 18px;
    color: var(--text-muted);
}

article ul, article ol,
.page ul, .page ol {
    margin-bottom: 18px;
    padding-left: 24px;
}

article li, .page li {
    margin-bottom: 8px;
    color: var(--text-muted);
}

li strong { color: var(--text); }

/* ---- Meta line (dates, author) ---- */
.meta {
    font-size: 0.9rem;
    color: var(--text-faint);
    margin-bottom: 32px;
}

.meta a { color: var(--link); }

/* ---- Breadcrumbs ---- */
.breadcrumbs {
    font-size: 0.875rem;
    color: var(--text-faint);
    margin-bottom: 24px;
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumbs li { margin: 0; color: var(--text-faint); }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--border); }

/* ---- Tables ---- */
.table-wrap {
    overflow-x: auto;
    margin: 24px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th, td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

th {
    color: var(--heading);
    font-weight: 600;
    background-color: var(--card);
}

/* ---- Cards / callouts ---- */
.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    margin: 24px 0;
}

.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.cta-box {
    background: linear-gradient(135deg, #312e81, #1e1b4b);
    border: 1px solid #4338ca;
    border-radius: 12px;
    padding: 28px 32px;
    margin: 40px 0;
}

.cta-box h3 {
    margin-top: 0;
    color: #e0e7ff;
}

.cta-box p:last-child { margin-bottom: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 10px;
    background-color: var(--accent);
    color: #ffffff;
    font-weight: 600;
    margin-top: 8px;
}

.btn:hover {
    background-color: #4f46e5;
    color: #ffffff;
    text-decoration: none;
}

/* ---- Guide index list ---- */
.entry-list { list-style: none; padding: 0; }

.entry {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 20px;
}

.entry h2 {
    font-size: 1.25rem;
    margin: 0 0 8px;
    padding: 0;
    border: none;
    display: block;
}

.entry h2 a { color: var(--heading); }
.entry h2 a:hover { color: var(--link-hover); }
.entry p { margin-bottom: 8px; }
.entry .meta { margin-bottom: 0; }

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid var(--border);
    background-color: var(--card);
    padding: 32px 24px;
    margin-top: 64px;
}

.site-footer-inner {
    max-width: 720px;
    margin: 0 auto;
    font-size: 0.9rem;
    color: var(--text-faint);
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px;
}

.site-footer nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    body { font-size: 16px; }
    article h1, .page h1 { font-size: 1.8rem; }
    .container { padding: 32px 20px 48px; }
}
