/* 1001 Font Generator — self-contained production styles */
:root {
  color-scheme: light;
  --bg: #f4f4f4;
  --bg-elevated: #fafafa;
  --surface: #ffffff;
  --surface-2: #eeeeee;
  --surface-3: #e2e2e2;
  --text: #111111;
  --text-soft: #333333;
  --muted: #666666;
  --faint: #888888;
  --line: #d2d2d2;
  --line-strong: #aaaaaa;
  --brand: #f3c53d;
  --brand-strong: #896200;
  --brand-soft: #fff4bf;
  --accent: #d7a51b;
  --accent-soft: #f5ead0;
  --pink: #c99a19;
  --success: #607124;
  --success-soft: #eef2dc;
  --danger: #b63d45;
  --primary: #111111;
  --primary-hover: #303030;
  --on-primary: #ffffff;
  --brand-gradient: linear-gradient(135deg, #f8dc68, #e0aa13);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 5px 16px rgba(0, 0, 0, .05);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, .09), 0 2px 8px rgba(0, 0, 0, .05);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .12), 0 6px 24px rgba(0, 0, 0, .07);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --container: 1280px;
  --header-height: 74px;
  --transition: 180ms ease;
  --font-ui: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-unicode: "Segoe UI", "Noto Sans", "Noto Sans Math", "Cambria Math", "STIX Two Math", "DejaVu Sans", "Arial Unicode MS", "Segoe UI Symbol", "Noto Sans Symbols 2", "Noto Sans Symbols", "Apple Symbols", "Symbola", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111111;
  --bg-elevated: #171717;
  --surface: #1c1c1c;
  --surface-2: #252525;
  --surface-3: #303030;
  --text: #f7f7f7;
  --text-soft: #dddddd;
  --muted: #b3b3b3;
  --faint: #858585;
  --line: #383838;
  --line-strong: #505050;
  --brand: #f5d052;
  --brand-strong: #ffe486;
  --brand-soft: #3b3214;
  --accent: #d9a91e;
  --accent-soft: #3a3118;
  --pink: #e4bd47;
  --success: #a7b963;
  --success-soft: #2d351c;
  --danger: #ff858d;
  --primary: #f5d052;
  --primary-hover: #ffe486;
  --on-primary: #111111;
  --brand-gradient: linear-gradient(135deg, #ffe782, #d9a20b);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .24), 0 8px 20px rgba(0, 0, 0, .18);
  --shadow-md: 0 12px 38px rgba(0, 0, 0, .30), 0 2px 8px rgba(0, 0, 0, .20);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, .42), 0 8px 26px rgba(0, 0, 0, .24);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 14% -8%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 26rem),
    radial-gradient(circle at 88% 3%, color-mix(in srgb, var(--text) 5%, transparent), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.drawer-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

::selection { color: #111; background: var(--brand); }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 42%, transparent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 43px;
  height: 43px;
  filter: drop-shadow(0 6px 12px rgba(153, 111, 0, .18));
}

.brand-wordmark {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.55px;
  white-space: nowrap;
}

.brand-1001 {
  display: inline-grid;
  min-width: 49px;
  height: 28px;
  padding: 0 8px;
  place-items: center;
  border-radius: 9px;
  color: #111;
  background: var(--brand-gradient);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -.35px;
  box-shadow: 0 5px 12px rgba(151, 108, 0, .20);
}

.brand-name {
  min-width: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.main-nav a {
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
  transition: color var(--transition), background var(--transition);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.theme-toggle,
.mobile-menu-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text-soft);
  background: var(--surface);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition), background var(--transition), color var(--transition);
}

.icon-button:hover,
.theme-toggle:hover,
.mobile-menu-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  color: var(--brand);
  background: var(--surface-2);
}

.icon-button svg,
.theme-toggle svg,
.mobile-menu-button svg { width: 19px; height: 19px; }
.theme-icon-sun, html[data-theme="dark"] .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: block; }
.mobile-menu-button { display: none; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 0px 0 0px;
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  content: "";
  filter: blur(2px);
  pointer-events: none;
}

.hero::before {
  top: 20px;
  left: -120px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 20%, transparent), transparent 68%);
}

.hero::after {
  top: -40px;
  right: -80px;
  width: 330px;
  height: 330px;
  background: radial-gradient(circle, color-mix(in srgb, var(--text) 7%, transparent), transparent 68%);
}

