/* Build 0139 — File Database public UX modernization.
   This stylesheet owns the public archive browsing/detail presentation only. */

.tg-file-feature-section,
.tg-file-category-section,
.tg-file-fresh-section,
.tg-file-browser-section,
.tg-file-search-section,
.tg-file-detail-section,
.tg-file-download-section,
.tg-file-community-section {
    position: relative;
}

.tg-file-hero-actions {
    margin-top: .75rem;
}

/* ---------- File Database landing page ---------- */
.tg-file-feature-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
    min-height: 360px;
    border: 1px solid var(--tg007-line);
    border-radius: var(--tg007-radius-lg);
    background: #fff;
    box-shadow: var(--tg007-card-shadow);
}

.tg-file-feature-image {
    position: relative;
    min-height: 360px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: clamp(1rem, 2.2vw, 1.75rem);
    border-right: 1px solid #dbe3e8;
    background:
        linear-gradient(145deg, rgba(31, 45, 57, .96), rgba(19, 29, 37, .98)),
        radial-gradient(circle at 30% 20%, rgba(61, 126, 173, .2), transparent 52%);
}

.tg-file-feature-image::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, .035), transparent 72%);
    content: "";
    pointer-events: none;
}

.tg-file-feature-image img {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 310px;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: .7rem;
    background: #10171d;
    box-shadow: 0 22px 45px rgba(0, 0, 0, .28);
}

.tg-file-feature-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.6rem, 3.6vw, 2.7rem);
}

.tg-file-feature-copy h3 {
    margin: .65rem 0 .6rem;
    color: #202a31;
    font-size: clamp(1.65rem, 2.5vw, 2.2rem);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.06;
}

.tg-file-feature-copy h3 a,
.tg-file-card h3 a,
.tg-file-result-card h3 a,
.tg-file-list-row,
.tg-file-category-card h3 a {
    color: inherit !important;
    text-decoration: none;
}

.tg-file-feature-copy h3 a:hover,
.tg-file-feature-copy h3 a:focus-visible,
.tg-file-card h3 a:hover,
.tg-file-card h3 a:focus-visible,
.tg-file-result-card h3 a:hover,
.tg-file-result-card h3 a:focus-visible,
.tg-file-category-card h3 a:hover,
.tg-file-category-card h3 a:focus-visible {
    color: var(--tg007-blue-dark) !important;
}

.tg-file-feature-tagline {
    margin: 0 0 .7rem !important;
    color: #3f596c !important;
    font-size: .95rem !important;
    font-weight: 700;
}

.tg-file-feature-copy > p:not(.tg-file-feature-tagline) {
    margin: 0;
    color: var(--tg007-muted);
    font-size: .92rem;
    line-height: 1.62;
}

.tg-file-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    margin-top: 1.35rem;
}

.tg-file-metrics span {
    padding: .72rem .8rem;
    border: 1px solid #e0e7ec;
    border-radius: .75rem;
    color: #687580;
    background: #f7f9fa;
    font-size: .72rem;
    line-height: 1.25;
}

.tg-file-metrics strong {
    display: block;
    margin-bottom: .12rem;
    color: #26333c;
    font-size: 1rem;
}

.tg-file-byline {
    margin-top: 1rem;
    color: #78848d;
    font-size: .78rem;
    font-weight: 650;
}

.tg-file-category-section {
    border-top: 1px solid #e0e6ea;
    border-bottom: 1px solid #e0e6ea;
    background:
        radial-gradient(circle at 0 0, rgba(61, 126, 173, .055), transparent 28rem),
        #f5f7f8;
}

.tg-file-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}

.tg-file-category-card {
    position: relative;
    min-width: 0;
    min-height: 196px;
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    overflow: hidden;
    border: 1px solid #dbe2e7;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 24px rgba(26, 36, 44, .035);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.tg-file-category-card::after {
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 110px;
    height: 110px;
    border: 18px solid rgba(61, 126, 173, .035);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.tg-file-category-card:hover {
    border-color: #c5d2db;
    box-shadow: 0 14px 32px rgba(28, 39, 48, .075);
    transform: translateY(-2px);
}

.tg-file-category-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
}

.tg-file-folder {
    position: relative;
    width: 38px;
    height: 28px;
    flex: 0 0 38px;
    display: inline-block;
    margin-top: 5px;
    border: 1px solid #b8cad6;
    border-radius: 5px;
    background: #e8f0f5;
    box-shadow: inset 0 -8px 18px rgba(61, 126, 173, .055);
}

.tg-file-folder::before {
    position: absolute;
    top: -6px;
    left: 3px;
    width: 16px;
    height: 7px;
    border: 1px solid #b8cad6;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
    background: #e8f0f5;
    content: "";
}

.tg-file-folder::after {
    position: absolute;
    right: 7px;
    bottom: 7px;
    left: 7px;
    height: 2px;
    border-radius: 999px;
    background: #4d82a5;
    content: "";
    opacity: .72;
}

.tg-file-category-count {
    color: #6c7a85;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tg-file-category-card h3 {
    position: relative;
    z-index: 1;
    margin: .95rem 0 .35rem;
    color: #25323a;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.18;
}

.tg-file-category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #6b7882;
    font-size: .78rem;
    line-height: 1.45;
}

.tg-file-category-subline {
    position: relative;
    z-index: 1;
    margin-top: .7rem;
    color: #85919a;
    font-size: .7rem;
    font-weight: 700;
}

.tg-file-category-card .tg-card-link {
    position: relative;
    z-index: 1;
    padding-top: .8rem;
    font-size: .75rem;
}

.tg-file-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.tg-file-card {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tg007-line);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(26, 36, 44, .04);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.tg-file-card:hover {
    border-color: #c6d2da;
    box-shadow: 0 14px 34px rgba(28, 39, 48, .08);
    transform: translateY(-2px);
}

.tg-file-card-thumb {
    height: 168px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: .85rem;
    border-bottom: 1px solid #e0e6ea;
    background: linear-gradient(145deg, #eef2f4, #e5ebef);
}

.tg-file-card-thumb img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 142px;
    object-fit: contain;
    border-radius: .45rem;
    box-shadow: 0 8px 20px rgba(20, 29, 36, .12);
}

.tg-file-card-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.15rem 1rem;
}

.tg-file-card h3 {
    margin: .55rem 0 .45rem;
    color: #253039;
    font-size: 1.04rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.tg-file-card-body > p {
    margin: 0;
    color: var(--tg007-muted);
    font-size: .79rem;
    line-height: 1.5;
}

.tg-file-card-footer {
    display: flex;
    justify-content: space-between;
    gap: .65rem;
    margin-top: auto;
    padding-top: .9rem;
    color: #78858f;
    font-size: .7rem;
    font-weight: 700;
}

.tg-file-fresh-section {
    background: #f5f7f8;
}

.tg-file-dual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.tg-file-list-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d9e1e6;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 26px rgba(28, 39, 48, .035);
}

.tg-file-list-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.05rem;
    border-bottom: 1px solid #e2e7eb;
    background: #fbfcfd;
}

.tg-file-list-panel-head h3 {
    margin: 0;
    color: #26323a;
    font-size: 1rem;
    font-weight: 800;
}

