/* ============================================================
   javelin.team — Main CSS
   Design: Exklusiv, Athletic, Klar
   Palette: Schwarz / Weiss / Javelin-Gold (#C9A84C)
   ============================================================ */

:root {
    --color-black:    #0A0A0A;
    --color-white:    #FFFFFF;
    --color-gold:     #C9A84C;
    --color-gold-light: #E8CC7A;
    --color-grey-100: #F5F5F5;
    --color-grey-200: #E8E8E8;
    --color-grey-400: #9E9E9E;
    --color-grey-700: #3D3D3D;
    --color-success:  #2E7D32;
    --color-error:    #C62828;

    --font-base:      'Inter', system-ui, -apple-system, sans-serif;
    --radius:         6px;
    --radius-lg:      12px;
    --transition:     0.2s ease;
    --shadow:         0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg:      0 8px 40px rgba(0,0,0,0.14);

    --max-width:      1200px;
    --spacing-xs:     0.5rem;
    --spacing-sm:     1rem;
    --spacing-md:     2rem;
    --spacing-lg:     4rem;
    --spacing-xl:     4.5rem;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-base);
    color: var(--color-black);
    background: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* --- Container --- */
.container {
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--spacing-sm);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-base);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--color-gold);
    color: var(--color-black);
    border-color: var(--color-gold);
}
.btn-primary:hover {
    background: var(--color-gold-light);
    border-color: var(--color-gold-light);
}
.btn-outline {
    background: transparent;
    color: var(--color-black);
    border-color: var(--color-black);
}
.btn-outline:hover {
    background: var(--color-black);
    color: var(--color-white);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-danger {
    background: var(--color-error);
    color: var(--color-white);
    border-color: var(--color-error);
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-grey-200);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.logo-mark { color: var(--color-gold); }
.logo-dot  { color: var(--color-black); }
.logo-team { color: #A8A8A8; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.site-nav a:not(.btn) {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-grey-700);
    transition: color var(--transition);
}
.site-nav a:not(.btn):hover { color: var(--color-black); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-black);
    transition: all var(--transition);
}

/* --- Hero --- */
.hero {
    min-height: 88vh;
    display: flex;
    align-items: center;
    background: var(--color-black);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(201,168,76,0.12) 0%, transparent 60%);
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 1rem;
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    max-width: 16ch;
    margin-bottom: 1.5rem;
}
.hero-title em {
    font-style: normal;
    color: var(--color-gold);
}
.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    max-width: 48ch;
    margin-bottom: 2.5rem;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.btn-outline-white {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--color-white);
}

/* --- Sections --- */
section { padding: var(--spacing-xl) 0; }
.section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 0.75rem;
}
.section-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.section-sub {
    font-size: 1rem;
    color: var(--color-grey-700);
    max-width: 56ch;
    margin-top: 1rem;
    margin-bottom: 0;
}
.section-header {
    margin-bottom: 3rem;
}

/* --- Athlete Cards --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}
.athlete-card {
    position: relative;
    border: 1px solid var(--color-grey-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.athlete-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.athlete-card-photo {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    background: var(--color-grey-100);
}
.athlete-card-photo-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--color-grey-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-grey-400);
    font-size: 3rem;
}
.athlete-card-body { padding: 1.25rem; }
.athlete-card-discipline {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 0.25rem;
}
.athlete-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.athlete-card-club {
    font-size: 0.8rem;
    color: var(--color-grey-400);
    margin-bottom: 0.75rem;
}
.athlete-card-statement {
    font-size: 0.85rem;
    color: var(--color-grey-700);
    line-height: 1.5;
}

/* --- Filter --- */
.discipline-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
    margin-bottom: 0.25rem;
}
.filter-btn {
    padding: 0.4rem 1rem;
    border-radius: 100px;
    border: 1.5px solid var(--color-grey-200);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    background: none;
    transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

/* --- Steps --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-top: 3.5rem;
}
.step {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--color-grey-100);
}
.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-gold);
    color: var(--color-black);
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.step-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-desc  { font-size: 0.85rem; color: var(--color-grey-700); }

/* --- Forms --- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--color-grey-200);
    border-radius: var(--radius);
    font-family: var(--font-base);
    font-size: 0.9rem;
    transition: border-color var(--transition);
    background: var(--color-white);
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-black);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.75rem; color: var(--color-grey-400); margin-top: 0.3rem; }

/* --- Flash messages --- */
.flash {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}
.flash-success { background: #E8F5E9; color: var(--color-success); border: 1px solid #A5D6A7; }
.flash-error   { background: #FFEBEE; color: var(--color-error);   border: 1px solid #EF9A9A; }

/* --- Footer --- */
.site-footer {
    background: var(--color-black);
    color: rgba(255,255,255,0.7);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.footer-brand {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}
.footer-sub { font-size: 0.85rem; }
.footer-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-gold); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 0.4rem; }
.site-footer a { color: rgba(255,255,255,0.6); font-size: 0.85rem; transition: color var(--transition); }
.site-footer a:hover { color: var(--color-white); }
.footer-copy { font-size: 0.75rem; color: rgba(255,255,255,0.4); border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; }

/* --- Error pages --- */
.error-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-grey-100);
}
.error-page {
    text-align: center;
    padding: 3rem;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    max-width: 480px;
}
.error-code {
    font-size: 5rem;
    font-weight: 800;
    color: var(--color-gold);
    line-height: 1;
    margin-bottom: 0.5rem;
}
.error-page h1 { margin-bottom: 0.75rem; }
.error-page p  { color: var(--color-grey-700); margin-bottom: 1.5rem; }

