/* FoT Topics — 5× 1:1 squares desktop, 2× 1:1 mobile. Scoped under Uncode. */
body.fot-home-app {
  --night: #0A0B1C;
  --card: #14162E;
  --mist: #C8C6D4;
  --ivory: #F4F1EA;
  --indigo: #3E3FE8;
  --first: #C4BEF2;
  background: var(--night);
  color: var(--ivory);
}

body.fot-home-app .fot-home-page,
body.fot-home-app .fot-home-page * {
  box-sizing: border-box;
}

body.fot-home-app .fot-home-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 0;
  font-family: Inter, "Liberation Sans", sans-serif;
  background: var(--night);
  color: var(--ivory);
}

body.fot-home-app .fot-home-page a {
  color: var(--ivory);
  text-decoration: none;
  box-shadow: none;
  background: none;
}
body.fot-home-app .fot-home-page a:hover,
body.fot-home-app .fot-home-page a:focus-visible {
  color: var(--first);
  background: transparent;
  background-image: none;
  text-decoration: none;
  transform: none;
  filter: none;
}

body.fot-home-app header a:hover,
body.fot-home-app header a:focus-visible,
body.fot-home-app .menu-container a:hover,
body.fot-home-app .menu-wrapper a:hover,
body.fot-home-app .overlay-menu a:hover,
body.fot-home-app .mobile-menu a:hover,
body.fot-home-app .navbar a:hover {
  color: #C4BEF2 !important;
  background-color: transparent !important;
  background-image: none !important;
  text-decoration: none !important;
  transform: none !important;
  filter: none !important;
  box-shadow: none;
}

body.fot-home-app .fot-home-page p {
  margin: 0;
  padding: 0;
}
body.fot-home-app .fot-home-page h1 {
  margin: 0;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
}

body.fot-home-app .fot-home-page > header,
body.fot-home-app .fot-home-page .wordmark,
body.fot-home-app .fot-home-page .brand,
body.fot-home-app .fot-home-page .close,
body.fot-home-app .fot-home-page footer.bar {
  display: none !important;
}

/* Mast: H1 + live count, no lede, sort dropdown. Playfair H1 only. */
body.fot-home-app .fot-home-page .top > .mast:not(:has(.eyebrow)) {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  text-align: left;
  gap: 32px;
}
body.fot-home-app .fot-home-page .top > .mast:not(:has(.eyebrow)) h1 {
  margin: 0;
  text-align: left;
}
body.fot-home-app .fot-home-page .copy {
  min-width: 0;
}
body.fot-home-app .fot-home-page .title-row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 0;
}
body.fot-home-app .fot-home-page .top > .mast:has(.sort) .count,
body.fot-home-app .fot-home-page .count {
  display: block;
  font-family: Inter, "Liberation Sans", sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--mist);
  white-space: nowrap;
}

body.fot-home-app .fot-home-page .sort {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}
body.fot-home-app .fot-home-page .top > .mast:not(:has(.eyebrow)) .sort {
  width: 280px;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}
body.fot-home-app .fot-home-page .sort .lab {
  display: block;
  font-family: Inter, "Liberation Sans", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mist);
  margin: 0 0 8px;
  text-align: left;
}
body.fot-home-app .fot-home-page .sel-wrap {
  position: relative;
  width: 100%;
}
body.fot-home-app .fot-home-page .sel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 18px;
  background: var(--card);
  color: var(--ivory);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 0 0 1.5px rgba(200,198,212,.42);
  font-size: 15.5px;
  font-weight: 400;
  font-family: Inter, "Liberation Sans", sans-serif;
  cursor: pointer;
  text-align: left;
}
body.fot-home-app .fot-home-page .sel svg {
  color: var(--indigo);
  flex: 0 0 auto;
}
body.fot-home-app .fot-home-page .sel:hover .sel-val,
body.fot-home-app .fot-home-page .sel:focus-visible .sel-val {
  color: var(--first);
}
body.fot-home-app .fot-home-page .menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #14162E;
  color: #F4F1EA;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(200,198,212,.12), 0 12px 32px rgba(0,0,0,.45);
  max-height: min(320px, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: block;
}
body.fot-home-app .fot-home-page .menu[hidden] {
  display: none !important;
}
body.fot-home-app .fot-home-page .menu li {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #F4F1EA;
  cursor: pointer;
}
body.fot-home-app .fot-home-page .menu li:hover,
body.fot-home-app .fot-home-page .menu li:focus {
  color: #C4BEF2;
  background: transparent;
}

body.fot-home-app .fot-home-page .bar {
  display: none;
}

/*
 * Even square grid. Filter hides cards (display:none) so the remaining
 * set reflows with no leftover holes. Desktop 5-col, mobile 2-col.
 */
