/* ==========================================================================
   TradeTech Split-Screen Application Shell & Component Styling (Mobile-First)
   ========================================================================== */

:root {
    --tt-ink: #0F1B2E;
    --tt-band: #16233A;
    --tt-deep: #050E1E;
    --tt-accent: #E0B62E;
    --tt-accent-hi: #E7C55F;
    --tt-ember: #E8A33D;
    --tt-white: #FFFFFF;
    --tt-fg-mute: rgba(255, 255, 255, 0.65);
    --tt-line: rgba(255, 255, 255, 0.08);
    --tt-line-mid: rgba(255, 255, 255, 0.15);
    --tt-success: #4ADE80;
    --tt-font-sans: 'Tajawal', 'Inter', system-ui, -apple-system, sans-serif;
    --tt-font-serif: 'Fraunces', Georgia, serif;
    --tt-font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html, body.ap-page {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: var(--tt-ink);
    color: var(--tt-white);
    font-family: var(--tt-font-sans);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* Full-Screen Split Layout Shell - Mobile First */
.ap-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
}

.ap-shell {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    width: 100%;
}

@media (min-width: 992px) {
    .ap-main {
        justify-content: center;
    }

    .ap-shell {
        grid-template-columns: 450px 1fr;
    }
}

@media (min-width: 1280px) {
    .ap-shell {
        grid-template-columns: 550px 1fr;
    }
}

@media (min-width: 1440px) {
    .ap-shell {
        grid-template-columns: 650px 1fr;
    }
}

/* -------------------------------------------------- LEFT SIDEBAR RAIL */
.ap-rail {
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: var(--tt-band);
    border-bottom: 1px solid var(--tt-line-mid);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

@media (min-width: 992px) {
    .ap-rail {
        border-bottom: none;
        border-right: 1px solid var(--tt-line-mid);
        padding: 2.5rem 2rem;
    }
}

.ap-rail::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 19, 39, 0.85) 0%, rgba(7, 19, 39, 0.96) 100%), url('/images/app-form.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
    filter: grayscale(20%);
}

.ap-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--tt-white);
    margin-bottom: 0;
}

.ap-brand-name {
    font-family: var(--tt-font-serif);
    font-size: 1.15rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .ap-brand-name {
        font-size: 1.25rem;
    }
}

.ap-brand-name em {
    font-style: normal;
    color: var(--tt-accent);
}

.ap-brand-sub {
    display: block;
    font-family: var(--tt-font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    color: var(--tt-fg-mute);
}

@media (min-width: 768px) {
    .ap-brand-sub {
        font-size: 0.625rem;
    }
}

.ap-rail-account {
    background: rgba(5, 14, 30, 0.75);
    border: 1px solid var(--tt-line);
    padding: 0.75rem 0.875rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

@media (min-width: 992px) {
    .ap-rail-account {
        padding: 0.875rem 1rem;
        margin-bottom: 1.25rem;
        margin-top: 0;
    }
}

.ap-rail-account small {
    display: block;
    font-size: 0.7rem;
    color: var(--tt-fg-mute);
    font-family: var(--tt-font-mono);
}

.ap-rail-account strong {
    font-size: 0.8125rem;
    color: var(--tt-accent-hi);
    word-break: break-all;
}

@media (min-width: 768px) {
    .ap-rail-account strong {
        font-size: 0.875rem;
    }
}

/* Vertical Steps Navigation */
.ap-rail-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

@media (min-width: 992px) {
    .ap-rail-nav {
        gap: 0.5rem;
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.ap-rail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    border-radius: 10px;
    border: 1px solid transparent;
    color: var(--tt-fg-mute);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .ap-rail-item {
        gap: 1rem;
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
        white-space: normal;
    }
}

.ap-rail-item i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--tt-deep);
    border: 1px solid var(--tt-line-mid);
    color: var(--tt-fg-mute);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--tt-font-mono);
    font-size: 0.75rem;
    font-style: normal;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .ap-rail-item i {
        width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }
}

.ap-rail-item:hover:not(.is-locked) {
    background: rgba(255, 255, 255, 0.04);
    color: var(--tt-white);
}

.ap-rail-item.is-current {
    background: var(--tt-deep);
    border-color: var(--tt-accent);
    color: var(--tt-white);
}

    .ap-rail-item.is-current i {
        background: var(--tt-accent);
        color: var(--tt-ink);
        border-color: var(--tt-accent);
        font-weight: 700;
    }

.ap-rail-item.is-done {
    color: var(--tt-accent-hi);
}

    .ap-rail-item.is-done i {
        background: rgba(224, 182, 46, 0.15);
        color: var(--tt-accent);
        border-color: var(--tt-accent);
    }

.ap-rail-item.is-locked {
    opacity: 0.35;
    cursor: not-allowed;
}

