:root {
    --ttbg-navy: #142946;
    --ttbg-navy-2: #173653;
    --ttbg-cyan: #078eaa;
    --ttbg-cyan-bright: #08a9c4;
    --ttbg-ink: #142946;
    --ttbg-muted: #526071;
    --ttbg-soft-muted: #71808d;
    --ttbg-line: #e1e6eb;
    --ttbg-soft: #f5f8fa;
    --ttbg-white: #ffffff;
    --ttbg-danger: #a13b3b;
    --ttbg-success: #2f7555;
    --ttbg-card-radius: 12px;
    --ttbg-button-radius: 3px;
    --ttbg-shadow: 0 16px 45px rgba(20, 41, 70, 0.08);
    --ttbg-shadow-strong: 0 22px 55px rgba(20, 41, 70, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--ttbg-soft);
    color: var(--ttbg-ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }

h1,
h2,
h3,
.portal-display {
    font-family: "Oswald", "Arial Narrow", sans-serif;
    letter-spacing: -0.01em;
}

h1, h2, h3 { margin-top: 0; }

.container {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
}

.narrow { width: min(820px, calc(100% - 48px)); }

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--ttbg-line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 245px;
    max-width: 48vw;
    height: auto;
    image-rendering: auto;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-nav a,
.link-button {
    color: var(--ttbg-navy);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-nav a:hover,
.link-button:hover { color: var(--ttbg-cyan); }

.header-nav form { margin: 0; }

.link-button {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.header-cta {
    padding: 10px 15px !important;
    border: 1px solid var(--ttbg-navy);
    border-radius: var(--ttbg-button-radius);
}

.header-cta:hover {
    background: var(--ttbg-navy);
    color: #fff !important;
}

/* =========================================================
   FLASH MESSAGES
   ========================================================= */

.flash-stack { padding-top: 18px; }

.flash {
    border-radius: 6px;
    padding: 13px 16px;
    border: 1px solid var(--ttbg-line);
    background: var(--ttbg-white);
    box-shadow: 0 8px 24px rgba(20, 41, 70, 0.05);
}

.flash-error {
    border-color: #e4baba;
    color: var(--ttbg-danger);
}

.flash-success {
    border-color: #bddaca;
    color: var(--ttbg-success);
}

/* =========================================================
   PUBLIC MENTOR HERO
   Matches the current TTBG bridge / navy / cyan design language.
   ========================================================= */

.portal-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(255,255,255,.99) 0%, rgba(255,255,255,.96) 38%, rgba(255,255,255,.70) 58%, rgba(255,255,255,.08) 100%),
        url("https://images.squarespace-cdn.com/content/v1/69df17ff5ff7216364ddfe10/ed450474-ec9e-4bd4-ace9-8d378e653821/BackgroundImage.png") 68% center / cover no-repeat;
    border-bottom: 1px solid var(--ttbg-line);
}

.portal-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(20,41,70,0) 65%, rgba(20,41,70,.035) 100%);
}

.portal-hero-grid {
    position: relative;
    z-index: 1;
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(310px, .65fr);
    align-items: center;
    gap: clamp(48px, 6vw, 90px);
    padding: 64px 0;
}

.portal-hero-copy {
    max-width: 700px;
    padding: 6px 0;
}

.eyebrow {
    margin: 0 0 13px;
    color: var(--ttbg-cyan);
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: .69rem;
    line-height: 1.2;
    font-weight: 800;
}

.portal-hero h1 {
    max-width: 690px;
    margin: 0 0 22px;
    color: var(--ttbg-navy);
    font-size: clamp(3.15rem, 5vw, 4.9rem);
    line-height: .98;
    font-weight: 500;
    text-transform: uppercase;
}

.portal-hero h1 span {
    display: block;
    margin-top: 8px;
    color: var(--ttbg-cyan);
}

.hero-copy {
    max-width: 640px;
    margin: 0;
    color: #3f4c5a;
    font-size: .98rem;
    line-height: 1.72;
}

.hero-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 25px;
}

