/* ==========================================================================
   Fontz – public site styles
   Theme: lilac paper, indigo ink, violet + tangerine. Soft UI surfaces.
   Type:  Young Serif (headings, logo) + Figtree (text, interface).
   ========================================================================== */

@font-face { font-family: "Young Serif"; src: url("/assets/fonts/young-serif-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; 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; }
@font-face { font-family: "Young Serif"; src: url("/assets/fonts/young-serif-latin-ext.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; 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: "Figtree"; src: url("/assets/fonts/figtree-latin.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; 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; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree-latin-ext.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; 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; }

:root {
    --paper: #ECE9F5;
    --surface: #F8F7FC;
    --ink: #1E1740;
    --muted: #615B80;
    --violet: #5A3FE0;
    --violet-deep: #4630BF;
    --violet-soft: #E3DDFB;
    --tangerine: #FF9330;
    --tangerine-deep: #F27D12;
    --line: #D8D2EB;
    --ok: #17794B;
    --ok-soft: #DDF3E8;
    --error: #B3261E;
    --error-soft: #FBE4E2;
    --warn-soft: #FFF0D9;

    --raised: 8px 8px 20px rgba(150, 141, 196, .30), -8px -8px 20px rgba(255, 255, 255, .88);
    --raised-sm: 4px 4px 10px rgba(150, 141, 196, .28), -4px -4px 10px rgba(255, 255, 255, .85);
    --pressed: inset 3px 3px 7px rgba(150, 141, 196, .38), inset -3px -3px 7px rgba(255, 255, 255, .9);

    --r-lg: 24px;
    --r-md: 16px;
    --r-sm: 12px;
    --wrap: 1240px;
    --display: "Young Serif", Georgia, "Times New Roman", serif;
    --text: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: var(--text); font-size: 1.0625rem; line-height: 1.6;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--violet-deep); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9em; background: var(--violet-soft); padding: .1em .35em; border-radius: 6px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Admin bar (only for the logged-in admin) ---------- */
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 16px; background: var(--ink); color: #fff; font-size: .875rem; }
.admin-bar__badge { background: #FFE600; color: var(--ink); font-weight: 800; padding: 2px 10px; border-radius: 99px; }
.admin-bar__text { flex: 1 1 260px; }
.admin-bar a, .admin-bar button { color: #fff; font: inherit; font-weight: 700; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.admin-bar form { margin: 0; }

/* ---------- Header ---------- */
.site-header { padding: 18px 0 10px; position: relative; z-index: 30; }
.site-header__row { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { display: block; border-radius: 10px; box-shadow: var(--raised-sm); }
.brand__name { font-family: var(--display); font-size: 1.85rem; line-height: 1; letter-spacing: -.02em; }

.site-nav { flex: 1 1 auto; }
.site-nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-nav__list > li > a, .site-nav__button {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--r-sm);
    font: inherit; font-weight: 600; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.site-nav__list > li > a:hover, .site-nav__button:hover, .site-nav__button[aria-expanded="true"] { background: var(--surface); box-shadow: var(--raised-sm); color: var(--violet-deep); }
.site-nav__button::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.has-menu { position: static; }
.mega { display: none; position: absolute; left: 50%; transform: translateX(-50%); top: calc(100% - 4px); width: min(100% - 32px, var(--wrap)); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--raised), 0 24px 60px rgba(30, 23, 64, .18); padding: 26px 28px 20px; }
.has-menu.is-open .mega { display: block; }
.mega__grid { columns: 4 220px; column-gap: 28px; }
.mega__group { break-inside: avoid; margin-bottom: 18px; }
.mega__main { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; padding-bottom: 5px; border-bottom: 2px solid var(--tangerine); margin-bottom: 6px; }
.mega__main span { font-weight: 600; color: var(--muted); font-size: .85rem; }
.mega__main:hover { color: var(--violet-deep); }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li a { display: block; padding: 3px 0; color: var(--muted); text-decoration: none; font-size: .95rem; }
.mega li a:hover { color: var(--violet-deep); text-decoration: underline; }
.mega__all { display: inline-block; margin-top: 4px; font-weight: 700; }

.header-search, .hero-search { display: flex; align-items: center; background: var(--paper); border-radius: 99px; box-shadow: var(--pressed); padding: 5px; }
.header-search { flex: 0 1 290px; }
.header-search input, .hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--ink); padding: 8px 6px 8px 16px; outline: none; }
.header-search input::placeholder, .hero-search input::placeholder { color: var(--muted); opacity: 1; }
.header-search:focus-within, .hero-search:focus-within { outline: 3px solid var(--violet); outline-offset: 2px; }
.header-search button { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--violet); color: #fff; cursor: pointer; }
.header-search button:hover { background: var(--violet-deep); }

.nav-toggle { display: none; align-items: center; gap: 10px; margin-left: auto; padding: 10px 16px; border: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--raised-sm); font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; content: ""; position: relative; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }

/* ---------- Buttons, chips, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: var(--r-md); border: 0; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: box-shadow .15s ease, transform .15s ease, background-color .15s ease; }
.btn--primary { background: var(--violet); color: #fff; box-shadow: var(--raised-sm); }
.btn--primary:hover { background: var(--violet-deep); color: #fff; }
.btn--ghost { background: var(--surface); color: var(--ink); box-shadow: var(--raised-sm); }
.btn--ghost:hover { color: var(--violet-deep); }
.btn:active { box-shadow: var(--pressed); transform: translateY(1px); }
.btn--small { padding: 8px 14px; font-size: .9rem; border-radius: var(--r-sm); }
.btn--download { width: 100%; background: var(--tangerine); color: var(--ink); font-size: 1.15rem; padding: 16px 20px; box-shadow: var(--raised-sm); flex-direction: column; gap: 0; line-height: 1.25; }
.btn--download span { font-size: .85rem; font-weight: 600; opacity: .8; }
.btn--download:hover { background: var(--tangerine-deep); color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: default; }

.chip { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 99px; background: var(--violet-soft); color: var(--violet-deep); font-size: .82rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.chip--plain { background: var(--paper); color: var(--muted); box-shadow: var(--pressed); }
.chip--link { background: var(--surface); color: var(--ink); box-shadow: var(--raised-sm); padding: 7px 16px; font-size: .92rem; }
.chip--link:hover { color: var(--violet-deep); }
.chip--link.is-active { background: var(--violet); color: #fff; box-shadow: none; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
.chip-row--tight { gap: 8px; margin: 0; }
.chip-row--center { justify-content: center; }

.input { width: 100%; border: 0; border-radius: var(--r-sm); background: var(--paper); box-shadow: var(--pressed); padding: 12px 14px; font: inherit; color: var(--ink); }
.input:focus { outline: 3px solid var(--violet); outline-offset: 1px; }
textarea.input { resize: vertical; min-height: 96px; }
label { font-weight: 700; font-size: .95rem; }

.panel { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--raised); padding: 26px 28px; margin-bottom: 26px; }
.panel > h2:first-child { margin-bottom: .6em; }
.panel__hint { color: var(--muted); font-size: .92rem; }

.flash { border-radius: var(--r-md); padding: 14px 18px; margin: 0 0 22px; font-weight: 600; }
.flash ul { margin: 0; padding-left: 1.1em; }
.flash--ok { background: var(--ok-soft); color: var(--ok); }
.flash--error { background: var(--error-soft); color: var(--error); }
.flash--warn { background: var(--warn-soft); color: #7A4A00; }

/* ---------- Home hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 40px; align-items: center; padding: 30px 0 26px; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); margin-bottom: .35em; }
.hero__intro { font-size: 1.15rem; color: var(--muted); max-width: 58ch; margin-bottom: 1.5em; }
.hero__art { display: block; width: 100%; max-width: 460px; justify-self: end; }
.hero-search { max-width: 620px; padding: 7px; }
.hero-search input { padding: 12px 8px 12px 22px; font-size: 1.05rem; }
.hero-search .btn { border-radius: 99px; padding: 12px 26px; box-shadow: none; }
.hero-search--page { margin: 0 0 30px; }

.page-head { padding: 18px 0 8px; }
.page-head__lead { color: var(--muted); font-size: 1.1rem; max-width: 70ch; }
.page-head__page { font-family: var(--text); font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; white-space: nowrap; }

.crumbs { padding-top: 14px; font-size: .9rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--violet-deep); }

/* ---------- Listing toolbar ---------- */
.list-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 6px 0 24px; }
.list-bar__count { margin: 0; color: var(--muted); font-weight: 600; }
.sort-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 99px; background: var(--paper); box-shadow: var(--pressed); }
.sort-tab { padding: 8px 18px; border-radius: 99px; color: var(--muted); font-weight: 700; font-size: .95rem; text-decoration: none; }
.sort-tab:hover { color: var(--ink); }
.sort-tab.is-active { background: var(--surface); color: var(--violet-deep); box-shadow: var(--raised-sm); }

