:root {
  --app-content-max: 1052px;
  --app-ad-width: 226px;
  --app-shell-gap: 8px;
  --app-shell-max: 1536px;
  --app-header-height: 68px;
  --app-hero-height: 402px;
}

.app {
  min-height: 100vh;
}

.topbar {
  position: relative;
  z-index: 30;
  height: var(--app-header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #dbe6f8;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 5px 18px rgba(22, 57, 119, .07);
}

.top-inner {
  width: min(100%, var(--app-content-max));
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 9px;
}

.brand:focus-visible {
  outline: 3px solid rgba(23, 113, 255, .3);
  outline-offset: 4px;
}

.brand img {
  display: block;
  object-fit: contain;
}

.brand img.brand-shield {
  width: 39px;
  height: 47px;
  flex: 0 0 39px;
  filter: drop-shadow(0 3px 5px rgba(6, 74, 202, .13));
}

.brand img.brand-wordmark {
  width: 138px;
  height: auto;
}

.nav {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 13px;
  margin-left: auto;
}

.nav .nav-topic-link {
  --nav-accent: 37, 116, 255;
  position: relative;
  min-width: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  color: #09245d;
  border-radius: 0;
}

.nav .nav-topic-manipulations {
  --nav-accent: 221, 32, 48;
}

.nav .nav-topic-biases {
  --nav-accent: 0, 166, 179;
}

.nav .nav-topic-fallacies {
  --nav-accent: 237, 157, 18;
}

.nav a.nav-topic-link {
  transition: color .18s ease, background-color .18s ease;
}

.nav a.nav-topic-link:hover,
.nav a.nav-topic-link:focus-visible,
.nav a.nav-topic-link.active {
  color: rgb(var(--nav-accent));
  background: linear-gradient(180deg, rgba(var(--nav-accent), 0), rgba(var(--nav-accent), .055));
}

.nav a.nav-topic-link::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: rgb(var(--nav-accent));
  opacity: 0;
  transform: scaleX(.55);
  transition: opacity .18s ease, transform .18s ease;
}

.nav a.nav-topic-link:hover::after,
.nav a.nav-topic-link:focus-visible::after,
.nav a.nav-topic-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav a.nav-topic-link:focus-visible {
  outline: 3px solid rgba(var(--nav-accent), .2);
  outline-offset: -3px;
}

.nav-topic-pending {
  cursor: default;
}

.nav-orb {
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.nav-orb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 3px 5px rgba(var(--nav-accent), .2));
}

.nav-topic-label {
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.shell {
  display: grid;
  grid-template-columns: var(--app-ad-width) minmax(0, var(--app-content-max)) var(--app-ad-width);
  gap: var(--app-shell-gap);
  max-width: var(--app-shell-max);
  padding: 0 8px 8px;
  margin: 0 auto;
  min-width: 0;
}

.content {
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid #d4e3ff;
  box-shadow: var(--shadow);
}

.ad-column {
  position: relative;
  top: 0;
  min-height: 1008px;
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: start;
  overflow: hidden;
  text-align: center;
  border: 0;
  border-radius: 4px;
  background: #f6f9ff url("../assets/shared/ads/ad_background_tall.png") center / 100% 100% no-repeat;
}

.ad-column::before {
  content: none;
}

.ad-top {
  position: absolute;
  top: 94px;
  font-size: 13px;
  letter-spacing: .02em;
  color: #18345f;
}

.ad-copy {
  position: relative;
  z-index: 1;
}

.ad-copy h3 {
  margin: 0 0 6px;
  font-size: 24px;
  color: #082a61;
}

.ad-copy p {
  margin: 0;
  font-size: 20px;
  color: #0b2b5c;
}

.app[data-advertisements="off"] .ad-column {
  background: #fff;
}

.app[data-advertisements="off"] .ad-column > * {
  visibility: hidden;
}

@media (max-width: 900px) {
  :root {
    --app-hero-height: 484px;
  }

  .top-inner {
    gap: 12px;
    padding-inline: 18px;
  }

  .brand img.brand-shield {
    width: 35px;
    height: 43px;
    flex-basis: 35px;
  }

  .brand img.brand-wordmark {
    width: 120px;
  }

  .nav {
    gap: 2px;
  }

  .nav .nav-topic-link {
    min-width: 104px;
    gap: 6px;
    padding-inline: 7px;
  }

  .nav-orb {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .nav-topic-label {
    font-size: 12px;
  }
}

@media (max-width: 700px) {
  :root {
    --app-header-height: 64px;
    --app-hero-height: 620px;
  }

  body {
    overflow-x: hidden;
  }

  .top-inner {
    width: 100%;
    gap: 5px;
    padding: 0 9px;
  }

  .brand {
    gap: 0;
  }

  .brand img.brand-shield {
    width: 36px;
    height: 44px;
    flex-basis: 36px;
  }

  .brand img.brand-wordmark {
    display: none;
  }

  .nav {
    flex: 1;
    justify-content: flex-end;
    gap: 0;
  }

  .nav .nav-topic-link {
    min-width: 0;
    width: 76px;
    flex-direction: column;
    gap: 2px;
    padding: 3px 2px 2px;
  }

  .nav-orb {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
  }

  .nav-topic-label {
    font-size: 9px;
    letter-spacing: 0;
  }

  .shell {
    width: 100vw;
    max-width: 100vw;
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }

  .ad-column {
    display: none;
  }

  .content {
    width: 100vw;
    max-width: 100vw;
    border-left: 0;
    border-right: 0;
  }
}

@media (min-width: 701px) and (max-width: 1300px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: var(--app-content-max);
    padding-inline: 0;
  }

  .ad-column {
    display: none;
  }
}

@media (max-width: 390px) {
  .nav .nav-topic-link {
    width: 70px;
  }

  .nav-topic-label {
    font-size: 8px;
  }
}
