:root {
  --orange: #e78200;
  --orange-dark: #b96300;
  --purple: #8221aa;
  --purple-dark: #641188;
  --black: #0a0a0a;
  --page: #232323;
  --panel: #353535;
  --panel-light: #4b4b4b;
  --text: #e8e8e8;
  --muted: #bdbdbd;
  --white: #ffffff;
}

* { box-sizing: border-box; }
html { background: var(--page); color-scheme: dark; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}
img { display: block; max-width: 100%; }
a { color: var(--white); text-decoration: none; }
a:hover { color: #ffd29a; }
button, input { font: inherit; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 999;
  padding: 10px 14px;
  background: var(--orange);
  color: var(--black);
}
.skip-link:focus { top: 12px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(1318px, 98%);
  margin: 0 auto;
}

.head {
  min-height: 82px;
  background: var(--black);
  border-bottom: 4px solid var(--orange);
}
.head-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo {
  flex: 0 0 auto;
  width: 181px;
  height: 78px;
  display: flex;
  align-items: center;
}
.logo img {
  width: auto;
  height: 70px;
}
.menu {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin-left: auto;
  order: 2;
}
.menu a {
  min-height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--panel-light);
}
.menu a:hover, .menu a.active {
  background: var(--purple);
  color: var(--white);
}
.search {
  order: 1;
  width: min(390px, 34vw);
  height: 46px;
  display: flex;
  margin-left: auto;
}
.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 0 14px;
  background: var(--white);
  color: #222;
  outline: 0;
}
.search input:focus { box-shadow: inset 0 0 0 3px var(--orange); }
.search button, .icon-button {
  border: 0;
  background: var(--orange);
  color: var(--black);
  cursor: pointer;
  font-weight: 700;
}
.search button {
  width: 48px;
  flex: 0 0 48px;
}
.search button:hover, .icon-button:hover { background: #ffa42d; }
.icon-button { display: none; width: 42px; height: 42px; font-size: 20px; }

.main-wrap {
  min-height: 65vh;
  background: #292929;
  box-shadow: 0 0 15px -7px #000;
  padding-bottom: 24px;
}
.home-intro, .page-heading {
  background: var(--purple);
  padding: 16px 18px;
  border-bottom: 4px solid var(--purple-dark);
}
.home-intro h1, .page-heading h1 {
  margin: 0 0 7px;
  color: var(--white);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  text-transform: uppercase;
}
.home-intro p, .page-heading > p:last-child {
  max-width: 960px;
  margin: 0;
  color: #f2e8f6;
  line-height: 1.55;
}
.breadcrumbs { margin: 0 0 7px; color: #e8d0f2; font-size: 13px; text-transform: uppercase; }
.breadcrumbs a { text-decoration: underline; text-underline-offset: 3px; }

.section-block { padding: 18px 10px 4px; }
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 0 5px 10px;
  border-bottom: 2px solid var(--panel-light);
}
.section-title h2 {
  margin: 0;
  padding: 0 0 8px;
  color: var(--white);
  font-size: 24px;
  text-transform: uppercase;
  border-bottom: 3px solid var(--orange);
}
.section-title p { margin: 0 0 8px; color: var(--muted); }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 6px;
}
.site-preview {
  min-width: 0;
  background: var(--panel);
  border-bottom: 3px solid var(--panel-light);
}
.site-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--black);
}
.site-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 160ms ease;
}
.site-image:hover img { opacity: .82; }
.site-label {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 7px 10px;
  background: rgba(0, 0, 0, .82);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}
