/* DigiNepal · Official updates — server-rendered pages.
 * Same identity as the Next app (webnext/app/globals.css): warm paper,
 * ink, forest green, marigold, Fraunces display over Inter, Noto Sans
 * Devanagari for Nepali. Fonts are self-hosted (font-src 'self').
 * Light/dark follow prefers-color-scheme. No inline styles anywhere
 * (style-src 'self'), so per-item colours are tone classes .t0–.t9. */

@font-face { font-family: "Fraunces"; src: url("/updates/assets/fraunces.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/updates/assets/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face {
  font-family: "Noto Sans Devanagari"; src: url("/updates/assets/noto-deva.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF;
}

:root {
  --paper: #FBF9F4; --paper-2: #F3EFE4; --surface: #FFFFFF; --surface-2: #FDFBF7;
  --ink: #1A1A1A; --ink-2: #55534D; --ink-3: #6B6962;
  --line: #E8E2D4; --line-strong: #D5CCB8; --card-line: rgba(26, 26, 26, .06);
  --green: #0E5F3D; --green-soft: rgba(14, 95, 61, .09); --on-green: #fff;
  --accent: #E8A33D; --accent-ink: #8F5A0B; --accent-soft: rgba(232, 163, 61, .14);
  --crimson: #B3122F; --focus: #0E7249;
  --brand-grad: linear-gradient(135deg, #0E5F3D 0%, #0E7249 48%, #0B7A75 100%);
  --hero-grad:
    radial-gradient(120% 90% at 0% 0%, rgba(14, 114, 73, .16) 0%, transparent 55%),
    radial-gradient(90% 80% at 100% 0%, rgba(11, 122, 117, .14) 0%, transparent 60%),
    radial-gradient(80% 70% at 70% 100%, rgba(232, 163, 61, .16) 0%, transparent 60%),
    linear-gradient(180deg, #F5F8F2 0%, #FBF9F4 100%);
  --ridge-1: rgba(14, 95, 61, .10); --ridge-2: rgba(14, 95, 61, .16); --ridge-3: rgba(11, 74, 48, .22); --snow: rgba(255, 255, 255, .9);
  --shadow-sm: 0 1px 2px rgba(26, 26, 26, .04), 0 2px 8px rgba(26, 26, 26, .05);
  --shadow-md: 0 1px 2px rgba(26, 26, 26, .04), 0 8px 24px rgba(40, 36, 24, .08);
  --shadow-lg: 0 2px 6px rgba(26, 26, 26, .05), 0 20px 48px rgba(40, 36, 24, .12);
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --serif: "Fraunces", "Noto Sans Devanagari", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", "Noto Sans Devanagari", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --deva: "Noto Sans Devanagari", "Inter", sans-serif;
  --wide: 1200px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0A1210; --paper-2: #131E1B; --surface: #111B18; --surface-2: #172420;
    --ink: #EDF1EC; --ink-2: #AAB7B0; --ink-3: #8C9B94;
    --line: #1F2D29; --line-strong: #2C3D37; --card-line: rgba(255, 255, 255, .06);
    --green: #5BD69C; --green-soft: rgba(91, 214, 156, .12); --on-green: #04130C;
    --accent: #F2B654; --accent-ink: #F2B654; --accent-soft: rgba(242, 182, 84, .14);
    --crimson: #FF6B81; --focus: #7BE3B2;
    --brand-grad: linear-gradient(135deg, #1FA36B 0%, #13936E 45%, #0F8A86 100%);
    --hero-grad:
      radial-gradient(120% 90% at 0% 0%, rgba(31, 163, 107, .30) 0%, transparent 55%),
      radial-gradient(90% 80% at 100% 10%, rgba(15, 138, 134, .26) 0%, transparent 60%),
      radial-gradient(70% 60% at 60% 100%, rgba(232, 163, 61, .14) 0%, transparent 60%),
      linear-gradient(180deg, #0F1B18 0%, #0B1512 100%);
    --ridge-1: rgba(91, 214, 156, .07); --ridge-2: rgba(91, 214, 156, .11); --ridge-3: rgba(91, 214, 156, .16); --snow: rgba(237, 241, 236, .75);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .25);
    --shadow-md: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 6px 20px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .25);
    --shadow-lg: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 48px rgba(0, 0, 0, .5), 0 4px 12px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

/* Tones: --tone is text-safe on paper; --tone-a/--tone-b paint covers. */
.t0 { --tone: #0E5F3D; --tone-a: #0E5F3D; --tone-b: #0B7A75; }
.t1 { --tone: #B3122F; --tone-a: #9E1230; --tone-b: #DC2A4A; }
.t2 { --tone: #8F5A0B; --tone-a: #8F5A0B; --tone-b: #E8A33D; }
.t3 { --tone: #1F4FA8; --tone-a: #1F4FA8; --tone-b: #2F6FDB; }
.t4 { --tone: #0B6F6A; --tone-a: #0B6F6A; --tone-b: #2BB3A8; }
.t5 { --tone: #5B3596; --tone-a: #5B3596; --tone-b: #8A5CD0; }
.t6 { --tone: #33414E; --tone-a: #33414E; --tone-b: #5C6B78; }
.t7 { --tone: #9A3F14; --tone-a: #9A3F14; --tone-b: #D9672C; }
.t8 { --tone: #A3154F; --tone-a: #A3154F; --tone-b: #DB2777; }
.t9 { --tone: #4F5E0F; --tone-a: #4F5E0F; --tone-b: #7F9420; }
@media (prefers-color-scheme: dark) {
  .t0 { --tone: #5BD69C; } .t1 { --tone: #FF7B8E; } .t2 { --tone: #F2B654; } .t3 { --tone: #8DB2FF; } .t4 { --tone: #4FD1C5; }
  .t5 { --tone: #C3A5F5; } .t6 { --tone: #B6C3CF; } .t7 { --tone: #F59A66; } .t8 { --tone: #F78FB8; } .t9 { --tone: #C3D46A; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
:lang(ne) { font-family: var(--deva); line-height: 1.75; }
img { max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: var(--r-pill); }
.skip:focus { left: 12px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; }
.sprite { display: none; }

/* ── Top bar ── */
.bar {
  position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 18px;
  padding: 0 max(16px, calc((100vw - var(--wide)) / 2)); background: rgba(251, 249, 244, .82);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line);
}
@media (prefers-color-scheme: dark) { .bar { background: rgba(10, 18, 16, .78); } }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 21px/1 var(--serif); letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; padding: 7px 12px; border-radius: var(--r-pill); white-space: nowrap; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--green-soft); color: var(--green); font-weight: 600; }
.bar-search { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink-2); }
.bar-search:hover { background: var(--paper-2); color: var(--ink); }

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

/* ── Hero ── */
.hero { position: relative; overflow: hidden; background: var(--hero-grad); border-bottom: 1px solid var(--line); }
.hero-in { position: relative; z-index: 1; max-width: var(--wide); margin: 0 auto; padding: 44px 16px 92px; }
.hero.compact .hero-in { padding: 30px 16px 70px; }
.ridge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 150px; z-index: 0; pointer-events: none; }
.ridge .r1 { fill: var(--ridge-1); } .ridge .r2 { fill: var(--ridge-2); } .ridge .r3 { fill: var(--ridge-3); }
.ridge .snow { fill: var(--snow); } .ridge .sun { fill: var(--accent); opacity: .55; }
.flags { position: absolute; top: 22px; right: max(16px, calc((100vw - var(--wide)) / 2)); width: 260px; height: 60px; z-index: 0; opacity: .85; }
.flags .cord { fill: none; stroke: var(--ink-3); stroke-width: 1; opacity: .5; }
.flags .fb { fill: #2F6FDB; } .flags .fw { fill: #F1EEE6; stroke: var(--line-strong); stroke-width: .6; } .flags .fr { fill: #DC2A4A; } .flags .fg { fill: #1F8A5C; } .flags .fy { fill: #E8A33D; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font: 600 clamp(32px, 5.4vw, 54px)/1.08 var(--serif); letter-spacing: -.02em; margin: 12px 0 10px; max-width: 18ch; text-wrap: balance; }
.hero h1 .ne { display: block; font: 600 .5em/1.5 var(--deva); color: var(--ink-2); letter-spacing: 0; margin-top: 8px; }
.hero .lede { max-width: 62ch; color: var(--ink-2); font-size: 17px; margin: 0 0 22px; }
.hero-tone { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--tone-a), var(--tone-b)); box-shadow: var(--shadow-md); font-size: 24px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-3); font-size: 14px; margin-top: 18px; }
.stats b { color: var(--ink); font-weight: 650; }

.search { display: flex; align-items: center; gap: 6px; max-width: 640px; padding: 6px 6px 6px 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-pill); box-shadow: var(--shadow-md); }
.search:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft), var(--shadow-md); }
.search .ic { color: var(--ink-3); font-size: 18px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 16px/1.4 var(--sans); padding: 8px 4px; }
.search input::placeholder { color: var(--ink-3); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; font: 600 14.5px/1 var(--sans); padding: 11px 18px; border-radius: var(--r-pill); background: var(--brand-grad); color: #fff; box-shadow: var(--shadow-sm); }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none; }
.btn.ghost:hover { background: var(--paper-2); }
.btn.sm { padding: 8px 13px; font-size: 13.5px; }

/* ── Chips ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 9px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 550; box-shadow: var(--shadow-sm); }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip .ci { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--tone-a, #0E5F3D), var(--tone-b, #0B7A75)); font-size: 13px; }
.chip .n { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip .ne { font-family: var(--deva); font-weight: 500; color: var(--ink-3); }
.chip[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip[aria-current="page"] .n, .chip[aria-current="page"] .ne { color: inherit; opacity: .75; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--tone, var(--green)); text-decoration: none; letter-spacing: .01em; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
a.tag:hover { text-decoration: underline; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: -38px 0 22px; position: relative; z-index: 2; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px; background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; }
.filters .chips { flex: 1; }
.select { display: flex; align-items: center; gap: 8px; }
.select select { appearance: none; max-width: 260px; font: 500 14px/1.2 var(--sans); color: var(--ink); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6962' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 9px 34px 9px 14px; }

/* ── Layout ── */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding-bottom: 64px; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.section-title h2 { font: 600 24px/1.2 var(--serif); letter-spacing: -.01em; margin: 0; }
.section-title a { font-size: 14px; font-weight: 600; text-decoration: none; }
.crumbs { font-size: 13.5px; color: var(--ink-3); margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--green); text-decoration: underline; }
.crumbs .sep { opacity: .55; }
.crumbs [aria-current] { color: var(--ink-2); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Cards ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--card-line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card:focus-within { box-shadow: 0 0 0 3px var(--focus), var(--shadow-md); }
.media { position: relative; aspect-ratio: 16 / 9; background: var(--paper-2); overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.card .tags { display: flex; flex-wrap: wrap; gap: 4px 12px; position: relative; z-index: 2; }
.card h3 { margin: 0; font: 650 17.5px/1.4 var(--sans); letter-spacing: -.005em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card h3:lang(ne) { font: 600 18px/1.6 var(--deva); }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card h3 a:focus-visible { outline: none; }
.card .sum { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card .sum:lang(ne) { line-height: 1.75; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--ink-3); font-size: 13px; margin-top: auto; padding-top: 4px; }
.meta .dept { color: var(--ink-2); font-weight: 550; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta .bs:lang(ne) { line-height: 1.4; }
.meta .sep::before { content: "·"; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 650; background: var(--paper-2); color: var(--ink-2); }
.badge.pdf { background: rgba(179, 18, 47, .09); color: var(--crimson); }
.badge.img { background: var(--green-soft); color: var(--green); }
.badge.new { background: var(--accent-soft); color: var(--accent-ink); }
.card.feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; }
.card.feature .media { aspect-ratio: auto; min-height: 280px; }
.card.feature h3 { font: 600 clamp(22px, 2.6vw, 30px)/1.25 var(--serif); -webkit-line-clamp: 4; }
.card.feature h3:lang(ne) { font: 650 clamp(21px, 2.4vw, 27px)/1.55 var(--deva); }
.card.feature .sum { -webkit-line-clamp: 4; font-size: 15.5px; }
.card.feature .body { padding: 24px 26px; gap: 12px; }
@media (max-width: 720px) { .card.feature { grid-template-columns: 1fr; } .card.feature .media { aspect-ratio: 16 / 9; min-height: 0; } }

/* Generated cover for items without a picture. */
.cover { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 16px 18px 18px; color: #fff; background: linear-gradient(135deg, var(--tone-a), var(--tone-b)); isolation: isolate; }
.cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 90% at 90% 0%, rgba(255, 255, 255, .22), transparent 60%), radial-gradient(60% 60% at 0% 100%, rgba(0, 0, 0, .18), transparent 70%); }
.cover-ridge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 58%; z-index: -1; }
.cover-ridge .a { fill: rgba(255, 255, 255, .10); } .cover-ridge .b { fill: rgba(0, 0, 0, .14); } .cover-ridge .s { fill: rgba(255, 255, 255, .55); }
.cover-ic { position: absolute; top: 14px; left: 16px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(4px); font-size: 20px; }
.cover-kicker { position: absolute; top: 22px; right: 16px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.cover-dept { font: 600 17px/1.3 var(--serif); text-shadow: 0 1px 12px rgba(0, 0, 0, .25); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover-dept:lang(ne) { font: 600 16px/1.55 var(--deva); }
.cover-date { font-size: 12.5px; opacity: .9; font-weight: 550; }
.card.feature .cover-dept { font-size: 24px; }

.empty { padding: 48px 20px; text-align: center; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }

/* ── Rail ── */
.rail { display: flex; flex-direction: column; gap: 18px; }
.box { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 16px 16px 12px; }
.box h2, .box h3 { display: flex; align-items: center; gap: 8px; font: 650 13px/1.2 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 2px; color: var(--ink); text-decoration: none; font-size: 14.5px; }
.list a:hover { color: var(--green); }
.list a[aria-current="page"] { color: var(--green); font-weight: 650; }
.list .n { color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; background: var(--paper-2); border-radius: var(--r-pill); padding: 1px 8px; flex: none; }
.list .lbl { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.months { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; list-style: none; padding: 0; margin: 0; }
.months a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 13.5px; font-weight: 600; }
.months a span { color: var(--ink-3); font-weight: 500; font-size: 12px; }
.months a:hover, .months a[aria-current="page"] { border-color: var(--green); color: var(--green); }
.feeds { display: flex; flex-wrap: wrap; gap: 8px; }
.note { font-size: 13px; color: var(--ink-3); line-height: 1.55; }

/* ── Office hub card ── */
.office { display: flex; gap: 16px; align-items: flex-start; }
.office-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--tone-a), var(--tone-b)); font-size: 26px; box-shadow: var(--shadow-md); }
.units { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.units span { font-size: 12.5px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }

/* ── Detail ── */
.doc { padding: 26px 0 64px; }
.doc-head { max-width: 860px; }
.doc-head .tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; }
.doc h1 { font: 600 clamp(28px, 4.2vw, 44px)/1.18 var(--serif); letter-spacing: -.02em; margin: 0 0 16px; overflow-wrap: anywhere; text-wrap: balance; }
.doc h1:lang(ne) { font: 650 clamp(26px, 3.8vw, 38px)/1.5 var(--deva); letter-spacing: 0; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; color: var(--ink-2); font-size: 14.5px; }
.byline .who { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.byline .who .office-mark { width: 38px; height: 38px; border-radius: 12px; font-size: 18px; box-shadow: none; }
.byline time { font-variant-numeric: tabular-nums; }
.byline .bsd:lang(ne) { line-height: 1.4; }
.hero-img { margin: 24px 0 8px; border-radius: var(--r-xl); overflow: hidden; background: var(--paper-2); border: 1px solid var(--card-line); box-shadow: var(--shadow-md); }
.hero-img img { display: block; width: 100%; max-height: 560px; object-fit: contain; background: var(--paper-2); }
.hero-img figcaption { font-size: 12.5px; color: var(--ink-3); padding: 8px 14px; }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; margin-top: 24px; }
@media (max-width: 980px) { .doc-grid { grid-template-columns: 1fr; } }
.prose { font-size: 18px; line-height: 1.75; color: var(--ink); overflow-wrap: anywhere; max-width: 70ch; }
.prose:lang(ne) { font-size: 18.5px; line-height: 1.95; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose strong { font-weight: 700; }
.prose a { word-break: break-word; }
.panel { margin-top: 34px; }
.panel > h2 { display: flex; align-items: center; gap: 10px; font: 600 22px/1.25 var(--serif); margin: 0 0 14px; }
.panel > h2 .n { font: 600 13px/1 var(--sans); color: var(--ink-3); background: var(--paper-2); padding: 4px 9px; border-radius: var(--r-pill); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.gallery a { display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 28px; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--paper-2); border: 1px solid var(--card-line); }
.gallery .dl { aspect-ratio: auto; display: inline-flex; gap: 5px; justify-content: flex-start; background: none; border: 0; font-size: 12px; color: var(--ink-3); margin-top: 4px; text-decoration: none; }
.gallery .dl:hover { color: var(--green); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }
.atts { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.att { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.att-prev { display: block; width: 92px; height: 120px; border-radius: 10px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); }
.att-prev img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.att-prev.none { display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 30px; }
.att-prev.none.pdf { color: var(--crimson); background: rgba(179, 18, 47, .06); }
.att b { display: block; font-weight: 650; font-size: 15px; overflow-wrap: anywhere; }
.att .sub { display: block; color: var(--ink-3); font-size: 13px; margin-top: 4px; }
@media (max-width: 560px) { .att { grid-template-columns: 64px minmax(0, 1fr); } .att-prev { width: 64px; height: 84px; } .att .btn { grid-column: 1 / -1; } }
details.extract { margin-top: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; }
details.extract summary { cursor: pointer; font-weight: 650; }
details.extract .note { margin: 10px 0; }
details.extract pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.8 var(--deva); max-height: 520px; overflow: auto; margin: 0; padding: 12px; background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--line); }
.source { margin-top: 34px; display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--green-soft); border: 1px solid rgba(14, 95, 61, .18); font-size: 14px; color: var(--ink-2); }
.source .ic { color: var(--green); font-size: 22px; margin-top: 2px; }
.source b { color: var(--ink); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.share .lbl { font-size: 13px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; margin-right: 4px; }
.share a, .share button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 600 13.5px/1 var(--sans); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--green); color: var(--green); }
.share .ok { border-color: var(--green); color: var(--green); }
.side { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 981px) { .side { position: sticky; top: 80px; align-self: start; } }
.box .tags { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.datebox { display: grid; gap: 4px; }
.datebox .big { font: 650 22px/1.4 var(--deva); color: var(--ink); }
.datebox .small { color: var(--ink-3); font-size: 13.5px; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.prevnext a { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--card-line); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); }
.prevnext a:hover { border-color: var(--green); }
.prevnext .k { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.prevnext .t { font-weight: 600; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prevnext .next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .prevnext { grid-template-columns: 1fr; } .prevnext .next { grid-column: 1; } }

/* ── Search ── */
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.result { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.result .media { aspect-ratio: 4 / 3; border-radius: 12px; }
.result .cover { padding: 8px; } .result .cover-dept, .result .cover-date, .result .cover-kicker { display: none; } .result .cover-ic { top: 8px; left: 8px; width: 32px; height: 32px; font-size: 16px; }
.result h3 { margin: 0 0 6px; font: 650 17px/1.45 var(--sans); }
.result h3:lang(ne) { font: 600 17.5px/1.6 var(--deva); }
.result h3 a { color: var(--ink); text-decoration: none; }
.result h3 a::after { content: ""; position: absolute; inset: 0; }
.result p { margin: 0 0 6px; color: var(--ink-2); font-size: 14.5px; overflow-wrap: anywhere; }
.result mark { background: var(--accent-soft); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.from-file { font-size: 12px; font-weight: 650; color: var(--accent-ink); }
@media (max-width: 560px) { .result { grid-template-columns: 1fr; } .result .media { display: none; } }

/* ── Lightbox (js) ── */
dialog.lb { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
dialog.lb::backdrop { background: rgba(5, 10, 8, .86); backdrop-filter: blur(4px); }
dialog.lb img { display: block; max-width: 94vw; max-height: 84vh; border-radius: 12px; box-shadow: var(--shadow-lg); background: #111; }
dialog.lb .lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; color: #eee; font-size: 14px; }
dialog.lb button { background: rgba(255, 255, 255, .14); color: #fff; border: 0; border-radius: var(--r-pill); padding: 9px 15px; font: 600 14px/1 var(--sans); cursor: pointer; }
dialog.lb button:hover { background: rgba(255, 255, 255, .24); }

/* ── Footer ── */
.foot { border-top: 1px solid var(--line); background: var(--paper-2); color: var(--ink-3); font-size: 13.5px; }
.foot .wrap { padding-top: 28px; padding-bottom: 36px; display: grid; gap: 12px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot a { color: var(--ink-2); }

@media (max-width: 640px) {
  .bar { gap: 10px; }
  .brand span { display: none; }
  .hero-in { padding: 30px 16px 84px; }
  .flags { display: none; }
  .ridge .sun { display: none; }
  .filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .filters .chips::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; }
  .filters .select { width: 100%; }
  .filters .select select { flex: 1; }
  .toolbar { margin-top: -30px; }
  .select select { max-width: 100%; }
  .prose { font-size: 17px; }
  .prose:lang(ne) { font-size: 17.5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .bar, .share, .rail, .side, .prevnext, .foot, .flags, .ridge { display: none !important; } body { background: #fff; } }