.tg-file-list-panel-head a,
.tg-file-browser-actions a {
    color: var(--tg007-blue-dark) !important;
    font-size: .72rem;
    font-weight: 800;
    text-decoration: none;
}

.tg-file-list-row {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .8rem;
    padding: .82rem 1.05rem;
    border-bottom: 1px solid #edf0f2;
    background: #fff;
    transition: background .14s ease;
}

.tg-file-list-row:last-child {
    border-bottom: 0;
}

.tg-file-list-row:hover,
.tg-file-list-row:focus-visible {
    background: #f7fafb;
}

.tg-file-list-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: .62rem;
    color: #365e79;
    background: #e8f0f5;
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .05em;
}

.tg-file-list-icon-popular {
    color: #775a32;
    background: #f5efe4;
}

.tg-file-list-main {
    min-width: 0;
}

.tg-file-list-main strong,
.tg-file-list-main small,
.tg-file-list-stat small {
    display: block;
}

.tg-file-list-main strong {
    overflow: hidden;
    color: #26323a;
    font-size: .82rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-file-list-main small {
    margin-top: .18rem;
    overflow: hidden;
    color: #7b8790;
    font-size: .66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-file-list-stat {
    min-width: 58px;
    color: #2f3c44;
    font-size: .82rem;
    font-weight: 800;
    text-align: right;
}

.tg-file-list-stat small {
    color: #8a959d;
    font-size: .58rem;
    font-weight: 650;
}

/* ---------- Category browser + search results ---------- */
.tg-file-browser-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: .75rem;
    border: 1px solid #dbe2e7;
    border-radius: .9rem;
    background: #f7f9fa;
}

.tg-file-sort,
.tg-file-browser-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
}

.tg-file-sort > span {
    padding: .42rem .5rem;
    color: #6d7a84;
    font-size: .72rem;
    font-weight: 800;
}

.tg-file-sort a {
    padding: .4rem .62rem;
    border: 1px solid transparent;
    border-radius: .55rem;
    color: #53636e !important;
    font-size: .72rem;
    font-weight: 750;
    text-decoration: none;
}

.tg-file-sort a:hover,
.tg-file-sort a:focus-visible,
.tg-file-sort a.is-active {
    border-color: #c7d5de;
    color: #264f6d !important;
    background: #fff;
}

.tg-file-sort a.is-active {
    box-shadow: 0 3px 10px rgba(31, 49, 63, .06);
}

.tg-file-browser-actions {
    justify-content: flex-end;
    gap: .8rem;
}

.tg-file-subcategory-block {
    margin-bottom: 2.25rem;
}

.tg-file-subcategory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.tg-file-subcategory {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: .9rem;
    border: 1px solid #dce3e8;
    border-radius: .85rem;
    color: #2c3942 !important;
    background: #fafcfd;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.tg-file-subcategory:hover,
.tg-file-subcategory:focus-visible {
    border-color: #bfd0db;
    background: #fff;
    transform: translateY(-1px);
}

.tg-file-subcategory strong,
.tg-file-subcategory small {
    display: block;
}

.tg-file-subcategory strong {
    overflow: hidden;
    font-size: .82rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-file-subcategory small {
    margin-top: .12rem;
    color: #80909a;
    font-size: .65rem;
}

.tg-file-results-heading {
    padding-top: .5rem;
    border-top: 1px solid #e3e8eb;
}

.tg-file-result-list {
    display: grid;
    gap: .85rem;
}

.tg-file-result-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #dce3e8;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 6px 20px rgba(26, 36, 44, .03);
}

.tg-file-result-card.is-highlighted {
    border-color: #b9ccd9;
    box-shadow: inset 3px 0 0 var(--tg007-blue), 0 8px 24px rgba(28, 39, 48, .045);
}

.tg-file-result-thumb {
    min-height: 148px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: .8rem;
    border-right: 1px solid #e1e6ea;
    background: #eef2f4;
}

.tg-file-result-thumb img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 126px;
    object-fit: contain;
    border-radius: .38rem;
    box-shadow: 0 7px 18px rgba(22, 31, 38, .1);
}

.tg-file-result-body {
    min-width: 0;
    padding: 1rem 1.1rem;
}

.tg-file-result-body h3 {
    margin: .4rem 0 .25rem;
    color: #25323a;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.18;
}

.tg-file-result-by {
    color: #76848d;
    font-size: .72rem;
    font-weight: 650;
}

.tg-file-result-body > p {
    margin: .55rem 0 0;
    color: #65737d;
    font-size: .79rem;
    line-height: 1.5;
}

.tg-file-result-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem 1rem;
    margin-top: .78rem;
    padding-top: .7rem;
    border-top: 1px solid #edf0f2;
    color: #7b8790;
    font-size: .68rem;
    font-weight: 700;
}

.tg-file-result-footer a {
    margin-left: auto;
    color: var(--tg007-blue-dark) !important;
    font-weight: 850;
    text-decoration: none;
}

.tg-file-search-form {
    max-width: 900px;
    margin: 0 auto 2rem;
    padding: clamp(1.2rem, 3vw, 1.7rem);
    border: 1px solid #dbe3e8;
    border-radius: 1rem;
    background: #f7f9fa;
}

.tg-file-search-form > label {
    display: block;
    margin-bottom: .55rem;
    color: #2b3942;
    font-size: .83rem;
    font-weight: 800;
}

.tg-file-search-form > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .6rem;
}

.tg-file-search-form input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: .7rem .8rem;
    border: 1px solid #cdd8df;
    border-radius: .7rem;
    color: #26333b;
    background: #fff;
    font: inherit;
    outline: 0;
}

.tg-file-search-form input:focus {
    border-color: #6e9bb7;
    box-shadow: 0 0 0 3px rgba(61, 126, 173, .13);
}

.tg-file-search-form small {
    display: block;
    margin-top: .55rem;
    color: #7d8992;
    font-size: .68rem;
}

.tg-file-search-results-heading {
    margin-top: 2rem;
}

.tg-file-search-suggestions {
    max-width: 900px;
    margin: 2rem auto 0;
    padding: 1.4rem;
    border: 1px solid #e0e6ea;
    border-radius: 1rem;
    background: #fff;
}

.tg-file-search-suggestions h2 {
    margin: .3rem 0 .9rem;
    color: #29363e;
    font-size: 1.35rem;
}

.tg-file-search-suggestions > div {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.tg-file-search-suggestions > div span {
    padding: .43rem .65rem;
    border: 1px solid #dbe3e8;
    border-radius: 999px;
    color: #5d6d78;
    background: #f7f9fa;
    font-size: .7rem;
    font-weight: 700;
}

/* ---------- File detail ---------- */
.tg-file-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, .65fr);
    align-items: start;
    gap: clamp(1.5rem, 3.5vw, 2.5rem);
}

.tg-file-detail-main,
.tg-file-detail-sidebar {
    min-width: 0;
}

.tg-file-description-content {
    color: #4f5f69;
    font-size: .92rem;
    line-height: 1.72;
}

.tg-file-description-content > :first-child {
    margin-top: 0;
}

.tg-file-description-content > :last-child {
    margin-bottom: 0;
}

