:root {
    --site-purple: #676bb5;
    --site-gold: #f7b423;
    --site-gold-soft: #ffe59a;
    --site-ink: #1f2338;
    --site-muted: #667085;
    --site-white: #ffffff;
    --site-panel: rgba(255, 255, 255, 0.9);
    --site-border: rgba(103, 107, 181, 0.12);
    --site-shadow: 0 24px 60px rgba(30, 35, 76, 0.12);
}

body {
    min-height: 100vh;
    position: relative;
    font-family: "Sarabun", "Noto Sans Thai", Tahoma, sans-serif;
    color: var(--site-ink);
    background: linear-gradient(180deg, #f5f7ff 0%, #fffaf1 100%);
}

.site-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, rgba(103, 107, 181, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(247, 180, 35, 0.2), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
}

.site-hero {
    max-width: 860px;
    margin: 0 auto 2rem;
}

.site-logo {
    width: min(100%, 760px);
    margin-bottom: 1rem;
}

.site-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--site-border);
    box-shadow: var(--site-shadow);
    color: var(--site-purple);
    font-weight: 700;
}

.site-hero h1 {
    font-size: clamp(2rem, 4vw, 3.15rem);
    margin: 1rem 0 0.75rem;
}

.site-hero p {
    color: var(--site-muted);
    font-size: 1.08rem;
    margin: 0 auto;
    max-width: 48rem;
}

.year-switcher,
.detail-card,
.related-card {
    background: var(--site-panel);
    backdrop-filter: blur(10px);
    border-radius: 26px;
    box-shadow: var(--site-shadow);
}

.year-kicker {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--site-muted);
}

.year-title {
    font-size: 2.2rem;
    color: var(--site-purple);
}

.default-pill {
    display: inline-flex;
    margin-left: 0.75rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(247, 180, 35, 0.16);
    color: #8d5b03;
    font-weight: 700;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.category-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--site-border);
    border-radius: 24px;
    padding: 1.4rem;
    box-shadow: var(--site-shadow);
}

.category-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.category-head h2 {
    margin: 0;
    font-size: 1.25rem;
}

.category-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--site-purple), var(--site-gold));
    box-shadow: 0 0 0 5px rgba(103, 107, 181, 0.08);
}

.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.7rem;
}

.item-list a,
.related-link {
    display: flex;
    align-items: start;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    color: inherit;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 247, 253, 0.95));
    border: 1px solid rgba(103, 107, 181, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.item-list a:hover,
.related-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(30, 35, 76, 0.12);
    border-color: rgba(247, 180, 35, 0.38);
}

.item-code,
.detail-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 0.35rem 0.7rem;
    border-radius: 12px;
    background: rgba(103, 107, 181, 0.12);
    color: var(--site-purple);
    font-weight: 800;
    font-size: 0.9rem;
}

.item-title {
    font-weight: 700;
    line-height: 1.5;
}

.empty-state {
    color: var(--site-muted);
    padding: 1.1rem 0.2rem 0.2rem;
}

.detail-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.back-link {
    color: var(--site-purple);
    text-decoration: none;
    font-weight: 700;
}

.detail-chip {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(247, 180, 35, 0.14);
    color: #8d5b03;
    font-weight: 700;
}

.detail-header h1 {
    margin: 1rem 0 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.content-body {
    margin-top: 2rem;
    line-height: 1.8;
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.content-body th,
.content-body td {
    border: 1px solid rgba(103, 107, 181, 0.18);
    padding: 0.7rem 0.85rem;
}

.content-body a {
    color: var(--site-purple);
    word-break: break-word;
}

.content-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 18px;
    box-shadow: 0 18px 32px rgba(30, 35, 76, 0.12);
}

.related-list {
    display: grid;
    gap: 0.9rem;
}

.related-link span {
    min-width: 76px;
    color: var(--site-purple);
    font-weight: 800;
}

.related-link strong {
    font-weight: 700;
}

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