* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --ink: #16374b;
    --blue: #075a91;
    --paper: #f2f7fa;
    --accent: #f67b52;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.85 system-ui, "Microsoft YaHei", sans-serif;
    overflow-wrap: anywhere;
}

a {
    color: var(--blue);
    text-underline-offset: 4px;
}

a:hover {
    color: #a43b1b;
}

a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

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

figure {
    margin: 0;
}

figcaption {
    font-size: 12px;
    color: #506c7a;
    padding: 6px 0;
}

h1, h2, h3 {
    line-height: 1.4;
    margin: 0 0 12px;
}

p {
    margin: 0 0 16px;
}

.wrap {
    width: min(1200px, 92%);
    margin-inline: auto;
}

.skip {
    position: absolute;
    left: 12px;
    top: -100px;
    background: white;
    padding: 8px;
}

.skip:focus {
    top: 0;
    z-index: 9;
}

.header {
    background: white;
    border-bottom: 1px solid #c8dce7;
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
}

.edition, .eyebrow {
    color: #075a91;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .13em;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    padding: 12px 0;
    border-top: 1px solid #e0ebf1;
}

.nav a {
    text-decoration: none;
    font-weight: 600;
}

.nav a[aria-current] {
    border-bottom: 2px solid var(--accent);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    background: #e0edf5;
    margin: 30px 0;
    border-radius: 20px;
    overflow: hidden;
}

.intro {
    padding: clamp(24px, 5vw, 64px);
    align-self: center;
}

h1 {
    font-size: clamp(28px, 4vw, 50px);
    margin-top: 14px;
}

.heroimg {
    padding: 16px;
}

.heroimg img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
}

.cta {
    display: inline-block;
    background: var(--blue);
    color: white;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.cta:hover {
    color: white;
    background: #16374b;
}

.library {
    display: grid;
    grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.rail {
    background: #103b56;
    color: white;
    padding: 24px;
    border-radius: 12px;
}

.rail a {
    color: #b9e6ff;
}

.rail .note {
    color: #d9e7ef;
    margin-top: 16px;
}

.catalog {
    min-width: 0;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.tile {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d4e3eb;
}

.tile:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
}

.tile img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.tiletext {
    padding: 22px;
}

.tile h3 a {
    color: var(--ink);
    text-decoration: none;
}

.tag {
    display: inline-block;
    color: var(--blue);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 13px;
}

.note {
    color: #536c7b;
    font-size: 13px;
}

.closing, .related {
    padding: 28px;
    margin: 28px 0;
    background: #e0edf5;
    border-radius: 12px;
}

.detail {
    max-width: 1000px;
}

.crumb {
    margin-top: 24px;
}

.reading {
    background: white;
    padding: clamp(18px, 4vw, 48px);
    border-radius: 16px;
    margin-bottom: 30px;
}

.articlehead {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    border-bottom: 1px solid #d4e3eb;
    padding-bottom: 24px;
}

.articlehead img {
    border-radius: 12px;
}

.articlehead h1 {
    font-size: clamp(26px, 3.5vw, 40px);
}

.prose {
    max-width: 72ch;
    margin: 28px auto;
}

.prose section {
    margin-bottom: 28px;
}

.prose h2 {
    font-size: 22px;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
}

.footer {
    background: #103b56;
    color: #e0edf5;
    padding: 32px 0;
}

.footer a {
    color: #b9e6ff;
}

.foot p {
    margin: 8px 0;
}

@media (max-width: 760px) {
    .hero, .library, .articlehead {
        grid-template-columns: minmax(0, 1fr);
    }

    .top {
        flex-wrap: wrap;
    }

    .rail {
        order: 1;
    }

    .tiles {
        grid-template-columns: minmax(0, 1fr);
    }

    .tile:first-child {
        grid-template-columns: minmax(0, 1fr);
    }

    .heroimg {
        padding-top: 0;
    }

    .nav {
        gap: 8px 16px;
    }

}

.brand img {
    flex-shrink: 0;
}

.tiletext, .intro, .articlehead > *, .rail {
    min-width: 0;
}

@media (max-width: 380px) {
    .brand {
        font-size: 18px;
    }

    .reading, .closing, .rail {
        padding: 16px;
    }

}