.hero-inner {
  display: grid;
  max-width: 940px;
  margin-inline: auto;
  justify-items: center;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin: 0 0 17px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 999px;
  color: var(--brand-strong);
  background: color-mix(in srgb, var(--brand-soft) 72%, var(--surface));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent);
}

.hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: clamp(-3.8px, -.06em, -1.8px);
}

.gradient-text {
  color: transparent;
  background: linear-gradient(115deg, #c58e00 5%, var(--brand) 46%, #8a6200 94%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy {
  max-width: 720px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.65;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.stat-pill svg { width: 15px; height: 15px; color: var(--brand); }

.generator-section { padding: 10px 0 72px; }

.generator-shell {
  position: relative;
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.generator-shell::before {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #d59d0b, #f6d75d 48%, #b77d00);
  content: "";
}

.composer {
  position: relative;
  z-index: 1;
  padding: 28px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 8% 0, color-mix(in srgb, var(--brand) 9%, transparent), transparent 22rem),
    radial-gradient(circle at 94% 20%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 18rem),
    var(--surface);
}

.composer-topline,
.results-topbar,
.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.live-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

.character-count { color: var(--faint); font-size: 12px; font-weight: 650; }

.textarea-wrap {
  position: relative;
  margin-top: 0;
}

#text-input {
  display: block;
  width: 100%;
  min-height: 80px;
  resize: vertical;
  padding: 21px 56px 21px 21px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  outline: none;
  color: var(--text);
  background: var(--bg-elevated);
  font-size: clamp(19px, 2.6vw, 25px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -.02em;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04), 0 0 0 0 transparent;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

#text-input::placeholder { color: var(--faint); font-weight: 550; }
#text-input:focus {
  border-color: color-mix(in srgb, var(--brand) 62%, var(--line-strong));
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 13%, transparent);
}

.clear-input {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-2);
  cursor: pointer;
  opacity: 0;
  transform: scale(.9);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), color var(--transition), background var(--transition);
}

.clear-input.is-visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.clear-input:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, var(--surface)); }
.clear-input svg { width: 17px; height: 17px; }

.composer-footer { flex-wrap: wrap; margin-top: 14px; }

.composer-actions,
.preview-controls,
.result-actions,
.search-and-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), color var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  color: var(--brand-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
}

.button:active { transform: translateY(0); }
.button svg { width: 16px; height: 16px; }
.button-primary {
  border-color: var(--primary);
  color: var(--on-primary);
  background: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
}
.button-primary:hover { color: var(--on-primary); border-color: var(--primary-hover); background: var(--primary-hover); }
.button-ghost { border-color: transparent; box-shadow: none; background: transparent; }

.range-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.range-control svg { width: 15px; height: 15px; }
input[type="range"] {
  width: 100px;
  height: 4px;
  border-radius: 999px;
  accent-color: var(--brand);
  cursor: pointer;
}

.mobile-category-strip {
  display: none;
  overflow-x: auto;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  gap: 8px;
  scrollbar-width: none;
  background: var(--surface);
}
.mobile-category-strip::-webkit-scrollbar { display: none; }

.generator-body {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  min-height: 650px;
}

.category-sidebar {
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
}

.sidebar-inner {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  max-height: calc(100vh - var(--header-height) - 32px);
  overflow-y: auto;
  padding: 22px 15px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.sidebar-heading {
  margin: 0 8px 10px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.category-list { display: grid; gap: 3px; }

.category-button,
.mobile-category-button {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

.category-button {
  display: grid;
  width: 100%;
  min-height: 42px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 11px;
  text-align: left;
  font-size: 13px;
  font-weight: 720;
}

.category-button:hover { color: var(--text); background: var(--surface); transform: translateX(2px); }
.category-button.is-active { color: var(--brand-strong); background: var(--brand-soft); }

.category-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 1px 2px rgba(20, 22, 44, .04);
}
.category-button.is-active .category-icon { color: #111; border-color: transparent; background: var(--brand-gradient); }
.category-count { min-width: 24px; padding: 2px 6px; border-radius: 999px; color: var(--faint); background: var(--surface-3); font-size: 10px; font-weight: 800; text-align: center; }
.category-button.is-active .category-count { color: var(--brand-strong); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }

.sidebar-note {
  margin: 20px 5px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  line-height: 1.6;
}
.sidebar-note strong { display: block; margin-bottom: 4px; color: var(--text-soft); font-size: 12px; }

.results-panel { min-width: 0; padding: 14px 25px 30px; }
.results-topbar { align-items: flex-start; }
.results-title-wrap h2 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -.55px; }
.results-description { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.search-wrap {
  position: relative;
  min-width: min(100%, 260px);
}
.search-wrap svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--faint);
  transform: translateY(-50%);
  pointer-events: none;
}
#font-search {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 630;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
#font-search::placeholder { color: var(--faint); }
#font-search:focus { border-color: color-mix(in srgb, var(--brand) 48%, var(--line)); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 11%, transparent); }
.search-shortcut {
  position: absolute;
  top: 50%;
  right: 9px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--faint);
  background: var(--surface);
  font-size: 9px;
  font-weight: 800;
  transform: translateY(-50%);
  pointer-events: none;
}