/* --- Login Page --- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-grey-100);
    padding: 2rem;
}
.auth-box {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo .logo { font-size: 1.5rem; display: inline-block; }
.auth-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.25rem; }
.auth-sub   { font-size: 0.85rem; color: var(--color-grey-400); margin-bottom: 2rem; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .site-nav { display: none; }
    .site-nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 64px 0 0 0;
        background: var(--color-white);
        padding: 2rem;
        z-index: 99;
        gap: 1rem;
    }
    .nav-toggle { display: flex; }

    .footer-grid { grid-template-columns: 1fr; }

    .hero-title { font-size: 2.2rem; }
}

@media (max-width: 480px) {
    .team-grid { grid-template-columns: 1fr 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
}

/* --- Portal sidebar logo override (dark background) --- */
.portal-sidebar .logo-mark { color: var(--color-gold); }
.portal-sidebar .logo-dot  { color: rgba(255,255,255,0.45); }
.portal-sidebar .logo-team { color: rgba(255,255,255,0.38); }

/* --- News / Social Feed --- */
.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
    margin-top: 3rem;
}
.feed-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--color-grey-200);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.feed-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}
.feed-platform-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}
.feed-date {
    font-size: 0.72rem;
    color: var(--color-grey-400);
}
.feed-athlete {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-black);
    margin: 0;
}
.feed-discipline {
    font-weight: 400;
    color: var(--color-grey-400);
}
.feed-event-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gold);
    margin: 0;
}
.feed-event-date {
    font-size: 0.75rem;
    color: var(--color-grey-400);
    margin: 0;
}
.feed-desc {
    font-size: 0.85rem;
    color: var(--color-grey-600, #4B5563);
    line-height: 1.5;
    flex: 1;
    margin: 0;
}
.feed-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-gold);
    margin-top: 0.5rem;
    display: inline-block;
}
.feed-link:hover { text-decoration: underline; }

/* Feed card with visual content (thumbnail or embed) */
.feed-card--visual {
    padding: 0;
    overflow: hidden;
}
.feed-card--visual .feed-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
}
.feed-card--visual .feed-card-header {
    margin-bottom: 0.5rem;
}
.feed-card--visual .feed-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--color-grey-100);
    background: var(--color-white);
}
.feed-thumb-wrap {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-grey-100);
}
.feed-thumb-wrap a { display: block; height: 100%; }
.feed-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.feed-thumb-wrap:hover .feed-thumb { transform: scale(1.03); }

/* ============================================================
   Athlete Profile — Magazine Redesign (.ap-*)
   ============================================================ */

