/* ==========================================================================
   Nad Ki Awaz — "Hawa Mahal" theme (2026-12-02)
   Loaded after nadkiawaz.css. Pink sandstone, white lime outlines, domed
   jharokhas, arched windows and a touch of coloured glass.
   Spec: docs/superpowers/specs/2026-12-02-hawamahal-theme-design.md
   Roll back: remove the hawamahal.css <link> line in includes/partials/header.php.

   Tokens sit on html:root so they win over the inline :root{…} that
   brand_theme_css() prints after the stylesheets (Admin → Settings colours).
   Small white text never sits on --hm-stone, only on --hm-deep or darker.
   ========================================================================== */

/* ---- 1. tokens ------------------------------------------------------------- */
html:root {
  --hm-stone: #c8615a;   /* Hawa Mahal sandstone: large headings, frames */
  --hm-deep:  #a8413f;   /* menu, labels, buttons (white text 6:1) */
  --hm-dark:  #7d2c29;   /* utility strip, footer bottom */
  --hm-blush: #fdf1ee;   /* page background */
  --hm-line:  #ecc3bb;   /* dashed separators */
  --hm-ink:   #3a0f0c;   /* headline text */

  /* a row of small domed jharokhas with white outlines (24x28 tile) */
  --hm-windows: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='28'%3E%3Crect width='24' height='28' fill='%23d4766c'/%3E%3Cpath d='M5 9.5Q12 1.5 19 9.5z' fill='%23fff'/%3E%3Ccircle cx='12' cy='3.2' r='1.1' fill='%23fff'/%3E%3Cpath d='M3.5 10.5H20.5' stroke='%23fff' stroke-width='1.4'/%3E%3Cpath d='M7 27V16Q7 12.5 12 11.5Q17 12.5 17 16V27z' fill='%23a8413f' stroke='%23fff' stroke-width='1.2'/%3E%3Cpath d='M12 12V27M7 19H17M7 23H17' stroke='%23fff' stroke-opacity='.5' stroke-width='.7'/%3E%3C/svg%3E");
  /* faint white jharokha outlines for pink surfaces (26x30 tile) */
  --hm-facade: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='30'%3E%3Cpath d='M6 29V16Q6 10 13 8Q20 10 20 16V29' fill='none' stroke='%23fff' stroke-opacity='.16' stroke-width='1.2'/%3E%3Cpath d='M7 7Q13 0 19 7' fill='none' stroke='%23fff' stroke-opacity='.16' stroke-width='1.2'/%3E%3C/svg%3E");

  --f-royal: 'Rozha One', 'Noto Serif Devanagari', serif;

  /* site-wide brand tokens → Hawa Mahal pinks */
  --brand: #a8413f; --brand-dark: #7d2c29; --brand-soft: #fbe4df;
  --btn: #a8413f;   --btn-dark: #7d2c29;
  --livetv: #a8413f; --livetv-dark: #7d2c29;
  --icon: #c8615a;  --menu-bg: #a8413f; --accent: #a8413f;
  --bv-red: #c8615a; --bv-red-dark: #a8413f;
}
html:root:not([data-theme="dark"]) {
  --bg: var(--hm-blush); --heading: var(--hm-ink);
  --text-soft: #5a4743; --text-mute: #6e5a55;   /* warm greys: >= 4.5:1 on the blush page (the cool #6b7280 fell to 4.37) */
  --surface-2: #fbefec; --border: #f0dcd6;      /* warm panels and hairlines instead of the cool greys */
}
body { background-color: var(--bg); }
::selection { background: var(--hm-deep); color: #fff; }

/* ---- 2. header: utility strip, pink-stone logo band, jharokha row, menu ---- */
.nk-util { background: var(--hm-dark); color: rgba(255, 255, 255, .86); border-bottom: 1px solid rgba(255, 255, 255, .18); }
.nk-util svg { stroke: #ffd9d3; }
.nk-util-tag { color: #fff; }
.nk-util-login:hover { color: #ffd9d3; }

.tp-top.nk-band {
  background: var(--hm-facade) center / 26px 30px repeat,
              linear-gradient(180deg, #cf6a62 0%, var(--hm-stone) 55%, #bd5852 100%);
}
.nk-band .tp-ws { background: var(--hm-deep); border: 1.5px solid #fff; color: #fff; }
.nk-band .tp-ws svg { fill: #fff; }
.nk-band .tp-ws:hover, .nk-band .tp-ws.active { background: #fff; color: var(--hm-deep); border-color: #fff; }
.nk-band .tp-ws:hover svg, .nk-band .tp-ws.active svg { fill: var(--hm-deep); }
.nk-band .tp-srch { background: var(--hm-deep); border-color: rgba(255, 255, 255, .75); }
.nk-band .tp-srch:hover { border-color: #fff; color: #fff; background: var(--hm-dark); }
.nk-signin-m { background: var(--hm-deep); }

/* the 4px gold line becomes Hawa Mahal's row of domed jharokhas */
.nk-gold { height: 28px; background: var(--hm-windows) left top / 24px 28px repeat-x; }

.tp-nav, [data-theme="dark"] .tp-nav { background: var(--hm-deep); border-top: 2px solid #fff; border-bottom: 2px solid #fff; }
.tp-menu > li > a:hover::after, .tp-menu > li > a.active::after { background: #fff; }
.tp-menu .drop { border-top-color: var(--hm-deep); }

/* mobile menu drawer keeps its white head (the red logo sits there) with a jharokha row under it */
.drawer-head { border-bottom: 0; box-shadow: inset 0 -3px 0 var(--hm-stone); }

/* ---- ticker: white strip, deep-pink label with a lime outline and coloured glass ---- */
.bv-breaking, .bv-br-bar { background: #fff; }
.bv-breaking { border-bottom: 1px solid var(--hm-line); }
.bv-br-label {
  background: var(--hm-deep); font-style: normal; clip-path: none; padding: 0 18px 0 14px;
  box-shadow: inset 0 0 0 3px var(--hm-deep), inset 0 0 0 4.5px #fff;
}
/* Hawa Mahal's coloured glass, in place of the white dot */
.bv-br-dot {
  width: 13px; height: 13px; border-radius: 2px; box-shadow: none; animation: none;
  background: linear-gradient(#e0a526 0 0) 0 0 / 6px 6px no-repeat, linear-gradient(#3e8e7e 0 0) 7px 0 / 6px 6px no-repeat,
              linear-gradient(#3a64b0 0 0) 0 7px / 6px 6px no-repeat, linear-gradient(#fff 0 0) 7px 7px / 6px 6px no-repeat;
}
.bv-br-set a, .bv-br-plain { color: #5a1814; }
.bv-br-set a:hover { color: var(--hm-deep); }
.bv-br-set a::after, .bv-br-plain::after { background: var(--hm-stone); width: 6px; height: 8px; border-radius: 50% 50% 1px 1px / 60% 60% 1px 1px; }

/* ---- trending topics bar + phone bottom menu ---- */
.bv-topics-fixed { border-top-color: var(--hm-stone); }
.bv-topics-label { background: var(--hm-deep); clip-path: none; padding: 0 18px; box-shadow: inset 0 0 0 3px var(--hm-deep), inset 0 0 0 4.5px #fff; }
.bv-topic span { color: var(--hm-deep); }
.bv-topic:hover { background: var(--hm-deep); color: #fff; }
.bottom-nav, [data-theme="dark"] .bottom-nav { background: var(--hm-deep); border-top: 3px solid var(--hm-stone); }
.bottom-nav .bn-search .bn-search-btn { background: var(--hm-stone); border-color: #fff; box-shadow: 0 6px 14px rgba(125, 44, 41, .45); }

@media (max-width: 920px) {
  .nk-gold { height: 21px; background-size: 18px 21px; }
  .bv-br-label { padding: 0 12px 0 10px; }
  .bv-topics-fixed { border-color: var(--hm-line); }
  .bv-topics-label { padding: 0 12px; }
}

/* ---- 3. section headings: a jharokha tab with a curved (bangaldar) roof and kalash ---- */
.tv9-head, .dyn-head, .n18-head, .n18-head.plain {
  align-items: flex-end; border-bottom: 3px solid var(--hm-stone); margin-top: 24px; padding-bottom: 0;
}
.tv9-head::after { background: none; }          /* keeps "और देखें" pushed right, hides the hairline */
.tv9-head h2, .dyn-head h1, .dyn-head h2, .n18-head h2, .n18-head.plain h2, .tv9-live-head, .comments-title {
  position: relative; margin: 0 0 -1px 10px; padding: 7px 20px 4px; max-width: calc(100% - 20px);
  white-space: normal; min-width: 0; flex: 0 1 auto;   /* long titles wrap inside the tab at every width */
  background: var(--hm-stone); color: #fff; border: 0; clip-path: none;
  font-family: var(--f-royal); font-weight: 400; font-size: 21px; line-height: 1.25; letter-spacing: 0; text-transform: none;
  box-shadow: inset 0 0 0 3px var(--hm-stone), inset 0 0 0 4.5px #fff;
}
.tv9-head h2 a, .dyn-head h1 a, .dyn-head h2 a, .n18-head h2 a { color: #fff; }
/* roof (replaces the old red slant on .tv9-head h2::before) */
.tv9-head h2::before, .dyn-head h1::before, .dyn-head h2::before, .n18-head h2::before, .tv9-live-head::before, .comments-title::before {
  content: ""; position: absolute; left: -8px; right: -8px; top: -15px; bottom: auto; width: auto; height: 15px; transform: none;
  background: var(--hm-stone); border: 2px solid #fff; border-bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow: 0 -1px 0 1px var(--hm-stone);
}
/* kalash finial */
.tv9-head h2::after, .dyn-head h1::after, .dyn-head h2::after, .n18-head h2::after, .tv9-live-head::after, .comments-title::after {
  content: ""; position: absolute; left: 50%; top: -24px; width: 8px; height: 10px; margin-left: -4px;
  background: #fff; border-radius: 50% 50% 40% 40%; box-shadow: 0 0 0 1.5px var(--hm-stone);
}
.tv9-side .tv9-head h2, .tv9-half .tv9-head h2 { font-size: 21px; }
.tv9-live-head { display: inline-flex; margin: 26px 0 16px 10px; }
.tv9-live-head .tv9-live-dot { background: #fff; }

/* "और देखें" */
.tv9-more { margin-bottom: 7px; border-color: var(--hm-line); color: var(--hm-deep) !important; }
.tv9-more:hover { background: var(--hm-deep); border-color: var(--hm-deep); color: #fff !important; }
.n18-head .vall, .n18-head.plain .vall, .dyn-head .more { color: var(--hm-deep); padding-bottom: 8px; }
.n18-head .vall:hover, .dyn-head a.more:hover { color: var(--hm-dark); }

/* sidebar widget titles: a small jharokha tab, no roof */
.dyn-widget > h3 {
  display: inline-block; margin-bottom: 14px; padding: 5px 14px 3px; border-bottom: 0;
  background: var(--hm-deep); color: #fff; font-family: var(--f-royal); font-weight: 400; font-size: 16px; letter-spacing: 0; text-transform: none;
  box-shadow: inset 0 0 0 2px var(--hm-deep), inset 0 0 0 3.5px #fff;
}

@media (max-width: 600px) {
  .tv9-head h2, .dyn-head h1, .dyn-head h2, .n18-head h2, .n18-head.plain h2, .tv9-live-head, .comments-title {
    font-size: 20px; white-space: normal; padding: 6px 14px 3px;   /* stays >= 20px: white on --hm-stone is for large text only */
  }
  .tv9-head { gap: 8px; }
}

/* ---- 4. photos: round-arched windows with a white lime ring ---- */
.tv9-lead-img, .tv9-big-img, .tv9-small-img, .tv9-row-img, .dyn-card .thumb {
  background-color: var(--hm-blush);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--hm-stone);
}
.tv9-lead-img, .tv9-big-img, .tv9-small-img, .dyn-card .thumb { border-radius: 50% 50% 3px 3px / 24% 24% 3px 3px; }
.tv9-row-img { border-radius: 50% 50% 3px 3px / 30% 30% 3px 3px; }

/* ---- cards and sidebar panels: white on the blush page, soft pink shadow ---- */
.dyn-card {
  border: 0; border-radius: 4px; overflow: visible; padding: 10px 10px 0; background: #fff;
  box-shadow: 0 6px 16px -12px rgba(168, 65, 63, .6);
}
.dyn-card:hover { border-top-color: transparent; box-shadow: 0 12px 24px -12px rgba(168, 65, 63, .55); }
.dyn-card-body { padding: 13px 4px 15px; }
.dyn-widget { background: #fff; border: 0; border-radius: 4px; box-shadow: 0 6px 16px -12px rgba(168, 65, 63, .6); }
.tv9-row, .dyn-rank li { border-bottom: 1px dashed var(--hm-line); }
.dyn-rank .n { color: var(--hm-deep); font-family: var(--f-royal); font-weight: 400; }

/* tags: deep-pink pill (white text needs --hm-deep, not --hm-stone) */
.tag, .dyn-tag { background: var(--hm-deep); color: #fff; border-radius: 20px; clip-path: none; padding: 3px 12px; text-transform: none; letter-spacing: .2px; }

/* headline hover */
.dyn-card h3 a:hover, .card h3 a:hover, .tv9-row a:hover, .tv9-lead a:hover, .tv9-small a:hover, .tv9-big a:hover,
.dyn-rank a:hover, .tv9-timeline a:hover { color: var(--hm-deep); }
.tv9-timeline li::before { background: var(--hm-stone); }

/* ---- 5a. article page ---- */
.dyn-article h1 { font-family: var(--f-royal); font-weight: 400; color: var(--heading); letter-spacing: 0; line-height: 1.3; }
/* gentle arch on the main photo so heads near the top are not cut */
.dyn-figure img {
  border-radius: 50% 50% 8px 8px / 10% 10% 8px 8px; background: var(--hm-blush);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--hm-stone);
}
.dyn-breadcrumb a:hover { color: var(--hm-deep); }
.dyn-article-body a { color: var(--hm-deep); text-decoration-color: var(--hm-line); }
.dyn-article-body a:hover { color: var(--hm-dark); }

/* ---- 5b. footer: pink stone with jharokha outlines, a jharokha row on top ---- */
.nk-foot-domes { height: 28px; background: var(--hm-windows) left top / 24px 28px repeat-x; }
.nk-foot-main {
  background: var(--hm-facade) center / 26px 30px repeat,
              linear-gradient(180deg, #b4524d 0%, var(--hm-deep) 100%);   /* #b4524d keeps white body text at 4.9:1 */
}
.nk-fabout { color: rgba(255, 255, 255, .92); }
.nk-fhead { color: #fff; font-family: var(--f-royal); font-weight: 400; }
.nk-fhead::after { background: #fff; box-shadow: 50px 0 0 rgba(255, 255, 255, .4); }
.nk-fcats a, .nk-flinks a { color: rgba(255, 255, 255, .94); }
.nk-fcats a::before, .nk-flinks a::before {   /* a tiny white jharokha instead of the gold diamond */
  width: 7px; height: 9px; transform: none; background: #fff; opacity: .9; border-radius: 50% 50% 1px 1px / 60% 60% 1px 1px;
}
.nk-fcats a:hover, .nk-flinks a:hover, .nk-fcontact a:hover { color: #ffe3dd; }
.nk-fcontact small { color: #ffe3dd; }
.nk-ci { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .4); color: #fff; }
.nk-foot-bottom { background: var(--hm-dark); border-top: 2px solid #fff; color: rgba(255, 255, 255, .82); }
.nk-foot-bottom a { color: #fff; }
@media (max-width: 920px) { .nk-foot-domes { height: 21px; background-size: 18px 21px; } }

/* ---- 6. dark mode: Hawa Mahal at night ---------------------------------------
   html:root[data-theme="dark"] (0,2,1) beats brand_theme_css()'s :root[data-theme="dark"] (0,2,0). */
html:root[data-theme="dark"] {
  --bg: #1b1110; --surface: #261715; --surface-2: #2c1a18; --border: #3a2421;
  --hm-blush: #1b1110; --hm-line: #4a2c28; --heading: #f6e7e3; --brand-soft: #3a1d1a;
  --hm-soft-link: #f0a9a0;   /* pink text on dark panels (deep pink is too dark there) */
}
html[data-theme="dark"] .tp-top.nk-band {
  background: var(--hm-facade) center / 26px 30px repeat, linear-gradient(180deg, #a8524c 0%, #9a4843 55%, #8c3f3b 100%);
}
html[data-theme="dark"] .nk-gold, html[data-theme="dark"] .nk-foot-domes { filter: brightness(.85); }
html[data-theme="dark"] .bv-breaking, html[data-theme="dark"] .bv-br-bar { background: var(--surface); }
html[data-theme="dark"] .bv-br-set a, html[data-theme="dark"] .bv-br-plain { color: var(--heading); }
html[data-theme="dark"] .bv-br-set a:hover { color: var(--hm-soft-link); }
html[data-theme="dark"] .dyn-card, html[data-theme="dark"] .dyn-widget { background: var(--surface); box-shadow: 0 6px 16px -12px rgba(0, 0, 0, .8); }
html[data-theme="dark"] .tv9-lead-img, html[data-theme="dark"] .tv9-big-img, html[data-theme="dark"] .tv9-small-img,
html[data-theme="dark"] .tv9-row-img, html[data-theme="dark"] .dyn-card .thumb, html[data-theme="dark"] .dyn-figure img {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .55), 0 0 0 4px var(--hm-stone);
}
html[data-theme="dark"] .tv9-more { color: var(--hm-soft-link) !important; }
html[data-theme="dark"] .tv9-more:hover { color: #fff !important; }
html[data-theme="dark"] .n18-head .vall, html[data-theme="dark"] .n18-head.plain .vall, html[data-theme="dark"] .dyn-head .more,
html[data-theme="dark"] .dyn-article-body a, html[data-theme="dark"] .dyn-breadcrumb a:hover,
html[data-theme="dark"] .bv-topic span, html[data-theme="dark"] .dyn-rank .n { color: var(--hm-soft-link); }
html[data-theme="dark"] .dyn-card h3 a:hover, html[data-theme="dark"] .tv9-row a:hover, html[data-theme="dark"] .tv9-lead a:hover,
html[data-theme="dark"] .tv9-small a:hover, html[data-theme="dark"] .tv9-big a:hover, html[data-theme="dark"] .dyn-rank a:hover,
html[data-theme="dark"] .tv9-timeline a:hover { color: var(--hm-soft-link); }
html:root[data-theme="dark"] { --text-soft: #cdb9b4; --text-mute: #ab9893; }   /* warm greys, >= 4.5:1 on the night panels */
html[data-theme="dark"] .dyn-byline .date, html[data-theme="dark"] .author-more { color: var(--hm-soft-link); }

/* ---- 7. review fixes ---- */
.tv9-more { flex-shrink: 0; }
/* images in arched frames: never draw the alt text (the arch would cut it), and let the blush
   show instead of the dark "Nad Ki Awaz" placeholder that placeholder_img() returns */
.tv9-lead-img img, .tv9-big-img img, .tv9-small-img img, .tv9-row-img img, .dyn-card .thumb img, .dyn-figure img { color: transparent; }
.tv9-lead-img img[src^="data:image/svg+xml"], .tv9-big-img img[src^="data:image/svg+xml"], .tv9-small-img img[src^="data:image/svg+xml"],
.tv9-row-img img[src^="data:image/svg+xml"], .dyn-card .thumb img[src^="data:image/svg+xml"] { opacity: 0; }
/* a story without a photo: Hawa Mahal jharokha pattern + the lion badge, instead of an empty frame */
:is(.tv9-lead-img, .tv9-big-img, .tv9-small-img, .tv9-row-img, .dyn-card .thumb):has(img[src^="data:image/svg+xml"]) {
  background: url("../img/favicon-192.png") center / auto 46% no-repeat,
              url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='30'%3E%3Cpath d='M6 29V16Q6 10 13 8Q20 10 20 16V29' fill='none' stroke='%23c8615a' stroke-opacity='.28' stroke-width='1.2'/%3E%3Cpath d='M7 7Q13 0 19 7' fill='none' stroke='%23c8615a' stroke-opacity='.28' stroke-width='1.2'/%3E%3C/svg%3E") center / 26px 30px repeat,
              var(--hm-blush);
}
/* comments heading: a stand-alone jharokha tab (its old grey top line goes) */
.comments-title { display: inline-block; margin: 44px 0 16px 10px; border-top: 0; }
