/* Public frontfacing — light theme, agent-centered transaction ecosystem */

/* Annabel — nav brand title “My Transactions Tracker” only (not site-wide).
   File must be mtt-annabel.ttf: bare Annabel.ttf 404s on the host. */
@font-face {
    font-family: 'Annabel';
    src: url('../fonts/mtt-annabel.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Shared ecosystem tokens — full page on frontfacing; hero embed on landing */
body.tt-frontfacing-page,
body.tt-landing-page {
    --ff-ink: #0f2744;
    --ff-navy: #0b1f3a;
    --ff-teal: #0f766e;
    --ff-sky: #0284c7;
    --ff-cyan: #0ea5e9;
    --ff-muted: #5b6b7c;
    --ff-line: #d7e2ee;
    --ff-paper: #f4f7fb;
    --ff-mist: #e8eef5;
    --ff-white: #ffffff;
    --ff-display: 'Fraunces', 'Georgia', serif;
    --ff-sans: 'Outfit', system-ui, sans-serif;
    --ff-max: 1180px;
    /* Must be px/length — % inside transform translate is relative to the actor box, not the stage */
    --ff-eco-r: 156px;
}

body.tt-frontfacing-page {
    margin: 0;
    background: var(--ff-paper);
    color: var(--ff-ink);
    font-family: var(--ff-sans);
    overflow-x: hidden;
}

/* Landing keeps its own page chrome; only the ecosystem hero uses --ff-* */
body.tt-landing-page .tt-ff-hero {
    font-family: var(--ff-sans);
}

body.tt-frontfacing-page .tt-header,
body.tt-frontfacing-page .tt-nav-toggle,
body.tt-frontfacing-page .tt-header-actions { display: none !important; }

body.tt-frontfacing-page .tt-footer {
    background: var(--ff-navy);
    color: rgba(255, 255, 255, 0.72);
    border-top: none;
}
body.tt-frontfacing-page .tt-footer a,
body.tt-frontfacing-page .tt-footer-linkbtn { color: #7dd3fc; }

.tt-ff { min-height: 100vh; }
.tt-ff-skip {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 100;
    background: #fff;
    color: #0f2744;
    padding: 10px 14px;
}
.tt-ff-skip:focus { left: 12px; top: 12px; }
.tt-ff-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.tt-ff-wrap { width: min(100% - 40px, var(--ff-max)); margin: 0 auto; }

.tt-ff-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.tt-ff-btn:hover { transform: translateY(-1px); }
.tt-ff-btn--primary {
    background: linear-gradient(135deg, #0f766e, #0284c7);
    color: #fff;
    box-shadow: 0 10px 28px rgba(2, 132, 199, 0.22);
}
.tt-ff-btn--primary:hover {
    box-shadow: 0 12px 32px rgba(2, 132, 199, 0.3);
}
.tt-ff-btn--ghost {
    background: #fff;
    border-color: #c9d7e8;
    color: #0f2744;
}
.tt-ff-btn--ghost:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}
.tt-ff-btn--text {
    background: transparent;
    color: var(--ff-sky);
    min-height: 40px;
    padding: 0 8px;
    font-weight: 650;
}
.tt-ff-btn--text:hover { color: var(--ff-teal); text-decoration: underline; }

/* —— Nav (light) —— */
.tt-ff-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--ff-line);
}
.tt-ff-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ff-ink);
}
.tt-ff-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(145deg, #0f766e, #0ea5e9);
    color: #fff;
    font-weight: 800;
    font-size: 0.92rem;
    box-shadow: 0 8px 22px rgba(14, 165, 233, 0.22);
}
.tt-ff-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.tt-ff-brand-text strong {
    font-size: 1.02rem;
    font-weight: 700;
}
body.tt-frontfacing-page .tt-ff-brand-text strong.tt-ff-brand-title {
    font-family: 'Annabel', cursive !important;
    font-weight: 400;
    font-size: 1.28rem;
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: var(--ff-navy);
}
.tt-ff-brand-text small {
    font-size: 0.72rem;
    color: var(--ff-muted);
}
.tt-ff-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* —— Hero —— */
.tt-ff-hero {
    position: relative;
    padding: 48px 0 64px;
    background:
        radial-gradient(ellipse 70% 55% at 85% 15%, rgba(14, 165, 233, 0.12), transparent 55%),
        radial-gradient(ellipse 50% 45% at 5% 90%, rgba(15, 118, 110, 0.1), transparent 50%),
        linear-gradient(180deg, #ffffff 0%, #f0f5fa 55%, #e8eef5 100%);
    overflow: hidden;
}
.tt-ff-hero-atm {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(11, 31, 58, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11, 31, 58, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 75% 65% at 55% 40%, #000 15%, transparent 72%);
    pointer-events: none;
}
.tt-ff-hero-grid {
    position: relative;
    z-index: 1;
    width: min(100% - 40px, var(--ff-max));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(400px, 1.2fr);
    gap: 40px;
    align-items: center;
}
.tt-ff-kicker {
    margin: 0 0 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ff-teal);
}
.tt-ff-hero-copy h1 {
    margin: 0 0 16px;
    font-family: var(--ff-display);
    font-size: clamp(2rem, 4.2vw, 3.15rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--ff-navy);
}
.tt-ff-hero-sub {
    margin: 0 0 26px;
    max-width: 40ch;
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--ff-muted);
}
.tt-ff-hero-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* —— Ecosystem diagram (interactive) —— */
.tt-ff-eco-wrap { position: relative; }
.tt-ff-eco {
    --ff-eco-cx: 42%;
    --ff-eco-cy: 48%;
    --ff-eco-focus-ms: 520ms;
    position: relative;
    width: 100%;
    /* Tall enough for longest focus panels (Customer 9 / Agent 8 bullets) without a scrollbar */
    min-height: 560px;
    aspect-ratio: 6 / 5.3;
    max-height: 680px;
    border-radius: 20px;
    overflow: hidden;
    background:
        radial-gradient(circle at 42% 48%, rgba(14, 165, 233, 0.08), transparent 46%),
        linear-gradient(160deg, #ffffff 0%, #f1f6fb 100%);
    border: 1px solid var(--ff-line);
    box-shadow:
        0 4px 6px rgba(15, 39, 68, 0.04),
        0 24px 48px rgba(15, 39, 68, 0.08);
}
.tt-ff-eco.is-focus {
    min-height: 620px;
    max-height: none;
}
.tt-ff-eco-backdrop {
    position: absolute;
    inset: 0;
    z-index: 12;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(244, 247, 251, 0.35);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ff-eco-focus-ms) ease;
}
.tt-ff-eco-backdrop.is-open {
    /*opacity: 1;*/
    pointer-events: auto;
}
.tt-ff-eco-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: opacity var(--ff-eco-focus-ms) ease, visibility var(--ff-eco-focus-ms) ease;
}
.tt-ff-eco.is-focus .tt-ff-eco-svg {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.tt-ff-eco-ring {
    transform-origin: center;
    animation: tt-ff-ring-spin 28s linear infinite;
}
.tt-ff-eco-ring--inner {
    animation-direction: reverse;
    animation-duration: 36s;
}
.tt-ff-eco-pulse {
    stroke-dasharray: 80 220;
    animation: tt-ff-pulse-run 4.5s ease-in-out infinite;
}
.tt-ff-eco-pulse--2 { animation-delay: 2.2s; }
.tt-ff-eco-sync { animation: tt-ff-sync-fade 3.2s ease-in-out infinite; }
.tt-ff-eco-bridge-dot { animation: tt-ff-bridge-pulse 2.4s ease-in-out infinite; }
.tt-ff-eco-mirror { opacity: 0.55; }
.tt-ff-eco-mirror-ring { animation: tt-ff-ring-spin 40s linear infinite reverse; }
.tt-ff-eco-mirror-mark {
    font-family: var(--ff-sans);
    font-size: 7px;
    font-weight: 800;
    fill: #64748b;
}
.tt-ff-eco-sat { animation: tt-ff-sat-breathe 3s ease-in-out infinite; }
.tt-ff-eco-sat:nth-child(odd) { animation-delay: 0.4s; }

.tt-ff-eco-agent {
    position: absolute;
    left: var(--ff-eco-cx);
    top: var(--ff-eco-cy);
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 118px;
    height: 118px;
    margin: -59px 0 0 -59px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #0b1f3a, #123056);
    color: #fff;
    box-shadow:
        0 0 0 7px rgba(255, 255, 255, 0.98),
        0 0 0 10px rgba(14, 165, 233, 0.28),
        0 18px 40px rgba(11, 31, 58, 0.3);
    text-align: center;
    cursor: pointer;
    font: inherit;
    animation: tt-ff-agent-glow 4s ease-in-out infinite;
    transition:
        left var(--ff-eco-focus-ms) cubic-bezier(0.22, 1, 0.36, 1),
        top var(--ff-eco-focus-ms) cubic-bezier(0.22, 1, 0.36, 1),
        width var(--ff-eco-focus-ms) ease,
        height var(--ff-eco-focus-ms) ease,
        margin var(--ff-eco-focus-ms) ease,
        transform var(--ff-eco-focus-ms) ease,
        opacity var(--ff-eco-focus-ms) ease,
        box-shadow var(--ff-eco-focus-ms) ease;
}
.tt-ff-eco-agent:hover,
.tt-ff-eco-agent:focus-visible {
    outline: none;
    transform: scale(1.04);
    box-shadow:
        0 0 0 7px rgba(255, 255, 255, 0.98),
        0 0 0 12px rgba(14, 165, 233, 0.38),
        0 20px 44px rgba(11, 31, 58, 0.34);
}
.tt-ff-eco-agent-art {
    display: block;
    width: 58px;
    height: 58px;
    margin-bottom: 2px;
    border-radius: 50%;
    overflow: hidden;
    line-height: 0;
    background: linear-gradient(145deg, #e0f2fe, #f8fafc);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}
.tt-ff-eco-agent-art .tt-ff-eco-avatar,
.tt-ff-eco-actor-art .tt-ff-eco-avatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
    border-radius: 50%;
    /* No voile blanc: never fade / screen / multiply the portrait */
    opacity: 1;
    mix-blend-mode: normal;
    filter: none;
    -webkit-filter: none;
    background: transparent;
}
.tt-ff-eco-agent-mark {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #7dd3fc;
}
.tt-ff-eco-agent strong {
    font-size: 0.95rem;
    font-weight: 750;
    line-height: 1.1;
}
.tt-ff-eco-agent small {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.75);
}

.tt-ff-eco-actors {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
}
.tt-ff-eco-slot {
    --a: 0deg;
    position: absolute;
    left: var(--ff-eco-cx);
    top: var(--ff-eco-cy);
    width: 0;
    height: 0;
    pointer-events: none;
    transition:
        left var(--ff-eco-focus-ms) cubic-bezier(0.22, 1, 0.36, 1),
        top var(--ff-eco-focus-ms) cubic-bezier(0.22, 1, 0.36, 1),
        opacity var(--ff-eco-focus-ms) ease,
        filter var(--ff-eco-focus-ms) ease;
    animation: tt-ff-actor-in 0.7s ease both;
}
.tt-ff-eco-slot .tt-ff-eco-actor {
    pointer-events: auto;
}
.tt-ff-eco-slot:nth-child(1) { animation-delay: 0.05s; }
.tt-ff-eco-slot:nth-child(2) { animation-delay: 0.12s; }
.tt-ff-eco-slot:nth-child(3) { animation-delay: 0.19s; }
.tt-ff-eco-slot:nth-child(4) { animation-delay: 0.26s; }
.tt-ff-eco-slot:nth-child(5) { animation-delay: 0.33s; }

.tt-ff-eco-actor {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 96px;
    margin-left: -48px;
    margin-top: -36px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transform: rotate(var(--a)) translateY(calc(var(--ff-eco-r) * -1)) rotate(calc(var(--a) * -1));
    transition:
        opacity var(--ff-eco-focus-ms) ease,
        filter var(--ff-eco-focus-ms) ease,
        transform var(--ff-eco-focus-ms) cubic-bezier(0.22, 1, 0.36, 1);
}
.tt-ff-eco-actor:focus-visible {
    outline: none;
}
.tt-ff-eco-actor-art {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #f8fafc, #e0f2fe);
    border: 2px solid #fff;
    box-shadow:
        0 0 0 2px rgba(14, 165, 233, 0.22),
        0 8px 20px rgba(15, 39, 68, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.tt-ff-eco-actor:hover .tt-ff-eco-actor-art,
.tt-ff-eco-actor:focus-visible .tt-ff-eco-actor-art {
    transform: scale(1.08);
    border-color: #fff;
    box-shadow:
        0 0 0 3px rgba(14, 165, 233, 0.4),
        0 10px 24px rgba(2, 132, 199, 0.22);
}
.tt-ff-eco-actor-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--ff-ink);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.96);
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--ff-line);
    box-shadow: 0 2px 8px rgba(15, 39, 68, 0.06);
}
.tt-ff-eco-actor--other .tt-ff-eco-actor-art {
    background: linear-gradient(145deg, #ecfeff, #e0f2fe);
    box-shadow:
        0 0 0 2px rgba(14, 165, 233, 0.32),
        0 8px 20px rgba(15, 39, 68, 0.12);
}

/* Shooting-star comm icons — lead an arc, vanish on arrival */
.tt-ff-eco-stars {
    position: absolute;
    left: var(--ff-eco-cx);
    top: var(--ff-eco-cy);
    width: 0;
    height: 0;
    z-index: 6;
    pointer-events: none;
}
.tt-ff-eco-star {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #bae6fd;
    color: #0284c7;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.22);
    offset-rotate: 0deg;
    offset-distance: 0%;
    opacity: 0;
    pointer-events: none !important;
    animation: tt-ff-star-fly var(--ff-star-ms, 2400ms) linear forwards;
}
.tt-ff-eco-star svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.3;
}
.tt-ff-eco-star--sky { color: #0284c7; border-color: #7dd3fc; }
.tt-ff-eco-star--teal { color: #0f766e; border-color: #99f6e4; }
.tt-ff-eco-star--lavender { color: #7c3aed; border-color: #c4b5fd; }
.tt-ff-eco-star--amber { color: #d97706; border-color: #fcd34d; }
.tt-ff-eco-star--coral { color: #e11d48; border-color: #fda4af; }
.tt-ff-eco.is-focus .tt-ff-eco-stars {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tt-ff-eco-cues {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: opacity var(--ff-eco-focus-ms) ease;
}
.tt-ff-eco.is-focus .tt-ff-eco-cues {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.tt-ff-eco-cue {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--ff-line);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ff-ink);
    box-shadow: 0 4px 12px rgba(15, 39, 68, 0.06);
    opacity: 0;
    transform: translateX(-8px);
    animation: tt-ff-cue-in 0.5s ease forwards;
}
.tt-ff-eco-cue svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.4;
}
.tt-ff-eco-cue--comm { animation-delay: 0.6s; color: var(--ff-sky); }
.tt-ff-eco-cue--dates { animation-delay: 1s; color: var(--ff-teal); }

.tt-ff-eco-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    margin: 0;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 650;
    color: var(--ff-muted);
    z-index: 6;
    transition: opacity var(--ff-eco-focus-ms) ease;
}
.tt-ff-eco.is-focus .tt-ff-eco-caption {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.tt-ff-eco-cap-static { display: none; }

/* Focus mode: ONLY focused actor + panel — others fully gone (actor-in fill was locking opacity:1) */
.tt-ff-eco.is-focus .tt-ff-eco-slot:not(.is-focus-slot),
.tt-ff-eco.is-focus .tt-ff-eco-agent:not(.is-focus-target) {
    animation: none !important;
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none !important;
    filter: none;
}
.tt-ff-eco.is-focus .tt-ff-eco-stars,
.tt-ff-eco.is-focus .tt-ff-eco-star {
    animation: none !important;
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none !important;
}

.tt-ff-eco.is-focus .tt-ff-eco-slot.is-focus-slot {
    left: 20%;
    top: 50%;
    z-index: 20;
    animation: none;
    opacity: 1;
    visibility: visible;
}
/* Orbit actors: 2× prior focused sizes (idle sizes unchanged). Agent: smaller so it clears the 60% panel. */
.tt-ff-eco.is-focus .tt-ff-eco-actor.is-focus-target {
    margin-left: -112px;
    margin-top: -96px;
    width: 224px;
    transform: none;
    z-index: 20;
}
.tt-ff-eco.is-focus .tt-ff-eco-actor.is-focus-target .tt-ff-eco-actor-art {
    width: 176px;
    height: 176px;
    border-radius: 50%;
    border-color: #fff;
    box-shadow:
        0 0 0 4px rgba(14, 165, 233, 0.35),
        0 20px 44px rgba(2, 132, 199, 0.26);
}
.tt-ff-eco.is-focus .tt-ff-eco-actor.is-focus-target .tt-ff-eco-actor-label {
    font-size: 1.05rem;
    padding: 6px 16px;
}

.tt-ff-eco.is-focus .tt-ff-eco-agent.is-focus-target {
    left: 15%;
    top: 50%;
    width: 136px;
    height: 136px;
    margin: -68px 0 0 -68px;
    z-index: 20;
    transform: none;
    animation: none;
    opacity: 1;
    visibility: visible;
}
.tt-ff-eco.is-focus .tt-ff-eco-agent.is-focus-target .tt-ff-eco-agent-art {
    width: 72px;
    height: 72px;
}
.tt-ff-eco.is-focus .tt-ff-eco-agent.is-focus-target strong { font-size: 1rem; }
.tt-ff-eco.is-focus .tt-ff-eco-agent.is-focus-target .tt-ff-eco-agent-mark { font-size: 0.66rem; }
.tt-ff-eco.is-focus .tt-ff-eco-agent.is-focus-target small { font-size: 0.64rem; }

.tt-ff-eco-panel {
    position: absolute;
    top: 14px;
    right: 14px;
    bottom: 14px;
    width: calc(60% - 10px);
    z-index: 18;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 20px 18px;
    border-radius: 16px;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--ff-line);
    box-shadow:
        0 8px 24px rgba(15, 39, 68, 0.08),
        0 28px 56px rgba(15, 39, 68, 0.12);
    transform: translateX(110%);
    opacity: 0;
    pointer-events: none;
    transition:
        transform var(--ff-eco-focus-ms) cubic-bezier(0.22, 1, 0.36, 1),
        opacity var(--ff-eco-focus-ms) ease;
    /* Desktop: stage is tall enough — avoid scrollbars on the focus panel */
    overflow: visible;
}
.tt-ff-eco-panel.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}
.tt-ff-eco-panel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--ff-line);
    background: #fff;
    color: var(--ff-navy);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.tt-ff-eco-panel-close:hover,
.tt-ff-eco-panel-close:focus-visible {
    background: #f0f9ff;
    border-color: #7dd3fc;
    outline: none;
}
.tt-ff-eco-panel-close svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.4;
}
.tt-ff-eco-panel-kicker {
    margin: 0 36px 0 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ff-teal);
}
.tt-ff-eco-panel-kicker[hidden],
.tt-ff-eco-panel-hint[hidden] {
    display: none !important;
}
.tt-ff-eco-panel-title {
    margin: 0 40px 0 0;
    font-family: var(--ff-display);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--ff-navy);
}
.tt-ff-eco-panel-hint {
    margin: 0 0 8px;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--ff-muted);
}
.tt-ff-eco-panel-bullets {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tt-ff-eco-bullet {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--ff-line);
    font-size: 0.92rem;
    font-weight: 650;
    color: var(--ff-ink);
    opacity: 0;
    transform: translateX(14px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.tt-ff-eco-bullet.is-in {
    opacity: 1;
    transform: translateX(0);
}
.tt-ff-eco-bullet.is-out {
    opacity: 0;
    transform: translateX(10px);
}
.tt-ff-eco-bullet::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--ff-bullet, #38bdf8);
    box-shadow: 0 0 0 4px var(--ff-bullet-soft, rgba(56, 189, 248, 0.22));
}
.tt-ff-eco-bullet--teal { --ff-bullet: #14b8a6; --ff-bullet-soft: rgba(20, 184, 166, 0.22); }
.tt-ff-eco-bullet--green { --ff-bullet: #4ade80; --ff-bullet-soft: rgba(74, 222, 128, 0.22); }
.tt-ff-eco-bullet--coral { --ff-bullet: #fb7185; --ff-bullet-soft: rgba(251, 113, 133, 0.22); }
.tt-ff-eco-bullet--sky { --ff-bullet: #38bdf8; --ff-bullet-soft: rgba(56, 189, 248, 0.22); }
.tt-ff-eco-bullet--lavender { --ff-bullet: #a78bfa; --ff-bullet-soft: rgba(167, 139, 250, 0.22); }
.tt-ff-eco-bullet--amber { --ff-bullet: #fbbf24; --ff-bullet-soft: rgba(251, 191, 36, 0.25); }

@keyframes tt-ff-ring-spin {
    to { transform: rotate(360deg); }
}
@keyframes tt-ff-pulse-run {
    0% { stroke-dashoffset: 280; opacity: 0.2; }
    40% { opacity: 1; }
    100% { stroke-dashoffset: -80; opacity: 0.15; }
}
@keyframes tt-ff-sync-fade {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.7; }
}
@keyframes tt-ff-bridge-pulse {
    0%, 100% { opacity: 0.4; r: 3; }
    50% { opacity: 1; r: 4.5; }
}
@keyframes tt-ff-agent-glow {
    0%, 100% { box-shadow: 0 0 0 6px rgba(255,255,255,0.95), 0 0 0 8px rgba(14,165,233,0.22), 0 16px 36px rgba(11,31,58,0.28); }
    50% { box-shadow: 0 0 0 6px rgba(255,255,255,0.95), 0 0 0 11px rgba(15,118,110,0.28), 0 18px 40px rgba(11,31,58,0.32); }
}
@keyframes tt-ff-sat-breathe {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}
@keyframes tt-ff-actor-in {
    from { opacity: 0; filter: blur(4px); }
    to { opacity: 1; filter: blur(0); }
}
@keyframes tt-ff-cue-in {
    to { opacity: 1; transform: translateX(0); }
}
@keyframes tt-ff-star-fly {
    0% {
        offset-distance: 0%;
        opacity: 0;
        transform: scale(0.55);
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    78% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        offset-distance: 100%;
        opacity: 0;
        transform: scale(0.7);
    }
}

/* —— Sections —— */
.tt-ff-section {
    padding: 64px 0;
    background: var(--ff-white);
}
.tt-ff-section--roles {
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    border-top: 1px solid var(--ff-line);
    border-bottom: 1px solid var(--ff-line);
}
.tt-ff-eyebrow {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ff-teal);
}
.tt-ff-section h2 {
    margin: 0 0 12px;
    font-family: var(--ff-display);
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ff-navy);
}
.tt-ff-lead {
    margin: 0 0 28px;
    max-width: 52ch;
    font-size: 1.02rem;
    line-height: 1.55;
    color: var(--ff-muted);
}

.tt-ff-pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}
.tt-ff-pillar {
    padding: 20px 18px 22px;
    border-radius: 16px;
    background: var(--ff-paper);
    border: 1px solid var(--ff-line);
}
.tt-ff-pillar h3 {
    margin: 14px 0 8px;
    font-size: 1.05rem;
    font-weight: 750;
    color: var(--ff-navy);
}
.tt-ff-pillar p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--ff-muted);
}
.tt-ff-pillar-viz {
    height: 88px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--ff-line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.tt-ff-pillar-viz--shot {
    height: auto;
    aspect-ratio: 16 / 10;
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
}
.tt-ff-pillar-shot {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: inherit;
    pointer-events: none;
}
button.tt-ff-pillar-viz--shot {
    cursor: zoom-in;
    font: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
    text-align: left;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}
button.tt-ff-pillar-viz--shot:hover,
button.tt-ff-pillar-viz--shot:focus-visible {
    box-shadow: 0 10px 28px rgba(11, 31, 58, 0.16);
    outline: 2px solid rgba(14, 165, 233, 0.55);
    outline-offset: 2px;
}
button.tt-ff-pillar-viz--shot:active {
    transform: scale(0.995);
}

/* At a Glance screenshot lightbox */
.tt-ff-glance-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.tt-ff-glance-modal[hidden] {
    display: none !important;
}
.tt-ff-glance-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(11, 31, 58, 0.72);
    cursor: zoom-out;
}
.tt-ff-glance-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}
.tt-ff-glance-modal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #0b1f3a, #0f766e);
    color: #fff;
}
.tt-ff-glance-modal-title {
    margin: 0;
    font-family: var(--ff-frontfacing-display, inherit);
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}
.tt-ff-glance-modal-x {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.tt-ff-glance-modal-x:hover,
.tt-ff-glance-modal-x:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.tt-ff-glance-modal-x svg {
    width: 18px;
    height: 18px;
}
.tt-ff-glance-modal-body {
    padding: 12px;
    overflow: auto;
    background: #f1f5f9;
    -webkit-overflow-scrolling: touch;
}
.tt-ff-glance-modal-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(78vh, 820px);
    object-fit: contain;
    margin: 0 auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(11, 31, 58, 0.12);
}
body.tt-ff-glance-open {
    overflow: hidden;
}

