/* PenNameGenerator.com — design tokens, layout and components.
   Tokens replicate the previous site (Astra + Elementor build of 2024): Montserrat for content,
   the system UI stack for form controls, the indigo/teal button pair and the grey form card. */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-ext-var.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  --font-content: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

  --ink: #000000;          /* H1 */
  --heading: #111111;      /* article headings */
  --muted: #7a7a7a;        /* hero subtitle (the previous site's body text) */
  --text: #707070;         /* article text: the previous grey, darkened to reach 4.5:1 contrast */
  --slate: #334155;        /* UI text, footer */
  --label: #333333;
  --input-text: #475569;

  --accent: #2e3094;       /* Generate button */
  --accent-hover: #00aa88; /* Generate button hover */
  --link: #046bd2;
  --link-hover: #045cb4;

  --card: #f2f2f2;
  --field-border: #cccccc;
  --rule: rgba(2, 1, 1, 0.06);
  --panel: #f7f8fa;

  --radius: 10px;
  --radius-sm: 5px;
  --shadow-card: 0 2px 5px rgba(0, 0, 0, 0.1);
  --shadow-field: 0 1px 2px rgba(0, 0, 0, 0.05);
  --width: 1154px;         /* hero inner width of the previous site */
  --measure: 820px;        /* readable line length for articles */
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
body {
  margin: 0;
  background: #fff;
  color: var(--slate);
  font: 400 16px/1.65 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--link);
}
a:hover,
a:focus {
  color: var(--link-hover);
}
:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}
button,
input,
select {
  font: inherit;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  background: #fff;
  color: var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.skip:focus {
  top: 12px;
}
.notfound {
  width: min(var(--measure), 100% - 20px);
  margin: 0 auto;
  padding: 56px 0 40px;
  color: var(--text);
  font: 400 18px/28px var(--font-content);
  text-align: center;
}
.notfound ul {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  font: 400 16px/24px var(--font-ui);
}

/* ---------- header ---------- */
.site-header {
  border-top: 3px solid var(--rule);
  border-bottom: 3px solid var(--rule);
  padding: 15px 20px;
}
.site-header a {
  display: block;
  width: max-content;
  margin: 0 auto;
}
.site-header img {
  display: block;
  width: 256px;
  height: auto;
}

/* ---------- hero + generator ---------- */
.hero {
  width: min(var(--width), 100% - 20px);
  margin: 0 auto;
  padding-top: 27px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.hero__intro {
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pagehead {
  width: min(var(--width), 100% - 20px);
  margin: 0 auto;
  padding: 34px 10px 0;
}
.crumbs {
  font: 500 13px/1.4 var(--font-ui);
  margin: 0 0 14px;
  text-align: center;
}
.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
}
.crumbs a {
  color: var(--muted);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--link);
  text-decoration: underline;
}
.crumbs [aria-current="page"],
.crumbs li:last-child {
  color: var(--slate);
}
h1 {
  margin: 0 0 20px;
  color: var(--ink);
  font: 600 42px/1.2 var(--font-content);
  letter-spacing: -0.01em;
}
.sub {
  margin: 0 0 30px;
  color: var(--muted);
  font: 400 18px/28px var(--font-content);
  text-align: center;
  max-width: var(--measure);
}

.tool {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 30px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  color: var(--label);
  text-align: left;
}
.field {
  margin: 0 0 20px;
}
.tool label {
  display: block;
  margin-bottom: 13px;
  color: var(--label);
  font: 700 14px/20px var(--font-ui);
}
.tool label.check {
  display: inline;
  margin: 0 0 0 8px;
  font-weight: 400;
  color: var(--slate);
  cursor: pointer;
}
.tool select,
.tool input[type="text"] {
  display: block;
  width: 100%;
  height: 44px;
  padding: 8px 36px 8px 12px;
  color: var(--input-text);
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-field);
  font: 400 16px/24px var(--font-ui);
}
.tool select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  cursor: pointer;
}
.tool input[type="text"] {
  padding-right: 12px;
}
.tool input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--accent);
}
.tool select:disabled {
  color: #9ca3af;
  background-color: #f5f5f5;
  cursor: not-allowed;
}
.tool select:focus,
.tool input:focus {
  border-color: var(--link);
  box-shadow: none;
  outline: none;
}
.tool .hint {
  margin: -4px 0 16px;
  color: var(--muted);
  font: 400 13px/18px var(--font-ui);
}
.tool .hint[hidden] {
  display: none;
}
.tool__go {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 12px 20px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-field);
  font: 600 16px/20px var(--font-ui);
  cursor: pointer;
  transition: background-color 0.3s;
}
.tool__go:hover {
  background: var(--accent-hover);
}
.tool__go:active {
  transform: translateY(1px);
}
.tool__note {
  margin: 14px 0 0;
  color: var(--muted);
  font: 400 13px/18px var(--font-ui);
}
.recent,
.anagrams {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}
.recent button,
.anagrams button {
  padding: 5px 12px;
  color: var(--slate);
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  font: 400 14px/20px var(--font-ui);
  cursor: pointer;
}
.anagrams button {
  padding: 8px 16px;
  font: 500 15px/22px var(--font-ui);
}
.recent button:hover,
.anagrams button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.recent[hidden] {
  display: none;
}

