/* Kaliber compact sizing overrides. Loaded after caliber.css to keep the interface dense and readable. */
body.caliber-theme main {
  position: relative;
  z-index: auto !important;
  padding-top: 0 !important;
}

body.caliber-theme #challenge-window.modal {
  z-index: 1060 !important;
}

body.caliber-theme .modal-backdrop {
  z-index: 1040 !important;
}

body.caliber-theme main > .container::before {
  top: -0.75rem;
  width: 72px;
  height: 2px;
}

body.caliber-theme .caliber-navbar.navbar {
  min-height: 60px;
  padding: 0.38rem 0;
}

body.caliber-theme .navbar-brand {
  min-height: 36px;
  padding: 0.1rem 0.75rem 0.1rem 0;
  font-size: 1rem !important;
}

body.caliber-theme .navbar-brand .ctf_logo,
body.caliber-theme .navbar-brand .brand-emblem {
  height: 32px;
  max-height: 32px;
}

body.caliber-theme .navbar-brand::after {
  width: 22px;
  margin-left: 0.55rem;
}

body.caliber-theme .navbar-dark .navbar-nav .nav-link {
  min-height: 32px;
  padding: 0.38rem 0.5rem !important;
  font-size: 0.86rem;
  line-height: 1.18;
}

body.caliber-theme .navbar-dark .navbar-nav .nav-link i {
  font-size: 0.86rem;
}

body.caliber-theme .jumbotron {
  margin-bottom: 1.15rem;
  padding: 2rem 0 1.6rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}

body.caliber-theme .jumbotron::before {
  width: 5px;
}

body.caliber-theme .jumbotron::after {
  right: 8vw;
  width: 150px;
  height: 150px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(224, 32, 22, 0.16) 49% 51%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(224, 32, 22, 0.12) 49% 51%, transparent 51%),
    url("../img/logo.png") center / 96px auto no-repeat;
  opacity: 0.22;
}

body.caliber-theme .jumbotron h1 {
  padding-left: 0.85rem;
  font-size: 2rem;
  line-height: 1.08;
}

body.caliber-theme .jumbotron h1::before {
  margin-bottom: 0.38rem;
  font-size: 0.68rem;
}

body.caliber-theme .jumbotron h1::after {
  bottom: -0.52rem;
  width: 118px;
}

body.caliber-theme #score-graph,
body.caliber-theme #solves-graph,
body.caliber-theme #keys-pie-graph,
body.caliber-theme #categories-pie-graph {
  max-width: 980px;
  min-height: 198px;
  margin-right: auto;
  margin-bottom: 1rem;
  margin-left: auto;
  padding: 0.85rem;
}

body.caliber-theme .empty-state {
  min-height: 190px;
  padding: 1.55rem 1.2rem;
}

body.caliber-theme .empty-state i {
  font-size: 1.55rem;
}

body.caliber-theme .empty-state h2,
body.caliber-theme .empty-state h3 {
  font-size: 1.22rem;
}

body.caliber-theme .challenges-row {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.82rem;
}

body.caliber-theme .challenge-button {
  min-height: 124px;
  padding: 0.9rem 0.85rem !important;
}

body.caliber-theme .challenge-button p {
  min-height: 2.35rem;
  font-size: 0.9rem;
}

body.caliber-theme .challenge-button span {
  min-height: 26px;
  font-size: 0.88rem;
}

body.caliber-theme .challenge-button::before {
  top: 0.72rem;
  right: 0.72rem;
  width: 26px;
  height: 26px;
}

body.caliber-theme #challenge-window .modal-content {
  padding: 0.8rem;
}

body.caliber-theme .challenge-name {
  font-size: 1.42rem !important;
}

body.caliber-theme .challenge-desc,
body.caliber-theme .chal-desc {
  padding: 0.85rem 0.95rem;
  line-height: 1.58;
}

body.caliber-theme .form-control,
body.caliber-theme input,
body.caliber-theme textarea,
body.caliber-theme select,
body.caliber-theme .custom-select {
  min-height: 40px;
}

