/* LegalQuery Laws: one stylesheet for every page. Colours from legalquery.in (the scraper project's
   mockups/legalquery/); page layout and content follow India Code (owner, 2026-11-02). */
:root {
  --primary-blue:#1e3a8a; --primary-gold:#f59e0b; --text-dark:#1f2937; --text-gray:#6b7280;
  --text-light:#9ca3af; --bg-light:#f8fafc; --bg-white:#ffffff; --border-color:#e5e7eb;
  --shadow:0 1px 3px rgba(0,0,0,.1); --shadow-lg:0 10px 25px rgba(0,0,0,.15); --border-radius:8px;
  --blue-50:#eff6ff; --blue-100:#dbeafe; --blue-200:#c7d2fe; --gold-50:#fffbeb; --gold-200:#fde68a;
  --gold-700:#b45309; --green-50:#ecfdf5; --green-700:#047857; --violet-50:#f5f3ff; --violet-700:#6d28d9;
  --font: Inter, "Segoe UI", Tahoma, Geneva, Verdana, "Noto Sans Devanagari", sans-serif;
}
* { box-sizing:border-box; }
body { margin:0; font-family:var(--font); color:var(--text-dark); background:var(--bg-light);
       line-height:1.6; font-size:16px; -webkit-font-smoothing:antialiased; }
