:root {
    --bg: #F8F1EB;
    --surface: #FFFFFF;
    --surface-alt: #F6EEE5;
    --text: #2D251D;
    --text-muted: #72665A;
    --border: #E4DED8;
    --primary: #153C96;
    --primary-hover: #112F77;
    --dark-band: #1B140D;
    --on-dark: #FFFFFF;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Noto Serif SC', serif;
    font-weight: 400;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-style: normal;
}

h1 {
    font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
}

h2 {
    font-size: clamp(1.6rem, 3vw + 0.5rem, 2.35rem);
}

h3 {
    font-size: clamp(1.3rem, 2vw + 0.5rem, 1.8rem);
}

h4 {
    font-size: clamp(1.15rem, 1.5vw + 0.4rem, 1.45rem);
}

h5 {
    font-size: clamp(1rem, 1.2vw + 0.3rem, 1.25rem);
}

h6 {
    font-size: 1rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
    font-style: normal;
}

a,
a:hover,
a:focus {
    text-decoration: none;
}

a {
    color: inherit;
    transition: color 0.15s ease;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: 'Noto Serif SC', serif;
    font-style: normal;
    padding: 0;
    margin: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

input,
textarea,
select {
    font-family: 'Noto Serif SC', serif;
    font-style: normal;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.85rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.25rem;
        line-height: 1.35;
    }

    h4 {
        font-size: 1.1rem;
    }

    h5 {
        font-size: 0.95rem;
    }

    h6 {
        font-size: 0.875rem;
    }

    a,
    span,
    p {
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

/* ===== header ===== */
#header {
    overflow: visible;
}

html {
    scroll-behavior: smooth;
}

/* ===== hero ===== */
#hero {
    overflow: hidden;
}

#hero input::placeholder {
    color: #72665A;
    opacity: 1;
}

#hero input:focus {
    border-color: #153C96;
}

#hero a {
    transition: all 0.2s ease-in-out;
}

#hero button {
    transition: all 0.2s ease-in-out;
}

/* ===== categories_section ===== */
#categories {
    overflow: hidden;
}

#categories .js-category-link {
    will-change: transform, box-shadow;
}

/* ===== featured_section ===== */
#featured {
    overflow: hidden;
}

#article-modal:not(.hidden) {
    display: flex;
}

/* ===== reviews_section ===== */
#reviews {
    overflow: hidden;
}

#reviews .review-content {
    display: none;
}

#reviews .review-content.active {
    display: block;
}

/* ===== comparison_section ===== */
#comparison {
    hyphens: auto;
}

#component-comparison-modal::-webkit-scrollbar {
    width: 6px;
}

#component-comparison-modal::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* ===== ev_hybrids_section ===== */
#ev-hybrids {
    overflow: hidden;
}

#ev-hybrids .js-modal {
    transition: opacity 0.25s ease-in-out;
}

#ev-hybrids .js-modal.is-active {
    display: flex;
}

body.ev-modal-open {
    overflow: hidden;
}

/* ===== tech_section ===== */
.tech-section-root {
    hyphens: auto;
}

.tech-card-wrapper article:hover {
    transform: translateY(-4px);
}

.tech-card-wrapper article {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* ===== news_section ===== */
#news {
    overflow: hidden;
    hyphens: auto;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== maintenance_section ===== */
#component-maintenance-modal.is-active {
    display: flex;
}

#component-maintenance-modal {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#maintenance hyphens-auto {
    hyphens: auto;
}

/* ===== popular_section ===== */
#popular {
    overflow: hidden;
}

#popular .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== latest_section ===== */
#latest {
    overflow: hidden;
}

.js-card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.js-modal.active {
    display: flex;
}

/* ===== footer ===== */
#footer {
    overflow: hidden;
}

#footer a {
    outline: none;
}

#footer a:focus-visible {
    outline: 2px solid #153C96;
    outline-offset: 2px;
}