/* ---------- Font cards ---------- */
.font-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.font-card { position: relative; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--raised); min-width: 0; }
.font-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; border-radius: inherit; }
.font-card__link:hover .font-card__name { color: var(--violet-deep); }
.font-card__link:hover .font-card__preview { background: #fff; }
.font-card__preview { display: flex; align-items: center; height: 132px; padding: 14px 22px; border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 2px solid var(--line); overflow: hidden; transition: background-color .15s ease; }
.font-card__img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.font-card__fallback { display: none; font-family: var(--display); font-size: 1.9rem; line-height: 1.1; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.font-card.no-preview .font-card__fallback { display: block; }
.font-card.no-preview .font-card__img { display: none; }
.font-card__body { padding: 14px 22px 18px; }
.font-card__name { font-family: var(--text); font-size: 1.06rem; font-weight: 700; letter-spacing: 0; margin: 0 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.font-card__info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; font-size: .86rem; color: var(--muted); }
.font-card__rating { color: #9A5A00; font-weight: 700; }
.font-card.is-featured { box-shadow: var(--raised), 0 0 0 3px var(--tangerine); }
.font-card__flag { position: absolute; top: 12px; right: 12px; padding: 3px 12px; border-radius: 99px; background: var(--tangerine); color: var(--ink); font-size: .78rem; font-weight: 800; overflow: hidden; }
.font-card__flag::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%); transform: translateX(-120%); animation: fz-shine 1.4s ease-out .5s 1; }
@keyframes fz-shine { to { transform: translateX(120%); } }
.font-card--ad { display: flex; align-items: center; justify-content: center; padding: 14px; min-height: 250px; }
.font-card--ad .ad-slot { margin: 0; width: 100%; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 38px 0 12px; }
.page-link, .page-gap { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border-radius: var(--r-sm); font-weight: 700; text-decoration: none; }
.page-link { background: var(--surface); color: var(--ink); box-shadow: var(--raised-sm); }
.page-link:hover { color: var(--violet-deep); }
.page-link.is-current { background: var(--violet); color: #fff; box-shadow: none; }
.page-gap { color: var(--muted); }

.empty { text-align: center; padding: 50px 20px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--raised); }
.empty p { color: var(--muted); }

.prose { max-width: 78ch; }
.prose h2 { margin-top: 1.5em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose__small { font-size: .9rem; color: var(--muted); }
.prose--center { margin: 46px auto 10px; text-align: center; color: var(--muted); }
.prose--center h2, .prose--center h3 { color: var(--ink); }
.panel.prose { max-width: none; }
.panel.prose > * { max-width: 78ch; }
.doc { margin-top: 18px; padding: 36px clamp(22px, 5vw, 56px); }
.doc h1 { margin-bottom: .6em; }

/* ---------- Font page ---------- */
.font-head { padding: 12px 0 22px; }
.font-head h1 { overflow-wrap: anywhere; margin-bottom: .4em; }
.font-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.font-head__stat { color: var(--muted); font-weight: 600; }
.rating { display: inline-flex; align-items: center; gap: 10px; }
.rating__stars { display: inline-flex; }
.rating__star { border: 0; background: none; padding: 2px; font-size: 1.55rem; line-height: 1; color: #C9C2DE; cursor: pointer; transition: color .1s ease, transform .1s ease; }
.rating__star.is-on { color: var(--tangerine); }
.rating__star:hover { transform: scale(1.15); }
.rating__text { color: var(--muted); font-size: .92rem; font-weight: 600; }

.font-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
.font-main, .font-side { min-width: 0; }
.fz-specimen { font-family: "fz-specimen", "Adobe NotDef", var(--text); font-synthesis: none; }
.specimen { overflow: hidden; }
.specimen__headline { font-size: clamp(2.6rem, 8vw, 5.6rem); line-height: 1.15; margin: 0 0 .3em; padding-bottom: .12em; border-bottom: 4px solid var(--tangerine); overflow-wrap: anywhere; }
.specimen__headline--plain { font-family: var(--display); }
.specimen__set p { font-size: clamp(1.3rem, 3.2vw, 2.1rem); line-height: 1.35; margin: 0 0 .25em; overflow-wrap: anywhere; }
.specimen__error { color: var(--muted); margin: .6em 0 0; }
.specimen.is-loading .fz-specimen { opacity: .25; }

.tester__controls { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: center; margin-bottom: 18px; }
.tester__size { display: block; font-size: .9rem; color: var(--muted); }
.tester__size input { width: 100%; accent-color: var(--violet); }
.tester__sample { margin: 0 0 18px; line-height: 1.2; overflow-wrap: anywhere; min-height: 1.2em; }
.waterfall { list-style: none; margin: 0; padding: 14px 0 0; border-top: 2px solid var(--line); }
.waterfall li { display: flex; align-items: baseline; gap: 14px; padding: 5px 0; overflow: hidden; }
.waterfall__px { flex: 0 0 42px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.waterfall li span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 34px; margin: 0; }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-weight: 600; flex: 0 0 auto; }
.facts dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }

.glyphs { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 8px; }
.glyphs span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; background: var(--paper); box-shadow: var(--pressed); font-size: 1.55rem; line-height: 1; overflow: hidden; }

