/*
 * Filambda News on top of the shared Filambda theme (assets/css/filambda.css,
 * --fl-* tokens, light and dark). Class prefix .nw-
 */

.nw-body { background: var(--fl-bg); color: var(--fl-text); min-height: 100vh; display: flex; flex-direction: column; }
.nw-skip { position: absolute; left: 1rem; top: 1rem; z-index: 2000; background: var(--fl-surface); padding: 0.5rem 1rem; border-radius: var(--fl-radius); }

/* Header: logo, date, weather chip, language, theme; then the sections */
.nw-header { background: var(--fl-surface); border-bottom: 1px solid var(--fl-border); position: sticky; top: 0; z-index: 1020; }
.nw-header-top { display: flex; align-items: center; gap: 1rem; max-width: 1280px; margin: 0 auto; padding: 0.7rem 1.25rem; }
.nw-logo { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--fl-text); }
.nw-mark img { width: 36px; height: 36px; }
.nw-wordmark { display: flex; flex-direction: column; line-height: 1; }
.nw-wordmark small { font-size: 0.58rem; letter-spacing: 0.18em; font-weight: 650; color: var(--fl-text-muted); }
.nw-wordmark span { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; }
.nw-today { color: var(--fl-text-muted); font-size: 0.85rem; border-left: 1px solid var(--fl-border); padding-left: 1rem; }
.nw-nav { display: flex; gap: 0.25rem; max-width: 1280px; margin: 0 auto; padding: 0 1rem; overflow-x: auto; scrollbar-width: none; }
.nw-nav::-webkit-scrollbar { display: none; }
.nw-nav a { white-space: nowrap; padding: 0.55rem 0.7rem; color: var(--fl-text-muted); font-weight: 550; font-size: 0.92rem; border-bottom: 2px solid transparent; text-decoration: none; }
.nw-nav a:hover { color: var(--fl-text); }
.nw-nav a.is-active { color: var(--fl-text); border-bottom-color: var(--fl-accent); }

.nw-main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.nw-flash { margin-bottom: 1rem; }

/* Footer */
.nw-footer { border-top: 1px solid var(--fl-border); background: var(--fl-surface); padding: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--fl-text-muted); }
.nw-footer > div { display: flex; align-items: center; gap: 0.6rem; max-width: 720px; }
.nw-footer .nw-mark img { width: 24px; height: 24px; }
.nw-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.nw-footer a { color: var(--fl-text-muted); }

/* Empty states */
.nw-empty { text-align: center; padding: 3rem 1rem; color: var(--fl-text-muted); }
.nw-empty-icon { width: 4rem; height: 4rem; margin: 0 auto 1rem; border-radius: 1.2rem; display: grid; place-items: center; font-size: 1.8rem; background: var(--fl-accent-soft); color: var(--fl-accent-text); }
.nw-empty h2 { color: var(--fl-text); }