.tg-file-description-content a {
    color: var(--tg007-blue-dark) !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.tg-file-video {
    position: relative;
    width: 100%;
    margin-top: 1.5rem;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid #d6dee4;
    border-radius: .95rem;
    background: #111820;
}

.tg-file-video iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.tg-file-other-block {
    margin-top: 2.2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e1e6ea;
}

.tg-file-other-block h2 {
    margin: .28rem 0 .8rem;
    color: #28353d;
    font-size: 1.35rem;
}

.tg-file-other-links {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.tg-file-other-links a {
    padding: .48rem .65rem;
    border: 1px solid #dce4e9;
    border-radius: .6rem;
    color: #3a6079 !important;
    background: #f8fafb;
    font-size: .72rem;
    font-weight: 750;
    text-decoration: none;
}

.tg-file-info-card,
.tg-file-rating-card {
    padding: 1.2rem;
    border: 1px solid #dbe2e7;
    border-radius: 1rem;
    background: #f9fbfc;
}

.tg-file-rating-card {
    margin-top: 1rem;
    background: #fff;
}

.tg-file-info-card dl {
    margin: .85rem 0 0;
}

.tg-file-info-card dl > div {
    display: grid;
    grid-template-columns: minmax(80px, .7fr) minmax(0, 1.3fr);
    gap: .8rem;
    padding: .62rem 0;
    border-bottom: 1px solid #e5eaed;
}

.tg-file-info-card dl > div:last-child {
    border-bottom: 0;
}

.tg-file-info-card dt {
    color: #7a8790;
    font-size: .68rem;
    font-weight: 750;
}

.tg-file-info-card dd {
    min-width: 0;
    margin: 0;
    color: #2d3b44;
    font-size: .72rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tg-file-info-card dd a,
.tg-file-report-link {
    color: var(--tg007-blue-dark) !important;
}

.tg-file-report-link {
    display: inline-block;
    margin-top: .8rem;
    font-size: .69rem;
    font-weight: 800;
    text-decoration: none;
}

.tg-file-rating-score {
    display: flex;
    align-items: baseline;
    gap: .2rem;
    margin-top: .7rem;
    color: #2b3841;
}

.tg-file-rating-score strong {
    font-size: 2rem;
    line-height: 1;
}

.tg-file-rating-score span {
    color: #89949b;
    font-size: .82rem;
    font-weight: 700;
}

.tg-file-rating-stars {
    margin-top: .45rem;
    color: #c9d1d6;
    letter-spacing: .08em;
}

.tg-file-rating-stars .is-filled {
    color: #d49b3a;
}

.tg-file-rating-card > p {
    margin: .35rem 0 .75rem;
    color: #7c8992;
    font-size: .7rem;
}

.tg-file-rate-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
}

.tg-file-rate-form > span {
    margin-right: .25rem;
    color: #65747e;
    font-size: .7rem;
    font-weight: 750;
}

.tg-file-rate-form button {
    padding: .36rem .48rem;
    border: 1px solid #d6dfe4;
    border-radius: .5rem;
    color: #586a76;
    background: #fff;
    font: inherit;
    font-size: .66rem;
    font-weight: 800;
    cursor: pointer;
}

.tg-file-rate-form button:hover,
.tg-file-rate-form button:focus-visible {
    border-color: #adc3d1;
    color: #2f6385;
    background: #f3f8fb;
}

.tg-file-community-section {
    background: #f4f7f8;
}

.tg-file-comment-form {
    max-width: 880px;
    margin-bottom: 1.25rem;
    padding: 1rem;
    border: 1px solid #dbe3e8;
    border-radius: .9rem;
    background: #fff;
}

.tg-file-comment-form textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    padding: .72rem .8rem;
    border: 1px solid #ccd8df;
    border-radius: .65rem;
    color: #28363e;
    background: #fff;
    font: inherit;
    outline: 0;
}

.tg-file-comment-form textarea:focus {
    border-color: #6e9bb7;
    box-shadow: 0 0 0 3px rgba(61, 126, 173, .12);
}

.tg-file-comment-form .tg-btn {
    margin-top: .65rem;
}

.tg-file-comment-list {
    display: grid;
    gap: .75rem;
}

.tg-file-comment {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: .85rem;
    padding: 1rem;
    border: 1px solid #dbe3e8;
    border-radius: .9rem;
    background: #fff;
}

.tg-file-comment-avatar {
    width: 44px;
    height: 44px;
    overflow: hidden;
    border: 1px solid #d6dfe4;
    border-radius: 50%;
    background: #edf2f5;
}

.tg-file-comment-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.tg-file-comment-body {
    min-width: 0;
}

.tg-file-comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .8rem;
    color: #849099;
    font-size: .68rem;
}

.tg-file-comment-head strong {
    color: #2b3942;
    font-size: .76rem;
}

.tg-file-comment-text {
    margin-top: .4rem;
    color: #596872;
    font-size: .79rem;
    line-height: 1.5;
}

.tg-file-signin-callout {
    margin-bottom: 1rem;
    padding: .8rem 1rem;
    border: 1px solid #d9e2e7;
    border-radius: .75rem;
    color: #61717b;
    background: #fff;
    font-size: .76rem;
}

.tg-file-signin-callout a {
    color: var(--tg007-blue-dark) !important;
    font-weight: 800;
}

/* ---------- Download flow ---------- */
.tg-file-download-card {
    max-width: 760px;
    margin-inline: auto;
    padding: clamp(1.5rem, 4vw, 2.4rem);
    border: 1px solid #cbdce6;
    border-radius: var(--tg007-radius-lg);
    background:
        radial-gradient(circle at 100% 0, rgba(61, 126, 173, .08), transparent 18rem),
        #f8fbfc;
    box-shadow: 0 16px 40px rgba(28, 39, 48, .07);
    text-align: center;
}

.tg-file-download-card.is-blocked {
    border-color: #decfd0;
    background: #fffafa;
}

.tg-file-download-state {
    display: inline-flex;
    padding: .32rem .58rem;
    border-radius: 999px;
    color: #315d78;
    background: #e5f0f6;
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.tg-file-download-card.is-blocked .tg-file-download-state {
    color: #7d4b4d;
    background: #f5e9ea;
}

.tg-file-download-card h2 {
    margin: .75rem 0 .5rem;
    color: #26343c;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.tg-file-download-card p {
    max-width: 620px;
    margin: 0 auto 1rem;
    color: #687680;
    font-size: .86rem;
}

.tg-file-download-card form {
    margin: .9rem 0;
}

.tg-file-download-card > .tg-btn + .tg-btn {
    margin-left: .45rem;
}

.tg-file-download-card > small {
    display: block;
    max-width: 620px;
    margin: .8rem auto 0;
    color: #89949c;
    font-size: .67rem;
}

.tg-file-text-preview {
    max-width: 980px;
    margin: 1.5rem auto 0;
    overflow: hidden;
    border: 1px solid #d6dfe4;
    border-radius: 1rem;
    background: #111820;
}

.tg-file-text-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: #1b252d;
}

.tg-file-text-preview-head h2 {
    margin: .18rem 0 0;
    color: #f0f4f6;
    font-size: 1rem;
}

.tg-file-text-preview-head button {
    padding: .42rem .65rem;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: .55rem;
    color: #e3edf3;
    background: rgba(255, 255, 255, .06);
    font: inherit;
    font-size: .68rem;
    font-weight: 800;
    cursor: pointer;
}

