/* ============================================================
   Dupefont — custom design (replaces Pico CSS)
   ============================================================ */

/* --- Inter, self-hosted (OFL, see fonts/Inter-OFL.txt) --- */
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url(fonts/inter-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url(fonts/inter-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --green: #16a34a;
    --yellow: #eab308;
    --red: #dc2626;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { font-size: 16px; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: .5rem; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin-bottom: .75rem; }
em { font-style: italic; }

img { max-width: 100%; }

.container { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }

/* --- Nav --- */
.site-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px;
}
.nav-brand {
    font-weight: 700; font-size: 1.15rem; color: var(--text);
    display: flex; align-items: center; gap: .6rem;
    text-decoration: none;
}
/* Logo: two overlapping A letters */
.brand-logo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--accent); position: relative;
    flex-shrink: 0;
}
.logo-a {
    font-weight: 800; font-size: 1.15rem; line-height: 1;
    position: absolute;
}
.logo-a-back {
    color: rgba(255,255,255,.35);
    transform: translateX(-3px);
}
.logo-a-front {
    color: #fff;
    transform: translateX(3px);
}
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a {
    color: var(--text-muted); font-size: .9rem; font-weight: 500;
    text-decoration: none; transition: color .15s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* --- Footer (base rules in the enhanced block below) --- */

/* --- Buttons --- */
.btn {
    display: inline-block; padding: .65rem 1.5rem;
    border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem;
    text-decoration: none; cursor: pointer; border: none;
    transition: background .15s, box-shadow .15s;
}
.btn-primary {
    background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-outline {
    background: transparent; color: var(--accent);
    border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; text-decoration: none; }
.btn-lg { padding: .8rem 2rem; font-size: 1.05rem; height: 48px; display: inline-flex; align-items: center; }
.btn-sm { padding: .4rem 1rem; font-size: .85rem; }

/* --- Hero --- */
.hero {
    text-align: center; padding: 3.5rem 0 2.5rem;
}
.hero h1 { font-size: 2.4rem; margin-bottom: .75rem; letter-spacing: -.02em; }
.hero-sm { padding: 2rem 0 1.5rem; }
.hero-sm h1 { font-size: 1.8rem; }
.hero-sub {
    color: var(--text-muted); font-size: 1.1rem;
    max-width: 540px; margin: 0 auto .75rem;
    line-height: 1.5;
}
.results-header { padding: 2rem 0 1rem; }
.results-header h1 { font-size: 1.7rem; }
.results-header .hero-sub { max-width: none; }

/* --- Sections --- */
.section { padding: 2rem 0; }
.section-sub { color: var(--text-muted); margin-bottom: 1rem; }
.section-more { margin-top: 1rem; text-align: center; }

/* --- Pills (tag-like links) --- */
.pill-grid {
    display: flex; flex-wrap: wrap; gap: .5rem;
    justify-content: center;
}
.pill {
    display: inline-block; padding: .45rem 1rem;
    border-radius: 100px; font-size: .9rem; font-weight: 500;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); transition: all .15s;
    text-decoration: none;
    max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pill:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pill-arrow { color: var(--text-muted); margin: 0 .15rem; font-size: .85em; }
.pill-outline { background: transparent; }
.pill-grid-sm .pill { font-size: .82rem; padding: .35rem .85rem; }

/* --- Browse controls --- */
.browse-controls {
    display: flex; flex-wrap: wrap; gap: .75rem;
    align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
}
.search-input {
    padding: .5rem 1rem; border: 1px solid var(--border);
    border-radius: 100px; font-size: .9rem; font-family: var(--font);
    width: 260px; outline: none; transition: border-color .15s;
    background: var(--surface);
}
.search-input:focus { border-color: var(--accent); }
.category-filters { display: flex; gap: .35rem; }
.filter-btn {
    padding: .35rem .85rem; border-radius: 100px; font-size: .82rem;
    font-weight: 500; font-family: var(--font);
    border: 1px solid var(--border); background: transparent;
    color: var(--text-muted); cursor: pointer; transition: all .15s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
    background: var(--accent); color: #fff; border-color: var(--accent);
}

.browse-pagination {
    text-align: center; margin-top: 1rem;
}
.browse-empty {
    text-align: center; color: var(--text-muted); padding: 2rem 0;
    font-size: .9rem;
}

/* --- How it works --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 1rem; }
.step {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; text-align: center;
}
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--accent); color: #fff; font-weight: 700;
    font-size: .95rem; margin-bottom: .75rem;
}
.step h3 { margin-bottom: .4rem; }
.step p { color: var(--text-muted); font-size: .9rem; margin: 0; }

/* --- Upload form --- */
.upload-form {
    max-width: 480px; margin: 0 auto 2rem; text-align: center;
}
.drop-zone {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 180px; border: 2px dashed var(--border); border-radius: var(--radius);
    cursor: pointer; transition: border-color .2s, background .2s;
    padding: 2rem; margin-bottom: 1rem; background: var(--surface);
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent); background: #eff6ff;
}
.drop-zone input[type="file"] { display: none; }
.drop-icon {
    font-size: 2rem; font-weight: 300; color: var(--text-muted);
    width: 48px; height: 48px; display: flex; align-items: center;
    justify-content: center; border: 2px solid var(--border);
    border-radius: 50%; margin-bottom: .75rem;
}
.drop-label { font-weight: 500; margin-bottom: .25rem; }
.drop-hint { font-size: .85rem; color: var(--text-muted); }

/* --- Alerts --- */
.alert {
    padding: .85rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1rem;
    font-size: .9rem;
}
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* --- Query showcase (the user's font, prominent) --- */
.query-showcase {
    background: var(--surface); border: 2px solid var(--accent);
    border-radius: var(--radius); padding: 1.5rem;
    margin-bottom: 2rem; box-shadow: var(--shadow-md);
}
.query-label {
    font-size: .8rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--accent); margin-bottom: .75rem;
}
.query-font-name {
    font-size: 1.5rem; font-weight: 700; margin-bottom: .6rem;
}
.query-preview .preview-lg { font-size: 2rem; line-height: 1.3; margin-bottom: .35rem; }
.query-preview .preview-md { font-size: 1.1rem; color: var(--text-muted); margin: 0; }

/* --- Match cards --- */
.match-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    margin-bottom: 1rem; box-shadow: var(--shadow);
    transition: box-shadow .15s;
}
.match-card:hover { box-shadow: var(--shadow-md); }

