/* VyaparNiyam — Clean Editorial Business & Compliance Theme */

:root {
  --bg-page: #FFFFFF;
  --bg-surface: #F1F5F9;
  --bg-tint: #EFF6FF;
  --bg-muted: #E2E8F0;
  --border-light: #E2E8F0;
  --border-strong: #CBD5E1;
  --ink-primary: #061B3A;
  --ink-body: #334155;
  --ink-muted: #64748B;
  --accent: #0066FF;
  --accent-hover: #0052CC;
  --accent-active-bg: #003D99;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Crisp Obsidian Black Theme */
html[data-theme="dark"] {
  --bg-page: #090B10;
  --bg-surface: #111622;
  --bg-tint: #131C2E;
  --bg-muted: #1E293B;
  --border-light: #1F2937;
  --border-strong: #334155;
  --ink-primary: #F8FAFC;
  --ink-body: #CBD5E1;
  --ink-muted: #94A3B8;
  --accent: #3B82F6;
  --accent-hover: #60A5FA;
  --accent-active-bg: #1D4ED8;
}

html[data-theme="dark"] .top-navbar {
  background-color: rgba(9, 11, 16, 0.92);
}

html[data-theme="dark"] .brand-logo-img {
  background-color: #FFFFFF;
  padding: 3px 8px;
  border-radius: 3px;
}

html[data-theme="dark"] tbody tr:nth-child(even) {
  background-color: #0F1420;
}

html[data-theme="dark"] .directory-item:hover {
  background-color: #111622;
}

html[data-theme="dark"] .callout-warn {
  background-color: #1F1810;
  border-left-color: #D97706;
}

.article-figure img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.theme-toggle-btn {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 2px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--ink-body);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Tactile 0.04s Button Interaction */
button,
.btn,
[role="button"] {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  padding: 7px 14px;
  border-radius: 3px;
  border: 1px solid var(--border-strong);
  background-color: var(--bg-page);
  color: var(--ink-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.04s ease, color 0.04s ease, border-color 0.04s ease;
}

button:hover,
.btn:hover {
  background-color: var(--bg-surface);
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

button:active,
.btn:active,
[role="button"]:active {
  background-color: var(--accent-active-bg);
  color: #FFFFFF;
  border-color: var(--accent-active-bg);
}

.btn-primary {
  background-color: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #FFFFFF;
}

.btn-primary:active {
  background-color: var(--accent-active-bg);
  border-color: var(--accent-active-bg);
  color: #FFFFFF;
}

/* Top Navbar — Clean White with Centered Brand */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 58px;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
}

.navbar-inner {
  max-width: 1140px;
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13.5px;
}

.navbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  font-size: 13.5px;
}

.navbar-link {
  color: var(--ink-primary);
  font-weight: 500;
  padding: 4px 6px;
  border-radius: 2px;
  transition: background-color 0.04s ease, color 0.04s ease;
}

.navbar-link:hover {
  color: var(--accent);
  background-color: var(--bg-surface);
  text-decoration: none;
}

.navbar-link:active {
  background-color: var(--accent);
  color: #FFFFFF;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

#mobile-menu-btn {
  display: none;
}

/* Sub-header Breadcrumb Strip (Light Gray) */
.sub-banner {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 24px;
}

.sub-banner-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sub-banner-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-primary);
}

.breadcrumbs {
  font-size: 12.5px;
  color: var(--ink-muted);
}

.breadcrumbs a {
  color: var(--ink-muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

/* Clean 2-Column Editorial Container (Main Content + Right Sidebar) */
.editorial-shell {
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: start;
}

.main-content {
  min-width: 0;
}

/* Editorial Typography */
h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.28;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}

.article-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-primary);
  margin: 22px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}

h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-primary);
  margin: 16px 0 6px;
}

p {
  margin: 0 0 14px;
}

ul, ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

li {
  margin-bottom: 5px;
}

/* Featured Figure inside Full Articles */
.article-figure {
  margin: 0 0 22px;
  border: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  padding: 10px;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.article-figure figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-muted);
}

/* Editorial Pull-Quote */
.editorial-quote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background-color: var(--bg-tint);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-primary);
}

/* Inline Callout */
.callout {
  background-color: var(--bg-tint);
  border-left: 3px solid var(--accent);
  border-top: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 15px;
  margin: 18px 0;
  font-size: 14px;
}

