@font-face {
  font-family: 'SolaimanLipiNormal';
  src: url('../fonts/solaiman-lipi.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --newspaper-green: #08663d;
  --newspaper-ink: #111;
  --newspaper-paper: #fff;
}

.newspaper-toolbar,
.newspaper-notice,
.newspaper-stage,
.newspaper-sheet,
.newspaper-sheet * {
  box-sizing: border-box;
}

.newspaper-toolbar {
  width: min(210mm, calc(100% - 8px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 auto 14px;
  font-family: 'SolaimanLipiNormal', 'SolaimanLipi', Arial, sans-serif;
}

.newspaper-toolbar__group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.newspaper-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--newspaper-green);
  border-radius: 7px;
  padding: 8px 15px;
  background: #fff;
  color: var(--newspaper-green) !important;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
}

.newspaper-action--primary {
  background: var(--newspaper-green);
  color: #fff !important;
}

.newspaper-action[disabled] {
  opacity: .65;
  cursor: wait;
}

.newspaper-notice {
  width: min(210mm, calc(100% - 8px));
  display: none;
  margin: 0 auto 12px;
  border: 1px solid #a7f3d0;
  border-radius: 7px;
  padding: 10px 14px;
  background: #ecfdf5;
  color: #047857;
  font-family: 'SolaimanLipiNormal', 'SolaimanLipi', Arial, sans-serif;
  font-size: 14px;
  text-align: center;
}

.newspaper-notice.is-visible {
  display: block;
}

.newspaper-notice.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.newspaper-stage {
  width: 100%;
  overflow: hidden;
}

.newspaper-sheet {
  width: min(210mm, calc(100% - 8px));
  min-height: 0;
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: hidden;
  border: .3mm solid var(--newspaper-green);
  background: var(--newspaper-paper);
  color: var(--newspaper-ink);
  box-shadow: 0 10px 34px rgba(15, 41, 30, .16);
  font-family: 'SolaimanLipiNormal', 'SolaimanLipi', Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.newspaper-sheet__header {
  flex: 0 0 auto;
}

.newspaper-sheet__masthead {
  min-height: 52mm;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5mm 2mm 2.5mm;
  background: #fff;
}

.newspaper-sheet__masthead img {
  width: 100%;
  max-width: 205mm;
  max-height: 47mm;
  display: block;
  object-fit: contain;
}

.newspaper-sheet__date-strip {
  min-height: 10mm;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2mm;
  padding: 2mm 3mm;
  background: var(--newspaper-green);
  color: #fff;
  font-size: 3.65mm;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.newspaper-sheet__date-strip b {
  font-family: Arial, sans-serif;
  font-weight: 400;
}

.newspaper-sheet__main {
  padding: 0 8mm 7mm;
}

.newspaper-sheet__page-label {
  float: right;
  margin-top: 2.4mm;
  border: .3mm solid var(--newspaper-green);
  border-radius: 999px;
  padding: 1mm 2.5mm;
  color: var(--newspaper-green);
  font-size: 2.8mm;
  line-height: 1;
}

.newspaper-sheet__headline {
  clear: both;
  margin: 0;
  padding: 9mm 3mm 8mm;
  color: #111;
  font-family: 'SolaimanLipiNormal', 'SolaimanLipi', Arial, sans-serif;
  font-size: 8.45mm;
  font-weight: 700;
  line-height: 1.26;
  text-align: center;
  text-wrap: balance;
}

.newspaper-sheet__story {
  column-count: 2;
  column-gap: 4.2mm;
  column-fill: balance;
  font-size: 4.4mm;
  font-weight: 400;
  line-height: 1.6;
  text-align: justify;
}

.newspaper-sheet__featured {
  width: 100%;
  margin: 0 0 3mm;
  break-inside: avoid;
  page-break-inside: avoid;
}

.newspaper-sheet__featured img {
  width: 100%;
  display: block;
  border: 0;
  background: #f3f3f3;
  object-fit: cover;
}

.newspaper-sheet__featured--landscape img {
  aspect-ratio: 16 / 9;
}

.newspaper-sheet__featured--square img,
.newspaper-sheet__featured--portrait img {
  aspect-ratio: 1 / 1;
}

.newspaper-sheet__byline {
  margin: 0 0 4mm;
  break-inside: avoid;
  page-break-inside: avoid;
  font-size: 3.75mm;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
}

.newspaper-sheet__story p {
  margin: 0 0 4mm;
  orphans: 3;
  widows: 3;
}

.newspaper-sheet__story p:empty,
.newspaper-sheet__story br:first-child {
  display: none;
}

.newspaper-sheet__story h2,
.newspaper-sheet__story h3,
.newspaper-sheet__story h4 {
  margin: 4mm 0 2mm;
  break-after: avoid;
  page-break-after: avoid;
  font-size: 5mm;
  line-height: 1.4;
  text-align: left;
}

.newspaper-sheet__story img {
  max-width: 100%;
  height: auto;
}

.newspaper-sheet__story a {
  color: inherit;
  text-decoration: none;
}

.newspaper-sheet__story ul,
.newspaper-sheet__story ol {
  margin: 0 0 4mm;
  padding-left: 7mm;
}

.newspaper-sheet__story blockquote {
  margin: 3mm 0;
  border-left: 1mm solid var(--newspaper-green);
  padding-left: 4mm;
}

.newspaper-sheet__story table,
.newspaper-sheet__story iframe,
.newspaper-sheet__story video {
  max-width: 100%;
}

.newspaper-sheet__footer {
  margin-top: 0;
  padding: 3.5mm 5mm 2.5mm;
  color: #242424;
  font-size: 3.75mm;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
}

.newspaper-sheet__source-url {
  display: none;
  margin-top: 1.5mm;
  font-family: Arial, sans-serif;
  font-size: 2.5mm;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.newspaper-sheet--capture {
  width: 794px !important;
  max-width: none !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  border-width: 1px !important;
  box-shadow: none !important;
}

.newspaper-sheet--capture .newspaper-sheet__masthead {
  min-height: 197px !important;
  padding: 17px 8px 10px !important;
}

.newspaper-sheet--capture .newspaper-sheet__masthead img {
  max-width: 775px !important;
  max-height: 178px !important;
}

.newspaper-sheet--capture .newspaper-sheet__date-strip {
  min-height: 38px !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
}

.newspaper-sheet--capture .newspaper-sheet__main {
  padding: 0 30px 26px !important;
}

.newspaper-sheet--capture .newspaper-sheet__headline {
  padding: 34px 12px 30px !important;
  font-size: 32px !important;
}

.newspaper-sheet--capture .newspaper-sheet__story {
  column-count: 2 !important;
  column-gap: 16px !important;
  font-size: 16.6px !important;
  line-height: 1.6 !important;
}

.newspaper-sheet--capture .newspaper-sheet__byline {
  margin-bottom: 15px !important;
  font-size: 14px !important;
}

.newspaper-sheet--capture .newspaper-sheet__featured {
  margin-bottom: 11px !important;
}

.newspaper-sheet--capture .newspaper-sheet__story p {
  margin-bottom: 15px !important;
}

.newspaper-sheet--capture .newspaper-sheet__footer {
  padding: 13px 19px 9px !important;
  font-size: 14px !important;
}

.newspaper-uploaded-page {
  width: min(210mm, calc(100% - 8px));
  min-height: 0;
  display: grid;
  place-items: start center;
  margin: 0 auto;
  overflow: hidden;
  border: .3mm solid var(--newspaper-green);
  padding: 2mm;
  background: #fff;
  box-shadow: 0 10px 34px rgba(15, 41, 30, .16);
}

.newspaper-uploaded-page img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.epaper-public-tools {
  width: min(210mm, 100%);
  margin: 0 auto 18px;
  border: 1px solid #d7e4dc;
  border-left: 4px solid var(--newspaper-green);
  padding: 13px 15px;
  background: #f7fbf8;
  font-family: 'SolaimanLipiNormal', 'SolaimanLipi', Arial, sans-serif;
}

.epaper-public-tools p {
  margin: 10px 0 0;
  color: #496056;
  font-size: 14px;
  line-height: 1.5;
}

.epaper-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.epaper-mode-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid #a9c4b5;
  border-radius: 6px;
  padding: 7px 13px;
  background: #fff;
  color: #174b34 !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
}

.epaper-mode-tabs a.is-active {
  border-color: var(--newspaper-green);
  background: var(--newspaper-green);
  color: #fff !important;
}

.epaper-mode-tabs a.is-disabled {
  opacity: .5;
  pointer-events: none;
}

.epaper-newspaper-viewer {
  width: 100%;
  margin: 20px auto 0;
}

.epaper-newspaper-viewer .epaper-page-status {
  cursor: default;
}

.epaper-newspaper-viewer .epaper-controls {
  width: min(210mm, calc(100% - 8px));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 16px auto 0;
  font-family: 'SolaimanLipiNormal', 'SolaimanLipi', Arial, sans-serif;
}

.epaper-newspaper-viewer .epaper-controls .page-link,
.epaper-newspaper-viewer .epaper-page-indicator {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5cf;
  border-radius: 6px;
  padding: 7px 12px;
  background: #fff;
  color: #174b34 !important;
  font-size: 14px;
  text-decoration: none !important;
}

.epaper-newspaper-viewer .epaper-controls .page-link:first-child {
  justify-self: end;
}

.epaper-newspaper-viewer .epaper-controls .page-link:last-child {
  justify-self: start;
}

.epaper-newspaper-viewer .epaper-controls .page-link:not(.disabled):hover {
  border-color: var(--newspaper-green);
  background: var(--newspaper-green);
  color: #fff !important;
}

.epaper-newspaper-viewer .epaper-controls .page-link.disabled {
  opacity: .4;
  pointer-events: none;
}

.epaper-page-jump {
  width: min(210mm, calc(100% - 8px));
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 11px auto 0;
}

.epaper-page-jump a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5cf;
  border-radius: 50%;
  background: #fff;
  color: #174b34 !important;
  font-family: 'SolaimanLipiNormal', 'SolaimanLipi', Arial, sans-serif;
  font-size: 13px;
  text-decoration: none !important;
}

.epaper-page-jump a.is-active {
  border-color: var(--newspaper-green);
  background: var(--newspaper-green);
  color: #fff !important;
}

@media screen and (max-width: 700px) {
  .newspaper-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .newspaper-toolbar__group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .newspaper-action {
    min-width: 0;
    padding-inline: 8px;
    font-size: 13px;
  }

  .newspaper-sheet,
  .newspaper-uploaded-page {
    width: calc(100% - 4px);
    min-height: 0;
  }

  .newspaper-sheet__masthead {
    min-height: 23vw;
    padding: 8px 3px 5px;
  }

  .newspaper-sheet__masthead img {
    max-height: 22vw;
  }

  .newspaper-sheet__date-strip {
    min-height: 30px;
    gap: 4px;
    padding: 5px 4px;
    font-size: clamp(8px, 2.35vw, 11px);
    line-height: 1.25;
  }

  .newspaper-sheet__main {
    padding: 0 14px 14px;
  }

  .newspaper-sheet__page-label {
    margin-top: 5px;
    padding: 3px 6px;
    font-size: 8px;
  }

  .newspaper-sheet__headline {
    padding: 16px 4px 14px;
    font-size: clamp(21px, 6.7vw, 30px);
    line-height: 1.22;
  }

  .newspaper-sheet__story {
    column-count: 2;
    column-gap: 9px;
    font-size: clamp(9.5px, 2.85vw, 13px);
    line-height: 1.55;
  }

  .newspaper-sheet__featured {
    margin-bottom: 7px;
  }

  .newspaper-sheet__byline {
    margin-bottom: 8px;
    font-size: clamp(8.5px, 2.5vw, 11px);
  }

  .newspaper-sheet__story p {
    margin-bottom: 9px;
  }

  .newspaper-sheet__footer {
    padding: 8px 8px 6px;
    font-size: clamp(9px, 2.6vw, 11px);
  }

  .epaper-date-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end !important;
  }

  .epaper-date-form input[type='date'] {
    width: 100%;
  }

  .epaper-public-tools {
    padding: 11px;
  }

  .epaper-mode-tabs {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .epaper-mode-tabs a {
    justify-content: center;
    text-align: center;
  }

  .epaper-newspaper-viewer .epaper-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .epaper-newspaper-viewer .epaper-controls .page-link {
    width: 100%;
    justify-self: stretch !important;
    padding-inline: 6px;
    font-size: 12px;
  }

  .epaper-newspaper-viewer .epaper-page-indicator {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 34px;
    font-size: 12px;
  }
}

@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  .newspaper-toolbar,
  .newspaper-notice,
  .epaper-public-tools,
  .news-header,
  .newspaper-footer,
  .reference-mobile-nav,
  .reference-notice,
  .reference-back-top,
  .cookie-consent {
    display: none !important;
  }

  .newspaper-sheet {
    width: 210mm !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    border-width: .25mm;
    box-shadow: none;
  }

  .newspaper-sheet__story {
    column-count: 2 !important;
  }

  .newspaper-sheet__source-url {
    display: block;
  }
}