/* --- Hero --- */
.ap-hero {
    background: var(--color-black);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
    padding-bottom: 0;
}
.ap-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    opacity: 0.52;
    filter: blur(4px) saturate(0.65);
    transform: scale(1.06);
}
.ap-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        125deg,
        rgba(10,10,10,0.98) 0%,
        rgba(10,10,10,0.88) 40%,
        rgba(10,10,10,0.45) 75%,
        rgba(10,10,10,0.85) 100%
    );
    pointer-events: none;
}
.ap-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: flex-end;
    min-height: 76vh;
}
.ap-hero-text {
    padding-top: 7rem;
    padding-bottom: 3.5rem;
}
.ap-discipline-tag {
    display: inline-block;
    background: var(--color-gold);
    color: var(--color-black);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 2px;
    margin-bottom: 1.25rem;
}
.ap-discipline-tag--staff {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.75);
}
.ap-hero-name {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.9;
    margin-bottom: 1.1rem;
}
.ap-hero-name em {
    display: block;
    color: var(--color-gold);
    font-style: normal;
}
.ap-hero-club {
    font-size: 1rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
    margin-bottom: 1.75rem;
    letter-spacing: 0.02em;
}
.ap-hero-sep { margin: 0 0.4rem; opacity: 0.35; }
.ap-hero-age {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-left: 0.25rem;
}
.ap-hero-quote {
    font-size: 1.1rem;
    font-style: italic;
    color: rgba(255,255,255,0.78);
    border-left: 3px solid var(--color-gold);
    padding-left: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 46ch;
    line-height: 1.55;
}
.ap-hero-socials {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}
.ap-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    color: rgba(255,255,255,0.65);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition);
}
.ap-social-btn:hover {
    background: rgba(201,168,76,0.14);
    border-color: var(--color-gold);
    color: var(--color-gold);
}
.ap-social-btn--sa {
    background: rgba(201,168,76,0.08);
    border-color: rgba(201,168,76,0.28);
    color: var(--color-gold);
}
.ap-social-btn--sa:hover {
    background: var(--color-gold);
    color: var(--color-black);
}

/* Portrait */
.ap-hero-photo-wrap {
    position: relative;
    align-self: flex-end;
}
.ap-hero-photo {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
}
.ap-hero-photo-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255,255,255,0.12);
}

/* Photo credit overlays */
.ap-photo-credit {
    position: absolute;
    bottom: 0.4rem;
    right: 0.4rem;
    font-size: 0.62rem;
    color: rgba(255,255,255,0.55);
    background: rgba(0,0,0,0.45);
    padding: 0.15rem 0.35rem;
    border-radius: 2px;
    pointer-events: none;
    white-space: nowrap;
}
.ap-hero-credit {
    position: absolute;
    bottom: 0.5rem;
    left: 0.75rem;
    font-size: 0.62rem;
    color: rgba(255,255,255,0.35);
    pointer-events: none;
    white-space: nowrap;
    z-index: 2;
}

/* --- Stats Strip --- */
.ap-stats-strip {
    background: var(--color-gold);
    padding: 0;
}
.ap-stats-inner {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: none;
}
.ap-stats-inner::-webkit-scrollbar { display: none; }
.ap-stat {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1.1rem 1.5rem;
    border-right: 1px solid rgba(0,0,0,0.1);
    text-align: center;
}
.ap-stat:last-child { border-right: none; }
.ap-stat-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(0,0,0,0.52);
}
.ap-stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-black);
}
.ap-stat-value small {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.6;
    margin-left: 0.2rem;
}

/* --- Content --- */
.ap-content { padding: 2.5rem 0 2rem; }
.ap-section { margin-bottom: 2.5rem; padding: 0; }
.ap-section-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.ap-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-grey-200);
    max-width: 56px;
}
.ap-bio-text {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--color-grey-700);
    max-width: 65ch;
}

/* Results Grid */
.ap-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.875rem;
}
.ap-result-card {
    background: var(--color-grey-100);
    border-radius: var(--radius);
    padding: 1.1rem 1.4rem;
    border: 1px solid var(--color-grey-200);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.ap-result-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.ap-result-year {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    background: var(--color-black);
    color: var(--color-gold);
    padding: 0.2rem 0.55rem;
    border-radius: 2px;
    width: fit-content;
}
.ap-result-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-grey-700);
    line-height: 1.5;
}

