/* ============================================================================
   AURIC ARTISAN — FONT LIBRARY
   Shares the exact design system of the URL-Analyzer: it consumes the site
   tokens from /css/core/tokens.css (+ dark-mode.css), so theming, gold accent
   and dark/light all behave identically. Only the --fl-* aliases below map
   those tokens onto the names this file uses; nothing is hard-coded.
   ========================================================================== */

.fl {
  /* alias the live site tokens → so body.dark-mode themes us automatically */
  --fl-bg: var(--color-bg, #faf9f6);
  --fl-bg-muted: var(--color-bg-muted, #f1f0ec);
  --fl-bg-card: var(--color-bg-card, #fff);
  --fl-bg-elevated: var(--color-bg-elevated, #fff);
  --fl-text: var(--color-text, #14130f);
  --fl-text-secondary: var(--color-text-secondary, #3a382f);
  --fl-text-muted: var(--color-text-muted, #6b6a63);
  --fl-border: var(--color-border, #e6e3da);
  --fl-border-strong: var(--color-border-strong, #d6d2c6);
  --fl-danger: var(--color-danger, #d9442b);
  --fl-success: var(--color-success, #1f9d57);
  --fl-info: var(--color-info, #2563eb);
  --fl-shadow-sm: var(--shadow-sm, 0 1px 2px rgba(20, 19, 15, .06));
  --fl-shadow-md: var(--shadow-md, 0 4px 18px rgba(20, 19, 15, .08));
  --fl-shadow-lg: var(--shadow-xl, 0 18px 50px rgba(20, 19, 15, .16));
  --fl-radius: var(--radius-lg, 12px);
  --fl-radius-sm: var(--radius-md, 8px);
  --fl-radius-lg: var(--radius-xl, 18px);
  --fl-pill: var(--radius-full, 999px);
  /* fallbacks so the gold + fonts resolve even standalone */
  --color-gold-rgb: var(--color-gold-rgb, 211, 175, 55);
  --color-gold-ink: var(--color-gold-ink, #2a2512);
  --color-gold-light: rgba(var(--color-gold-rgb), 0.08);
  --color-gold-medium: rgba(var(--color-gold-rgb), 0.18);
  --color-gold-strong: rgba(var(--color-gold-rgb), 0.35);
}

/* ── reset within the app ───────────────────────────────────────────── */
.fl, .fl * , .fl *::before, .fl *::after { box-sizing: border-box; }
.fl {
  font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);
  color: var(--fl-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.fl img { max-width: 100%; }
.fl button { font-family: inherit; }
.fl button:disabled,
.fl a[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── hero ───────────────────────────────────────────────────────────── */
.fl-hero {
  text-align: center;
  padding: clamp(28px, 6vw, 64px) 20px clamp(18px, 3vw, 28px);
  background:
    radial-gradient(900px 320px at 50% -120px, var(--color-gold-light), transparent 70%);
}
.fl-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 6vw, 52px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.04;
}
.fl-hero h1 .fl-grad {
  background: linear-gradient(100deg, var(--color-gold), #b98f1f 60%, var(--color-gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fl-hero p {
  margin: 0 auto;
  max-width: 620px;
  color: var(--fl-text-muted);
  font-size: clamp(14px, 2.4vw, 17px);
  line-height: 1.6;
}
.fl-hero-stats {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  justify-content: center; margin-top: 18px;
}
.fl-hero-stat { display: flex; align-items: baseline; gap: 7px; font-size: 13px; color: var(--fl-text-muted); }
.fl-hero-stat b { font-size: 18px; color: var(--fl-text); font-weight: 800; }

/* ── header extras (the .anz-header chrome comes from analyzer.css) ──── */
.fl-size {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: var(--text-xs, 11px); color: var(--fl-text-muted);
}
.fl-size input[type=range] { width: 104px; accent-color: var(--color-gold); }
.fl-size b { color: var(--fl-text); min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
#fl-preview-text { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); }

.fl-sort-select {
  padding: var(--space-2, 8px) var(--space-3, 12px); border: 1px solid var(--fl-border);
  border-radius: var(--fl-pill); background: var(--fl-bg-card); color: var(--fl-text);
  font-size: var(--text-sm, 12px); cursor: pointer; outline: none;
}
.fl-sort-select:focus { border-color: var(--color-gold); }
.anz-this.is-active { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-gold-ink); }
.fl-btn--sm { padding: 6px 12px !important; font-size: var(--text-xs, 11px) !important; }

/* ── collapsible secondary filters ─────────────────────────────────── */
.fl-filters-panel {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 24px;
  padding: var(--space-5, 20px); margin: 0 var(--space-4, 16px);
  border: 1px solid var(--fl-border); border-radius: var(--fl-radius);
  background: var(--fl-bg-muted); align-items: start;
}
.fl-filters-panel[hidden] { display: none; }
.fl-filters-panel > .anz-this { grid-column: 1 / -1; justify-self: start; }
.fl-facet > h4 {
  margin: 0 0 9px; font-size: var(--text-2xs, 10px); letter-spacing: .09em; text-transform: uppercase;
  color: var(--fl-text-muted); font-weight: 800;
}
.fl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fl-chip {
  padding: 5px 10px; border: 1px solid var(--fl-border); border-radius: var(--fl-pill);
  font-size: var(--text-sm, 12px); cursor: pointer; color: var(--fl-text-secondary);
  background: var(--fl-bg-card); transition: all .12s; user-select: none;
}
.fl-chip:hover { border-color: var(--color-gold); }
.fl-chip.is-active { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-gold-ink); font-weight: 700; }

.fl-results-count { font-size: var(--text-sm, 12px); color: var(--fl-text-muted); white-space: nowrap; }
.fl-results-count b { color: var(--fl-text); }

/* ── font card grid ─────────────────────────────────────────────────── */
.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.fl-grid.is-list { grid-template-columns: 1fr; }
.fl-card {
  position: relative; border: 1px solid var(--fl-border); border-radius: var(--fl-radius);
  background: var(--fl-bg-card); padding: 18px 20px 16px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s; overflow: hidden;
  content-visibility: auto; contain-intrinsic-size: 200px;
}
.fl-card:hover { border-color: var(--color-gold-medium); box-shadow: var(--fl-shadow-md); transform: translateY(-2px); }
.fl-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.fl-card-name { font-size: 15px; font-weight: 700; }
.fl-card-meta { font-size: 11.5px; color: var(--fl-text-muted); margin-top: 2px; }
.fl-card-fav {
  flex: none; border: 0; background: transparent; cursor: pointer; color: var(--fl-text-muted);
  font-size: 17px; line-height: 1; padding: 2px; transition: color .12s, transform .12s;
}
.fl-card-fav:hover { transform: scale(1.18); }
.fl-card-fav.is-on { color: var(--color-gold); }
.fl-card-specimen {
  font-size: 34px; line-height: 1.25; min-height: 56px; word-break: break-word;
  color: var(--fl-text); transition: opacity .25s; overflow: hidden;
}
.fl-card-specimen.is-loading { opacity: .25; }
.fl-card-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }

/* badges */
.fl-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--fl-pill); font-size: 10.5px; font-weight: 700;
  letter-spacing: .02em; border: 1px solid transparent; white-space: nowrap;
}
.fl-badge--cat { background: var(--fl-bg-muted); color: var(--fl-text-secondary); border-color: var(--fl-border); text-transform: capitalize; }
.fl-badge--var { background: rgba(37,99,235,.1); color: var(--fl-info); border-color: rgba(37,99,235,.25); }
.fl-badge--lic { background: rgba(31,157,87,.1); color: var(--fl-success); border-color: rgba(31,157,87,.25); text-transform: uppercase; }
.fl-badge--gold { background: var(--color-gold-light); color: #8a6d12; border-color: var(--color-gold-medium); }
.fl-badge--sys { background: rgba(168,85,247,.12); color: #9333ea; border-color: rgba(168,85,247,.28); }
body.dark-mode .fl-badge--gold { color: var(--color-gold); }

/* ── skeleton ───────────────────────────────────────────────────────── */
.fl-skel { background: linear-gradient(90deg, var(--fl-bg-muted) 25%, var(--fl-bg-elevated) 50%, var(--fl-bg-muted) 75%); background-size: 200% 100%; animation: fl-shimmer 1.3s infinite; border-radius: 6px; }
@keyframes fl-shimmer { to { background-position: -200% 0; } }
.fl-empty { text-align: center; padding: 70px 20px; color: var(--fl-text-muted); }
.fl-empty svg { opacity: .4; margin-bottom: 12px; }

/* ── infinite-scroll sentinel ───────────────────────────────────────── */
.fl-sentinel { height: 1px; }
.fl-loadmore { text-align: center; padding: 24px; }

/* ════════════════════════════════════════════════════════════════════
   DETAIL DRAWER
   ════════════════════════════════════════════════════════════════════ */
.fl-drawer-scrim {
  position: fixed; inset: 0; z-index: 90; background: rgba(10, 9, 6, .55);
  opacity: 0; pointer-events: none; transition: opacity .25s; backdrop-filter: blur(2px);
}
.fl-drawer-scrim.is-open { opacity: 1; pointer-events: auto; }
.fl-drawer {
  position: fixed; top: 0; right: 0; z-index: 95; height: 100vh;
  width: min(940px, 96vw); transform: translateX(100%); transition: transform .32s cubic-bezier(.4, 0, .1, 1);
  background: var(--fl-bg); box-shadow: var(--fl-shadow-lg); display: flex; flex-direction: column;
  border-left: 1px solid var(--fl-border);
}
.fl-drawer.is-open { transform: none; }
.fl-drawer-head {
  display: flex; align-items: flex-start; gap: 14px; justify-content: space-between;
  padding: 18px clamp(16px, 3vw, 28px); border-bottom: 1px solid var(--fl-border); flex: none;
}
.fl-drawer-title h2 { margin: 0; font-size: clamp(22px, 4vw, 30px); font-weight: 800; letter-spacing: -.01em; }
.fl-drawer-title .fl-sub { margin-top: 5px; font-size: 13px; color: var(--fl-text-muted); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.fl-drawer-actions { display: flex; gap: 8px; flex: none; }
.fl-drawer-close { border: 1px solid var(--fl-border); background: var(--fl-bg-card); border-radius: var(--fl-pill); width: 38px; height: 38px; font-size: 18px; cursor: pointer; color: var(--fl-text-muted); }
.fl-drawer-close:hover { color: var(--fl-danger); border-color: var(--fl-danger); }

.fl-tabs { display: flex; gap: 2px; padding: 0 clamp(16px, 3vw, 28px); border-bottom: 1px solid var(--fl-border); overflow-x: auto; flex: none; scrollbar-width: thin; }
.fl-tab {
  border: 0; background: transparent; padding: 12px 14px; font-size: 13px; font-weight: 600;
  color: var(--fl-text-muted); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 6px;
}
.fl-tab:hover { color: var(--fl-text); }
.fl-tab.is-active { color: var(--color-gold); border-bottom-color: var(--color-gold); }
.fl-tab .fl-tab-i { font-size: 14px; }

.fl-drawer-body { flex: 1; overflow-y: auto; padding: clamp(18px, 3vw, 28px); }
.fl-pane { display: none; }
.fl-pane.is-active { display: block; animation: fl-fade .2s ease; }
@keyframes fl-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── specimen + rich editor ─────────────────────────────────────────── */
.fl-editor-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 10px 12px; border: 1px solid var(--fl-border); border-radius: var(--fl-radius) var(--fl-radius) 0 0;
  background: var(--fl-bg-muted); position: sticky; top: 0; z-index: 2;
}
.fl-tool-group { display: flex; align-items: center; gap: 4px; padding-right: 8px; margin-right: 4px; border-right: 1px solid var(--fl-border); }
.fl-tool-group:last-child { border-right: 0; }
.fl-tool {
  min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--fl-text-secondary); cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
}
.fl-tool:hover { background: var(--fl-bg-card); border-color: var(--fl-border); }
.fl-tool.is-active { background: var(--color-gold); color: var(--color-gold-ink); }
.fl-tool b { font-weight: 800; } .fl-tool i { font-style: italic; } .fl-tool u { text-decoration: underline; }
.fl-tool-num { width: 58px; }
.fl-tool input[type=number], .fl-tool-input {
  width: 56px; height: 30px; border: 1px solid var(--fl-border); border-radius: 7px; background: var(--fl-bg-card);
  color: var(--fl-text); text-align: center; font-size: 12px;
}
.fl-tool input[type=color] { width: 30px; height: 30px; border: 1px solid var(--fl-border); border-radius: 7px; background: var(--fl-bg-card); cursor: pointer; padding: 2px; }
.fl-tool select { height: 32px; border: 1px solid var(--fl-border); border-radius: 7px; background: var(--fl-bg-card); color: var(--fl-text); font-size: 12px; padding: 0 6px; }

.fl-specimen {
  min-height: 180px; padding: 28px clamp(16px, 3vw, 30px); border: 1px solid var(--fl-border); border-top: 0;
  border-radius: 0 0 var(--fl-radius) var(--fl-radius); outline: none; line-height: 1.3; font-size: 46px;
  color: var(--fl-text); background: var(--fl-bg-card); word-break: break-word; overflow-wrap: anywhere;
}
.fl-specimen:empty::before { content: attr(data-placeholder); color: var(--fl-text-muted); }

/* axis sliders (variable) */
.fl-axes { margin-top: 18px; display: grid; gap: 14px; }
.fl-axis { display: grid; grid-template-columns: 130px 1fr 64px; align-items: center; gap: 12px; }
.fl-axis label { font-size: 12px; font-weight: 700; color: var(--fl-text-secondary); }
.fl-axis label small { display: block; font-weight: 500; color: var(--fl-text-muted); font-family: var(--font-mono); }
.fl-axis input[type=range] { width: 100%; accent-color: var(--color-gold); }
.fl-axis output { font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; font-family: var(--font-mono); color: var(--fl-text); }
.fl-instances { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.fl-preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 4px; }

/* ── weights / styles table ─────────────────────────────────────────── */
.fl-weight-row { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--fl-border); }
.fl-weight-row:last-child { border-bottom: 0; }
.fl-weight-label { flex: none; width: 160px; font-size: 12px; color: var(--fl-text-muted); }
.fl-weight-label b { display: block; color: var(--fl-text); font-size: 14px; }
.fl-weight-sample { flex: 1; font-size: 26px; line-height: 1.2; color: var(--fl-text); word-break: break-word; }

.fl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fl-table th, .fl-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--fl-border); }
.fl-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--fl-text-muted); font-weight: 700; }
.fl-table tr:hover td { background: var(--fl-bg-muted); }
.fl-table .fl-mono { font-family: var(--font-mono); font-size: 12px; color: var(--fl-text-secondary); }

.fl-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 6px;
  padding: 14px 16px;
  border: 1px solid var(--color-gold-medium);
  border-radius: var(--fl-radius);
  background: linear-gradient(90deg, var(--color-gold-light), var(--fl-bg-card));
}
.fl-download-card strong {
  display: block;
  font-size: var(--text-base, 14px);
  color: var(--fl-text);
  margin-bottom: 3px;
}
.fl-download-card span {
  display: block;
  color: var(--fl-text-muted);
  font-size: var(--text-sm, 12px);
  line-height: 1.4;
}

/* ── glyph grid ─────────────────────────────────────────────────────── */
.fl-glyph-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.fl-glyphs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.fl-glyph {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; position: relative;
  border: 1px solid var(--fl-border); border-radius: var(--fl-radius-sm); font-size: 30px; cursor: pointer;
  background: var(--fl-bg-card); transition: border-color .12s, background .12s; line-height: 1; overflow: hidden;
}
.fl-glyph:hover { border-color: var(--color-gold); background: var(--color-gold-light); }
.fl-glyph::after { content: attr(data-cp); position: absolute; bottom: 2px; right: 4px; font-size: 8px; color: var(--fl-text-muted); font-family: var(--font-mono); }

/* ── about / info grids ─────────────────────────────────────────────── */
.fl-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.fl-info { border: 1px solid var(--fl-border); border-radius: var(--fl-radius); padding: 14px 16px; background: var(--fl-bg-card); }
.fl-info h5 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--fl-text-muted); font-weight: 800; }
.fl-info p { margin: 0; font-size: 14px; color: var(--fl-text); word-break: break-word; }
.fl-info a { color: var(--color-gold); text-decoration: none; } .fl-info a:hover { text-decoration: underline; }
.fl-section-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--fl-text-muted); margin: 26px 0 12px; }
.fl-prose { font-size: 14.5px; line-height: 1.65; color: var(--fl-text-secondary); max-width: 70ch; }

/* license */
.fl-license-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fl-perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin: 14px 0; }
.fl-perm { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--fl-border); border-radius: var(--fl-radius-sm); font-size: 13px; background: var(--fl-bg-card); }
.fl-perm .fl-perm-i { font-size: 15px; }
.fl-perm.is-yes .fl-perm-i { color: var(--fl-success); } .fl-perm.is-no .fl-perm-i { color: var(--fl-danger); }
.fl-license-text { margin-top: 12px; max-height: 360px; overflow: auto; padding: 16px; border: 1px solid var(--fl-border); border-radius: var(--fl-radius); background: var(--fl-bg-card); font-family: var(--font-mono); font-size: 12px; line-height: 1.55; white-space: pre-wrap; color: var(--fl-text-secondary); }