.match-header {
    display: flex; align-items: center; gap: .75rem;
    margin-bottom: 1rem;
}
.match-rank {
    font-size: .8rem; font-weight: 700; color: var(--text-muted);
    min-width: 2rem;
}
.match-title { flex: 1; }
.match-title h2 { font-size: 1.35rem; margin: 0 0 .2rem; }
.match-links {
    display: flex; gap: .75rem; flex-wrap: wrap;
}
.match-link {
    font-size: .8rem; font-weight: 500; color: var(--accent);
    text-decoration: none;
}
.match-link:hover { text-decoration: underline; }
.match-link::before {
    content: "";
    display: inline-block; width: 3px; height: 3px;
    border-radius: 50%; background: var(--text-muted);
    vertical-align: middle; margin-right: .35rem;
}
.match-link:first-child::before { display: none; }

/* --- Score badge --- */
.score-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 52px; padding: .3rem .65rem;
    border-radius: 100px; font-size: .85rem; font-weight: 700;
    color: #fff; flex-shrink: 0;
}
.score-great { background: var(--green); }
.score-good  { background: #ca8a04; color: #fff; }
.score-fair  { background: var(--red); }

/* --- Score bar (gradient) --- */
.score-bar-wrap { margin-bottom: .75rem; }
.score-bar {
    position: relative; height: 8px; border-radius: 100px;
    background: linear-gradient(to right, var(--red), #ca8a04, var(--green));
    overflow: visible;
}
.score-fill {
    display: none;
}
.score-marker {
    position: absolute; top: 50%; transform: translate(-50%, -50%);
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--surface); border: 3px solid var(--text);
    box-shadow: var(--shadow);
    transition: left .3s ease;
}
.score-labels {
    display: flex; justify-content: space-between;
    font-size: .75rem; color: var(--text-muted); margin-top: .35rem;
}

/* --- Score breakdown --- */
.score-breakdown {
    display: flex; gap: .75rem; margin-bottom: 1rem;
    flex-wrap: wrap;
}
.breakdown-item {
    font-size: .78rem; font-weight: 500; color: var(--text-muted);
    padding: .2rem .6rem; border-radius: 100px;
    border: 1px solid var(--border); background: var(--bg);
}
.license-tag {
    color: var(--green); border-color: #bbf7d0; background: #f0fdf4;
}

/* --- Side-by-side comparison --- */
.comparison {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 0;
    margin-bottom: 1rem;
}
.comparison-col { padding: .75rem 0; }
.comparison-label {
    font-size: .75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-muted); margin-bottom: .5rem;
}
.comparison-divider {
    width: 1px; background: var(--border); margin: .75rem 1rem;
}
.font-render .preview-lg {
    font-size: 1.6rem; line-height: 1.3; margin-bottom: .35rem;
    word-break: break-all;
}
.font-render .preview-sm {
    font-size: .85rem; line-height: 1.5; color: var(--text-muted);
    margin: 0; word-break: break-all;
}

