/* Latest Nepal News */

:root {
  --brand: #dc143c;       /* Nepal flag crimson */
  --brand-2: #003893;     /* Nepal flag blue */
  --bg: #ffffff;
  --surface: #f5f6f8;
  --text: #16181d;
  --muted: #5d6470;
  --line: #e3e5e9;
  --link-hover: #b00f30;
  --badge-bg: #eef2fb;
  --badge-text: #003893;
  --radius: 10px;
  --wrap: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #1a1d23;
    --text: #eceef2;
    --muted: #a0a7b4;
    --line: #2a2e36;
    --link-hover: #ff6b81;
    --badge-bg: #1d2a47;
    --badge-text: #a9c1ff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Mukta', system-ui, -apple-system, 'Segoe UI', 'Noto Sans Devanagari', sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover h3, a:hover, .compact a:hover { color: var(--link-hover); }
a:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--brand-2); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--line); background: var(--bg); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; font-size: 14px; color: var(--muted); }
.lang-switch {
  border: 1.5px solid var(--brand-2); color: var(--brand-2); border-radius: 999px; padding: 2px 14px; font-weight: 700;
}
.lang-switch:hover { background: var(--brand-2); color: #fff; }
@media (prefers-color-scheme: dark) {
  .lang-switch { border-color: var(--badge-text); color: var(--badge-text); }
  .lang-switch:hover { background: var(--badge-text); color: var(--bg); }
}

.brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo:hover { color: inherit; }
.logo-mark { width: 40px; height: 40px; flex: none; }
.logo-text { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.tagline { margin: 0; color: var(--muted); font-size: 15px; }

.sections { background: var(--brand); color: #fff; }
.nav-inner { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.sections a { padding: 10px 14px; white-space: nowrap; font-weight: 600; font-size: 16px; border-bottom: 3px solid transparent; }
.sections a:hover { background: rgba(0, 0, 0, 0.12); color: #fff; }
.sections a[aria-current='page'] { border-bottom-color: #fff; background: rgba(0, 0, 0, 0.18); }

main { padding-top: 24px; padding-bottom: 48px; }

/* Section headings */
.section-head { display: flex; align-items: baseline; justify-content: space-between; border-top: 3px solid var(--text); padding-top: 8px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.more { color: var(--brand); font-weight: 700; font-size: 15px; }

.page-head { border-bottom: 3px solid var(--text); margin-bottom: 20px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 6px; font-size: 32px; font-weight: 800; }
.count { margin: 0; color: var(--muted); }

/* Stories */
.story { position: relative; }
.story h3 { margin: 0; font-weight: 700; line-height: 1.3; }
.story > a { display: block; }
.excerpt { color: var(--muted); margin: 6px 0 0; font-size: 16px; }
.meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.meta { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 14px; }
.source { font-weight: 700; color: var(--brand-2); }
@media (prefers-color-scheme: dark) { .source { color: var(--badge-text); } }
.badge { background: var(--badge-bg); color: var(--badge-text); border-radius: 999px; padding: 0 10px; font-size: 13px; font-weight: 700; }

.thumb { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.story > a:hover .thumb img { transform: scale(1.03); }

.story-lead h3 { font-size: 30px; letter-spacing: -0.01em; }
.story-lead .excerpt { font-size: 18px; }
.story-card h3 { font-size: 20px; }

.story-row { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
.story-row > a { display: flex; gap: 14px; align-items: flex-start; flex-direction: row-reverse; justify-content: flex-end; }
.story-row > a h3 { flex: 1; font-size: 19px; }
.thumb-sm { width: 132px; flex: none; margin: 0; aspect-ratio: 4 / 3; border-radius: 8px; }

.related { margin-top: 10px; padding-left: 12px; border-left: 3px solid var(--line); }
.related-label { margin: 0 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
.lang-np .related-label { text-transform: none; letter-spacing: 0; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { font-size: 15px; line-height: 1.35; margin: 4px 0; }
.related li .source { font-size: 13px; margin-left: 4px; }
.related-more { color: var(--muted); }

/* Top stories */
.top { margin-bottom: 36px; }
.top-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.top-side { display: grid; gap: 20px; align-content: start; }
.top-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; margin-top: 12px; }
.top-more .story-row { border-bottom: none; border-top: 1px solid var(--line); }
.top-more .story-row > a h3 { font-size: 17px; }
.top-more .thumb-sm { width: 96px; }

/* Columns */
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
.category-block { margin-bottom: 32px; }
.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sticky { position: sticky; top: 16px; }

.compact-list { list-style: none; margin: 0; padding: 0; }
.compact { padding: 10px 0; border-bottom: 1px solid var(--line); }
.compact:first-child { padding-top: 0; }
.compact a { font-weight: 600; line-height: 1.35; display: block; }
.compact .meta { margin-top: 3px; font-size: 13px; }

.latest-list { counter-reset: latest; }
.latest-list .compact { position: relative; padding-left: 0; }

.list { max-width: 820px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* Sources & static pages */
.prose { max-width: 720px; font-size: 18px; }
.prose a { color: var(--brand); text-decoration: underline; }
.sources { list-style: none; padding: 0; margin: 20px 0 0; max-width: 720px; }
.source-row { display: grid; grid-template-columns: 1fr auto auto 14px; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.source-row a { font-weight: 700; }
.source-lang, .source-count { color: var(--muted); font-size: 15px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-ok { background: #1f9d55; }
.dot-bad { background: #c9ccd2; }

/* Story pages */
.story-page { max-width: 760px; }
.kicker { margin: 0 0 6px; font-weight: 700; color: var(--brand); }
.story-page h1 { margin: 0 0 8px; font-size: 34px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.story-image { margin: 16px 0; }
.summary { background: var(--surface); border-left: 4px solid var(--brand-2); border-radius: var(--radius); padding: 14px 18px; margin: 16px 0; font-size: 18px; }
.summary h2 { margin: 0 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.lang-np .summary h2 { text-transform: none; letter-spacing: 0; }
.summary p { margin: 0 0 10px; }
.summary-note { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.story-excerpt { margin: 16px 0; padding: 4px 0 4px 16px; border-left: 4px solid var(--line); font-size: 18px; }
.story-excerpt p { margin: 0 0 6px; }
.story-excerpt footer { color: var(--muted); font-size: 14px; }
.read-full { margin: 20px 0; }
.button { display: inline-block; background: var(--brand); color: #fff; font-weight: 700; padding: 10px 18px; border-radius: 999px; }
.button:hover { background: var(--link-hover); color: #fff; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-label { font-weight: 700; margin-right: 4px; }
.share-btn { font: inherit; font-size: 15px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.share-btn:hover { border-color: var(--brand); color: var(--brand); }
.share-btn[hidden] { display: none; }
.others h2, .earlier h2 { font-size: 20px; margin: 24px 0 8px; }
.others ul, .earlier ul { list-style: none; margin: 0; padding: 0; }
.others li { padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.35; }
.others li a { font-weight: 600; }
.others li .source { font-size: 14px; margin-left: 4px; }
.more-news { margin-top: 36px; }

/* Daily brief */
.brief { max-width: 760px; }
.brief-intro { color: var(--muted); margin: 0 0 12px; }
.brief-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.brief-item h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.3; }
.brief-item p { margin: 0 0 8px; }
.earlier li { padding: 4px 0; }
.earlier a { color: var(--brand); }

/* Footer */
.footer { background: var(--surface); border-top: 4px solid var(--brand); padding: 28px 0; color: var(--muted); font-size: 15px; }
.footer-note { margin: 0 0 12px; max-width: 720px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 12px; }
.footer-links a { color: var(--text); font-weight: 600; }
.updated { margin: 0; }

/* Responsive */
@media (max-width: 1000px) {
  .columns { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .top-more { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .logo-text { font-size: 23px; }
  .logo-mark { width: 32px; height: 32px; }
  .tagline { display: none; }
  .top-grid { grid-template-columns: 1fr; }
  .top-more { grid-template-columns: 1fr; }
  .story-lead h3 { font-size: 24px; }
  .story-lead .excerpt { font-size: 16px; }
  .category-grid { grid-template-columns: 1fr; gap: 12px; }
  .thumb-sm { width: 104px; }
  .story-row > a h3 { font-size: 17px; }
  .page-head h1 { font-size: 26px; }
  .source-row { grid-template-columns: 1fr auto 14px; }
  .source-lang { display: none; }
  .story-page h1 { font-size: 26px; }
  .summary, .story-excerpt { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .thumb img { transition: none; }
}