/* Mini graphs */
.tt-ff-graph { position: relative; width: 100%; height: 100%; }
.tt-ff-graph--comm .tt-ff-graph-node {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ff-sky);
}
.tt-ff-graph-node--a { left: 18%; top: 55%; background: var(--ff-navy); }
.tt-ff-graph-node--b { left: 48%; top: 28%; background: var(--ff-teal); }
.tt-ff-graph-node--c { left: 76%; top: 52%; }
.tt-ff-graph-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, #94a3b8, #0ea5e9);
    transform-origin: left center;
    opacity: 0.7;
}
.tt-ff-graph-line--1 {
    left: 22%;
    top: 50%;
    width: 28%;
    transform: rotate(-28deg);
}
.tt-ff-graph-line--2 {
    left: 52%;
    top: 38%;
    width: 26%;
    transform: rotate(32deg);
}
.tt-ff-graph-pulse {
    position: absolute;
    left: 22%;
    top: 48%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0284c7;
    animation: tt-ff-comm-pulse 2.4s ease-in-out infinite;
}

@keyframes tt-ff-comm-pulse {
    0% { transform: translate(0, 0); opacity: 1; }
    45% { transform: translate(72px, -22px); opacity: 1; }
    55% { transform: translate(72px, -22px); opacity: 1; }
    100% { transform: translate(148px, 8px); opacity: 0.2; }
}

