body.home {
  container-type: inline-size;
  --ink: #142434;
  --line: #cbd2d7;
  --accent: #75b9d2;
  background: #f3f6f8;
  color: var(--ink);
  font-family: system-ui, "Yu Gothic", Meiryo, sans-serif;
}

.home * { box-sizing: border-box; }
.home a { color: inherit; }
.home a:focus-visible { outline: 3px solid #1260a0; outline-offset: 4px; }
.home > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; padding-inline: clamp(1rem, 3vw, 3rem); direction: ltr; background: #142434; color: #fff; border-bottom: .45rem solid var(--accent); }
.home > main { max-width: 108rem; padding-inline: clamp(1rem, 3vw, 3rem); }
.home-brand { min-inline-size: 0; padding-block: .25rem .45rem; }
.home-brand > a {
  display: block;
  width: fit-content;
  padding: .3rem 0;
  font-size: clamp(2.15rem, 5.9vw, 5.2rem);
  font-weight: 950;
  letter-spacing: -.065em;
  line-height: 1;
  text-decoration: none;
}
.home-brand > a::after {
  display: inline-block;
  width: .18em;
  height: .18em;
  margin-left: .12em;
  background: var(--accent);
  content: "";
}
.home > main { padding-top: clamp(1.2rem, 3vw, 2.4rem); padding-bottom: 3rem; }
.home h1, .home h2, .home h3, .home p { margin: 0; }
.home-controls {
  display: flex;
  flex: 0 1 38rem;
  flex-direction: column;
  align-items: flex-end;
  gap: .25rem;
  min-width: 0;
  margin-left: auto;
  padding-block: .3rem;
}
.home-language-menu {
  position: relative;
  z-index: 2;
  color: var(--ink);
}
.home-language-menu summary {
  cursor: pointer;
  padding: .3rem .7rem;
  border-radius: .3rem;
  background: #f3f6f8;
  font-size: .85rem;
  white-space: nowrap;
}
.home-language-menu summary:focus-visible { outline: 3px solid #75b9d2; outline-offset: 4px; }
.home-languages {
  position: absolute;
  inset-inline-end: 0;
  display: flex;
  flex-wrap: wrap;
  width: min(21rem, calc(100vw - 2rem));
  gap: .35rem .5rem;
  max-height: 70vh;
  overflow-y: auto;
  margin-top: .35rem;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: .3rem;
  background: #f3f6f8;
  box-shadow: 0 6px 18px #14243433;
}
@media (max-width: 36rem) {
  .home > header { gap: .4rem; }
  .home-brand > a { font-size: 1.25rem; padding-inline-end: 0; }
  .home-language-menu summary { font-size: .75rem; padding: .35rem .45rem; }
  .home-controls { flex-basis: 100%; }
}
.home-languages a {
  padding: .25rem .55rem;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: .3rem;
  background: #fff;
  font-size: .85rem;
  text-decoration: none;
}
.home-languages a[aria-current] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.home .home-tagline {
  color: #d6e5ed;
  font-size: clamp(.82rem, 1.3vw, 1rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.home .home-tagline:empty { display: none; }
.home .country-filter {
  border: 1px solid var(--line);
  min-inline-size: 0;
  margin: 0;
  max-inline-size: 100%;
  color: var(--ink);
  background: #f3f6f8;
  border-radius: .3rem;
  font-size: .85rem;
}
.home .country-filter[open] { inline-size: 100%; }
.home .country-filter summary { cursor: pointer; font-weight: 700; padding: .3rem .65rem; }
.home .country-filter summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.home .country-filter .country-options { border-top: 1px solid var(--line); padding: .45rem .65rem .6rem; }
.home .country-options { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.home .country-options label { display: inline-flex; align-items: center; gap: .25rem; cursor: pointer; white-space: nowrap; }
.home .country-options input { accent-color: #174e86; }
.home .country-filter-empty { margin: .8rem 0; }
.home .news-section { margin-top: 2.4rem; }
.home .news-section > h2 { margin-bottom: .7rem; }
.home .story-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.8rem, 1.6vw, 1.45rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.home .story-list > li { margin: 0; }
.home .story {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 3px 0 #14243416;
  text-decoration: none;
}
.home .story-media { background: #112739; }
.home .story-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.home .story h2 {
  padding: .68rem .75rem .8rem;
  background: #fff;
  font-size: clamp(1rem, 1.45vw, 1.35rem);
  font-weight: 850;
  line-height: 1.42;
  overflow-wrap: anywhere;
}
.home .story:hover h2 { background: #edf6fa; text-decoration: underline; text-underline-offset: .16em; }
.home .story-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: .55rem;
  padding: .42rem .75rem;
  border-top: 1px solid #e7edf2;
  color: #24516d;
  font-size: .75rem;
  font-weight: 750;
}
.home .story-date-country {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  min-inline-size: 0;
  column-gap: .8em;
  overflow: hidden;
}
.home .story-country {
  position: relative;
  overflow-wrap: anywhere;
}
.home .story-country::before {
  /* Keep the separator visible only when the country follows the date. */
  content: "·";
  position: absolute;
  inset-inline-end: calc(100% + .2em);
}
.home .story-meta > :last-child {
  justify-self: end;
  text-align: end;
}
.home .domestic { padding-left: 1.2rem; }
@media (max-width: 68rem) {
  .home .story-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 34rem) {
  .home .story-list { grid-template-columns: 1fr; }
}



.home .story-list > li[hidden], .home .story-pagination[hidden] { display: none; }
.home .story-pagination {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  direction: ltr;
  gap: .7rem;
  margin-inline: calc(50% - 50cqw);
  margin-block-start: 1.6rem;
}
.home .story-pagination button {
  min-inline-size: 2.75rem;
  min-block-size: 2.75rem;
  border: 1px solid var(--line);
  border-radius: .3rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.home .story-pagination button:hover:enabled { background: #edf6fa; }
.home .story-pagination button:focus-visible { outline: 3px solid #1260a0; outline-offset: 2px; }
.home .story-pagination button:disabled { opacity: .45; cursor: default; }
.home .story-pagination output { font-variant-numeric: tabular-nums; }

/* v3 server-side home pages: the filters are a GET form (details stay laid out as before), pages are links. */
.home .home-filters { display: contents; }
.home .home-filters-apply { justify-self: end; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: .3rem; background: #fff; font: inherit; cursor: pointer; }
.home .home-filters-apply[hidden] { display: none; }
.home .story-pagination a {
  display: inline-grid; place-items: center;
  min-inline-size: 2.75rem; min-block-size: 2.75rem;
  border: 1px solid var(--line); border-radius: .3rem; background: #fff; color: var(--ink); text-decoration: none;
}
.home .story-pagination a:hover { background: #edf6fa; }
.home .story-pagination a:focus-visible { outline: 3px solid #1260a0; outline-offset: 2px; }
.home .story-pagination output { justify-self: center; }
/* Previous and next fill the width on each side of the page number (the empty span keeps a missing one's column),
   aligned with the article grid rather than the whole window. */
.home .story-pagination:has(> a) { margin-inline: 0; }
.home .story-pagination > :first-child, .home .story-pagination > :last-child { justify-self: stretch; }
.home .story-pagination a { font-size: 1.4rem; }
