/* Sudoku: Infinity — shared styles */

:root {
    --bg: #f6f5fb;
    --surface: #ffffff;
    --text: #1c1a25;
    --muted: #6f6a82;
    --line: rgba(28, 26, 37, 0.08);
    --accent: #8c66f9;
    --accent-2: #4f8df5;
    --radius: 14px;
    --max: 760px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14121e;
        --surface: #1d1b29;
        --text: #f0eef7;
        --muted: #9892ac;
        --line: rgba(255, 255, 255, 0.08);
    }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded",
        "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
}

.page {
    max-width: var(--max);
    margin: 0 auto;
    padding: 32px 20px 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}

.brand-name {
    font-size: 17px;
    font-weight: 600;
}

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

h1 {
    font-size: 32px;
    font-weight: 600;
    margin: 8px 0 4px;
    letter-spacing: -0.02em;
}

.updated {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 28px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 6px;
}

p, li {
    font-size: 15px;
    color: var(--text);
}

p { margin: 8px 0; }

ul, ol { padding-left: 22px; }

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

.lang-switch {
    display: inline-flex;
    background: var(--surface);
    border-radius: 999px;
    padding: 4px;
    border: 1px solid var(--line);
    margin-bottom: 24px;
}

.lang-switch button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
}

.lang-switch button.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
}

.lang { display: none; }
.lang.active { display: block; }

.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 28px;
}

@media (max-width: 600px) {
    .card-grid { grid-template-columns: 1fr; }
}

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

.card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    text-decoration: none;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-desc {
    font-size: 13px;
    color: var(--muted);
}

footer {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
}