/* book cover preview: 567 x 680 at desktop, the previous site's proportions */
.cover {
  position: relative;
  container-type: inline-size;
  width: 100%;
  aspect-ratio: 567 / 680;
}
.cover img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cover__name {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 18.3%;
  margin: 0;
  color: #fff;
  font: 400 35px/48px var(--font-content);
  text-align: center;
  overflow-wrap: anywhere;
}
@supports (container-type: inline-size) {
  .cover__name {
    font-size: clamp(18px, 6.17cqw, 35px);
    line-height: 1.37;
  }
}
@supports (container-type: inline-size) {
  .cover__name[data-size="m"] {
    font-size: clamp(17px, 5.1cqw, 29px);
  }
  .cover__name[data-size="s"] {
    font-size: clamp(15px, 4.2cqw, 24px);
  }
  .cover__name[data-size="xs"] {
    font-size: clamp(14px, 3.6cqw, 20px);
  }
}
.cover__copy {
  position: absolute;
  left: 0;
  right: 0;
  top: 32%;
  width: max-content;
  margin: 0 auto;
  padding: 6px 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  font: 600 12px/16px var(--font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.cover__copy:hover {
  background: rgba(0, 0, 0, 0.32);
}
.cover__copy[hidden] {
  display: none;
}

/* generator placed inside an article */
.tool--inline {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  grid-template-areas:
    "form cover"
    "recent cover";
  gap: 16px 24px;
  align-items: center;
  margin: 40px auto;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.tool--inline .tool {
  grid-area: form;
  max-width: none;
  margin: 0;
}
.tool--inline .recent {
  grid-area: recent;
  margin: 0;
}
.tool--inline .cover {
  grid-area: cover;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* ---------- article ---------- */
.article {
  width: min(var(--width), 100% - 20px);
  margin: 0 auto;
  padding: 52px 0 24px;
  color: var(--text);
  font: 400 18px/28px var(--font-content);
}
.article > * {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}
.article > .tool--inline,
.article > .table-wrap,
.article > .finder {
  max-width: none;
}
.article p {
  margin: 0 0 28px;
}
.article .lead {
  color: var(--slate);
  font-weight: 500;
  font-size: 20px;
  line-height: 32px;
}
.article a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article a:hover {
  text-decoration: none;
}
.article h2 {
  margin: 52px auto 18px;
  color: var(--heading);
  font: 700 30px/1.3 var(--font-content);
}
.article h3 {
  margin: 34px auto 12px;
  color: var(--heading);
  font: 600 24px/1.3 var(--font-content);
}
.article ul,
.article ol {
  margin: 0 0 28px;
  padding-left: 28px;
}
.article li {
  margin: 0 0 10px;
}
.article li::marker {
  color: var(--accent);
}
.article strong {
  color: var(--heading);
  font-weight: 700;
}
.article cite {
  font-style: italic;
}
.article blockquote {
  margin: 0 auto 28px;
  padding: 4px 0 4px 22px;
  border-left: 4px solid var(--accent);
  color: var(--slate);
  font-size: 20px;
  line-height: 32px;
}
.article blockquote cite {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font: 400 14px/20px var(--font-ui);
  font-style: normal;
}
.note {
  margin: 0 0 28px;
  padding: 20px 24px;
  background: var(--panel);
  border-left: 4px solid var(--accent-hover);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.note p:last-child {
  margin-bottom: 0;
}
.table-wrap {
  margin: 0 0 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  color: var(--slate);
  font: 400 16px/24px var(--font-ui);
  background: #fff;
}
.table-wrap caption {
  margin-bottom: 12px;
  color: var(--muted);
  font: 400 14px/20px var(--font-ui);
  text-align: left;
}
.table-wrap th,
.table-wrap td {
  padding: 12px 14px;
  border: 1px solid #e2e5ea;
  text-align: left;
  vertical-align: top;
}
.table-wrap th {
  background: var(--card);
  color: var(--heading);
  font-weight: 700;
}
.table-wrap tbody tr:nth-child(even) td {
  background: #fafbfc;
}
.table-wrap tbody tr[hidden] {
  display: none;
}
.toc {
  margin: 0 auto 36px;
  padding: 18px 24px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font: 400 15px/24px var(--font-ui);
}
.toc p {
  margin: 0 0 6px;
  color: var(--heading);
  font-weight: 700;
}
.toc ol {
  margin: 0;
  padding-left: 20px;
}
.toc li {
  margin: 0;
}
.toc a {
  text-decoration: none;
}

/* ---------- FAQ, sources, related ---------- */
.faq,
.sources,
.related {
  width: min(var(--measure), 100% - 20px);
  margin: 40px auto 0;
}
.faq h2,
.sources h2,
.related h2 {
  margin: 0 0 14px;
  color: var(--heading);
  font: 700 24px/1.3 var(--font-content);
}
.faq details {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.faq summary {
  padding: 16px 52px 16px 22px;
  color: var(--heading);
  font: 600 17px/26px var(--font-content);
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  transform: rotate(225deg);
  top: 26px;
}
.faq details p {
  margin: 0;
  padding: 0 22px 18px;
  color: var(--text);
  font: 400 17px/28px var(--font-content);
}
.sources,
.related {
  padding-top: 22px;
  border-top: 1px solid #e2e5ea;
  color: var(--muted);
  font: 400 14px/22px var(--font-ui);
}
.sources h2,
.related h2 {
  font: 700 17px/24px var(--font-ui);
}
.sources ul {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 32px;
}
.sources li {
  margin: 0 0 6px;
  break-inside: avoid;
}
.related ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
}
.related a {
  color: var(--slate);
  text-decoration: none;
  font-weight: 500;
}
.related a:hover {
  text-decoration: underline;
}

/* ---------- famous pen names browser ---------- */
.finder {
  margin: 0 0 32px;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font: 400 15px/22px var(--font-ui);
  color: var(--slate);
}
.finder label {
  display: block;
  margin-bottom: 8px;
  color: var(--label);
  font-weight: 700;
}
.finder input {
  width: 100%;
  max-width: 460px;
  height: 44px;
  padding: 8px 12px;
  color: var(--input-text);
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-field);
}
.finder input:focus {
  border-color: var(--link);
  outline: none;
  box-shadow: none;
}
.finder .status {
  margin: 10px 0 14px;
  color: var(--muted);
}
.finder .table-wrap {
  margin-bottom: 0;
}
.finder th[data-sort] {
  cursor: pointer;
  text-decoration: underline dotted;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 24px;
  border-top: 1px solid #e7e9ec;
  padding: 28px 20px 30px;
  text-align: center;
  color: var(--slate);
  font: 400 16px/1.65 var(--font-ui);
}
.site-footer ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  font-size: 15px;
}
.site-footer a {
  color: var(--slate);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--link);
  text-decoration: underline;
}
.site-footer p {
  margin: 0;
}
.site-footer small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- responsive ---------- */
@media (max-width: 921px) {
  html {
    font-size: 93.75%;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__intro {
    padding: 10px 14px 0;
  }
  h1 {
    font-size: 34px;
  }
  .article h2,
  .faq h2 {
    font-size: 26px;
  }
  .article h3 {
    font-size: 21px;
  }
  .tool--inline {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "form"
      "recent"
      "cover";
    padding: 18px;
  }
  .tool--inline .tool {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  .tool--inline .cover {
    max-width: 360px;
  }
  .sources ul {
    columns: 1;
  }
}
@media (max-width: 544px) {
  .site-header {
    padding: 12px;
  }
  .site-header img {
    width: 200px;
  }
  .hero,
  .pagehead {
    width: min(100% - 12px, var(--width));
    padding-top: 18px;
  }
  .pagehead {
    padding-top: 26px;
  }
  h1 {
    font-size: 30px;
  }
  .sub {
    font-size: 17px;
    line-height: 26px;
  }
  .tool {
    padding: 22px 18px;
  }
  .article {
    width: min(100% - 28px, var(--width));
    padding-top: 36px;
    font-size: 17px;
    line-height: 27px;
  }
  .article .lead {
    font-size: 19px;
    line-height: 30px;
  }
  .article h2,
  .faq h2 {
    font-size: 23px;
  }
  .article h3 {
    font-size: 19px;
  }
  .related ul {
    grid-template-columns: minmax(0, 1fr);
  }
  .finder {
    padding: 16px;
  }
}
