@property --shimmer-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

@layer layout, public-components, pages;

@layer layout {
  .public-body { overflow-wrap: anywhere; }

  .announcement {
    position: relative;
    z-index: 50;
    min-height: 36px;
    overflow: visible;
    border-bottom: 1px solid color-mix(in srgb, var(--brand) 24%, var(--border));
    background: color-mix(in srgb, var(--brand-soft) 70%, var(--background));
  }
  .announcement__flow {
    position: absolute;
    inset: 0;
    opacity: .28;
    background-image: repeating-linear-gradient(70deg, color-mix(in srgb, var(--brand) 32%, transparent) 0 8%, transparent 15% 22%, color-mix(in srgb, var(--brand-hover) 20%, transparent) 29% 36%, transparent 43% 50%);
    background-size: 200% 100%;
    mask-image: linear-gradient(90deg, transparent, #000 18% 82%, transparent), linear-gradient(#000, transparent 95%);
    mask-composite: intersect;
    animation: announcement-flow 32s linear infinite;
    pointer-events: none;
  }
  .announcement__inner { position: relative; min-height: 36px; display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .28rem 3rem .28rem 1rem; color: var(--text-muted); font-size: .78rem; font-weight: 590; text-align: center; }
  .announcement__inner > span:not(.announcement__signal) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .announcement__signal { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 11%, transparent); }
  .announcement__inner a { color: var(--brand-hover); font-weight: 680; text-decoration: none; }
  .announcement__inner a:hover { text-decoration: underline; }
  .announcement__close { position: absolute; z-index: 3; top: 50%; right: max(6px, calc((100vw - var(--container)) / 2)); width: 44px; height: 44px; translate: 0 -50%; display: grid; place-items: center; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); font-size: 1.25rem; line-height: 1; transition: background var(--motion-fast), color var(--motion-fast), transform var(--motion-fast); }
  .announcement__close:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--text); }
  .announcement__close:active { transform: scale(.94); }
  @keyframes announcement-flow { to { background-position: 100% 0; } }

  .site-header { position: sticky; z-index: 40; top: 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent); background: color-mix(in srgb, var(--background) 86%, transparent); backdrop-filter: blur(14px) saturate(115%); transition: background var(--motion-base), border-color var(--motion-base), box-shadow var(--motion-base); }
  .site-header.is-scrolled { border-color: var(--border); background: color-mix(in srgb, var(--background) 95%, transparent); box-shadow: 0 7px 20px rgb(15 33 55 / 5%); }
  .site-header__inner { min-height: var(--header-height); display: flex; align-items: center; gap: 1.4rem; }
  .brand { flex: none; display: inline-flex; align-items: center; gap: .7rem; color: var(--text); font-family: var(--font-display); font-size: 1.04rem; font-weight: 620; letter-spacing: -.025em; text-decoration: none; }
  .brand:hover { color: var(--text); }
  .brand__word b { color: var(--brand-hover); font-weight: 720; }
  .brand__mark { width: 30px; height: 30px; object-fit: contain; }
  .site-nav { margin-left: auto; }
  .site-nav__list { display: flex; align-items: center; gap: 1.4rem; list-style: none; }
  .site-nav a { position: relative; min-height: 40px; display: inline-flex; align-items: center; color: var(--text-muted); font-size: .88rem; font-weight: 630; text-decoration: none; transition: color var(--motion-fast); }
  .site-nav a::after { content: ""; position: absolute; right: 50%; bottom: 2px; left: 50%; height: 2px; background: var(--brand); transition: right var(--motion-base) var(--ease-out), left var(--motion-base) var(--ease-out); }
  .site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
  .site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; left: 0; }
  .header-actions { display: flex; align-items: center; gap: .35rem; }

  .glass-control { position: relative; display: inline-flex; isolation: isolate; overflow: hidden; border: 1px solid color-mix(in srgb, var(--border-strong) 72%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--surface) 54%, transparent); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--brand-contrast) 24%, transparent), 0 5px 14px rgb(24 46 73 / 5%); backdrop-filter: blur(5px); transition: border-color var(--motion-base), transform var(--motion-fast), background var(--motion-base); }
  .glass-control::after { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .45; background: linear-gradient(115deg, transparent 20%, color-mix(in srgb, var(--brand-contrast) 44%, transparent) 48%, transparent 68%); transform: translateX(-110%); transition: transform var(--motion-base) var(--ease-out); }
  .glass-control:hover { border-color: color-mix(in srgb, var(--brand) 46%, var(--border)); background: color-mix(in srgb, var(--surface) 72%, transparent); }
  .glass-control:hover::after { transform: translateX(105%); }
  .glass-control:active { transform: translateY(1px) scale(.98); }
  @supports not (backdrop-filter: blur(1px)) { .glass-control { background: var(--surface); } }

  .menu-toggle { width: 44px; height: 44px; display: none; place-items: center; align-content: center; gap: 5px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
  .menu-toggle span { width: 18px; height: 1.5px; display: block; background: currentColor; transition: width var(--motion-fast); }
  .menu-toggle span:nth-child(2) { width: 13px; justify-self: end; margin-right: 12px; }
  .menu-toggle:hover span:nth-child(2) { width: 18px; margin-right: 0; }

  body.dialog-open { overflow: hidden; }
  .mobile-menu { width: calc(100vw - 16px); max-width: none; height: calc(100dvh - 16px); max-height: none; margin: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--background); }
  .mobile-menu[open] { display: block; }
  .mobile-menu::backdrop { background: var(--background); }
  .mobile-menu__frame { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; background: radial-gradient(ellipse 24rem 18rem at 82% 4%, color-mix(in srgb, var(--brand) 13%, transparent), transparent 75%), var(--background); }
  .mobile-menu__head { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding-inline: clamp(1rem, 5vw, 2rem); }
  .mobile-menu__close { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: transparent; color: var(--text); font: 300 1.8rem/1 var(--font-body); transition: transform var(--motion-base), border-color var(--motion-fast), background var(--motion-fast); }
  .mobile-menu__close:hover { transform: rotate(8deg); border-color: var(--brand); background: var(--brand-soft); }
  .mobile-menu__nav { display: grid; align-items: center; padding: clamp(1rem, 6vw, 2.5rem); }
  .mobile-menu__nav ul { width: min(100%, 560px); display: grid; gap: .2rem; margin-inline: auto; list-style: none; }
  .mobile-menu__nav li { min-width: 0; }
  .mobile-menu__nav a { position: relative; min-height: 54px; display: block; overflow: hidden; color: var(--text); font-family: var(--font-display); font-size: clamp(2.2rem, 11vw, 4.8rem); font-weight: 680; letter-spacing: -.05em; line-height: 1; text-align: center; text-decoration: none; }
  .mobile-menu__nav a[aria-current="page"] { color: var(--brand); }
  .mobile-menu__nav a[aria-current="page"]::before { content: "●"; position: absolute; top: 50%; left: .1rem; color: var(--brand); font: 700 .55rem/1 var(--font-body); transform: translateY(-50%); }
  .menu-word { position: relative; display: block; min-height: 1.05em; }
  .menu-word__row { display: block; white-space: pre; }
  .menu-word__row--alt { position: absolute; inset: 0; color: var(--brand); }
  .menu-word__char { display: inline-block; transition: transform var(--motion-base) cubic-bezier(.2, .72, .25, 1); }
  .mobile-menu.is-entering .menu-word__row:not(.menu-word__row--alt) .menu-word__char { animation: menu-char-enter 360ms var(--ease-emphasized) both; animation-delay: var(--menu-enter-delay, 0ms); }
  .mobile-menu.is-entering .menu-word__row--alt { opacity: 0; }
  .menu-word__row--alt .menu-word__char { transform: translateY(110%); }
  .mobile-menu__nav a:hover .menu-word__row:not(.menu-word__row--alt) .menu-word__char,
  .mobile-menu__nav a:focus-visible .menu-word__row:not(.menu-word__row--alt) .menu-word__char { transform: translateY(-110%); }
  .mobile-menu__nav a:hover .menu-word__row--alt .menu-word__char,
  .mobile-menu__nav a:focus-visible .menu-word__row--alt .menu-word__char { transform: translateY(0); }
  .mobile-menu__foot { display: flex; align-items: end; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--border); padding: 1rem clamp(1rem, 5vw, 2rem); }
  .mobile-menu__foot p { color: var(--text-muted); font-size: .77rem; text-align: right; }
  @keyframes menu-char-enter {
    from { opacity: 0; transform: translateY(.85em); }
    to { opacity: 1; transform: translateY(0); }
  }
  .glass-control--menu .theme-switch { min-width: 142px; justify-content: center; }
  .mobile-nav-fallback { border-bottom: 1px solid var(--border); background: var(--surface); padding: .8rem 1rem; }
  .mobile-nav-fallback ul { display: flex; flex-wrap: wrap; gap: .75rem 1rem; list-style: none; }

  .site-main { min-height: calc(100vh - var(--header-height) - 190px); }
  .section { padding-block: clamp(2.8rem, 7vw, 5.5rem); }
  .section + .section { padding-top: 0; }
  .section__head { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.6rem; }
  .section__eyebrow { margin-bottom: .42rem; color: var(--brand-hover); font-family: var(--font-mono); font-size: .7rem; font-weight: 730; letter-spacing: .11em; text-transform: uppercase; }
  .section__description { max-width: 62ch; margin-top: .5rem; color: var(--text-muted); }
  .text-link { display: inline-flex; align-items: center; gap: .45rem; color: var(--text); font-weight: 640; text-decoration: none; }
  .text-link span { color: var(--brand); transition: transform var(--motion-fast); }
  .text-link:hover { color: var(--brand-hover); }
  .text-link:hover span { transform: translateX(3px); }

  .site-footer { margin-top: 3rem; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--background-elevated) 75%, var(--background)); }
  .site-footer__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.2rem 3rem; padding-block: 2.5rem; }
  .site-footer__title { margin-bottom: .45rem; font-family: var(--font-display); font-size: 1.1rem; font-weight: 680; }
  .site-footer__copy { max-width: 66ch; color: var(--text-muted); font-size: .82rem; }
  .site-footer__links { display: flex; flex-wrap: wrap; align-content: start; justify-content: flex-end; gap: .75rem 1.1rem; font-size: .84rem; }
  .site-footer__links a { color: var(--text-muted); text-decoration: none; }
  .site-footer__links a:hover { color: var(--brand-hover); }
  .site-footer__legal { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 1rem; color: var(--text-faint); font-size: .72rem; }
}