.tt-ff-timeline {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 6px 10px;
    align-items: center;
    width: 86%;
    margin: 0 auto;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--ff-muted);
}
.tt-ff-tl-bar {
    display: flex;
    gap: 6px;
    height: 8px;
}
.tt-ff-tl-bar i {
    flex: 1;
    border-radius: 4px;
    background: #bae6fd;
}
.tt-ff-tl-bar i:nth-child(2) { background: #0ea5e9; }
.tt-ff-tl-bar--b i { background: #99f6e4; }
.tt-ff-tl-bar--b i:nth-child(2) { background: #0f766e; }
.tt-ff-tl-sync {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--ff-teal);
    letter-spacing: 0.04em;
    animation: tt-ff-sync-fade 2.8s ease-in-out infinite;
}

.tt-ff-graph--docs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 10px;
}
.tt-ff-doc-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--ff-paper);
    border: 1px solid var(--ff-line);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--ff-navy);
}
.tt-ff-doc-chip svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.4;
    color: var(--ff-sky);
}

.tt-ff-role-row {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tt-ff-role-row li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--ff-line);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ff-ink);
    box-shadow: 0 4px 12px rgba(15, 39, 68, 0.04);
}
.tt-ff-role-row svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
    color: var(--ff-teal);
}

/* —— CTA —— */
.tt-ff-cta {
    padding: 56px 0 72px;
    background:
        radial-gradient(ellipse 60% 80% at 50% 0%, rgba(14, 165, 233, 0.1), transparent 60%),
        var(--ff-white);
}
.tt-ff-cta-inner {
    text-align: center;
    padding: 36px 28px;
    border-radius: 20px;
    background: linear-gradient(160deg, #0b1f3a 0%, #123056 55%, #0f4c5c 100%);
    color: #fff;
    box-shadow: 0 24px 48px rgba(11, 31, 58, 0.2);
}
.tt-ff-cta-inner h2 {
    margin: 0 0 10px;
    font-family: var(--ff-display);
    font-size: clamp(1.45rem, 2.8vw, 1.95rem);
    font-weight: 700;
    color: #fff;
}
.tt-ff-cta-inner p {
    margin: 0 auto 22px;
    max-width: 44ch;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}
.tt-ff-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.tt-ff-cta .tt-ff-btn--ghost {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}
.tt-ff-cta .tt-ff-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
}

