/**
 * KSTPA Public Website — Responsive Layout & Component Stylesheet
 * Author: Antigravity
 * Version: 1.0 (Institutional Production)
 */

/* ==========================================================================
   1. CSS RESET & GLOBAL FOUNDATIONS
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--kstpa-font-sans);
    font-size: var(--kstpa-text-base);
    line-height: 1.6;
    color: var(--kstpa-text-primary);
    background-color: var(--kstpa-bg-page);
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--kstpa-blue);
    text-decoration: none;
    transition: color var(--kstpa-transition-fast);
}

a:hover {
    color: var(--kstpa-blue-hover);
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Accessibility Focus Ring */
:focus-visible {
    outline: 3px solid var(--kstpa-blue) !important;
    outline-offset: 2px !important;
}

/* Skip link */
.kstpa-skip-link {
    position: absolute;
    top: -999px;
    left: 1rem;
    background: var(--kstpa-navy);
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    z-index: 99999;
    border-radius: var(--kstpa-radius-md);
    font-weight: 600;
}

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

/* Container */
.kstpa-container {
    width: 100%;
    max-width: var(--kstpa-container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--kstpa-container-padding);
    padding-right: var(--kstpa-container-padding);
}

/* ==========================================================================
   2. TOP UTILITY BAR
   ========================================================================== */