.mobile-filter-button { display: none; }

.font-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 0;
}

.font-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(135px, 190px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
  min-height: 94px;
  overflow: hidden;
  padding: 14px 16px 14px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.font-card::after {
  position: absolute;
  right: -45px;
  bottom: -60px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 7%, transparent), transparent 70%);
  content: "";
  pointer-events: none;
}

.font-card:hover {
  z-index: 1;
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 27%, var(--line));
  background: color-mix(in srgb, var(--brand-soft) 14%, var(--surface));
  box-shadow: var(--shadow-md);
}
.font-card.is-highlighted { animation: cardPulse 900ms ease; }
@keyframes cardPulse { 0%,100% { box-shadow: var(--shadow-sm); } 45% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 14%, transparent), var(--shadow-md); } }

.font-card-details,
.font-card-actions {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.font-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.font-name-wrap { min-width: 0; }
.font-name { display: block; overflow: hidden; color: var(--text-soft); font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.font-category { display: block; margin-top: 3px; color: var(--faint); font-size: 10px; font-weight: 680; text-transform: capitalize; }

.favorite-button {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--faint);
  background: transparent;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}
.favorite-button:hover { color: #f3a000; background: color-mix(in srgb, #ffc342 13%, var(--surface)); transform: scale(1.05); }
.favorite-button.is-favorite { color: #f3a000; background: color-mix(in srgb, #ffc342 14%, var(--surface)); }
.favorite-button svg { width: 17px; height: 17px; }
.favorite-button.is-favorite svg { fill: currentColor; }

.font-preview {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-unicode);
  font-size: var(--preview-size, 28px);
  line-height: 1.4;
  overflow-wrap: anywhere;
  unicode-bidi: plaintext;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.copy-button {
  display: inline-flex;
  min-width: 82px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-soft);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}
.copy-button:hover { color: var(--on-primary); border-color: var(--primary); background: var(--primary); transform: translateY(-1px); }
.copy-button.is-copied { color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, var(--line)); background: var(--success-soft); }
.copy-button svg { width: 14px; height: 14px; }

.empty-state {
  display: none;
  min-height: 300px;
  place-items: center;
  margin-top: 14px;
  padding: 40px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  text-align: center;
  background: var(--surface-2);
}
.empty-state.is-visible { display: grid; }
.empty-state-icon { display: grid; width: 58px; height: 58px; margin: 0 auto 14px; place-items: center; border-radius: 18px; color: var(--brand); background: var(--brand-soft); }
.empty-state-icon svg { width: 27px; height: 27px; }
.empty-state h3 { margin: 0; font-size: 18px; }
.empty-state p { max-width: 380px; margin: 7px auto 0; color: var(--muted); font-size: 13px; }

.load-more-wrap { display: flex; justify-content: center; margin-top: 22px; }
.load-more-button { min-width: 170px; }
.load-more-button[hidden] { display: none; }

.drawer-backdrop { display: none; }

.toast-region {
  position: fixed;
  z-index: 300;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: min(380px, calc(100% - 32px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text-soft);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 720;
  opacity: 0;
  transform: translateY(12px) scale(.98);
  animation: toastIn 260ms ease forwards, toastOut 250ms ease 2.65s forwards;
}
.toast-icon { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--success); background: var(--success-soft); }
.toast-icon svg { width: 16px; height: 16px; }
@keyframes toastIn { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.98); } }

