/* Home Font Generator — Compact Above-the-Fold Workbench (scoped, zero duplicate global bloat) */
.hero {
  padding: 18px 0 32px;
  background: radial-gradient(ellipse 900px 420px at 50% -110px, rgba(124, 58, 237, .18) 0%, transparent 72%);
}
.hero h1 {
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.1px;
  margin: 0 0 8px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent2), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 15px;
  color: var(--text2);
  max-width: 68ch;
  margin: 0 0 14px;
  line-height: 1.5;
}

/* Workbench shell */
.tool-wrap {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(124, 58, 237, .12), 0 18px 54px rgba(0, 0, 0, .45);
}
.tool-input-area {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}
.input-wrapper {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}
#font-input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 17px;
  padding: 11px 38px 11px 15px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
#font-input::placeholder { color: var(--text3); }
#font-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .22);
}
.input-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 22px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  transition: color .15s;
}
.input-clear:hover { color: var(--text); }
.input-clear[hidden] { display: none; }
.input-count {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  user-select: none;
}
.home-tool-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.home-action-btn {
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text2);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  min-height: 38px;
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.home-action-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(124, 58, 237, .14);
}
.home-action-btn.copied {
  border-color: #10b981;
  color: #34d399;
  background: rgba(16, 185, 129, .14);
}

/* Compact category tabs + inline search filter */
.tool-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.cat-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  flex: 1;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-btn {
  flex-shrink: 0;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 12px;
  min-height: 32px;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.cat-btn:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.cat-btn.active {
  color: var(--accent2);
  background: rgba(124, 58, 237, .18);
  border-color: rgba(124, 58, 237, .45);
}
.style-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  width: 260px;
}
.style-filter-input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 6px 10px;
  outline: none;
}
.style-filter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.style-filter-count {
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
}

