*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: Fira Sans, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
  font-size: 1rem;
  font-weight: 300;
  margin: 0;
  line-height: 1.4;
  background-color: #deeaf0;
}

.container {
  width: min(100% - 2rem, 1140px);
  margin-inline: auto;
}

:root {
  --content-gutter: 15px;
  --insights-feature-width: 56.875rem;
  --country-summary-column-width: 7rem;
}

a:link {
  color: #447799;
}

p {
  margin: 0.5rem 0;
}

.small {
    font-size: 0.9rem;
}

/* Header */

.upper-title-bar {
  height: 26px;
  background-color: #e9f4f9;
}

.upper-title-bar-inner {
  display: flex;
  justify-content: flex-end;
  height: 100%;
  padding-inline: 1rem;
  font-size: 0.9rem;
  align-items: center;
}

.upper-title-bar-inner a {
  font-weight: 400;
}

.lower-title-bar {
  height: 105px;
  background-color: #ffffff;
}

.lower-title-bar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 5rem;
  padding: 1rem var(--content-gutter);
}

.lower-title-bar-inner a {
  text-decoration: none;
}

.site-logo-link {
  flex: 0 0 auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 901px) {
  .header-nav {
    align-self: stretch;
  }

  .header-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: #447799;
    font-weight: 200;
    text-align: center;
  }
}

.site-nav-toggle-input,
.site-nav-toggle {
  display: none;
}

.site-logo {
  height: 75px;
  width: auto;
  display: block;
  flex: 0 0 auto;
  background-color: #ffffff;
}

/* Introduction Section */

#introduction {
  background-color: #447799;
  padding: 15px;
}

#introduction-inner {
  color: #f2f5ff;
  padding: 15px 15px 20px;
}

#introduction h1 {
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 20px 0;
  font-family: "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
}

#introduction h2 {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 10px 0;
  font-family: Geneva, Verdana, sans-serif;
}

#introduction a {
    color: #f2f5ff;
    text-decoration: underline;
}

.content {
  padding: 30px 15px;
}

h2 {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 400;
  font-family: "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
}

h3 {
  font-size: 1.4rem;
  margin: 0.6rem 0;
  font-family: "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
}

h4 {
  font-size: 1.1rem;
  margin: 0.35rem 0;
}

a {
  overflow-wrap: anywhere;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 1rem;
}

th,
td {
  border: 1px solid #ccc;
  background-color: #ffffff;
  padding: 0.4rem 0.8rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  background: #f0f0f0;
}

button {
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
}

.sort-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: bold;
  text-align: inherit;
}

.sort-button::after {
  content: " \2195";
  color: #555;
  font-size: 0.85rem;
}

.sort-button[aria-sort="ascending"]::after {
  content: " \2191";
}

.sort-button[aria-sort="descending"]::after {
  content: " \2193";
}

.meta {
  color: #555;
  font-size: 0.9rem;
}

.success {
  color: #006600;
  background: #e6ffe6;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.error {
  color: #a30000;
  background: #ffe6e6;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.warning {
  color: #6f4c00;
  background: #fff3cd;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.cache-list {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
}

.cache-list ul {
  margin: 0.2rem 0 0.6rem;
  padding-left: 1.4rem;
}

.cache-list li {
  margin: 0.15rem 0;
}

.section-heading {
  margin-top: 1.2rem;
}

.compact-table {
  width: auto;
  max-width: 100%;
  margin-top: 0.5rem;
}

.totals-table th:first-child,
.totals-table td:first-child {
  min-width: 20rem;
  white-space: nowrap;
}

.right {
  text-align: right;
}

.center {
  text-align: center;
}

.entity-header {
  padding: 0.65rem 0.8rem;
}

.entity-title h3,
.entity-title h4 {
  margin: 0;
}

.entity-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-top: 0.35rem;
  font-weight: normal;
  font-size: 0.95rem;
}

.entity-meta-item {
  min-width: 0;
}

.entity-link-row td {
  border-top: 0;
}

.accordion {
  margin-top: 0.5rem;
}

.accordion summary {
  cursor: pointer;
}

.map-panel {
  width: min(100%, var(--insights-feature-width));
  height: 460px;
  margin-top: 0.5rem;
  border: 1px solid #ccc;
  overflow: hidden;
}

.line-chart-panel {
  width: 100%;
  max-width: 70rem;
  height: 420px;
  margin-top: 0.5rem;
  border: 1px solid #ccc;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll > table {
  max-width: none;
}