.section { padding: 86px 0; }
.section-muted { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 50%, var(--bg)); }
.section-heading { max-width: 720px; margin-bottom: 34px; }
.section-heading.centered { margin-inline: auto; text-align: center; }
.kicker { margin: 0 0 9px; color: var(--brand-strong); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.section-heading h2 { margin: 0; font-size: clamp(30px, 4.4vw, 45px); line-height: 1.13; letter-spacing: -.045em; }
.section-heading p { margin: 15px 0 0; color: var(--muted); font-size: 17px; line-height: 1.7; }

.category-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.category-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); box-shadow: var(--shadow-md); }
.category-card-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--brand-strong); background: var(--brand-soft); font-size: 17px; font-weight: 850; }
.category-card h3 { margin: 17px 0 5px; font-size: 16px; letter-spacing: -.25px; }
.category-card p { margin: 0; color: var(--muted); font-size: 12px; }
.category-card-arrow { position: absolute; right: 18px; bottom: 18px; color: var(--faint); transition: transform var(--transition), color var(--transition); }
.category-card:hover .category-card-arrow { color: var(--brand); transform: translateX(3px); }
.category-card-arrow svg { width: 18px; height: 18px; }

.steps-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step-card,
.feature-card {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.step-number { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: #111; background: var(--brand-gradient); font-size: 13px; font-weight: 850; box-shadow: 0 7px 16px rgba(151, 108, 0, .18); }
.step-card h3, .feature-card h3 { margin: 18px 0 7px; font-size: 18px; letter-spacing: -.35px; }
.step-card p, .feature-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.feature-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; color: var(--brand); background: var(--brand-soft); }
.feature-icon svg { width: 22px; height: 22px; }

.content-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  align-items: start;
  gap: 64px;
}
.prose h2 { margin: 0 0 18px; font-size: clamp(30px, 4vw, 43px); line-height: 1.15; letter-spacing: -.045em; }
.prose h3 { margin: 30px 0 10px; font-size: 20px; letter-spacing: -.3px; }
.prose p { margin: 0 0 18px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.prose strong { color: var(--text-soft); }
.prose a { color: var(--brand-strong); font-weight: 700; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 30%, transparent); text-underline-offset: 3px; }

.use-case-panel {
  position: sticky;
  top: calc(var(--header-height) + 26px);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--brand-soft) 55%, var(--surface)), var(--surface) 54%),
    var(--surface);
  box-shadow: var(--shadow-md);
}
.use-case-panel h3 { margin: 0; font-size: 20px; }
.use-case-list { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.use-case-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb, var(--surface) 86%, transparent); }
.use-case-check { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 7px; color: var(--success); background: var(--success-soft); }
.use-case-check svg { width: 13px; height: 13px; }
.use-case-item strong { display: block; color: var(--text-soft); font-size: 13px; }
.use-case-item span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }

