* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: #f6f5fa;
    color: #202940;
    font: 16px/1.75 system-ui,"Microsoft YaHei",sans-serif;
}
a {
    color: inherit;
    text-decoration: none;
}
a:focus-visible {
    outline: 3px solid #6958ed;
}
img {
    max-width: 100%;
    display: block;
    height: auto;
}
header, main, footer {
    max-width: 1250px;
    margin: auto;
    padding: 24px 30px;
}
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 21px;
}
.brand img {
    width: 44px;
}
nav {
    display: flex;
    gap: 19px;
    flex-wrap: wrap;
}
nav a:hover {
    text-decoration: underline;
}
.hero {
    background: #18243b;
    color: white;
    border-radius: 28px;
    padding: 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 38px;
    align-items: center;
}
.hero h1 {
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.3;
    margin: 12px 0;
}
.eyebrow {
    font-size: 12px;
    letter-spacing: 3px;
    color: #8274e9;
    font-weight: 800;
}
.hero .eyebrow {
    color: #c6bbff;
}
.hero p {
    color: #d6ddef;
}
.heroart {
    display: grid;
    gap: 12px;
    transform: rotate(-3deg);
}
.heroart img {
    border-radius: 12px;
    box-shadow: 0 10px 24px #0003;
}
.heroart img:last-child {
    margin-left: 12%;
    width: 88%;
}
.button {
    display: inline-block;
    background: #6958ed;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
}
.section {
    margin-top: 48px;
}
.section h2 {
    font-size: 28px;
    margin: 0 0 16px;
}
.categories {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}
.categories a {
    background: white;
    border: 1px solid #e1dfea;
    padding: 18px 10px;
    text-align: center;
    border-radius: 12px;
    font-weight: 700;
}
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.card {
    background: white;
    border: 1px solid #e2e1eb;
    border-radius: 17px;
    overflow: hidden;
}
.card img {
    width: 100%;
    aspect-ratio: 16/9;
}
.cardbody {
    padding: 20px;
}
.card h3 {
    margin: 5px 0;
    font-size: 21px;
}
.muted {
    color: #5c6578;
    font-size: 14px;
}
.guide {
    background: #e9e5fa;
    border-radius: 20px;
    padding: 28px;
}
.detail {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 30px;
    background: white;
    padding: 30px;
    border-radius: 22px;
}
.detail img {
    border-radius: 12px;
}
.article {
    max-width: 850px;
    margin: 32px auto;
    background: white;
    padding: 30px;
    border-radius: 18px;
}
.article h2 {
    margin-top: 26px;
}
footer {
    border-top: 1px solid #ddddeb;
    margin-top: 40px;
    color: #5c6578;
}
.skip {
    position: absolute;
    left: -999px;
}
.skip:focus {
    left: 10px;
    top: 10px;
    background: white;
    padding: 10px;
}
@media (max-width:800px) {
    header,main,footer {
        padding: 18px;
    }
    .hero,.detail {
        grid-template-columns: 1fr;
        padding: 25px;
    }
    .heroart {
        transform: none;
    }
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .categories {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width:480px) {
    .cards {
        grid-template-columns: 1fr;
    }
    .article {
        padding: 20px;
    }
    .categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive layout safeguards */
.hero > *,
.detail > *,
.cardbody {
    min-width: 0;
    overflow-wrap: anywhere;
}
.card {
    display: flex;
    flex-direction: column;
}
.cardbody {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.cardbody .button {
    margin-top: auto;
}
