.template-detail {
    --td-ink: #15294c;
    --td-body: #455570;
    --td-blue: #2148ba;
    --td-line: #d9e2f1;
    --td-tint: #f2f6fd;
    color: var(--td-body);
}

.template-detail [hidden] {
    display: none !important;
}

.template-detail h1,
.template-detail h2,
.template-detail h3 {
    color: var(--td-ink);
}

.template-detail :focus-visible {
    outline: 2px solid var(--td-blue);
    outline-offset: 3px;
}

.td-hero {
    padding-block: 1.55rem clamp(2rem, 4.4vw, 3.4rem);
    background: radial-gradient(ellipse at 84% 25%, #233e71, #111e38 65%);
}

.td-path {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .3rem .55rem;
    color: #dce6fa;
    margin-bottom: clamp(1rem, 3vw, 1.75rem);
    font-size: .78rem;
}

.td-hero h1 {
    margin-bottom: .85rem;
    color: #fff;
    font-size: clamp(1.9rem, 4vw, 3.1rem);
    line-height: 1.08;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.td-lead {
    color: #e1eafb;
    margin-bottom: 1.1rem;
    max-width: 34rem;
}

.td-path a,
.td-hero-link {
    color: #e8efff;
    text-decoration: underline;
    text-underline-offset: .18em;
}

.td-path a:hover,
.td-hero-link:hover {
    color: #fff;
    text-decoration-thickness: 2px;
}

.td-hero-link {
    font-weight: 700;
}

.td-hero :focus-visible {
    outline-color: #c1cfff;
}

.td-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem 1rem;
}

.td-actions .btn {
    max-width: 100%;
    white-space: normal;
}

.td-hero .td-primary {
    background-color: #f8fbff;
    border-color: #f8fbff;
    color: var(--td-ink);
}

.td-hero .td-primary:hover {
    background-color: #e0eaff;
    border-color: #e0eaff;
    color: var(--td-ink);
}

.td-cover {
    overflow: hidden;
    border-radius: .75rem;
    border: 1px solid #a8bce762;
    box-shadow: 0 1rem 2.5rem #070d2077;
    background: #15294c;
}

.td-cover img {
    display: block;
    width: 100%;
    aspect-ratio: 1.55;
    object-fit: cover;
    object-position: center;
}

.td-preview.card,
.td-board.card,
.td-process.card,
.td-related-card.card,
.td-next-card.card {
    border: 1px solid var(--td-line);
    border-radius: .75rem;
    box-shadow: 0 .35rem 1.5rem #2339650d;
}

.td-preview .card-body {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: clamp(.9rem, 2.5vw, 1.4rem);
}

.td-preview h2,
.td-process h3,
.td-coverage-heading {
    font-size: 1rem;
    margin-bottom: .45rem;
}

.td-preview img,
.td-related-card img {
    flex: none;
    object-fit: cover;
    border-radius: .45rem;
    background: var(--td-tint);
}

.td-opportunities,
.td-coverage,
.td-related,
.td-next {
    padding-block: clamp(2rem, 5vw, 3.75rem);
    scroll-margin-top: 5.5rem;
}

.td-opportunities {
    background: #f7f9fe;
}

.td-section-title {
    margin-bottom: 1.1rem;
}

.td-section-title h2 {
    margin-bottom: .35rem;
}

.td-section-title p {
    margin: 0;
    max-width: 43rem;
}

.td-board {
    overflow: hidden;
}

.td-load-state,
.td-table-toolbar,
.td-table-more {
    padding: .8rem 1.15rem;
}

.td-load-state,
.td-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem .9rem;
}

.td-table-toolbar [role="status"] {
    font-weight: 700;
    color: var(--td-ink);
}

.td-region-control {
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .55rem;
}

.td-region-control label {
    color: var(--td-ink);
    font-size: .78rem;
    font-weight: 700;
}

