/* Lab news page. Colors come from root.css and theme.css. */

.nw {
    --nw-ink: var(--headerColor, #2b3a32);
    --nw-body: var(--bodyTextColor, #3d4d44);
    --nw-line: var(--lineColor, #c2d6cc);
    --nw-green: var(--secondaryDark, #4a7c65);
    --nw-mute: #5a6d62;
    --nw-shadow: 0 2px 16px rgba(43, 58, 50, 0.08);
    padding: clamp(7rem, 12vw, 9rem) 0 4rem;
    color: var(--nw-body);
}
.nw-wrap { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 1.25rem; box-sizing: border-box; }
.nw-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header, centered like the rest of the site */
.nw-head { text-align: center; }
.nw-h1 { margin: 0 0 0.6rem; font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1.15; color: var(--nw-ink); }
.nw-sub { margin: 0 auto 1.8rem; max-width: 40rem; font-size: 1.05rem; line-height: 1.55; }
.nw-search {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 32rem;
    margin: 0 auto;
    padding: 0 1.2rem;
    background: #fff;
    border: 1px solid var(--nw-line);
    border-radius: 999px;
    color: var(--nw-mute);
    box-shadow: var(--nw-shadow);
}
.nw-search input { flex: 1; min-width: 0; font: inherit; font-size: 0.95rem; color: var(--nw-ink); background: transparent; border: 0; padding: 0.8rem 0; }
.nw-search input:focus { outline: none; }
.nw-search:focus-within { border-color: var(--nw-green); }

/* Years */
.nw-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 1.8rem 0 0.6rem; }
.nw-pill {
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--nw-ink);
    background: #fff;
    border: 1px solid var(--nw-line);
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    cursor: pointer;
}
.nw-pill:hover { border-color: var(--nw-green); }
.nw-pill.is-on { background: var(--nw-ink); border-color: var(--nw-ink); color: #fff; }
.nw-count { margin: 0 0 1.4rem; text-align: center; font-size: 0.9rem; color: var(--nw-mute); }

/* Seasons */
.nw .nw-year[hidden], .nw .nw-card[hidden], .nw .nw-item[hidden] { display: none !important; }
.nw-year-title {
    display: none;
    align-items: baseline;
    gap: 0.8rem;
    margin: 2rem 0 1rem;
    font-size: 1.9rem;
    color: var(--nw-ink);
}
.nw-year-title span { font-family: Figtree, Arial, sans-serif; font-size: 0.85rem; font-weight: 400; color: var(--nw-mute); }
.nw.is-all .nw-year-title { display: flex; }
.nw.is-all .nw-year:first-child .nw-year-title { margin-top: 0; }

.nw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; align-items: start; }
.nw-card { background: #fff; border-top: 4px solid #8cbfa8; border-radius: 12px; box-shadow: var(--nw-shadow); padding: 1.1rem 1.3rem; }
.nw-year:first-of-type .nw-card:first-child { border-top-color: #e0a82e; }
.nw-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; }
.nw-season { margin: 0; font-size: 1.35rem; font-weight: 600; color: var(--nw-ink); }
.nw-n { font-size: 0.85rem; color: var(--nw-mute); background: #eef5f0; border-radius: 999px; padding: 0.1rem 0.6rem; }

.nw-list { list-style: none; margin: 0; padding: 0; }
.nw-item { padding: 0.8rem 0; border-top: 1px solid #e6eee9; cursor: pointer; }
.nw-item:focus-visible { outline: 2px solid var(--nw-green); outline-offset: 2px; border-radius: 4px; }
.nw-text {
    font-size: 0.93rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nw-text p { margin: 0; max-width: none; }
.nw-text a { color: var(--nw-green); font-weight: 600; overflow-wrap: anywhere; }
.nw-item.is-open .nw-text { display: block; -webkit-line-clamp: unset; overflow: visible; }
.nw-item.is-extra { display: none; }
.nw-card.is-expanded .nw-item.is-extra { display: block; }

.nw-more { margin-top: 0.4rem; font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--nw-green); background: none; border: 0; padding: 0.3rem 0; cursor: pointer; }
.nw-more:hover { text-decoration: underline; }

/* All years and search results: one short line per update */
.nw.is-all .nw-grid { grid-template-columns: 1fr; gap: 0.8rem; }
.nw.is-all .nw-card { padding: 0.9rem 1.3rem; }
.nw.is-all .nw-text { -webkit-line-clamp: 1; }
.nw.is-all .nw-item.is-open .nw-text { -webkit-line-clamp: unset; }
.nw.is-all .nw-item.is-extra { display: block; }
.nw.is-all .nw-more { display: none; }

.nw-empty { text-align: center; padding: 3rem 1rem; }
.nw-empty p { margin: 0 0 1rem; font-size: 1.05rem; }
.nw-btn { font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--nw-ink); background: #fff; border: 1px solid var(--nw-line); border-radius: 999px; padding: 0.7rem 1.15rem; cursor: pointer; }
.nw-btn:hover { border-color: var(--nw-green); }

@media only screen and (max-width: 64rem) {
    .nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media only screen and (max-width: 40rem) {
    .nw-grid { grid-template-columns: 1fr; }
}