.callout-title {
  font-weight: 600;
  color: var(--ink-primary);
  display: block;
  margin-bottom: 3px;
}

.callout-warn {
  border-left-color: #B45309;
  background-color: #FFFBEB;
}

/* Reference Tables */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0 20px;
  border: 1px solid var(--border-strong);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

th, td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  vertical-align: top;
}

th:last-child, td:last-child {
  border-right: none;
}

tr:last-child td {
  border-bottom: none;
}

thead th {
  background-color: var(--bg-tint);
  color: var(--ink-primary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
}

tbody tr:nth-child(even) {
  background-color: #F9FAFB;
}

/* Home Posts List (Pure Editorial Prose, No Images, No Pills) */
.directory-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.directory-item {
  padding: 0 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.directory-item:last-child {
  margin-bottom: 0;
}

.directory-item-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-primary);
  display: block;
  margin-bottom: 4px;
  line-height: 1.3;
}

.directory-item-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.directory-item-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.directory-item-desc {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--ink-body);
  line-height: 1.6;
}

.home-takeaways {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink-body);
}

.home-takeaways li {
  margin-bottom: 4px;
}

.read-more-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-primary);
  border: 1px solid var(--border-strong);
  padding: 5px 12px;
  border-radius: 2px;
  display: inline-block;
  transition: background-color 0.04s ease, color 0.04s ease, border-color 0.04s ease;
}

.read-more-link:hover {
  background-color: var(--bg-surface);
  border-color: var(--ink-primary);
  color: var(--ink-primary);
  text-decoration: none;
}

.read-more-link:active {
  background-color: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #FFFFFF;
}

/* Previous / Next Post Navigation */
.post-nav-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.post-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.post-tag-pill {
  font-size: 12px;
  color: var(--ink-muted);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 3px 10px;
  border-radius: 2px;
}

/* Reader Comment / Inquiry Section */
.comment-section {
  margin-top: 28px;
}

.comment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

/* Right Editorial Sidebar — Clean Light Gray Widgets, No Scroller */
.right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-widget {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 18px;
}

.widget-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-primary);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-strong);
}

.cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cat-list li {
  border-bottom: 1px solid var(--border-light);
  margin: 0;
}

.cat-list li:last-child {
  border-bottom: none;
}

.cat-list a {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13px;
  color: var(--ink-body);
}

.cat-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Search Widget */
.search-box {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink-primary);
  background-color: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
}

.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  z-index: 50;
  max-height: 260px;
  overflow-y: auto;
  display: none;
}

.search-results.open {
  display: block;
}

.search-result-item {
  display: block;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  font-size: 12.5px;
  color: var(--ink-primary);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: var(--bg-surface);
  text-decoration: none;
}

.search-result-cat {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
}

/* Numbered Top Posts Widget (1–5) */
.top-posts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-posts-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  margin: 0;
}

.top-posts-list li:last-child {
  border-bottom: none;
}

.top-post-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  min-width: 16px;
}

.top-posts-list a {
  font-size: 13px;
  color: var(--ink-body);
  line-height: 1.4;
}

.top-posts-list a:hover {
  color: var(--accent);
}

/* Author Box */
.author-box {
  background-color: var(--bg-tint);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
}

.author-name {
  font-weight: 700;
  color: var(--ink-primary);
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}

.author-bio {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-body);
  line-height: 1.5;
}

/* AdSense-Ready Slot */
.ad-slot {
  border: 1px dashed var(--border-strong);
  background-color: var(--bg-surface);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  color: var(--ink-muted);
  font-size: 11px;
}

.ad-slot-inline {
  min-height: 100px;
  margin: 24px 0;
}

/* Forms */
.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.form-control {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink-primary);
  background-color: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  padding: 20px 24px;
  font-size: 13px;
  color: var(--ink-muted);
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .editorial-shell {
    grid-template-columns: 1fr;
    padding: 24px 18px 40px;
  }
  .comment-grid {
    grid-template-columns: 1fr;
  }
  .key-facts-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .navbar-left .navbar-link,
  .navbar-right {
    display: none;
  }
  #mobile-menu-btn {
    display: inline-flex;
  }
  .sub-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