details { border-top: 1px solid var(--line); padding: 12px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; }
details p { margin: .7em 0 0; color: var(--muted); }
.fineprint p { font-size: .9rem; overflow-wrap: anywhere; }

.related { margin-top: 10px; }
.related .font-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.related .font-card__preview { height: 104px; padding: 12px 16px; }
.related .font-card__body { padding: 12px 16px 14px; }

.download__facts { list-style: none; margin: 18px 0 0; padding: 0; }
.download__facts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.download__facts li:last-child { border-bottom: 0; }
.download__facts span { color: var(--muted); }
.download__missing { font-weight: 700; color: var(--error); }
.share__row { display: flex; flex-wrap: wrap; gap: 8px; }
.report label { display: block; margin: 0 0 6px; }
.report .input { margin-bottom: 14px; }
.form-msg { border-radius: var(--r-sm); padding: 10px 14px; font-weight: 600; font-size: .92rem; }
.form-msg.is-ok { background: var(--ok-soft); color: var(--ok); }
.form-msg.is-error { background: var(--error-soft); color: var(--error); }

/* ---------- Categories index, notices, forms ---------- */
.cat-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 18px; }
.cat-index__group { margin: 0; }
.cat-index__group h2 { font-size: 1.4rem; padding-bottom: 8px; border-bottom: 3px solid var(--tangerine); }
.cat-index__group h2 a { color: var(--ink); text-decoration: none; }
.cat-index__group h2 a:hover { color: var(--violet-deep); }
.cat-index__count { display: block; font-family: var(--text); font-size: .85rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.cat-index__group ul { list-style: none; margin: 0; padding: 0; }
.cat-index__group li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }
.cat-index__group li span { color: var(--muted); font-size: .88rem; }