@layer public-components {
  .shimmer-button {
    border: 1px solid transparent;
    background: linear-gradient(var(--brand), var(--brand)) padding-box,
      conic-gradient(from var(--shimmer-angle), transparent 0 30%, color-mix(in srgb, var(--brand-contrast) 75%, transparent) 39%, var(--brand) 45%, transparent 56% 100%) border-box;
    transition: --shimmer-angle 700ms cubic-bezier(.25, 1, .5, 1), transform var(--motion-fast), box-shadow var(--motion-fast), background-color var(--motion-fast);
  }
  .shimmer-button:hover, .shimmer-button:focus-visible { --shimmer-angle: 260deg; background: linear-gradient(var(--brand-hover), var(--brand-hover)) padding-box, conic-gradient(from var(--shimmer-angle), transparent 0 26%, var(--brand-contrast) 38%, var(--brand) 48%, transparent 58% 100%) border-box; }

  .search-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; width: min(100%, 680px); }
  .search-bar__field, .filters__search-control { position: relative; display: block; }
  .search-bar__field svg, .filters__search-control svg { position: absolute; z-index: 1; top: 50%; left: .9rem; width: 18px; height: 18px; fill: none; stroke: var(--text-faint); stroke-width: 1.7; transform: translateY(-50%); pointer-events: none; }
  .search-bar .input, .filters__search-control .input { min-height: 48px; padding-left: 2.65rem; background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow-sm); }

  .pointer-light { position: absolute; z-index: 1; width: 290px; height: 290px; left: var(--pointer-x, 50%); top: var(--pointer-y, 50%); border-radius: 50%; opacity: 0; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 23%, transparent), color-mix(in srgb, var(--brand) 7%, transparent) 46%, transparent 72%); filter: blur(18px); transform: translate(-50%, -50%); transition: opacity var(--motion-base); pointer-events: none; }
  [data-pointer-glow]:hover .pointer-light { opacity: 1; }
  .pointer-ripple { position: absolute; z-index: 5; width: 18px; height: 18px; border: 1px solid color-mix(in srgb, var(--brand) 72%, transparent); border-radius: 50%; background: color-mix(in srgb, var(--brand) 20%, transparent); transform: translate(-50%, -50%); animation: pointer-ripple 620ms var(--ease-out) forwards; pointer-events: none; }
  @keyframes pointer-ripple { to { opacity: 0; transform: translate(-50%, -50%) scale(8); } }

  .fallback-cover { position: relative; overflow: hidden; background: linear-gradient(140deg, color-mix(in srgb, var(--brand-soft) 72%, var(--surface)), var(--background-elevated)); }
  .fallback-cover::before { content: ""; position: absolute; width: 58%; aspect-ratio: 1; right: -13%; top: -35%; border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent); border-radius: 50%; box-shadow: 0 0 0 24px color-mix(in srgb, var(--brand) 4%, transparent), 0 0 0 52px color-mix(in srgb, var(--brand) 3%, transparent); }
  .fallback-cover::after { content: ""; position: absolute; right: 8%; bottom: 13%; left: 8%; height: 1px; background: color-mix(in srgb, var(--brand) 40%, transparent); box-shadow: 0 12px color-mix(in srgb, var(--brand) 17%, transparent); }
  .fallback-cover > i { position: absolute; width: 14px; height: 14px; border: 4px solid var(--surface); border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
  .fallback-cover > i:first-of-type { right: 27%; bottom: calc(13% - 7px); }
  .fallback-cover > i:last-of-type { left: 22%; bottom: calc(13% - 7px); }

  .mod-grid { display: grid; gap: 1rem; }
  .mod-grid--featured { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
  .mod-grid--recent { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mod-grid--catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mod-grid--related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mod-card { position: relative; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform var(--motion-spring), border-color var(--motion-base), box-shadow var(--motion-base); }
  .mod-card:hover { transform: translateY(-3px) scale(1.008); border-color: color-mix(in srgb, var(--brand) 52%, var(--border)); box-shadow: var(--shadow-md); }
  .mod-card:focus-within { border-color: var(--brand); }
  .mod-card__shape { position: absolute; z-index: 0; right: -42px; bottom: 44px; width: 170px; height: 170px; opacity: .13; pointer-events: none; transition: transform var(--motion-spring); }
  .mod-card__shape i { position: absolute; display: block; border: 1px solid var(--brand); transition: transform var(--motion-spring); }
  .mod-card__shape i:nth-child(1) { inset: 0; border-radius: 50%; }
  .mod-card__shape i:nth-child(2) { width: 62%; height: 62%; top: 19%; left: 19%; transform: rotate(24deg); }
  .mod-card__shape i:nth-child(3) { width: 32%; height: 32%; top: 34%; left: 34%; border-radius: 50%; background: color-mix(in srgb, var(--brand) 15%, transparent); }
  .mod-card--v2 .mod-card__shape { right: auto; left: -54px; transform: rotate(42deg); }
  .mod-card--v3 .mod-card__shape i:nth-child(1) { border-radius: 20%; transform: rotate(18deg); }
  .mod-card--v4 .mod-card__shape { bottom: -36px; transform: scale(1.16); }
  .mod-card:hover .mod-card__shape { transform: translate(-7px, -4px) scale(1.03); }
  .mod-card--v2:hover .mod-card__shape { transform: rotate(38deg) translate(6px, -4px); }
  .mod-card:hover .mod-card__shape i:nth-child(2) { transform: rotate(40deg) scale(.92); }
  .mod-card__media { position: relative; z-index: 1; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--background-elevated); }
  .mod-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--motion-spring), filter var(--motion-base); }
  .mod-card:hover .mod-card__media img { transform: scale(1.018); }
  .mod-card__placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: .18rem; padding: 1rem; color: var(--text); }
  .mod-card__placeholder > span { position: relative; z-index: 1; color: var(--brand-hover); font: 700 .62rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
  .mod-card__placeholder > strong { position: relative; z-index: 1; max-width: 86%; font-family: var(--font-display); font-size: clamp(1.25rem, 3vw, 1.65rem); line-height: .98; letter-spacing: -.035em; }
  .mod-card__placeholder > small { position: relative; z-index: 1; margin-top: .25rem; color: var(--text-muted); font-size: .62rem; }
  .mod-card__cover-index { position: absolute; z-index: 2; top: .7rem; right: .75rem; padding: .15rem .3rem; border-radius: 3px; background: color-mix(in srgb, var(--background) 72%, transparent); color: var(--text-muted); font-size: .62rem; backdrop-filter: blur(5px); }
  .mod-card__body { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; gap: .72rem; padding: 1rem 1rem .9rem; }
  .mod-card__badges { min-height: 23px; display: flex; flex-wrap: wrap; gap: .32rem; overflow: hidden; }
  .mod-card__title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .mod-card__title a { color: var(--text); text-decoration: none; }
  .mod-card__summary { min-height: 3em; display: -webkit-box; overflow: hidden; color: var(--text-muted); font-size: .86rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .mod-card__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem .8rem; margin-top: auto; padding-top: .25rem; color: var(--text-faint); font-family: var(--font-mono); font-size: .66rem; }
  .mod-card__meta b { color: var(--text-muted); font-family: var(--font-body); font-weight: 650; }
  .mod-card__footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: .8rem; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 88%, transparent); padding: .72rem 1rem; color: var(--text-muted); font-size: .77rem; }
  .mod-card__footer > span b { color: var(--text); }
  .mod-card__link { display: inline-flex; align-items: center; gap: .45rem; color: var(--text); font-weight: 680; text-decoration: none; }
  .mod-card__link span:last-child { color: var(--brand); transition: transform var(--motion-fast); }
  .mod-card__link:hover span:last-child { transform: translateX(4px); }
  .mod-grid--featured .mod-card__media { aspect-ratio: 2 / 1; }
  .mod-grid--featured .mod-card__title { font-size: 1.28rem; }

  .stats-strip { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); align-items: stretch; border-block: 1px solid var(--border); }
  .stats-strip__lead { display: flex; align-items: center; color: var(--text-muted); font-size: .8rem; font-weight: 650; }
  .stats-strip__lead::before { content: ""; width: 34px; height: 1px; margin-right: .65rem; background: var(--brand); }
  .stat { min-width: 0; display: grid; align-content: center; padding: .85rem 1.2rem; border-left: 1px solid var(--border); }
  .stat__value { display: block; color: var(--text); font-family: var(--font-mono); font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 700; letter-spacing: -.04em; }
  .stat__label { color: var(--text-muted); font-size: .73rem; }

  .filters { display: grid; grid-template-columns: minmax(240px, 1.35fr) minmax(500px, 2.4fr) auto; align-items: end; gap: .8rem; border-bottom: 1px solid var(--border); padding-bottom: 1.15rem; }
  .filters__advanced > summary { display: none; }
  .filters__advanced-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
  .filters__submit { min-height: 46px; }
  .filter-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 62px; color: var(--text-muted); font-size: .86rem; }
  .filter-summary h2 { color: var(--text-muted); font: inherit; font-weight: 560; letter-spacing: 0; }
  .filter-summary strong { color: var(--text); font-family: var(--font-mono); }
  .filter-summary__hint { color: var(--text-faint); font-size: .78rem; }
  .filter-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; list-style: none; }
  .filter-chips a { min-height: 30px; display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); padding: .25rem .5rem; color: var(--text-muted); font-size: .72rem; text-decoration: none; }
  .filter-chips a:hover { border-color: var(--brand); color: var(--text); }
  .filter-chips b { color: var(--brand); font-size: .9rem; }
  .filter-chips .filter-chips__clear { border-color: transparent; background: transparent; color: var(--brand-hover); }

  .category-list { border-top: 1px solid var(--border); list-style: none; }
  .category-list li { border-bottom: 1px solid var(--border); }
  .category-list a { min-height: 68px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 1.2rem; padding: .65rem .25rem; color: var(--text); text-decoration: none; transition: padding var(--motion-base), background var(--motion-fast); }
  .category-list a:hover { padding-inline: .8rem; background: color-mix(in srgb, var(--brand-soft) 36%, transparent); }
  .category-list__name { font-family: var(--font-display); font-size: 1.18rem; font-weight: 640; letter-spacing: -.02em; }
  .category-list__count { color: var(--text-muted); font-size: .74rem; }
  .category-list__count b { color: var(--text); }
  .category-list__arrow { color: var(--brand); transition: transform var(--motion-fast); }
  .category-list a:hover .category-list__arrow { transform: translateX(5px); }

  .download-button { position: relative; isolation: isolate; min-height: 54px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--brand); border-radius: 8px; background: var(--brand); color: var(--brand-contrast); font-weight: 710; text-decoration: none; transition: border-radius 600ms cubic-bezier(.23, 1, .32, 1), color 600ms, transform var(--motion-fast), box-shadow var(--motion-base); }
  .download-button:hover { border-radius: 6px; color: var(--brand-contrast); box-shadow: 0 11px 28px color-mix(in srgb, var(--brand) 28%, transparent); }
  .download-button:active { transform: scale(.975); }
  .download-button__text { position: relative; z-index: 3; transform: translateX(-10px); transition: transform 600ms cubic-bezier(.23, 1, .32, 1); }
  .download-button:hover .download-button__text, .download-button:focus-visible .download-button__text { transform: translateX(10px); }
  .download-button__bubble { position: absolute; z-index: 1; left: 50%; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-hover); opacity: 0; transform: translate(-50%, -50%); transition: width 600ms cubic-bezier(.19, 1, .22, 1), height 600ms cubic-bezier(.19, 1, .22, 1), opacity 600ms; }
  .download-button:hover .download-button__bubble, .download-button:focus-visible .download-button__bubble { width: 620px; height: 620px; opacity: 1; }
  .download-button__arrow { position: absolute; z-index: 3; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: left 600ms cubic-bezier(.34, 1.35, .64, 1), right 600ms cubic-bezier(.34, 1.35, .64, 1); }
  .download-button__arrow--left { left: -22%; }
  .download-button__arrow--right { right: 18px; }
  .download-button:hover .download-button__arrow--left, .download-button:focus-visible .download-button__arrow--left { left: 18px; }
  .download-button:hover .download-button__arrow--right, .download-button:focus-visible .download-button__arrow--right { right: -22%; }
  .download-button[aria-busy="true"], .download-button[aria-disabled="true"] { pointer-events: none; opacity: .76; cursor: wait; }

  .github-button { position: relative; isolation: isolate; min-height: 48px; display: inline-flex; align-items: center; overflow: hidden; border: 1px solid #2d3a4a; border-radius: 8px; background: #0d131c; color: #edf4fb; text-decoration: none; box-shadow: 0 8px 22px rgb(1 7 14 / 18%); }
  .github-button::before { content: ""; position: absolute; z-index: -2; inset: -70%; opacity: .2; background: conic-gradient(from 0deg, transparent, #3470b8, #d9e9fa, #3470b8, transparent 38%); animation: github-stream 9s linear infinite paused; }
  .github-button::after { content: ""; position: absolute; z-index: -1; inset: 1px; border-radius: 7px; background: #0d131c; }
  .github-button__glow { position: absolute; inset: 10% 8% -20%; opacity: .24; background: radial-gradient(ellipse at 50% 100%, #3470b8, transparent 70%); filter: blur(12px); transition: opacity var(--motion-base); }
  .github-button__surface { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
  .github-button__surface i { position: absolute; width: 54%; height: 180%; left: -20%; top: -55%; border-radius: 50%; background: linear-gradient(90deg, transparent, rgb(93 158 228 / 18%), transparent); transform: rotate(24deg); transition: transform 700ms var(--ease-out); }
  .github-button__surface i:nth-child(2) { left: 28%; opacity: .55; transform: rotate(-17deg); }
  .github-button__surface i:nth-child(3) { left: 70%; opacity: .4; }
  .github-button__label { position: relative; z-index: 2; display: flex; align-items: center; gap: .65rem; padding: .7rem .9rem; font-size: .88rem; font-weight: 670; }
  .github-button__label svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .github-button__label b { margin-left: .25rem; color: #81b6eb; transition: transform var(--motion-fast); }
  .github-button:hover { color: #edf4fb; }
  .github-button:hover::before, .github-button:focus-visible::before { opacity: .72; animation-play-state: running; }
  .github-button:hover .github-button__glow { opacity: .54; }
  .github-button:hover .github-button__surface i { transform: translateX(78%) rotate(24deg); }
  .github-button:hover .github-button__label b { transform: translate(2px, -2px); }
  @keyframes github-stream { to { transform: rotate(1turn); } }
}

@layer pages {
  .hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
  .hero__ambient { position: absolute; width: 54rem; height: 38rem; top: -24rem; right: -6rem; border-radius: 48%; opacity: .62; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%); transform: rotate(-12deg); pointer-events: none; }
  .hero__inner { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr); align-items: center; gap: clamp(2.4rem, 6vw, 5.2rem); padding-block: clamp(3.1rem, 6vw, 5.25rem); }
  .hero__copy { display: grid; gap: 1.1rem; }
  .hero__kicker { display: flex; align-items: center; gap: .55rem; color: var(--brand-hover); font-family: var(--font-mono); font-size: .7rem; font-weight: 720; letter-spacing: .1em; text-transform: uppercase; }
  .hero__kicker span { font-size: .48rem; }
  .hero h1 { max-width: 760px; font-size: clamp(3rem, 6vw, 5.45rem); }
  .hero__summary { max-width: 61ch; color: var(--text-muted); font-size: clamp(.97rem, 1.6vw, 1.08rem); }
  .hero-morph-line { height: 2.35rem; display: flex; align-items: center; gap: .5rem; color: var(--text-muted); font-size: 1.02rem; }
  .hero-morph { position: relative; width: 8.5ch; height: 2.35rem; display: inline-block; color: var(--brand-hover); font-family: var(--font-display); font-size: 1.85rem; font-weight: 690; letter-spacing: -.035em; filter: url(#samui-morph-threshold) blur(.35px); }
  .hero-morph > span { position: absolute; inset: 0; display: flex; align-items: center; white-space: nowrap; }
  .hero__links { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
  .hero__aside { min-width: 0; }

  .release-preview { position: relative; isolation: isolate; width: min(100%, 450px); min-height: 460px; display: flex; flex-direction: column; overflow: hidden; margin-left: auto; border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--border)); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow-md); color: var(--text); text-decoration: none; transition: transform var(--motion-spring), border-color var(--motion-base), box-shadow var(--motion-base); }
  a.release-preview:hover { transform: translateY(-3px) scale(1.008); border-color: color-mix(in srgb, var(--brand) 60%, var(--border)); color: var(--text); box-shadow: 0 26px 62px rgb(23 52 86 / 16%); }
  .release-preview__topline { position: relative; z-index: 2; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); padding: .55rem .8rem; color: var(--text-muted); font-size: .68rem; }
  .release-preview__topline > span:first-child { display: inline-flex; align-items: center; gap: .45rem; font-weight: 650; }
  .release-preview__topline > span:first-child::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
  .release-preview__visual { position: relative; z-index: 2; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--background-elevated); }
  .release-preview__visual img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--motion-spring); }
  .release-preview:hover .release-preview__visual img { transform: scale(1.018); }
  .fallback-cover--hero { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: .25rem; padding: 1.4rem; }
  .fallback-cover--hero > span { position: relative; z-index: 1; color: var(--brand-hover); font: 700 .66rem/1.2 var(--font-mono); letter-spacing: .08em; }
  .fallback-cover--hero > strong { position: relative; z-index: 1; max-width: 80%; font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: .96; letter-spacing: -.04em; }
  .release-preview__index { position: absolute; top: .7rem; right: .8rem; color: color-mix(in srgb, var(--text) 55%, transparent); font-size: .68rem; }
  .release-preview__content { position: relative; z-index: 2; display: flex; flex-direction: column; gap: .3rem; padding: .9rem 1rem .7rem; }
  .release-preview__category { color: var(--brand-hover); font: 700 .64rem/1.2 var(--font-mono); letter-spacing: .08em; }
  .release-preview__content > strong { overflow: hidden; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.08; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
  .release-preview__summary { display: -webkit-box; overflow: hidden; color: var(--text-muted); font-size: .78rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .release-preview__footer { position: relative; z-index: 2; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; border-top: 1px solid var(--border); padding: .55rem 1rem; color: var(--text-muted); font-size: .73rem; }
  .release-preview__footer b { color: var(--text); }
  .release-preview__arrow { color: var(--brand); font-size: 1.1rem; transition: transform var(--motion-fast); }
  .release-preview:hover .release-preview__arrow { transform: translateX(5px); }
  .release-preview--empty { min-height: 390px; padding-bottom: 1.2rem; }
  .release-preview__empty-mark { width: 110px; height: 110px; display: grid; place-items: center; margin: 2.6rem auto 1.3rem; border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border)); border-radius: 50%; background: var(--brand-soft); color: var(--brand-hover); font: 650 3.5rem/1 var(--font-display); }
  .release-preview__empty-copy { display: grid; gap: .35rem; padding-inline: 1.3rem; text-align: center; }
  .release-preview__empty-copy strong { font-family: var(--font-display); font-size: 1.2rem; }
  .release-preview__empty-copy span { color: var(--text-muted); font-size: .82rem; }
  .release-preview--empty > .text-link { margin: auto auto 0; }

  .stats-section { padding-block: 1rem clamp(2.4rem, 5vw, 4rem); }
  .section--featured { padding-top: clamp(2.3rem, 5vw, 4rem); }
  .section--categories { padding-top: 0; }

  .page-header { border-bottom: 1px solid var(--border); padding-block: clamp(2rem, 5vw, 3.3rem); }
  .page-header__inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 1fr) auto; align-items: end; gap: 1.5rem 3rem; }
  .page-header p { max-width: 62ch; color: var(--text-muted); }
  .page-header__count { align-self: center; border-left: 1px solid var(--border); padding-left: 1.2rem; color: var(--text-muted); font-size: .78rem; }
  .page-header__count b { display: block; color: var(--text); font-size: 1.35rem; }
  .section--catalog { padding-top: 1.5rem; }

  .mod-detail { padding-block: clamp(2rem, 5vw, 4.25rem); }
  .mod-detail__hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr); gap: clamp(1.5rem, 3.2vw, 2.8rem); align-items: start; }
  .mod-cover { position: relative; isolation: isolate; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--background-elevated); box-shadow: var(--shadow-sm); }
  .mod-cover img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
  .mod-cover .pointer-light { z-index: 3; mix-blend-mode: screen; }
  .mod-cover-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: .25rem; padding: clamp(1.4rem, 4vw, 2.5rem); }
  .mod-cover-placeholder > span { position: relative; z-index: 1; color: var(--brand-hover); font: 700 .7rem/1.2 var(--font-mono); letter-spacing: .1em; }
  .mod-cover-placeholder > strong { position: relative; z-index: 1; max-width: 75%; font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: .9; letter-spacing: -.05em; }
  .mod-cover-placeholder > small { position: relative; z-index: 1; margin-top: .4rem; color: var(--text-muted); }
  .mod-cover__caption { position: absolute; z-index: 4; right: .7rem; bottom: .7rem; left: .7rem; display: flex; justify-content: space-between; gap: 1rem; border: 1px solid color-mix(in srgb, var(--brand-contrast) 17%, transparent); border-radius: 5px; background: rgb(7 18 31 / 58%); padding: .38rem .55rem; color: #eaf2fb; font-size: .62rem; letter-spacing: .04em; backdrop-filter: blur(8px); }
  .mod-intro { min-width: 0; display: grid; gap: 1rem; }
  .mod-intro__taxonomy { min-height: 23px; display: flex; flex-wrap: wrap; gap: .35rem; }
  .mod-intro__titleline { display: flex; align-items: flex-start; gap: .8rem; }
  .mod-intro h1 { font-size: clamp(2.4rem, 4.2vw, 4rem); }
  .mod-icon { width: 54px; height: 54px; flex: none; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-muted); object-fit: cover; }
  .mod-intro__summary { color: var(--text-muted); font-size: 1rem; }
  .download-panel { position: relative; display: grid; gap: .85rem; overflow: hidden; border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--border)); border-radius: var(--radius-lg); background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--brand-soft) 72%, var(--surface))); padding: 1rem; box-shadow: var(--shadow-sm); }
  .download-panel::after { content: ""; position: absolute; width: 140px; height: 140px; right: -75px; top: -76px; border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent); border-radius: 50%; box-shadow: 0 0 0 20px color-mix(in srgb, var(--brand) 3%, transparent); pointer-events: none; }
  .download-panel__version { position: relative; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: .8rem; }
  .download-panel__version h2 { font-size: 1.45rem; }
  .download-panel__version > strong { color: var(--brand-hover); font-family: var(--font-mono); font-size: 1.18rem; }
  .download-panel__meta { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
  .download-panel__meta span { min-width: 0; display: grid; gap: .1rem; border-left: 1px solid var(--border); padding-left: .55rem; overflow-wrap: anywhere; }
  .download-panel__meta span:first-child { border-left: 0; padding-left: 0; }
  .download-panel__meta small { color: var(--text-muted); font-size: .64rem; }
  .download-panel__meta strong { color: var(--text); font-size: .76rem; }
  .download-panel__note { color: var(--text-muted); font-size: .72rem; text-align: center; }
  .download-panel__note span { color: var(--success); }
  .mod-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
  .hash-line { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .55rem; border-top: 1px solid var(--border); padding-top: .7rem; }
  .hash-line > span:first-child { min-width: 0; display: grid; gap: .2rem; }
  .hash-line small { color: var(--text-muted); font: 700 .6rem/1.2 var(--font-mono); letter-spacing: .08em; }
  .hash-line code { min-width: 0; overflow-wrap: anywhere; }

  .mod-body { display: grid; grid-template-columns: minmax(0, 760px) minmax(220px, 1fr); justify-content: space-between; gap: clamp(2rem, 7vw, 6rem); margin-top: clamp(3rem, 7vw, 5.5rem); }
  .content-sections { min-width: 0; display: grid; gap: clamp(2.6rem, 6vw, 4.5rem); }
  .content-section { min-width: 0; display: grid; gap: 1rem; }
  .content-section__heading { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: baseline; gap: .8rem; border-bottom: 1px solid var(--border); padding-bottom: .65rem; }
  .content-section__heading > span { color: var(--brand-hover); font-size: .64rem; }
  .content-section__heading h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
  .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
  .facts__item { min-width: 0; display: grid; grid-template-columns: minmax(92px, .75fr) minmax(0, 1.25fr); gap: .65rem; border-bottom: 1px solid var(--border); padding-block: .68rem; }
  .facts dt { color: var(--text-muted); font-size: .78rem; }
  .facts dd { min-width: 0; overflow-wrap: anywhere; font-size: .87rem; font-weight: 620; }
  .mod-sidebar { align-self: start; position: sticky; top: calc(var(--header-height) + 1.5rem); display: grid; gap: 1.7rem; }
  .sidebar-section { border-top: 2px solid var(--text); padding-top: .75rem; }
  .sidebar-section__label { margin-bottom: .7rem; color: var(--text); font-family: var(--font-mono); font-size: .68rem; font-weight: 720; letter-spacing: .08em; text-transform: uppercase; }
  .sidebar-section--notice p:last-child { color: var(--text-muted); font-size: .8rem; }
  .external-links { list-style: none; }
  .external-links li { border-bottom: 1px solid var(--border); }
  .external-links a { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: .7rem; color: var(--text); text-decoration: none; }
  .external-links a span { display: grid; }
  .external-links small { color: var(--text-muted); font-size: .62rem; }
  .external-links b { color: var(--brand); transition: transform var(--motion-fast); }
  .external-links a:hover b { transform: translate(2px, -2px); }

  .gallery { min-width: 0; display: grid; gap: .65rem; }
  .gallery__stage { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--background-elevated); touch-action: pan-y; }
  .gallery__main { position: relative; width: 100%; display: block; border: 0; background: transparent; padding: 0; }
  .gallery__main img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
  .gallery__expand { position: absolute; right: .7rem; bottom: .7rem; display: inline-flex; align-items: center; gap: .4rem; border: 1px solid rgb(255 255 255 / 22%); border-radius: 5px; background: rgb(5 13 23 / 65%); padding: .42rem .6rem; color: #edf5fd; font-size: .7rem; backdrop-filter: blur(7px); }
  .gallery__controls { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: .7rem; border-top: 1px solid var(--border); }
  .gallery__nav { width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text); }
  .gallery__nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .gallery__position { min-width: 52px; color: var(--text-muted); font-size: .68rem; text-align: center; }
  .gallery__position b { color: var(--text); }
  .gallery__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
  .gallery__thumb { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-muted); padding: 0; opacity: .65; transition: opacity var(--motion-fast), border-color var(--motion-fast), transform var(--motion-fast); }
  .gallery__thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
  .gallery__thumb:hover, .gallery__thumb[aria-pressed="true"] { border-color: var(--brand); opacity: 1; }
  .gallery__thumb:active { transform: scale(.98); }
  .gallery-dialog { width: min(94vw, 1160px); max-width: 1160px; }
  .gallery-dialog .dialog__body { padding: .6rem; }
  .gallery-dialog img { max-height: 76vh; width: 100%; object-fit: contain; background: var(--background); }

  .release-list { position: relative; display: grid; gap: 0; list-style: none; }
  .release-list::before { content: ""; position: absolute; top: 1.2rem; bottom: 1.2rem; left: 6px; width: 1px; background: var(--border-strong); }
  .release-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .7rem 1rem; border-bottom: 1px solid var(--border); padding: 1rem 0 1rem 1.8rem; }
  .release-item:first-child { border-top: 1px solid var(--border); }
  .release-item__marker { position: absolute; z-index: 1; top: 1.35rem; left: 1px; width: 11px; height: 11px; border: 3px solid var(--background); border-radius: 50%; background: var(--border-strong); box-shadow: 0 0 0 1px var(--border-strong); }
  .release-item--latest .release-item__marker { background: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
  .release-item__content { min-width: 0; display: grid; gap: .42rem; }
  .release-item__heading { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
  .release-item__version { font-family: var(--font-mono); font-weight: 750; }
  .release-item__meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; color: var(--text-muted); font-size: .75rem; }
  .release-item__download { align-self: center; }
  .release-item .safe-markdown { font-size: .82rem; }

  .section--related { border-top: 1px solid var(--border); padding-top: clamp(2.8rem, 7vw, 5rem); }
  .detail-support { border-top: 1px solid var(--border); padding-block: 1.15rem; color: var(--text-muted); font-size: .78rem; text-align: center; }
  .detail-support a { margin-inline: .25rem; color: var(--brand-hover); }

  .error-page { min-height: min(700px, 68vh); display: grid; align-items: center; padding-block: 3rem; }
  .error-page__inner { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(2rem, 8vw, 7rem); }
  .error-figure { position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 55%), var(--surface); }
  .error-figure > span { position: absolute; top: 17%; color: var(--brand-hover); font-size: .65rem; letter-spacing: .16em; }
  .error-figure > strong { font: 670 clamp(3.5rem, 11vw, 8rem)/1 var(--font-display); letter-spacing: -.08em; }
  .error-figure i { position: absolute; width: 20px; height: 20px; border: 5px solid var(--surface); border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
  .error-figure i:first-of-type { left: 14%; bottom: 30%; }
  .error-figure i:last-of-type { right: 13%; top: 33%; }
  .error-copy { display: grid; justify-items: start; gap: 1rem; }
  .error-copy > p:not(.section__eyebrow) { max-width: 58ch; color: var(--text-muted); }
  .error-copy__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.3rem; }
}