.tg-file-text-preview pre {
    max-height: 520px;
    margin: 0;
    overflow: auto;
    padding: 1rem;
    color: #dbe5eb;
    background: #111820;
    font-size: .75rem;
    line-height: 1.5;
}

.tg-file-text-code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ---------- Responsive behavior ---------- */
@media (max-width: 1120px) {
    .tg-file-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tg-file-feature-card {
        grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
    }
}

@media (max-width: 900px) {
    .tg-file-feature-card,
    .tg-file-detail-grid {
        grid-template-columns: 1fr;
    }

    .tg-file-feature-image {
        min-height: 260px;
        border-right: 0;
        border-bottom: 1px solid #dbe3e8;
    }

    .tg-file-feature-image img {
        max-height: 225px;
    }

    .tg-file-category-grid,
    .tg-file-card-grid,
    .tg-file-subcategory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tg-file-dual-grid {
        grid-template-columns: 1fr;
    }

    .tg-file-detail-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .tg-file-rating-card {
        margin-top: 0;
    }
}

@media (max-width: 700px) {
    .tg-file-browser-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .tg-file-browser-actions {
        justify-content: flex-start;
        padding-top: .6rem;
        border-top: 1px solid #e2e7eb;
    }

    .tg-file-result-card {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .tg-file-result-thumb {
        min-height: 118px;
    }

    .tg-file-result-thumb img {
        max-height: 96px;
    }

    .tg-file-result-footer a {
        width: 100%;
        margin-left: 0;
    }

    .tg-file-search-form > div {
        grid-template-columns: 1fr;
    }

    .tg-file-search-form .tg-btn {
        width: 100%;
    }

    .tg-file-detail-sidebar {
        grid-template-columns: 1fr;
    }

    .tg-file-download-card > .tg-btn + .tg-btn {
        margin: .55rem 0 0;
    }
}

@media (max-width: 560px) {
    .tg-file-category-grid,
    .tg-file-card-grid,
    .tg-file-subcategory-grid {
        grid-template-columns: 1fr;
    }

    .tg-file-category-card {
        min-height: 0;
    }

    .tg-file-result-card {
        grid-template-columns: 1fr;
    }

    .tg-file-result-thumb {
        min-height: 160px;
        border-right: 0;
        border-bottom: 1px solid #e1e6ea;
    }

    .tg-file-result-thumb img {
        max-height: 138px;
    }

    .tg-file-list-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .tg-file-list-stat {
        display: none;
    }

    .tg-file-metrics {
        grid-template-columns: 1fr;
    }

    .tg-file-comment {
        grid-template-columns: 1fr;
    }
}

/* Small shared states used by the archive templates but not owned globally. */
.tg-form-alert {
    margin: 1rem 0;
    padding: .78rem .9rem;
    border: 1px solid #d7e1e7;
    border-radius: .7rem;
    color: #53636e;
    background: #f7fafb;
    font-size: .76rem;
    font-weight: 700;
}

.tg-form-alert-error {
    border-color: #dfc9cb;
    color: #75484b;
    background: #fff7f7;
}

.tg-form-alert-success {
    border-color: #c7ddcf;
    color: #42664e;
    background: #f4fbf6;
}

.tg-meta-accent {
    color: #2e6b91 !important;
}

.tg-search-limit-note {
    margin-top: 1rem;
    padding: .72rem .85rem;
    border: 1px solid #dce4e9;
    border-radius: .7rem;
    color: #74818a;
    background: #f7f9fa;
    font-size: .7rem;
    font-weight: 650;
}

.tg-file-follow-button {
    padding: .48rem .7rem;
    border: 1px solid #cbd8e0;
    border-radius: .6rem;
    color: #315f7c;
    background: #fff;
    font: inherit;
    font-size: .7rem;
    font-weight: 800;
    cursor: pointer;
}

.tg-file-follow-button:hover,
.tg-file-follow-button:focus-visible {
    border-color: #a9c1d0;
    background: #eef5f8;
}

.tg-file-comment-form > label {
    display: block;
    margin-bottom: .45rem;
    color: #2f3e47;
    font-size: .76rem;
    font-weight: 800;
}

.tg-file-comment-form > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-top: .55rem;
}

.tg-file-comment-form > div small {
    color: #849098;
    font-size: .66rem;
}

.tg-file-comment-form > div .tg-btn {
    flex: 0 0 auto;
    margin-top: 0;
}

.tg-file-comment-head > div {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .55rem;
}

.tg-file-comment-head a {
    color: #2d536d !important;
    text-decoration: none;
}

.tg-file-comment-head > form {
    margin-left: auto;
}

.tg-file-comment-head button {
    padding: .2rem .35rem;
    border: 0;
    color: #8a5a5b;
    background: transparent;
    font: inherit;
    font-size: .65rem;
    font-weight: 800;
    cursor: pointer;
}

.tg-file-comment-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 560px) {
    .tg-file-comment-form > div {
        align-items: stretch;
        flex-direction: column;
    }

    .tg-file-comment-form > div .tg-btn {
        width: 100%;
    }
}

/* Build 0139 Completion Fix 1 — File Database landing-page density parity.
 * The homepage is the visual scale reference: tighter section rhythm, compact
 * cards/rows and restrained shadows keep the archive useful without making it
 * feel like a separate oversized application. */
.tg-file-feature-section,
.tg-file-category-section,
.tg-file-highlight-section,
.tg-file-fresh-section {
    padding-block: clamp(1.85rem, 3vw, 2.35rem);
}

.tg-file-feature-section .tg-section-heading,
.tg-file-category-section .tg-section-heading,
.tg-file-highlight-section .tg-section-heading,
.tg-file-fresh-section .tg-section-heading {
    margin-bottom: .72rem;
}

.tg-file-feature-section .tg-section-heading h2,
.tg-file-category-section .tg-section-heading h2,
.tg-file-highlight-section .tg-section-heading h2,
.tg-file-fresh-section .tg-section-heading h2 {
    margin-top: .12rem;
    font-size: clamp(1.5rem, 2vw, 1.95rem);
}

.tg-file-feature-section .tg-kicker,
.tg-file-category-section .tg-kicker,
.tg-file-highlight-section .tg-kicker,
.tg-file-fresh-section .tg-kicker {
    font-size: .61rem;
}

.tg-file-feature-section .tg-text-link,
.tg-file-highlight-section .tg-text-link,
.tg-file-category-section .tg-section-heading > p,
.tg-file-fresh-section .tg-section-heading > p {
    font-size: .72rem;
}

.tg-file-category-section .tg-section-heading > p,
.tg-file-fresh-section .tg-section-heading > p {
    max-width: 340px;
    line-height: 1.35;
}

.tg-file-feature-card {
    grid-template-columns: minmax(0, 1.3fr) minmax(310px, .7fr);
    min-height: 260px;
    border-radius: .78rem;
    box-shadow: 0 8px 22px rgba(26, 36, 44, .045);
}

.tg-file-feature-image {
    min-height: 260px;
    padding: .9rem;
}

.tg-file-feature-image img {
    max-height: 220px;
    border-radius: .45rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}

.tg-file-feature-copy {
    padding: 1rem 1.15rem;
}

