/* falakbin.ir/news: the news bot's pages. Loaded after public.css, whose colours it uses. */

.pub-nw-hero { padding-bottom: 8px; }
.pub-nw-hero h1 { max-width: 46rem; margin-inline: auto; }
.pub-nw-kicker { font-size: .9rem; font-weight: 700; color: var(--accent) !important; margin: 0 0 .3rem !important; }

.pub-nw-days { display: flex; justify-content: space-between; gap: 12px; max-width: 46rem; margin: 10px auto 0; font-size: .9rem; }
.pub-nw-days a { text-decoration: none; }
.pub-nw-days-bottom { margin: 22px auto 8px; }

.pub-nw-glance {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
    max-width: 46rem; margin: 16px auto 10px;
}
.pub-nw-glance div {
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
    padding: 10px 8px; text-align: center; display: flex; flex-direction: column; line-height: 1.5;
}
.pub-nw-glance b { font-size: 1.35rem; }
.pub-nw-glance span { font-size: .85rem; }
.pub-nw-glance small { font-size: .72rem; color: var(--muted); }

.pub-nw-topics { max-width: 46rem; margin: 6px auto 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; }
.pub-nw-chip {
    display: inline-flex; gap: 4px; align-items: center; padding: 2px 10px; border-radius: 999px;
    background: var(--accent-soft); color: var(--fg); text-decoration: none; white-space: nowrap;
}
.pub-nw-chip small { color: var(--muted); }
a.pub-nw-chip:hover { outline: 1px solid var(--accent); }

.pub-nw-story {
    max-width: 46rem; margin: 0 auto 16px; padding: 16px 20px;
    background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--cat, var(--accent));
    border-radius: 14px; box-shadow: var(--shadow); scroll-margin-top: 16px;
}
.pub-nw-story:target { outline: 2px solid var(--cat, var(--accent)); }
.pub-nw-story header { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .82rem; }
.pub-nw-cat { color: var(--cat, var(--accent)); font-weight: 700; }
.pub-nw-anchor { color: var(--muted); text-decoration: none; font-weight: 700; }
.pub-nw-story h2 { font-size: 1.2rem; margin: 4px 0 6px; }
.pub-nw-story > p { margin: 0 0 10px; text-align: justify; }

.pub-nw-why {
    background: var(--surface-2); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; font-size: .95rem;
}
.pub-nw-tags { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; }
.pub-nw-tags li, .pub-nw-tags a { color: var(--accent); text-decoration: none; }

.pub-nw-sources { font-size: .85rem; border-top: 1px dashed var(--line); padding-top: 6px; }
.pub-nw-sources summary { cursor: pointer; color: var(--muted); }
.pub-nw-sources ul { list-style: none; margin: 6px 0 0; padding: 0; }
.pub-nw-sources li { margin: 3px 0; overflow-wrap: anywhere; }
.pub-nw-sources a { text-decoration: none; }
.pub-nw-tier { display: inline-block; font-size: .7rem; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pub-nw-term {
    max-width: 46rem; margin: 20px auto 16px; padding: 14px 20px; border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-soft), var(--surface));
    border: 1px solid var(--line);
}
.pub-nw-term h2 { font-size: 1.05rem; margin: 0 0 4px; }
.pub-nw-term p { margin: 0; }

.pub-nw-more { max-width: 46rem; margin: 20px auto; }
.pub-nw-more h2 { font-size: 1.05rem; margin: 0 0 8px; }
.pub-nw-more ul { list-style: none; margin: 0; padding: 0; }
.pub-nw-more li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.pub-nw-more li a { text-decoration: none; color: var(--fg); font-weight: 600; }
.pub-nw-more-cat { width: 1.4em; text-align: center; }

.pub-nw-outro { max-width: 46rem; margin: 14px auto; text-align: center; color: var(--muted); }
.pub-nw-cta {
    max-width: 46rem; margin: 20px auto 0; text-align: center; padding: 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.pub-nw-cta p { margin: 0 0 10px; }

/* Phase 3: the site's tools, lists, archive, tags, threads, search, bars. */
.pub-nw-tools { justify-content: center; margin: 10px 0 0; }
.pub-nw-empty, .pub-nw-count { max-width: 46rem; margin: 10px auto; }
.pub-nw-alltopics { margin-top: 24px; }

.pub-nw-list, .pub-nw-stories { max-width: 46rem; margin: 0 auto 18px; }
.pub-nw-list h2 { font-size: 1.05rem; margin: 18px 0 6px; }
.pub-nw-archive { list-style: none; margin: 0; padding: 0; }
.pub-nw-archive li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pub-nw-archive a { color: var(--fg); text-decoration: none; }
.pub-nw-archive a b { color: var(--accent); margin-inline-end: 6px; }

.pub-nw-stories { list-style: none; padding: 0; }
.pub-nw-stories li {
    background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--cat, var(--accent));
    border-radius: 12px; padding: 10px 16px; margin: 0 0 10px;
}
.pub-nw-stories h3 { font-size: 1rem; margin: 2px 0 4px; }
.pub-nw-stories h3 a { color: var(--fg); text-decoration: none; }
.pub-nw-stories p { margin: 0 0 4px; font-size: .92rem; }
.pub-nw-tags-inline { font-size: .8rem; }
.pub-nw-tags-inline a { text-decoration: none; margin-inline-end: 6px; }