a { color:var(--primary-blue); }
a:hover { color:#1e40af; }
:focus-visible { outline:3px solid #93c5fd; outline-offset:2px; }
.container { max-width:1320px; margin:0 auto; padding:0 24px; }
main.container { min-height:60vh; padding-bottom:48px; }
[hidden] { display:none !important; }
h1, h2, h3 { line-height:1.3; }

/* header (legalquery.in colours) */
.site-header { background:#fff; border-bottom:2px solid var(--border-color); box-shadow:0 2px 8px rgba(0,0,0,.1); }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0; }
.site-name { font-family:Arial, Helvetica, sans-serif; font-weight:700; font-size:25.6px; color:var(--primary-blue);
             text-decoration:none; padding:8px 0; white-space:nowrap; }
.site-name:hover { color:var(--primary-blue); }
.top-search { flex:1 1 auto; max-width:420px; }
.top-search .input { width:100%; }
.top-actions { display:flex; align-items:center; gap:10px; }
.mainnav { background:var(--primary-blue); }
.mainnav ul { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; }
.mainnav a { display:block; color:#fff; text-decoration:none; font-weight:500; padding:16px 24px; }
.mainnav a:hover { background:rgba(255,255,255,.08); color:#fff; }
.mainnav a.active { background:rgba(255,255,255,.12); box-shadow:inset 0 -3px 0 var(--primary-gold); }
.menu-toggle { display:none; width:44px; height:44px; border:0; border-radius:8px; background:var(--primary-blue);
               color:#fff; font-size:20px; cursor:pointer; }
@media (max-width: 900px) {
  .menu-toggle { display:inline-flex; align-items:center; justify-content:center; }
  .mainnav ul { display:none; flex-direction:column; }
  .mainnav.open ul { display:flex; }
  .top-actions .btn-secondary, .top-search { display:none; }
}

/* buttons, chips, inputs */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; border-radius:8px; font:inherit;
       font-weight:600; font-size:14px; line-height:1.2; padding:10px 16px; border:1px solid transparent;
       cursor:pointer; text-decoration:none; white-space:nowrap; }
.btn.sm { padding:7px 12px; font-size:13px; }
.btn-secondary { background:#6b7280; color:#fff; padding:12px 30px; }
.btn-secondary:hover { background:#4b5563; color:#fff; }
.btn-primary { background:var(--primary-blue); color:#fff; }
.btn-primary:hover { background:#1e40af; color:#fff; }
.btn-gold { background:var(--primary-gold); color:#1f2937; }
.btn-gold:hover { background:#d97706; color:#111827; }
.btn-outline { background:#fff; color:var(--primary-blue); border-color:var(--blue-200); }
.btn-outline:hover { background:var(--blue-50); color:var(--primary-blue); }
.chip { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; line-height:1.5;
        padding:2px 10px; border-radius:999px; background:var(--blue-50); color:var(--primary-blue); }
.chip.gold { background:var(--gold-50); color:var(--gold-700); }
.chip.green { background:var(--green-50); color:var(--green-700); }
.chip.plain { background:#f3f4f6; color:#374151; }
.input { border:1px solid var(--border-color); border-radius:8px; padding:9px 12px; font:inherit; font-size:14px;
         color:var(--text-dark); background:#fff; min-width:0; }
.input:focus { outline:2px solid #93c5fd; border-color:#93c5fd; }
.note { color:var(--text-gray); font-size:13px; }
.empty { color:var(--text-gray); font-style:italic; }
.empty.pad { padding:16px 18px; margin:0; }
.card { background:#fff; border:1px solid var(--border-color); border-radius:var(--border-radius); box-shadow:var(--shadow); }
.h2 { font-size:19px; margin:22px 0 10px; }
.kicker { margin:0 0 4px; font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--text-gray); }
.kicker a { color:inherit; }
.data-warn { background:var(--gold-50); border:1px solid var(--gold-200); color:#78350f; border-radius:8px; padding:10px 12px; font-size:14px; }

/* breadcrumb */
.crumbs { font-size:14px; color:var(--text-gray); margin:20px 0 14px; }
.crumbs a { color:var(--text-gray); text-decoration:none; }
.crumbs a:hover { color:var(--primary-blue); text-decoration:underline; }
.crumbs .sep { margin:0 8px; color:var(--text-light); }

/* home (laid out like India Code's home, in LegalQuery colours) */
body { overflow-x:clip; }
.home-band { background:var(--primary-blue); color:#fff; margin:0 calc(50% - 50vw); padding:44px 0 52px; text-align:center; }
.home-band h1 { font-size:38px; margin:0 0 6px; color:#fff; }
.home-band > .container > p { margin:0 auto 24px; color:#dbeafe; max-width:760px; }
.home-search { max-width:900px; margin:0 auto; padding:22px; text-align:left; color:var(--text-dark); }
.home-search .note { margin:12px 0 0; }
.hero-search, .search-form { display:flex; gap:8px; max-width:760px; }
.home-search .hero-search { max-width:none; }
.hero-search .input, .search-form .input { flex:1; font-size:16px; padding:12px 14px; }
.hero-search .btn { padding:12px 28px; font-size:15px; }
.search-form { padding:14px; margin-bottom:16px; max-width:none; }
.site-tag { font-size:15px; font-weight:600; color:var(--gold-700); margin-left:2px; }
.stat-cards { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:20px; margin:28px 0; }
.stat-card { padding:22px 18px; text-align:center; display:flex; flex-direction:column; gap:4px; border-top:4px solid var(--primary-blue); }
.stat-card strong { font-size:34px; line-height:1.1; color:var(--primary-blue); }
.stat-card span { font-weight:600; color:var(--text-gray); }
.stat-card a { margin-top:8px; font-size:14px; font-weight:600; text-decoration:none; }
.stat-card.gold { border-top-color:var(--primary-gold); } .stat-card.gold strong { color:var(--gold-700); }
.stat-card.green { border-top-color:var(--green-700); } .stat-card.green strong { color:var(--green-700); }
.stat-card.violet { border-top-color:var(--violet-700); } .stat-card.violet strong { color:var(--violet-700); }
.home-grid { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:20px; align-items:start; }
.panel-card { overflow:hidden; display:flex; flex-direction:column; }
.panel-head { margin:0; padding:14px 18px; font-size:17px; color:#fff; background:var(--primary-blue); }
.panel-head.gold { background:var(--primary-gold); color:#1f2937; }
.recent-list { list-style:none; margin:0; padding:4px 18px; }
.recent-list li { padding:12px 0; border-bottom:1px solid var(--border-color); display:flex; flex-direction:column; }
.recent-list li:last-child { border-bottom:0; }
.recent-list a { font-weight:600; text-decoration:none; color:var(--text-dark); }
.recent-list a:hover { color:var(--primary-blue); text-decoration:underline; }
.panel-card .year-chips { padding:16px 18px 0; }
.pad-x { padding:0 18px; margin:0 0 12px; }
.panel-more { display:block; padding:12px 18px; background:var(--bg-light); border-top:1px solid var(--border-color);
              text-align:center; font-weight:600; font-size:14px; text-decoration:none; margin-top:auto; }
.categories { margin:36px 0 8px; }
.cat-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:16px; }
.cat-card { padding:18px; text-decoration:none; display:flex; flex-direction:column; gap:2px; border-left:4px solid var(--primary-gold); }
.cat-card strong { font-size:17px; color:var(--primary-blue); }
.cat-card span { font-size:14px; color:var(--text-gray); }
.cat-card:hover { box-shadow:var(--shadow-lg); }
.cat-links { display:flex; flex-direction:column; }
.cat-links a { display:flex; justify-content:space-between; align-items:center; padding:8px 10px; border-radius:6px;
               text-decoration:none; font-weight:600; font-size:14.5px; color:var(--text-dark); }
.cat-links a:hover { background:var(--blue-50); }
.cat-links a.active { background:var(--blue-50); color:var(--primary-blue); box-shadow:inset 3px 0 0 var(--primary-gold); }
.categories > h2 { text-align:center; font-size:24px; color:var(--primary-blue); margin:0 0 18px; }
.year-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.fchip { border:1px solid var(--border-color); background:#fff; border-radius:999px; padding:5px 11px; font-size:13.5px;
         font-weight:600; text-decoration:none; color:var(--text-dark); }
.fchip:hover { border-color:var(--blue-200); background:var(--blue-50); }
.fchip .n, .tab .n, .related .n, .cat-links .n { display:inline-block; margin-left:6px; font-size:12px; font-weight:700;
       background:var(--blue-50); color:var(--primary-blue); border-radius:999px; padding:0 8px; }
.error-page { padding:32px; margin:28px 0; }
.error-page h1 { margin:0 0 8px; }
.error-page .hero-search { margin:18px 0; }

/* list page */
.page-head h1 { font-size:30px; font-weight:600; margin:0 0 4px; }
.page-head p { color:var(--text-gray); margin:0 0 16px; }
.list-layout { display:grid; grid-template-columns:270px minmax(0, 1fr); gap:24px; align-items:start; }
.filter-card { padding:18px; position:sticky; top:12px; }
.filter-card h2 { font-size:16px; margin:0 0 4px; }
.filter-card label { display:block; font-size:13px; font-weight:600; color:var(--text-gray); margin:14px 0 6px; }
.filter-card .input, .filter-card .btn { width:100%; }
.filter-card .btn { margin-top:12px; }
.results-bar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; padding:12px 18px;
               border-bottom:1px solid var(--border-color); font-size:14px; color:var(--text-gray); }
.act-row { display:flex; gap:16px; align-items:flex-start; padding:16px 18px; border-bottom:1px solid var(--border-color); }
.act-row:last-child { border-bottom:0; }
.act-main { flex:1; min-width:0; }
.act-row h3 { font-size:16.5px; line-height:1.4; margin:0 0 4px; }
.act-row h3 a { text-decoration:none; }
.act-row h3 a:hover { text-decoration:underline; }
.act-row .meta { font-size:13.5px; color:var(--text-gray); }
.act-row .chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.act-row .badge { min-width:0; margin-right:6px; vertical-align:2px; }
.act-side { flex:none; }

/* Act header (India Code layout: title, ministry box, PDF links; no preview, no QR code) */
.act-head { display:flex; gap:28px; align-items:flex-start; justify-content:space-between; margin:4px 0 24px; }
.act-head-main { flex:1; min-width:0; }
.act-head h1 { font-size:30px; line-height:1.25; font-weight:700; color:var(--primary-blue); margin:0 0 16px; }
.ministry-box { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:0; padding:14px 18px; max-width:1000px;
                background:#fff; border:1px solid var(--border-color); border-radius:8px; font-size:15px; }
.ministry-box b { color:var(--text-gray); font-weight:600; }
.ministry-icon { width:28px; height:28px; border-radius:50%; background:var(--blue-50); display:inline-flex;
                 align-items:center; justify-content:center; font-size:14px; }
.act-pdfs { flex:none; display:flex; flex-direction:column; align-items:center; gap:10px; width:150px; }
.pdf-thumb { margin:0; text-align:center; }
.pdf-thumb a { display:flex; flex-direction:column; align-items:center; gap:8px; color:var(--primary-blue); }
.pdf-thumb img { display:block; width:85px; height:110px; border:1px solid var(--border-color); border-radius:3px;
                 box-shadow:0 2px 6px rgba(0,0,0,.12); background:#fff; }
.pdf-thumb a:hover img { box-shadow:0 4px 12px rgba(0,0,0,.18); }
.pdf-thumb figcaption { font-size:14px; text-decoration:underline; overflow-wrap:anywhere; }

/* tabs (one URL per tab) */
.tabs { display:flex; gap:2px; border-bottom:1px solid #d1d5db; overflow-x:auto; scrollbar-width:none; margin-bottom:20px; }
.tabs::-webkit-scrollbar { display:none; }
.tab { font-weight:500; font-size:16px; color:var(--primary-blue); padding:10px 14px; white-space:nowrap;
       border-bottom:2px solid transparent; margin-bottom:-1px; text-decoration:none; border-radius:6px 6px 0 0; }
.tab:hover { background:#f1f5f9; }
.tab.active { background:#eef0f3; border-bottom-color:var(--primary-gold); }
.panel { padding:18px 20px 22px; }
.listbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; margin:0 0 16px;
           font-size:14.5px; color:var(--text-dark); }
.listbar .tools { display:flex; gap:8px; }
.listbar-right { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-left:auto; }
.iconbtn { width:40px; height:40px; border:1px solid var(--primary-blue); border-radius:8px; background:#fff;
           color:var(--primary-blue); cursor:pointer; padding:0; display:inline-flex; align-items:center; justify-content:center; }
.iconbtn:hover { background:var(--blue-50); }
.iconbtn[hidden] { display:none; }
.pager.pager-top { margin:0; justify-content:flex-end; }
.pager-top a, .pager-top span { height:36px; min-width:36px; font-weight:500; border-color:var(--blue-200); color:var(--primary-blue); }
.pager-top .current { color:#fff; }
.linkbtn { background:none; border:0; color:var(--primary-blue); font:inherit; font-size:13px; cursor:pointer; padding:5px 8px;
           border-radius:6px; text-decoration:none; }
.linkbtn:hover { background:var(--blue-50); }

/* section list (India Code table look; rows expand in place) */
.sec-list { border:1px solid var(--border-color); border-radius:8px; overflow:hidden; background:#fff; }
.sec-list-head { padding:12px 14px; background:#f1f2f4; border-bottom:1px solid var(--border-color); font-weight:700; font-size:15px; }
.sec { border-bottom:1px solid var(--border-color); background:#fff; scroll-margin-top:14px; }
.sec:last-child { border-bottom:0; }
.sec > summary { display:flex; gap:12px; align-items:center; padding:11px 14px; cursor:pointer; list-style:none; }
.sec > summary::-webkit-details-marker { display:none; }
.sec > summary:hover { background:var(--bg-light); }
.sec[open] > summary { border-bottom:1px solid var(--border-color); background:var(--blue-50); }
.badge { flex:none; display:inline-block; font-size:12.5px; font-weight:700; color:#fff; background:var(--primary-blue);
         border-radius:3px; padding:2px 8px; min-width:72px; text-align:center; }
.badge.gold { background:var(--primary-gold); color:#1f2937; }
.sec-title { flex:1; font-weight:400; color:var(--primary-blue); min-width:0; }
.sec-docs { flex:none; font-size:12px; font-weight:700; color:var(--gold-700); background:var(--gold-50); border-radius:999px;
            padding:2px 9px; margin-top:2px; }
.chev { flex:none; width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--border-color);
        border-radius:6px; color:var(--text-dark); font-size:18px; line-height:1; transition:transform .2s; background:#fff; }
.sec[open] .chev { transform:rotate(90deg); }
.sec-body { padding:16px 18px; }
.sec-tools { display:flex; justify-content:flex-end; margin-top:12px; }
.law-text { font-size:15.5px; line-height:1.75; overflow-wrap:anywhere; }
.law-text table { max-width:100%; display:block; overflow-x:auto; border-collapse:collapse; }
.law-text td, .law-text th { border:1px solid var(--border-color); padding:4px 8px; }
.footnotes { margin-top:16px; padding-top:10px; border-top:1px dashed var(--border-color); font-size:13.5px;
             color:var(--text-gray); overflow-wrap:anywhere; }
.schedule-text { white-space:pre-wrap; font-family:var(--font); font-size:14.5px; line-height:1.7; margin:0; overflow-wrap:anywhere; }

/* linked documents */
.related { margin-top:18px; border:1px solid var(--border-color); border-radius:8px; overflow:hidden; }
.related h4 { margin:0; padding:10px 14px; font-size:14px; background:var(--bg-light); border-bottom:1px solid var(--border-color); }
.doclist { list-style:none; margin:0; padding:0 14px 8px; }
.doclist li { display:flex; gap:12px; align-items:baseline; padding:8px 0; border-top:1px solid #f1f5f9; font-size:14px; }
.doclist li:first-child { border-top:0; }
.doclist .d { flex:none; width:96px; color:var(--text-gray); font-size:13px; }
.doclist .t { flex:1; min-width:0; overflow-wrap:anywhere; }
.views { flex:none; display:inline-flex; gap:4px; flex-wrap:wrap; }
.view { border:1px solid var(--blue-200); background:#fff; color:var(--primary-blue); border-radius:6px; font-size:12.5px;
        font-weight:700; padding:3px 9px; text-decoration:none; }
.view:hover { background:var(--blue-50); }
.view.remote { border-style:dashed; }
.table-wrap { overflow-x:auto; }
.doctable { width:100%; border-collapse:collapse; font-size:14px; }
.doctable th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-gray);
               padding:8px 10px; border-bottom:2px solid var(--border-color); white-space:nowrap; }
.doctable td { padding:10px; border-bottom:1px solid var(--border-color); vertical-align:top; }
.nowrap { white-space:nowrap; }
.doc-title { margin-top:4px; overflow-wrap:anywhere; }
.type { display:inline-block; font-size:11.5px; font-weight:700; border-radius:6px; padding:1px 8px; letter-spacing:.02em;
        background:#f3f4f6; color:#374151; }
.type.t-RULE { background:var(--violet-50); color:var(--violet-700); }
.type.t-NOTIFICATION { background:var(--blue-50); color:var(--primary-blue); }
.type.t-ORDER { background:var(--gold-50); color:var(--gold-700); }
.type.t-REGULATION, .type.t-CIRCULAR { background:var(--green-50); color:var(--green-700); }

/* details tab */
.kv { width:100%; border-collapse:collapse; font-size:15px; }
.kv th { width:34%; text-align:left; color:var(--text-gray); font-weight:600; font-size:14px; padding:10px 12px;
         border-bottom:1px solid var(--border-color); vertical-align:top; }
.kv td { padding:10px 12px; border-bottom:1px solid var(--border-color); overflow-wrap:anywhere; }
.panel .h2:first-child { margin-top:0; }

/* single section page */
.provision { padding:24px 28px; }
.provision h1 { font-size:26px; margin:0 0 16px; }
.prevnext { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:16px 0; }
.prevnext a { display:flex; flex-direction:column; padding:12px 16px; text-decoration:none; font-weight:600; }
.prevnext a.next { text-align:right; }

/* pager */
.pager { display:flex; flex-wrap:wrap; gap:6px; align-items:center; justify-content:center; margin:16px 0; }
.pager a, .pager span { min-width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center;
        border:1px solid var(--border-color); background:#fff; border-radius:8px; font-size:14px; font-weight:600;
        color:var(--text-dark); padding:0 12px; text-decoration:none; }
.pager a:hover { background:var(--blue-50); border-color:var(--blue-200); }
.pager .current { background:var(--primary-blue); border-color:var(--primary-blue); color:#fff; }
.pager .disabled { opacity:.45; }
.pager .gap { border:0; background:none; min-width:0; padding:0 2px; color:var(--text-light); }

/* footer (legalquery.in colours) */
.site-footer { background:#1f2937; color:#fff; padding:64px 0 16px; }
.foot-grid { display:grid; grid-template-columns:1.6fr repeat(2, 1fr); gap:32px; }
.site-footer h3 { font-size:18px; margin:0 0 12px; color:#fff; }
.site-footer p { color:#d1d5db; font-size:14.5px; margin:0 0 8px; }
.site-footer a { color:#d1d5db; text-decoration:none; display:block; padding:3px 0; font-size:14.5px; }
.site-footer a:hover { color:#fff; }
.source-note { border-top:1px solid #374151; margin-top:36px; padding-top:16px; font-size:13px; color:#9ca3af; }
.source-note a { display:inline; color:#d1d5db; text-decoration:underline; font-size:13px; }

@media (max-width: 900px) {
  .list-layout, .home-grid { grid-template-columns:1fr; }
  .stat-cards { grid-template-columns:1fr 1fr; }
  .filter-card { position:static; }
  .act-row { flex-direction:column; gap:10px; }
  .foot-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 640px) {
  .container { padding:0 16px; }
  .home-band { padding:28px 0 32px; }
  .home-band h1 { font-size:28px; }
  .home-search { padding:16px; }
  .stat-cards { gap:12px; }
  .stat-card strong { font-size:26px; }
  .hero-search { flex-direction:column; }
  .provision { padding:18px 16px; }
  .act-head { flex-direction:column; gap:16px; }
  .act-head h1 { font-size:23px; }
  .act-pdfs { align-items:flex-start; width:auto; }
  .listbar-right { margin-left:0; }
  .panel { padding:14px 12px 18px; }
  .badge { min-width:0; }
  .doclist li { flex-wrap:wrap; }
  .doclist .d { width:auto; }
  .kv th { width:40%; }
  .prevnext { grid-template-columns:1fr; }
}
@media (max-width: 560px) { .foot-grid { grid-template-columns:1fr; } }