/* --- Swiss Athletics Bestleistungen --- */
.ap-sa-source-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--color-black);
    color: var(--color-gold);
    padding: 0.2rem 0.55rem;
    border-radius: 2px;
    margin-left: 0.6rem;
    vertical-align: middle;
}
.ap-sa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1px;
    background: var(--color-grey-200);
    border: 1px solid var(--color-grey-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.ap-sa-card {
    background: var(--color-black);
    padding: 1.4rem 1.5rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    transition: background var(--transition);
}
.ap-sa-card:hover { background: #141414; }
.ap-sa-discipline {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-gold);
}
.ap-sa-perf-row {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.ap-sa-perf {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--color-white);
    line-height: 1;
}
.ap-sa-unit {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.02em;
}
.ap-sa-wind {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255,255,255,0.28);
    margin-left: 0.15rem;
}
.ap-sa-date {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
}
.ap-sa-meta {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.32);
    margin-top: 0.5rem;
    line-height: 1.4;
}
.ap-sa-footer { margin-top: 1.1rem; }
.ap-sa-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-grey-400);
    border-bottom: 1px solid var(--color-grey-200);
    transition: color var(--transition), border-color var(--transition);
}
.ap-sa-link:hover { color: var(--color-gold); border-color: var(--color-gold); }

/* Footer Bar */
.ap-footer-bar {
    padding: 3rem 0 5rem;
    border-top: 1px solid var(--color-grey-200);
    margin-top: 1rem;
}
.ap-footer-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ap-javelin-badge {
    font-size: 0.9rem;
    color: var(--color-grey-400);
    font-weight: 400;
    letter-spacing: 0.01em;
}
.ap-javelin-badge strong {
    color: var(--color-black);
    font-weight: 700;
}

/* Make athlete cards linkable */
.athlete-card-link { display: block; color: inherit; text-decoration: none; }
.athlete-card-link:hover .athlete-card { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Stretched link: name-link covers the full card */
.athlete-card-name > a { color: inherit; text-decoration: none; }
.athlete-card-name > a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
/* Social icons must sit above the stretched link overlay */
.athlete-card-social { position: relative; z-index: 2; }

/* Athlete card social icons (team grid) */
.athlete-card-social {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.875rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-grey-200);
}
.athlete-card-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-grey-100);
    color: var(--color-grey-400);
    transition: background var(--transition), color var(--transition);
}
.athlete-card-social-link:hover {
    background: var(--color-gold);
    color: var(--color-white);
}

/* Feed post embeds */
.feed-card--embed { padding: 0.75rem; }
.feed-card--embed .feed-card-header { padding: 0 0.5rem 0.5rem; margin-bottom: 0; }
.feed-embed-wrap {
    width: 100%;
    min-height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-grey-100);
    display: flex;
    align-items: stretch;
}
.feed-embed-wrap--tiktok { min-height: 560px; }
.feed-embed-iframe { width: 100%; min-height: 400px; border: 0; display: block; }
.feed-embed-iframe--tiktok { min-height: 560px; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .ap-hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .ap-hero-photo-wrap {
        order: -1;
        max-height: 55vw;
        overflow: hidden;
    }
    .ap-hero-photo {
        aspect-ratio: 4/3;
        object-position: center 20%;
        border-radius: var(--radius-lg);
        -webkit-mask-image: none;
        mask-image: none;
    }
    .ap-hero-text {
        padding-top: 1.5rem;
        padding-bottom: 2.5rem;
    }
    .ap-hero-name {
        font-size: clamp(2.2rem, 9vw, 3.5rem);
    }
    .ap-results-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ap-footer-bar-inner {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
}
@media (max-width: 480px) {
    .ap-results-grid { grid-template-columns: 1fr; }
    .ap-stat { min-width: 100px; padding: 0.9rem 1rem; }
}

/* ============================================================
   Apply Page
   ============================================================ */
.apply-page {}
.apply-hero {
    background: var(--color-black);
    color: var(--color-white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    position: relative;
    overflow: hidden;
}
.apply-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 50%, rgba(201,168,76,0.1) 0%, transparent 60%);
    pointer-events: none;
}
.apply-hero .container { position: relative; z-index: 1; }
.apply-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1rem;
}
.apply-hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    max-width: 52ch;
    margin-bottom: 2.5rem;
}
.apply-hero-sub strong { color: var(--color-gold); }

/* Journey steps bar */
.apply-steps-bar {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.apply-step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.apply-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    transition: all 0.2s;
    flex-shrink: 0;
}
.apply-step-item.active .apply-step-num {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-black);
}
.apply-step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
}
.apply-step-item.active .apply-step-label { color: var(--color-white); }
.apply-step-connector {
    width: 24px;
    height: 1px;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
    margin: 0 0.25rem;
}
@media (max-width: 600px) {
    .apply-step-connector { width: 12px; }
    .apply-step-label { display: none; }
}