.notice-page { text-align: center; padding: 40px 0 30px; max-width: 720px; margin-inline: auto; }
.notice-page__code { font-family: var(--display); font-size: clamp(5rem, 18vw, 9rem); line-height: 1; color: var(--violet); margin: 0 0 10px; }
.notice-page .hero-search { margin-inline: auto; }
.notice-page__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 0 0 26px; }
.type-game { max-width: 760px; margin-inline: auto; text-align: center; }
.type-game__hint { color: var(--muted); }
.type-game__target { font-family: var(--display); font-size: 1.5rem; margin: 0 0 14px; }
.type-game__target .is-done { color: var(--ok); }
.type-game__target .is-wrong { color: var(--error); text-decoration: underline wavy; }
.type-game__result { min-height: 1.6em; font-weight: 700; margin: 12px 0; }

.form { margin-top: 24px; max-width: 720px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form__field { margin-bottom: 18px; }
.form__field label { display: block; margin-bottom: 6px; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Ads ---------- */
.ad-row { margin-top: 10px; margin-bottom: 6px; }
.ad-slot { margin: 0 auto 26px; text-align: center; max-width: 100%; overflow: hidden; }
.ad-slot__label { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.ad-slot--side { margin-bottom: 26px; }
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.font-card--ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.ad-slot--test { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: 90px; padding: 12px; background: #FFE600; color: #1E1740; border: 3px dashed #1E1740; border-radius: 12px; font-size: .85rem; line-height: 1.35; }
.ad-slot--test strong { font-size: 1rem; }
.ad-slot--side.ad-slot--test { min-height: 250px; }
.ad-slot--grid.ad-slot--test { min-height: 220px; }

/* ---------- Footer ---------- */
.site-main { padding-bottom: 46px; min-height: 50vh; }
.site-footer { margin-top: 20px; padding: 46px 0 22px; background: var(--ink); color: #D9D4EE; border-radius: 34px 34px 0 0; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.site-footer h2 { font-family: var(--text); font-size: .95rem; font-weight: 800; color: #fff; letter-spacing: 0; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #D9D4EE; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer p { font-size: .95rem; max-width: 46ch; }
.brand--footer { color: #fff; margin-bottom: 14px; }
.brand--footer img { box-shadow: none; }
.brand--footer .brand__name { color: #fff; font-size: 1.6rem; }
.site-footer__bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .16); }
.site-footer__bottom p { margin: 0; max-width: none; font-size: .88rem; color: #B5AED4; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .font-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .font-layout { grid-template-columns: minmax(0, 1fr) 300px; }
    .related .font-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; }
    .site-nav { display: none; flex-basis: 100%; order: 5; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--raised); padding: 12px; }
    .site-nav.is-open { display: block; }
    .site-nav__list { flex-direction: column; align-items: stretch; }
    .site-nav__list > li > a, .site-nav__button { width: 100%; justify-content: space-between; padding: 12px 14px; }
    .mega { position: static; transform: none; width: auto; box-shadow: none; padding: 8px 14px 4px; background: transparent; }
    .mega__grid { columns: 2 150px; }
    .header-search { order: 4; flex: 1 1 100%; }
    .hero { grid-template-columns: 1fr; padding-top: 14px; }
    .hero__art { display: none; }
    .font-layout { grid-template-columns: 1fr; }
    .font-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
    .font-side .download { grid-column: 1 / -1; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-footer__about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    body { font-size: 1rem; }
    .font-grid, .related .font-grid, .cat-index { grid-template-columns: 1fr; gap: 20px; }
    .panel { padding: 20px 18px; border-radius: 20px; }
    .facts { grid-template-columns: 1fr; }
    .tester__controls { grid-template-columns: 1fr; }
    .font-side { grid-template-columns: 1fr; }
    .form__row { grid-template-columns: 1fr; }
    .hero-search .btn { padding: 12px 18px; }
    .sort-tabs { border-radius: var(--r-md); }
    .sort-tab { padding: 8px 12px; font-size: .9rem; }
    .mega__grid { columns: 1; }
    .site-footer__grid { grid-template-columns: 1fr; gap: 26px; }
    .brand__name { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
    .site-header, .site-footer, .ad-slot, .ad-row, .admin-bar, .font-side, .pagination { display: none !important; }
    body { background: #fff; }
    .panel { box-shadow: none; }
}
