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

:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --text: #1a1d21;
    --text-muted: #5a6470;
    --primary: #1565c0;
    --primary-dark: #0d47a1;
    --warning: #e65100;
    --warning-bg: #fff4e6;
    --border: #e4e7eb;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.05);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Header ──────────────────────────────────────────────────────── */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
    background: #f2f4f7;
    padding: 2px;
}

.brand h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.brand-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 48px 0 32px;
}

.hero-logo {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    margin-bottom: 20px;
    object-fit: contain;
    box-shadow: var(--shadow-md);
}

.hero h2 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

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

/* ── Card Grid ───────────────────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 32px 0 48px;
}

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

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

.card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.card-safety {
    border-color: #ffd9b3;
    background: linear-gradient(180deg, #ffffff 0%, #fff9f3 100%);
}

.card-safety .card-link { color: var(--warning); }

/* ── Contact ─────────────────────────────────────────────────────── */
.contact {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 48px;
    box-shadow: var(--shadow-sm);
}

.contact h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.contact p { font-size: 14px; }

.muted {
    color: var(--text-muted);
    font-size: 12px !important;
    margin-top: 8px;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Document page (privacy/terms/safety) ────────────────────────── */
.doc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    margin: 32px 0 48px;
    box-shadow: var(--shadow-sm);
}

.doc h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.doc .meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.doc h2 {
    font-size: 19px;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.doc h3 {
    font-size: 15px;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.doc p {
    margin-bottom: 12px;
    color: #2d3238;
}

.doc ul, .doc ol {
    margin: 12px 0 12px 24px;
}

.doc li {
    margin-bottom: 6px;
    color: #2d3238;
}

.doc strong { font-weight: 700; color: var(--text); }

.doc a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(21,101,192,0.3);
}

.doc a:hover { border-bottom-color: var(--primary); }

/* Callout boxes */
.callout {
    padding: 16px 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 14.5px;
    border-left: 4px solid;
}

.callout-info {
    background: #e8f2fb;
    border-color: var(--primary);
}

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

.callout-danger {
    background: #ffe8e8;
    border-color: #c62828;
}

.callout strong { display: block; margin-bottom: 4px; font-weight: 700; }

/* Table */
.doc table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.doc th, .doc td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.doc th {
    background: #f2f4f7;
    font-weight: 600;
    font-size: 13px;
}

/* ── Back link ───────────────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .doc { padding: 24px 20px; }
    .hero h2 { font-size: 24px; }
    .hero-logo { width: 72px; height: 72px; border-radius: 16px; }
    .brand-logo { width: 36px; height: 36px; }
    .doc h1 { font-size: 22px; }
    .doc h2 { font-size: 17px; }
}