/* ── embed / code ───────────────────────────────────────────────────── */
.fl-embed-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fl-code { position: relative; border: 1px solid var(--fl-border); border-radius: var(--fl-radius); background: #1c1b16; color: #ece6d4; overflow: hidden; }
body.dark-mode .fl-code { background: #100f0b; }
.fl-code pre { margin: 0; padding: 16px 18px; overflow: auto; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; white-space: pre; }
.fl-code .fl-copy { position: absolute; top: 10px; right: 10px; }
.fl-code-tok-tag { color: #e5a44d; } .fl-code-tok-attr { color: #9fc6ff; } .fl-code-tok-str { color: #b6e3a0; } .fl-code-tok-prop { color: #e5a44d; } .fl-code-tok-com { color: #7c7768; }

/* selected weights builder */
.fl-weight-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }

/* ── selected fonts tray ────────────────────────────────────────────── */
.fl-tray {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  width: min(320px, calc(100vw - 24px)); min-height: 0; max-height: min(420px, calc(100vh - 32px));
  border: 1px solid var(--fl-border); border-radius: 18px;
  background: var(--fl-bg-elevated); box-shadow: var(--fl-shadow-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(calc(100% + 18px)); transition: transform .3s cubic-bezier(.4,0,.1,1); opacity: 0;
}
.fl-tray.is-open { transform: none; opacity: 1; }
.fl-tray-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; background: var(--color-gold-light); border-bottom: 1px solid var(--fl-border); }
.fl-tray-head b { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; }
.fl-tray-head b span { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--color-gold); color: var(--color-gold-ink); font-size: 10px; text-align: center; font-family: var(--font-mono); }
.fl-tray-list { flex: 1 1 auto; min-height: 0; max-height: 178px; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.fl-tray-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px 6px 11px; border: 1px solid var(--fl-border);
  border-radius: 999px; background: var(--fl-bg-card); color: var(--fl-text);
  font-size: 12px; line-height: 1.2;
}
.fl-tray-item:hover { border-color: var(--color-gold-medium); background: var(--color-gold-light); }
.fl-tray-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-tray-item .x {
  flex: none; width: 22px; height: 22px; border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--fl-text-muted); cursor: pointer; font-size: 13px; line-height: 1;
}
.fl-tray-item .x:hover { border-color: var(--fl-danger); color: var(--fl-danger); }
.fl-tray-foot { display: flex; flex-wrap: wrap; gap: 7px; padding: 9px 12px 11px; border-top: 1px solid var(--fl-border); }
.fl-tray-foot .anz-this,
.fl-tray-foot .anz-go { flex: 1 1 auto; }
.fl-tray-foot .anz-this,
.fl-tray-foot .anz-go,
#fl-d-add.is-active { border-radius: 999px !important; }
.fl-tray-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 79;
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 0; border-radius: 999px !important;
  background: var(--color-gold); color: var(--color-gold-ink); font-weight: 800; cursor: pointer; box-shadow: var(--fl-shadow-md);
  font-size: 12px; line-height: 1; transition: transform .15s, opacity .2s;
}
.fl-tray-fab:hover { transform: translateY(-2px); }
.fl-tray-fab .fl-tray-fab-count { min-width: 20px; background: var(--color-gold-ink); color: var(--color-gold); border-radius: 999px; padding: 2px 7px; font-size: 11px; font-family: var(--font-mono); text-align: center; }