.faq-list { display: grid; max-width: 900px; margin: 0 auto; gap: 11px; }
.faq-item { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.faq-item summary { position: relative; padding: 18px 50px 18px 20px; color: var(--text-soft); font-size: 15px; font-weight: 780; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { position: absolute; top: 50%; right: 20px; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); content: ""; transform: translateY(-70%) rotate(45deg); transition: transform var(--transition); }
.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-answer { padding: 0 20px 20px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.faq-answer p { margin: 0; }

.cta-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 40px;
  border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(246, 215, 93, .24), transparent 20rem),
    radial-gradient(circle at 12% 90%, rgba(255, 255, 255, .08), transparent 20rem),
    linear-gradient(135deg, #111111, #292929 58%, #6c5200);
  box-shadow: var(--shadow-lg);
}
.cta-panel::after { position: absolute; right: -70px; bottom: -110px; width: 280px; height: 280px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; content: ""; box-shadow: 0 0 0 44px rgba(255,255,255,.04), 0 0 0 88px rgba(255,255,255,.025); }
.cta-copy { position: relative; z-index: 1; max-width: 720px; }
.cta-copy h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; letter-spacing: -.045em; }
.cta-copy p { margin: 11px 0 0; color: rgba(255,255,255,.78); font-size: 16px; }
.cta-panel .button { position: relative; z-index: 1; flex: 0 0 auto; border-color: rgba(255,255,255,.25); color: #111; background: var(--brand); box-shadow: 0 10px 25px rgba(0, 0, 0, .22); }
.cta-panel .button:hover { color: #111; background: #ffe58a; }

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, var(--bg));
}
.footer-main { display: grid; grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(120px, .6fr)); gap: 44px; padding: 54px 0 42px; }
.footer-brand p { max-width: 360px; margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.footer-column h3 { margin: 0 0 14px; color: var(--text-soft); font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.footer-links { display: grid; gap: 9px; }
.footer-links a { width: max-content; max-width: 100%; color: var(--muted); font-size: 13px; transition: color var(--transition), transform var(--transition); }
.footer-links a:hover { color: var(--brand); transform: translateX(2px); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11px; }
.footer-bottom-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-bottom a:hover { color: var(--brand); }

.back-to-top {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text-soft);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), color var(--transition), background var(--transition);
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { color: var(--on-primary); background: var(--primary); }
.back-to-top svg { width: 18px; height: 18px; }
body.has-toast .back-to-top { bottom: 82px; }

/* Static information pages */
.page-hero { padding: 72px 0 40px; text-align: center; }
.page-hero h1 { margin: 0; font-size: clamp(40px, 7vw, 64px); line-height: 1.05; letter-spacing: -.055em; }
.page-hero p { max-width: 700px; margin: 18px auto 0; color: var(--muted); font-size: 18px; line-height: 1.7; }
.page-content { max-width: 900px; margin: 0 auto; padding: 20px 0 90px; }
.legal-card { padding: clamp(24px, 5vw, 52px); border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-md); }
.legal-card h2 { margin: 35px 0 12px; font-size: 23px; letter-spacing: -.4px; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card h3 { margin: 24px 0 8px; font-size: 17px; }
.legal-card p, .legal-card li { color: var(--muted); font-size: 15px; line-height: 1.8; }
.legal-card ul { padding-left: 21px; }
.legal-card a { color: var(--brand-strong); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.last-updated { display: inline-flex; margin-bottom: 24px; padding: 6px 9px; border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: 11px; font-weight: 750; }
.error-page { display: grid; min-height: calc(100vh - var(--header-height)); place-items: center; padding: 50px 0; }
.error-card { max-width: 680px; text-align: center; }
.error-code { color: transparent; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; font-size: clamp(90px, 20vw, 180px); font-weight: 900; line-height: .9; letter-spacing: -.08em; }
.error-card h1 { margin: 22px 0 0; font-size: 32px; }
.error-card p { margin: 12px auto 24px; color: var(--muted); }

@media (max-width: 1100px) {
  .generator-body { grid-template-columns: 218px minmax(0, 1fr); }
  .font-card { grid-template-columns: minmax(118px, 165px) minmax(0, 1fr) auto; gap: 14px; }
  .category-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(110px, .6fr)); gap: 28px; }
}