/* --- Match footer (rating + actions) --- */
.match-footer {
    border-top: 1px solid var(--border); padding-top: .75rem;
}
.match-footer-row {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: .5rem;
}
.rate-label { font-size: .85rem; color: var(--text-muted); margin-right: .5rem; }

/* --- Star rating --- */
.star-rating {
    display: flex; align-items: center; gap: .1rem;
}
.stars { display: inline-flex; gap: .1rem; }
.star {
    color: #d1d5db; transition: color .12s;
    user-select: none; cursor: pointer;
    font-size: 1.4rem;
    padding: .15rem;
}
.star:hover { color: #f59e0b; }
.star.active { color: #f59e0b; }
.rating-feedback {
    font-size: .8rem; color: var(--text-muted); margin-left: .5rem;
}

/* --- Action buttons (copy CSS, flag) --- */
.match-actions {
    display: flex; gap: .4rem; align-items: center;
}
.action-btn {
    padding: .3rem .7rem; border-radius: var(--radius-sm);
    font-size: .78rem; font-weight: 500; font-family: var(--font);
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text-muted); cursor: pointer; transition: all .15s;
}
.action-btn:hover { border-color: var(--accent); color: var(--accent); }
.action-btn.done { color: var(--green); border-color: #bbf7d0; }
.action-btn.reported { color: var(--red); border-color: #fecaca; }

/* --- Back link --- */
.back-link { text-align: center; padding: 2rem 0; }

/* --- Code / API docs --- */
code {
    background: #f3f4f6; padding: .15em .4em; border-radius: 4px;
    font-size: .88em; font-family: 'SF Mono', 'Fira Code', monospace;
}
pre {
    background: #1e293b; color: #e2e8f0; border-radius: var(--radius-sm);
    padding: 1rem 1.25rem; overflow-x: auto; margin-bottom: 1rem;
    font-size: .85rem; line-height: 1.6;
}
pre code { background: none; padding: 0; color: inherit; }
.api-endpoint {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    margin-bottom: 1rem;
}
.api-endpoint h2 {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 1rem; color: var(--accent);
}
.api-endpoint h3 {
    font-size: .9rem; color: var(--text-muted); margin: .75rem 0 .35rem;
}
.api-endpoint ul {
    margin: .5rem 0 1rem 1.5rem; font-size: .9rem;
}
.api-endpoint li { margin-bottom: .25rem; }

/* --- Toast notification --- */
.toast {
    position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
    background: #1e293b; color: #e2e8f0; padding: .6rem 1.2rem;
    border-radius: var(--radius-sm); font-size: .85rem; font-weight: 500;
    box-shadow: var(--shadow-md); z-index: 1000;
    opacity: 0; transition: opacity .3s;
    pointer-events: none;
}
.toast.show { opacity: 1; }

/* --- Responsive (tablet) --- */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        gap: 1.5rem;
    }
    .footer-inner > div:first-child {
        max-width: none;
    }
    .footer-links {
        gap: 2rem;
    }
}

/* --- Responsive (mobile) --- */
@media (max-width: 640px) {
    .hero h1 { font-size: 1.7rem; }
    .steps { grid-template-columns: 1fr; }
    .comparison { grid-template-columns: 1fr; }
    .comparison-divider {
        width: 100%; height: 1px; margin: 0;
    }
    .font-render .preview-lg { font-size: 1.3rem; }
    .nav-inner { height: 48px; }
    .pill { max-width: 220px; font-size: .82rem; padding: .35rem .75rem; }
    .match-header { flex-wrap: wrap; }
    .match-title h2 { font-size: 1.15rem; }
    .score-badge { font-size: .78rem; padding: .25rem .5rem; }
    .star { font-size: 1.6rem; padding: .25rem; }
    .search-input { width: 100%; }
    .browse-controls { flex-direction: column; }
    .category-filters { justify-content: center; }
    .match-footer-row { flex-direction: column; align-items: flex-start; }
    .score-breakdown { gap: .4rem; }
    .query-font-name { font-size: 1.2rem; }
    .query-preview .preview-lg { font-size: 1.5rem; }
    .alt-comparison { flex-direction: column; }
    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* --- Alternative-to page --- */
.alt-recommendation {
    background: var(--card-bg, #fff);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0 2rem;
}
.alt-rec-badge {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .3rem .7rem;
    border-radius: 4px;
    margin-bottom: .75rem;
}
.alt-rec-title {
    font-size: 1.8rem;
    margin: 0 0 .25rem;
}
.alt-rec-sub {
    color: #64748b;
    margin: 0 0 1.5rem;
}
.alt-comparison {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}
.alt-rec-actions {
    display: flex;
    gap: .75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.proprietary-tag {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: .7rem;
    font-weight: 600;
    padding: .15rem .45rem;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: .35rem;
}
.oss-tag {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    font-size: .7rem;
    font-weight: 600;
    padding: .15rem .45rem;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: .35rem;
}

/* Missing font card */
.missing-card {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.missing-icon {
    font-size: 2rem;
    margin-bottom: .5rem;
}
.missing-title {
    font-weight: 600;
    color: #334155;
    margin: 0 0 .5rem;
    font-size: .95rem;
}
.missing-body {
    color: #64748b;
    font-size: .85rem;
    line-height: 1.5;
    margin: 0;
}

/* --- Hero search --- */
.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}
.hero-or {
    color: var(--text-muted);
    font-size: .9rem;
    font-weight: 500;
}
.hero-search-wrap {
    position: relative;
    width: 340px;
    max-width: 100%;
}
.hero-search-input {
    width: 100%;
    padding: .7rem 2.5rem .7rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: var(--font);
    background: var(--surface);
    transition: border-color .2s;
    height: 48px;
}
.hero-search-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color .15s;
}
.hero-search-icon:hover { color: var(--accent); }
.hero-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.hero-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
}
.hero-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .55rem .9rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.hero-search-item:last-child { border-bottom: none; }
.hero-search-item:hover { background: #f1f5f9; text-decoration: none; }
.hero-search-name { font-weight: 500; }
.hero-search-arrow { font-weight: 400; color: var(--text-muted); font-size: .85em; }
.hero-search-cat { font-size: .78rem; color: var(--text-muted); }
.hero-search-empty {
    padding: .75rem 1rem;
    color: var(--text-muted);
    font-size: .9rem;
}
@media (max-width: 640px) {
    .hero-actions { flex-direction: column; }
    .hero-search-wrap { width: 100%; }
    .hero-or { display: none; }
}

/* --- Footer (enhanced) --- */
.site-footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    background: #f8fafc;
    font-size: .85rem;
    color: var(--text-muted);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}
.footer-inner > div:first-child {
    flex: 1;
    min-width: 0;
    max-width: 420px;
}
.footer-brand {
    font-weight: 600;
    color: var(--text);
    margin-bottom: .35rem;
}
.footer-tagline {
    line-height: 1.5;
}
.footer-links {
    flex-shrink: 0;
    display: flex;
    gap: 2.5rem;
}
.footer-col h4 {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text);
    margin-bottom: .5rem;
}
.footer-col a {
    display: block;
    color: var(--text-muted);
    padding: .15rem 0;
    font-size: .85rem;
}
.footer-col a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* --- FAQ section --- */
.faq-section {
    padding: 2rem 0 1rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}
.faq-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.faq-item {
    margin-bottom: 1rem;
}
.faq-item h3 {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .25rem;
}
.faq-item p {
    color: var(--text-muted);
    font-size: .9rem;
    margin: 0;
}

/* --- Identify: image / font-file modes --- */
.mode-tabs {
    display: flex; justify-content: center; gap: .5rem; margin: 0 auto 1.25rem;
}
.mode-tab {
    padding: .45rem 1.1rem; border-radius: 999px; border: 1px solid var(--border);
    color: var(--text-muted); font-weight: 500; font-size: .95rem; background: var(--surface);
}
.mode-tab:hover { text-decoration: none; color: var(--text); }
.mode-tab.active { background: var(--text); border-color: var(--text); color: #fff; }
.drop-zone.has-preview .drop-icon { display: none; }
.drop-preview {
    max-width: 100%; max-height: 220px; border-radius: var(--radius-sm);
    margin-bottom: .75rem; object-fit: contain;
}
.hint-label { display: block; text-align: left; font-weight: 500; font-size: .9rem; margin-bottom: .35rem; }
.hint-label .optional { color: var(--text-muted); font-weight: 400; }
.hint-input { width: 100%; margin-bottom: 1rem; }
.upload-privacy { margin-top: .75rem; font-size: .8rem; color: var(--text-muted); }

/* --- Image results --- */
.uploaded-preview {
    display: block; max-width: 100%; max-height: 260px; border-radius: var(--radius-sm);
    margin-top: .5rem; object-fit: contain;
}
.match-style { color: var(--text-muted); font-weight: 400; }
.font-sample {
    display: block; height: 44px; width: auto; max-width: 100%;
    object-fit: contain; object-position: left; margin: .75rem 0 .5rem; mix-blend-mode: multiply;
}
.same-font-pill {
    display: inline-block; font-size: .78rem; font-weight: 600; color: var(--green);
    border: 1px solid currentColor; border-radius: 999px; padding: .1rem .6rem; margin-top: .5rem;
}
.results-note { color: var(--text-muted); font-size: .85rem; margin: 1rem 0; }
@media (max-width: 600px) {
    .font-sample { height: 32px; }
}
.hero-image-cta { margin-top: 1rem; color: var(--text-muted); font-size: .95rem; }

/* --- Analytics consent banner --- */
.consent-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000;
    max-width: 720px; margin: 0 auto; display: flex; gap: 1rem; align-items: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-md); padding: .9rem 1.1rem; font-size: .9rem;
}
.consent-banner p { margin: 0; flex: 1; }
.consent-actions { display: flex; gap: .5rem; flex-shrink: 0; }
@media (max-width: 600px) {
    .consent-banner { flex-direction: column; align-items: stretch; }
    .consent-actions { justify-content: flex-end; }
}

/* --- Policy pages --- */
.policy { max-width: 760px; margin: 2rem auto 3rem; }
.policy h1 { font-size: 2rem; margin-bottom: 1rem; }
.policy h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
.policy h3 { font-size: 1.05rem; margin: 1.3rem 0 .4rem; }
.policy p, .policy li { margin-bottom: .6rem; }
.policy ul { padding-left: 1.3rem; margin-bottom: .8rem; }
.policy-table { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; font-size: .92rem; }
.policy-table th, .policy-table td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-scroll { overflow-x: auto; }
