.materials-hero,
.materials-rubrics,
.materials-list {
    --materials-pad: clamp(18px, 4vw, 48px);
    overflow-wrap: anywhere;
}

.materials-hero {
    padding: clamp(28px, 5vw, 60px) var(--materials-pad);
    background: radial-gradient(#baccc235 1px, transparent 1px) 0 0 / 22px 22px, #182d34;
    color: #fffdf4;
    border-bottom: 4px solid #ead16e;
}

.materials-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.1;
}

.materials-back { display: inline-block; margin-bottom: 16px; color: #f5df8d; }
.materials-hero > p { color: #e2ebe5; max-width: 65ch; }
.materials-search { max-width: 650px; margin-top: 24px; }
.materials-search label { display: block; margin-bottom: 8px; font-size: 14px; }
.materials-search > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

.materials-search input {
    min-width: 0;
    width: 100%;
    min-height: 46px;
    padding: 9px 12px;
    font: inherit;
    font-size: 16px;
    color: #203239;
    background: #fffdf4;
    border: 1px solid #a5b7aa;
}

.materials-search .button { min-height: 46px; }

.materials-rubrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px var(--materials-pad);
    background: #e6ede4;
    border-bottom: 1px solid #bfcdc4;
}

.materials-rubrics a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid #9eafa6;
    color: #253e42;
    text-decoration: none;
    font-size: 14px;
}

.materials-rubrics a:hover,
.materials-rubrics a[aria-current="page"] { color: #fffdf4; background: #233d42; }
.materials-list { padding: clamp(24px, 4vw, 48px) var(--materials-pad); background: #f4f2e9; }
.materials-list > h2 { font-size: clamp(22px, 3vw, 34px); margin: 0 0 22px; }
.materials-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.materials-card {
    min-width: 0;
    background: #fffdf5;
    border: 1px solid #bbc6ba;
    transition: border-color .2s, transform .2s;
}

.materials-cover { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: #e0e9de; }
.materials-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.materials-image.is-schematic { object-fit: contain; padding: 9px; }
.materials-card-body { padding: 18px; }
.materials-card h2 { margin: 10px 0; font-size: clamp(20px, 2vw, 25px); line-height: 1.24; }
.materials-card h2 a { color: #19363b; text-decoration: none; }
.materials-card h2 a:hover { text-decoration: underline; }
.materials-card p { margin-bottom: 12px; font-size: 15px; }
.materials-tag, .materials-card time { color: #3c5853; font-size: 13px; }
.materials-empty { padding: clamp(20px, 4vw, 34px); border-left: 4px solid #c5a546; background: #fffdf5; }
.materials-empty svg { width: 40px; height: 40px; color: #5a6d42; }
.materials-empty h2 { font-size: clamp(22px, 3vw, 32px); margin: 8px 0; }
.materials-list .nav-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.materials-list .page-numbers { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px; }

@media (hover: hover) {
    .materials-card:hover { transform: translateY(-3px); border-color: #9c7925; }
}

@media (max-width: 900px) {
    .materials-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .materials-grid { grid-template-columns: 1fr; }
    .materials-rubrics a { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .materials-card { transition: none; }
    .materials-card:hover { transform: none; }
}