.hero-pill-row span {
    padding: 7px 10px;
    border: 1px solid rgba(20,41,70,.14);
    background: rgba(255,255,255,.72);
    color: var(--ttbg-navy);
    border-radius: 3px;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.hero-note {
    justify-self: end;
    width: min(100%, 390px);
    padding: 29px 30px;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(255,255,255,.95);
    border-left: 4px solid var(--ttbg-cyan);
    border-radius: var(--ttbg-card-radius);
    box-shadow: 0 22px 55px rgba(20, 41, 70, .14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hero-note-label {
    display: block;
    margin-bottom: 10px;
    color: var(--ttbg-cyan);
    font-size: .61rem;
    font-weight: 800;
    letter-spacing: .14em;
}

.hero-note strong {
    display: block;
    margin-bottom: 9px;
    color: var(--ttbg-navy);
    font-family: "Oswald", "Arial Narrow", sans-serif;
    font-size: 1.3rem;
    line-height: 1.25;
    font-weight: 500;
}

.hero-note p {
    margin: 0;
    color: var(--ttbg-muted);
    font-size: .84rem;
    line-height: 1.65;
}

/* =========================================================
   GENERIC SECTIONS / HEADINGS / CARDS
   ========================================================= */

.section { padding: 76px 0; }
.section-white { background: #fff; }

.section-heading { margin-bottom: 32px; }

.section-heading h1,
.section-heading h2 {
    margin-bottom: 10px;
    color: var(--ttbg-navy);
    font-size: clamp(2.15rem, 4vw, 3.4rem);
    line-height: 1.05;
    font-weight: 500;
}

.section-heading p:last-child {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--ttbg-muted);
}

.card {
    background: var(--ttbg-white);
    border: 1px solid var(--ttbg-line);
    border-radius: var(--ttbg-card-radius);
    box-shadow: var(--ttbg-shadow);
}

.form-card { padding: clamp(28px, 5vw, 48px); }

.application-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 34px;
    align-items: start;
}

.application-aside {
    position: sticky;
    top: 104px;
    padding: 26px;
    background: var(--ttbg-navy);
    color: #fff;
    border-radius: var(--ttbg-card-radius);
}

.application-aside .eyebrow { color: var(--ttbg-cyan-bright); }

.application-aside h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 500;
}

.application-aside p {
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: .82rem;
    line-height: 1.65;
}

/* =========================================================
   FORMS
   ========================================================= */

.form-fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

.form-fieldset legend,
.acknowledgement-title {
    color: var(--ttbg-navy);
    font-weight: 700;
}

.form-fieldset legend { margin-bottom: 12px; }

.form-grid {
    display: grid;
    gap: 20px;
}

.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.field { margin-bottom: 22px; }

.field label {
    display: block;
    margin-bottom: 8px;
    color: var(--ttbg-navy);
    font-size: .83rem;
    font-weight: 650;
}

.required {
    color: var(--ttbg-soft-muted);
    font-size: .72rem;
    font-weight: 550;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #ccd6dd;
    border-radius: 4px;
    padding: 12px 14px;
    color: var(--ttbg-ink);
    background: var(--ttbg-white);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--ttbg-cyan);
    box-shadow: 0 0 0 3px rgba(7, 142, 170, .10);
}

.field textarea { resize: vertical; }

.checkbox-field {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: start;
    gap: 11px;
    margin: 10px 0 24px;
}

.checkbox-field input { margin-top: 5px; }

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.checkbox-option {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 43px;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid var(--ttbg-line);
    border-radius: 4px;
    color: var(--ttbg-navy);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    transition: border-color .2s ease, background .2s ease;
}

.checkbox-option:hover {
    border-color: var(--ttbg-cyan);
    background: #f8fbfc;
}

.checkbox-option input {
    width: auto;
    margin: 0;
    accent-color: var(--ttbg-cyan);
}

.acknowledgement-block { margin: 8px 0 26px; }
.acknowledgement-title { margin-bottom: 10px; }

.acknowledgement-option {
    width: 100%;
    align-items: flex-start;
    line-height: 1.45;
    background: var(--ttbg-soft);
}

.honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.error {
    display: block;
    margin-top: 6px;
    color: var(--ttbg-danger);
    font-size: .78rem;
}

/* =========================================================
   BUTTONS
   Rectangular to match the Squarespace site.
   ========================================================= */

.primary-button,
.secondary-button {
    min-height: 46px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ttbg-button-radius);
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.primary-button {
    border: 1px solid var(--ttbg-navy);
    background: var(--ttbg-navy);
    color: var(--ttbg-white);
}

.primary-button:hover {
    transform: translateY(-2px);
    border-color: var(--ttbg-cyan);
    background: var(--ttbg-cyan);
}

.secondary-button {
    border: 1px solid var(--ttbg-navy);
    background: var(--ttbg-white);
    color: var(--ttbg-navy);
}

