.card-regulatory-content[data-style="38"] {
  margin: 20px 0 40px;
  color: #222;
}

.card-regulatory-content[data-style="38"].font-small .regulatory-layout {
  font-size: 90%;
}

.card-regulatory-content[data-style="38"].font-large .regulatory-layout {
  font-size: 112%;
}

.regulatory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.regulatory-toolbar .back-button {
  display: inline-block;
  padding: 8px 16px;
  color: #06457f;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #06457f;
  border-radius: 4px;
}

.font-controls {
  display: flex;
  gap: 4px;
}

.font-controls button {
  min-width: 42px;
  padding: 5px 9px;
  color: #444;
  background: #fff;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
}

.font-controls button.active,
.font-controls button:hover,
.font-controls button:focus {
  color: #fff;
  background: #06457f;
  border-color: #06457f;
}

.regulatory-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 720px;
  border: 1px solid #d8dfe8;
  background: #fff;
}

.history-sidebar {
  background: #eaf1fa;
  border-right: 1px solid #cbd5e1;
}

.history-sidebar h2 {
  margin: 0;
  padding: 16px 20px;
  color: #fff;
  font-size: 1.9rem;
  background: #06457f;
}

.history-item {
  display: block;
  width: 100%;
  padding: 14px 18px;
  color: #333;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #d3dce7;
  cursor: pointer;
}

.history-item:hover,
.history-item:focus,
.history-item.active {
  background: #d6e4f5;
  box-shadow: inset 5px 0 0 #07549a;
}

.history-date,
.history-amendment {
  display: block;
}

.history-date {
  font-size: 1.6rem;
  font-weight: 600;
}

.history-amendment {
  margin-top: 5px;
  color: #667085;
  font-size: 1.4rem;
}

.current-badge {
  display: inline-block;
  margin-top: 5px;
  padding: 1px 7px;
  color: #fff;
  font-size: 1.3rem;
  background: #cf350d;
  border-radius: 3px;
}

.history-content {
  min-width: 0;
}

.history-panel {
  display: none;
}

.history-panel.active {
  display: block;
}

.history-heading {
  padding: 24px 30px 12px;
}

.history-heading h1 {
  margin: 0 0 12px;
  color: #06457f;
  font-size: 2.8rem;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  color: #555;
  font-size: 1.5rem;
}

.document-tabs {
  display: flex;
  gap: 0;
  padding: 0 30px;
  border-bottom: 3px solid #06457f;
}

.document-tab {
  padding: 12px 22px;
  color: #333;
  font-size: 1.6rem;
  background: #fff;
  border: 0;
  cursor: pointer;
}

.document-tab:hover,
.document-tab:focus,
.document-tab.active {
  color: #06457f;
  font-weight: 600;
  background: #eef4fb;
}

.document-actions {
  display: none;
  min-height: 50px;
  padding: 10px 20px;
  text-align: right;
  background: #eef4fb;
}

.download-button {
  display: none;
  padding: 7px 16px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  background: #06457f;
  border-radius: 4px;
}

.download-button:hover,
.download-button:focus {
  color: #fff;
  background: #043765;
}

.document-viewer {
  display: none;
  flex-direction: column;
  height: min(78vh, 900px);
  min-height: 620px;
  overflow: hidden;
  background: #323639;
}

.pdf-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
  color: #fff;
  background: #323639;
}

.pdf-toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pdf-toolbar-nav {
  flex: 1 1 auto;
}

.pdf-toolbar-tools {
  flex: 0 0 auto;
  margin-left: auto;
}

.pdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 36px;
  padding: 4px 12px;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  background: #4a4f55;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.pdf-btn-icon {
  display: none;
  font-size: 2.2rem;
  line-height: 1;
}

.pdf-btn:hover,
.pdf-btn:focus {
  color: #fff;
  background: #5f6368;
}

.pdf-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.pdf-page-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 6px;
  font-size: 1.4rem;
  white-space: nowrap;
}

.pdf-page-input {
  width: 48px;
  height: 32px;
  color: #fff;
  font-size: 1.4rem;
  text-align: center;
  background: #1f1f1f;
  border: 1px solid #5f6368;
  border-radius: 3px;
  -moz-appearance: textfield;
}

.pdf-page-input::-webkit-outer-spin-button,
.pdf-page-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.pdf-pages {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #525659;
}

.pdf-page-canvas {
  display: block;
  margin: 8px auto;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.document-viewer iframe {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 0;
}

.document-viewer.is-ready .pdf-toolbar,
.document-viewer.is-ready .pdf-pages {
  display: flex;
}

.document-viewer.is-ready .pdf-pages {
  display: block;
}

.document-viewer.is-ready iframe {
  display: none;
}

.document-empty,
.regulatory-empty {
  padding: 70px 30px;
  color: #777;
  text-align: center;
  background: #f7f8fa;
}

.document-empty {
  display: none;
  min-height: 520px;
  padding: 20px 24px;
  text-align: left;
  background: #eef4fb;
}

@media only screen and (max-width: 900px) {
  .regulatory-layout {
    display: block;
  }

  .history-sidebar {
    max-height: 310px;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid #cbd5e1;
  }

  .history-heading {
    padding: 20px 18px 12px;
  }

  .document-tabs {
    padding: 0 10px;
  }

  .document-tab {
    flex: 1;
    padding: 10px 8px;
  }

  .document-viewer {
    height: 75vh;
    min-height: 520px;
  }

  .pdf-toolbar {
    flex-wrap: wrap;
    padding: 8px;
  }

  .pdf-toolbar-nav,
  .pdf-toolbar-tools {
    flex: 1 1 100%;
    justify-content: center;
    margin-left: 0;
  }

  .pdf-toolbar-tools {
    padding-top: 2px;
  }

  .pdf-btn-text {
    display: none;
  }

  .pdf-btn-icon {
    display: block;
  }

  .pdf-prev,
  .pdf-next {
    min-width: 44px;
    padding: 0;
  }
}

@media only screen and (max-width: 520px) {
  .regulatory-toolbar {
    align-items: flex-start;
    gap: 12px;
  }

  .font-controls button {
    min-width: 36px;
  }

  .history-heading h1 {
    font-size: 2.3rem;
  }

  .history-meta {
    display: block;
  }

  .history-meta span {
    display: block;
    margin-bottom: 6px;
  }

  .document-viewer {
    height: 65vh;
    min-height: 430px;
  }
}
