/* ==========================================================================
   Base
   ========================================================================== */

html {
    scroll-padding-top: var(--tep-sticky-top);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--tep-bg);
    color: var(--tep-text);
    font-family: var(--tep-font-sans);
    -webkit-font-smoothing: antialiased;
}

body > main,
body > .docs-shell {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--tep-navy);
    font-weight: 700;
    letter-spacing: -0.01em;
}

a {
    text-underline-offset: 0.15em;
}

:focus-visible {
    outline: 3px solid var(--tep-focus);
    outline-offset: 2px;
    border-radius: 2px;
}

main:focus {
    outline: none;
}

.text-subtle {
    color: var(--tep-text-muted);
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 2000;
    padding: 0.75rem 1rem;
    background: var(--tep-surface);
    color: var(--tep-navy);
    font-weight: 600;
    border-radius: var(--tep-radius-sm);
    box-shadow: var(--tep-shadow);
}

.skip-link:focus {
    top: 1rem;
}

kbd {
    font-family: var(--tep-font-mono);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-tep {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--tep-blue);
    --bs-btn-border-color: var(--tep-blue);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--tep-navy);
    --bs-btn-hover-border-color: var(--tep-navy);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--tep-navy-dark);
    --bs-btn-active-border-color: var(--tep-navy-dark);
    --bs-btn-font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-outline-tep {
    --bs-btn-color: var(--tep-blue);
    --bs-btn-bg: var(--tep-surface);
    --bs-btn-border-color: var(--tep-border-strong);
    --bs-btn-hover-color: var(--tep-navy);
    --bs-btn-hover-bg: var(--tep-accent-soft);
    --bs-btn-hover-border-color: var(--tep-accent);
    --bs-btn-active-color: var(--tep-navy);
    --bs-btn-active-bg: var(--tep-active-bg);
    --bs-btn-active-border-color: var(--tep-accent);
    --bs-btn-font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: var(--tep-radius-sm);
    color: var(--tep-on-dark);
    font-size: 1.25rem;
    background: transparent;
}

.btn-icon:hover,
.btn-icon:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: var(--tep-on-dark);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: relative;
    z-index: 1030;
    background: var(--tep-navy);
    color: var(--tep-on-dark);
}

@media (min-width: 992px) {
    .site-header {
        position: sticky;
        top: 0;
    }
}

.site-header :focus-visible {
    outline-color: #fff;
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: var(--tep-header-height);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--tep-on-dark);
    text-decoration: none;
    margin-right: auto;
}

.brand:hover {
    color: var(--tep-on-dark);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--tep-radius);
    background: var(--tep-surface);
    color: var(--tep-navy);
    font-size: 1.35rem;
}

.brand-mark-sm {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.95rem;
    border-radius: var(--tep-radius-sm);
    background: var(--tep-navy);
    color: #fff;
}

.brand-logo {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    border-radius: var(--tep-radius);
    background: var(--tep-surface);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--tep-on-dark-muted);
}

.org-pill {
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--tep-on-dark);
    font-size: 0.8rem;
    font-weight: 600;
}

.header-search {
    position: relative;
    align-items: center;
    flex: 0 1 22rem;
}

.header-search > .bi-search {
    position: absolute;
    left: 0.85rem;
    color: var(--tep-on-dark-muted);
    pointer-events: none;
}

.header-search input {
    width: 100%;
    height: 2.5rem;
    padding: 0 2.25rem 0 2.4rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--tep-radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--tep-on-dark);
    font-size: 0.9rem;
}

.header-search input::placeholder {
    color: var(--tep-on-dark-muted);
}

.header-search input:focus {
    background: var(--tep-surface);
    color: var(--tep-text);
    border-color: var(--tep-surface);
    outline: none;
    box-shadow: 0 0 0 3px rgba(60, 131, 197, 0.55);
}

.header-search input:focus::placeholder {
    color: var(--tep-text-subtle);
}