.ap-rail-note {
    font-size: 0.78rem;
    color: var(--tt-fg-mute);
    line-height: 1.4;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--tt-line);
    display: none;
}

@media (min-width: 992px) {
    .ap-rail-note {
        font-size: 0.8125rem;
        line-height: 1.5;
        padding-top: 1.25rem;
        display: block;
    }
}

/* -------------------------------------------------- RIGHT CONTENT PANEL */
.ap-panel {
    background: var(--tt-ink);
    padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 5vw, 4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
    width: 100%;
}

@media (min-width: 992px) {
    .ap-panel {
        padding: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 6vw, 6rem);
        max-width: 900px;
    }
}

.ap-eyebrow {
    font-family: var(--tt-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--tt-ember);
    display: block;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .ap-eyebrow {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }
}

.ap-title {
    font-family: var(--tt-font-serif);
    font-size: clamp(1.65rem, 3.5vw, 2.75rem);
    font-weight: 700;
    color: var(--tt-white);
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .ap-title {
        margin: 0 0 0.875rem 0;
        line-height: 1.25;
    }
}

.ap-desc {
    font-size: 0.95rem;
    color: var(--tt-accent-hi);
    margin: 0 0 1.75rem 0;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .ap-desc {
        font-size: 1.0625rem;
        margin: 0 0 2.5rem 0;
        line-height: 1.6;
    }
}

.ap-rule {
    border: 0;
    border-top: 1px solid var(--tt-line-mid);
    margin: 1.5rem 0;
}

@media (min-width: 768px) {
    .ap-rule {
        margin: 2rem 0;
    }
}

/* -------------------------------------------------- HUB & APPLICATIONS DASHBOARD */
.ap-hub {
    width: 100%;
    max-width: 880px;
    padding: clamp(1.5rem, 4vw, 4.5rem) 1rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .ap-hub {
        padding: clamp(2.5rem, 5vw, 4.5rem) 2rem;
    }
}

.ap-hub-head {
    font-family: var(--tt-font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--tt-white);
    margin: 1.5rem 0 0.35rem 0;
}

@media (min-width: 768px) {
    .ap-hub-head {
        font-size: 1.35rem;
        margin: 2.25rem 0 0.5rem 0;
    }
}

.ap-hub-note {
    font-size: 0.8125rem;
    color: var(--tt-fg-mute);
    margin: 0 0 1rem 0;
}

@media (min-width: 768px) {
    .ap-hub-note {
        font-size: 0.875rem;
        margin: 0 0 1.25rem 0;
    }
}

.ap-files {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .ap-files {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.25rem;
        margin-top: 1rem;
        margin-bottom: 1.5rem;
    }
}

.ap-file {
    background: rgba(22, 35, 58, 0.4);
    border: 1px solid var(--tt-line-mid);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    color: var(--tt-white);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

@media (min-width: 768px) {
    .ap-file {
        padding: 1.25rem 1.5rem;
    }
}

.ap-file:hover {
    background: var(--tt-band);
    border-color: var(--tt-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ap-file-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .ap-file-top {
        margin-bottom: 1rem;
    }
}

.ap-file-status {
    font-family: var(--tt-font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(224, 182, 46, 0.15);
    color: var(--tt-accent);
    border: 1px solid var(--tt-line-mid);
}

@media (min-width: 768px) {
    .ap-file-status {
        font-size: 0.6875rem;
        padding: 0.25rem 0.625rem;
    }
}

.ap-file-status.is-draft {
    background: rgba(232, 163, 61, 0.15);
    color: var(--tt-ember);
    border-color: rgba(232, 163, 61, 0.3);
}

.ap-file-progress {
    font-family: var(--tt-font-mono);
    font-size: 0.7rem;
    color: var(--tt-fg-mute);
}

@media (min-width: 768px) {
    .ap-file-progress {
        font-size: 0.75rem;
    }
}

.ap-file-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tt-white);
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .ap-file-title {
        font-size: 1.125rem;
        margin-bottom: 0.35rem;
    }
}

.ap-file-sub {
    font-size: 0.8125rem;
    color: var(--tt-fg-mute);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .ap-file-sub {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }
}

.ap-file-meta {
    font-family: var(--tt-font-mono);
    font-size: 0.7rem;
    color: var(--tt-accent);
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .ap-file-meta {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }
}

.ap-file-go {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--tt-accent-hi);
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: gap 0.2s ease;
}

@media (min-width: 768px) {
    .ap-file-go {
        font-size: 0.875rem;
    }
}

.ap-file:hover .ap-file-go {
    gap: 0.6rem;
    color: var(--tt-white);
}

/* Choice Cards */
.ap-choices {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .ap-choices {
        gap: 1rem;
        margin-bottom: 2rem;
    }
}