.secondary-button:hover {
    transform: translateY(-2px);
    background: var(--ttbg-navy);
    color: #fff;
}

.full-width { width: 100%; }

/* =========================================================
   SUCCESS / LOGIN
   ========================================================= */

.success-card {
    text-align: center;
    padding: 58px 38px;
}

.success-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: rgba(7, 142, 170, .10);
    color: var(--ttbg-cyan);
    font-size: 1.75rem;
    font-weight: 900;
}

.success-card h1,
.login-card h1 {
    margin-bottom: 10px;
    color: var(--ttbg-navy);
    font-size: 2.4rem;
    line-height: 1.05;
    font-weight: 500;
}

.success-card > p:last-child,
.login-card > p:not(.eyebrow) {
    color: var(--ttbg-muted);
}

.login-wrap { width: min(520px, calc(100% - 40px)); }
.login-card { padding: 40px; }
.login-card > p:not(.eyebrow) { margin-bottom: 28px; }

/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-section { min-height: calc(100vh - 78px); }

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 32px;
}

.page-heading h1 {
    margin-bottom: 8px;
    color: var(--ttbg-navy);
    font-size: 3rem;
    line-height: 1;
    font-weight: 500;
}

.page-heading p:last-child {
    margin-bottom: 0;
    color: var(--ttbg-muted);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    padding: 20px 22px;
    background: var(--ttbg-white);
    border: 1px solid var(--ttbg-line);
    border-top: 3px solid var(--ttbg-navy);
    border-radius: 6px;
}

.stat-card span {
    display: block;
    color: var(--ttbg-muted);
    font-size: .75rem;
    font-weight: 650;
}

.stat-card strong {
    display: block;
    margin-top: 3px;
    color: var(--ttbg-navy);
    font-family: "Oswald", "Arial Narrow", sans-serif;
    font-size: 2rem;
    font-weight: 500;
}

.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 17px 20px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--ttbg-line);
}

th {
    color: var(--ttbg-muted);
    background: #f8fafb;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .09em;
}

td small {
    display: block;
    margin-top: 3px;
    color: var(--ttbg-muted);
}

.table-link {
    color: var(--ttbg-navy);
    font-weight: 750;
    text-decoration: none;
}

.table-link:hover { color: var(--ttbg-cyan); }

.status-pill,
.response-tag {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 3px;
    background: rgba(7, 142, 170, .09);
    color: var(--ttbg-cyan);
    font-size: .76rem;
    font-weight: 700;
}

.empty-state {
    padding: 55px 30px;
    text-align: center;
}

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

.back-link {
    display: inline-block;
    margin-bottom: 22px;
    color: var(--ttbg-cyan);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 700;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, .65fr);
    gap: 24px;
    align-items: start;
}

.applicant-card { padding: 34px; }

.applicant-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ttbg-line);
}

.applicant-heading h1 {
    margin-bottom: 7px;
    color: var(--ttbg-navy);
    font-size: 2.4rem;
    line-height: 1;
    font-weight: 500;
}

.applicant-heading p:last-child {
    margin: 0;
    color: var(--ttbg-muted);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 24px 0;
    border-bottom: 1px solid var(--ttbg-line);
}

.detail-grid span {
    display: block;
    margin-bottom: 4px;
    color: var(--ttbg-muted);
    font-size: .75rem;
}

.detail-grid strong { overflow-wrap: anywhere; }

.response-section { padding-top: 24px; }

.response-section h2 {
    margin-bottom: 8px;
    color: var(--ttbg-navy);
    font-family: "Inter", sans-serif;
    font-size: .9rem;
    font-weight: 750;
}

.response-section p {
    white-space: pre-wrap;
    color: #344653;
}

.review-card {
    position: sticky;
    top: 102px;
    padding: 26px;
}