.sortable-table,
.insights-table,
.recent-activity {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sortable-table thead,
.sortable-table tbody,
.insights-table thead,
.insights-table tbody,
.recent-activity thead,
.recent-activity tbody {
  white-space: nowrap;
}

.insights-table {
  table-layout: fixed;
  width: auto;
  min-width: 66rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.insights-table-all-time {
  min-width: var(--insights-feature-width);
}

.insights-table th:nth-child(1),
.insights-table td:nth-child(1) {
  width: 28rem;
  min-width: 28rem;
  white-space: normal;
}

.insights-table-all-time th:nth-child(1),
.insights-table-all-time td:nth-child(1) {
  width: 37.875rem;
  min-width: 37.875rem;
}

.insights-table th:nth-child(2),
.insights-table td:nth-child(2),
.insights-table th:nth-child(3),
.insights-table td:nth-child(3),
.insights-table th:nth-child(4),
.insights-table td:nth-child(4),
.insights-table th:nth-child(5),
.insights-table td:nth-child(5) {
  width: 9.5rem;
  min-width: 9.5rem;
}

.country-summary {
  display: table;
  width: auto;
  max-width: 100%;
  table-layout: fixed;
  overflow-x: visible;
}

.country-summary th,
.country-summary td {
  width: var(--country-summary-column-width);
}

.country-summary thead,
.country-summary tbody {
  white-space: normal;
}

@media (min-width: 960px) {
  .recent-activity,
  .insights-table-all-time {
    display: table;
    width: min(100%, var(--insights-feature-width));
    overflow-x: visible;
  }
}

.item-stats {
  width: 100%;
  min-width: 65rem;
  table-layout: fixed;
}

.item-stats.sortable-table {
  display: table;
  overflow-x: visible;
}

.item-stats thead,
.item-stats tbody {
  white-space: normal;
}

.item-stats th:nth-child(1),
.item-stats td:nth-child(1) {
  width: calc(100% - 50rem);
  min-width: 15rem;
  font-size: 0.9rem;
  white-space: normal;
  line-height: 1.25;
}

.item-stats th:nth-child(2),
.item-stats td:nth-child(2),
.item-stats th:nth-child(3),
.item-stats td:nth-child(3),
.item-stats th:nth-child(4),
.item-stats td:nth-child(4),
.item-stats th:nth-child(5),
.item-stats td:nth-child(5),
.item-stats th:nth-child(6),
.item-stats td:nth-child(6) {
  width: 4.5rem;
  min-width: 4.5rem;
  text-align: center;
  font-size: 0.9rem;
  white-space: nowrap;
}

.item-stats td:nth-child(7),
.item-stats td:nth-child(8),
.item-stats td:nth-child(9) {
  white-space: normal;
  line-height: 1.1;
  font-size: 0.6rem;
}

.item-stats th:nth-child(7),
.item-stats td:nth-child(7),
.item-stats th:nth-child(8),
.item-stats td:nth-child(8) {
  width: 8.25rem;
  min-width: 8.25rem;
}

.item-stats th:nth-child(9),
.item-stats td:nth-child(9) {
  width: 11rem;
  min-width: 11rem;
}

.item-stats th:nth-child(7),
.item-stats th:nth-child(8),
.item-stats th:nth-child(9) {
  font-size: 0.9rem;
}

.embedded-stats {
  width: 100%;
  margin-top: 0;
  font-size: 0.7rem;
  line-height: 1.1;
  table-layout: fixed;
}

.item-stats .embedded-stats td {
  border: 0;
  padding: 0.05rem 0.2rem 0.05rem 0;
  font-size: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
}

.item-stats .embedded-stats td:first-child {
  width: 70%;
}

.item-stats .embedded-stats td:last-child {
  width: 30%;
  text-align: right;
}

.country-summary th,
.country-summary td,
.recent-activity th,
.recent-activity td {
  text-align: center;
}

.recent-activity th:first-child,
.recent-activity td:first-child {
  text-align: left;
}

/* Footer */

.site-footer {
  margin-top: 2rem;
  background-color: #333333;
  color: white;
}

.site-footer-inner {
  padding: 20px 0;
  font-size: 0.9rem;
  text-align: center;
}

.site-footer-inner a {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer a {
  color: #ffffff;
}

.site-footer .small {
  font-size: 0.9rem;
}

/* Small screens */

@media (max-width: 900px) {
  .container {
    width: min(100% - 2rem, 960px);
  }

  #introduction {
    padding: 15px 0;
  }

  #introduction-inner {
    padding: 0 var(--content-gutter) 20px;
  }

  .lower-title-bar {
    height: 66px;
  }

  .lower-title-bar-inner {
    position: relative;
    min-height: 66px;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.5rem;
  }

  .site-logo {
    height: 50px;
    width: auto;
    max-width: calc(100vw - 72px);
  }

  .site-nav-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    cursor: pointer;
  }

  .site-nav-toggle span,
  .site-nav-toggle::before,
  .site-nav-toggle::after {
    width: 26px;
    height: 2px;
    background-color: #000000;
    content: "";
    display: block;
  }

  .site-nav-toggle {
    flex-direction: column;
    gap: 6px;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0.5rem;
    z-index: 10;
    width: min(16rem, calc(100vw - 1rem));
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 1rem;
    background-color: #ffffff;
    box-shadow: 0 8px 20px rgb(0 0 0 / 15%);
  }


  .site-nav-toggle-input:checked ~ .header-nav {
    display: flex;
  }
}




@media (max-width: 600px) {
  .container {
    width: min(100% - 1rem, 960px);
  }

  body {
    font-size: 0.92rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.15rem;
  }

  h4 {
    font-size: 1rem;
  }

  th,
  td,
  button,
  .meta {
    font-size: 0.9rem;
  }

  .compact-table {
    width: 100%;
  }

  .insights-table th,
  .insights-table td {
    font-size: 0.9rem;
  }

  .item-stats.sortable-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .entity-header {
    padding: 0.55rem 0.65rem;
  }

  .entity-meta-row {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.88rem;
  }

  .entity-meta-item {
    display: block;
  }

  .entity-meta-item + .entity-meta-item {
    margin-top: 0.15rem;
  }

  .totals-table,
  .totals-table tbody,
  .totals-table tr,
  .totals-table th,
  .totals-table td {
    display: block;
    width: 100%;
  }

  .totals-table th:first-child,
  .totals-table td:first-child {
    min-width: 0;
    white-space: normal;
  }

  .totals-table tr {
    margin-bottom: 0.75rem;
    border: 1px solid #ccc;
  }

  .totals-table th,
  .totals-table td {
    border: 0;
    border-bottom: 1px solid #ddd;
    padding: 0.35rem 0.55rem;
  }

  .totals-table td:last-child {
    border-bottom: 0;
  }

  .map-panel {
    height: 320px;
  }

  .line-chart-panel {
    height: 300px;
  }
}
