:root {
  color-scheme: light;
  font-family: Arial, "Noto Sans Armenian", sans-serif;
  background: #eef2f7;
  color: #172235;
}

* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  background: #eef2f7;
}

.app {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  overflow: hidden;
}

.topbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: #fff;
  background: #101b2b;
  border-radius: 12px;
}

.brand {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 2px solid #4ba3e8;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
}

.heading h1 {
  margin: 0 0 2px;
  font-size: 17px;
}

.heading p {
  margin: 0;
  color: #c4d2e2;
  font-size: 11px;
  line-height: 1.35;
}

.document {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin-top: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe3ed;
  border-radius: 12px;
}

.document-heading {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

.document-heading h2 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.35;
}

.source, .note {
  margin: 0;
  color: #66758a;
  font-size: 11px;
  line-height: 1.4;
}

.source-link {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid #cbd7e5;
  border-radius: 8px;
  color: #185d94;
  font-size: 11px;
  text-decoration: none;
  white-space: nowrap;
}

.status {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-top: 1px solid #e8edf3;
  background: #f7f9fc;
  color: #53647a;
  font-size: 11px;
}

.frame-wrap {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.note {
  flex: 0 0 auto;
  padding: 6px 12px 8px;
}

@media (max-width: 520px) {
  .app {
    padding-left: max(5px, env(safe-area-inset-left));
    padding-right: max(5px, env(safe-area-inset-right));
  }

  .topbar {
    padding: 7px 9px;
  }

  .document-heading {
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
  }

  .document-heading h2 {
    font-size: 13px;
  }

  .source {
    font-size: 10px;
  }

  .source-link {
    padding: 6px 7px;
    font-size: 10px;
  }

  .note {
    padding: 5px 9px 7px;
    font-size: 10px;
  }
}
