*, *::before, *::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html, body {
  height: 100%;
}
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: 'bbcreithsansrg1', system-ui;
  font-size: 18px;
  background: #F6F6F6;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
input, button, textarea, select {
  font: inherit;
}
input {
  opacity: 0;
  width: 0;
  height: 0;
  display: none;
}
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}
h1, h2, h3,  p[data-id] {
  font-family: 'bbcreithsansXbd', system-ui;
  font-weight: 800;
}
h1 {
  font-size: 44px;
  line-height: 48px;
}
h2 {
  font-size: 34px;  
  margin-bottom: 10px;    
}
h3 {
  font-size: 24px;
}
h4 {
  font-family: 'bbcreithsansXbd', system-ui;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  margin-top: 30px;
  border-bottom: solid 1px #C9C9C9;
  margin-bottom: 6px;
}
#root, #__next {
  isolation: isolate;
}
@font-face {
  font-family: 'bbcreithsansXbd';
  src: url('https://static.files.bbci.co.uk/fonts/reith/2.512/BBCReithSans_W_ExBd.woff2') format('woff2');
}
@font-face {
  font-family: 'bbcreithsansabd';
  src: url('https://static.files.bbci.co.uk/fonts/reith/2.512/BBCReithSans_W_Bd.woff2') format('woff2');
}
@font-face {
  font-family: 'bbcreithsansrg1';
  src: url('https://static.files.bbci.co.uk/fonts/reith/2.512/BBCReithSans_W_Rg.woff2') format('woff2');
  font-weight: normal;
}

#following, .interests-wrap {
  padding: 5px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
}