@media (max-width: 1120px) {
  .mod-grid--recent { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mod-grid--catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: minmax(220px, 1fr) minmax(460px, 2fr); }
  .filters__submit { grid-column: 1 / -1; justify-self: end; }
  .mod-detail__hero { grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr); }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: grid; }
  .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(300px, .75fr); gap: 2rem; }
  .hero h1 { font-size: clamp(2.9rem, 8vw, 4.4rem); }
  .release-preview { min-height: 400px; }
  .page-header__inner { grid-template-columns: 1fr auto; }
  .page-header__inner > p { grid-column: 1 / -1; grid-row: 2; }
  .page-header__count { grid-column: 2; grid-row: 1; }
  .mod-detail__hero { grid-template-columns: 1fr; }
  .mod-cover { max-height: 640px; }
  .mod-body { grid-template-columns: minmax(0, 1fr) 230px; gap: 2.3rem; }
  .mod-grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .theme-switch__label { display: none; }
  .glass-control--menu .theme-switch__label { display: inline; }
  .hero__inner { grid-template-columns: 1fr; padding-block: 2.7rem 3.4rem; }
  .hero__aside { width: 100%; }
  .release-preview { width: 100%; min-height: 0; margin: 0; }
  .stats-strip { grid-template-columns: repeat(3, 1fr); }
  .stats-strip__lead { grid-column: 1 / -1; min-height: 42px; border-bottom: 1px solid var(--border); }
  .stat:first-of-type { border-left: 0; }
  .filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .7rem; }
  .filters__search { grid-column: 1 / -1; }
  .filters__advanced { grid-column: 1; }
  .filters__advanced > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: .8rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); padding: .55rem .75rem; color: var(--text); font-weight: 630; list-style: none; }
  .filters__advanced > summary::-webkit-details-marker { display: none; }
  .filters__summary-state::before { content: "+"; color: var(--brand); font: 500 1.2rem/1 var(--font-body); }
  .filters__advanced[open] .filters__summary-state::before { content: "−"; }
  .filters__advanced-grid { grid-template-columns: 1fr; gap: .65rem; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: color-mix(in srgb, var(--surface) 75%, transparent); padding: .8rem; }
  .filters__submit { grid-column: 2; justify-self: stretch; }
  .filter-summary { align-items: flex-start; flex-direction: column; padding-block: .8rem; }
  .filter-chips { justify-content: flex-start; }
  .mod-body { grid-template-columns: 1fr; }
  .mod-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__links { justify-content: flex-start; }
  .site-footer__legal { grid-column: 1; }
}

