/* =====================================================================
   THE NEWS, THE NICE KIND  -  /Daily_Pick/news.css
   Same paper, serif and museum-label red as the rest of Daily Picks.
   Each section has its own colour (the --nw-... values below).
   ===================================================================== */

:root {
    --nw-camera: #8a2b1d;
    --nw-photo: #b0476b;
    --nw-tech: #2f5a7a;
    --nw-space: #4a3f8a;
    --nw-world: #3f6b4a;
    --nw-saved: #d9466f;
    --nw-ease: cubic-bezier(.2, .7, .2, 1);
}
[data-c="camera"] { --c: var(--nw-camera); --c-wash: #f7ebe7; }
[data-c="photo"] { --c: var(--nw-photo); --c-wash: #f8eaf0; }
[data-c="tech"] { --c: var(--nw-tech); --c-wash: #e9f0f6; }
[data-c="space"] { --c: var(--nw-space); --c-wash: #eeecf8; }
[data-c="world"] { --c: var(--nw-world); --c-wash: #eaf3ec; }

/* ---------------------------------------------------------------------
   The ticker under the page title
   --------------------------------------------------------------------- */
.nw-ticker {
    display: flex;
    align-items: center;
    margin: -10px 0 26px;
    border-top: 1px solid var(--dp-rule);
    border-bottom: 1px solid var(--dp-rule);
    font-family: var(--dp-serif);
    overflow: hidden;
}
.nw-ticker[hidden] { display: none; }
a.nw-ticker-label, a.nw-ticker-label:visited {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px 9px 2px;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--dp-accent);
    text-decoration: none;
    background: #fff;
    position: relative;
    z-index: 1;
    box-shadow: 10px 0 12px #fff;
}
.nw-ticker-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--dp-accent); animation: nw-live 2s ease-in-out infinite; }
.nw-ticker-track { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.nw-ticker-run { display: inline-flex; white-space: nowrap; animation: nw-scroll var(--dur, 80s) linear infinite; }
.nw-ticker:hover .nw-ticker-run, .nw-ticker:focus-within .nw-ticker-run { animation-play-state: paused; }
.nw-ticker-run a, .nw-ticker-run a:visited {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 22px 9px 0;
    color: var(--dp-ink);
    text-decoration: none;
    font-size: 0.92rem;
}
.nw-ticker-run a:hover { color: var(--dp-accent); }
.nw-ticker-run i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.nw-ticker-run small { font-size: 0.72rem; font-style: italic; color: var(--dp-faint); }
@keyframes nw-scroll { to { transform: translateX(-50%); } }
@keyframes nw-live { 50% { opacity: 0.3; transform: scale(0.7); } }

/* ---------------------------------------------------------------------
   The section
   --------------------------------------------------------------------- */
.news-card {
    margin-top: 28px;
    padding: 22px 26px 22px;
    background: var(--dp-paper);
    border: 1px solid var(--dp-rule);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(40, 30, 10, 0.04), 0 6px 18px rgba(40, 30, 10, 0.05);
    font-family: var(--dp-serif);
    scroll-margin-top: 20px;
}
.news-card p { margin: 0; }

/* sections, find, order, view */
.nw-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin: 4px 0 8px; }
.nw-tabs { position: relative; display: flex; gap: 2px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.nw-tabs::-webkit-scrollbar { display: none; }
.nw-tab {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    background: none;
    font: inherit;
    font-size: 0.92rem;
    color: var(--dp-muted);
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.3s ease;
}
.nw-tab svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nw-tab[data-cat="saved"] svg { fill: var(--nw-saved); stroke: none; }
.nw-tab small { font-size: 0.7rem; color: var(--dp-faint); font-variant-numeric: tabular-nums; transition: color 0.3s ease; }
.nw-tab:hover { color: var(--dp-ink); }
.nw-tab[aria-selected="true"] { color: #fff; }
.nw-tab[aria-selected="true"] small { color: rgba(255, 255, 255, 0.7); }
.nw-tab:focus-visible { outline: 2px solid var(--dp-accent); outline-offset: 1px; }
.nw-tab-ink {
    position: absolute;
    left: 0;
    top: 0;
    height: calc(100% - 4px);
    border-radius: 999px;
    background: var(--dp-ink);
    box-shadow: 0 4px 12px rgba(27, 26, 23, 0.18);
    transition: transform 0.45s var(--nw-ease), width 0.45s var(--nw-ease);
}

.nw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nw-find {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid #d9d3c7;
    border-radius: 999px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.nw-find:focus-within { border-color: var(--dp-accent); box-shadow: 0 0 0 3px rgba(138, 43, 29, 0.1); }
.nw-find svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--dp-muted); stroke-width: 2; stroke-linecap: round; }
.nw-find input { width: 140px; padding: 7px 0; border: 0; outline: none; background: none; font: inherit; font-size: 0.9rem; color: var(--dp-ink); }
.nw-find input::placeholder { color: var(--dp-faint); font-style: italic; }
.nw-seg { display: inline-flex; padding: 2px; border: 1px solid #d9d3c7; border-radius: 999px; background: #fff; }
.nw-seg button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border: 0;
    border-radius: 999px;
    background: none;
    font: inherit;
    font-size: 0.85rem;
    color: var(--dp-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.nw-seg button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nw-seg button:hover { color: var(--dp-ink); }
.nw-seg button[aria-pressed="true"] { background: var(--dp-wash, #f3efe7); color: var(--dp-ink); }
.nw-seg button:focus-visible { outline: 2px solid var(--dp-accent); outline-offset: 1px; }
#nw-shuffle.spin svg { animation: nw-spin 0.6s var(--nw-ease); }
@keyframes nw-spin { to { transform: rotate(360deg); } }

/* the websites in this section */
.nw-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; min-height: 4px; }
.nw-from { margin-right: 2px; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dp-faint); }
.nw-source {
    padding: 2px 10px;
    border: 1px solid var(--dp-rule);
    border-radius: 999px;
    background: none;
    font: inherit;
    font-size: 0.8rem;
    color: var(--dp-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}
.nw-source:hover { border-color: #cfc7b8; color: var(--dp-ink); }
.nw-source.on { background: var(--dp-accent); border-color: var(--dp-accent); color: #fff; }

/* ---------------------------------------------------------------------
   A story
   --------------------------------------------------------------------- */
.nw-story { position: relative; min-width: 0; }
.nw-story *, .nw-plain { box-sizing: border-box; }
a.nw-link, a.nw-link:visited {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--dp-rule);
    border-radius: 10px;
    background: #fff;
    color: var(--dp-ink);
    text-decoration: none;
    transition: transform 0.3s var(--nw-ease), box-shadow 0.3s ease, border-color 0.3s ease;
}
a.nw-link:hover { transform: translateY(-3px); border-color: #d8cfc0; box-shadow: 0 2px 4px rgba(40, 30, 10, 0.05), 0 14px 30px rgba(40, 30, 10, 0.1); }
a.nw-link:focus-visible { outline: 2px solid var(--dp-accent); outline-offset: 3px; }

.nw-img { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--c-wash, #f3efe7); }
.nw-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 0.6s ease, transform 0.9s var(--nw-ease); }
.nw-img.is-in img { opacity: 1; transform: none; }
a.nw-link:hover .nw-img img { transform: scale(1.05); }

/* stories without a picture get their website's letter, big and soft */
.nw-plain {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 14px;
    background: var(--c-wash, #f3efe7);
    color: var(--c, var(--dp-accent));
    overflow: hidden;
}
.nw-plain b { font-size: 3.4rem; font-weight: normal; font-style: italic; line-height: 1; opacity: 0.22; transform: translateY(10px); }
.nw-plain svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.6; }

.nw-body { display: flex; flex-direction: column; flex: 1; padding: 11px 14px 13px; }
.nw-meta { display: flex; align-items: center; gap: 7px; font-size: 0.74rem; color: var(--dp-faint); }
.nw-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--c); }
.nw-src { letter-spacing: 0.08em; text-transform: uppercase; color: var(--c); font-size: 0.68rem; }
.nw-time::before { content: "·"; margin-right: 7px; }
.nw-readmark { margin-left: auto; padding: 0 6px; border-radius: 99px; background: #f1ede5; font-size: 0.66rem; }
.nw-title { margin-top: 6px; font-size: 1.04rem; font-weight: 600; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-sum { margin-top: 6px; font-size: 0.86rem; line-height: 1.5; color: #57524a; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-go { margin-top: auto; padding-top: 10px; font-size: 0.8rem; color: var(--dp-muted); opacity: 0.75; transition: color 0.2s ease, opacity 0.2s ease, transform 0.3s var(--nw-ease); }
a.nw-link:hover .nw-go { color: var(--c); opacity: 1; transform: translateX(3px); }
.nw-story.is-read .nw-title { color: #6f6a62; }
.nw-story.is-read .nw-img img { filter: saturate(0.6); }

/* keep it for later */
.nw-heart {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.25s ease, transform 0.3s var(--nw-ease);
}
.nw-heart svg { width: 17px; height: 17px; fill: none; stroke: var(--nw-saved); stroke-width: 1.8; transition: fill 0.2s ease; }
.nw-story:hover .nw-heart, .nw-heart:focus-visible, .nw-heart.on { opacity: 1; transform: none; }
.nw-heart:hover { transform: scale(1.12); }
.nw-heart.on svg { fill: var(--nw-saved); animation: nw-beat 0.5s var(--nw-ease); }
.nw-heart:focus-visible { outline: 2px solid var(--nw-saved); outline-offset: 2px; }
@media (hover: none) { .nw-heart { opacity: 1; transform: none; } }
@keyframes nw-beat { 30% { transform: scale(1.35); } 60% { transform: scale(0.9); } }
.nw-burst {
    position: absolute;
    z-index: 90;
    width: 11px;
    height: 11px;
    margin: -5px 0 0 -5px;
    pointer-events: none;
    background: var(--nw-saved);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20s-7-4.3-9-8.6C1.6 8 3.4 4.5 6.8 4.5c2 0 3.4 1.1 5.2 3 1.8-1.9 3.2-3 5.2-3 3.4 0 5.2 3.5 3.8 6.9C19 15.7 12 20 12 20z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20s-7-4.3-9-8.6C1.6 8 3.4 4.5 6.8 4.5c2 0 3.4 1.1 5.2 3 1.8-1.9 3.2-3 5.2-3 3.4 0 5.2 3.5 3.8 6.9C19 15.7 12 20 12 20z'/%3E%3C/svg%3E") center / contain no-repeat;
    animation: nw-burst 0.9s var(--nw-ease) forwards;
}
@keyframes nw-burst { from { opacity: 1; transform: scale(0.4); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); } }

/* the big story at the top */
.nw-feature-wrap { margin-bottom: 16px; }
.nw-feature-wrap[hidden] { display: none; }
.nw-feature a.nw-link { flex-direction: row; min-height: 280px; }
.nw-feature .nw-img { flex: 1.25; aspect-ratio: auto; min-height: 280px; }
.nw-feature .nw-img img { position: absolute; inset: 0; }
.nw-feature .nw-body { flex: 1; padding: 22px 26px; justify-content: center; }
.nw-feature .nw-title { font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.22; -webkit-line-clamp: 4; }
.nw-feature .nw-sum { font-size: 0.98rem; -webkit-line-clamp: 4; }
.nw-feature .nw-go { margin-top: 0; padding-top: 16px; }
.nw-feature .nw-plain { display: none; }

/* the grid */
.nw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.nw-skel { height: 290px; border-radius: 10px; background: linear-gradient(100deg, #f4f0e8 30%, #faf8f3 50%, #f4f0e8 70%) 0 0 / 300% 100%; animation: nw-shimmer 1.4s linear infinite; }
@keyframes nw-shimmer { to { background-position: -150% 0; } }

/* the list view: headlines only, quick to scan */
.nw-grid.is-list { grid-template-columns: 1fr; gap: 0; }
.nw-grid.is-list a.nw-link { flex-direction: row; align-items: center; border: 0; border-bottom: 1px solid var(--dp-rule); border-radius: 0; background: none; }
.nw-grid.is-list a.nw-link:hover { transform: none; box-shadow: none; background: #faf8f3; }
.nw-grid.is-list .nw-img { flex: none; width: 92px; aspect-ratio: 4 / 3; margin: 8px 0 8px 4px; border-radius: 6px; }
.nw-grid.is-list .nw-plain { flex: none; width: 92px; height: 69px; margin: 8px 0 8px 4px; border-radius: 6px; justify-content: center; }
.nw-grid.is-list .nw-plain b { font-size: 2.4rem; transform: none; }
.nw-grid.is-list .nw-plain svg { display: none; }
.nw-grid.is-list .nw-body { padding: 8px 52px 8px 14px; }
.nw-grid.is-list .nw-title { margin-top: 3px; -webkit-line-clamp: 2; font-size: 1rem; }
.nw-grid.is-list .nw-sum, .nw-grid.is-list .nw-go { display: none; }
.nw-grid.is-list .nw-heart { top: 50%; margin-top: -16px; }

/* stories arriving: dealt in one after another */
.news-card.is-animating .nw-story, .nw-story.is-new { animation: nw-in 0.6s var(--nw-ease) both; animation-delay: calc(min(var(--i), 14) * 45ms); }
@keyframes nw-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

.nw-empty { padding: 26px 10px; text-align: center; font-style: italic; color: var(--dp-muted); line-height: 1.6; }
.nw-sites { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; font-style: normal; }
.nw-sites a, .nw-sites a:visited { padding: 4px 12px; border: 1px solid var(--dp-rule); border-radius: 999px; color: var(--dp-ink); text-decoration: none; font-size: 0.88rem; }
.nw-sites a:hover { border-color: var(--dp-accent); color: var(--dp-accent); }
.news-card.is-off .nw-grid, .news-card.is-off .nw-bar { display: none; }
.nw-linkbtn { border: 0; padding: 0; background: none; font: inherit; color: var(--dp-accent); text-decoration: underline; cursor: pointer; }

.nw-more-row { display: flex; justify-content: center; }
.nw-more {
    margin-top: 18px;
    padding: 8px 20px;
    border: 1px solid #d9d3c7;
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: 0.92rem;
    color: var(--dp-ink);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.nw-more:hover { background: var(--dp-ink); border-color: var(--dp-ink); color: #fff; }
.nw-more[hidden] { display: none; }
.nw-foot { margin-top: 16px !important; padding-top: 12px; border-top: 1px solid var(--dp-rule); font-size: 0.8rem; font-style: italic; color: var(--dp-faint); text-align: center; }

/* ---------------------------------------------------------------------
   Small screens, and calmer motion
   --------------------------------------------------------------------- */
@media (max-width: 760px) {
    .news-card { padding: 18px 14px; }
    .nw-feature a.nw-link { flex-direction: column; min-height: 0; }
    .nw-feature .nw-img { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
    .nw-feature .nw-body { padding: 14px 16px; }
    .nw-tools { width: 100%; }
    .nw-find { flex: 1 1 100%; }
    .nw-find input { width: 100%; }
    .nw-grid { grid-template-columns: 1fr; }
    .nw-ticker-run a { font-size: 0.86rem; }
}
@media (prefers-reduced-motion: reduce) {
    .nw-ticker-run { animation: none; }
    .nw-ticker-track { overflow-x: auto; }
    .news-card.is-animating .nw-story, .nw-story.is-new, .nw-heart.on svg, .nw-skel, .nw-ticker-label i { animation: none; }
    a.nw-link, .nw-img img, .nw-tab-ink { transition: none; }
}