.tg-file-feature-copy h3 {
    margin: .38rem 0 .34rem;
    font-size: clamp(1.28rem, 1.8vw, 1.62rem);
    line-height: 1.08;
}

.tg-file-feature-tagline {
    margin-bottom: .38rem !important;
    font-size: .78rem !important;
}

.tg-file-feature-copy > p:not(.tg-file-feature-tagline) {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    font-size: .75rem;
    line-height: 1.42;
}

.tg-file-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .35rem;
    margin-top: .7rem;
}

.tg-file-metrics span {
    padding: .42rem .48rem;
    border-radius: .52rem;
    font-size: .58rem;
}

.tg-file-metrics strong {
    margin-bottom: .08rem;
    font-size: .82rem;
}

.tg-file-byline {
    margin-top: .55rem;
    font-size: .64rem;
}

.tg-file-category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .55rem;
}

.tg-file-category-card {
    min-height: 132px;
    padding: .72rem .78rem;
    border-radius: .68rem;
    box-shadow: 0 4px 12px rgba(26, 36, 44, .025);
}

.tg-file-category-card::after {
    display: none;
}

.tg-file-category-card:hover {
    box-shadow: 0 7px 16px rgba(28, 39, 48, .055);
    transform: translateY(-1px);
}

.tg-file-folder {
    width: 28px;
    height: 20px;
    flex-basis: 28px;
    margin-top: 3px;
    border-radius: 4px;
}

.tg-file-folder::before {
    top: -5px;
    width: 12px;
    height: 6px;
}

.tg-file-folder::after {
    right: 5px;
    bottom: 5px;
    left: 5px;
}

.tg-file-category-count {
    font-size: .57rem;
}

.tg-file-category-card h3 {
    margin: .55rem 0 .2rem;
    font-size: .82rem;
    line-height: 1.16;
}

.tg-file-category-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: .65rem;
    line-height: 1.35;
}

.tg-file-category-subline {
    margin-top: .35rem;
    font-size: .58rem;
}

.tg-file-category-card .tg-card-link {
    padding-top: .42rem;
    font-size: .61rem;
}

.tg-file-highlight-section .tg-file-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
}

.tg-file-highlight-section .tg-file-card {
    border-radius: .72rem;
    box-shadow: 0 5px 14px rgba(26, 36, 44, .03);
}

.tg-file-highlight-section .tg-file-card-thumb {
    height: 112px;
    padding: .55rem;
}

.tg-file-highlight-section .tg-file-card-thumb img {
    max-height: 92px;
    border-radius: .32rem;
    box-shadow: 0 5px 12px rgba(20, 29, 36, .1);
}

.tg-file-highlight-section .tg-file-card-body {
    padding: .68rem .72rem .65rem;
}

.tg-file-highlight-section .tg-file-card h3 {
    margin: .3rem 0 .24rem;
    font-size: .8rem;
    line-height: 1.16;
}

.tg-file-highlight-section .tg-file-card-body > p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: .66rem;
    line-height: 1.38;
}

.tg-file-highlight-section .tg-file-card-footer {
    padding-top: .5rem;
    font-size: .59rem;
}

.tg-file-dual-grid {
    align-items: start;
    gap: .75rem;
}

.tg-file-list-panel {
    border-radius: .72rem;
    box-shadow: 0 5px 16px rgba(28, 39, 48, .025);
}

.tg-file-list-panel-head {
    gap: .7rem;
    padding: .65rem .72rem;
}

.tg-file-list-panel-head h3 {
    font-size: .82rem;
}

.tg-file-list-panel-head a {
    font-size: .62rem;
}

.tg-file-list-row {
    gap: .55rem;
    padding: .46rem .7rem;
}

.tg-file-list-icon {
    width: 30px;
    height: 30px;
    border-radius: .45rem;
    font-size: .46rem;
}

.tg-file-list-main strong {
    font-size: .72rem;
}

.tg-file-list-main small {
    margin-top: .08rem;
    font-size: .57rem;
}

.tg-file-list-stat {
    min-width: 50px;
    font-size: .7rem;
}

.tg-file-list-stat small {
    font-size: .52rem;
}

@media (max-width: 1180px) {
    .tg-file-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .tg-file-feature-card {
        grid-template-columns: 1fr;
    }

    .tg-file-feature-image {
        min-height: 220px;
    }

    .tg-file-feature-image img {
        max-height: 188px;
    }

    .tg-file-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tg-file-highlight-section .tg-file-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .tg-file-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tg-file-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .tg-file-feature-section,
    .tg-file-category-section,
    .tg-file-highlight-section,
    .tg-file-fresh-section {
        padding-block: 1.5rem;
    }

    .tg-file-category-grid,
    .tg-file-highlight-section .tg-file-card-grid {
        grid-template-columns: 1fr;
    }

    .tg-file-category-card {
        min-height: 0;
    }
}

/* Build 0139 Completion Fix 2 — modern category navigation + clean links.
 * Keep the File Database aligned with the homepage: links use color/state
 * changes instead of browser-style underlines, while category navigation is
 * presented as a compact, fully-clickable archive card. */
.tg-file-feature-section a,
.tg-file-category-section a,
.tg-file-highlight-section a,
.tg-file-fresh-section a,
.tg-file-browser-section a,
.tg-file-search-section a,
.tg-file-detail-section a,
.tg-file-download-section a,
.tg-file-community-section a,
.tg-file-hero-actions a {
    text-decoration: none !important;
}

.tg-file-category-card {
    isolation: isolate;
    min-height: 136px;
    padding: .74rem .8rem .68rem;
    border-color: #d8e1e7;
    border-radius: .72rem;
    color: #25323a !important;
    background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
    box-shadow: 0 3px 10px rgba(25, 39, 49, .028);
    text-decoration: none !important;
}