.header-search-hint {
    position: absolute;
    right: 0.6rem;
    padding: 0.05rem 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: transparent;
    color: var(--tep-on-dark-muted);
    font-size: 0.75rem;
    pointer-events: none;
}

.header-search input:focus ~ .header-search-hint {
    display: none;
}

.header-utility {
    align-items: center;
    gap: 0.25rem;
}

.btn-header,
.header-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.7rem;
    border: 0;
    border-radius: var(--tep-radius-sm);
    background: transparent;
    color: var(--tep-on-dark);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.btn-header:hover,
.btn-header:focus-visible,
.btn-header.show,
.header-link:hover,
.header-link:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: var(--tep-on-dark);
}

.header-link .bi-box-arrow-up-right {
    font-size: 0.7rem;
}

.header-mobile-actions {
    display: flex;
    gap: 0.25rem;
}

.mobile-search-form {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--tep-surface);
    border-radius: var(--tep-radius);
    padding-left: 2.4rem;
}

.mobile-search-form > .bi-search {
    position: absolute;
    left: 0.85rem;
    color: var(--tep-text-subtle);
}

.mobile-search-form input {
    flex: 1;
    min-width: 0;
    height: 2.75rem;
    border: 0;
    background: transparent;
    color: var(--tep-text);
}

.mobile-search-form input:focus {
    outline: none;
}

.mobile-search-form .btn-icon {
    color: var(--tep-blue);
}