.ap-choice {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.125rem;
    background: rgba(22, 35, 58, 0.5);
    border: 1px solid var(--tt-line-mid);
    border-radius: 12px;
    color: var(--tt-white);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .ap-choice {
        gap: 1.25rem;
        padding: 1.25rem 1.5rem;
    }
}

.ap-choice:hover {
    background: var(--tt-band);
    border-color: var(--tt-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.ap-choice > i {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--tt-deep);
    border: 1px solid var(--tt-line);
    color: var(--tt-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-style: normal;
}

@media (min-width: 768px) {
    .ap-choice > i {
        width: 44px;
        height: 44px;
    }
}

.ap-choice > span {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

@media (min-width: 768px) {
    .ap-choice > span {
        gap: 0.25rem;
    }
}

.ap-choice b {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tt-white);
    display: block;
}

@media (min-width: 768px) {
    .ap-choice b {
        font-size: 1rem;
    }
}

.ap-choice-sub {
    font-size: 0.8125rem;
    color: var(--tt-fg-mute);
    line-height: 1.4;
    display: block;
}

@media (min-width: 768px) {
    .ap-choice-sub {
        font-size: 0.875rem;
    }
}

.ap-choice > em {
    font-size: 1.1rem;
    font-style: normal;
    color: var(--tt-accent);
    transition: transform 0.2s ease;
}

@media (min-width: 768px) {
    .ap-choice > em {
        font-size: 1.25rem;
    }
}

.ap-choice:hover > em {
    transform: translateX(4px);
    color: var(--tt-white);
}

/* -------------------------------------------------- CHECKLIST & DECLARATIONS */
.ap-check-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .ap-check-list {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
}

.ap-check {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.125rem;
    background: rgba(22, 35, 58, 0.4);
    border: 1px solid var(--tt-line-mid);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .ap-check {
        gap: 1.25rem;
        padding: 1.25rem 1.5rem;
    }
}

.ap-check:hover {
    background: var(--tt-band);
    border-color: var(--tt-accent);
}

.ap-check.is-bad {
    border-color: var(--tt-ember);
    background: rgba(232, 163, 61, 0.08);
}

.ap-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ap-check-box {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--tt-line-mid);
    background: var(--tt-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .ap-check-box {
        width: 24px;
        height: 24px;
        margin-top: 0.125rem;
    }
}

.ap-check-box svg {
    stroke: transparent;
    transition: stroke 0.2s ease;
}

.ap-check input[type="checkbox"]:checked + input[type="hidden"] + .ap-check-box,
.ap-check input[type="checkbox"]:checked ~ .ap-check-box {
    background: var(--tt-accent);
    border-color: var(--tt-accent);
}

    .ap-check input[type="checkbox"]:checked + input[type="hidden"] + .ap-check-box svg,
    .ap-check input[type="checkbox"]:checked ~ .ap-check-box svg {
        stroke: var(--tt-ink);
    }

.ap-check-text {
    font-size: 0.875rem;
    color: var(--tt-white);
    line-height: 1.5;
}

@media (min-width: 768px) {
    .ap-check-text {
        font-size: 0.9375rem;
        line-height: 1.55;
    }
}

/* Governance / Terms Note Box */
.ap-gov-note {
    margin: 1.25rem 0 0;
    padding: 1rem 1.125rem;
    border-radius: 12px;
    background: rgba(22, 35, 58, 0.4);
    border: 1px solid var(--tt-line-mid);
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--tt-fg-mute);
}

@media (min-width: 768px) {
    .ap-gov-note {
        margin: 1.5rem 0 0;
        padding: 1.125rem 1.35rem;
        font-size: 0.875rem;
        line-height: 1.65;
    }
}

/* -------------------------------------------------- DONE / CONFIRMATION PAGE */
.ap-done {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 4rem) 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .ap-done {
        padding: clamp(2rem, 5vw, 4rem) 1.5rem;
    }
}

.ap-done-inner {
    max-width: 760px;
    width: 100%;
    background: var(--tt-band);
    border: 1px solid var(--tt-line-mid);
    border-radius: 16px;
    padding: clamp(1.5rem, 4vw, 3.5Refrem);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

@media (min-width: 768px) {
    .ap-done-inner {
        border-radius: 20px;
        padding: clamp(2rem, 5vw, 3.5rem);
    }
}

.ap-done-mark {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .ap-done-mark {
        width: 64px;
        height: 64px;
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }
}

.ap-done h1 {
    font-family: var(--tt-font-serif);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--tt-white);
    margin: 0 0 0.75rem 0;
}

@media (min-width: 768px) {
    .ap-done h1 {
        margin: 0 0 0.875rem 0;
    }
}

.ap-done h2 {
    font-family: var(--tt-font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--tt-white);
    margin: 1.75rem 0 0.5rem 0;
}