.open-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 38px;
  margin: -19px 0 0 -22px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(130, 33, 170, .92);
  color: var(--white);
}
.site-image:hover .open-icon { display: flex; }
.site-copy { padding: 12px 13px 14px; }
.site-copy h3 { margin: 0 0 7px; font-size: 18px; line-height: 1.25; }
.site-copy h3 a { color: #ffad43; text-decoration: underline; text-underline-offset: 3px; }
.site-copy p { margin: 0; color: #d0d0d0; line-height: 1.45; font-size: 14px; }

.category-grid, .directory-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.more-sites-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.more-sites-grid a {
  min-height: 78px;
  display: block;
  padding: 12px;
  background: var(--panel);
  border-top: 3px solid var(--purple);
}
.more-sites-grid a:hover {
  background: #414141;
  border-top-color: var(--orange);
  color: var(--white);
}
.more-sites-grid strong {
  display: block;
  margin-bottom: 6px;
  color: #ffad43;
  font-size: 15px;
  line-height: 1.25;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.more-sites-grid span {
  display: block;
  color: #cecece;
  font-size: 13px;
  line-height: 1.35;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.category-grid a {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel);
  border-left: 5px solid var(--orange);
}
.category-grid a:hover { background: var(--purple-dark); color: var(--white); }
.category-grid span { min-width: 0; }
.category-grid strong { display: block; margin-bottom: 5px; font-size: 17px; text-transform: uppercase; }
.category-grid small { display: block; color: #cfcfcf; line-height: 1.35; }
.category-grid b { font-size: 32px; color: var(--orange); }

.directory-note, .text-page, .search-page {
  margin: 20px 15px 0;
  padding: 18px;
  background: var(--panel);
  border-top: 4px solid var(--orange);
}
.directory-note h2, .text-page h2 { margin: 0 0 8px; color: var(--white); text-transform: uppercase; }
.directory-note p, .text-page p { margin: 0 0 15px; line-height: 1.6; }
.text-page a { color: #ffad43; text-decoration: underline; text-underline-offset: 3px; }

.category-section { padding-top: 14px; }
.directory-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.directory-list a {
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--panel);
  border-left: 5px solid var(--purple);
}
.directory-list a:hover { background: #414141; color: var(--white); border-left-color: var(--orange); }
.link-copy { min-width: 0; flex: 1; }
.link-copy strong { display: block; margin-bottom: 6px; color: #ffad43; font-size: 17px; text-decoration: underline; text-underline-offset: 3px; }
.link-copy span { display: block; color: #d5d5d5; line-height: 1.4; font-size: 14px; }
.visit {
  flex: 0 0 auto;
  padding: 8px 9px;
  background: var(--purple);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
}
.category-back { padding: 15px; text-align: center; }
.category-back a { display: inline-block; padding: 12px 16px; background: var(--orange); color: #151515; font-weight: 700; }

.search-page label { display: block; margin-bottom: 8px; font-weight: 700; }
.search-page > input {
  width: 100%;
  height: 50px;
  border: 2px solid var(--panel-light);
  padding: 0 14px;
  background: var(--white);
  color: #202020;
  outline: 0;
}
.search-page > input:focus { border-color: var(--orange); }
.search-status { min-height: 22px; margin: 10px 0; color: var(--muted); }
.search-results li[hidden] { display: none; }

.foot {
  padding: 22px 10px 30px;
  background: var(--black);
  border-top: 4px solid var(--purple);
  color: #bdbdbd;
  text-align: center;
  font-size: 14px;
}
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; }
.foot nav a { color: #ffad43; text-decoration: underline; text-underline-offset: 3px; }
.foot p { max-width: 850px; margin: 14px auto 0; line-height: 1.5; }

@media (max-width: 980px) {
  .head-inner { flex-wrap: wrap; padding-bottom: 8px; }
  .logo { height: 70px; margin-right: auto; }
  .icon-button { display: block; }
  .menu, .search { display: none; order: 4; width: 100%; margin: 0; }
  .menu.open { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .search.open { display: flex; }
  .menu a { min-height: 42px; padding: 0 8px; font-size: 13px; }
  .featured-grid, .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more-sites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 660px) {
  .wrap { width: 100%; }
  .head-inner { padding: 0 8px 8px; }
  .logo { width: 150px; }
  .logo img { width: auto; height: 66px; }
  .menu.open { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-intro, .page-heading { padding: 14px; }
  .home-intro h1, .page-heading h1 { font-size: 24px; }
  .section-title { display: block; }
  .section-title p { margin-top: 6px; }
  .featured-grid, .category-grid, .directory-list, .more-sites-grid { grid-template-columns: 1fr; }
  .site-preview { margin: 0; }
  .category-grid a, .directory-list a { min-height: 84px; }
  .directory-note, .text-page, .search-page { margin-left: 10px; margin-right: 10px; }
}