.kstpa-topbar {
    background-color: var(--kstpa-pub-primary-deep, #570013);
    color: var(--kstpa-pub-text-inverse-muted, #F0E6D8);
    font-size: var(--kstpa-text-xs);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.kstpa-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 38px;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kstpa-topbar-left, .kstpa-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.kstpa-topbar-association,
.kstpa-topbar-apex {
    color: var(--kstpa-pub-accent, #D7A643);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.kstpa-topbar-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--kstpa-pub-text-inverse-muted, #F0E6D8);
}

.kstpa-topbar-divider {
    color: rgba(255, 255, 255, 0.25);
    margin: 0 0.15rem;
}

.kstpa-topbar-link {
    color: var(--kstpa-pub-text-inverse-muted, #F0E6D8);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
}

.kstpa-topbar-link:hover {
    color: var(--kstpa-pub-accent, #D7A643);
}

.kstpa-topbar-highlight {
    color: var(--kstpa-pub-accent, #D7A643) !important;
    font-weight: 600;
}

/* ==========================================================================
   3. LIVE ANNOUNCEMENTS TICKER
   ========================================================================== */

.kstpa-ticker-wrap {
    background-color: var(--kstpa-pub-primary-deep, #570013);
    border-bottom: 1px solid var(--kstpa-pub-border-gold, rgba(212, 175, 55, 0.25));
    color: var(--kstpa-text-inverse);
    font-size: var(--kstpa-text-xs);
    overflow: hidden;
}

.kstpa-ticker-inner {
    display: flex;
    align-items: center;
    height: 36px;
}

.kstpa-ticker-label {
    background-color: var(--kstpa-blue);
    color: #ffffff;
    font-weight: 700;
    padding: 0 0.75rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    z-index: 2;
}

.kstpa-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444;
    display: inline-block;
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.7);
    animation: kstpaPulse 1.8s infinite;
}

@keyframes kstpaPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.kstpa-ticker-content {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.kstpa-ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 2.5rem;
    animation: kstpaScrollTicker 35s linear infinite;
    padding-left: 2rem;
}

.kstpa-ticker-wrap:hover .kstpa-ticker-track,
.kstpa-ticker-wrap:focus-within .kstpa-ticker-track {
    animation-play-state: paused;
}

@keyframes kstpaScrollTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.kstpa-ticker-item {
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.kstpa-ticker-item:hover {
    color: var(--kstpa-gold);
}

.kstpa-ticker-tag {
    padding: 0.15rem 0.45rem;
    border-radius: var(--kstpa-radius-sm);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.kstpa-tag-notice { background-color: rgba(212, 175, 55, 0.25); color: var(--kstpa-gold); }
.kstpa-tag-news { background-color: var(--kstpa-pub-accent-soft, rgba(215, 166, 67, 0.22)); color: var(--kstpa-pub-accent, #F8D98C); }

.kstpa-ticker-date {
    color: #94a3b8;
    font-size: 0.7rem;
}

/* ==========================================================================
   4. MAIN HEADER & INSTITUTIONAL NAVIGATION
   ========================================================================== */

/* ==========================================================================
   4. TWO-TIER INSTITUTIONAL HEADER & NAVIGATION (CR-01)
   ========================================================================== */

/* Tier 1: Top Announcements & Utility Bar */
.kstpa-topbar-ticker-link {
    color: #e2e8f0;
    text-decoration: none;
    font-size: var(--kstpa-text-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 480px;
    display: inline-block;
    vertical-align: middle;
}

.kstpa-topbar-ticker-link:hover {
    color: var(--kstpa-gold);
}

.kstpa-topbar-view-all {
    color: var(--kstpa-gold);
    font-size: var(--kstpa-text-xs);
    font-weight: 700;
    text-decoration: none;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.kstpa-topbar-view-all:hover {
    text-decoration: underline;
}

.kstpa-topbar-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--kstpa-text-inverse-muted);
}

/* Tier 2: Ceremonial Brand Masthead (Cream / Ivory Surface) */
.kstpa-brand-bar {
    background-color: var(--kstpa-pub-surface-cream, #FFF9F0);
    border-bottom: 1px solid var(--kstpa-pub-border, #E8DFC8);
    padding: 0.85rem 0;
    position: relative;
    z-index: 1010;
}

.kstpa-brand-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.kstpa-brand-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    flex-shrink: 0;
}

.kstpa-brand-logo-frame {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(87, 0, 19, 0.1);
    padding: 4px;
}

.kstpa-brand-logo-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.kstpa-brand-titles {
    display: flex;
    flex-direction: column;
}

.kstpa-brand-fullname {
    font-family: var(--kstpa-font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--kstpa-pub-primary, #85051F);
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.kstpa-brand-kannada {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--kstpa-pub-text-secondary, #4A5568);
    line-height: 1.25;
    margin-top: 1px;
}

.kstpa-brand-kicker {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--kstpa-pub-accent-hover, #C29334);
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* Ceremonial Leadership Medallions */
.kstpa-masthead-leaders {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.kstpa-leader-medallion {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.kstpa-medallion-frame {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--kstpa-pub-accent, #D7A643);
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    background-color: #FFFFFF;
}

.kstpa-medallion-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kstpa-medallion-info {
    display: flex;
    flex-direction: column;
}

.kstpa-medallion-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--kstpa-pub-text-primary, #17243D);
    line-height: 1.2;
}

.kstpa-medallion-role {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--kstpa-pub-accent-active, #AA7E25);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.kstpa-masthead-badge img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.kstpa-mobile-toggle-wrap {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.kstpa-btn-mobile-login {
    width: 38px;
    height: 38px;
    border-radius: var(--kstpa-radius-sm);
    background: var(--kstpa-pub-primary, #85051F);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kstpa-mobile-toggle-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 44px;
    height: 44px;
    background: #FFFFFF;
    border: 1.5px solid var(--kstpa-pub-primary, #85051F);
    border-radius: var(--kstpa-radius-md, 8px);
    padding: 10px 9px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(133, 5, 31, 0.12);
    transition: all var(--kstpa-transition);
}

.kstpa-mobile-toggle-btn:hover,
.kstpa-mobile-toggle-btn:focus {
    background: var(--kstpa-cream-surface, #FBF8F3);
    border-color: var(--kstpa-pub-accent, #C99700);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 151, 0, 0.25);
}

.kstpa-hamburger-bar {
    width: 100%;
    height: 2.5px;
    background-color: var(--kstpa-pub-primary, #85051F);
    border-radius: 2px;
    transition: all var(--kstpa-transition);
}

/* Band 3: Dedicated Primary Navigation Bar (Ceremonial Cream / Ivory Surface) */
.kstpa-navbar {
    background-color: var(--kstpa-cream-surface, #FBF8F3);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-top: 1px solid rgba(133, 5, 31, 0.08);
    border-bottom: 2px solid rgba(133, 5, 31, 0.14);
    box-shadow: 0 4px 14px rgba(44, 10, 16, 0.06);
}

.kstpa-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.kstpa-nav-menu {
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    flex: 1;
}

.kstpa-nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.kstpa-nav-link {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 0.85rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--kstpa-pub-primary, #85051F);
    white-space: nowrap;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.16s ease-in-out;
}

.kstpa-nav-link:hover {
    color: var(--kstpa-pub-primary-hover, #660317);
    border-bottom-color: var(--kstpa-pub-accent, #C99700);
    background-color: rgba(133, 5, 31, 0.04);
}

.kstpa-nav-item.active .kstpa-nav-link {
    color: var(--kstpa-pub-primary, #85051F);
    border-bottom-color: var(--kstpa-pub-accent, #C99700);
    background-color: rgba(201, 151, 0, 0.10);
}

.kstpa-dropdown-arrow {
    font-size: 0.6875rem;
    margin-left: 0.35rem;
    transition: transform var(--kstpa-transition);
}

.kstpa-dropdown:hover .kstpa-dropdown-arrow,
.kstpa-dropdown:focus-within .kstpa-dropdown-arrow,
.kstpa-dropdown.is-open .kstpa-dropdown-arrow,
.kstpa-dropdown.show .kstpa-dropdown-arrow {
    transform: rotate(180deg);
}

/* Nav Action Buttons on Right (V5 Refined Cohesive Pair) */
.kstpa-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
    flex-shrink: 0;
}

.kstpa-btn-member-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 700;
    height: 38px;
    padding: 0 1rem;
    color: var(--kstpa-pub-primary, #85051F);
    background: rgba(133, 5, 31, 0.04);
    border: 1.5px solid var(--kstpa-pub-primary, #85051F);
    border-radius: var(--kstpa-radius-full);
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    line-height: 1;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.kstpa-btn-member-login:hover,
.kstpa-btn-member-login:focus-visible {
    background-color: var(--kstpa-pub-primary, #85051F);
    color: #ffffff;
    border-color: var(--kstpa-pub-primary, #85051F);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(133, 5, 31, 0.2);
    outline: none;
}

.kstpa-btn-join {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 800;
    height: 38px;
    padding: 0 1.2rem;
    color: var(--kstpa-pub-primary-deep, #17243D);
    background: linear-gradient(135deg, var(--kstpa-pub-accent, #D7A643) 0%, var(--kstpa-pub-accent-hover, #C29334) 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--kstpa-radius-full);
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(215, 166, 67, 0.25);
    box-sizing: border-box;
    line-height: 1;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.kstpa-btn-join:hover,
.kstpa-btn-join:focus-visible {
    background: linear-gradient(135deg, var(--kstpa-pub-accent-hover) 0%, var(--kstpa-pub-accent) 100%);
    box-shadow: 0 4px 14px rgba(215, 166, 67, 0.38);
    transform: translateY(-1px);
    color: var(--kstpa-pub-primary-deep);
    outline: none;
}

/* Desktop Membership Registration Dropdown */
.kstpa-nav-reg-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.kstpa-nav-reg-dropdown .kstpa-btn-join {
    cursor: pointer;
}

/* Scoped registration dropdown: state is controlled explicitly by .is-open / .show */
.kstpa-nav-reg-dropdown:not(.is-open):not(.show) .kstpa-dropdown-menu {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(8px) !important;
}

.kstpa-nav-reg-dropdown.is-open .kstpa-dropdown-menu,
.kstpa-nav-reg-dropdown.show .kstpa-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

.kstpa-dropdown-menu-right {
    left: auto !important;
    right: 0 !important;
}

.kstpa-reg-dropdown-menu {
    min-width: 295px;
    padding: 0.5rem 0 0.6rem 0;
    border-top: 3px solid var(--kstpa-pub-accent, #C99700);
    border-radius: 0 0 var(--kstpa-radius-md, 8px) var(--kstpa-radius-md, 8px);
}

.kstpa-reg-menu-header {
    padding: 0.35rem 1rem 0.45rem;
    border-bottom: 1px solid rgba(133, 5, 31, 0.08);
    margin-bottom: 0.25rem;
}

.kstpa-reg-menu-title {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--kstpa-text-muted, #64748B);
    display: block;
}

.kstpa-reg-menu-item {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem !important;
    text-decoration: none;
    transition: background-color 0.16s ease;
}

.kstpa-reg-menu-item:hover,
.kstpa-reg-menu-item:focus-visible {
    background-color: rgba(133, 5, 31, 0.05) !important;
    outline: none;
}

.kstpa-reg-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    flex-shrink: 0;
}

.kstpa-reg-icon-new {
    background-color: rgba(201, 151, 0, 0.16);
    color: #926C00;
}

.kstpa-reg-icon-exist {
    background-color: rgba(133, 5, 31, 0.10);
    color: var(--kstpa-pub-primary, #85051F);
}

.kstpa-reg-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.25;
}

.kstpa-reg-item-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--kstpa-pub-primary-deep, #17243D);
}

.kstpa-reg-item-desc {
    font-size: 0.72rem;
    color: var(--kstpa-text-muted, #64748B);
}

.kstpa-reg-menu-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.06);
    margin: 0.35rem 0;
}

/* Topbar Existing Registration Highlight */
.kstpa-topbar-existing-reg {
    color: var(--kstpa-pub-accent, #D7A643) !important;
    font-weight: 600;
    transition: color 0.15s ease;
}

.kstpa-topbar-existing-reg:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Accessible Dropdown Menus */
.kstpa-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 240px;
    border-radius: 0 0 var(--kstpa-radius-md) var(--kstpa-radius-md);
    box-shadow: 0 12px 28px rgba(44, 10, 16, 0.16);
    border: 1px solid rgba(133, 5, 31, 0.15);
    border-top: 2px solid var(--kstpa-pub-accent, #C99700);
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1200;
}

.kstpa-dropdown:hover .kstpa-dropdown-menu,
.kstpa-dropdown:focus-within .kstpa-dropdown-menu,
.kstpa-dropdown.is-open .kstpa-dropdown-menu,
.kstpa-dropdown.show .kstpa-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.kstpa-dropdown-menu li {
    margin: 0;
}

.kstpa-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--kstpa-text-primary);
    text-decoration: none;
    transition: all var(--kstpa-transition-fast);
}

.kstpa-dropdown-menu a i {
    width: 16px;
    color: var(--kstpa-pub-primary, #85051F);
    font-size: 0.8125rem;
}

.kstpa-dropdown-menu a:hover {
    background-color: var(--kstpa-surface-muted, #FBF8F3);
    color: var(--kstpa-pub-primary, #85051F);
    padding-left: 1.45rem;
}

/* ==========================================================================
   Band 4: Burgundy Latest-Updates Ticker Bar (CR-01 & Master Reference)
   ========================================================================== */
.kstpa-ticker-strip {
    background: linear-gradient(90deg, var(--kstpa-pub-primary, #85051F) 0%, var(--kstpa-pub-primary-hover, #660317) 100%);
    color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.kstpa-ticker-inner {
    display: flex;
    align-items: center;
    height: 40px;
    gap: 1rem;
}

.kstpa-ticker-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background-color: var(--kstpa-pub-accent, #C99700);
    color: #1a160d;
    padding: 0.28rem 0.75rem;
    border-radius: var(--kstpa-radius-sm);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.kstpa-ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 24px;
}

.kstpa-ticker-track {
    display: flex;
    align-items: center;
    height: 100%;
}

.kstpa-ticker-item {
    display: none;
    align-items: center;
    gap: 0.65rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kstpa-ticker-item.active {
    display: inline-flex;
}

.kstpa-ticker-item:hover .kstpa-ticker-text {
    text-decoration: underline;
    color: var(--kstpa-pub-accent, #C99700);
}

.kstpa-ticker-tag {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    border-radius: 3px;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.kstpa-tag-notice {
    background-color: #d97706;
}

.kstpa-tag-event {
    background-color: #059669;
}

.kstpa-tag-news {
    background-color: #2563eb;
}

.kstpa-ticker-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
}

.kstpa-ticker-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.kstpa-ticker-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.6875rem;
    transition: background 0.15s ease;
}

.kstpa-ticker-btn:hover {
    background: var(--kstpa-pub-accent, #C99700);
    color: #1a160d;
}

.kstpa-ticker-all-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--kstpa-pub-accent, #C99700);
    text-decoration: none;
    margin-left: 0.5rem;
    padding: 0.2rem 0.45rem;
    border-radius: 3px;
    transition: color 0.15s;
}

.kstpa-ticker-all-link:hover {
    text-decoration: underline;
    color: #ffffff;
}

/* ==========================================================================
   5. REFINED MOBILE DRAWER (CR-01 & CR-04)
   ========================================================================== */

.kstpa-mobile-drawer {
    display: none !important;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
}

.kstpa-mobile-drawer.open {
    display: block !important;
    pointer-events: auto;
}

.kstpa-drawer-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 26, 48, 0.65);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.kstpa-mobile-drawer.open .kstpa-drawer-backdrop {
    opacity: 1;
}

.kstpa-drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 330px;
    max-width: 88vw;
    height: 100%;
    height: 100dvh;
    background-color: var(--kstpa-surface);
    padding: 1.25rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.kstpa-mobile-drawer.open .kstpa-drawer-content {
    transform: translateX(0);
}

.kstpa-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--kstpa-border);
    margin-bottom: 1rem;
}

.kstpa-drawer-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.kstpa-drawer-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.kstpa-drawer-brand strong {
    display: block;
    font-size: 1.125rem;
    color: var(--kstpa-navy);
    line-height: 1.1;
}

.kstpa-drawer-brand small {
    display: block;
    font-size: 0.6875rem;
    color: var(--kstpa-text-muted);
}

.kstpa-drawer-close {
    background: transparent;
    border: none;
    font-size: 1.75rem;
    color: var(--kstpa-text-secondary);
    cursor: pointer;
    line-height: 1;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--kstpa-radius-sm);
    transition: all var(--kstpa-transition);
}

.kstpa-drawer-close:hover,
.kstpa-drawer-close:focus {
    background-color: var(--kstpa-surface-muted);
    color: var(--kstpa-pub-primary, #85051F);
    outline: none;
}

.kstpa-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--kstpa-border);
}

.kstpa-drawer-actions-label {
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--kstpa-text-muted, #64748B);
    margin-bottom: 0.15rem;
    padding-left: 0.25rem;
}

.kstpa-drawer-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 44px;
    padding: 0.72rem 1rem;
    border-radius: var(--kstpa-radius-md, 8px);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    line-height: 1.25;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.kstpa-drawer-btn i {
    font-size: 1rem;
    flex-shrink: 0;
}

.kstpa-drawer-btn-login {
    background-color: rgba(133, 5, 31, 0.06);
    color: var(--kstpa-pub-primary, #85051F);
    border: 1.5px solid var(--kstpa-pub-primary, #85051F);
}

.kstpa-drawer-btn-login:hover,
.kstpa-drawer-btn-login:focus-visible {
    background-color: var(--kstpa-pub-primary, #85051F);
    color: #ffffff;
    outline: none;
}

.kstpa-drawer-btn-new-reg {
    background: linear-gradient(135deg, var(--kstpa-pub-accent, #D7A643) 0%, var(--kstpa-pub-accent-hover, #C29334) 100%);
    color: var(--kstpa-pub-primary-deep, #17243D);
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 6px rgba(215, 166, 67, 0.28);
}

.kstpa-drawer-btn-new-reg:hover,
.kstpa-drawer-btn-new-reg:focus-visible {
    background: linear-gradient(135deg, var(--kstpa-pub-accent-hover, #C29334) 0%, var(--kstpa-pub-accent, #D7A643) 100%);
    box-shadow: 0 4px 12px rgba(215, 166, 67, 0.4);
    outline: none;
}

.kstpa-drawer-btn-existing-reg {
    background-color: rgba(23, 36, 61, 0.05);
    color: var(--kstpa-pub-primary-deep, #17243D);
    border: 1.5px solid var(--kstpa-pub-primary-deep, #17243D);
}

.kstpa-drawer-btn-existing-reg:hover,
.kstpa-drawer-btn-existing-reg:focus-visible {
    background-color: var(--kstpa-pub-primary-deep, #17243D);
    color: #ffffff;
    outline: none;
}

.kstpa-btn-drawer {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    text-align: center;
    justify-content: center !important;
    font-size: 0.875rem !important;
}

.kstpa-drawer-staff-wrap {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--kstpa-border, #E2E8F0);
}

.kstpa-drawer-staff-link {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--kstpa-pub-primary, #85051F);
    text-decoration: none;
    min-height: 44px;
    padding: 0.5rem 0.5rem;
    border-radius: var(--kstpa-radius-sm, 6px);
    transition: all 0.16s ease;
}

.kstpa-drawer-staff-link:hover,
.kstpa-drawer-staff-link:focus-visible {
    color: var(--kstpa-pub-primary-hover, #660317);
    background-color: rgba(133, 5, 31, 0.06);
    outline: none;
}

.kstpa-drawer-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.kstpa-drawer-menu li {
    margin-bottom: 0.2rem;
}

.kstpa-drawer-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    min-height: 44px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--kstpa-text-primary);
    text-decoration: none;
    border-radius: var(--kstpa-radius-sm);
    transition: all var(--kstpa-transition-fast);
}

.kstpa-drawer-menu a i {
    width: 18px;
    color: var(--kstpa-navy);
    font-size: 0.875rem;
}

.kstpa-drawer-menu a:hover {
    background-color: var(--kstpa-surface-muted);
    color: var(--kstpa-blue);
}

.kstpa-drawer-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--kstpa-border);
    font-size: 0.8125rem;
    color: var(--kstpa-text-muted);
}

.kstpa-drawer-footer p {
    margin: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kstpa-drawer-staff-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--kstpa-navy);
    font-weight: 700;
    text-decoration: none;
}

/* ==========================================================================
   6. REUSABLE BUTTONS & COMPONENTS
   ========================================================================== */

.kstpa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.7rem 1.35rem;
    border-radius: var(--kstpa-radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--kstpa-transition);
    text-decoration: none;
    text-align: center;
}

.kstpa-btn-primary {
    background-color: var(--kstpa-blue);
    color: #ffffff !important;
    box-shadow: var(--kstpa-pub-shadow-sm);
}

.kstpa-btn-primary:hover {
    background-color: var(--kstpa-blue-hover);
    box-shadow: var(--kstpa-pub-shadow-md);
    transform: translateY(-1px);
}

.kstpa-btn-gold {
    background: linear-gradient(135deg, var(--kstpa-pub-accent, #D7A643) 0%, var(--kstpa-pub-accent-hover, #C29334) 100%);
    color: var(--kstpa-pub-primary-deep, #17243D) !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3);
}

.kstpa-btn-gold:hover {
    background: linear-gradient(135deg, var(--kstpa-pub-accent-hover, #C29334) 0%, var(--kstpa-pub-accent, #D7A643) 100%);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

.kstpa-btn-outline {
    background-color: transparent;
    border-color: var(--kstpa-border-strong);
    color: var(--kstpa-navy) !important;
}

.kstpa-btn-outline:hover {
    background-color: var(--kstpa-surface-muted);
    border-color: var(--kstpa-navy);
}

.kstpa-btn-block {
    width: 100%;
}

/* Cards */
.kstpa-card {
    background-color: var(--kstpa-surface);
    border: 1px solid var(--kstpa-border);
    border-radius: var(--kstpa-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--kstpa-shadow-xs);
    transition: all var(--kstpa-transition);
}

.kstpa-card-interactive {
    cursor: pointer;
}

.kstpa-card-interactive:hover {
    box-shadow: var(--kstpa-shadow-card-hover);
    transform: translateY(-3px);
    border-color: var(--kstpa-pub-accent-border);
}

/* Section Header */
.kstpa-section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3rem auto;
}

.kstpa-section-kicker {
    display: inline-block;
    font-size: var(--kstpa-text-xs);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--kstpa-blue);
    background-color: var(--kstpa-blue-light);
    padding: 0.3rem 0.85rem;
    border-radius: var(--kstpa-radius-full);
    margin-bottom: 0.75rem;
}

.kstpa-section-title {
    font-size: var(--kstpa-text-3xl);
    font-weight: 800;
    color: var(--kstpa-navy);
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.kstpa-section-sub {
    font-size: var(--kstpa-text-lg);
    color: var(--kstpa-text-secondary);
    line-height: 1.5;
}

.kstpa-section-divider {
    width: 76px;
    height: 3.5px;
    background: linear-gradient(90deg, var(--kstpa-pub-primary, #85051F) 0%, var(--kstpa-pub-accent, #D7A643) 50%, var(--kstpa-pub-primary, #85051F) 100%);
    margin: 1rem auto 0 auto;
    border-radius: var(--kstpa-radius-full);
    transform-origin: center center;
}

/* Breadcrumbs */
.kstpa-breadcrumbs {
    font-size: var(--kstpa-text-sm);
    margin-bottom: 1rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kstpa-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
}

.kstpa-breadcrumbs li {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kstpa-breadcrumbs li::after {
    content: "/";
    margin-left: 0.5rem;
    color: var(--kstpa-text-subtle);
}

.kstpa-breadcrumbs li:last-child::after {
    content: "";
}

.kstpa-breadcrumbs a {
    color: var(--kstpa-text-secondary);
}

.kstpa-breadcrumbs li[aria-current="page"] {
    color: var(--kstpa-navy);
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Page Hero Header (Universal Theme Gradient) */
.kstpa-page-hero {
    background: var(--kstpa-pub-panel-gradient, linear-gradient(135deg, #570013 0%, #85051F 100%));
    color: #ffffff;
    padding: 3rem var(--kstpa-container-padding);
    border-radius: var(--kstpa-radius-xl);
    margin-top: 0;
    margin-bottom: 2rem;
    scroll-margin-top: var(--kstpa-scroll-offset, 90px);
    border: 1px solid var(--kstpa-pub-accent-border, rgba(215, 166, 67, 0.45));
    box-shadow: var(--kstpa-pub-shadow-lg), var(--kstpa-pub-btn-top-edge);
    position: relative;
    overflow: hidden;
}

.kstpa-page-hero::after {
    content: "";
    position: absolute;
    top: -10%;
    right: -5%;
    bottom: -10%;
    width: 45%;
    background: var(--kstpa-pub-panel-shine, radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, transparent 70%));
    pointer-events: none;
    transform: translate3d(calc((var(--kstpa-scroll-progress, 0.5) - 0.5) * 32px), calc((0.5 - var(--kstpa-scroll-progress, 0.5)) * 16px), 0);
}

.kstpa-page-hero .kstpa-breadcrumbs a {
    color: var(--kstpa-pub-text-inverse-muted, #F0E6D8);
}

.kstpa-page-hero .kstpa-breadcrumbs li[aria-current="page"] {
    color: var(--kstpa-gold);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kstpa-page-title {
    font-size: clamp(1.4rem, 3.5vw, 2.25rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.kstpa-page-lead {
    font-size: var(--kstpa-text-lg);
    color: var(--kstpa-pub-text-inverse-muted, #F0E6D8);
    max-width: 800px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Reusable Universal Brand Callout Panel (Replaces Hardcoded Navy/Blue Callouts) */
.kstpa-brand-callout {
    background: var(--kstpa-pub-panel-gradient, linear-gradient(135deg, #570013 0%, #85051F 100%)) !important;
    color: var(--kstpa-pub-text-inverse, #FFFFFF) !important;
    border: 1px solid var(--kstpa-pub-accent, #D7A643) !important;
    box-shadow: var(--kstpa-pub-shadow-lg), var(--kstpa-pub-btn-top-edge) !important;
    position: relative;
    overflow: hidden;
}

.kstpa-brand-callout::before {
    content: "";
    position: absolute;
    inset: -15%;
    background: var(--kstpa-pub-panel-shine, radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 60%));
    pointer-events: none;
    z-index: 0;
    transform: translate3d(calc((var(--kstpa-scroll-progress, 0.5) - 0.5) * 30px), calc((0.5 - var(--kstpa-scroll-progress, 0.5)) * 15px), 0);
}

.kstpa-brand-callout > * {
    position: relative;
    z-index: 1;
}

/* Main Content Area */
.kstpa-main-content {
    padding-top: 1.5rem;
    padding-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.kstpa-page-home .kstpa-main-content {
    padding-top: 0;
}

/* ==========================================================================
   7. COMPREHENSIVE 4-COLUMN FOOTER
   ========================================================================== */

.kstpa-footer {
    background-color: var(--kstpa-pub-footer-bg, #3d030f);
    color: #e2e8f0;
    padding-top: 4.5rem;
    border-top: 3px solid var(--kstpa-pub-accent, #C99700);
}

.kstpa-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1.8fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.kstpa-footer-col-about {
    padding-right: 1rem;
}

.kstpa-footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.kstpa-footer-logo {
    height: 48px;
    width: auto;
}

.kstpa-footer-brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    display: block;
}

.kstpa-footer-brand-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    display: block;
}

.kstpa-footer-desc {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #94a3b8;
}

.kstpa-social-links {
    display: flex;
    gap: 0.75rem;
}

.kstpa-social-links a {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-radius: var(--kstpa-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all var(--kstpa-transition);
}

.kstpa-social-links a:hover {
    background-color: var(--kstpa-blue);
    transform: translateY(-2px);
}

.kstpa-footer-heading {
    color: #ffffff;
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.6rem;
}

.kstpa-footer-heading::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background-color: var(--kstpa-gold);
}

.kstpa-footer-links li {
    margin-bottom: 0.6rem;
}

.kstpa-footer-links a {
    color: #cbd5e1;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--kstpa-transition-fast);
}

.kstpa-footer-links a i {
    font-size: 0.625rem;
    color: var(--kstpa-gold);
}

.kstpa-footer-links a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.kstpa-office-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.kstpa-office-title i {
    color: var(--kstpa-gold);
}

.kstpa-office-text {
    font-size: 0.8125rem;
    color: #94a3b8;
    line-height: 1.5;
}

.kstpa-footer-contact-items p {
    font-size: 0.8125rem;
    margin-bottom: 0.35rem;
    color: #cbd5e1;
}

.kstpa-footer-contact-items a {
    color: #ffffff;
    font-weight: 500;
}

.kstpa-footer-contact-items i {
    color: var(--kstpa-gold);
    margin-right: 0.35rem;
}

/* ==========================================================================
   8. DIGITAL ODOMETER VISITOR COUNTER
   ========================================================================== */

.kstpa-odometer-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 0;
    background-color: rgba(6, 14, 26, 0.5);
}

.kstpa-odometer-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.kstpa-odometer-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.kstpa-odometer-label i {
    color: var(--kstpa-gold);
}

.kstpa-odometer {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background-color: #000000;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid #334155;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.kstpa-odometer-digit {
    background: linear-gradient(180deg, var(--kstpa-pub-footer-bg) 0%, var(--kstpa-pub-primary-deep) 100%);
    color: var(--kstpa-pub-accent);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.125rem;
    font-weight: 800;
    width: 22px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    border: 1px solid var(--kstpa-pub-accent-border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.kstpa-odometer-live-badge {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kstpa-pulse-dot-green {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.7);
    animation: kstpaPulseGreen 2s infinite;
}

@keyframes kstpaPulseGreen {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   9. SUB-FOOTER BOTTOM BAR
   ========================================================================== */

.kstpa-bottom-bar {
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: #94a3b8;
    flex-wrap: wrap;
    gap: 1rem;
}

.kstpa-brand-credit {
    color: var(--kstpa-gold);
    font-weight: 700;
}

.kstpa-brand-credit:hover {
    color: #ffffff;
}

.kstpa-heart {
    color: #ef4444;
    display: inline-block;
}

/* Back to Top Button */
.kstpa-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background-color: var(--kstpa-navy);
    color: var(--kstpa-gold);
    border: 2px solid var(--kstpa-gold);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--kstpa-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--kstpa-transition);
    z-index: 999;
}

.kstpa-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.kstpa-back-to-top:hover {
    background-color: var(--kstpa-blue);
    color: #ffffff;
    border-color: var(--kstpa-blue);
    transform: translateY(-3px);
}

/* ==========================================================================
   10. RESPONSIVE BREAKPOINTS (MOBILE-FIRST ADAPTATIONS)
   ========================================================================== */

/* Laptops & Desktops (< 1280px) */
@media (max-width: 1280px) {
    .kstpa-brand-motto {
        display: none;
    }
    .kstpa-nav-link {
        padding: 0 0.85rem;
        font-size: 0.875rem;
    }
}

/* Tablet & Smaller Laptops (<= 1024px) */
@media (max-width: 1024px) {
    .kstpa-navbar {
        display: none;
    }
    .kstpa-masthead-leaders {
        display: none !important;
    }
    .kstpa-brand-motto {
        display: none;
    }
    .kstpa-navbar .kstpa-nav-actions,
    .kstpa-navbar .kstpa-btn-member-login,
    .kstpa-navbar .kstpa-btn-join {
        display: none !important;
    }
    .kstpa-brand-inner {
        gap: 0.75rem;
    }
    .kstpa-mobile-toggle-wrap {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    .kstpa-mobile-toggle-btn {
        display: flex !important;
    }
    .kstpa-brand-identity {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-decoration: none;
        max-width: calc(100% - 95px);
    }
    .kstpa-brand-titles {
        display: flex;
        flex-direction: column;
        overflow: visible;
    }
    .kstpa-brand-fullname {
        font-size: clamp(0.78rem, 2.8vw, 0.95rem);
        font-weight: 800;
        line-height: 1.22;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        max-width: none;
        color: var(--kstpa-pub-primary, #85051F);
    }
    .kstpa-brand-kannada {
        font-size: clamp(0.68rem, 2.3vw, 0.8125rem);
        font-weight: 600;
        line-height: 1.25;
        display: block !important;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        max-width: none;
        color: var(--kstpa-pub-text-secondary, #4A5568);
        margin-top: 2px;
    }
    .kstpa-brand-kicker {
        display: none;
    }
    .kstpa-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    .kstpa-page-hero {
        padding: 2.5rem 1.5rem;
    }
    .kstpa-page-title {
        font-size: var(--kstpa-text-3xl);
    }
}

/* Standard Tablets & Large Mobile (<= 768px) */
@media (max-width: 768px) {
    .kstpa-main-content {
        padding-top: 1rem;
        padding-bottom: 3rem;
    }
    .kstpa-page-hero {
        margin-bottom: 1.25rem;
    }
    .kstpa-brand-bar {
        padding: 0.5rem 0;
    }
    .kstpa-brand-inner {
        gap: 0.5rem;
    }
    .kstpa-brand-search {
        display: none;
    }
    .kstpa-topbar-left {
        justify-content: center;
        width: 100%;
    }
    .kstpa-topbar-right {
        display: none;
    }
    .kstpa-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .kstpa-bottom-bar {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    .kstpa-back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
    }
}

/* Small Mobiles (<= 480px) */
@media (max-width: 480px) {
    .kstpa-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .kstpa-brand-inner {
        gap: 0.5rem;
        justify-content: space-between;
    }
    .kstpa-btn-mobile-login {
        display: none !important;
    }
    .kstpa-mobile-toggle-wrap {
        gap: 0;
        flex-shrink: 0;
        margin-left: auto;
    }
    .kstpa-mobile-toggle-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        flex-shrink: 0;
        margin-left: auto;
    }
    .kstpa-brand-identity {
        gap: 0.5rem;
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 54px);
    }
    .kstpa-brand-logo-frame {
        width: 46px;
        height: 46px;
        min-width: 46px;
        flex-shrink: 0;
    }
    .kstpa-brand-titles {
        flex: 1 1 auto;
        min-width: 0;
        overflow: visible;
    }
    .kstpa-brand-fullname {
        font-size: clamp(0.78rem, 2.8vw, 0.85rem);
        line-height: 1.2;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        max-width: none;
        word-break: normal;
    }
    .kstpa-brand-kannada {
        font-size: clamp(0.65rem, 2.2vw, 0.72rem);
        line-height: 1.2;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        max-width: none;
        display: block !important;
        margin-top: 2px;
    }
    .kstpa-page-title {
        font-size: clamp(1.4rem, 5.5vw, 1.875rem);
    }
    .kstpa-page-lead {
        font-size: var(--kstpa-text-base);
    }
    .kstpa-footer {
        padding-top: 3rem;
    }
    .kstpa-ticker-controls,
    .kstpa-ticker-all-link {
        display: none !important;
    }
    .kstpa-ticker-track {
        max-width: calc(100vw - 110px);
    }
}

/* Extra-Narrow Mobiles (<= 360px, e.g. iPhone SE 320px) */
@media (max-width: 360px) {
    .kstpa-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .kstpa-brand-inner {
        gap: 0.35rem;
    }
    .kstpa-brand-identity {
        gap: 0.35rem;
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 50px);
    }
    .kstpa-brand-logo-frame {
        width: 38px;
        height: 38px;
        min-width: 38px;
        flex-shrink: 0;
    }
    .kstpa-mobile-toggle-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 10px 9px;
    }
    .kstpa-brand-fullname {
        font-size: 0.72rem;
        line-height: 1.15;
    }
    .kstpa-brand-kannada {
        font-size: 0.62rem;
        line-height: 1.15;
    }
    .kstpa-ticker-track {
        max-width: calc(100vw - 80px);
    }
}

/* ==========================================================================
   11. PREMIUM MODERN 3D PAGE LOADER (V6)
   ========================================================================== */
.kstpa-page-loader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: var(--kstpa-pub-loader-bg, radial-gradient(circle at center, #570013 0%, #090406 100%));
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.45s ease;
    pointer-events: all;
}

.kstpa-page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.kstpa-loader-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    max-width: 90vw;
}

.kstpa-3d-scene {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 1.75rem;
    perspective: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kstpa-3d-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}

.kstpa-orbit-outer {
    border: 2px dashed rgba(215, 166, 67, 0.45);
    animation: kstpaOrbitSpin 8s linear infinite;
}

.kstpa-orbit-inner {
    inset: 10px;
    border: 1.5px solid rgba(215, 166, 67, 0.7);
    border-top-color: transparent;
    border-bottom-color: transparent;
    animation: kstpaOrbitSpinReverse 4s linear infinite;
}

.kstpa-3d-medallion {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    position: relative;
    transform-style: preserve-3d;
    animation: kstpa3DMedallion 3.6s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(215, 166, 67, 0.35);
}

.kstpa-medallion-face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--kstpa-pub-medallion-bg, radial-gradient(circle at 35% 35%, #A31D36 0%, #85051F 68%, #570013 100%));
    border: 3px solid var(--kstpa-pub-accent, #D7A643);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    backface-visibility: hidden;
    box-shadow: inset 0 2px 6px rgba(255, 230, 160, 0.6), inset 0 -3px 8px rgba(0, 0, 0, 0.6);
}

.kstpa-loader-emblem {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

@keyframes kstpaOrbitSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes kstpaOrbitSpinReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes kstpa3DMedallion {
    0% {
        transform: rotateY(0deg) rotateX(10deg);
    }
    50% {
        transform: rotateY(180deg) rotateX(-10deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(10deg);
    }
}

.kstpa-loader-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
}

.kstpa-loader-title {
    font-family: var(--kstpa-font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--kstpa-pub-accent, #F8D98C);
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(215, 166, 67, 0.4);
}

.kstpa-loader-kannada {
    font-size: 0.85rem;
    font-weight: 600;
    color: #E2E8F0;
    letter-spacing: 0.3px;
}

.kstpa-loader-sub {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kstpa-loader-bar-wrap {
    width: 160px;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.kstpa-loader-bar {
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--kstpa-pub-accent, #D7A643), var(--kstpa-pub-accent-hover, #FFF2B2), var(--kstpa-pub-accent, #D7A643), transparent);
    animation: kstpaBarSweep 1.6s ease-in-out infinite;
}

@keyframes kstpaBarSweep {
    0% { left: -50%; width: 30%; }
    50% { left: 35%; width: 60%; }
    100% { left: 100%; width: 30%; }
}

@media (prefers-reduced-motion: reduce) {
    .kstpa-3d-medallion,
    .kstpa-orbit-outer,
    .kstpa-orbit-inner,
    .kstpa-loader-bar {
        animation: none !important;
    }
}

/* ==========================================================================
   V7: GOOGLE PLAY & APPLE APP STORE BADGES + COMING SOON ACCESSIBLE MODAL
   ========================================================================== */

.kstpa-store-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
    padding: 0.55rem 1rem;
    background: var(--kstpa-pub-primary-deep, #570013);
    color: #FFFFFF;
    border: 1.5px solid var(--kstpa-pub-accent, #D7A643);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    box-shadow: var(--kstpa-pub-shadow-md), var(--kstpa-pub-btn-top-edge);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
    box-sizing: border-box;
}

.kstpa-store-badge-btn:hover {
    background: var(--kstpa-pub-primary, #85051F);
    border-color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: var(--kstpa-pub-shadow-lg), var(--kstpa-pub-btn-top-edge);
}

.kstpa-store-badge-btn:focus-visible {
    outline: 3px solid var(--kstpa-pub-accent, #F8D98C);
    outline-offset: 2px;
}

.kstpa-store-badge-icon {
    font-size: 1.45rem;
    color: var(--kstpa-pub-accent, #F8D98C);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    flex-shrink: 0;
}

.kstpa-store-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.kstpa-store-eyebrow {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.kstpa-store-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #FFFFFF;
    white-space: nowrap;
}

.kstpa-store-pill {
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: var(--kstpa-pub-accent-soft, rgba(215, 166, 67, 0.22));
    color: var(--kstpa-pub-accent, #F8D98C);
    border: 1px solid var(--kstpa-pub-border-gold, rgba(215, 166, 67, 0.5));
    margin-left: 0.25rem;
    white-space: nowrap;
}

/* Footer Compact Store Badges */
.kstpa-footer-apps-box {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.kstpa-footer-apps-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--kstpa-pub-accent, #F8D98C);
    margin-bottom: 0.6rem;
}

.kstpa-footer-store-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.kstpa-store-badge-compact {
    min-height: 44px;
    padding: 0.4rem 0.75rem;
    gap: 0.55rem;
    flex: 1 1 140px;
}

.kstpa-store-badge-compact .kstpa-store-badge-icon {
    font-size: 1.15rem;
    width: 20px;
}

.kstpa-store-badge-compact .kstpa-store-title {
    font-size: 0.82rem;
}

.kstpa-store-badge-compact .kstpa-store-pill {
    margin-left: auto;
}

/* Odometer Verified Count Pill & Honest Fallback */
.kstpa-odometer-count-pill {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    font-variant-numeric: tabular-nums;
}

.kstpa-odometer-unavailable {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--kstpa-pub-accent, #F8D98C);
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    background: var(--kstpa-pub-accent-soft, rgba(215, 166, 67, 0.14));
    border: 1px solid var(--kstpa-pub-border-gold, rgba(215, 166, 67, 0.35));
}

/* Accessible KSTPA Mobile App Coming Soon Modal Dialog */
.kstpa-app-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100005;
    background: rgba(9, 14, 26, 0.74);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.kstpa-app-modal-backdrop[hidden] {
    display: none !important;
}

.kstpa-app-modal-backdrop.is-open {
    opacity: 1;
}

.kstpa-app-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: #FFFFFF;
    color: #1E293B;
    border-radius: 16px;
    border: 2px solid var(--kstpa-pub-accent, #C99700);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    padding: 2rem 1.85rem 1.65rem 1.85rem;
    text-align: left;
    transform: translateY(10px) scale(0.98);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.kstpa-app-modal-backdrop.is-open .kstpa-app-modal-dialog {
    transform: translateY(0) scale(1);
}

.kstpa-app-modal-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    border: 1px solid var(--kstpa-pub-border, #E8DFC8);
    background: var(--kstpa-pub-surface-page, #FAF8F5);
    color: var(--kstpa-pub-primary, #85051F);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.kstpa-app-modal-close:hover,
.kstpa-app-modal-close:focus-visible {
    background: var(--kstpa-pub-primary, #85051F);
    color: #FFFFFF;
    outline: 2px solid var(--kstpa-pub-accent, #C99700);
    outline-offset: 2px;
}

.kstpa-app-modal-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 1.1rem;
    padding-right: 2.25rem;
}

.kstpa-app-modal-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--kstpa-pub-panel-gradient);
    color: var(--kstpa-pub-accent, #F8D98C);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--kstpa-pub-shadow-md);
}

.kstpa-app-modal-platform-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    background: var(--kstpa-pub-accent-light, rgba(201, 151, 0, 0.14));
    color: var(--kstpa-pub-primary-deep, #7A5900);
    border: 1px solid var(--kstpa-pub-accent-border, rgba(201, 151, 0, 0.4));
}

.kstpa-app-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--kstpa-pub-primary, #85051F);
    line-height: 1.25;
    margin: 0;
}

.kstpa-app-modal-body {
    font-size: 0.925rem;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 1.35rem;
}

.kstpa-app-modal-lead {
    margin: 0 0 0.85rem 0;
}

.kstpa-app-modal-features {
    list-style: none;
    padding: 0.85rem 1rem;
    margin: 0 0 0.9rem 0;
    background: var(--kstpa-pub-surface-page, #FAF8F5);
    border: 1px solid var(--kstpa-pub-border, rgba(133, 5, 31, 0.1));
    border-radius: 10px;
}

.kstpa-app-modal-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 0.45rem;
}

.kstpa-app-modal-features li:last-child {
    margin-bottom: 0;
}

.kstpa-app-modal-features li i {
    color: var(--kstpa-pub-accent, #C99700);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.kstpa-app-modal-portal-note {
    font-size: 0.85rem;
    color: #475569;
    margin: 0;
}

.kstpa-app-modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding-top: 1rem;
    border-top: 1px solid #E2E8F0;
}

@media (max-width: 480px) {
    .kstpa-app-modal-dialog {
        padding: 1.4rem 1.15rem 1.25rem 1.15rem;
    }
    .kstpa-app-modal-title {
        font-size: 1.18rem;
    }
    .kstpa-app-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .kstpa-app-modal-footer .kstpa-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   V7: SITEWIDE DEFENSIVE LONG-TOKEN & GRID CONTAINMENT RULES
   ========================================================================== */
.kstpa-card,
.kstpa-hub-card,
.kstpa-leadership-card,
.kstpa-stat-card,
.kstpa-album-card,
.kstpa-event-card,
.kstpa-news-card,
.kstpa-notice-card,
.kstpa-notice-row-card,
.kstpa-link-card,
.kstpa-committee-card,
.kstpa-footer-col {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ==========================================================================
   V9: TWO-LAYER PERCEPTIBLE SCROLL MOTION & SMOOTH ANCHOR SYSTEM
   Layer A: Deliberate Once-Per-Visit Entrance Choreography (760ms / 920ms)
   Layer B: Scroll-Linked Micro-Animation Over Viewport Travel (0.0 -> 1.0)
   ========================================================================== */

html {
    scroll-padding-top: var(--kstpa-scroll-offset, 80px);
}

main [id],
section[id],
div[id="founder"],
div[id="president"],
div[id="constitution"],
div[id="zonal"],
div[id="past"],
div[id="circulars"],
div[id="articles"] {
    scroll-margin-top: var(--kstpa-scroll-offset, 80px);
}

@media (max-width: 1024px) {
    :root {
        --kstpa-scroll-offset: 76px;
    }
    .kstpa-brand-bar {
        position: sticky;
        top: 0;
        z-index: 1010;
        transition: box-shadow var(--kstpa-motion-normal, 280ms) var(--kstpa-motion-ease, cubic-bezier(0.22, 1, 0.36, 1)),
                    border-color var(--kstpa-motion-normal, 280ms) var(--kstpa-motion-ease, cubic-bezier(0.22, 1, 0.36, 1));
    }
    .kstpa-brand-bar.is-scrolled {
        box-shadow: 0 8px 22px -4px rgba(44, 10, 16, 0.14);
        border-bottom-color: var(--kstpa-pub-accent, #D7A643);
    }
}

/* Sticky Navbar Subtle Elevation on Scroll (Zero Height Shift / 0 CLS) */
.kstpa-navbar {
    transition: box-shadow var(--kstpa-motion-normal, 280ms) var(--kstpa-motion-ease, cubic-bezier(0.22, 1, 0.36, 1)),
                background-color var(--kstpa-motion-normal, 280ms) var(--kstpa-motion-ease, cubic-bezier(0.22, 1, 0.36, 1)),
                border-color var(--kstpa-motion-normal, 280ms) var(--kstpa-motion-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.kstpa-navbar.is-scrolled {
    box-shadow: 0 10px 26px -4px rgba(44, 10, 16, 0.16);
    border-bottom-color: var(--kstpa-pub-accent, #D7A643);
}

/* Discreet Reading Progress Bar (News Detail, Notice Detail, Knowledge Centre) */
.kstpa-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 10020;
    pointer-events: none;
    background: transparent;
}

.kstpa-reading-progress-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--kstpa-pub-primary, #85051F) 0%, var(--kstpa-pub-accent, #D7A643) 100%);
    transform-origin: 0 50%;
    transform: scaleX(0);
    transition: transform 90ms linear;
}

/* Refined Back-to-Top Floating Button */
.kstpa-back-to-top {
    background-color: var(--kstpa-pub-primary, #85051F);
    color: var(--kstpa-pub-accent, #D7A643);
    border: 2px solid var(--kstpa-pub-accent, #D7A643);
    transform: translateY(10px) scale(0.95);
    transition: opacity var(--kstpa-motion-normal, 280ms) var(--kstpa-motion-ease),
                transform var(--kstpa-motion-normal, 280ms) var(--kstpa-motion-ease),
                background-color var(--kstpa-motion-fast, 180ms) var(--kstpa-motion-ease),
                color var(--kstpa-motion-fast, 180ms) var(--kstpa-motion-ease),
                visibility var(--kstpa-motion-normal, 280ms);
}

.kstpa-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.kstpa-back-to-top:focus-visible {
    outline: 3px solid var(--kstpa-pub-accent, #D7A643) !important;
    outline-offset: 3px !important;
}

@media (max-width: 767px) {
    .kstpa-back-to-top {
        bottom: 1.15rem;
        right: 1.15rem;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* Layer A: Progressive-Enhancement Section & Card Reveal System (Visible by Default) */
.kstpa-reveal {
    opacity: 1;
    transform: none;
    --kstpa-reveal-duration: var(--kstpa-motion-reveal, 760ms);
}

/* Major section headers and feature containers use the 920ms deliberate entrance */
.kstpa-section-header.kstpa-reveal,
.kstpa-sponsors-header.kstpa-reveal,
.kstpa-creed-card.kstpa-reveal,
.kstpa-cta-inner.kstpa-reveal,
.kstpa-brand-callout.kstpa-reveal,
.kstpa-secretariat-box.kstpa-reveal,
.kstpa-about-hero-text.kstpa-reveal,
.kstpa-about-map-box.kstpa-reveal {
    --kstpa-reveal-duration: var(--kstpa-motion-section, 920ms);
}

@media (prefers-reduced-motion: no-preference) {
    /* Unrevealed below-fold state: instant setup (no reverse transition on hydration) */
    html.kstpa-motion-ready .kstpa-reveal:not(.is-revealed) {
        opacity: 0;
        transform: translate3d(0, var(--kstpa-reveal-offset-desktop, 28px), 0) scale(var(--kstpa-reveal-scale-start, 0.984));
        transition: none !important;
        will-change: opacity, transform;
    }

    @media (max-width: 767px) {
        html.kstpa-motion-ready .kstpa-reveal:not(.is-revealed) {
            transform: translate3d(0, var(--kstpa-reveal-offset-mobile, 16px), 0) scale(var(--kstpa-reveal-scale-start, 0.988));
        }
    }

    /* Above-the-fold initial viewport items: immediately visible with zero animation delay */
    html.kstpa-motion-ready .kstpa-reveal.kstpa-reveal-instant {
        opacity: 1 !important;
        transform: none !important;
        transition: box-shadow var(--kstpa-motion-normal, 280ms) var(--kstpa-motion-ease),
                    border-color var(--kstpa-motion-normal, 280ms) var(--kstpa-motion-ease) !important;
    }

    /* Deliberate entrance transition when .is-revealed is triggered on genuine viewport entry */
    html.kstpa-motion-ready .kstpa-reveal.is-revealed:not(.kstpa-reveal-instant) {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        transition: opacity var(--kstpa-reveal-duration, 760ms) var(--kstpa-motion-ease, cubic-bezier(0.22, 1, 0.36, 1)),
                    transform var(--kstpa-reveal-duration, 760ms) var(--kstpa-motion-ease, cubic-bezier(0.22, 1, 0.36, 1)),
                    box-shadow var(--kstpa-motion-normal, 280ms) var(--kstpa-motion-ease),
                    border-color var(--kstpa-motion-normal, 280ms) var(--kstpa-motion-ease);
        transition-delay: var(--kstpa-stagger-delay, 0ms), var(--kstpa-stagger-delay, 0ms), 0ms, 0ms;
    }

    /* Layer B: Scroll-Linked Micro-Animations Over Meaningful Viewport Distance */
    .kstpa-section-header[data-kstpa-scroll-scene] .kstpa-section-divider {
        transform: scaleX(calc(0.28 + 0.72 * var(--kstpa-scroll-progress, 1)));
        opacity: calc(0.45 + 0.55 * var(--kstpa-scroll-progress, 1));
        transition: transform 90ms linear, opacity 90ms linear;
    }

    .kstpa-creed-card[data-kstpa-scroll-scene] .kstpa-creed-seal {
        transform: translate3d(0, calc((0.5 - var(--kstpa-scroll-progress, 0.5)) * 16px), 0);
        transition: transform 90ms linear;
    }

    .kstpa-about-map-box[data-kstpa-scroll-scene] .kstpa-map-svg-wrap,
    .kstpa-about-map-box[data-kstpa-scroll-scene] img {
        transform: translate3d(0, calc((0.5 - var(--kstpa-scroll-progress, 0.5)) * 18px), 0) scale(calc(0.98 + 0.02 * var(--kstpa-scroll-progress, 1)));
        transition: transform 90ms linear;
    }

    .kstpa-cta-section[data-kstpa-scroll-scene]::before,
    .kstpa-page-hero[data-kstpa-scroll-scene]::before,
    .kstpa-brand-callout[data-kstpa-scroll-scene]::before,
    .kstpa-secretariat-box[data-kstpa-scroll-scene]::before {
        transform: translate3d(calc((var(--kstpa-scroll-progress, 0.5) - 0.5) * 24px), calc((0.5 - var(--kstpa-scroll-progress, 0.5)) * 14px), 0);
        transition: transform 90ms linear;
    }
}

/* Shared Interior Page Hero & Brand Callout Finish-Mode Sheen (Matte vs Soft-Gloss vs Signature-Gloss) */
.kstpa-page-hero,
.kstpa-brand-callout,
.kstpa-secretariat-box {
    position: relative;
    overflow: hidden;
}

.kstpa-page-hero::before,
.kstpa-brand-callout::before,
.kstpa-secretariat-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--kstpa-pub-panel-shine, none);
    pointer-events: none;
    z-index: 0;
}

.kstpa-page-hero > *,
.kstpa-brand-callout > *,
.kstpa-secretariat-box > * {
    position: relative;
    z-index: 1;
}

/* Desktop Hover Micro-Interactions vs Touch Device Press Safety */
@media (hover: hover) and (pointer: fine) {
    .kstpa-btn i.fa-arrow-right,
    .kstpa-btn i.fa-chevron-right,
    a .fa-external-link-alt {
        transition: transform var(--kstpa-motion-fast, 180ms) var(--kstpa-motion-ease);
    }

    .kstpa-btn:hover i.fa-arrow-right,
    .kstpa-btn:hover i.fa-chevron-right,
    a:hover .fa-external-link-alt {
        transform: translateX(3px);
    }

    .kstpa-album-card .kstpa-album-cover img,
    .kstpa-event-card .kstpa-event-thumb img {
        transition: transform var(--kstpa-motion-reveal, 760ms) var(--kstpa-motion-ease);
    }

    .kstpa-album-card:hover .kstpa-album-cover img,
    .kstpa-event-card:hover .kstpa-event-thumb img {
        transform: scale(1.035);
    }
}

@media (hover: none) {
    .kstpa-card:hover,
    .kstpa-hub-card:hover,
    .kstpa-leadership-card:hover,
    .kstpa-stat-card:hover,
    .kstpa-album-card:hover,
    .kstpa-event-card:hover,
    .kstpa-news-card:hover,
    .kstpa-notice-card:hover,
    .kstpa-notice-row-card:hover,
    .kstpa-link-card:hover,
    .kstpa-comm-member-card:hover,
    .kstpa-objective-card:hover,
    .kstpa-kc-card:hover {
        transform: none !important;
    }

    .kstpa-btn:active,
    .kstpa-store-badge-btn:active {
        transform: scale(0.985);
    }
}

/* Reduced Motion & Print Stylesheet Safety (V9-10) */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .kstpa-reveal,
    html.kstpa-motion-ready .kstpa-reveal,
    html.kstpa-motion-ready .kstpa-reveal:not(.is-revealed) {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

@media print {
    .kstpa-topbar,
    .kstpa-navbar,
    .kstpa-ticker-bar,
    .kstpa-mobile-drawer,
    .kstpa-drawer-backdrop,
    .kstpa-back-to-top,
    .kstpa-page-loader,
    .kstpa-reading-progress,
    .kstpa-app-modal-backdrop {
        display: none !important;
    }

    .kstpa-reveal,
    html.kstpa-motion-ready .kstpa-reveal,
    html.kstpa-motion-ready .kstpa-reveal:not(.is-revealed) {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
}


/* ==========================================================================
   PUBLIC INTERIOR FILTER & SEARCH BARS (News, Notices, Events)
   ========================================================================== */
.kstpa-events-filter-bar,
.kstpa-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    background: var(--kstpa-surface, var(--kstpa-pub-surface, #ffffff));
    color: var(--kstpa-text-primary, var(--kstpa-pub-text-primary, #0f172a));
    border: 1px solid var(--kstpa-border, var(--kstpa-pub-border, #e2e8f0));
    border-radius: var(--kstpa-radius-lg, 12px);
    padding: 1.25rem 1.75rem;
    margin-top: 0;
    margin-bottom: 2.5rem;
    box-shadow: var(--kstpa-shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}

@media (max-width: 768px) {
    .kstpa-events-filter-bar,
    .kstpa-filter-bar {
        padding: 1rem 1.25rem;
        margin-bottom: 1.5rem;
        gap: 1rem;
    }
}