.pub-nw-cat { text-decoration: none; }
.pub-nw-thread { font-size: .85rem; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; margin-top: 8px; }
.pub-nw-thread ul { margin: 4px 0 0; padding-inline-start: 18px; }

.pub-nw-search { display: flex; gap: 8px; max-width: 30rem; margin: 10px auto 0; }
.pub-nw-search button { font: inherit; border: 0; cursor: pointer; }
.pub-nw-search input {
    flex: 1 1 auto; min-width: 0; font: inherit; padding: 8px 12px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); color: var(--fg);
}

.pub-nw-bars { max-width: 46rem; margin: 6px auto 16px; }
.pub-nw-bars div { display: grid; grid-template-columns: 8rem 1fr 3rem; gap: 8px; align-items: center; font-size: .85rem; margin: 3px 0; }
.pub-nw-bars i { display: block; height: 10px; border-radius: 6px; background: var(--accent); width: 0; }
.pub-nw-bars b { font-weight: 600; }
.pub-nw-bars i[data-l="1"] { width: 10%; } .pub-nw-bars i[data-l="2"] { width: 20%; } .pub-nw-bars i[data-l="3"] { width: 30%; }
.pub-nw-bars i[data-l="4"] { width: 40%; } .pub-nw-bars i[data-l="5"] { width: 50%; } .pub-nw-bars i[data-l="6"] { width: 60%; }
.pub-nw-bars i[data-l="7"] { width: 70%; } .pub-nw-bars i[data-l="8"] { width: 80%; } .pub-nw-bars i[data-l="9"] { width: 90%; }
.pub-nw-bars i[data-l="10"] { width: 100%; }

/* The subjects' colours (pub-nw-c-*) are in public.css: the home page uses them too. */
.pub-nw-tier-media { background: var(--surface-2); color: var(--muted); }
.pub-nw-tier-official { background: #183a22; color: #8fdca2; }
.pub-nw-tier-flight { background: #3d2a0c; color: #ffc97a; }
:root[data-theme="light"] .pub-nw-tier-official { background: #e3f4e6; color: #1d6b2b; }
:root[data-theme="light"] .pub-nw-tier-flight { background: #fdf0dc; color: #8a5300; }

@media (max-width: 600px) {
    .pub-nw-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pub-nw-story { padding: 14px; }
    .pub-nw-story > p { text-align: start; }
}
@media print {
    .pub-top, .pub-foot, .pub-tabbar, .pub-nw-days, .pub-nw-cta, .pub-nw-anchor { display: none; }
    .pub-nw-story { box-shadow: none; break-inside: avoid; }
    .pub-nw-sources { display: block; }
}

/* ---- Stats, glossary, sources (NewsPages, phase 10.4) ---------------------------- */
.pub-nw-weeks { display: block; width: 100%; height: auto; max-width: 760px; }
.pub-nw-grid { stroke: var(--line); stroke-width: 1; stroke-opacity: .7; }
.pub-nw-axis { fill: var(--muted); font-size: 12px; font-family: inherit; }
.pub-nw-s1 { fill: var(--c1); background: var(--c1); } .pub-nw-s2 { fill: var(--c2); background: var(--c2); } .pub-nw-s3 { fill: var(--c3); background: var(--c3); }
.pub-nw-s4 { fill: var(--c4); background: var(--c4); } .pub-nw-s5 { fill: var(--c5); background: var(--c5); } .pub-nw-s6 { fill: var(--c6); background: var(--c6); }
.pub-nw-s0 { fill: var(--muted); background: var(--muted); fill-opacity: .55; }
.pub-nw-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; color: var(--muted); font-size: .78rem; }
.pub-nw-key span { display: inline-flex; align-items: center; gap: 5px; }
.pub-nw-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.pub-nw-popular { margin: 0; padding-inline-start: 1.6em; display: flex; flex-direction: column; gap: 6px; line-height: 1.9; }
.pub-nw-popular li::marker { color: var(--teal-ink); font-weight: 800; }
.pub-nw-pop { padding: 14px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.pub-nw-glossary dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pub-nw-glossary dt { font-weight: 850; }
.pub-nw-glossary dd { margin: 2px 0 0; color: var(--muted); line-height: 2; font-size: .92rem; }
.pub-nw-feeds td:nth-child(n+3) { font-variant-numeric: tabular-nums; }
