:root {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --bg: #f5f8ff;
    --surface: rgba(255,255,255,0.96);
    --text: #0f172a;
    --muted: #64748b;
    --border: #dbe4f0;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37,99,235,0.18), transparent 35%),
        linear-gradient(180deg, #edf4ff 0%, #f8fbff 40%, #f4f8ff 100%);
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.page-wrap {
    min-height: 100vh;
    padding: 28px 18px;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.surface,
.hero-card,
.login-card,
.result-card,
.error-card,
.stat-card,
.info-card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.85);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card,
.login-card,
.result-card,
.error-card,
.info-card { padding: 28px; }

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: var(--shadow);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: cover;
    background: #fff;
    padding: 8px;
    border: 1px solid var(--border);
}

.brand-block strong,
.hero-title,
.hero-card h1,
.login-card h1,
.result-card h1,
.info-card h2,
.error-card h2 {
    margin: 0;
}

.muted,
.top-nav p,
.hero-card p,
.login-card p,
.info-list span,
.feature-chip,
.footer-text,
.meta-text,
.result-caption {
    color: var(--muted);
}

.nav-links,
.top-links,
.action-group,
.feature-list,
.info-list,
.contact-list,
.result-actions,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.nav-link,
.btn,
.btn-secondary,
.btn-ghost,
.feature-chip,
.contact-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.nav-link,
.btn-ghost,
.feature-chip,
.contact-chip {
    background: #fff;
    border: 1px solid var(--border);
}

.nav-link:hover,
.btn-ghost:hover,
.feature-chip:hover,
.contact-chip:hover { background: #f8fbff; }

.btn {
    border: none;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }

.btn-secondary {
    border: none;
    background: #e2e8f0;
    color: var(--text);
}

.hero-grid,
.info-grid,
.form-grid,
.result-grid,
.meta-grid {
    display: grid;
    gap: 20px;
}

.hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr); }
.info-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid.two { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.result-grid { grid-template-columns: minmax(0, 1fr) 210px; align-items: start; }

.hero-card {
    overflow: hidden;
    position: relative;
}

.hero-card::after {
    content: '';
    position: absolute;
    inset: auto -40px -40px auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(37,99,235,0.16), transparent 65%);
}

.hero-eyebrow,
.section-eyebrow {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-title {
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.08;
    margin-bottom: 12px;
}

.login-card {
    max-width: 520px;
    margin: 0 auto;
}

.field {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 14px 15px;
    font-size: 15px;
    outline: none;
    background: #fff;
    transition: border 0.18s ease, box-shadow 0.18s ease;
}

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

.hero-cover {
    border-radius: 20px;
    overflow: hidden;
    min-height: 100%;
}

.hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-card h2,
.result-card h1,
.login-card h1 { font-size: 28px; }

.contact-list { margin-top: 14px; }
.contact-chip { font-weight: 600; }

.result-card {
    max-width: 1040px;
    margin: 0 auto;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 2px solid #e6eefc;
}

.result-header .brand-block { align-items: flex-start; }
.result-header .brand-logo { width: 86px; height: 86px; }
.result-meta { text-align: right; }
.result-meta strong { display: block; font-size: 15px; }
.result-caption { margin-top: 6px; }

.info-table,
.result-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td,
.result-table th,
.result-table td {
    border-bottom: 1px solid #edf2f7;
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
}

.info-table td:first-child {
    width: 190px;
    font-weight: 700;
    color: #334155;
}

.result-table th {
    background: #f8fbff;
    color: #334155;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.result-photo {
    width: 180px;
    height: 210px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
}
.result-photo img { width: 100%; height: 100%; object-fit: cover; }

.grade-box,
.grade-note,
.error-box {
    border-radius: 18px;
    padding: 18px 20px;
}

.grade-box {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
}

.grade-note {
    background: #eff6ff;
    color: #1d4ed8;
    line-height: 1.7;
}

.error-card {
    max-width: 760px;
    margin: 80px auto;
    text-align: center;
}

.footer-text {
    text-align: center;
    padding-bottom: 20px;
    font-size: 13px;
}

@media print {
    body { background: #fff !important; }
    .page-wrap { padding: 0; }
    .top-nav,
    .result-actions,
    .footer-text,
    .quick-links,
    .hero-cover,
    .login-card .quick-links { display: none !important; }
    .result-card {
        box-shadow: none;
        border: none;
        max-width: none;
        border-radius: 0;
        padding: 0;
    }
}

@media (max-width: 900px) {
    .hero-grid,
    .result-grid { grid-template-columns: 1fr; }
    .top-nav { border-radius: 28px; align-items: flex-start; }
    .result-header { flex-direction: column; align-items: flex-start; }
    .result-meta { text-align: left; }
}

@media (max-width: 640px) {
    .page-wrap { padding: 16px; }
    .top-nav,
    .hero-card,
    .login-card,
    .result-card,
    .info-card,
    .error-card { padding: 20px; }
    .brand-block { align-items: flex-start; }
    .brand-logo { width: 58px; height: 58px; }
    .hero-title { font-size: 32px; }
    .result-photo { width: 150px; height: 180px; }
    .info-table td:first-child { width: 150px; }
}