/* Slim single-line quick examples */
.quick-examples {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.quick-examples::-webkit-scrollbar { display: none; }
.quick-examples-label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .06em;
  flex-shrink: 0;
  margin-right: 2px;
}
.example-btn {
  flex-shrink: 0;
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.example-btn:hover {
  color: var(--accent2);
  border-color: rgba(124, 58, 237, .48);
  background: rgba(124, 58, 237, .14);
}

/* Immediate Live Preview Grid (Above the Fold!) */
.font-results {
  padding: 14px 18px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
  max-height: 520px;
  min-height: 460px;
  overflow-y: auto;
  overflow-anchor: none;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
.font-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  transition: border-color .15s, background .15s;
}
.font-card:hover {
  border-color: var(--border2);
  background: #1a1a32;
}
.font-card-left {
  flex: 1;
  min-width: 0;
}
.font-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.font-preview {
  font-size: 17px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.font-guidance {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.font-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.fav-btn {
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text3);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.fav-btn:hover { border-color: var(--accent); color: var(--text); }
.fav-btn.is-fav { border-color: var(--accent); background: var(--accent-soft); color: var(--accent2); }
.copy-btn {
  flex-shrink: 0;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  min-height: 36px;
  cursor: pointer;
  transition: filter .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.copy-btn:hover { filter: brightness(1.12); }
.copy-btn.copied {
  border-color: #10b981;
  color: #ecfdf5;
  background: #059669;
}
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text3);
  font-size: 15px;
}

/* Copy next prompt */
.copy-next-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  border-top: 1px solid rgba(16, 185, 129, .28);
  background: rgba(16, 185, 129, .08);
}
.copy-next-panel[hidden] { display: none; }
.copy-next-copy strong { display: block; color: #6ee7b7; font-size: 12px; }
.copy-next-copy span { display: block; color: var(--text2); font-size: 11px; margin-top: 2px; }
.copy-next-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.copy-next-link {
  border: 1px solid #2f5d55;
  background: #102722;
  color: #a7f3d0;
  text-decoration: none;
  border-radius: 999px;
  padding: 6px 11px;
  font: 500 11px var(--ff-body);
  white-space: nowrap;
  cursor: pointer;
}
.copy-next-link:hover { border-color: #34d399; color: #fff; }

/* Below-results utility bars inside tool-wrap */
.cat-deep-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
}
.cat-deep-label { color: var(--text3); font-weight: 600; }
.cat-deep-links { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-deep-links a {
  color: var(--accent2);
  text-decoration: none;
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface2);
  font-weight: 500;
  transition: border-color .15s, color .15s;
}
.cat-deep-links a:hover { border-color: var(--accent); color: var(--text); }

/* Destination Fit (moved below main results to keep first screen focused) */
.destination-fit {
  padding: 18px 18px 20px;
  border-top: 1px solid var(--border);
  background: rgba(124, 58, 237, .04);
}
.fit-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.fit-head .fit-title {
  font-family: var(--ff-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 3px;
}
.fit-head p { color: var(--text2); font-size: 12px; line-height: 1.5; margin: 0; max-width: 620px; }
.fit-destinations { display: flex; flex-wrap: wrap; gap: 6px; }
.fit-destination-btn {
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text2);
  border-radius: 999px;
  padding: 6px 11px;
  font: 500 11px var(--ff-body);
  cursor: pointer;
}
.fit-destination-btn:hover, .fit-destination-btn.active {
  color: var(--accent2);
  border-color: rgba(124, 58, 237, .55);
  background: rgba(124, 58, 237, .16);
}
.fit-note { color: var(--text2); font-size: 12px; line-height: 1.5; margin: 10px 0; }
.fit-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  min-height: 196px;
  overflow-anchor: none;
}
.fit-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
  padding: 12px;
  min-width: 0;
}
.fit-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.fit-card-name { font-size: 10px; color: var(--text3); letter-spacing: .06em; text-transform: uppercase; }
.fit-rank { font-size: 9px; color: var(--accent2); text-transform: uppercase; letter-spacing: .05em; }
.fit-preview { color: var(--text); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px; }
.fit-metrics { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.fit-metric { border: 1px solid var(--border); border-radius: 999px; padding: 2px 7px; color: var(--text2); font-size: 10px; white-space: nowrap; }
.fit-guidance { color: var(--text2); font-size: 11px; line-height: 1.45; }
.fit-guidance strong { color: var(--text3); text-transform: uppercase; letter-spacing: .04em; font-size: 9px; margin-right: 4px; }
.fit-unchanged { color: var(--text3); font-size: 10px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fit-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.fit-summary { color: var(--text3); font-size: 11px; line-height: 1.4; }
.fit-open-link { color: var(--accent2); text-decoration: none; font-size: 12px; font-weight: 600; white-space: nowrap; }
.fit-open-link:hover { color: var(--text); }

/* Tool summary stats bar (bottom of workbench) */
.tool-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.tool-stat { background: rgba(20, 20, 42, .75); padding: 10px 14px; }
.tool-stat strong { display: block; font-family: var(--ff-head); font-size: 17px; line-height: 1.1; color: var(--text); margin-bottom: 2px; }
.tool-stat span { display: block; font-size: 11px; color: var(--text3); letter-spacing: .06em; text-transform: uppercase; }

/* Homepage below-the-fold sections (tools-strip + latest updates) */
.tools-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.tools-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tools-scroll::-webkit-scrollbar { display: none; }
.tool-pill {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 15px;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.tool-pill:hover { color: var(--accent2); border-color: rgba(124, 58, 237, .45); }

.latest-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.latest-head .lead { margin-bottom: 0; }
.view-all-link {
  flex-shrink: 0;
  color: var(--accent2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.view-all-link:hover { color: var(--text); }
.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.latest-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  transition: transform .18s, border-color .18s;
}
.latest-card:hover { transform: translateY(-2px); border-color: var(--border2); }
.latest-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.latest-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(6, 182, 212, .1);
  border: 1px solid rgba(6, 182, 212, .24);
}
.latest-arrow { color: var(--accent2); font-size: 18px; }
.latest-card h3 { font-family: var(--ff-head); color: var(--text); font-size: 16px; line-height: 1.3; margin-bottom: 6px; }
.latest-card p { color: var(--text2); font-size: 13px; line-height: 1.55; margin: 0; }

/* Responsive */
@media (max-width: 860px) {
  .tool-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .style-filter-bar { width: 100%; }
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .fit-results { grid-template-columns: 1fr; }
  .fit-head, .fit-footer { align-items: flex-start; flex-direction: column; }
  .fit-open-link { white-space: normal; }
}
@media (max-width: 640px) {
  .hero { padding: 14px 0 24px; }
  .hero h1 { font-size: 28px; letter-spacing: -.7px; }
  .hero-sub { font-size: 14px; margin-bottom: 12px; }
  .tool-input-area { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .input-wrapper { flex: 1 1 100%; }
  .home-tool-actions { margin-left: auto; }
  .tool-controls-bar { padding: 8px 14px; }
  .quick-examples { padding: 7px 14px; }
  .font-results { grid-template-columns: 1fr; padding: 12px 14px 16px; max-height: 460px; }
  .font-card { padding: 11px 12px; }
  .cat-deep-bar, .destination-fit { padding: 12px 14px; }
  .tool-stats { grid-template-columns: repeat(2, 1fr); }
  .copy-next-panel { align-items: flex-start; flex-direction: column; }
  .copy-next-links { justify-content: flex-start; }
  .latest-head { align-items: flex-start; flex-direction: column; }
  .latest-grid { grid-template-columns: 1fr; }
}