/* Toasts */
.nw-toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 1100; display: flex; flex-direction: column; gap: 0.5rem; }
.nw-toast { background: var(--fl-ink, #0E1525); color: #fff; padding: 0.6rem 1rem; border-radius: var(--fl-radius); box-shadow: var(--fl-shadow-lg); font-size: 0.9rem; }
.nw-toast.is-error { background: var(--fl-danger); }

@media (max-width: 575.98px) {
    .nw-header-top { padding: 0.55rem 0.9rem; gap: 0.5rem; }
    .nw-wordmark span { font-size: 1.2rem; }
    .nw-header .fl-segmented { display: none; }
    .nw-main { padding: 1rem 0.9rem 2.5rem; }
}

/* Page titles and the news language chips */
.nw-page-title { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 1.25rem; display: flex; gap: 0.5rem; align-items: center; }
.nw-page-title .bi { color: var(--fl-accent-text); }
.nw-lead-text { color: var(--fl-text-muted); max-width: 760px; }
.nw-langbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: -0.25rem 0 1.25rem; }
.nw-langbar-label { color: var(--fl-text-muted); font-size: 0.85rem; margin-right: 0.25rem; }
.nw-chip input { position: absolute; opacity: 0; pointer-events: none; }
.nw-chip span { display: inline-block; padding: 0.2rem 0.65rem; border: 1px solid var(--fl-border); border-radius: 999px; font-size: 0.8rem; cursor: pointer; background: var(--fl-surface); color: var(--fl-text-muted); }
.nw-chip input:checked + span { border-color: var(--fl-accent); background: var(--fl-accent-soft); color: var(--fl-accent-text); font-weight: 600; }
.nw-chip input:focus-visible + span { outline: 2px solid var(--fl-accent); outline-offset: 2px; }

/* Front page: the top stories and the sections in the main column, the side
   column next to both (no gap above the sections however tall it is). */
.nw-front { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto 1fr; grid-template-areas: "top side" "blocks side"; gap: 0 2rem; align-items: start; }
.nw-front-main { grid-area: top; container-type: inline-size; }
.nw-front-side { grid-area: side; display: flex; flex-direction: column; gap: 1rem; }
.nw-front-blocks { grid-area: blocks; container-type: inline-size; }
@media (min-width: 1360px) { .nw-front { grid-template-columns: minmax(0, 1fr) 360px; } }
/* Narrower: one column; the side boxes between the top stories and the sections, two by two. */
@media (max-width: 1099.98px) {
    .nw-front { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "top" "side" "blocks"; }
    .nw-front-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; margin-top: 2rem; }
}
@media (max-width: 575.98px) { .nw-front-side { grid-template-columns: 1fr; margin-top: 1.5rem; } }

/* Stories */
.nw-story { min-width: 0; }
.nw-title { font-weight: 650; letter-spacing: -0.01em; margin: 0 0 0.35rem; line-height: 1.3; }
.nw-title a, .nw-title-link { color: var(--fl-text); text-decoration: none; }
.nw-title a:hover { color: var(--fl-accent-text); }
.nw-title a:visited { color: var(--fl-text-muted); }
.nw-summary { color: var(--fl-text-muted); font-size: 0.92rem; margin: 0 0 0.45rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; font-size: 0.78rem; color: var(--fl-text-muted); }
.nw-source { font-weight: 600; color: var(--fl-text); text-decoration: none; }
.nw-source:hover { color: var(--fl-accent-text); }
.nw-lang { font-size: 0.66rem; font-weight: 700; padding: 0 0.3rem; border-radius: 4px; background: var(--fl-surface-3); }

.nw-pic { position: relative; display: block; overflow: hidden; border-radius: var(--fl-radius); background: var(--fl-surface-3); aspect-ratio: 16 / 9; }
.nw-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform .3s ease; }
.nw-story:hover .nw-pic img { transform: scale(1.03); }
/* While a picture loads: a calm surface with the section's icon (a picture that fails turns the card into text, news.js). */
.nw-pic-empty { position: absolute; inset: 0; display: grid; place-items: center; background: var(--fl-surface-3); color: var(--fl-text-subtle); font-size: 1.4rem; }
.nw-pic-empty .bi { opacity: 0.45; }
.nw-pic-empty::after { content: attr(data-initials); position: absolute; right: 0.6rem; bottom: 0.4rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; opacity: 0.6; }

.nw-lead { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.25rem; align-items: center; padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--fl-border); }
@container (max-width: 640px) { .nw-lead { grid-template-columns: minmax(0, 1fr); } }
.nw-lead .nw-title { font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.2; }
.nw-lead .nw-summary { font-size: 1rem; -webkit-line-clamp: 5; }
.nw-pic-lead { border-radius: var(--fl-radius-lg); }
@media (max-width: 767.98px) { .nw-lead { grid-template-columns: 1fr; } }