.tg-file-category-card::before {
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    border-radius: .72rem .72rem 0 0;
    background: linear-gradient(90deg, #3d7ea6 0 42px, #dbe7ee 42px 100%);
    content: "";
    opacity: .72;
    transition: opacity .16s ease, background .16s ease;
}

.tg-file-category-card:hover,
.tg-file-category-card:focus-visible {
    border-color: #bfcfd9;
    color: #25323a !important;
    background: #fff;
    box-shadow: 0 7px 18px rgba(30, 53, 68, .065);
    transform: translateY(-1px);
}

.tg-file-category-card:hover::before,
.tg-file-category-card:focus-visible::before {
    background: linear-gradient(90deg, #2f739e 0 58%, #88b5cf 100%);
    opacity: 1;
}

.tg-file-category-card:focus-visible {
    outline: 2px solid rgba(47, 115, 158, .4);
    outline-offset: 2px;
}

.tg-file-category-card-top {
    padding-top: .08rem;
}

.tg-file-folder {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    margin-top: 0;
    border: 1px solid #c8dae5;
    border-radius: .55rem;
    background: #edf5f9;
    box-shadow: none;
}

.tg-file-folder::before {
    top: 11px;
    left: 7px;
    width: 18px;
    height: 13px;
    border: 0;
    border-radius: 2px 2px 3px 3px;
    background: #5c8eac;
}

.tg-file-folder::after {
    top: 8px;
    right: auto;
    bottom: auto;
    left: 8px;
    width: 9px;
    height: 5px;
    border-radius: 2px 2px 0 0;
    background: #5c8eac;
    opacity: 1;
}

.tg-file-category-count {
    display: inline-flex;
    align-items: baseline;
    gap: .2rem;
    padding: .2rem .4rem;
    border: 1px solid #e0e7eb;
    border-radius: 999px;
    color: #77858e;
    background: #f6f8f9;
    font-size: .54rem;
    letter-spacing: .025em;
}

.tg-file-category-count strong {
    color: #2f6f97;
    font-size: .63rem;
    font-weight: 850;
}

.tg-file-category-card h3 {
    margin: .52rem 0 .18rem;
    color: #25323a;
    font-size: .84rem;
    line-height: 1.15;
    transition: color .15s ease;
}

.tg-file-category-card:hover h3,
.tg-file-category-card:focus-visible h3 {
    color: #2b668a;
}

.tg-file-category-card p {
    min-height: 1.75em;
    -webkit-line-clamp: 2;
    color: #6f7d86;
    font-size: .62rem;
    line-height: 1.32;
}

.tg-file-category-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: auto;
    padding-top: .48rem;
    border-top: 1px solid #edf1f3;
    color: #7d8a92;
    font-size: .56rem;
    font-weight: 700;
}

.tg-file-category-arrow {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #d4e0e7;
    border-radius: 50%;
    color: #356f92;
    background: #f3f8fa;
    font-size: .72rem;
    line-height: 1;
    transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}

.tg-file-category-card:hover .tg-file-category-arrow,
.tg-file-category-card:focus-visible .tg-file-category-arrow {
    border-color: #397ba3;
    color: #fff;
    background: #397ba3;
    transform: translateX(1px);
}

/* Category-detail navigation uses the same compact archive language. */
.tg-file-subcategory {
    padding: .68rem .72rem;
    border-color: #d9e2e7;
    border-radius: .7rem;
    background: linear-gradient(180deg, #fff, #fbfcfd);
    box-shadow: 0 3px 10px rgba(25, 39, 49, .025);
}

.tg-file-subcategory:hover,
.tg-file-subcategory:focus-visible {
    border-color: #bfd0da;
    background: #fff;
    box-shadow: 0 6px 15px rgba(30, 53, 68, .055);
}

.tg-file-subcategory strong {
    color: #2d3a42;
    font-size: .78rem;
}

.tg-file-subcategory small {
    color: #7f8c94;
    font-size: .59rem;
}

.tg-file-subcategory > span:last-child {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #d4e0e7;
    border-radius: 50%;
    color: #356f92;
    background: #f3f8fa;
    font-size: .7rem;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.tg-file-subcategory:hover > span:last-child,
.tg-file-subcategory:focus-visible > span:last-child {
    border-color: #397ba3;
    color: #fff;
    background: #397ba3;
}

@media (max-width: 700px) {
    .tg-file-category-card {
        min-height: 128px;
    }
}

@media (max-width: 560px) {
    .tg-file-category-card {
        min-height: 0;
    }
}

/* Build 0141 — File detail visual parity.
 * Bring individual archive records into the compact, modern card language
 * approved on the File Database landing page without changing file behavior. */
.tg-modern-hero--file-detail .tg-file-crumbs a,
.tg-modern-hero--file-detail .tg-file-crumbs a:hover,
.tg-modern-hero--file-detail .tg-file-crumbs a:focus-visible {
    text-decoration: none !important;
}

.tg-file-detail-section,
.tg-file-community-section {
    padding-block: clamp(1.85rem, 3vw, 2.35rem);
}

.tg-file-detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    gap: 1rem;
}

.tg-file-detail-section .tg-section-heading,
.tg-file-community-section .tg-section-heading {
    margin-bottom: .72rem;
}

.tg-file-detail-section .tg-section-heading h2,
.tg-file-community-section .tg-section-heading h2 {
    margin-top: .12rem;
    font-size: clamp(1.5rem, 2vw, 1.9rem);
}

.tg-file-detail-section .tg-kicker,
.tg-file-community-section .tg-kicker,
.tg-file-other-block .tg-kicker,
.tg-file-detail-sidebar .tg-kicker {
    font-size: .6rem;
}

.tg-file-overview-card,
.tg-file-info-card,
.tg-file-rating-card,
.tg-file-other-block,
.tg-file-comment-form,
.tg-file-comment {
    border-color: #d8e1e7;
    border-radius: .72rem;
    box-shadow: 0 4px 14px rgba(26, 36, 44, .028);
}

.tg-file-overview-card,
.tg-file-info-card,
.tg-file-rating-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}

.tg-file-overview-card::before,
.tg-file-info-card::before,
.tg-file-rating-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #3d7ea6 0 46px, #dbe7ee 46px 100%);
    content: "";
    opacity: .76;
}

.tg-file-overview-card {
    padding: .95rem 1rem 1rem;
    border: 1px solid #d8e1e7;
}

.tg-file-overview-card .tg-section-heading {
    margin-bottom: .55rem;
}

.tg-file-description-content {
    color: #56656f;
    font-size: .8rem;
    line-height: 1.56;
}

.tg-file-description-content p {
    margin-block: .55rem;
}

.tg-file-description-content a,
.tg-file-description-content a:hover,
.tg-file-description-content a:focus-visible {
    color: #2d6f99 !important;
    text-decoration: none !important;
}

.tg-file-video {
    margin-top: .9rem;
    border-radius: .65rem;
}

.tg-file-other-block {
    margin-top: .72rem;
    padding: .82rem .9rem .88rem;
    border: 1px solid #d8e1e7;
    background: #f7f9fa;
}

.tg-file-other-block h2 {
    margin: .18rem 0 .55rem;
    font-size: .95rem;
    letter-spacing: -.015em;
}

.tg-file-other-links {
    gap: .36rem;
}

.tg-file-other-links a {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    padding: .38rem .5rem;
    border: 1px solid #d4dfe6;
    border-radius: .48rem;
    color: #315f7c !important;
    background: #fff;
    font-size: .64rem;
    font-weight: 760;
    line-height: 1.2;
    box-shadow: none;
    transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}

.tg-file-other-links a span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-file-other-links a span:last-child {
    color: #6f99b2;
    font-size: .7rem;
    transition: transform .15s ease;
}

.tg-file-other-links a:hover,
.tg-file-other-links a:focus-visible {
    border-color: #b9ccd8;
    color: #245f88 !important;
    background: #f3f8fb;
    transform: translateY(-1px);
}

.tg-file-other-links a:hover span:last-child,
.tg-file-other-links a:focus-visible span:last-child {
    transform: translateX(2px);
}

.tg-file-info-card,
.tg-file-rating-card {
    padding: .82rem .88rem .86rem;
    border: 1px solid #d8e1e7;
    background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}

.tg-file-rating-card {
    margin-top: .62rem;
}

.tg-file-info-card dl {
    margin: .55rem 0 0;
}

.tg-file-info-card dl > div {
    grid-template-columns: minmax(70px, .72fr) minmax(0, 1.28fr);
    gap: .55rem;
    padding: .42rem 0;
    border-bottom-color: #e7ecef;
}

.tg-file-info-card dt {
    color: #81909a;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .015em;
    text-transform: uppercase;
}