body.fot-home-app .fot-home-page .grid {
  padding: 8px 48px 56px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

/* Filter hide: .card { display:flex } beats UA [hidden]{display:none}. Match FAQ. */
body.fot-home-app .fot-home-page .card[hidden],
body.fot-home-app .fot-home-page .card.is-out {
  display: none !important;
}

body.fot-home-app .fot-home-page .card,
body.fot-home-app .fot-home-page .card.sq {
  grid-column: auto;
}

body.fot-home-app .fot-home-page .card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  padding: 2px;
  min-height: 0;
  box-shadow: 0 0 0 1px rgba(200,198,212,.10);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  color: var(--ivory);
}
body.fot-home-app .fot-home-page .card:hover,
body.fot-home-app .fot-home-page .card:focus-visible {
  background: var(--card);
  color: var(--ivory);
  transform: none;
  filter: none;
  box-shadow: 0 0 0 1px rgba(200,198,212,.10);
}

/* Image hover — copy homepage .bcard .pic / img. Zoom stays in crop. Do not scale the card. */
body.fot-home-app .fot-home-page .card .pic {
  aspect-ratio: 1 / 1;
  height: auto;
  background: var(--night);
  overflow: hidden;
  position: relative;
  border-radius: 10px;
}
body.fot-home-app .fot-home-page .card .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  max-width: none;
  transform: scale(1);
  transition: transform .22s ease, filter .14s ease;
}
body.fot-home-app .fot-home-page .card:hover .pic img,
body.fot-home-app .fot-home-page .card:focus-visible .pic img {
  transform: scale(1.035);
  filter: brightness(1.07);
}

body.fot-home-app .fot-home-page .card .meta {
  min-width: 0;
  display: block;
  padding: 12px 12px 14px;
  text-align: left;
}
body.fot-home-app .fot-home-page .card .cat {
  display: block;
  font-family: Inter, "Liberation Sans", sans-serif;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mist);
  font-weight: 500;
  margin-bottom: 5px;
}
body.fot-home-app .fot-home-page .card .ttl {
  display: block;
  font-family: Inter, "Liberation Sans", sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.28;
  color: var(--ivory);
  transform: none;
}
body.fot-home-app .fot-home-page .card:hover .ttl,
body.fot-home-app .fot-home-page .card:focus-visible .ttl {
  color: var(--first);
  background: none;
  transform: none;
}

@media (min-width: 901px) and (max-width: 1200px) {
  body.fot-home-app .fot-home-page .grid {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (max-width: 900px) {
  body.fot-home-app .fot-home-page .top > .mast:not(:has(.eyebrow)) {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 16px;
  }
  body.fot-home-app .fot-home-page .top > .mast:not(:has(.eyebrow)) h1 {
    text-align: center;
  }
  body.fot-home-app .fot-home-page .title-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
  }
  body.fot-home-app .fot-home-page .sort {
    display: flex;
    min-width: 0;
    margin-top: 0;
  }
  body.fot-home-app .fot-home-page .top > .mast:not(:has(.eyebrow)) .sort,
  body.fot-home-app .fot-home-page .sel-wrap,
  body.fot-home-app .fot-home-page .sel {
    width: 100%;
  }
  body.fot-home-app .fot-home-page .sel {
    padding: 0 14px;
    font-size: 14px;
  }
  body.fot-home-app .fot-home-page .bar {
    display: none;
  }
  body.fot-home-app .fot-home-page .grid {
    padding: 4px 16px 40px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body.fot-home-app .fot-home-page .card,
  body.fot-home-app .fot-home-page .card.sq {
    grid-column: auto;
  }
  body.fot-home-app .fot-home-page .card {
    border-radius: 12px;
    padding: 2px;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  body.fot-home-app .fot-home-page .card .pic {
    display: block;
  }
  body.fot-home-app .fot-home-page .card .ttl {
    font-size: 14px;
  }
}

/* Topics mast — mobile left, title on top of full-width sort.
   Beats chrome.css shared lock + the generic listing-mast center above.
   FAQ/Search keep the shared lock; All Articles unchanged. */
@media (max-width: 900px) {
  body.fot-home-app.fot-page-topics .fot-home-page .top > .mast:not(:has(.eyebrow)) {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 20px;
  }
  body.fot-home-app.fot-page-topics .fot-home-page .top > .mast:not(:has(.eyebrow)) h1 {
    margin: 0;
    text-align: left;
  }
  body.fot-home-app.fot-page-topics .fot-home-page .title-row {
    align-items: flex-start;
    width: 100%;
  }
  body.fot-home-app.fot-page-topics .fot-home-page .copy {
    width: 100%;
  }
  body.fot-home-app.fot-page-topics .fot-home-page .top > .mast:not(:has(.eyebrow)) .sort {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    align-self: stretch;
  }
}


body.fot-home-app.fot-page-topics .menu-wrapper a.on,
body.fot-home-app.fot-page-topics .overlay-menu a.on,
body.fot-home-app.fot-page-topics .mobile-menu a.on,
body.fot-home-app.fot-page-topics .menu-wrapper .current-menu-item > a,
body.fot-home-app.fot-page-topics .overlay-menu .current-menu-item > a {
  color: #3E3FE8 !important;
}