.nw-card .nw-pic { margin-bottom: 0.65rem; }
.nw-card .nw-title { font-size: 1.02rem; }

.nw-grid { display: grid; gap: 1.5rem 1.25rem; }
.nw-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nw-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 991.98px) { .nw-grid-4, .nw-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .nw-grid-4, .nw-grid-3 { grid-template-columns: 1fr; } .nw-card .nw-summary { -webkit-line-clamp: 2; } }
/* Four stories as the space allows: four in a row, two by two, or one under another. */
.nw-grid-auto { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@container (max-width: 760px) { .nw-grid-auto { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 460px) { .nw-grid-auto { grid-template-columns: minmax(0, 1fr); } }

.nw-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--fl-border); }
.nw-rows-wide { border-top: 0; padding-top: 0; margin-top: 0; }
@media (max-width: 767.98px) { .nw-rows { grid-template-columns: 1fr; } }
.nw-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0.8rem; align-items: start; }
.nw-row .nw-title { font-size: 0.95rem; }
.nw-pic-row { aspect-ratio: 4 / 3; }

/* Side boxes and the latest headlines */
.nw-box { background: var(--fl-surface); border: 1px solid var(--fl-border); border-radius: var(--fl-radius-lg); padding: 1rem 1.1rem; }
.nw-box-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fl-text-muted); margin: 0 0 0.75rem; display: flex; gap: 0.4rem; align-items: center; }
.nw-lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.nw-line { display: grid; grid-template-columns: 2.8rem minmax(0, 1fr); gap: 0.5rem; padding: 0.55rem 0; border-top: 1px solid var(--fl-border); font-size: 0.9rem; }
.nw-line:first-child { border-top: 0; padding-top: 0; }
.nw-line time { color: var(--fl-accent-text); font-weight: 650; font-variant-numeric: tabular-nums; }
.nw-line a { color: var(--fl-text); text-decoration: none; font-weight: 550; line-height: 1.35; }
.nw-line a:hover { color: var(--fl-accent-text); }
.nw-line-source { display: block; font-size: 0.75rem; color: var(--fl-text-muted); margin-top: 0.15rem; }

/* Section blocks */
.nw-block { margin-top: 2.5rem; }
.nw-block-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--fl-text); }
.nw-block-title a { color: var(--fl-text); text-decoration: none; display: inline-flex; gap: 0.45rem; align-items: center; }
.nw-block-title .bi:first-child { color: var(--fl-accent-text); }
.nw-more { font-size: 0.9rem; color: var(--fl-text-muted); transition: transform .15s ease; }
.nw-block-title a:hover .nw-more { transform: translateX(3px); color: var(--fl-accent-text); }
.nw-pager { text-align: center; margin-top: 2rem; }

/* Search, sources */
.nw-search { position: relative; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; max-width: 760px; }
.nw-search > .bi { position: absolute; left: 1rem; top: 1.1rem; color: var(--fl-text-muted); z-index: 1; }
.nw-search input[type="search"] { padding-left: 2.6rem; flex: 1 1 320px; }
.nw-source-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.6rem 1.5rem; }
.nw-source-list li { display: flex; flex-direction: column; }
.nw-source-list a { color: var(--fl-text); text-decoration: none; }
.nw-source-list span { font-size: 0.82rem; }
.nw-source-head { margin-bottom: 1.5rem; }
.nw-header-search { color: var(--fl-text-muted); }

/* Phones: a card without a picture is just its text (no empty block). */
@media (max-width: 575.98px) {
    .nw-card .nw-pic:not(:has(img)) { display: none; }
    .nw-card { padding-bottom: 1rem; border-bottom: 1px solid var(--fl-border); }
    .nw-grid { gap: 1rem; }
    .nw-langbar .nw-chip span { padding: 0.15rem 0.55rem; }
}

