:root {
  --ink: #203033;
  --muted: #607176;
  --line: #d8e4e3;
  --paper: #fffdf8;
  --panel: #ffffff;
  --mint: #dff3ed;
  --mint-strong: #2e8f80;
  --coral: #ee775d;
  --gold: #f2b84b;
  --sky: #b9dcef;
  --shadow: 0 16px 44px rgba(36, 59, 62, 0.13);
  font-family: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-bottom: 4rem;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 8%, rgba(185, 220, 239, 0.45), transparent 28rem),
    linear-gradient(180deg, #f6fbf8 0%, var(--paper) 38rem);
  font-size: 17px;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  z-index: 20;
  background: #fff;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--ink);
}

.site-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
}

.utility-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.2rem;
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
}

.saved-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
}

.saved-pill::before {
  content: "★";
  color: var(--gold);
}

.nav-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 2.65rem;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(36, 59, 62, 0.16);
}

.primary-nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.primary-nav a {
  padding: 0.35rem 0;
  border-bottom: 3px solid transparent;
}

.primary-nav a:hover,
.primary-nav a.active {
  border-color: var(--coral);
}

.menu-button {
  display: none;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.hero,
.category-hero,
.basic-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  align-items: center;
  gap: 2rem;
  min-height: 20rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2.5rem;
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: 2rem;
  margin-top: 2.2rem;
}

.badge-art,
.category-art,
.generator-art {
  display: grid;
  place-items: center;
  min-height: 13rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(223, 243, 237, 0.95), rgba(255, 253, 248, 0.88)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(46, 143, 128, 0.08) 12px 24px);
  box-shadow: var(--shadow);
  font-family: Arial, sans-serif;
  font-size: 4rem;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
}

h2 {
  margin: 2.25rem 0 1rem;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
}

h3 {
  margin: 1.7rem 0 0.6rem;
  font-size: 1.35rem;
}

.lede {
  max-width: 42rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.section-label {
  display: inline-flex;
  margin-bottom: 0.7rem;
  color: var(--mint-strong);
  font-family: Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.category-grid,
.generator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.category-card,
.name-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(36, 59, 62, 0.07);
}

.category-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 6rem;
  padding: 1.1rem;
  font-family: Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
}

.category-card span:first-child {
  display: grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--mint);
  font-size: 1.4rem;
}

.category-card:hover,
.name-card:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

.featured-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.featured-tile {
  display: grid;
  min-height: 8.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(36, 59, 62, 0.07);
}

.featured-tile span:first-child {
  display: grid;
  place-items: center;
  min-height: 5rem;
  background:
    linear-gradient(135deg, rgba(242, 184, 75, 0.24), rgba(223, 243, 237, 0.7)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(32, 48, 51, 0.05) 12px 24px);
  font-family: Arial, sans-serif;
  font-size: 2rem;
  font-weight: 900;
}

.featured-tile span:last-child {
  padding: 0.7rem;
  font-family: Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0;
  margin: 0.75rem 0 1.4rem;
  list-style: none;
}

.filter-button,
.generate-button,
.clear-button,
.share-link {
  min-height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-weight: 800;
}

.filter-button {
  padding: 0.45rem 1rem;
}

.filter-button.active,
.generate-button {
  border-color: var(--mint-strong);
  background: var(--mint-strong);
  color: #fff;
}

.generator-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.name-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: 0.9rem 1rem;
  font-family: Arial, sans-serif;
  font-weight: 800;
}

.name-card small {
  display: block;
  color: var(--muted);
  font-weight: 600;
}

.generator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 2rem;
}

.breadcrumbs {
  margin-bottom: 1rem;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
}

.generator-panel {
  margin: 1.6rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.generator-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--mint);
  font-family: Arial, sans-serif;
  font-weight: 800;
}

.gender-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.generate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
}

.generate-button::before {
  content: "↻";
  font-size: 1.1rem;
}

.generated-names {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  min-height: 8rem;
  padding: 1rem;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 6rem;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-weight: 700;
  text-align: center;
}

.star-button {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  color: #b4a984;
  cursor: pointer;
  font-size: 1.35rem;
}

.star-button.saved {
  color: var(--gold);
}

.toc,
.ad-slot,
.sidebar-box,
.share-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.toc {
  padding: 1rem 1.1rem;
  font-family: Arial, sans-serif;
}

.toc strong {
  display: block;
  margin-bottom: 0.5rem;
}

.toc ul,
.sidebar-box ul,
.content-list {
  margin: 0;
  padding-left: 1.2rem;
}

.toc-link {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0.1rem 0;
  text-align: left;
}

.toc-link:hover {
  text-decoration: underline;
}

.content-list {
  columns: 2;
}