/* —— Responsive —— */
/* Stack early so the orbit never sits in a squeezed side column */
@media (max-width: 1040px) {
    .tt-ff-hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .tt-ff-hero-copy { text-align: center; }
    .tt-ff-hero-sub { margin-left: auto; margin-right: auto; }
    .tt-ff-hero-cta { justify-content: center; }
    body.tt-frontfacing-page { --ff-eco-r: 150px; }
    .tt-ff-eco {
        max-height: none;
        min-height: 540px;
        aspect-ratio: 1 / 0.95;
    }
    .tt-ff-eco.is-focus {
        min-height: 600px;
    }
    /* Keep 42%/48% so HTML actors stay locked to SVG orbit center */
    .tt-ff-eco-svg .tt-ff-eco-mirror,
    .tt-ff-eco-svg .tt-ff-eco-bridge,
    .tt-ff-eco-svg .tt-ff-eco-bridge-dot {
        opacity: 0.45;
    }
    .tt-ff-pillars { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .tt-ff-eco.is-focus .tt-ff-eco-slot.is-focus-slot,
    .tt-ff-eco.is-focus .tt-ff-eco-agent.is-focus-target {
        left: 50%;
        top: 16%;
    }
    /* Mobile sheet: Agent can be larger (panel is below, not beside) */
    .tt-ff-eco.is-focus .tt-ff-eco-agent.is-focus-target {
        width: 148px;
        height: 148px;
        margin: -74px 0 0 -74px;
    }
    .tt-ff-eco.is-focus .tt-ff-eco-actor.is-focus-target {
        margin-left: -90px;
        margin-top: -72px;
        width: 180px;
    }
    .tt-ff-eco.is-focus .tt-ff-eco-actor.is-focus-target .tt-ff-eco-actor-art {
        width: 144px;
        height: 144px;
        border-radius: 50%;
    }
    .tt-ff-eco.is-focus .tt-ff-eco-agent.is-focus-target .tt-ff-eco-agent-art {
        width: 76px;
        height: 76px;
    }
    .tt-ff-eco-panel {
        top: auto;
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-height: 58%;
        transform: translateY(110%);
        /* Sheet may be shorter than 8 bullets — scroll only when unavoidable */
        overflow: auto;
    }
    .tt-ff-eco-panel.is-open {
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .tt-ff-nav { padding: 10px 14px; }
    .tt-ff-brand-text small { display: none; }
    body.tt-frontfacing-page .tt-ff-brand-text strong.tt-ff-brand-title {
        font-size: 1.05rem;
    }
    .tt-ff-hero { padding: 32px 0 48px; }
    body.tt-frontfacing-page { --ff-eco-r: 122px; }
    .tt-ff-eco {
        min-height: 480px;
        aspect-ratio: 1 / 1.08;
    }
    .tt-ff-eco.is-focus {
        min-height: 520px;
    }
    .tt-ff-eco-actor {
        width: 84px;
        margin-left: -42px;
        margin-top: -30px;
        gap: 4px;
    }
    .tt-ff-eco-actor-art {
        width: 46px;
        height: 46px;
        border-radius: 50%;
    }
    .tt-ff-eco-actor-label {
        font-size: 0.68rem;
        padding: 2px 7px;
    }
    .tt-ff-eco-agent {
        width: 96px;
        height: 96px;
        margin: -48px 0 0 -48px;
    }
    .tt-ff-eco-agent-art {
        width: 48px;
        height: 48px;
    }
    .tt-ff-eco-agent strong { font-size: 0.86rem; }
    .tt-ff-eco-agent-mark { font-size: 0.62rem; }
    .tt-ff-eco-cues { display: none; }
    .tt-ff-eco-star {
        width: 24px;
        height: 24px;
        margin: -12px 0 0 -12px;
    }
    .tt-ff-eco-star svg { width: 12px; height: 12px; }
    .tt-ff-section { padding: 48px 0; }
    .tt-ff-cta-inner { padding: 28px 18px; }
}

/* —— Reduced motion: instant panel/bullets, no orbit spin —— */
@media (prefers-reduced-motion: reduce) {
    .tt-ff-eco-ring,
    .tt-ff-eco-ring--inner,
    .tt-ff-eco-mirror-ring,
    .tt-ff-eco-pulse,
    .tt-ff-eco-sync,
    .tt-ff-eco-bridge-dot,
    .tt-ff-eco-agent,
    .tt-ff-eco-sat,
    .tt-ff-eco-slot,
    .tt-ff-eco-cue,
    .tt-ff-eco-star,
    .tt-ff-graph-pulse,
    .tt-ff-tl-sync {
        animation: none !important;
    }
    .tt-ff-eco,
    .tt-ff-eco-agent,
    .tt-ff-eco-slot,
    .tt-ff-eco-actor,
    .tt-ff-eco-panel,
    .tt-ff-eco-backdrop,
    .tt-ff-eco-svg,
    .tt-ff-eco-bullet {
        transition: none !important;
    }
    .tt-ff-eco-cue { opacity: 1; transform: none; }
    .tt-ff-eco-stars { display: none; }
    .tt-ff-eco-cap-live { display: none; }
    .tt-ff-eco-cap-static { display: inline; }
}

body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-ring,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-ring--inner,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-mirror-ring,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-pulse,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-sync,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-bridge-dot,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-agent,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-sat,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-slot,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-cue,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-star,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-graph-pulse,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-tl-sync {
    animation: none !important;
}
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-agent,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-slot,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-actor,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-panel,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-backdrop,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-svg,
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-bullet {
    transition: none !important;
}
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-cue {
    opacity: 1;
    transform: none;
}
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-stars { display: none; }
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-cap-live { display: none; }
body.tt-frontfacing-page.tt-ff-reduced-motion .tt-ff-eco-cap-static { display: inline; }