/* toast */
.fl-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); z-index: 200; background: var(--fl-text); color: var(--fl-bg); padding: 11px 20px; border-radius: var(--fl-pill); font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: var(--fl-shadow-md); }
.fl-toast.is-show { opacity: 1; transform: translateX(-50%); }

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .fl-grid { grid-template-columns: 1fr; }
  .fl-filters-panel { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .fl-specimen { font-size: 32px; padding: 18px; }
  .fl-weight-label { width: 110px; }
  .fl-axis { grid-template-columns: 90px 1fr 52px; }
  .fl-download-card { align-items: stretch; flex-direction: column; }
  .fl-drawer-actions { flex-wrap: wrap; justify-content: flex-end; }
}

/* ════════════════════════════════════════════════════════════════════
   SCORES · COLLECTIONS · RECOMMENDER
   ════════════════════════════════════════════════════════════════════ */
/* score colour scale */
.fl-score { font-variant-numeric: tabular-nums; }
.fl-score.is-great { background: rgba(31,157,87,.14); color: var(--fl-success); border-color: rgba(31,157,87,.3); }
.fl-score.is-good  { background: rgba(101,163,13,.13); color: #65a30d; border-color: rgba(101,163,13,.3); }
.fl-score.is-ok    { background: rgba(217,164,43,.14); color: #b8860b; border-color: rgba(217,164,43,.3); }
.fl-score.is-low   { background: rgba(217,68,43,.12); color: var(--fl-danger); border-color: rgba(217,68,43,.28); }
body.dark-mode .fl-score.is-good { color: #a3e635; }
body.dark-mode .fl-score.is-ok { color: #e5b94e; }

/* ── featured collections ───────────────────────────────────────────── */
.fl-featured { padding: 8px clamp(14px,4vw,28px) 0; }
.fl-featured-head { display: flex; align-items: baseline; gap: 8px; padding: 10px 2px; }
.fl-featured-head strong { font-size: var(--text-lg,16px); }
.fl-featured-head span { color: var(--fl-text-muted); font-size: var(--text-sm,12px); }
.fl-collection { margin-bottom: 18px; }
.fl-collection-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.fl-collection-head h3 { margin: 0; font-size: var(--text-md,15px); font-weight: 800; }
.fl-collection-head span { color: var(--fl-text-muted); font-size: var(--text-xs,11px); }
.fl-collection-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr);
  gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.fl-collection-row::-webkit-scrollbar { height: 7px; }
.fl-collection-row::-webkit-scrollbar-thumb { background: var(--fl-border-strong); border-radius: 8px; }
.fl-mini {
  scroll-snap-align: start; text-align: left; cursor: pointer;
  border: 1px solid var(--fl-border); border-radius: var(--fl-radius); background: var(--fl-bg-card);
  padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s, box-shadow .15s, transform .15s; min-height: 104px;
}
.fl-mini:hover { border-color: var(--color-gold-medium); box-shadow: var(--fl-shadow-md); transform: translateY(-2px); }
.fl-mini-spec { font-size: 30px; line-height: 1.1; color: var(--fl-text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fl-mini-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fl-mini-name { font-size: var(--text-xs,11px); color: var(--fl-text-muted); font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ── recommender panel ──────────────────────────────────────────────── */
.fl-reco {
  margin: 6px clamp(14px,4vw,28px) 0; padding: var(--space-5,20px);
  border: 1px solid var(--color-gold-medium); border-radius: var(--fl-radius-lg);
  background: var(--color-gold-light);
}
.fl-reco[hidden] { display: none; }
.fl-reco-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.fl-reco-head strong { font-size: var(--text-lg,16px); display: block; }
.fl-reco-head span { color: var(--fl-text-muted); font-size: var(--text-sm,12px); }
.fl-reco-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }
.fl-reco-field { display: flex; flex-direction: column; gap: 7px; }
.fl-reco-field > span { font-size: var(--text-2xs,10px); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--fl-text-muted); }
.fl-reco-field > span small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.fl-seg2 { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--fl-border); border-radius: var(--fl-pill); background: var(--fl-bg-card); width: fit-content; }
.fl-seg2 button { border: 0; background: transparent; color: var(--fl-text-muted); padding: 6px 12px; border-radius: var(--fl-pill); font-size: var(--text-xs,11px); font-weight: 700; cursor: pointer; }
.fl-seg2 button.is-active { background: var(--color-gold); color: var(--color-gold-ink); }
.fl-reco-palette { position: relative; }
.fl-pal-swatches { display: flex; gap: 4px; margin-top: 4px; }
.fl-pal-swatches i { width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--fl-border-strong); }
.fl-reco-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.fl-reco-note { font-size: var(--text-xs,11px); color: var(--fl-text-secondary); }
.fl-reco-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 10px; margin-top: 16px; }
.fl-reco-card {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--fl-border); border-radius: var(--fl-radius); background: var(--fl-bg-card);
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s, transform .12s;
}
.fl-reco-card:hover { border-color: var(--color-gold-medium); box-shadow: var(--fl-shadow-md); transform: translateY(-1px); }
.fl-reco-rank { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--fl-bg-muted); color: var(--fl-text-muted); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.fl-reco-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fl-reco-spec { font-size: 26px; line-height: 1.05; color: var(--fl-text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fl-reco-sub { font-size: var(--text-2xs,10px); color: var(--fl-text-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fl-reco-match { flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1; padding: 6px 10px; border-radius: var(--fl-radius-sm); border: 1px solid transparent; }
.fl-reco-match b { font-size: 19px; font-variant-numeric: tabular-nums; }
.fl-reco-match small { font-size: 8px; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }

/* ── suitability pane (scores) ──────────────────────────────────────── */
.fl-score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 12px; }
.fl-score-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--fl-border); border-radius: var(--fl-radius); background: var(--fl-bg-card); }
.fl-score-ring {
  --p: 0; flex: none; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
  background: radial-gradient(closest-side, var(--fl-bg-card) 76%, transparent 77%),
              conic-gradient(currentColor calc(var(--p) * 1%), var(--fl-border) 0);
}
.fl-score-card.is-great .fl-score-ring { color: var(--fl-success); }
.fl-score-card.is-good .fl-score-ring { color: #65a30d; }
.fl-score-card.is-ok .fl-score-ring { color: #b8860b; }
.fl-score-card.is-low .fl-score-ring { color: var(--fl-danger); }
.fl-score-ring span { color: var(--fl-text); }
.fl-score-meta b { font-size: var(--text-base,14px); display: block; }
.fl-score-meta small { color: var(--fl-text-muted); font-size: var(--text-xs,11px); line-height: 1.35; display: block; margin-top: 2px; }
.fl-bars { display: flex; flex-direction: column; gap: 9px; }
.fl-bar-row { display: grid; grid-template-columns: 220px 1fr 34px; align-items: center; gap: 12px; }
.fl-bar-label { font-size: var(--text-sm,12px); color: var(--fl-text-secondary); }
.fl-bar-label small { color: var(--fl-text-muted); font-family: var(--font-mono); font-size: 10px; }
.fl-bar-track { height: 8px; background: var(--fl-bg-muted); border-radius: 6px; overflow: hidden; }
.fl-bar-fill { display: block; height: 100%; border-radius: 6px; background: var(--color-gold); transition: width .4s; }
.fl-bar-fill.is-great { background: var(--fl-success); } .fl-bar-fill.is-good { background: #65a30d; }
.fl-bar-fill.is-ok { background: #c79a2e; } .fl-bar-fill.is-low { background: var(--fl-danger); }
.fl-bar-val { text-align: right; font-size: var(--text-xs,11px); font-variant-numeric: tabular-nums; color: var(--fl-text); }
@media (max-width: 560px) { .fl-bar-row { grid-template-columns: 130px 1fr 30px; } }

/* ── OpenType toggles (specimen) ────────────────────────────────────── */
.fl-otf { margin-top: 18px; border: 1px solid var(--fl-border); border-radius: var(--fl-radius); padding: 14px 16px; background: var(--fl-bg-muted); }
.fl-otf-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.fl-otf-head strong { font-size: var(--text-sm,12px); }
.fl-otf-head span { font-size: var(--text-xs,11px); color: var(--fl-text-muted); }
.fl-otf-groups { display: flex; flex-direction: column; gap: 10px; }
.fl-otf-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fl-otf-group h6 { margin: 0 8px 0 0; width: 100%; font-size: var(--text-2xs,10px); text-transform: uppercase; letter-spacing: .07em; color: var(--fl-text-muted); font-weight: 800; }
.fl-otf-chip { font-family: var(--font-mono); font-size: 11px; }

/* ── pairings ───────────────────────────────────────────────────────── */
.fl-pair-preview { border: 1px solid var(--fl-border); border-radius: var(--fl-radius); padding: 20px 22px; background: var(--fl-bg-card); margin-bottom: 8px; }
.fl-pair-tag { font-size: var(--text-2xs,10px); text-transform: uppercase; letter-spacing: .08em; color: var(--fl-text-muted); font-weight: 800; margin-bottom: 4px; }
.fl-pair-h { font-size: clamp(28px,5vw,46px); font-weight: 700; line-height: 1.1; margin-bottom: 14px; word-break: break-word; }
.fl-pair-b { font-size: 16px; line-height: 1.6; color: var(--fl-text-secondary); margin: 0 0 16px; max-width: 64ch; }
.fl-pair-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fl-pair-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 10px; }
.fl-pair-card { display: flex; flex-direction: column; gap: 10px; text-align: left; cursor: pointer; border: 1px solid var(--fl-border); border-radius: var(--fl-radius); background: var(--fl-bg-card); padding: 14px 16px; transition: border-color .15s, box-shadow .15s; }
.fl-pair-card:hover { border-color: var(--color-gold-medium); box-shadow: var(--fl-shadow-md); }
.fl-pair-card.is-active { border-color: var(--color-gold); box-shadow: 0 0 0 2px var(--color-gold-light); }
.fl-pair-spec { font-size: 28px; line-height: 1.05; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fl-pair-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fl-pair-name { font-size: var(--text-xs,11px); color: var(--fl-text); font-weight: 600; overflow: hidden; }
.fl-pair-name em { color: var(--fl-text-muted); font-style: normal; }

/* ── features gallery ───────────────────────────────────────────────── */
.fl-feat-list { display: flex; flex-direction: column; }
.fl-feat-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--fl-border); }
.fl-feat-row:hover { background: var(--fl-bg-muted); }
.fl-feat-label b { display: block; font-size: var(--text-sm,12px); }
.fl-feat-label code { font-family: var(--font-mono); font-size: 11px; color: var(--fl-text-muted); }
.fl-feat-demo { display: flex; align-items: center; gap: 16px; font-size: 26px; line-height: 1; flex-wrap: wrap; }
.fl-feat-off { color: var(--fl-text-muted); opacity: .65; }
.fl-feat-arrow { color: var(--color-gold); font-size: 16px; }
.fl-feat-on { color: var(--fl-text); }
@media (max-width: 560px) { .fl-feat-row { grid-template-columns: 1fr; gap: 6px; } .fl-feat-demo { font-size: 22px; } }

/* ── develop / type scale ───────────────────────────────────────────── */
.fl-scale-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.fl-scale-preview { display: flex; flex-direction: column; gap: 4px; }
.fl-scale-row { display: flex; align-items: baseline; gap: 16px; padding: 6px 0; border-bottom: 1px dashed var(--fl-border); overflow: hidden; }
.fl-scale-tag { flex: none; width: 130px; font-size: var(--text-xs,11px); color: var(--fl-text-muted); font-family: var(--font-mono); }
.fl-scale-tag small { display: block; opacity: .7; }
.fl-scale-sample { color: var(--fl-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── compare ────────────────────────────────────────────────────────── */
.fl-cmp-wrap { overflow-x: auto; }
.fl-cmp { width: 100%; border-collapse: collapse; min-width: 520px; }
.fl-cmp th, .fl-cmp td { padding: 12px 14px; border-bottom: 1px solid var(--fl-border); text-align: left; vertical-align: middle; font-size: var(--text-sm,12px); }
.fl-cmp th { position: sticky; top: 0; background: var(--fl-bg); z-index: 1; border-bottom: 2px solid var(--fl-border-strong); }
.fl-cmp-open { background: none; border: 0; color: var(--color-gold); font-weight: 800; font-size: var(--text-base,14px); cursor: pointer; padding: 0; }
.fl-cmp-open:hover { text-decoration: underline; }
.fl-cmp-label { color: var(--fl-text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: var(--text-2xs,10px); white-space: nowrap; }
.fl-cmp tr:hover td { background: var(--fl-bg-muted); }

@media (prefers-reduced-motion: reduce) {
  .fl-drawer, .fl-tray, .fl-card, .fl-toast, .fl-skel, .fl-mini, .fl-reco-card, .fl-bar-fill, .fl-pair-card { transition: none; animation: none; }
}