/* Form sections */
.apply-form { display: flex; flex-direction: column; gap: 0; }
.apply-section {
    background: var(--color-white);
    border: 1px solid var(--color-grey-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.25rem;
}
.apply-section-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-grey-100);
}
.apply-section-num {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--color-gold);
    background: rgba(201,168,76,0.08);
    padding: 0.3rem 0.55rem;
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
}
.apply-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}
.apply-section-sub {
    font-size: 0.825rem;
    color: var(--color-grey-400);
}
.required-star {
    color: var(--color-error);
    font-style: normal;
}

/* Input with prefix icon */
.input-with-prefix {
    position: relative;
}
.input-with-prefix .input-prefix {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-grey-400);
    pointer-events: none;
    display: flex;
    align-items: center;
}
.input-with-prefix .form-input {
    padding-left: 2.5rem;
}

/* Submit row */
.apply-submit-row {
    background: var(--color-grey-100);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.apply-legal {
    font-size: 0.78rem;
    color: var(--color-grey-400);
    max-width: 42ch;
}
.apply-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .apply-section { padding: 1.25rem; }
    .apply-submit-row { flex-direction: column; align-items: flex-start; }
}


/* ============================================================
   Instagram Grid (Sprint 13)
   Used on: home.php (ig-grid--home) + athlete-detail.php (ap-ig-section)
   ============================================================ */

/* -- Shared grid layout -- */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-top: 2rem;
}

/* Athlete detail: 3 columns */
.ap-ig-section .ig-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 720px;
}

/* Homepage: 4 columns, wider */
.ig-grid--home {
    grid-template-columns: repeat(4, 1fr);
}

/* -- Each post cell -- */
.ig-post {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--color-grey-100);
    border-radius: 2px;
    /* Force square aspect ratio */
    aspect-ratio: 1 / 1;
    text-decoration: none;
    color: inherit;
}

.ig-post-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* -- Hover overlay with link icon -- */
.ig-post-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ig-post:hover .ig-post-overlay,
.ig-post:focus-visible .ig-post-overlay {
    opacity: 1;
}

.ig-post:hover .ig-post-thumb,
.ig-post:focus-visible .ig-post-thumb {
    transform: scale(1.04);
    filter: brightness(0.85);
}

/* -- Caption strip (homepage only) -- */
.ig-post-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.6rem 0.45rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ig-grid--home .ig-post:hover .ig-post-caption,
.ig-grid--home .ig-post:focus-visible .ig-post-caption {
    opacity: 1;
}

.ig-post-athlete {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.ig-post-disc {
    font-size: 0.65rem;
    opacity: 0.8;
    line-height: 1.2;
}

/* -- Athlete detail: section header extras -- */
.ap-ig-section .ap-section-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ap-ig-icon {
    flex-shrink: 0;
    color: var(--color-gold);
}

.ap-ig-more {
    margin-top: 1rem;
    font-size: 0.82rem;
}

/* -- Responsive -- */
@media (max-width: 900px) {
    .ig-grid--home {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .ig-grid,
    .ig-grid--home,
    .ap-ig-section .ig-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 420px) {
    .ig-grid,
    .ig-grid--home,
    .ap-ig-section .ig-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   Sprint 14 — Additional public utilities
   ============================================================ */

/* --- Section padding variants --- */
.section--compact-top { padding-top: 2.25rem; }

/* --- Dark section (CTA) --- */
.section--dark { background: var(--color-black); color: var(--color-white); }
.cta-box {
    max-width: 680px;
    margin-inline: auto;
    text-align: center;
    padding-block: var(--spacing-xl);
}
.text-on-dark       { color: var(--color-white); }
.text-on-dark-muted { color: rgba(255,255,255,0.65); }
.text-on-dark-faint { font-size: 0.8rem; color: rgba(255,255,255,0.35); }

/* --- Inline SVG icon --- */
.inline-icon { display: inline-block; vertical-align: -2px; margin-left: 4px; }

/* --- Additional spacing --- */
.mb-lg { margin-bottom: var(--spacing-lg); }