@media (max-width: 620px) {
  .announcement__inner { justify-content: flex-start; padding-right: 2.6rem; padding-left: 0; text-align: left; }
  .announcement__signal { display: none; }
  .announcement__inner a { display: none; }
  .brand__word { font-size: .95rem; }
  .mobile-menu__nav a { min-height: 48px; font-size: clamp(2rem, 12vw, 3.2rem); }
  .mobile-menu__foot { align-items: stretch; flex-direction: column; }
  .mobile-menu__foot p { text-align: left; }
  .glass-control--menu { align-self: flex-start; }
  .hero h1 { font-size: clamp(2.65rem, 14vw, 4.1rem); }
  .hero-morph-line { align-items: flex-start; flex-direction: column; gap: .15rem; height: 4rem; }
  .hero-morph { font-size: 1.65rem; }
  .search-bar { grid-template-columns: 1fr; }
  .search-bar .button { width: 100%; }
  .mod-grid--featured, .mod-grid--recent, .mod-grid--catalog, .mod-grid--related { grid-template-columns: 1fr; }
  .mod-grid--featured .mod-card__media { aspect-ratio: 16 / 10; }
  .stats-strip { grid-template-columns: 1fr; }
  .stats-strip__lead { grid-column: 1; }
  .stat, .stat:first-of-type { grid-template-columns: auto 1fr; align-items: baseline; gap: .65rem; border-top: 1px solid var(--border); border-left: 0; padding-block: .62rem; }
  .stat__value { min-width: 4ch; font-size: 1.2rem; }
  .page-header__inner { grid-template-columns: 1fr; }
  .page-header__inner > p, .page-header__count { grid-column: 1; grid-row: auto; }
  .page-header__count { border-left: 0; border-top: 1px solid var(--border); padding: .7rem 0 0; }
  .facts { grid-template-columns: 1fr; }
  .download-panel__meta { grid-template-columns: 1fr 1fr; }
  .download-panel__meta span:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border); padding: .45rem 0 0; }
  .mod-sidebar { grid-template-columns: 1fr; }
  .gallery__thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .release-item { grid-template-columns: 1fr; }
  .release-item__download { justify-self: start; }
  .error-page__inner { grid-template-columns: 1fr; }
  .error-figure { width: min(62vw, 250px); margin-inline: auto; }
  .error-copy { justify-items: center; text-align: center; }
  .error-copy__actions { justify-content: center; }
}

