:root {
    --page-bg: #e4e9f0;
    --surface: #eef0f4;
    --border: #b4bfcc;
    --border-light: #c8ced8;
    --border-hover: #96a3b0;
    --accent: #2563eb;
    --accent-light: #d0daf0;
    --text: #1a1a1a;
    --text-dim: #4a5568;
    --text-muted: #6b7280;
    --radius: 6px;
    --radius-md: 8px;
}

body {
    background: var(--page-bg);
    color: var(--text);
    min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #1d4ed8; }

/* ── Shared: page-frame ── */
.page-frame {
    max-width: 1152px; margin: 0 auto;
    padding: 32px 40px;
}
@media (max-width: 768px) {
    .page-frame { padding: 20px 16px; }
}

/* ── Shared: box ── */
.box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

/* ── Shared: section-label ── */
.section-label {
    font-size: .68rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .06em;
    margin-bottom: 12px;
}

/* ── Shared: page-header ── */
.page-header {
    margin-bottom: 24px;
    display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
}
.page-header .page-header-left { flex: 1; min-width: 0; }
.page-header h1 {
    font-size: 1.15rem; font-weight: 700; color: var(--text);
    letter-spacing: -.02em; line-height: 1.3;
}
.page-header p {
    font-size: .8rem; color: var(--text-dim); font-weight: 500;
    margin-top: 2px;
}
.page-header .page-desc {
    font-size: .78rem; color: var(--text-muted); font-weight: 400;
    margin-top: 8px; line-height: 1.5;
    max-width: 100%;
}

/* ── Shared: info-card ── */
.info-card {
    display: flex; align-items: center; justify-content: center;
    padding: 0 28px;
    border-radius: var(--radius-md);
    background: #f59e0b;
    align-self: stretch;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    width: 80px;
}
.info-card .info-card-icon {
    position: absolute;
    font-size: 3.2rem;
    opacity: .18;
    right: -4px; bottom: -6px;
    pointer-events: none;
    line-height: 1;
}
.info-card .info-card-label { display: none; }
.info-card .info-card-value {
    font-size: 2rem; font-weight: 900; color: #fff;
    letter-spacing: -.02em;
    position: relative; z-index: 1;
}

/* ── Shared: chip ── */
.chip {
    display: inline-flex; align-items: center;
    padding: 5px 14px; border-radius: var(--radius);
    font-size: .76rem; font-weight: 600;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text-dim); cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    user-select: none; white-space: nowrap;
}
.chip:hover { border-color: var(--border-hover); color: var(--text); }
.chip.on {
    background: var(--accent); border-color: var(--accent); color: #fff;
}

/* ── Shared: two-col ── */
.two-col {
    display: grid; gap: 32px;
}
@media (max-width: 1023px) {
    .two-col { grid-template-columns: 1fr !important; }
}

/* ── Shared: grade-header ── */
.grade-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}
.grade-badge {
    width: 28px; height: 28px; border-radius: var(--radius);
    background: var(--accent-light); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700; flex-shrink: 0;
}
.grade-header .grade-label {
    font-size: .88rem; font-weight: 700; color: var(--text);
}
.grade-header .grade-count {
    margin-left: auto; font-size: .68rem; color: var(--text-muted); font-weight: 500;
}

/* ── Site Navbar ── */
.site-nav {
    position: sticky; top: 0; z-index: 1000;
    display: flex; justify-content: center;
    padding: 12px 40px 0;
}
.nav-inner {
    max-width: 1152px; width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; height: 48px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.nav-brand {
    font-size: .88rem; font-weight: 700; color: var(--accent);
    letter-spacing: -.02em; text-decoration: none;
    flex-shrink: 0;
}
.nav-brand:hover { color: #1d4ed8; }
.nav-menu {
    display: flex; align-items: center; gap: 4px;
}
.nav-menu a {
    padding: 6px 14px; border-radius: var(--radius);
    font-size: .78rem; font-weight: 600; color: var(--text-dim);
    text-decoration: none; transition: all .15s;
    white-space: nowrap;
}
.nav-menu a:hover { color: var(--text); background: rgba(0,0,0,.04); }
.nav-menu a.active {
    color: var(--accent); background: var(--accent-light); font-weight: 700;
}

/* Hamburger toggle */
.nav-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 36px; height: 36px; padding: 6px;
    flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span {
    display: block; width: 20px; height: 2px;
    background: var(--text-dim); border-radius: 2px;
    transition: transform .2s, opacity .2s;
}

/* ── Breadcrumb ── */
.breadcrumb {
    max-width: 1152px; margin: 0 auto;
    padding: 10px 40px;
    font-size: .72rem; font-weight: 500; color: var(--text-muted);
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.bc-sep { color: #cbd5e1; }
.bc-current { color: var(--text); font-weight: 600; }

/* ── Form elements ── */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea {
    font-family: inherit;
    font-size: .86rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 14px;
    outline: none;
    transition: border-color .15s;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus {
    border-color: var(--accent);
}
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* Checkbox & Radio — custom */
input[type="checkbox"],
input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 16px; height: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    margin: 0; cursor: pointer;
    flex-shrink: 0;
    display: inline-grid;
    place-content: center;
    transition: border-color .15s, background .15s;
}
input[type="checkbox"] {
    border-radius: 4px;
}
input[type="radio"] {
    border-radius: 50%;
}
input[type="checkbox"]::before {
    content: '';
    width: 10px; height: 10px;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    transform: scale(0);
    transition: transform .12s ease-in-out;
    background: #fff;
}
input[type="radio"]::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    transform: scale(0);
    transition: transform .12s ease-in-out;
    background: #fff;
}
input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}
input[type="checkbox"]:checked::before,
input[type="radio"]:checked::before {
    transform: scale(1);
}
input[type="checkbox"]:hover,
input[type="radio"]:hover {
    border-color: var(--border-hover);
}

/* Select */
select {
    font-family: inherit;
    font-size: .86rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 32px 9px 14px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color .15s;
}
select:focus {
    border-color: var(--accent);
}
select:hover {
    border-color: var(--border-hover);
}

/* Button */
button, .btn {
    font-family: inherit;
    font-size: .84rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 18px;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button:hover, .btn:hover {
    border-color: var(--border-hover);
    background: var(--page-bg);
}
button:disabled, .btn:disabled {
    opacity: .4; cursor: not-allowed;
}

/* Primary button */
.btn-primary,
button.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 700;
}
.btn-primary:hover,
button.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* ── Mobile nav ── */
@media (max-width: 768px) {
    .site-nav { padding: 8px 16px 0; }
    .nav-inner { padding: 0 16px; }
    .breadcrumb { padding: 10px 16px; }
    .nav-toggle { display: flex; }
    .nav-menu {
        display: none; position: fixed;
        top: 54px; left: 0; right: 0; bottom: 0;
        background: rgba(255,255,255,.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column; align-items: stretch;
        padding: 16px 20px; gap: 2px;
        z-index: 999;
    }
    .site-nav.open .nav-menu { display: flex; }
    .site-nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .site-nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
    .site-nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .nav-menu a {
        padding: 14px 16px; font-size: .9rem;
        border-radius: var(--radius-md);
    }
}
