:root {
  --portal-blue: #1d70b8;
  --portal-blue-dark: #003078;
  --portal-blue-light: #5694ca;
}

.portal-home-hero {
  background: var(--portal-blue);
  color: #fff;
  padding: 10px 0 30px;
}

.portal-home-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.portal-home-hero__logo {
  color: #fff;
  display: inline-block;
  line-height: 0;
}

.portal-home-hero__utils {
  display: flex;
  align-items: center;
  gap: 20px;
}

.portal-home-hero__menu {
  appearance: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 19px;
  padding: 0;
}

.portal-home-hero__chevron {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #fff;
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}

.portal-home-hero__search-icon {
  color: #fff;
  line-height: 0;
}

.portal-home-hero__title {
  color: #fff;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.09;
  margin: 30px 0 20px;
  max-width: 18em;
}

.portal-home-search__label {
  color: #fff;
  display: block;
  font-size: 19px;
  margin-bottom: 5px;
}

.portal-home-search__wrap {
  display: flex;
  max-width: 640px;
}

.portal-home-search__input {
  border: 2px solid var(--portal-blue-dark);
  flex: 1;
  font-size: 19px;
  margin: 0;
  min-height: 50px;
  padding: 5px 10px;
}

.portal-home-search__input:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
}

.portal-home-search__button {
  appearance: none;
  background: var(--portal-blue-light);
  border: 2px solid var(--portal-blue-dark);
  border-left: 0;
  box-sizing: border-box;
  color: var(--portal-blue-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  min-width: 50px;
  padding: 0;
}

.portal-home-search__button:hover {
  background: #7fb0dc;
}

.portal-home-search__button:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
}

.portal-blue-rule {
  background: var(--portal-blue);
  border: 0;
  height: 5px;
  margin: 0;
  width: 100%;
}

.portal-blue-rule--thick {
  height: 10px;
}

.portal-popular {
  padding: 30px 0 40px;
}

.portal-popular__grid {
  display: grid;
  gap: 10px 40px;
  grid-template-columns: 1fr 1fr;
}

.portal-popular__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-popular__list li {
  margin-bottom: 12px;
}

.portal-popular-link {
  align-items: flex-start;
  color: var(--portal-blue);
  display: flex;
  font-size: 19px;
  font-weight: 700;
  gap: 12px;
  text-decoration: underline;
}

.portal-popular-link:hover {
  color: var(--portal-blue-dark);
}

.portal-popular-link__arrow {
  background: #f3f2f1;
  border-radius: 50%;
  flex-shrink: 0;
  height: 28px;
  margin-top: 2px;
  position: relative;
  width: 28px;
}

.portal-popular-link__arrow::after {
  border: solid var(--portal-blue);
  border-width: 0 2px 2px 0;
  content: "";
  display: block;
  height: 8px;
  left: 9px;
  position: absolute;
  top: 8px;
  transform: rotate(-45deg);
  width: 8px;
}

.portal-home-grid {
  padding-bottom: 40px;
}

.portal-topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-topic-list__item {
  border-top: 1px solid #b1b4b6;
  padding: 15px 30px 15px 0;
  position: relative;
}

.portal-topic-list__item:last-child {
  border-bottom: 1px solid #b1b4b6;
}

.portal-topic-list__item::after {
  border: solid var(--portal-blue);
  border-width: 0 2px 2px 0;
  content: "";
  height: 10px;
  position: absolute;
  right: 5px;
  top: 22px;
  transform: rotate(-45deg);
  width: 10px;
}

.portal-topic-list__link {
  font-size: 19px;
  font-weight: 700;
}

.portal-topic-list__description {
  margin-bottom: 0;
  margin-top: 5px;
}

.portal-featured__item {
  color: inherit;
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  text-decoration: none;
}

.portal-featured__item:hover .portal-featured__title {
  color: var(--portal-blue-dark);
  text-decoration-thickness: max(3px, 0.1875rem, 0.12em);
}

.portal-featured__icon {
  flex-shrink: 0;
  height: 48px;
  width: 48px;
}

.portal-featured__icon--pink {
  background: #f4c2c2;
}

.portal-featured__icon--purple {
  background: #d5c3e5;
}

.portal-featured__icon--teal {
  background: #bfe3e0;
}

.portal-featured__text {
  display: flex;
  flex-direction: column;
}

.portal-featured__title {
  color: var(--portal-blue);
  font-size: 19px;
  font-weight: 700;
  text-decoration: underline;
}

.portal-feedback {
  background: #f3f2f1;
  border-top: 1px solid #b1b4b6;
  padding: 20px 0;
}

.portal-feedback__inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 15px 20px;
}

.portal-feedback__buttons {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-feedback__button {
  appearance: none;
  background: #fff;
  border: 1px solid #0b0c0c;
  box-shadow: 0 2px 0 #0b0c0c;
  cursor: pointer;
  font: inherit;
  font-size: 19px;
  min-width: 64px;
  padding: 5px 15px;
}

.portal-feedback__button:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
}

.portal-feedback__report {
  margin-left: auto;
}

.portal-guide-header .govuk-header__container {
  border-bottom: 10px solid #fff;
}

.portal-guide-header + .govuk-width-container {
  padding-top: 10px;
}

.portal-guide-layout .portal-contents-list {
  border-top: 1px solid #b1b4b6;
  margin-top: 20px;
  padding-top: 12px;
}

@media (min-width: 641px) {
  .portal-guide-layout .govuk-grid-column-one-third {
    padding-top: 20px;
  }
}

.portal-contents-list {
  margin-top: 15px;
}

.portal-contents-list ol {
  padding-left: 20px;
}

.portal-contents-list li {
  margin-bottom: 5px;
}

@media (max-width: 640px) {
  .portal-home-hero__title {
    font-size: 32px;
  }

  .portal-home-hero__utils {
    gap: 12px;
  }

  .portal-popular__grid {
    grid-template-columns: 1fr;
  }

  .portal-guide-layout .govuk-grid-column-one-third {
    order: -1;
  }

  .portal-guide-layout .govuk-grid-column-two-thirds {
    order: 1;
  }

  .portal-feedback__report {
    margin-left: 0;
    width: 100%;
  }
}