@media (max-width: 390px) {
  .container { width: calc(100% - 28px); }
  .site-header__inner { gap: .45rem; }
  .brand { gap: .5rem; }
  .brand__mark { width: 28px; height: 28px; }
  .release-preview__content > strong { white-space: normal; }
  .filters { grid-template-columns: 1fr; }
  .filters__advanced, .filters__submit { grid-column: 1; }
  .filters__submit { width: 100%; }
  .download-panel__meta { grid-template-columns: 1fr; }
  .download-panel__meta span, .download-panel__meta span:first-child, .download-panel__meta span:nth-child(3) { grid-column: auto; border-top: 0; border-left: 0; padding: 0; }
  .hash-line { grid-template-columns: 1fr; }
  .hash-line .button { justify-self: start; }
  .gallery__thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (hover: none), (pointer: coarse) {
  .pointer-light { display: none; }
  .mod-card:hover, a.release-preview:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .announcement__flow, .github-button::before { animation: none; }
  .hero-morph > [data-morph-next] { display: none; }
  .hero-morph > [data-morph-current] { opacity: 1 !important; filter: none !important; }
  .menu-word__row--alt { display: none; }
  .mobile-menu.is-entering .menu-word__row:not(.menu-word__row--alt) .menu-word__char { animation: none !important; opacity: 1; }
  .menu-word__char, .mod-card, .mod-card__shape, .mod-card__shape i, .release-preview, .download-button__text, .download-button__arrow, .download-button__bubble { transform: none !important; transition: none !important; }
  .mod-card:hover, a.release-preview:hover { transform: none; }
  .download-button__bubble, .pointer-light { display: none; }
  .download-button__arrow--left { display: none; }
  .download-button__arrow--right { right: 18px !important; }
}