.td-region-control select {
    width: auto;
    max-width: 100%;
    font-size: .78rem;
}

.td-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 0;
}

.td-col-tender { width: 47%; }
.td-col-region { width: 21%; }
.td-col-amount { width: 16%; }
.td-col-deadline { width: 16%; }

.td-table thead {
    background: #172b53;
    color: #f3f6ff;
}

.td-table th,
.td-table td {
    padding: .72rem .85rem;
    text-align: start;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.td-table th:first-child {
    padding-inline-start: 1.15rem;
}

.td-table thead th {
    font-size: .76rem;
}

.td-table tbody tr + tr {
    border-top: 1px solid var(--td-line);
}

.td-table tbody tr:hover {
    background: #f6f9ff;
}

.td-table tbody tr:focus {
    outline: 2px solid var(--td-blue);
    outline-offset: -2px;
}

.td-table .td-tender {
    color: var(--td-ink);
    font-size: .87rem;
    line-height: 1.45;
}

.td-tender small {
    display: block;
    margin-top: .2rem;
    color: var(--td-body);
    font-size: .73rem;
    font-weight: 600;
}

.td-region-chip {
    display: inline-block;
    padding: .18rem .45rem;
    color: #254779;
    background: #eaf1ff;
    border-radius: .35rem;
    font-size: .73rem;
    font-weight: 700;
    line-height: 1.35;
}

.td-table .td-amount {
    text-align: end;
}

.td-money,
.td-deadline time {
    color: var(--td-ink);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: .85rem;
}

.td-missing {
    font-size: .75rem;
}

.td-mobile-label {
    display: none;
}

.td-table-more {
    text-align: center;
    border-top: 1px solid var(--td-line);
}

.td-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin: 0;
}

.td-tags li {
    padding: .2rem .5rem;
    border-radius: .32rem;
    background: var(--td-tint);
    color: var(--td-blue);
    font-size: .72rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.td-process.card,
.td-next-card.card {
    background: var(--td-tint);
}

.td-process .card-body,
.td-next-card .card-body {
    padding: clamp(1rem, 3vw, 1.55rem);
}

.td-steps {
    margin: .75rem 0;
    padding-inline-start: 1.15rem;
}

.td-steps li + li {
    margin-top: .4rem;
}

.td-steps strong {
    color: var(--td-ink);
}

.td-link {
    color: var(--td-blue);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: .18em;
}

.td-link:hover {
    color: var(--td-ink);
}

.td-related {
    background: #f7f9fe;
}

.td-related-card .card-body {
    display: flex;
    gap: .5rem;
    align-items: center;
    padding: .85rem;
    color: var(--td-ink);
    font-size: .84rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.td-related-card:hover {
    border-color: #91a8da;
}

.td-related-card:hover span {
    text-decoration: underline;
}

.td-next-card .card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .8rem 1.4rem;
}

.td-next-card p {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .td-cover {
        max-width: 27rem;
    }

    .td-next-card .card-body {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    .td-table,
    .td-table tbody {
        display: block;
    }

    .td-table {
        padding-inline: .65rem;
    }

    .td-table colgroup {
        display: none;
    }

    .td-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .td-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .35rem .45rem;
        padding: .65rem;
        margin-bottom: .45rem;
        border: 1px solid var(--td-line);
        border-radius: .5rem;
    }

    .td-table tbody th:first-child,
    .td-table tbody td {
        padding: 0;
        text-align: start;
    }

    .td-table tbody .td-amount {
        text-align: start;
    }

    .td-tender,
    .td-region {
        grid-column: 1 / -1;
    }

    .td-mobile-label {
        display: block;
        color: var(--td-body);
        font-size: .69rem;
        font-weight: 700;
        margin-bottom: .12rem;
    }

    .td-cover img {
        aspect-ratio: 1.9;
    }

    .td-table-toolbar,
    .td-table-more {
        padding-inline: .7rem;
    }
}