.interest-group .interests-wrap {
  padding: 0;
  gap: 0;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.interest-group .interest-wrap {
  padding: 5px;
  background-color: #0078FF;
  grid-row: 2;
}

.interests-wrap .interest-wrap.first {
  border-bottom-left-radius: 4px;
}

.interests-wrap .interest-wrap.last {
  border-bottom-right-radius: 4px;
}

.interest-group .interests-wrap h4 {
  grid-row: 1;
  background-color: #0078FF;

  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  padding: 4px 4px 0;

  text-align: center;
  border-radius: 4px 4px 0 0;
}

/* category buttons */
.interest {
  border: none;
  border-radius: 3px;
  width: 100%;
  height: 100px;
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  color: #fff;
  background-color: #000;
  background-size: cover;
  background-position: center;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  position: relative;
  animation: flash 1s;
}

.interest div {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  height: 100%;
}
.interest div p {
  line-height: 1.5;
  vertical-align: middle;
  margin: 0 5px;
}

.interest div p.follow {
  font-size: 12px;
}

.interest div p.follow:before {
  content: "";
  background-image: url(https://image.e.bbcmail.co.uk/lib/fe9013727761077872/m/60/plus-lg.png);
  background-size: contain;
  width: 11px;
  height: 10px;
  vertical-align: middle;
  margin-right: 4px;
  display: inline-block;
}

.checked div p.follow:before {
  content: "";
  background-image: url(https://image.e.bbcmail.co.uk/lib/fe9013727761077872/m/60/tick-lg.png);
  background-size: contain;
}

#close-expand {
  display: none;
  margin-left: auto;
  border: 0;
  background-color: transparent;
  padding-top: 10px;

  font-size: 14px;
  font-weight: bold;
}

#close-expand:after {
  content: "";
  background-image: url(https://image.e.bbcmail.co.uk/lib/fe9013727761077872/m/60/show-less.png);
  background-size: contain;
  vertical-align: middle;
  width: 11px;
  height: 11px;
  margin-left: 4px;
  display: inline-block;
}

.wrapper {
  width: 100%;
  max-width: 1070px;
  margin: 0 auto;
  padding: 34px 20px 20px;
}
header {
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #CDCDCD;
}
header div {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}
.page {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 60px;
}
.page > :first-child {
  flex-basis: 280px;
  flex-grow: 1;
}
.page > :last-child {
  flex-basis: 0;
  flex-grow: 999;
  min-inline-size: 60%;
}
.emailsforyou {
  padding: 12px 0;
}
h1 + p {
  margin-top: 10px;
}
.updated {
  display: flex;
  flex-wrap: wrap;
  background-color: #fff;
  box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  padding: 8px 20px 20px;
  margin-bottom: 12px;
  font-weight: 700;
}
.updated div {
  flex-basis: 300px;
  flex-grow: 1;
  align-items: flex-end;
}
.keeping {
  padding-top: 12px;
}
.description {
    font-weight: 400;
    font-size: 16px;
    margin-right: 20px;
}
.freq {
    font-size: 13px;
}
.icon {
  display: inline-block;
  margin-right: 10px;
  vertical-align: baseline;
}
.preference .icon {
  vertical-align: bottom
}
.preference {
  display: flex;
  border-bottom: 1px solid #C5C5C5;
  padding: 12px;
}
.preference:last-of-type, .preference.last {
  border-bottom: none;
}
.preference > :last-child {
  flex: 1;
}
.icon + p, .icon + h3 {
  display: inline-block;
}
.interests {
  background-color: #fff;
  box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  padding: 20px;
  margin: 10px 0 30px;
}
.hide {
  display:none !important;
}
/* slider toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 45px;
  height: 25px;
  vertical-align: middle;
}
.news .switch {
    margin-bottom: 10px;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  left: 0;
  background-color: #fff;
  border: 1px solid #DCDCDC;
  transition: .4s;
  border-radius: 34px;
  width: 100%;
  height: 100%;
}
.slider:before {
  position: absolute;
  content: "";
  height: 19px;
  width: 19px;
  left: 2px;
  bottom: 2px;
  background-color: #ebebeb;
  border: solid 1px #D0D0D0;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #2196F3;
  border-color: #2196F3;
}
input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #fff;
}
.linkbutton {
  display: inline-block;
  border: solid 1px #000;
  padding: 10px 18px;
  text-decoration: none;
  color: #000;
  font-weight: 700;
 font-size: 18px;
 text-align: center;
}
.messagewrap {
  display: flex;
  align-items: center;
  background-color: #0078FF;
  color: #fff;
  box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  padding: 20px 20px;
  margin-bottom: 10px;
  animation: fadeInDown 0.5s;
  animation-timing-function: ease-out;
}
.messagewrap .imgwrap {
  padding-right: 20px;
  flex-shrink: 0;
}

.interest-list {
  margin-top: 30px;
}

summary {
  display: none;
  background-color: #0078FF;
  color: #fff;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  padding: 12px 20px;
  margin: 0 auto;
  max-width: 400px;
}

summary img {
  display: inline-block;
  vertical-align: middle;
}

summary p {
  display: inline-block;
  vertical-align: middle;
  margin: 0;
  padding-left: 10px;
}

details[open] summary {
  display: none;
}

details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}

.expand {
    height: 0;
    opacity: 0;
    pointer-events: none;
}

#show:checked ~* .expand {
     height: auto;
    opacity: 1;
    pointer-events: auto;
}

#show:checked ~* .preference.last {
    border-bottom: 1px solid #C5C5C5;
}

#show:checked ~* .more {
    display: none;
}

@media screen and (max-width: 700px) {
 h1 {font-size: 38px; line-height: normal;}
 h2 {font-size: 28px; line-height: normal; margin-left: 10px; margin-right: 10px;}    
 h3 {font-size:20px;}
 p {font-size: 16px;}
 .nomob {display: none;}
  .wrapper {
    padding: 10px;
  }
  .logo {
    margin: 0 auto;
  }
  .updated {
    padding: 3px 15px 15px;
  }
  .interests {
    padding: 15px;
  }
  .text {
    padding-left: 10px;
    padding-right: 10px;
  }
  .manage {
    font-size: 28px; 
  }    
  #close-expand {
    display: block;
  }
  .expand-wrap {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
  }
  summary {
    display: block;
  }

}

@keyframes fadeInDown {
  from {
    opacity: 0;
    -webkit-transform: translate3d(0, -10%, 0);
    transform: translate3d(0, -10%, 0);
  }

  to {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-color-scheme: dark ) {
    body, header {background: #101010;}
    .logo, .interests img, .dm-invert {filter: brightness(0) invert(1);}
    * {color: #fff;}
    .updated, .interests {background: #101010; border: 1px solid #6d6d6d;}
    .linkbutton {border-color: #fff; color: #fff;}
    .slider {background-color: #ebebeb;}
    .slider:before {background-color: #f4f4f4; border: solid 1px #6d6d6d;}
}