.tg-file-info-card dd {
    color: #2e3b44;
    font-size: .65rem;
    font-weight: 720;
}

.tg-file-info-card dd a,
.tg-file-info-card dd a:hover,
.tg-file-info-card dd a:focus-visible,
.tg-file-report-link,
.tg-file-report-link:hover,
.tg-file-report-link:focus-visible {
    text-decoration: none !important;
}

.tg-file-report-link {
    margin-top: .55rem;
    padding-top: .52rem;
    border-top: 1px solid #e7ecef;
    font-size: .61rem;
}

.tg-file-rating-score {
    margin-top: .5rem;
}

.tg-file-rating-score strong {
    font-size: 1.62rem;
}

.tg-file-rating-score span {
    font-size: .68rem;
}

.tg-file-rating-stars {
    margin-top: .25rem;
    font-size: .82rem;
}

.tg-file-rating-card > p {
    margin: .2rem 0 .5rem;
    font-size: .6rem;
}

.tg-file-rate-form {
    gap: .28rem;
}

.tg-file-rate-form > span {
    font-size: .62rem;
}

.tg-file-rate-form button {
    padding: .3rem .4rem;
    border-radius: .42rem;
    font-size: .6rem;
}

.tg-file-rating-card > small,
.tg-file-rating-card .tg-text-link {
    color: #74828b;
    font-size: .61rem;
    font-weight: 700;
}

.tg-file-community-section {
    border-top: 1px solid #e0e6ea;
    background: #f5f7f8;
}

.tg-file-community-section .tg-section-heading {
    align-items: end;
}

.tg-file-follow-button {
    padding: .38rem .58rem;
    border-radius: .5rem;
    font-size: .62rem;
}

.tg-file-comment-form {
    max-width: none;
    margin-bottom: .7rem;
    padding: .75rem .8rem;
    background: #fff;
}

.tg-file-comment-form > label {
    margin-bottom: .34rem;
    font-size: .68rem;
}

.tg-file-comment-form textarea {
    min-height: 82px;
    padding: .58rem .65rem;
    border-radius: .5rem;
    font-size: .75rem;
    line-height: 1.45;
}

.tg-file-comment-form > div {
    margin-top: .42rem;
}

.tg-file-comment-form > div small {
    font-size: .58rem;
}

.tg-file-comment-form > div .tg-btn {
    min-height: 34px;
    padding: .42rem .7rem;
    font-size: .64rem;
}

.tg-file-comment-list {
    gap: .45rem;
}

.tg-file-comment {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: .62rem;
    padding: .62rem .7rem;
    background: #fff;
}

.tg-file-comment-avatar {
    width: 34px;
    height: 34px;
}

.tg-file-comment-head {
    gap: .25rem .55rem;
    font-size: .6rem;
}

.tg-file-comment-head strong {
    font-size: .68rem;
}

.tg-file-comment-head a,
.tg-file-comment-head a:hover,
.tg-file-comment-head a:focus-visible {
    text-decoration: none !important;
}

.tg-file-comment-head button {
    padding: .12rem .25rem;
    font-size: .58rem;
}

.tg-file-comment-text {
    margin-top: .26rem;
    color: #596872;
    font-size: .7rem;
    line-height: 1.42;
}

.tg-file-comment-text p {
    margin-block: .25rem;
}

.tg-file-signin-callout {
    margin-bottom: .7rem;
    padding: .65rem .75rem;
    border-radius: .58rem;
    font-size: .68rem;
}

.tg-file-signin-callout a,
.tg-file-signin-callout a:hover,
.tg-file-signin-callout a:focus-visible {
    text-decoration: none !important;
}

.tg-file-related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
}

.tg-file-related-grid .tg-file-card {
    border-radius: .72rem;
    box-shadow: 0 5px 14px rgba(26, 36, 44, .03);
}

.tg-file-related-grid .tg-file-card-thumb {
    height: 112px;
    padding: .55rem;
}

.tg-file-related-grid .tg-file-card-thumb img {
    max-height: 92px;
    border-radius: .32rem;
    box-shadow: 0 5px 12px rgba(20, 29, 36, .1);
}

.tg-file-related-grid .tg-file-card-body {
    padding: .68rem .72rem .65rem;
}

.tg-file-related-grid .tg-file-card h3 {
    margin: .25rem 0 .2rem;
    font-size: .78rem;
    line-height: 1.15;
}

.tg-file-related-grid .tg-file-card-body > p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: .64rem;
    line-height: 1.36;
}

.tg-file-related-grid .tg-file-card-footer {
    padding-top: .45rem;
    font-size: .58rem;
}

@media (max-width: 980px) {
    .tg-file-detail-grid {
        grid-template-columns: 1fr;
    }

    .tg-file-detail-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .65rem;
    }

    .tg-file-rating-card {
        margin-top: 0;
    }

    .tg-file-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .tg-file-detail-section,
    .tg-file-community-section {
        padding-block: 1.45rem;
    }

    .tg-file-detail-sidebar {
        grid-template-columns: 1fr;
    }

    .tg-file-overview-card,
    .tg-file-info-card,
    .tg-file-rating-card,
    .tg-file-other-block {
        padding-inline: .72rem;
    }

    .tg-file-comment-form > div {
        align-items: stretch;
        flex-direction: column;
    }

    .tg-file-comment-form > div .tg-btn {
        width: 100%;
    }

}

@media (max-width: 560px) {
    .tg-file-related-grid {
        grid-template-columns: 1fr;
    }

    .tg-file-comment {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: .52rem;
        padding: .58rem;
    }

    .tg-file-comment-avatar {
        width: 30px;
        height: 30px;
    }
}

/* Build 0148 — File Search modernization and native-search foundation. */
.tg-file-search-section {
    padding-top: clamp(1.25rem, 2.5vw, 2rem);
}

.tg-file-search-console {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .7rem 1rem;
    margin: 0 0 1.35rem;
    padding: .9rem 1rem;
    border: 1px solid #dce4e9;
    border-radius: .75rem;
    background: #f8fafb;
}

.tg-file-search-query {
    min-width: 0;
}

.tg-file-search-query > label,
.tg-file-search-filters label > span {
    display: block;
    margin: 0 0 .35rem;
    color: #44535d;
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.tg-file-search-query > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem;
}

.tg-file-search-query input,
.tg-file-search-filters select {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border: 1px solid #cbd7de;
    border-radius: .55rem;
    color: #27343c;
    background: #fff;
    font: inherit;
    outline: 0;
}

.tg-file-search-query input {
    padding: .55rem .68rem;
    font-size: .82rem;
}

.tg-file-search-filters select {
    padding: .48rem 2rem .48rem .62rem;
    font-size: .72rem;
}

.tg-file-search-query input:focus,
.tg-file-search-filters select:focus {
    border-color: #6e9bb7;
    box-shadow: 0 0 0 3px rgba(61, 126, 173, .12);
}

.tg-file-search-query .tg-btn {
    min-height: 40px;
    padding: .55rem .9rem;
    font-size: .72rem;
}

.tg-file-search-filters {
    display: flex;
    align-items: end;
    gap: .55rem;
}

.tg-file-search-filters label:first-child {
    width: min(270px, 28vw);
}

