/* AFP dark layout viewer styles */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.viewer {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
}

.viewer__frame {
  width: 100%;
  border: 0;
  display: block;
  background: #ffffff;
}

.viewer__frame--header {
  height: 28px;
}

.viewer__frame--footer {
  height: 86px;
}

.viewer__toolbar {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  padding: 6px 16px;
  background: #fef3c7;
  color: #92400e;
  border-bottom: 1px solid #fcd34d;
}

.viewer__toolbar[hidden] {
  display: none;
}

.viewer__main {
  flex: 1;
  width: 100%;
  max-width: 1350px;
  margin: 0 auto;
  padding: 22px 16px 0;
}

.viewer__article {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.viewer__meta {
  margin-bottom: 10px;
}

.viewer__source {
  font-family: "Myriad Pro", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  color: #241c15;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.viewer__date {
  display: block;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: #241c15;
  margin-top: 2px;
}

.viewer__headline {
  margin: 0 0 22px;
  font-family: "Myriad Pro", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
  color: #241c15;
}

.viewer__hero img {
  width: 100%;
  height: auto;
  display: block;
}

.viewer__caption {
  font-size: 12px;
  color: #111111;
  line-height: 1.6;
  margin: 10px 0 22px;
  font-weight: 600;
}

.viewer__body {
  padding: 0;
}

.viewer__article-body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #241c15;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.viewer__article-body p {
  margin: 0 0 16px;
}

.viewer__article-body p:last-child {
  margin-bottom: 0;
}

.viewer__article-byline {
  margin-top: auto;
  font-size: 12px;
  color: #7a7a7a;
  font-style: normal;
}

@media (max-width: 840px) {
  .viewer__headline {
    font-size: 34px;
  }
}

.viewer__error {
  font-family: system-ui, sans-serif;
  padding: 2rem 1.5rem;
  max-width: 560px;
  margin: 2rem auto;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

.viewer__error code {
  font-size: 0.85rem;
}