body.caliber-theme .btn,
body.caliber-theme .challenge-submit,
body.caliber-theme .btn-info,
body.caliber-theme .btn-light,
body.caliber-theme .btn-secondary {
  min-height: 38px;
  padding-top: 0.42rem;
  padding-bottom: 0.42rem;
}

body.caliber-theme .table td,
body.caliber-theme .table th {
  padding: 0.58rem 0.75rem;
}

body.caliber-theme .footer {
  min-height: 54px;
  padding: 0.62rem 0;
}

body.caliber-theme .footer small {
  font-size: 0.74rem;
}

@media (max-width: 991.98px) {
  body.caliber-theme .jumbotron h1 {
    font-size: 1.7rem;
  }

  body.caliber-theme .challenges-row {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 767.98px) {
  body.caliber-theme main {
    padding-top: 0 !important;
  }

  body.caliber-theme .caliber-navbar.navbar {
    min-height: 56px;
  }

  body.caliber-theme .jumbotron {
    padding: 1.65rem 0 1.35rem;
  }

  body.caliber-theme .jumbotron h1 {
    font-size: 1.48rem;
  }

  body.caliber-theme #score-graph,
  body.caliber-theme #solves-graph,
  body.caliber-theme #keys-pie-graph,
  body.caliber-theme #categories-pie-graph,
  body.caliber-theme .empty-state {
    min-height: 170px;
  }
}

/* Remove page-header red line ornaments and the header eyebrow label. */
body.caliber-theme .caliber-navbar.navbar {
  background: rgba(5, 5, 5, 0.94) !important;
  border-bottom: 1px solid rgba(244, 241, 230, 0.08) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38) !important;
}

body.caliber-theme .caliber-navbar.navbar::before,
body.caliber-theme .navbar-brand::after,
body.caliber-theme main > .container::before,
body.caliber-theme .jumbotron::before,
body.caliber-theme .jumbotron::after,
body.caliber-theme .jumbotron h1::before,
body.caliber-theme .jumbotron h1::after {
  content: "" !important;
  display: none !important;
}

body.caliber-theme .jumbotron {
  background:
    linear-gradient(180deg, rgba(21, 21, 24, 0.92), rgba(5, 5, 5, 0.82)) !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(244, 241, 230, 0.08) !important;
  clip-path: none !important;
  box-shadow: none !important;
}

body.caliber-theme .jumbotron h1 {
  padding-left: 0 !important;
}

/* Challenge card and users table readability polish. */
body.caliber-theme .solved-challenge::after {
  content: "SOLVED" !important;
  position: absolute !important;
  right: 1.05rem !important;
  bottom: 0.95rem !important;
  z-index: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: 25px !important;
  min-width: 78px !important;
  padding: 0 0.72rem !important;
  color: #03150f !important;
  background:
    linear-gradient(180deg, rgba(64, 239, 163, 0.98), rgba(23, 199, 125, 0.96)) !important;
  border: 1px solid rgba(209, 255, 232, 0.48) !important;
  border-radius: 999px !important;
  font-family: var(--font-body) !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  line-height: 25px !important;
  letter-spacing: 0.01em !important;
  text-shadow: none !important;
  box-shadow:
    0 0 0 1px rgba(1, 22, 15, 0.4),
    0 10px 22px rgba(12, 168, 103, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

body.caliber-theme .solved-challenge .corner-button-check {
  top: 0.68rem !important;
  right: 0.68rem !important;
  z-index: 3 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  color: #35e99f !important;
  font-size: 1rem !important;
  line-height: 1 !important;
  text-align: center !important;
  text-shadow: 0 0 14px rgba(53, 233, 159, 0.44) !important;
  transform: none !important;
}

body.caliber-theme .solved-challenge .corner-button-check::before {
  display: block !important;
  width: 1em !important;
  height: 1em !important;
  line-height: 1 !important;
  transform: translateY(1px) !important;
}

body.caliber-theme .solved-challenge.challenge-button::before {
  top: 0.68rem !important;
  right: 0.68rem !important;
  width: 30px !important;
  height: 30px !important;
  border-top-color: rgba(53, 233, 159, 0.72) !important;
  border-right-color: rgba(53, 233, 159, 0.72) !important;
  opacity: 0.72 !important;
}

body.caliber-theme .table {
  font-family: var(--font-body) !important;
  font-size: 0.95rem;
  line-height: 1.38;
}

body.caliber-theme .table thead td,
body.caliber-theme .table thead th {
  font-family: var(--font-body) !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

body.caliber-theme .table tbody td,
body.caliber-theme .table tbody th,
body.caliber-theme .table tbody a,
body.caliber-theme .table tbody span {
  font-family: var(--font-body) !important;
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: 0 !important;
}

body.caliber-theme .table tbody a {
  font-weight: 700;
}

body.caliber-theme .scoreboard-jumbotron h1 {
  font-family: var(--font-body) !important;
  font-size: 2.25rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.1 !important;
  text-transform: uppercase;
}

body.caliber-theme #score-graph,
body.caliber-theme #scoreboard,
body.caliber-theme #scoreboard .table,
body.caliber-theme #scoreboard .table td,
body.caliber-theme #scoreboard .table th,
body.caliber-theme #scoreboard .table a {
  font-family: var(--font-body) !important;
  letter-spacing: 0 !important;
}

body.caliber-theme #scoreboard .table thead td,
body.caliber-theme #scoreboard .table thead th {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
}

body.caliber-theme #scoreboard .table tbody td,
body.caliber-theme #scoreboard .table tbody th,
body.caliber-theme #scoreboard .table tbody a {
  font-size: 0.98rem !important;
  font-weight: 600 !important;
}

