/* Stylish Name Generators - main stylesheet */
:root {
  --bg: #faf8f3;
  --paper: #ffffff;
  --ink: #16132a;
  --muted: #5d5a73;
  --line: #e6e2d6;
  --accent: #5b3df5;
  --accent-dark: #4527d6;
  --accent-soft: #efebff;
  --coral: #ff5a36;
  --ok: #0f9d6b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 19, 42, .05), 0 8px 24px rgba(22, 19, 42, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: var(--coral); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.skip {
  position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff;
  padding: 10px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 32px); margin-inline: auto; }

/* header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.08rem; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; line-height: 1;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark); }

/* hero + tool */
.hero { padding: 44px 0 28px; text-align: center; }
.eyebrow { display: inline-block; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; font-size: .85rem; padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 800; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 660px; margin: 0 auto 26px; }

.tool { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); max-width: 860px; margin: 0 auto; text-align: left; }
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.input-box { position: relative; flex: 1 1 280px; }
#name-input {
  width: 100%; font: inherit; font-size: 1.2rem; font-weight: 600; padding: 15px 44px 15px 16px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
#name-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
#clear-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: var(--line);
  color: var(--ink); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1;
}
.btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 14px 20px; cursor: pointer;
  background: var(--accent); color: #fff;
}
.btn:hover { background: var(--accent-dark); }
.btn.alt { background: var(--accent-soft); color: var(--accent-dark); }
.btn.alt:hover { background: #e2dbff; }
.hint { color: var(--muted); font-size: .92rem; margin: 10px 2px 0; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; }
.chip { font: inherit; font-weight: 600; font-size: .92rem; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.results { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; background: #fff; }
.card:hover { border-color: #cfc7ff; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.style-name { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.copy-btn { font: inherit; font-size: .85rem; font-weight: 700; border: 0; background: var(--accent-soft); color: var(--accent-dark); padding: 6px 14px; border-radius: 8px; cursor: pointer; }
.copy-btn:hover { background: var(--accent); color: #fff; }
.copy-btn.done { background: var(--ok); color: #fff; }
.out { margin: 0; font-size: 1.28rem; line-height: 1.5; word-break: break-word; overflow-wrap: anywhere; }
.more { display: block; width: 100%; margin-top: 14px; }
.empty { text-align: center; color: var(--muted); padding: 24px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--ink); color: #fff;
  padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: .95rem; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* trust strip */
.strip { display: flex; gap: 10px 22px; flex-wrap: wrap; justify-content: center; color: var(--muted); font-weight: 600; font-size: .93rem; margin: 22px auto 0; padding: 0; list-style: none; }
.strip li::before { content: "\2713"; color: var(--ok); margin-right: 7px; font-weight: 800; }

/* article */
.content { padding: 30px 0 56px; }
.content h2, #tool { scroll-margin-top: 80px; }
.content h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); line-height: 1.2; letter-spacing: -.02em; margin: 2.2em 0 .5em; }
.content h3 { font-size: 1.2rem; margin: 1.6em 0 .3em; }
.content p { margin: 0 0 1.1em; }
.content ul, .content ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.content li { margin-bottom: .45em; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .92rem; padding: 12px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.byline strong { color: var(--ink); }
.callout { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 1.4em 0; }
.callout p:last-child { margin-bottom: 0; }
.toc { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin: 18px 0 8px; }
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { columns: 2; column-gap: 28px; margin: 0; }
.toc li { margin-bottom: .3em; font-size: .97rem; }
.sample { font-size: 1.15rem; word-break: break-word; }

.ex { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 0 0 1.2em; }
.ex li { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0; }
td.sample { font-size: 1.05rem; white-space: nowrap; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); margin: 1em 0 1.4em; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .96rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f3f0e6; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }

details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { margin: 0 0 14px; color: #2c2943; }

.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); text-align: left; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 6px; }

.contact-box { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.mail-link { font-size: 1.2rem; font-weight: 800; }

/* footer */
.site-footer { background: var(--ink); color: #cfcce2; padding: 40px 0 28px; margin-top: 24px; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #ffb4a3; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; }
.foot-grid h2 { color: #fff; font-size: 1rem; margin: 0 0 10px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 7px; }
.foot-note { border-top: 1px solid #38345a; margin-top: 26px; padding-top: 16px; font-size: .86rem; color: #a9a5c4; }

.nf { text-align: center; padding: 90px 0; }
.nf .big { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; color: var(--accent); line-height: 1; margin: 0; }

@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; padding: 10px 0; gap: 4px; }
  .site-header { position: static; }
  .hero { padding-top: 28px; }
  .toc ol { columns: 1; }
  .foot-grid { grid-template-columns: 1fr; }
  .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast { transition: none; }
}