@media (min-width: 768px) {
    .ap-done h2 {
        font-size: 1.35rem;
        margin: 2.25rem 0 0.75rem 0;
    }
}

.ap-done-lede {
    font-size: 0.95rem;
    color: var(--tt-accent-hi);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .ap-done-lede {
        font-size: 1.0625rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }
}

.ap-done-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.875rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .ap-done-cards {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
        margin-bottom: 2.5rem;
    }
}

.ap-done-cards > div {
    background: var(--tt-deep);
    border: 1px solid var(--tt-line-mid);
    padding: 1rem 1.125rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .ap-done-cards > div {
        padding: 1.125rem 1.25rem;
        gap: 0.35rem;
    }
}

.ap-done-cards small {
    font-family: var(--tt-font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tt-fg-mute);
}

@media (min-width: 768px) {
    .ap-done-cards small {
        font-size: 0.6875rem;
    }
}

.ap-done-cards b {
    font-size: 0.95rem;
    color: var(--tt-white);
}

@media (min-width: 768px) {
    .ap-done-cards b {
        font-size: 1rem;
    }
}

.ap-ref {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .ap-ref {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.ap-ref b {
    font-family: var(--tt-font-mono);
    color: var(--tt-accent-hi);
    word-break: break-all;
}

.ap-pipeline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .ap-pipeline {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.25rem;
        margin-bottom: 2rem;
    }
}

.ap-pipeline > div {
    background: rgba(5, 14, 30, 0.5);
    border: 1px solid var(--tt-line);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

@media (min-width: 768px) {
    .ap-pipeline > div {
        padding: 1.25rem;
        gap: 0.5rem;
    }
}

.ap-pipeline i {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--tt-accent);
    color: var(--tt-ink);
    font-family: var(--tt-font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    font-style: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .ap-pipeline i {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
}

.ap-pipeline b {
    font-size: 0.875rem;
    color: var(--tt-white);
}

@media (min-width: 768px) {
    .ap-pipeline b {
        font-size: 0.9375rem;
    }
}

.ap-pipeline p {
    font-size: 0.78rem;
    color: var(--tt-fg-mute);
    line-height: 1.4;
    margin: 0;
}

@media (min-width: 768px) {
    .ap-pipeline p {
        font-size: 0.8125rem;
        line-height: 1.5;
    }
}

.ap-privacy {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(224, 182, 46, 0.08);
    border: 1px solid var(--tt-line-mid);
    border-radius: 12px;
    color: var(--tt-accent-hi);
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .ap-privacy {
        gap: 0.875rem;
        padding: 1rem 1.25rem;
        font-size: 0.875rem;
        line-height: 1.55;
        margin-bottom: 2rem;
    }
}

.ap-privacy svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: var(--tt-accent);
}

.ap-done-actions {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .ap-done-actions {
        flex-direction: row;
        gap: 0.875rem;
    }
}

.ap-fineprint {
    font-size: 0.7rem;
    color: var(--tt-fg-mute);
    line-height: 1.4;
    margin: 0;
}

@media (min-width: 768px) {
    .ap-fineprint {
        font-size: 0.75rem;
        line-height: 1.5;
    }
}

/* -------------------------------------------------- FORM ACTIONS (FOOTER) */
.ap-nav {
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.875rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--tt-line);
}

@media (min-width: 640px) {
    .ap-nav {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        margin-top: 3rem;
        padding-top: 1.5rem;
    }
}

.ap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8125rem 1.5rem;
    border-radius: 999px;
    font-family: var(--tt-font-sans);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    width: 100%;
}

@media (min-width: 640px) {
    .ap-btn {
        padding: 0.875rem 2rem;
        font-size: 0.9375rem;
        width: auto;
    }
}

.ap-btn-primary {
    background: var(--tt-white);
    color: var(--tt-ink);
}

    .ap-btn-primary:hover:not(:disabled) {
        background: var(--tt-accent-hi);
        transform: translateY(-1px);
    }

.ap-btn-quiet {
    background: transparent;
    border: 1px solid var(--tt-line-mid);
    color: var(--tt-white);
}

    .ap-btn-quiet:hover {
        border-color: var(--tt-accent);
        background: rgba(255, 255, 255, 0.05);
    }

.ap-btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--tt-accent);
    text-decoration: none;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

@media (min-width: 768px) {
    .ap-btn-link {
        font-size: 0.875rem;
    }
}

.ap-btn-link:hover {
    color: var(--tt-white);
    text-decoration: underline;
}

/* ==========================================================================
   Form Controls, Inputs & Fields
   ========================================================================== */

.ap-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
}

@media (min-width: 768px) {
    .ap-fieldset {
        margin: 0 0 1.5rem 0;
    }
}