body.caliber-theme .table tbody tr:nth-child(1),
body.caliber-theme .table tbody tr:nth-child(2),
body.caliber-theme .table tbody tr:nth-child(3) {
  box-shadow: none !important;
}

/* Compact the default home splash for 1080p laptop screens. */
body.caliber-theme main > .container > .row > .col-md-6.offset-md-3 > img.w-100.mx-auto.d-block[src*="/themes/kaliber/static/img/logo.png"] {
  width: min(54vw, 320px) !important;
  max-width: 320px !important;
  padding: clamp(18px, 2.2vh, 28px) !important;
  padding-top: clamp(58px, 8vh, 88px) !important;
}

body.caliber-theme main > .container > .row > .col-md-6.offset-md-3 > img.w-100.mx-auto.d-block[src*="/themes/kaliber/static/img/logo.png"] + h3 {
  margin-bottom: 0.35rem !important;
  font-size: clamp(1.2rem, 1.45vw, 1.55rem) !important;
  line-height: 1.18 !important;
}

body.caliber-theme main > .container > .row > .col-md-6.offset-md-3 > img.w-100.mx-auto.d-block[src*="/themes/kaliber/static/img/logo.png"] + h3 p {
  margin-bottom: 0.55rem !important;
}

body.caliber-theme main > .container > .row > .col-md-6.offset-md-3 > img.w-100.mx-auto.d-block[src*="/themes/kaliber/static/img/logo.png"] + h3 .fa-2x {
  font-size: 1.45em !important;
}

body.caliber-theme main > .container > .row > .col-md-6.offset-md-3 > img.w-100.mx-auto.d-block[src*="/themes/kaliber/static/img/logo.png"] + h3 + br {
  display: none !important;
}

body.caliber-theme main > .container > .row > .col-md-6.offset-md-3 > img.w-100.mx-auto.d-block[src*="/themes/kaliber/static/img/logo.png"] + h3 + br + h4 {
  margin-top: 1.15rem !important;
  font-size: clamp(1rem, 1.25vw, 1.28rem) !important;
  line-height: 1.22 !important;
}

@media (max-height: 760px) and (min-width: 768px) {
  body.caliber-theme main > .container > .row > .col-md-6.offset-md-3 > img.w-100.mx-auto.d-block[src*="/themes/kaliber/static/img/logo.png"] {
    width: min(48vw, 280px) !important;
    max-width: 280px !important;
    padding-top: 44px !important;
  }
}
