:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --low: #16a34a;
    --medium: #f59e0b;
    --high: #dc2626;
    --soft-blue: #eff6ff;
    --soft-red: #fef2f2;
    --soft-green: #f0fdf4;
    --soft-yellow: #fffbeb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.35), transparent 30%),
        linear-gradient(135deg, #020617 0%, #0f172a 45%, #111827 100%);
    color: var(--text);
    min-height: 100vh;
}

.page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0 32px;
}

.hero {
    text-align: center;
    color: #ffffff;
    margin-bottom: 28px;
}

.hero-badge {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #bfdbfe;
    font-size: 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 60px);
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 720px;
    margin: 18px auto 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.6;
}

.checker-card {
    background: var(--card);
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.4);
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
}

textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.hint {
    color: var(--muted);
    font-size: 14px;
    margin-top: 10px;
}

button {
    margin-top: 18px;
    width: 100%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 16px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loader,
.error {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 600;
}

.loader {
    background: var(--soft-blue);
    color: #1d4ed8;
}

.error {
    background: var(--soft-red);
    color: var(--high);
}

.hidden {
    display: none;
}

.summary {
    margin-top: 24px;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 20px;
}

.summary h2 {
    margin: 0 0 10px;
}

.results {
    display: grid;
    gap: 22px;
    margin-top: 24px;
}

.result-card {
    background: var(--card);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.result-header {
    padding: 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.domain-title {
    margin: 0;
    font-size: 24px;
}

.score-pill {
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 900;
    color: white;
}

.score-pill.low {
    background: var(--low);
}

.score-pill.medium {
    background: var(--medium);
}

.score-pill.high {
    background: var(--high);
}

.result-body {
    padding: 22px;
    display: grid;
    gap: 18px;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.check-box {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    background: #fff;
}

.check-box.pass {
    border-color: #bbf7d0;
    background: var(--soft-green);
}

.check-box.warning {
    border-color: #fde68a;
    background: var(--soft-yellow);
}

.check-box.fail {
    border-color: #fecaca;
    background: var(--soft-red);
}

.check-title {
    font-weight: 900;
    margin-bottom: 8px;
}

.check-summary {
    color: #334155;
    line-height: 1.5;
    margin-bottom: 12px;
}

.recommendation {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.records {
    margin-top: 16px;
}

.records h4 {
    margin: 0 0 8px;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: #020617;
    color: #dbeafe;
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 14px;
}

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

th {
    color: #475569;
    background: #f8fafc;
}

.footer {
    text-align: center;
    color: #94a3b8;
    padding: 24px 16px 40px;
}

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

    .result-header {
        align-items: flex-start;
    }
}
