:root {
  color-scheme: light;
  --ink: #1d302a;
  --forest: #193a31;
  --forest-deep: #132a26;
  --paper: #f6f2e8;
  --card: #fffcf4;
  --muted: #59675b;
  --line: #d7dbcd;
  --brass: #8a6224;
  --gold: #dfc994;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--forest); text-underline-offset: 4px; }
button, select, textarea { font: inherit; }
button, select { min-height: 44px; }
button { cursor: pointer; min-width: 44px; }
button:disabled { cursor: default; opacity: .55; }
button, select, textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
}
button { padding: 8px 14px; font-size: .875rem; font-weight: 600; }
button:hover:not(:disabled) { border-color: var(--brass); background: #f2ecde; }
:focus-visible { outline: 3px solid #98702c; outline-offset: 3px; }
.site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--gold); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.04em; }
h2 { font-size: 1.2rem; font-weight: 650; }
h3 { font-size: 1.05rem; }
.site-header, .site-footer { background: var(--forest-deep); color: #e9e9d9; }
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px max(24px, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid #3b4d40;
}
.brand { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: Georgia, serif; font-size: 1.5rem; }
.brand img { display: block; }
.site-header a, .site-footer a { color: #e9e9d9; }
.site-header nav, .site-footer nav { display: flex; align-items: center; gap: 22px; }
.site-header nav a, .site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; text-decoration: none; }
.site-header nav a:hover, .site-footer nav a:hover { text-decoration: underline; }
#app { max-width: 1200px; margin: 0 auto; padding: 40px 24px 56px; }
.tool-intro { position: relative; margin-bottom: 28px; }
.tool-intro h1 { margin-bottom: 14px; }
.tool-intro > p:last-child { max-width: 580px; margin-bottom: 0; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: .7rem; font-weight: 650; color: var(--brass); margin-bottom: 14px; }
.eyebrow span { font-size: 1rem; padding-right: 6px; }
.workbench-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 24px; }
.generator-panel { min-width: 0; background: #fffdf7; border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: 0 4px 18px #233c2410; }
.settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; border: 0; padding: 0; margin: 0; }
.settings-grid label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: .8rem; min-width: 0; }
select { width: 100%; padding: 8px 10px; font-size: .875rem; background: white; }
select:disabled { background: #f0f0e9; color: #5c665c; }
.field-note { color: var(--muted); font-size: .75rem; margin: 0; }
#gender-note { margin-top: 10px; }
.generate-row { display: flex; gap: 18px; align-items: center; margin: 20px 0 24px; }
.primary { background: var(--forest); color: #fffaf0; border-color: var(--forest); font-size: .95rem; padding: 12px 20px; flex-shrink: 0; }
.primary:hover:not(:disabled) { background: #24503f; border-color: #24503f; }
.primary span { color: var(--gold); margin-left: 8px; }
.results-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--line); margin-bottom: 14px; }
.results-heading h2 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.count-badge { border-radius: 20px; font: 500 .75rem/1.5 system-ui, sans-serif; padding: 1px 8px; background: #e6eadd; }
.local-badge { color: var(--muted); font-size: .7rem; }
.name-grid, .favorite-list { list-style: none; margin: 0; padding: 0; }
.name-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.name-card { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 14px; border: 1px solid #e2decc; border-radius: 8px; background: var(--paper); min-height: 68px; }
.name-text { min-width: 0; flex: 1; overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; line-height: 1.35; }
.card-actions { display: flex; flex-shrink: 0; gap: 2px; align-items: center; }
.card-actions button { border-color: transparent; background: transparent; padding: 8px; font-size: .75rem; }
.card-actions .save-name { min-width: 44px; font-size: 1.3rem; color: var(--brass); font-weight: 400; padding: 3px; }
.card-actions .save-name[aria-pressed="true"] { color: #78521a; }
.batch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.status { min-height: 24px; margin: 14px 0 0; font-size: .8rem; color: var(--muted); }
.favorites-panel { min-width: 0; padding: 24px 20px; border: 1px solid #ced5c6; border-radius: 14px; background: #e9eddf; }
.favorites-heading { display: flex; align-items: center; gap: 10px; }
.favorites-heading .eyebrow { font-size: .6rem; margin-bottom: 6px; }
.favorites-heading h2 { font-family: Georgia, serif; font-weight: 500; font-size: 1.5rem; margin-bottom: 0; }
.bookmark-mark { font-size: 2rem; color: var(--brass); }
.favorites-note { font-size: .8rem; color: var(--muted); margin: 16px 0 20px; }
.empty-state { padding: 32px 0; text-align: center; font-size: .875rem; color: var(--muted); border-block: 1px dashed #bdc7b5; }
.favorite-card { display: flex; gap: 4px; align-items: center; padding: 10px 0; border-bottom: 1px solid #cbd3c1; }
.favorite-card .name-text { font-size: 1rem; }
.collection-footer > p { font-size: .7rem; margin: 20px 0 0; color: var(--muted); }
.collection-footer .batch-actions { margin-top: 10px; }
.collection-footer button { font-size: .75rem; padding-inline: 10px; }
.notice { padding: 12px; border: 1px solid #ae8b49; border-radius: 8px; color: #59421c; background: #fff5d9; font-size: .8rem; }
.copy-fallback { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.copy-fallback h3 { margin-bottom: 8px; }
.copy-fallback p { font-size: .8rem; color: var(--muted); }
.copy-fallback textarea { display: block; width: 100%; min-height: 100px; padding: 12px; resize: vertical; margin-bottom: 10px; }
.tool-footnote { margin: 22px 0 0; color: var(--muted); font-size: .75rem; text-align: center; }
.site-footer { padding: 32px max(24px, calc((100vw - 1152px) / 2)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-footer p { margin: 0; font-size: .8rem; }
.footer-brand { font-family: Georgia, serif; font-size: 1rem; color: var(--gold); }
.site-footer .ga-consent-details summary { min-height: 44px; padding: 10px 12px; }
.footer-extra { width: 100%; color: #c3cdbb; }
.footer-extra:empty { display: none; }
.skip-link { position: absolute; top: -100px; left: 12px; z-index: 10; padding: 12px; background: white; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
article, .content, .page-content { margin-top: 40px; max-width: 780px; overflow-wrap: anywhere; }
article h2, .content h2, .page-content h2 { margin-top: 28px; font-family: Georgia, serif; font-size: 1.65rem; font-weight: 500; }
article h3 { margin-top: 24px; }
article li { margin-bottom: 8px; }
article table { border-collapse: collapse; width: 100%; }
article th, article td { text-align: left; border: 1px solid var(--line); padding: 8px; }
@media (max-width: 1020px) {
  .workbench-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .name-grid { grid-template-columns: minmax(0, 1fr); }
  .generate-row { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 700px) {
  .site-header { padding: 12px 16px; gap: 10px; }
  .brand { font-size: 1.25rem; gap: 7px; }
  .brand img { width: 30px; height: 30px; }
  .site-header nav { gap: 14px; }
  .site-header nav a { font-size: .75rem; }
  #app { padding: 28px 16px 36px; }
  .tool-intro h1 { font-size: 2.3rem; }
  .tool-intro > p:last-child { font-size: .875rem; }
  .workbench-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .generator-panel { padding: 16px; }
  .generate-row { margin-block: 16px; }
  .primary { width: 100%; }
  #category-description { display: none; }
  .local-badge { font-size: .65rem; }
  .results-heading { padding-top: 16px; }
  .name-card { min-height: 62px; }
  .favorites-panel { padding: 20px; }
  .site-footer { padding: 24px 16px; }
}
@media (max-width: 360px) {
  .site-header nav { gap: 8px; }
  .site-header nav a { font-size: .7rem; }
  .brand { font-size: 1.15rem; }
  .tool-intro h1 { font-size: 2rem; }
  .batch-actions { gap: 6px; }
  .batch-actions button { padding-inline: 10px; font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