.section-bar {
    background: var(--tep-navy-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section-bar-list {
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    min-height: var(--tep-section-bar-height);
    align-items: stretch;
    overflow-x: auto;
}

.section-bar-link {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 0.8rem;
    color: var(--tep-on-dark-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.section-bar-link:hover {
    color: var(--tep-on-dark);
}

.section-bar-link.active {
    color: var(--tep-on-dark);
    font-weight: 600;
}

.section-bar-link.active::after {
    content: "";
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--tep-accent);
}

.site-menu .offcanvas-header {
    border-bottom: 1px solid var(--tep-border);
}

.site-menu-heading {
    margin: 1.25rem 0 0.5rem;
    color: var(--tep-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.site-menu nav:first-child .site-menu-heading {
    margin-top: 0;
}

.site-menu-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-menu-list a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--tep-radius-sm);
    color: var(--tep-text);
    text-decoration: none;
    font-weight: 500;
}

.site-menu-list a:hover {
    background: var(--tep-surface-muted);
}

.site-menu-list a.active {
    background: var(--tep-active-bg);
    color: var(--tep-navy);
    font-weight: 600;
}

/* ==========================================================================
   Home
   ========================================================================== */

.hero {
    background: var(--tep-navy);
    color: var(--tep-on-dark);
    padding: 2.5rem 0 3rem;
}

.hero-inner {
    text-align: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-title {
    margin-bottom: 0.5rem;
    color: var(--tep-on-dark);
    font-size: clamp(1.6rem, 3vw + 0.5rem, 2.25rem);
}

.hero-subtitle {
    margin-bottom: 1.5rem;
    color: var(--tep-on-dark-muted);
    font-size: 1rem;
}

.hero-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 40rem;
    margin: 0 auto;
    background: var(--tep-surface);
    border-radius: var(--tep-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.hero-search-icon {
    position: absolute;
    left: 1.1rem;
    color: var(--tep-text-subtle);
    font-size: 1.05rem;
    pointer-events: none;
}

.hero-search-input {
    flex: 1;
    min-width: 0;
    height: 3.25rem;
    padding: 0 0.5rem 0 2.9rem;
    border: 0;
    border-radius: var(--tep-radius) 0 0 var(--tep-radius);
    background: transparent;
    color: var(--tep-text);
    font-size: 1rem;
}

.hero-search-input::placeholder {
    color: var(--tep-text-subtle);
}

.hero-search-input:focus {
    outline: none;
}

.hero-search:focus-within {
    box-shadow: 0 0 0 3px rgba(60, 131, 197, 0.6), 0 10px 30px rgba(0, 0, 0, 0.18);
}

.hero-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3.25rem;
    border: 0;
    border-radius: 0 var(--tep-radius) var(--tep-radius) 0;
    background: transparent;
    color: var(--tep-text-muted);
    font-size: 1.1rem;
}

.hero-search-submit:hover {
    color: var(--tep-blue);
}

.home-body {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.home-section {
    margin-bottom: 2rem;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.25rem;
}

.section-heading-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.context-notice {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--tep-border);
    border-left: 4px solid var(--tep-accent);
    border-radius: var(--tep-radius);
    background: var(--tep-surface);
}

.context-notice .bi {
    color: var(--tep-blue);
    font-size: 1.1rem;
}

.context-notice p {
    margin: 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
}

.category-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    height: 100%;
    padding: 1.1rem 1.15rem;
    border: 1px solid var(--tep-border);
    border-radius: var(--tep-radius);
    background: var(--tep-surface);
    color: var(--tep-text);
    text-decoration: none;
    box-shadow: var(--tep-shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.category-card:hover {
    border-color: var(--tep-accent);
    box-shadow: var(--tep-shadow);
    color: var(--tep-text);
}

.category-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 0.5rem;
    border-radius: var(--tep-radius-sm);
    background: var(--tep-accent-soft);
    color: var(--tep-blue);
    font-size: 1.1rem;
}

.category-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.category-card-description {
    margin: 0;
    color: var(--tep-text-muted);
    font-size: 0.875rem;
}

.category-card-meta {
    margin-top: auto;
    padding-top: 0.5rem;
    color: var(--tep-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.category-card-meta.is-empty {
    color: var(--tep-warning);
}

.home-columns {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .home-columns {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        align-items: start;
    }
}

.home-main,
.home-aside {
    display: grid;
    gap: 1.5rem;
}

/* ==========================================================================
   Panels and link lists
   ========================================================================== */

.panel {
    padding: 1.25rem;
    border: 1px solid var(--tep-border);
    border-radius: var(--tep-radius);
    background: var(--tep-surface);
    box-shadow: var(--tep-shadow-sm);
}

.panel-flush {
    padding: 0.25rem 1.25rem;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.1rem;
}

.panel-title .bi {
    color: var(--tep-blue);
}

.panel-title a {
    color: inherit;
    text-decoration: none;
}

.panel-title a:hover {
    text-decoration: underline;
}

.panel-header-link {
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.panel-empty {
    margin: 0.5rem 0 0;
    color: var(--tep-text-muted);
    font-size: 0.9rem;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.panel-footnote {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--tep-text-muted);
}

.panel-support p {
    color: var(--tep-text-muted);
    font-size: 0.925rem;
}

.link-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.link-list li + li {
    border-top: 1px solid var(--tep-border);
}

.link-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.25rem;
    color: var(--tep-text);
    text-decoration: none;
}

.link-list-item:hover .link-list-title {
    color: var(--tep-blue);
    text-decoration: underline;
}

.link-list-item .bi-chevron-right {
    flex-shrink: 0;
    color: var(--tep-text-subtle);
}

.link-list-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.link-list-title {
    font-weight: 500;
}

.link-list-description {
    color: var(--tep-text-muted);
    font-size: 0.85rem;
}

.badge-soon {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: var(--tep-warning-bg);
    color: var(--tep-warning);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.empty-state {
    margin: 1rem 0 2rem;
    padding: 2.5rem 1.5rem;
    border: 1px dashed var(--tep-border-strong);
    border-radius: var(--tep-radius-lg);
    background: var(--tep-surface);
    text-align: center;
}

.empty-state h2 {
    font-size: 1.25rem;
}

.empty-state p {
    color: var(--tep-text-muted);
}

.empty-state-left {
    text-align: left;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.75rem;
    border-radius: 50%;
    background: var(--tep-accent-soft);
    color: var(--tep-blue);
    font-size: 1.35rem;
}

/* ==========================================================================
   Search page
   ========================================================================== */

.search-page {
    padding-top: 2rem;
    padding-bottom: 3rem;
    max-width: 60rem;
}

.search-form {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border: 1px solid var(--tep-border);
    border-radius: var(--tep-radius);
    background: var(--tep-surface);
}

@media (min-width: 768px) {
    .search-form {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
        align-items: end;
    }
}

.search-form .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tep-text);
}

.search-input-wrap {
    position: relative;
}

.search-input-wrap .bi-search {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    transform: translateY(-50%);
    color: var(--tep-text-subtle);
}

.search-input-wrap .form-control {
    padding-left: 2.4rem;
}

.search-summary {
    color: var(--tep-text-muted);
}

.search-partial-note {
    padding: 0.6rem 0.9rem;
    border-radius: var(--tep-radius-sm);
    background: var(--tep-note-bg);
    color: var(--tep-note);
    font-size: 0.9rem;
}

.search-results {
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.search-result {
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--tep-border);
    border-radius: var(--tep-radius);
    background: var(--tep-surface);
}

.search-result-title {
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
}

.search-result-title:hover {
    text-decoration: underline;
}

.search-result-meta {
    margin: 0.2rem 0 0.4rem;
    color: var(--tep-text-muted);
    font-size: 0.8rem;
}

.search-result-snippet {
    margin: 0;
    color: var(--tep-text);
    font-size: 0.925rem;
}

mark {
    padding: 0 0.1em;
    border-radius: 2px;
    background: #FFF1B8;
    color: inherit;
}

.pagination {
    --bs-pagination-color: var(--tep-blue);
    --bs-pagination-active-bg: var(--tep-blue);
    --bs-pagination-active-border-color: var(--tep-blue);
    flex-wrap: wrap;
}

/* ==========================================================================
   Status pages
   ========================================================================== */

.status-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.status-card {
    max-width: 34rem;
    padding: 2.5rem 2rem;
    border: 1px solid var(--tep-border);
    border-radius: var(--tep-radius-lg);
    background: var(--tep-surface);
    text-align: center;
    box-shadow: var(--tep-shadow-sm);
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--tep-accent-soft);
    color: var(--tep-blue);
    font-size: 1.6rem;
}

.status-code {
    margin: 0.75rem 0 0;
    color: var(--tep-text-muted);
    font-weight: 700;
    letter-spacing: 0.1em;
}

.status-card h1 {
    font-size: 1.6rem;
}

.status-card p {
    color: var(--tep-text-muted);
}

.status-search {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.status-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
}

.status-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
    text-decoration: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--tep-border);
    background: var(--tep-surface);
    color: var(--tep-text-muted);
    font-size: 0.85rem;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.site-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-links a {
    color: var(--tep-text-muted);
    text-decoration: none;
}

.site-footer-links a:hover {
    color: var(--tep-blue);
    text-decoration: underline;
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Footer administrator reveal
   ========================================================================== */

.footer-admin-trigger {
    cursor: default;
    user-select: none;
}

.footer-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.5rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--tep-border-strong);
    border-radius: 999px;
    color: var(--tep-blue);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.footer-admin-link[hidden] {
    display: none;
}

.footer-admin-link:hover {
    background: var(--tep-accent-soft);
}

.header-user-name {
    display: inline-block;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.site-menu-account {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tep-border);
}

/* ==========================================================================
   Sign-in pages
   ========================================================================== */

.auth-page {
    display: flex;
    justify-content: center;
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.auth-card {
    width: 100%;
    max-width: 28rem;
    padding: 2rem;
    border: 1px solid var(--tep-border);
    border-radius: var(--tep-radius-lg);
    background: var(--tep-surface);
    box-shadow: var(--tep-shadow);
}

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border-radius: var(--tep-radius);
    background: var(--tep-accent-soft);
    color: var(--tep-blue);
    font-size: 1.4rem;
}

.auth-title {
    font-size: 1.4rem;
}

.auth-lead {
    color: var(--tep-text-muted);
}

.auth-form .form-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-errors ul {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem 0.75rem 2rem;
    border-radius: var(--tep-radius-sm);
    background: var(--tep-danger-bg);
    color: var(--tep-danger);
    font-size: 0.9rem;
}

.auth-errors.validation-summary-valid {
    display: none;
}

.field-error {
    display: block;
    margin-top: 0.25rem;
    color: var(--tep-danger);
    font-size: 0.825rem;
}

.auth-footnote {
    margin: 1.5rem 0 0;
    color: var(--tep-text-muted);
    font-size: 0.85rem;
}

.auth-footnote a {
    display: block;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Administrator dashboard
   ========================================================================== */

.admin-page {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.admin-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-header-actions form {
    margin: 0;
}

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--tep-border);
    border-radius: var(--tep-radius);
    background: var(--tep-surface);
}

.admin-filters .form-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--tep-border);
    border-radius: var(--tep-radius);
    background: var(--tep-surface);
}

.stat-label {
    color: var(--tep-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.stat-value {
    color: var(--tep-navy);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-value.stat-warn {
    color: var(--tep-danger);
}

.admin-panel {
    margin-bottom: 1.5rem;
}

.admin-columns {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .admin-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.admin-columns .admin-panel {
    margin-bottom: 0;
}

.admin-columns + .admin-panel {
    margin-top: 1.5rem;
}

.chart-scroll {
    overflow-x: auto;
}

.daily-chart {
    display: block;
    width: 100%;
    min-width: 32rem;
    height: 11rem;
}

.bar-success {
    fill: var(--tep-blue);
}

.bar-failed {
    fill: var(--tep-danger);
}

.chart-axis {
    stroke: var(--tep-border-strong);
    stroke-width: 1;
}

.chart-legend {
    display: inline-flex;
    gap: 1rem;
    color: var(--tep-text-muted);
    font-size: 0.8rem;
}

.legend-swatch {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    margin-right: 0.25rem;
    border-radius: 2px;
    vertical-align: middle;
}

.legend-success {
    background: var(--tep-blue);
}

.legend-failed {
    background: var(--tep-danger);
}

.chart-data {
    margin-top: 0.75rem;
}

.chart-data summary {
    color: var(--tep-blue);
    font-size: 0.85rem;
    cursor: pointer;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.result-success {
    background: var(--tep-tip-bg);
    color: var(--tep-tip);
}

.result-failed {
    background: var(--tep-danger-bg);
    color: var(--tep-danger);
}

.turnstile-box {
    min-height: 65px;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Administration: tabs, messages, forms, tables
   ========================================================================== */

.admin-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--tep-border);
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: -1px;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: var(--tep-radius-sm) var(--tep-radius-sm) 0 0;
    color: var(--tep-text-muted);
    font-weight: 500;
    text-decoration: none;
}

.admin-tab:hover {
    color: var(--tep-navy);
    background: var(--tep-surface-muted);
}

.admin-tab.active {
    border-color: var(--tep-border);
    background: var(--tep-surface);
    color: var(--tep-navy);
    font-weight: 600;
}

.admin-topbar .admin-header-actions {
    padding-bottom: 0.5rem;
}

.admin-message {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    padding: 0.8rem 1rem;
    border-radius: var(--tep-radius);
    border: 1px solid var(--tep-border);
}

.admin-message-success {
    background: var(--tep-tip-bg);
    color: var(--tep-tip);
}

.admin-message-error {
    background: var(--tep-danger-bg);
    color: var(--tep-danger);
}

.admin-form-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .admin-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-form-wide {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1200px) {
    .admin-form-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.admin-form .form-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.form-help {
    margin: 0.25rem 0 0;
    color: var(--tep-text-muted);
    font-size: 0.8rem;
}

.admin-table td,
.admin-table th {
    vertical-align: middle;
}

.admin-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.admin-row-actions form {
    margin: 0;
}

.admin-order-input {
    max-width: 6rem;
}

.result-inactive {
    background: var(--tep-placeholder-bg);
    color: var(--tep-placeholder);
}