.feature-image {
  display: grid;
  place-items: center;
  min-height: 15rem;
  margin: 1.4rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(238, 119, 93, 0.12), rgba(185, 220, 239, 0.3)),
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(32, 48, 51, 0.05) 14px 28px);
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-weight: 800;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 6.5rem;
  margin: 1.4rem 0;
  color: #7b8b8e;
  background: repeating-linear-gradient(45deg, #f4f8f6 0 10px, #ffffff 10px 20px);
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-box {
  padding: 1rem;
  font-family: Arial, sans-serif;
}

.sidebar-box h3 {
  margin-top: 0;
}

.sticky {
  position: sticky;
  top: 1rem;
}

.share-box {
  padding: 1rem;
  margin-top: 2rem;
  font-family: Arial, sans-serif;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

.share-status {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-card-list {
  display: grid;
  gap: 0.8rem;
}

.article-card {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.7rem;
}

.article-card .thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 1.35;
  border-radius: 6px;
  background: var(--sky);
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.article-card strong,
.article-card small {
  display: block;
  font-family: Arial, sans-serif;
}

.article-card small {
  color: var(--muted);
}

.saved-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
}

.clear-button {
  padding: 0.45rem 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #eaf5f1;
  text-align: center;
  padding: 2.6rem 1rem;
}

.footer-brand {
  justify-content: center;
}

.footer-links,
.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.footer-text-button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
}

.footer-text-button:hover {
  text-decoration: underline;
}

.site-footer p {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
}

.sticky-ad {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: min(970px, calc(100% - 1rem));
  min-height: 3.35rem;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -12px 28px rgba(36, 59, 62, 0.12);
  transform: translateX(-50%);
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sticky-ad button {
  position: absolute;
  right: 0.55rem;
  width: 1.8rem;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  line-height: 1;
}

.sticky-ad.hidden {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(32, 48, 51, 0.42);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-window {
  position: relative;
  width: min(30rem, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

.modal-window h2 {
  margin-top: 0;
  font-size: 1.6rem;
}

.modal-window p {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
}

.modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2rem;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 860px) {
  .nav-shell,
  .hero,
  .category-hero,
  .basic-page,
  .generator-layout,
  .home-split {
    grid-template-columns: 1fr;
  }

  .menu-button {
    display: inline-flex;
    justify-self: end;
    width: fit-content;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 0.45rem 0.8rem;
    font-family: Arial, sans-serif;
    font-weight: 800;
  }

  .primary-nav {
    display: none;
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .primary-nav.open {
    display: flex;
  }

  .category-grid,
  .generator-grid,
  .generated-names,
  .featured-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .site-header {
    padding: 0.6rem 0.85rem 0;
  }

  .utility-bar {
    min-height: 1.6rem;
    font-size: 0.82rem;
  }

  .nav-shell {
    gap: 0.55rem;
    padding: 0.55rem 0;
  }

  .brand,
  .footer-brand {
    gap: 0.45rem;
    font-size: 1.28rem;
  }

  .brand-logo {
    width: 2.15rem;
  }

  main {
    padding: 0.95rem 0.85rem 4rem;
  }

  .hero,
  .category-hero,
  .basic-page {
    gap: 0.7rem;
    min-height: auto;
    padding-bottom: 0.85rem;
  }

  .hero .badge-art,
  .category-hero .category-art,
  .basic-page .badge-art {
    display: none;
  }

  h1 {
    font-size: 2.15rem;
    margin-bottom: 0.65rem;
  }

  h2 {
    margin-top: 1rem;
    font-size: 1.55rem;
  }

  .lede {
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.45;
  }

  .hero .lede,
  .category-hero .lede {
    display: none;
  }

  .section-label {
    margin-bottom: 0.35rem;
    font-size: 0.76rem;
  }

  .category-card,
  .name-card {
    padding: 0.8rem;
  }

  .category-card {
    min-height: 4.35rem;
  }

  .category-card span:first-child {
    width: 2.45rem;
  }

  .filter-list {
    gap: 0.4rem;
  }

  .filter-button {
    min-height: 2.35rem;
    padding: 0.35rem 0.72rem;
  }

  .generator-art {
    display: none;
  }

  .generator-controls {
    gap: 0.7rem;
    padding: 0.85rem;
  }

  .generate-button {
    width: 100%;
  }

  .generator-panel {
    margin-top: 0.95rem;
  }

  .sticky-ad {
    width: 100%;
    min-height: 2.85rem;
    border-radius: 0;
    font-size: 0.76rem;
  }

  .category-grid,
  .generator-grid,
  .generated-names,
  .featured-list,
  .content-list {
    grid-template-columns: 1fr;
    columns: 1;
  }

  .category-grid,
  .featured-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .article-card {
    grid-template-columns: 4rem minmax(0, 1fr);
  }

  .category-card {
    min-height: 4.35rem;
  }
}
