:root {
  --zb-purple: #6B2D8B;
  --zb-purple-dark: #4c1d64;
  --zb-ink: #0f172a;
  --zb-muted: #475569;
  --zb-subtle: #64748b;
  --zb-rule: #d8dee6;
  --zb-rule-strong: #0f172a;
  --zb-bg: #ffffff;
  --zb-surface: #f8fafc;
  --zb-danger: #991b1b;
  --zb-danger-bg: #fef2f2;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--zb-bg);
  color: var(--zb-ink);
  font-family: "SolaimanLipi", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--zb-purple);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Broadsheet Masthead */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--zb-bg);
  border-bottom: 2px solid var(--zb-purple);
}

.masthead-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--zb-ink);
}

.brand-mark {
  width: 32px;
  height: 32px;
  background: var(--zb-purple);
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-name {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
}

.brand-sub {
  display: block;
  font-size: 11px;
  color: var(--zb-muted);
  letter-spacing: 0.03em;
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  border: 1px solid var(--zb-rule);
  background: var(--zb-bg);
  color: var(--zb-ink);
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.icon-btn:active {
  background: var(--zb-surface);
}

/* Category Strip */
.cat-strip {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 14px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--zb-rule);
  scrollbar-width: none;
}

.cat-strip::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex: 0 0 auto;
  border: 1px solid var(--zb-rule);
  background: var(--zb-bg);
  color: var(--zb-ink);
  padding: 4px 11px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.cat-pill.active {
  background: var(--zb-purple);
  border-color: var(--zb-purple);
  color: #ffffff;
}

/* Status / Offline Banner */
.status-bar {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 14px;
  font-size: 13px;
  background: var(--zb-surface);
  border-bottom: 1px solid var(--zb-rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.status-bar.error {
  background: var(--zb-danger-bg);
  color: var(--zb-danger);
}

.hidden {
  display: none !important;
}

/* Main Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 14px 48px;
}

.search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--zb-rule);
}

.search-input {
  flex: 1;
  border: 1px solid var(--zb-rule);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 15px;
  color: var(--zb-ink);
  background: var(--zb-bg);
}

.primary-btn {
  border: 1px solid var(--zb-purple);
  background: var(--zb-purple);
  color: #ffffff;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-btn {
  border: 1px solid var(--zb-rule-strong);
  background: var(--zb-bg);
  color: var(--zb-ink);
  padding: 8px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Section Headers */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 2px solid var(--zb-rule-strong);
  border-bottom: 1px solid var(--zb-rule);
  padding: 7px 0;
  margin: 0 0 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--zb-purple);
}

.section-head span {
  font-size: 12px;
  color: var(--zb-muted);
}

/* Lead Broadsheet Story */
.lead-story {
  border-bottom: 1px solid var(--zb-rule);
  padding-bottom: 16px;
  margin-bottom: 14px;
  cursor: pointer;
}

.lead-media {
  width: 100%;
  background: var(--zb-surface);
  margin-bottom: 10px;
  overflow: hidden;
}

.lead-media img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.story-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--zb-purple);
  margin-bottom: 4px;
}

.lead-title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.32;
  font-weight: 700;
}

.lead-excerpt {
  margin: 0 0 8px;
  font-size: 15.5px;
  color: var(--zb-muted);
  line-height: 1.58;
}

.story-meta {
  font-size: 12.5px;
  color: var(--zb-subtle);
}

/* Broadsheet News List (Rule-separated, Zero Boxes/Shadows) */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--zb-rule);
  cursor: pointer;
  align-items: start;
}

.news-item.no-thumb {
  grid-template-columns: 1fr;
}

.news-item-title {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.38;
  font-weight: 700;
}

.news-item-excerpt {
  margin: 0 0 6px;
  font-size: 14.5px;
  color: var(--zb-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-thumb {
  width: 112px;
  background: var(--zb-surface);
}

.news-thumb img {
  width: 112px;
  height: auto;
  object-fit: contain;
}

/* Categories Directory */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1px;
  background: var(--zb-rule);
  border: 1px solid var(--zb-rule);
}

.cat-cell {
  background: var(--zb-bg);
  padding: 14px 12px;
  text-align: left;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.cat-cell strong {
  display: block;
  font-size: 16px;
  color: var(--zb-ink);
}

.cat-cell span {
  font-size: 12px;
  color: var(--zb-muted);
}

/* Article Reader View */
.reader-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--zb-rule);
  flex-wrap: wrap;
}

.reader-title {
  margin: 6px 0 10px;
  font-size: 25px;
  line-height: 1.32;
}

.reader-meta {
  font-size: 13px;
  color: var(--zb-muted);
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--zb-rule);
}

.reader-hero {
  margin: 0 0 16px;
  background: var(--zb-surface);
}

.reader-body {
  font-size: 17px;
  line-height: 1.78;
  color: var(--zb-ink);
}

.reader-body p {
  margin: 0 0 14px;
}

.reader-body h2, .reader-body h3 {
  margin: 20px 0 8px;
  line-height: 1.35;
}

.reader-body figure {
  margin: 14px 0;
}

.reader-body figcaption {
  font-size: 13px;
  color: var(--zb-muted);
  margin-top: 4px;
}

/* Info / Masthead Tab */
.info-list {
  border-top: 1px solid var(--zb-rule);
}

.info-row {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--zb-rule);
  text-decoration: none;
  color: var(--zb-ink);
}

.info-row strong {
  display: block;
  font-size: 17px;
  color: var(--zb-purple);
}

.info-row span {
  font-size: 14px;
  color: var(--zb-muted);
}

/* Offline / Empty State */
.empty-panel {
  border: 1px solid var(--zb-rule);
  background: var(--zb-surface);
  padding: 22px 16px;
  text-align: center;
  margin-top: 12px;
}

.empty-panel h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.empty-panel p {
  margin: 0 0 14px;
  color: var(--zb-muted);
  font-size: 14.5px;
}

/* Footer */
.site-footer {
  max-width: 900px;
  margin: 24px auto 0;
  padding: 16px 14px 28px;
  border-top: 2px solid var(--zb-rule-strong);
  font-size: 13px;
  color: var(--zb-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--zb-purple);
  text-decoration: none;
  font-weight: 600;
}

@media (min-width: 680px) {
  .lead-title {
    font-size: 28px;
  }
  .news-item {
    grid-template-columns: 1fr 140px;
  }
  .news-thumb, .news-thumb img {
    width: 140px;
  }
}