.review-card h2 {
    margin-bottom: 24px;
    color: var(--ttbg-navy);
    font-size: 1.65rem;
    font-weight: 500;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

/* =========================================================
   PORTAL FOOTER
   Mirrors the new TTBG website footer language.
   ========================================================= */

.portal-footer {
    position: relative;
    overflow: hidden;
    margin-top: 30px;
    background:
        linear-gradient(rgba(9, 31, 58, .96), rgba(9, 31, 58, .98)),
        url("https://images.squarespace-cdn.com/content/v1/69df17ff5ff7216364ddfe10/ed450474-ec9e-4bd4-ace9-8d378e653821/BackgroundImage.png") center / cover no-repeat;
    color: #fff;
}

.portal-footer-grid {
    display: grid;
    grid-template-columns: 1.25fr .72fr 1fr .9fr;
    gap: 48px;
    align-items: start;
    padding: 58px 0 42px;
}

.portal-footer-brand a {
    display: inline-block;
    text-decoration: none;
}

.footer-logo {
    display: block;
    width: 235px;
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
    opacity: .96;
}

.portal-footer-brand p {
    max-width: 330px;
    margin: 0 0 24px;
    color: rgba(255,255,255,.69);
    font-size: .77rem;
    line-height: 1.7;
}

.portal-footer-brand small {
    display: block;
    color: rgba(255,255,255,.43);
    font-size: .62rem;
    line-height: 1.55;
}

.portal-footer-column {
    padding-left: 24px;
    border-left: 1px solid rgba(255,255,255,.13);
}

.portal-footer-column h3 {
    margin: 0 0 18px;
    color: #fff;
    font-family: "Inter", sans-serif;
    font-size: .75rem;
    font-weight: 700;
}

.portal-footer-column nav,
.portal-footer-contact {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.portal-footer-column nav a,
.portal-footer-contact a {
    width: fit-content;
    color: rgba(255,255,255,.65);
    font-size: .7rem;
    line-height: 1.45;
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

.portal-footer-column nav a:hover,
.portal-footer-contact a:hover {
    color: #fff;
    transform: translateX(2px);
}

.portal-footer-contact a {
    max-width: 290px;
    overflow-wrap: anywhere;
}

.portal-footer-contact span {
    display: block;
    margin-bottom: 3px;
    color: var(--ttbg-cyan-bright);
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.portal-footer-cta {
    padding: 25px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 4px;
}

.portal-footer-cta > span {
    display: block;
    margin-bottom: 7px;
    color: var(--ttbg-cyan-bright);
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .14em;
}

.portal-footer-cta h3 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.3;
    font-weight: 500;
}

.portal-footer-cta a {
    display: inline-flex;
    min-height: 40px;
    padding: 0 15px;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 3px;
    color: var(--ttbg-navy);
    font-size: .68rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.portal-footer-cta a:hover {
    transform: translateY(-2px);
    background: transparent;
    color: #fff;
}

.portal-footer-bottom {
    min-height: 52px;
    padding: 15px 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid rgba(255,255,255,.12);
}

.portal-footer-bottom span {
    color: rgba(255,255,255,.42);
    font-size: .58rem;
    letter-spacing: .04em;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 960px) {
    .portal-hero-grid,
    .application-shell,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .portal-hero-grid {
        width: min(100% - 48px, 1240px);
        gap: 38px;
    }
    .hero-note {
        justify-self: stretch;
        max-width: 560px;
    }
    .portal-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 38px;
    }
    .application-aside { position: static; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .review-card { position: static; }
}

@media (max-width: 700px) {
    .container,
    .narrow,
    .login-wrap {
        width: min(100% - 28px, 1240px);
    }

    .header-inner { min-height: 68px; }
    .brand-logo { width: 205px; }
    .header-nav { gap: 13px; }
    .header-nav .mobile-hide { display: none; }

    .portal-hero {
        min-height: auto;
        background:
            linear-gradient(rgba(255,255,255,.94), rgba(255,255,255,.94)),
            url("https://images.squarespace-cdn.com/content/v1/69df17ff5ff7216364ddfe10/ed450474-ec9e-4bd4-ace9-8d378e653821/BackgroundImage.png") center / cover no-repeat;
    }

    .portal-hero-grid {
        width: min(100% - 28px, 1240px);
        padding: 52px 0 56px;
    }
    .portal-hero h1 { font-size: clamp(2.85rem, 14vw, 3.7rem); }
    .hero-pill-row { gap: 7px; }
    .hero-note { max-width: none; }
    .portal-footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
        padding: 48px 0 30px;
    }
    .portal-footer-column {
        padding: 25px 0 0;
        border-left: 0;
        border-top: 1px solid rgba(255,255,255,.12);
    }
    .portal-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
    .footer-logo { width: 220px; }

    .section { padding: 52px 0; }

    .two-column,
    .checkbox-grid,
    .stat-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .page-heading,
    .applicant-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .form-card,
    .applicant-card,
    .login-card {
        padding: 24px;
    }

    th, td { padding: 14px 15px; }

}