.ap-legend, .ap-section-head {
    font-family: var(--tt-font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tt-white);
    margin-bottom: 0.4rem;
}

@media (min-width: 768px) {
    .ap-legend, .ap-section-head {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
}

.ap-legend i {
    color: var(--tt-ember);
    font-style: normal;
}

.ap-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .ap-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

        .ap-grid .is-wide {
            grid-column: span 2;
        }
}

.ap-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

@media (min-width: 768px) {
    .ap-field {
        gap: 0.35rem;
    }
}

.ap-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tt-white);
}

@media (min-width: 768px) {
    .ap-label {
        font-size: 0.875rem;
    }
}

.ap-label i {
    color: var(--tt-ember);
    font-style: normal;
}

.ap-input,
.ap-select,
.ap-area {
    width: 100%;
    padding: 0.7rem 0.875rem;
    background: var(--tt-deep);
    border: 1px solid var(--tt-line-mid);
    border-radius: 8px;
    color: var(--tt-white);
    font-family: var(--tt-font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
    .ap-input,
    .ap-select,
    .ap-area {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }
}

.ap-input:focus,
.ap-select:focus,
.ap-area:focus {
    border-color: var(--tt-accent);
    box-shadow: 0 0 0 3px rgba(224, 182, 46, 0.15);
}

.ap-input.is-bad,
.ap-select.is-bad,
.ap-area.is-bad {
    border-color: var(--tt-ember);
}

.ap-hint {
    font-size: 0.72rem;
    color: var(--tt-fg-mute);
    line-height: 1.4;
}

@media (min-width: 768px) {
    .ap-hint {
        font-size: 0.78rem;
    }
}

.ap-err {
    font-size: 0.72rem;
    color: var(--tt-ember);
}

@media (min-width: 768px) {
    .ap-err {
        font-size: 0.78rem;
    }
}

.ap-count {
    font-family: var(--tt-font-mono);
    font-size: 0.7rem;
    color: var(--tt-fg-mute);
    text-align: right;
}

@media (min-width: 768px) {
    .ap-count {
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   Applicant Services & Radio Selection
   ========================================================================== */

.ap-services {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.875rem;
    margin-top: 0.75rem;
}

@media (min-width: 640px) {
    .ap-services {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1rem;
        margin-top: 1rem;
    }
}

.ap-service {
    background: rgba(22, 35, 58, 0.4);
    border: 1px solid var(--tt-line-mid);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .ap-service {
        padding: 1.25rem;
        gap: 0.35rem;
    }
}

.ap-service:hover {
    background: var(--tt-band);
    border-color: var(--tt-accent);
}

.ap-service input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.ap-service:has(input:checked) {
    background: var(--tt-band);
    border-color: var(--tt-accent);
    box-shadow: 0 0 0 1px var(--tt-accent);
}

.ap-service-name {
    font-weight: 700;
    color: var(--tt-white);
    font-size: 0.95rem;
}

@media (min-width: 768px) {
    .ap-service-name {
        font-size: 1rem;
    }
}

.ap-service-desc {
    font-size: 0.78rem;
    color: var(--tt-fg-mute);
    line-height: 1.4;
}

@media (min-width: 768px) {
    .ap-service-desc {
        font-size: 0.8125rem;
    }
}

.ap-service-meta {
    font-family: var(--tt-font-mono);
    font-size: 0.7rem;
    color: var(--tt-accent);
    margin-top: auto;
}

@media (min-width: 768px) {
    .ap-service-meta {
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   File Upload Block
   ========================================================================== */

.ap-upload {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem;
    background: var(--tt-deep);
    border: 1.5px dashed var(--tt-line-mid);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .ap-upload {
        gap: 1rem;
        padding: 1.25rem;
        margin-top: 0.75rem;
    }
}

.ap-upload:hover {
    border-color: var(--tt-accent);
}

.ap-upload input[type="file"] {
    display: none;
}

.ap-upload svg {
    color: var(--tt-accent);
    flex-shrink: 0;
}

.ap-upload span {
    display: flex;
    flex-direction: column;
}

.ap-upload b {
    color: var(--tt-white);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .ap-upload b {
        font-size: 0.9375rem;
    }
}

.ap-upload span span {
    font-size: 0.72rem;
    color: var(--tt-fg-mute);
}

@media (min-width: 768px) {
    .ap-upload span span {
        font-size: 0.78rem;
    }
}

/* ==========================================================================
   Review Summary & Readonly Layouts
   ========================================================================== */

.ap-review {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .ap-review {
        gap: 1.5rem;
    }
}

.ap-review > div {
    background: var(--tt-band);
    border: 1px solid var(--tt-line-mid);
    border-radius: 12px;
    padding: 1rem 1.125rem;
}

@media (min-width: 768px) {
    .ap-review > div {
        padding: 1.25rem 1.5rem;
    }
}

.ap-review-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    font-weight: 700;
    color: var(--tt-white);
    border-bottom: 1px solid var(--tt-line);
    padding-bottom: 0.6rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .ap-review-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding-bottom: 0.75rem;
        margin-bottom: 0.875rem;
    }
}

.ap-review-head a {
    color: var(--tt-accent);
    text-decoration: none;
    font-size: 0.8125rem;
}

@media (min-width: 768px) {
    .ap-review-head a {
        font-size: 0.875rem;
    }
}

.ap-review-head a:hover {
    text-decoration: underline;
}

.ap-review dl {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 0;
}

@media (min-width: 640px) {
    .ap-review dl {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }
}

.ap-review dt {
    font-size: 0.72rem;
    font-family: var(--tt-font-mono);
    color: var(--tt-fg-mute);
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .ap-review dt {
        font-size: 0.78rem;
    }
}

.ap-review dd {
    margin: 0;
    font-size: 0.875rem;
    color: var(--tt-white);
    word-break: break-word;
}

@media (min-width: 768px) {
    .ap-review dd {
        font-size: 0.9375rem;
    }
}

.ap-review dd.is-empty {
    color: var(--tt-fg-mute);
    font-style: italic;
}

/* ==========================================================================
   Challenge Card & Readiness Module
   ========================================================================== */

.ap-challenge {
    background: var(--tt-deep);
    border: 1px solid var(--tt-line-mid);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

@media (min-width: 768px) {
    .ap-challenge {
        padding: 1.25rem;
        gap: 0.5rem;
    }
}

.ap-challenge-cohort {
    font-family: var(--tt-font-mono);
    font-size: 0.7rem;
    color: var(--tt-ember);
}

@media (min-width: 768px) {
    .ap-challenge-cohort {
        font-size: 0.75rem;
    }
}

.ap-challenge-title {
    font-weight: 700;
    color: var(--tt-white);
    font-size: 1rem;
}

@media (min-width: 768px) {
    .ap-challenge-title {
        font-size: 1.1rem;
    }
}

.ap-challenge-desc {
    font-size: 0.8125rem;
    color: var(--tt-fg-mute);
    line-height: 1.4;
}

@media (min-width: 768px) {
    .ap-challenge-desc {
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

.ap-challenge-why {
    font-size: 0.78rem;
    color: var(--tt-accent-hi);
}

@media (min-width: 768px) {
    .ap-challenge-why {
        font-size: 0.8125rem;
    }
}

.ap-challenge-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

@media (min-width: 768px) {
    .ap-challenge-tags {
        margin-top: 0.5rem;
    }
}

.ap-challenge-tags span {
    font-family: var(--tt-font-mono);
    font-size: 0.625rem;
    background: rgba(224, 182, 46, 0.12);
    color: var(--tt-accent);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
}

@media (min-width: 768px) {
    .ap-challenge-tags span {
        font-size: 0.6875rem;
        padding: 0.2rem 0.5rem;
    }
}

.ap-readiness-group {
    border: none;
    padding: 0;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .ap-readiness-group {
        margin-bottom: 1.5rem;
    }
}

.ap-readiness-legend {
    font-weight: 700;
    color: var(--tt-white);
    margin-bottom: 0.4rem;
}

@media (min-width: 768px) {
    .ap-readiness-legend {
        margin-bottom: 0.5rem;
    }
}

.ap-readiness-note {
    font-size: 0.78rem;
    color: var(--tt-fg-mute);
    margin-bottom: 0.6rem;
}

@media (min-width: 768px) {
    .ap-readiness-note {
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
    }
}

.ap-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .ap-chips {
        gap: 0.75rem;
    }
}

.ap-stage {
    padding: 0.4rem 1rem;
    background: var(--tt-deep);
    border: 1px solid var(--tt-line-mid);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--tt-white);
}

@media (min-width: 768px) {
    .ap-stage {
        padding: 0.5rem 1.25rem;
    }
}

.ap-stage:has(input:checked) {
    background: var(--tt-accent);
    color: var(--tt-ink);
    border-color: var(--tt-accent);
}

.ap-stage input {
    display: none;
}

.ap-reveal {
    display: none;
}

    .ap-reveal.is-open {
        display: block;
    }

.ap-readout {
    background: var(--tt-band);
    border: 1px solid var(--tt-line-mid);
    border-radius: 12px;
    padding: 1.125rem;
    margin-top: 1.25rem;
}

@media (min-width: 768px) {
    .ap-readout {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
}

.ap-readout dl {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.875rem;
    margin: 0 0 0.875rem 0;
}

@media (min-width: 640px) {
    .ap-readout dl {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
        margin: 0 0 1rem 0;
    }
}

.ap-readout dt {
    font-family: var(--tt-font-mono);
    font-size: 0.7rem;
    color: var(--tt-fg-mute);
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .ap-readout dt {
        font-size: 0.75rem;
    }
}

.ap-readout dd {
    margin: 0;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--tt-accent-hi);
}

@media (min-width: 768px) {
    .ap-readout dd {
        font-size: 1rem;
    }
}

.ap-readout-gaps {
    grid-column: 1 / -1;
}

    .ap-readout-gaps ul {
        margin: 0.35rem 0 0 1rem;
        padding: 0;
        color: var(--tt-fg-mute);
        font-size: 0.8125rem;
    }

@media (min-width: 768px) {
    .ap-readout-gaps ul {
        margin: 0.35rem 0 0 1.25rem;
        font-size: 0.875rem;
    }
}

.ap-readout-clarify, .ap-readout-note {
    font-size: 0.78rem;
    color: var(--tt-fg-mute);
    line-height: 1.4;
    margin: 0.4rem 0 0 0;
}

@media (min-width: 768px) {
    .ap-readout-clarify, .ap-readout-note {
        font-size: 0.8125rem;
        line-height: 1.5;
        margin: 0.5rem 0 0 0;
    }
}

/* ==========================================================================
   OTP Verification & Alert Notices
   ========================================================================== */

.ap-notice {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(232, 163, 61, 0.15);
    border: 1px solid rgba(232, 163, 61, 0.3);
    color: var(--tt-ember);
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .ap-notice {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }
}

.ap-notice.is-ok {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.3);
    color: var(--tt-success);
}

.ap-otp {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.5rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

@media (min-width: 400px) {
    .ap-otp {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }
}

.ap-otp input {
    width: 38px;
    height: 44px;
    text-align: center;
    font-family: var(--tt-font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    background: var(--tt-deep);
    border: 1px solid var(--tt-line-mid);
    color: var(--tt-white);
}

@media (min-width: 768px) {
    .ap-otp input {
        width: 44px;
        height: 52px;
        font-size: 1.25rem;
    }
}

.ap-inline-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--tt-fg-mute);
}

@media (min-width: 640px) {
    .ap-inline-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-top: 1.25rem;
        font-size: 0.875rem;
    }
}

.ap-devcode {
    font-family: var(--tt-font-mono);
    font-size: 0.7rem;
    color: var(--tt-ember);
    background: rgba(232, 163, 61, 0.1);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    margin-top: 0.75rem;
}

@media (min-width: 768px) {
    .ap-devcode {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        margin-top: 1rem;
    }
}

.ap-file-status-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .ap-file-status-row {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* ==========================================================================
   Sidebar Back to Home Button & Header Alignment
   ========================================================================== */

.ap-rail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .ap-rail-header {
        margin-bottom: 2rem;
    }
}

.ap-rail-header .ap-brand {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.ap-rail-home {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tt-line-mid, rgba(255, 255, 255, 0.1));
    color: var(--tt-fg-mute, #8a99ad);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .ap-rail-home {
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
}

.ap-rail-home:hover {
    background: rgba(224, 182, 46, 0.12);
    color: var(--tt-white, #ffffff);
    border-color: var(--tt-accent, #E0B62E);
    transform: translateY(-1px);
}

.ap-rail-home svg {
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.ap-rail-home:hover svg {
    transform: translateX(-3px);
}

/* ==========================================================================
   Centered Single-Line Legal Footer
   ========================================================================== */
.tt1-footer-legal {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--tt-line-mid, rgba(255, 255, 255, 0.1));
    background: var(--tt-deep, #071327);
    font-size: 0.72rem;
    color: var(--tt-fg-mute, #8a99ad);
    white-space: normal;
}

@media (min-width: 768px) {
    .tt1-footer-legal {
        padding: 1.25rem 1.5rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }
}

.tt1-footer-legal span {
    display: block;
    margin: 0 auto;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .tt1-footer-legal span {
        line-height: 1.2;
    }
}



/* ==========================================================================
   Validation Alert Summary Component (.ap-alert)
   ========================================================================== */

.ap-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    background: rgba(232, 163, 61, 0.08);
    border: 1px solid rgba(232, 163, 61, 0.3);
    border-left: 4px solid var(--tt-ember, #E8A33D);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
    width: 100%;
}

@media (min-width: 768px) {
    .ap-alert {
        gap: 1rem;
        padding: 1.25rem 1.5rem;
        margin-bottom: 2rem;
    }
}

/* Icon Alignment */
.ap-alert > svg {
    color: var(--tt-ember, #E8A33D);
    flex-shrink: 0;
    margin-top: 0.15rem;
    width: 19px;
    height: 19px;
}

@media (min-width: 768px) {
    .ap-alert > svg {
        width: 22px;
        height: 22px;
        margin-top: 0.1rem;
    }
}

/* Content Container */
.ap-alert > div {
    flex: 1;
    min-width: 0;
}

/* Bold Error Counter Heading */
.ap-alert b {
    display: block;
    font-family: var(--tt-font-serif, inherit);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tt-white, #FFFFFF);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

@media (min-width: 768px) {
    .ap-alert b {
        font-size: 1.05rem;
    }
}

/* Error List */
.ap-alert ul {
    margin: 0;
    padding-left: 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

@media (min-width: 768px) {
    .ap-alert ul {
        padding-left: 1.25rem;
        gap: 0.4rem;
    }
}

/* Individual Error Messages */
.ap-alert li {
    font-size: 0.8125rem;
    color: var(--tt-fg-mute, rgba(255, 255, 255, 0.75));
    line-height: 1.45;
}

    .ap-alert li::marker {
        color: var(--tt-ember, #E8A33D);
    }

@media (min-width: 768px) {
    .ap-alert li {
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   Unified Home & User Dropdown Menu Styles
   ========================================================================== */

.ap-home-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.ap-home-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: 240px;
    background: rgba(5, 14, 30, 0.95);
    border: 1px solid var(--tt-line-mid, rgba(255, 255, 255, 0.12));
    border-radius: 12px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

    .ap-home-dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

/* User Header Inside Dropdown */
.ap-dropdown-user-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.ap-dropdown-divider {
    height: 1px;
    background: var(--tt-line, rgba(255, 255, 255, 0.08));
    margin: 0.35rem 0.25rem;
}

/* Form wrapper reset inside dropdown */
.ap-home-dropdown-menu .ap-logout-form {
    margin: 0;
}

.ap-home-dropdown-menu .ap-logout-btn {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}
/* User Rail Menu Container */
.ap-rail-account-menu {
    background: rgba(5, 14, 30, 0.85);
    border: 1px solid var(--tt-line-mid);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.ap-user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--tt-line);
}

.ap-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--tt-band);
    border: 1px solid var(--tt-accent);
    color: var(--tt-accent-hi);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.ap-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ap-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tt-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ap-user-role {
    font-family: var(--tt-font-mono);
    font-size: 0.65rem;
    color: var(--tt-ember);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ap-user-dropdown-links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ap-user-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--tt-fg-mute);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

    .ap-user-link:hover {
        background: rgba(224, 182, 46, 0.08);
        color: var(--tt-white);
        border-color: var(--tt-line-mid);
    }

.ap-logout-form {
    margin: 0;
}

.ap-logout-btn {
    color: #FF6B60;
}

    .ap-logout-btn:hover {
        background: rgba(255, 107, 96, 0.1);
        color: #FF6B60;
        border-color: rgba(255, 107, 96, 0.25);
    }

/* The life left in the code on screen. Neutral while there is time, and only
   turning to the warning colour once the code is actually dead. */
.ap-countdown {
    margin: 0.75rem 0 0;
    font-size: 0.8125rem;
    color: var(--tt-fg-mute);
}

    .ap-countdown strong {
        font-family: var(--tt-font-mono);
        color: var(--tt-fg);
    }

    .ap-countdown.is-expired {
        color: var(--tt-ember);
    }

.ap-notice.is-bad {
    background: rgba(255, 107, 96, 0.12);
    border-color: rgba(255, 107, 96, 0.3);
    color: #FF6B60;
}

.ap-btn-link[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    text-decoration: none;
}
\n

/* The open cohort, stated on the way in. Neutral when nothing is open — a
   closed cohort is information, not a warning, because three of the four
   services take applications either way. */
.ap-round {
    margin: 0 0 1.5rem;
    padding: 1.125rem 1.25rem;
    border: 1px solid var(--tt-line-mid);
    border-left: 3px solid var(--tt-fg-mute);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

    .ap-round.is-open {
        border-left-color: var(--tt-accent);
        background: rgba(224, 182, 46, 0.08);
    }

.ap-round-kicker {
    margin: 0 0 0.35rem;
    font-family: var(--tt-font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tt-fg-mute);
}

.ap-round.is-open .ap-round-kicker {
    color: var(--tt-accent);
}

.ap-round-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
}

.ap-round-desc {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--tt-fg-mute);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.ap-round {
    background-color: #31405C; /* Slate Blue */
    color: #FFFFFF;
    border-left: 4px solid #E7C55F; /* Gold Accent */
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(15, 27, 46, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .ap-round.is-open {
        /* Additional styles for open state if needed */
        border-left-color: #E7C55F;
    }

.ap-round-kicker {
    font-family: 'Tajawal', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #E7C55F; /* Gold */
    margin-bottom: 0.5rem;
}

.ap-round-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 0.75rem 0;
}

.ap-round-desc {
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #E2E8F0; /* Light text for readability */
    margin: 0;
}


 
 
 