/* Weather: header chip, front page card, /weather */
.nw-wx-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px solid var(--fl-border); color: var(--fl-text); text-decoration: none; font-size: 0.85rem; white-space: nowrap; }
.nw-wx-chip:hover { border-color: var(--fl-accent); color: var(--fl-text); }
.nw-wx-chip .nw-wx-icon { font-size: 1.05rem; }
.nw-wx-icon { color: var(--fl-accent-text); }
.nw-wx-sun, .nw-wx-icon.nw-wx-sun { color: #F59E0B; }
.nw-wx-icon.nw-wx-cloud-sun { color: #F59E0B; }
.nw-wx-icon.nw-wx-moon, .nw-wx-icon.nw-wx-moon-stars, .nw-wx-icon.nw-wx-cloud-moon { color: #8B9AF8; }
.nw-wx-icon.nw-wx-clouds, .nw-wx-icon.nw-wx-cloud-fog2 { color: var(--fl-text-muted); }
.nw-wx-icon.nw-wx-cloud-lightning-rain { color: #A855F7; }
.nw-wx-top { display: flex; align-items: center; justify-content: space-between; }
.nw-wx-place { display: flex; align-items: center; gap: 0.35rem; font-weight: 650; }
.nw-wx-place .bi { color: var(--fl-accent-text); }
.nw-wx-now { display: flex; align-items: center; gap: 0.75rem; margin: 0.5rem 0; }
.nw-wx-now .nw-wx-icon { font-size: 3rem; line-height: 1; }
.nw-wx-temp { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.nw-wx-label { color: var(--fl-text-muted); }
.nw-wx-details { list-style: none; padding: 0; margin: 0 0 0.75rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.82rem; color: var(--fl-text-muted); }
.nw-wx-details .bi { margin-right: 0.25rem; }
.nw-wx-hours { list-style: none; padding: 0.6rem 0; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(3.2rem, 1fr); gap: 0.25rem; border-top: 1px solid var(--fl-border); border-bottom: 1px solid var(--fl-border); text-align: center; font-size: 0.8rem; }
.nw-wx-hours li { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.nw-wx-hours .nw-wx-icon { font-size: 1.2rem; }
.nw-wx-hours:focus-visible { outline: 2px solid var(--fl-accent); outline-offset: 2px; border-radius: 8px; }
.nw-wx-h { color: var(--fl-text-muted); }
.nw-wx-rain { color: #3B82F6; font-size: 0.72rem; }
.nw-wx-hours-scroll { overflow-x: auto; border: 0; grid-auto-columns: 3.8rem; padding-bottom: 0.5rem; }
.nw-wx-days { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.88rem; }
.nw-wx-days li { display: grid; grid-template-columns: 4.6rem 1.4rem 2.6rem 2.4rem minmax(3rem, 1fr) 2.4rem; gap: 0.4rem; align-items: center; }
.nw-wx-full .nw-wx-days li { grid-template-columns: 6rem 1.6rem 3rem 2.6rem minmax(4rem, 1fr) 2.6rem auto; padding: 0.35rem 0; border-top: 1px solid var(--fl-border); }
.nw-wx-full .nw-wx-days li:first-child { border-top: 0; }
.nw-wx-day { font-weight: 600; }
.nw-wx-min { color: var(--fl-text-muted); text-align: right; }
.nw-wx-max { font-weight: 650; }
.nw-wx-bar { position: relative; height: 5px; border-radius: 999px; background: var(--fl-surface-3); }
.nw-wx-bar span { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #60A5FA, #F59E0B); }
.nw-wx-sun { color: var(--fl-text-muted); white-space: nowrap; font-size: 0.75rem; }
.nw-wx-sun .bi { margin: 0 0.15rem 0 0.4rem; }
.nw-wx-more { display: inline-flex; gap: 0.3rem; margin-top: 0.75rem; font-size: 0.85rem; font-weight: 600; }
.nw-wx-page { max-width: 1040px; }
.nw-wx-full { display: flex; flex-direction: column; gap: 1rem; }
.nw-wx-hero .nw-wx-now .nw-wx-icon { font-size: 4.5rem; }
.nw-wx-hero .nw-wx-temp { font-size: 4rem; }
.nw-wx-search { position: relative; display: flex; gap: 0.5rem; margin-bottom: 0.6rem; }
.nw-wx-search > .bi { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--fl-text-muted); z-index: 1; }
.nw-wx-search input { padding-left: 2.4rem; }
.nw-wx-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; list-style: none; margin: 0.25rem 0 0; padding: 0.25rem; background: var(--fl-surface); border: 1px solid var(--fl-border); border-radius: var(--fl-radius); box-shadow: var(--fl-shadow-lg); }
.nw-wx-results button { display: flex; align-items: center; gap: 0.6rem; width: 100%; border: 0; background: none; padding: 0.45rem 0.65rem; border-radius: 8px; color: var(--fl-text); text-align: left; }
.nw-wx-results button > span { display: flex; flex-direction: column; }
.nw-wx-results button > .bi { color: var(--fl-accent-text); }
.nw-wx-results button:hover { background: var(--fl-surface-3); }
.nw-wx-results small { color: var(--fl-text-muted); }
.nw-wx-recent { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.nw-chip-btn { border: 1px solid var(--fl-border); background: var(--fl-surface); color: var(--fl-text-muted); border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 0.8rem; }
.nw-chip-btn.is-on { border-color: var(--fl-accent); background: var(--fl-accent-soft); color: var(--fl-accent-text); font-weight: 600; }
.nw-wx-credit { font-size: 0.78rem; color: var(--fl-text-muted); }
.nw-wx-loading { padding: 2rem; text-align: center; color: var(--fl-text-muted); }
@media (max-width: 575.98px) {
    .nw-wx-full .nw-wx-days li { grid-template-columns: 4.6rem 1.4rem 2.6rem 2.2rem minmax(2rem, 1fr) 2.2rem; }
    .nw-wx-full .nw-wx-sun { display: none; }
    .nw-wx-chip span { display: none; }
}

/* Filambda posts */
.nw-fil-app { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fl-accent-text); margin-bottom: 0.3rem; }
.nw-pic-filambda { background: var(--fl-surface); }
.nw-pic-filambda img { object-fit: contain; padding: 1.25rem; }
.nw-fil-compact { padding: 0.65rem 0; border-top: 1px solid var(--fl-border); }
.nw-fil-compact:first-of-type { border-top: 0; padding-top: 0; }
.nw-fil-compact .nw-title { font-size: 0.95rem; }
.nw-fil-box .nw-box-title .nw-mark img { width: 18px; height: 18px; }
.nw-fil-head .nw-mark img { width: 34px; height: 34px; }
.nw-post { max-width: 760px; margin: 0 auto; }
.nw-back { display: flex; width: max-content; gap: 0.35rem; align-items: center; color: var(--fl-text-muted); text-decoration: none; margin-bottom: 1.25rem; font-size: 0.9rem; }
.nw-post-title { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.5rem; }
.nw-post-meta { color: var(--fl-text-muted); }
.nw-post-lead { font-size: 1.2rem; color: var(--fl-text-muted); line-height: 1.5; }
.nw-post-image { width: 100%; border-radius: var(--fl-radius-lg); margin: 1rem 0 1.5rem; background: var(--fl-surface); border: 1px solid var(--fl-border); }
.nw-rich { line-height: 1.7; font-size: 1.05rem; }
.nw-rich img { max-width: 100%; height: auto; border-radius: var(--fl-radius); }
.nw-rich h3 { font-size: 1.3rem; margin: 1.5rem 0 0.5rem; }
/* Editor */
.nw-editor-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 0.5rem; }
.nw-table { background: var(--fl-surface); border-radius: var(--fl-radius-lg); overflow: hidden; }
.nw-editor-form { max-width: 860px; }
.nw-rich-toolbar { display: flex; gap: 0.15rem; margin-bottom: 0.35rem; }
.nw-rich-area { min-height: 14rem; height: auto; overflow-wrap: anywhere; }
.nw-rich-area.is-busy { opacity: 0.6; }
.nw-editor-image { display: block; max-width: 100%; max-height: 180px; border-radius: var(--fl-radius); margin-bottom: 0.4rem; }

/* A story several sources tell */
.nw-also { display: block; margin-top: 0.35rem; font-size: 0.76rem; color: var(--fl-text-muted); }
.nw-also a { color: var(--fl-text-muted); text-decoration: underline; text-decoration-color: var(--fl-border-strong); }
.nw-also a:hover { color: var(--fl-accent-text); }
.nw-also .bi { color: var(--fl-accent-text); margin-right: 0.15rem; }

/* Stories without a picture: their text, a section line on top (no empty grey box). */
.nw-kicker { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fl-accent-text); margin-bottom: 0.35rem; }
.nw-card.is-text { border-top: 3px solid var(--fl-accent); padding-top: 0.75rem; }
.nw-card.is-text .nw-summary { -webkit-line-clamp: 5; }
.nw-card.is-text .nw-title { font-size: 1.08rem; }
.nw-lead.is-text { grid-template-columns: minmax(0, 1fr); padding: 1.25rem 0 1.5rem; border-top: 3px solid var(--fl-text); }
.nw-lead.is-text .nw-title { font-size: clamp(1.6rem, 3.2vw, 2.5rem); line-height: 1.15; max-width: 30ch; }
.nw-lead.is-text .nw-summary { font-size: 1.08rem; max-width: 70ch; -webkit-line-clamp: 4; }
.nw-row.is-text { grid-template-columns: minmax(0, 1fr); border-left: 3px solid var(--fl-border-strong); padding-left: 0.8rem; }
@media (max-width: 575.98px) {
    .nw-card.is-text { border-top-width: 2px; }
    .nw-card.is-text .nw-summary { -webkit-line-clamp: 3; }
}

/* The latest headlines on narrow screens: two columns when there is room. */
@media (min-width: 640px) and (max-width: 1099.98px) {
    .nw-latest { grid-column: 1 / -1; }
    .nw-latest .nw-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
    .nw-latest .nw-line:nth-child(2) { border-top: 0; padding-top: 0; }
}

/* My places: rows under the front-page card, cards at the top of /weather */
.nw-wx-top-tools { display: inline-flex; gap: 0.1rem; }
.nw-wx-others:empty { display: none; }
.nw-wx-others { margin-top: 0.75rem; padding-top: 0.6rem; border-top: 1px solid var(--fl-border); }
.nw-wx-others-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fl-text-muted); margin: 0 0 0.35rem; }
.nw-wx-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.nw-wx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 1.4rem 2.4rem 4.6rem; align-items: center; gap: 0.45rem; width: 100%; border: 0; background: transparent; color: var(--fl-text); text-align: left; padding: 0.3rem 0.45rem; margin: 0 -0.45rem; border-radius: 8px; font-size: 0.88rem; width: calc(100% + 0.9rem); }
.nw-wx-row:hover { background: var(--fl-surface-2); }
.nw-wx-row.is-on { background: var(--fl-accent-soft); }
.nw-wx-row-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 0.3rem; }
.nw-wx-star { color: #F59E0B; font-size: 0.72em; }
.nw-wx-row-time { color: var(--fl-text-subtle); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.nw-wx-row .nw-wx-icon { font-size: 1.05rem; text-align: center; }
.nw-wx-list-temp { font-variant-numeric: tabular-nums; text-align: right; }
.nw-wx-row-range { color: var(--fl-text-muted); font-size: 0.75rem; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nw-wx-places { margin-bottom: 1.25rem; }
.nw-wx-places-head { display: flex; align-items: baseline; justify-content: space-between; }
.nw-wx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 0.6rem; margin-bottom: 0.75rem; }
.nw-wx-tile { position: relative; border: 1px solid var(--fl-border); border-radius: var(--fl-radius-lg); background: var(--fl-surface); transition: border-color 0.15s, box-shadow 0.15s; }
.nw-wx-tile:hover { border-color: var(--fl-border-strong); }
.nw-wx-tile.is-on { border-color: var(--fl-accent); box-shadow: 0 0 0 1px var(--fl-accent); }
.nw-wx-tile-main { display: flex; flex-direction: column; gap: 0.15rem; width: 100%; border: 0; background: transparent; color: var(--fl-text); text-align: left; padding: 0.7rem 0.8rem 0.65rem; border-radius: inherit; }
.nw-wx-tile-name { font-weight: 650; padding-right: 3.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-wx-tile-now { display: flex; align-items: center; gap: 0.45rem; margin: 0.15rem 0; }
.nw-wx-tile-now .nw-wx-icon { font-size: 1.7rem; }
.nw-wx-tile-now .nw-wx-list-temp { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.nw-wx-tile-main small { color: var(--fl-text-muted); font-size: 0.76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-wx-tile-time { color: var(--fl-text-subtle) !important; }
.nw-wx-tile-tools { position: absolute; top: 0.4rem; right: 0.4rem; display: flex; gap: 0.1rem; align-items: center; }
.nw-wx-tile-tools button { border: 0; background: transparent; color: var(--fl-text-subtle); width: 1.7rem; height: 1.7rem; border-radius: 8px; display: grid; place-items: center; padding: 0; font-size: 0.8rem; }
.nw-wx-tile-tools button:hover { background: var(--fl-surface-2); color: var(--fl-text); }
.nw-wx-tile-tools button[data-nw-place-main]:hover { color: #F59E0B; }
@media (hover: hover) {
    .nw-wx-tile-tools button { opacity: 0; transition: opacity 0.15s; }
    .nw-wx-tile:hover .nw-wx-tile-tools button, .nw-wx-tile-tools button:focus-visible { opacity: 1; }
}

/* New since the last visit */
.nw-new-note { display: inline-flex; align-items: center; gap: 0.45rem; margin: -0.6rem 0 1rem; padding: 0.25rem 0.75rem; border-radius: 999px; background: var(--fl-accent-soft); color: var(--fl-accent-soft-text); font-size: 0.82rem; font-weight: 600; }
.nw-new-dot, .nw-story.is-new .nw-title::before, .nw-line.is-new time::after { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--fl-accent); flex: 0 0 auto; }
.nw-story.is-new .nw-title::before { width: 0.36em; height: 0.36em; margin-right: 0.35em; vertical-align: 0.18em; }
.nw-line.is-new time { display: flex; align-items: flex-start; gap: 0.25rem; }
.nw-line.is-new time::after { width: 0.4rem; height: 0.4rem; margin-top: 0.4rem; }

/* A slimmer header while reading down the page */
.nw-header-top, .nw-mark img, .nw-wordmark span { transition: padding 0.2s ease, width 0.2s ease, height 0.2s ease, font-size 0.2s ease; }
.nw-header.is-slim .nw-header-top { padding-top: 0.35rem; padding-bottom: 0.35rem; }
.nw-header.is-slim .nw-mark img { width: 28px; height: 28px; }
.nw-header.is-slim .nw-wordmark span { font-size: 1.15rem; }
.nw-header.is-slim .nw-wordmark small, .nw-header.is-slim .nw-today { display: none; }
.nw-header.is-slim { box-shadow: 0 4px 16px rgba(14, 21, 37, 0.06); }
@media (prefers-reduced-motion: reduce) { .nw-header-top, .nw-mark img, .nw-wordmark span { transition: none; } }
@media (max-width: 575.98px) { .nw-near-text { display: none; } }
