/* MaharashtraWeb responsive prototype: mobile-first, no fixed pixel layouts. */
:root {
  --navy: #1f2a6b;
  --navy-ink: #ffffff;
  --maroon: #8a1c1c;
  --saffron: #e8730c;
  --cream: #fbf7e6;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #5b5b66;
  --line: #e4e1d3;
  --link: #8a1c1c;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  --serif: Georgia, "Noto Serif", "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --navy: #2a3784;
    --cream: #23221c;
    --bg: #141416;
    --surface: #1d1d21;
    --text: #ececf0;
    --muted: #a3a3ad;
    --line: #34343b;
    --link: #f0a070;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.6 var(--font);
  color: var(--text);
  background: var(--bg);
}
img, iframe, video { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--saffron); }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { background: var(--navy); color: var(--navy-ink); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { color: var(--navy-ink); text-decoration: none; font: italic 700 1.5rem/1.2 var(--serif); margin-right: auto; }
.brand span { display: block; font: 400 .75rem/1.2 var(--font); letter-spacing: .04em; opacity: .8; font-style: normal; }
.search { display: flex; flex: 1 1 100%; order: 3; }
.search input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 0; border-radius: 8px 0 0 8px; }
.search button { font: inherit; padding: 0 16px; border: 0; border-radius: 0 8px 8px 0; background: var(--saffron); color: #fff; font-weight: 600; cursor: pointer; }

/* Top navigation: a disclosure on phones, a bar on wider screens */
.topnav summary { list-style: none; cursor: pointer; padding: 10px 14px; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; font-weight: 600; }
.topnav summary::-webkit-details-marker { display: none; }
.topnav ul { list-style: none; margin: 8px 0 0; padding: 0; }
.topnav a { display: block; color: var(--navy-ink); text-decoration: none; padding: 12px 4px; border-top: 1px solid rgba(255,255,255,.15); }
.topnav[open] { flex: 1 1 100%; order: 4; }
@media (min-width: 900px) {
  .search { flex: 0 1 360px; order: 0; }
  .topnav { flex: 1 1 100%; order: 4; }
  .topnav summary { display: none; }
  .topnav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; }
  .topnav a { border: 0; padding: 6px 0; }
}

/* Breadcrumb and page title */
.crumbs { font-size: .875rem; color: var(--muted); margin: 16px 0 0; }
.crumbs a { color: var(--muted); }
h1, h2, h3 { color: var(--navy); line-height: 1.25; }
@media (prefers-color-scheme: dark) { h1, h2, h3 { color: #c9cfff; } }
h1 { font: italic 700 clamp(1.8rem, 5vw, 2.6rem)/1.15 var(--serif); margin: 12px 0 8px; }
h2 { font-size: 1.35rem; margin: 32px 0 12px; }
.lede { font-size: 1.1rem; color: var(--muted); margin-top: 0; }

/* Cards and grids */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card h3 a { display: block; padding: 8px 0; color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips a { display: inline-block; padding: 8px 12px; min-height: 40px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: .95rem; }
.chips a:hover { border-color: var(--saffron); color: var(--text); }
.card .note { margin: 0; color: var(--muted); font-size: .95rem; }
.card details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.card summary { cursor: pointer; padding: 8px 0; color: var(--link); font-weight: 600; }
.card details .chips { margin-top: 8px; }

.linklist { list-style: none; margin: 0; padding: 0; }
.linklist a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.linklist li:last-child a { border-bottom: 0; }

/* State/content page: content first on phones, sidebar alongside on desktop */
.layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); padding-bottom: 32px; }
.prose input, .prose select, .prose textarea, .prose embed, .prose object { max-width: 100%; }
.prose a { overflow-wrap: anywhere; }
@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .sidebar { position: sticky; top: 16px; }
}
.prose { max-width: 70ch; }
.prose .block + .block { margin-top: 12px; }
.prose .table-wrap { overflow-x: auto; margin: 16px 0; }
.prose table { width: 100%; border-collapse: collapse; }
.prose iframe { display: block; width: 100%; margin: 16px 0; border: 0; }
.prose img { margin: 8px 0; }
.prose dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.prose dl.facts dt { font-weight: 700; color: var(--muted); }
.prose dl.facts dd { margin: 0; }
.prose .updated, .prose .note { color: var(--muted); font-size: .9rem; }
.prose td, .prose th { padding: 6px 8px; border: 1px solid var(--line); vertical-align: top; }
.prose p:empty { display: none; }
.sidebar details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.sidebar summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--navy); }
.sidebar .linklist { padding: 0 16px 8px; }
@media (prefers-color-scheme: dark) { .sidebar summary { color: #c9cfff; } }

/* Ad slot: reserved height so the page does not jump when an ad loads */
.ad { margin: 24px 0; min-height: 100px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
/* live ad: takes no space until the reader reaches it and it loads */
.ad.live { border: 0; min-height: 0; margin: 0; overflow: hidden; }
.ad.live.loaded { min-height: 280px; margin: 24px 0; }

.site-footer { background: var(--cream); border-top: 1px solid var(--line); margin-top: 40px; padding: 24px 0; font-size: .9rem; color: var(--muted); }
.site-footer a { color: var(--muted); }
