:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --panel-2: #f2f3f5;
    --border: #e3e5e9;
    --text: #1c2024;
    --muted: #62676f;
    --brand: #2563eb;
    --brand-2: #7c3aed;
    --pass: #16a34a;
    --warn: #b45309;
    --fail: #dc2626;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

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

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 880px;
    margin: 0 auto;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.brand {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}
.brand .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    display: inline-block;
}

.nav a { color: var(--muted); margin-right: 18px; font-size: 14px; }
.nav a:hover { color: var(--text); }

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.card h1, .card h2 { margin-top: 0; }

.auth-wrap {
    max-width: 420px;
    margin: 60px auto;
}

label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin: 16px 0 6px;
}

input[type=text], input[type=email], input[type=password], input[type=url] {
    width: 100%;
    padding: 11px 13px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}
input:focus { outline: 2px solid var(--brand); border-color: transparent; }

button, .btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #ffffff;
    font-weight: 600;
    border: none;
    padding: 11px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 20px;
}
button:hover, .btn:hover { filter: brightness(1.08); text-decoration: none; }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
}

.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
}

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

.score-ring {
    display: flex;
    align-items: center;
    gap: 20px;
}
.score-num {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.check {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.check:last-child { border-bottom: none; }

.badge {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
}
.badge.pass { background: #dcfce7; color: var(--pass); }
.badge.warning { background: #fef3c7; color: var(--warn); }
.badge.fail { background: #fee2e2; color: var(--fail); }

.check-label { font-weight: 600; }
.check-message { color: var(--muted); font-size: 14px; margin-top: 2px; }
.check-solution {
    margin-top: 8px;
    font-size: 13.5px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
}
.check-solution strong { color: var(--brand); }

table.history { width: 100%; border-collapse: collapse; font-size: 14px; }
table.history th, table.history td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
}
table.history th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

.pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