.tg-file-search-filters label:nth-child(2) {
    width: min(170px, 20vw);
}

.tg-file-search-reset {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 .35rem;
    color: #62727d !important;
    font-size: .7rem;
    font-weight: 800;
    text-decoration: none;
}

.tg-file-search-console > p {
    grid-column: 1 / -1;
    margin: 0;
    color: #7a8892;
    font-size: .65rem;
}

.tg-file-search-results-heading {
    align-items: end;
    margin-top: 0;
    padding-top: 1rem;
}

.tg-file-search-results-heading > div > p {
    margin: .25rem 0 0;
    color: #74828b;
    font-size: .7rem;
}

.tg-file-search-summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: -.15rem 0 .65rem;
    color: #7a8790;
    font-size: .65rem;
    font-weight: 750;
}

.tg-file-search-empty > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin-top: .85rem;
}

.tg-file-search-start {
    padding-top: .25rem;
}

.tg-file-search-guide-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
}

.tg-file-search-guide-grid > div {
    min-width: 0;
    padding: .78rem .85rem;
    border: 1px solid #e0e6ea;
    border-radius: .65rem;
    background: #fbfcfd;
}

.tg-file-search-guide-grid strong,
.tg-file-search-guide-grid span {
    display: block;
}

.tg-file-search-guide-grid strong {
    color: #2d3b44;
    font-size: .75rem;
    font-weight: 850;
}

.tg-file-search-guide-grid span {
    margin-top: .18rem;
    color: #798790;
    font-size: .67rem;
    line-height: 1.4;
}

.tg-file-search-category-shortcuts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin-top: .9rem;
}

.tg-file-search-category-shortcuts > span {
    margin-right: .15rem;
    color: #60717c;
    font-size: .65rem;
    font-weight: 850;
    text-transform: uppercase;
}

.tg-file-search-category-shortcuts a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .5rem;
    border: 1px solid #dce4e8;
    border-radius: 999px;
    color: #52646f !important;
    background: #fff;
    font-size: .66rem;
    font-weight: 750;
    text-decoration: none;
}

.tg-file-search-category-shortcuts a:hover,
.tg-file-search-category-shortcuts a:focus-visible {
    border-color: #b7ccd9;
    color: var(--tg007-blue-dark) !important;
}

.tg-file-search-category-shortcuts small {
    color: #8a969d;
    font-size: .6rem;
}

@media (max-width: 920px) {
    .tg-file-search-console {
        grid-template-columns: 1fr;
    }

    .tg-file-search-filters {
        align-items: end;
    }

    .tg-file-search-filters label:first-child,
    .tg-file-search-filters label:nth-child(2) {
        width: min(100%, 280px);
    }

    .tg-file-search-guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .tg-file-search-console {
        padding: .75rem;
    }

    .tg-file-search-query > div,
    .tg-file-search-filters {
        display: grid;
        grid-template-columns: 1fr;
    }

    .tg-file-search-filters label:first-child,
    .tg-file-search-filters label:nth-child(2) {
        width: 100%;
    }

    .tg-file-search-query .tg-btn,
    .tg-file-search-reset {
        width: 100%;
        justify-content: center;
    }

    .tg-file-search-summary {
        display: grid;
        gap: .15rem;
    }

    .tg-file-search-guide-grid {
        grid-template-columns: 1fr;
    }
}

/* Build 0150 Completion Fix 2 — intentional file-type fallback media.
   Missing screenshots are optional archive metadata, not broken-image states. */
.tg-file-fallback {
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    color: #527b96;
    text-align: center;
}

.tg-file-fallback-icon {
    width: 64px;
    height: 72px;
    display: grid;
    place-items: center;
    border: 1px solid #c6d8e3;
    border-radius: .78rem;
    background:
        radial-gradient(circle at 28% 18%, rgba(75, 151, 201, .13), transparent 56%),
        linear-gradient(145deg, #f9fcfd, #eaf2f6);
    box-shadow: 0 9px 22px rgba(36, 74, 99, .1);
}

.tg-file-fallback-icon svg {
    width: 42px;
    height: 42px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tg-file-fallback-type {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: .18rem .48rem;
    border: 1px solid #c7d7e1;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    color: #315f7d;
    font-family: "Space Grotesk", Inter, system-ui, sans-serif;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .09em;
    line-height: 1;
}

.tg-file-fallback-caption {
    color: #718692;
    font-size: .62rem;
    font-weight: 650;
    line-height: 1.15;
}

.tg-file-fallback.is-text {
    color: #4f7f9e;
}

.tg-file-fallback.is-generic {
    color: #617c8d;
}

.tg-file-feature-image .tg-file-fallback {
    position: relative;
    z-index: 1;
    max-width: 240px;
    min-height: 190px;
    color: #b9d8eb;
}

.tg-file-feature-image .tg-file-fallback-icon {
    width: 82px;
    height: 92px;
    border-color: rgba(206, 231, 246, .25);
    background: rgba(11, 37, 55, .52);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .2);
}

.tg-file-feature-image .tg-file-fallback-icon svg {
    width: 52px;
    height: 52px;
}

.tg-file-feature-image .tg-file-fallback-type {
    border-color: rgba(206, 231, 246, .25);
    background: rgba(11, 37, 55, .55);
    color: #e0eff7;
}

.tg-file-feature-image .tg-file-fallback-caption {
    color: #9fbdce;
}

.tg-modern-hero-file-visual.is-fallback .tg-file-fallback {
    max-width: 210px;
    min-height: 150px;
    color: #d6ebf7;
}

.tg-modern-hero-file-visual.is-fallback .tg-file-fallback-icon {
    width: 76px;
    height: 86px;
    border-color: rgba(227, 242, 250, .28);
    background: rgba(9, 48, 80, .24);
    box-shadow: 0 14px 28px rgba(7, 25, 40, .16);
}

.tg-modern-hero-file-visual.is-fallback .tg-file-fallback-icon svg {
    width: 48px;
    height: 48px;
}

.tg-modern-hero-file-visual.is-fallback .tg-file-fallback-type {
    border-color: rgba(227, 242, 250, .25);
    background: rgba(8, 38, 63, .3);
    color: #f0f8fc;
}

.tg-modern-hero-file-visual.is-fallback .tg-file-fallback-caption {
    color: #c7dfec;
}

.tg-file-result-thumb .tg-file-fallback {
    min-height: 126px;
}

.tg-file-card-thumb .tg-file-fallback {
    min-height: 132px;
}

.tg-file-related-grid .tg-file-fallback {
    min-height: 82px;
    gap: .2rem;
}

.tg-file-related-grid .tg-file-fallback-icon {
    width: 44px;
    height: 48px;
    border-radius: .52rem;
    box-shadow: 0 5px 12px rgba(36, 74, 99, .08);
}

.tg-file-related-grid .tg-file-fallback-icon svg {
    width: 28px;
    height: 28px;
}

.tg-file-related-grid .tg-file-fallback-type {
    min-height: 17px;
    padding: .12rem .36rem;
    font-size: .52rem;
}

.tg-file-related-grid .tg-file-fallback-caption {
    display: none;
}

@media (max-width: 620px) {
    .tg-modern-hero-file-visual.is-fallback .tg-file-fallback {
        align-items: flex-start;
        text-align: left;
    }
}
