:root {
  --black: #222;
  --red: #b43135;
  --gray: #666;
  --soft: #f2f2f2;
  --ink: #222;
  --white: #fff;
  --line: #e0e0e0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: system-ui, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0;
  border-top: 0.5rem solid var(--red);
  border-bottom: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.site-bar {
  width: min(100% - 3rem, 76rem);
  min-height: 6rem;
  margin-inline: auto;
  display: flex;
  align-items: stretch;
}

.site-brand {
  width: fit-content;
  margin-right: auto;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-brand img {
  width: 15rem;
  height: 7rem;
  object-fit: contain;
}

.links,
.tools {
  display: flex;
  align-items: center;
  gap: 0;
}

.site-bar .links {
  margin: 0;
  font-size: 1.1rem;
}

.links a,
.tools a {
  display: flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  margin-top: 0.75rem;
  text-decoration: none;
}

.links a:hover,
.links .is-on,
.tools a:hover {
  color: var(--red);
}

.tools {
  padding-left: 0;
  border-left: 1px solid var(--line);
}

.menu {
  display: none;
  margin-left: auto;
  position: relative;
}

.menu summary {
  cursor: pointer;
  list-style: none;
}

.menu-list {
  position: absolute;
  top: 2.4rem;
  right: 0;
  min-width: 11rem;
  display: grid;
  padding: 0.75rem;
  background: var(--white);
  border: 1px solid var(--line);
}

.menu-list a {
  padding: 0.7rem 0.8rem;
  text-decoration: none;
}

.menu-list a:hover,
.menu-list .is-on {
  color: var(--red);
}

.site-search {
  min-height: 3rem;
  align-self: center;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 1.5rem;
  border-bottom: 0.25rem solid transparent;
  margin-top: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.site-search:hover {
  border-color: var(--red);
  color: var(--red);
}

.site-search.is-on {
  border-color: var(--red);
  color: var(--red);
}

.site-search i {
  width: 1rem;
  height: 1rem;
  position: relative;
  display: block;
  border: 0.13rem solid currentColor;
  border-radius: 50%;
}

.site-search i::after {
  content: "";
  width: 0.45rem;
  height: 0.13rem;
  position: absolute;
  right: -0.35rem;
  bottom: -0.18rem;
  background: currentColor;
  transform: rotate(45deg);
}

.site-foot {
  margin: 0;
  padding-block: 2rem 2rem;
  border: 0;
  border-top: 0.35rem solid var(--red);
  background: var(--black);
  color: var(--white);
}

.foot-in {
  width: min(100% - 3rem, 90rem);
  margin-inline: auto;
  display: grid;
  justify-items: center;
  gap: 2.25rem;
}

.foot-brand {
  display: flex;
  align-items: center;
}

.foot-brand img {
  width: 8rem;
  height: auto;
}

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1.25rem;
}

.foot-meta > * {
  color: var(--white);
  text-decoration: none;
}

.foot-meta > * + * {
  padding-left: 1.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.container {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

header,
main,
footer {
  padding-block: 1.5rem;
}

nav ul,
.list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0;
  list-style: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.card {
  padding: 1rem;
  border: 1px solid;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.stack > * + * {
  margin-top: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

footer {
  margin-top: 2rem;
  border-top: 1px solid;
}

@media (max-width: 900px) {
  .site-bar {
    width: calc(100% - 2rem);
    min-height: 5rem;
  }

  .links,
  .tools {
    display: none;
  }

  .menu {
    display: block;
    align-self: center;
    padding-inline: 1rem;
    margin-top: 0.5rem;
  }

  .menu-list {
    top: 2.25rem;
    color: var(--ink);
  }

  .site-search {
    margin-left: 0;
    padding-inline: 1rem;
  }

  .foot-meta {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-meta > * + * {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 600px), (max-aspect-ratio: 4 / 3) {
  .site-search {
    padding-inline: 1.1rem;
  }

  .foot-meta {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}
