@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fraunces-400.woff2") format("woff2");
}
@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/fraunces-700.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-400.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/atkinson-700.woff2") format("woff2");
}


/* Metric-matched fallbacks so font-display: swap does not shove the hero.
   Lighthouse CLS 0.176 was the hero image moving when Fraunces 700 and
   Atkinson 400 swapped in (layout-shifts / cls-culprits-insight). */
@font-face {
  font-family: "Fraunces fallback";
  src: local("Georgia"), local("Liberation Serif"), local("Times New Roman"), local("Times");
  size-adjust: 110.39%;
  ascent-override: 67.9%;
  descent-override: 21.7%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Atkinson fallback";
  src: local("Arial"), local("Liberation Sans"), local("Helvetica");
  font-weight: 400;
  size-adjust: 95.79%;
  ascent-override: 76.2%;
  descent-override: 19.8%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Atkinson fallback";
  src: local("Arial"), local("Liberation Sans"), local("Helvetica");
  font-weight: 700;
  size-adjust: 97.11%;
  ascent-override: 78.3%;
  descent-override: 20.6%;
  line-gap-override: 0%;
}

* { box-sizing: border-box; }
html { background: #16141c; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: #16141c;
  color: #f2efe8;
  font: 16px/1.45 "Atkinson Hyperlegible", "Atkinson fallback", system-ui, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #ff8a5b; }
a:hover { color: #ffd0b8; }

.skip {
  position: absolute;
  left: 8px;
  top: -80px;
  z-index: 2;
  min-height: 48px;
  padding: 12px 16px;
  background: #ff6a3d;
  color: #16141c;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 8px; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 8px 16px;
  border-bottom: 1px solid #3a3646;
}
.brand, .toplink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 4px;
  color: #f2efe8;
  text-decoration: none;
  font-weight: 700;
}
.brand img { display: block; width: 199px; height: 30px; }
.toplink { font-size: 1rem; }

.intro { padding: 16px 16px 8px; }
h1 {
  margin: 0 0 8px;
  font: 700 1.9rem/1.12 Fraunces, "Fraunces fallback", Georgia, serif;
  letter-spacing: -0.02em;
}
.lede { margin: 0; font-size: 1.05rem; color: #d5d0c6; max-width: 28rem; }

.go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid #ff6a3d;
  border-radius: 999px;
  background: #ff6a3d;
  color: #16141c;
  font: 700 1rem/1 "Atkinson Hyperlegible", "Atkinson fallback", system-ui, sans-serif;
  text-decoration: none;
}
.go:hover { background: #ff8a5b; color: #16141c; border-color: #ff8a5b; }

.foot {
  padding: 24px 16px 40px;
  border-top: 1px solid #3a3646;
  color: #9b958b;
  font-size: 0.95rem;
  max-width: 40rem;
}
.foot p { margin: 0 0 10px; }
.foot a { display: inline-block; min-height: 24px; }

@media (min-width: 900px) {
  .top { padding: 8px 32px; }
  .intro {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 32px;
    align-items: end;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 32px 10px;
  }
  .intro .random { grid-column: 2; grid-row: 1 / span 2; margin: 0 0 6px; }
  h1 { font-size: 2.6rem; }
  .foot { padding: 28px 32px 56px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}


.signup {
  margin: 4px 16px 20px;
  padding: 0 0 8px;
  max-width: 38rem;
}
.submit-site {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 12px;
  color: #c8c2b6;
  font-size: 0.95rem;
}
.submit-site:hover { color: #ffd0b8; }
.signup h2 {
  margin: 0 0 14px;
  font: 700 1.35rem/1.25 Fraunces, "Fraunces fallback", Georgia, serif;
}
.signup label {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin: 0;
  font-weight: 700;
}
.signup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.signup input[type="email"] {
  flex: 1 1 12rem;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #6a6573;
  border-radius: 8px;
  background: #221f29;
  color: #f2efe8;
  font: 16px/1.3 "Atkinson Hyperlegible", "Atkinson fallback", system-ui, sans-serif;
}
.signup input[type="email"]:disabled,
.signup button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.signup .fine, .signup-note, .thanks {
  margin: 12px 0 0;
  color: #c8c2b6;
  font-size: 0.95rem;
}
.thanks { color: #f2efe8; }
.signup-error { margin: 12px 0 0; color: #ffb4a0; font-size: 0.95rem; }
.removal { color: #d5d0c6; }

@media (min-width: 900px) {
  .signup { margin: 4px 32px 24px; padding-top: 0; }
}

/* Card grid. Each thumbnail sits in a framed card with a mini browser bar
   (domain shown) so a screenshot never reads as this site's own header. */
.grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 24px;
  padding: 0 16px;
}
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #211e29;
  border: 1px solid #3d3849;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}
.card.featured { grid-column: 1 / -1; }
.card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: #f2efe8;
  text-decoration: none;
}
.card-link:hover .name, .card-link:focus-visible .name { color: #ff8a5b; }
.chrome {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  background: #2e2a38;
  border-bottom: 1px solid #3d3849;
}
.chrome i { width: 7px; height: 7px; border-radius: 50%; background: #5a5466; flex: none; }
.chrome .domain {
  margin-left: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #b9b3a8;
  font-size: 0.75rem;
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  background: #2a2633;
}
.card.featured img { aspect-ratio: auto; height: 272px; }
@media (max-width: 639px) {
  .card.featured img { height: 340px; object-position: left top; }
}
.cap { display: block; padding: 10px 10px 4px; }
.name {
  display: block;
  font: 700 1rem/1.2 Fraunces, "Fraunces fallback", Georgia, serif;
}
p.why { margin: 4px 0 0; }
.why {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  color: #d5d0c6;
  font-size: 0.88rem;
  line-height: 1.35;
}
.featured .name { font-size: 1.3rem; }
.featured .why { font-size: 1rem; -webkit-line-clamp: 2; }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  padding: 2px 10px 10px;
  font-size: 0.8rem;
  color: #9b958b;
}
.card-meta a { display: inline-flex; align-items: center; min-height: 24px; color: #c8c2b6; }
a.tag { text-decoration: none; }
a.tag:hover { background: #3d3849; color: #f2efe8; }
.tag, .ours {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #2e2a38;
  color: #c8c2b6;
}
.ours { background: #ff6a3d; color: #16141c; font-weight: 700; }
.signup { margin: 8px 16px 28px; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 0 32px; max-width: 1280px; margin-left: auto; margin-right: auto; }
  .card.featured { grid-column: span 2; grid-row: span 2; }
  .card:not(.featured) img { aspect-ratio: 4 / 3; }
  .card:not(.featured) .why { -webkit-line-clamp: 2; }
  .card.featured img { flex: none; width: 100%; aspect-ratio: 8 / 7; height: auto; object-fit: cover; object-position: left top; }
  .card.featured .card-link { flex: none; }
  .signup { margin: 12px 32px 32px; }
}

/* Random button and the "next odd site" bar */
.random {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  margin: 16px 0 4px;
  padding: 14px 22px;
  border-radius: 14px;
  background: #ff6a3d;
  color: #16141c;
  font: 700 1.3rem/1.1 Fraunces, "Fraunces fallback", Georgia, serif;
  text-decoration: none;
  box-shadow: 0 6px 0 #b8431f;
}
.random::after { content: "\2197"; font-family: "Atkinson Hyperlegible", "Atkinson fallback", system-ui, sans-serif; }
.random:hover { background: #ff8a5b; color: #16141c; }
.random:active { transform: translateY(3px); box-shadow: 0 3px 0 #b8431f; }
.oddbar {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  background: #f2efe8;
  color: #16141c;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.oddbar[hidden] { display: none; }
.oddbar-text { flex: 1; min-width: 0; line-height: 1.25; }
.oddbar-label { display: block; font-size: 0.78rem; color: #5a5466; }
.oddbar-text strong { display: block; font-family: Fraunces, "Fraunces fallback", Georgia, serif; font-size: 1.05rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.oddbar-why { display: none; color: #3a3646; font-size: 0.9rem; }
.oddbar-next { flex: none; }
.oddbar-close {
  flex: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #16141c;
  font-size: 1.6rem;
  cursor: pointer;
}
.oddbar-close:hover { background: #e2ddd2; }
body.has-oddbar { padding-bottom: 88px; }
@media (min-width: 900px) {
  .random { width: auto; display: inline-flex; min-width: 22rem; margin-top: 20px; }
  .oddbar { left: 50%; right: auto; transform: translateX(-50%); width: min(760px, calc(100% - 32px)); }
  .oddbar-why { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
}

/* Tag browse: plain links, one static page per tag. */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 16px 14px;
}
.tags a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #3d3849;
  border-radius: 999px;
  color: #f2efe8;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
.tags a:hover { border-color: #ff8a5b; color: #ffd0b8; }
.tags a[aria-current="page"] { background: #f2efe8; border-color: #f2efe8; color: #16141c; }
@media (min-width: 900px) {
  .tags { padding: 4px 32px 14px; max-width: 1280px; margin: 0 auto; }
}
.signup-links { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 4px; }
