:root {
  --bg: #ffffff;
  --fg: #000000;
  --line: 1px solid #beb9b9;
  --ui-font: 'keynotesans';
}

/* ── Topbar ── */
#topbar {
  position: fixed;
  top: 0;
  left: 0;
  height: 55px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  z-index: 1000;
  background-color: var(--bg);
  border-bottom: var(--line);
}

#topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.logo-link {
  text-decoration: none;
  color: var(--fg);
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
}

.logo {
  display: flex;
  gap: 1px;
  font-size: 20px;
  letter-spacing: 2px;
  font-family: var(--ui-font);
  color: var(--fg);
}

.logo-letter { color: var(--fg); }

.type-foundry {
  font-family: 'keynotesans';
  font-size: 12px;
  letter-spacing: 3px;
}

#topbar-right a {
  opacity: 1; /* was 0.5 but topbar-right items should always show */
}

#topbar-right a:hover { opacity: 1; }

#logo-small {
  opacity: 1; /* was 0 — always visible */
  transition: opacity 0.3s ease;
}

/* ── Search ── */
#search {
  font-family: 'keynotesans';
  font-size: 16px;
  border: none;
  border-left: var(--line);
  padding: 0 16px;
  height: 49px;
  outline: none;
  background: none;
  width: 180px;
  color: var(--fg);
  opacity: 1;
}

#search-dropdown {
  position: fixed;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border: var(--line);
  border-top: none;
  z-index: 300;
  display: none;
  max-height: 300px;
  overflow-y: auto;
}

#search-dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--fg);
}

#search-dropdown a:hover { background: #f5f5f5; }

.typefaces-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.typeface-item {
  height: 110px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.typeface-name {
  font-size: clamp(10px, 1.2vw, 22px);
  line-height: 0.95;
  text-align: center;

  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.typeface-name br {
  display: block;
}

@media (max-width: 900px) {
    .typefaces-grid {
    grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .typefaces-grid {
    grid-template-columns: 1fr;
    }
}