@media (max-width: 900px) {
  :root { --header-height: 68px; }
  .container { width: min(calc(100% - 28px), var(--container)); }
  .site-header { height: var(--header-height); }
  .main-nav { display: none; position: absolute; top: calc(100% + 8px); right: 14px; left: 14px; flex-direction: column; align-items: stretch; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 11px 12px; }
  .mobile-menu-button { display: inline-grid; }
  .hero { padding-top: 48px; }
  .generator-shell { border-radius: 24px; }
  .generator-body { display: block; min-height: 0; }
  .category-sidebar {
    position: fixed;
    z-index: 220;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(310px, 86vw);
    border-right: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    transform: translateX(-104%);
    transition: transform 230ms ease;
  }
  .category-sidebar.is-open { transform: translateX(0); }
  .sidebar-inner { position: static; max-height: 100%; padding: 26px 15px; }
  .drawer-backdrop { position: fixed; z-index: 210; inset: 0; display: block; border: 0; background: rgba(0, 0, 0, .52); opacity: 0; pointer-events: none; transition: opacity 230ms ease; }
  .drawer-backdrop.is-visible { opacity: 1; pointer-events: auto; }
  .mobile-category-strip { display: flex; }
  .mobile-category-button { flex: 0 0 auto; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 11px; font-weight: 760; white-space: nowrap; }
  .mobile-category-button.is-active { color: var(--on-primary); border-color: var(--primary); background: var(--primary); }
  .mobile-filter-button { display: inline-flex; }
  .results-panel { padding: 14px 20px 26px; }
  .content-columns { grid-template-columns: 1fr; gap: 38px; }
  .use-case-panel { position: static; }
  .category-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .brand-wordmark { font-size: 16px; }
  .brand-mark { width: 39px; height: 39px; }
  .brand-1001 { min-width: 43px; height: 25px; padding: 0 6px; font-size: 11px; }
  .header-actions { gap: 6px; }
  .theme-toggle, .mobile-menu-button { width: 39px; height: 39px; }
  .hero { padding: 42px 0 30px; }
  .hero h1 { font-size: clamp(38px, 12.5vw, 58px); }
  .hero-copy { font-size: 16px; }
  .hero-stats { gap: 7px; }
  .stat-pill { padding: 7px 9px; font-size: 11px; }
  .generator-section { padding-bottom: 50px; }
  .composer { padding: 20px; }
  #text-input { min-height: 116px; padding: 18px 50px 18px 17px; font-size: 20px; }
  .composer-footer { align-items: flex-start; }
  .preview-controls { width: 100%; justify-content: space-between; }
  .range-control { flex: 1; }
  input[type="range"] { flex: 1; width: auto; }
  .results-topbar { flex-direction: column; align-items: stretch; }
  .search-and-filter { width: 100%; }
  .search-wrap { flex: 1; min-width: 0; }
  .font-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "details actions"
      "preview preview";
    min-height: 0;
    gap: 10px 14px;
    padding: 14px 15px 16px;
  }
  .font-card-details { grid-area: details; }
  .font-preview { grid-area: preview; min-height: 40px; }
  .font-card-actions { grid-area: actions; }
  .section { padding: 64px 0; }
  .section-heading p { font-size: 15px; }
  .steps-grid, .feature-grid { grid-template-columns: 1fr; }
  .category-card-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .category-card { min-height: 138px; padding: 17px; }
  .category-card-icon { width: 38px; height: 38px; }
  .cta-panel { align-items: flex-start; flex-direction: column; padding: 30px 24px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .toast-region { right: 16px; bottom: 16px; }
}

@media (max-width: 480px) {
  .container { width: min(calc(100% - 22px), var(--container)); }
  .brand-wordmark { gap: 5px; }
  .brand-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
  .hero h1 { font-size: 42px; }
  .eyebrow { font-size: 10px; }
  .hero-stats .stat-pill:last-child { display: none; }
  .composer { padding: 17px; }
  .composer-actions { width: 100%; }
  .composer-actions .button { flex: 1; }
  .preview-controls .button { padding-inline: 10px; }
  .results-panel { padding-inline: 15px; }
  .results-title-wrap h2 { font-size: 20px; }
  .font-card { padding: 13px 13px 15px; }
  .copy-button { min-width: 78px; padding-inline: 9px; }
  .category-card-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 118px; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}

@media (max-width: 360px) {
  .header-inner { gap: 10px; }
  .brand { gap: 8px; }
  .brand-mark { width: 35px; height: 35px; }
  .brand-name { display: none; }
  .brand-wordmark { gap: 0; }
  .brand-1001 { min-width: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .back-to-top, .toast-region, .composer-actions, .preview-controls, .category-sidebar, .mobile-category-strip, .search-and-filter, .load-more-wrap { display: none !important; }
  body { background: #fff; color: #000; }
  .generator-shell, .font-card, .legal-card { box-shadow: none; }
  .generator-body { display: block; }
}

/* Simplified homepage: full-width results without the desktop category sidebar. */
.generator-body {
  display: block !important;
  min-height: 0;
}

.results-panel {
  width: 100%;
}

.category-sidebar,
.drawer-backdrop,
.mobile-filter-button {
  display: none !important;
}

.generator-section {
  padding-bottom: 48px;
}

/* Full-width category buttons for the simplified generator. */
.category-button-bar {
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.category-button-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.category-filter-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.category-filter-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  font-size: 14px;
  font-style: normal;
  line-height: 1;
}

.category-filter-button.is-active,
.category-filter-button.is-active:hover {
  border-color: var(--primary);
  color: var(--on-primary);
  background: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
}

@media (max-width: 700px) {
  .category-button-bar {
    overflow-x: auto;
    padding: 14px 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .category-button-bar::-webkit-scrollbar {
    display: none;
  }

  .category-button-list {
    width: max-content;
    min-width: 100%;
    flex-wrap: nowrap;
  }
}

@media print {
  .category-button-bar {
    display: none !important;
  }
}
